From b47521478ca716707c3821ee1d2c8339b3efea28 Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Thu, 19 Dec 2024 15:38:01 +0000 Subject: [PATCH 1/7] [bazel] Remove unused lint repos The verible syntax python file here is used directly within our Bazel repository, not through its own repository. Removed. The `lowrisc_misc_linters` repository should have been removed when it was migrated to Bzlmod. Signed-off-by: James Wainwright --- WORKSPACE.bzlmod | 4 ---- third_party/lint/BUILD | 3 --- third_party/lint/repos.bzl | 21 --------------------- 3 files changed, 28 deletions(-) delete mode 100644 third_party/lint/BUILD delete mode 100644 third_party/lint/repos.bzl diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index 39896c9d274cd..7c2eca484d1c8 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -22,10 +22,6 @@ crt_register_toolchains(riscv32 = True) load("//third_party/github:repos.bzl", "github_tools_repos") github_tools_repos() -# Various linters -load("//third_party/lint:repos.bzl", "lint_repos") -lint_repos() - # Lychee link checker. load("//third_party/lychee:repos.bzl", "lychee_repos") lychee_repos() diff --git a/third_party/lint/BUILD b/third_party/lint/BUILD deleted file mode 100644 index 3e8bb41965a28..0000000000000 --- a/third_party/lint/BUILD +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright lowRISC contributors (OpenTitan project). -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/lint/repos.bzl b/third_party/lint/repos.bzl deleted file mode 100644 index b1cfa66da8d3a..0000000000000 --- a/third_party/lint/repos.bzl +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright lowRISC contributors (OpenTitan project). -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("//rules:repo.bzl", "http_archive_or_local") - -def lint_repos(lowrisc_misc_linters = None): - # We have a 'vendored' copy of the google_verible_verilog_syntax_py repo - native.local_repository( - name = "google_verible_verilog_syntax_py", - path = "hw/ip/prim/util/vendor/google_verible_verilog_syntax_py", - ) - - http_archive_or_local( - name = "lowrisc_misc_linters", - local = lowrisc_misc_linters, - sha256 = "365fe67d8168fee1a0fc3aea4bb80588bf721dc4fc83b40463b09eb50897cda3", - strip_prefix = "misc-linters-20240823_01", - url = "https://github.com/lowRISC/misc-linters/archive/refs/tags/20240823_01.tar.gz", - ) From 2ac4fcf16c2f277c5cdf58a4585072ee0035c68b Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Thu, 19 Dec 2024 15:39:17 +0000 Subject: [PATCH 2/7] [bazel] Remove `rules_protobuf` dependency This was a transitive dependency of Buildifier that should have been removed when that was migrated to Bzlmod. Signed-off-by: James Wainwright --- WORKSPACE.bzlmod | 6 ------ third_party/protobuf/BUILD | 3 --- third_party/protobuf/deps.bzl | 8 -------- third_party/protobuf/repos.bzl | 15 --------------- 4 files changed, 32 deletions(-) delete mode 100644 third_party/protobuf/BUILD delete mode 100644 third_party/protobuf/deps.bzl delete mode 100644 third_party/protobuf/repos.bzl diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index 7c2eca484d1c8..855bdc4c726aa 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -47,12 +47,6 @@ tock_repos( load("//third_party/openocd:repos.bzl", "openocd_repos") openocd_repos() -# Protobuf Toolchain -load("//third_party/protobuf:repos.bzl", "protobuf_repos") -protobuf_repos() -load("//third_party/protobuf:deps.bzl", "protobuf_deps") -protobuf_deps() - # FreeRTOS; used by the OTTF load("//third_party/freertos:repos.bzl", "freertos_repos") freertos_repos() diff --git a/third_party/protobuf/BUILD b/third_party/protobuf/BUILD deleted file mode 100644 index 3e8bb41965a28..0000000000000 --- a/third_party/protobuf/BUILD +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright lowRISC contributors (OpenTitan project). -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/protobuf/deps.bzl b/third_party/protobuf/deps.bzl deleted file mode 100644 index c5a2419dd4cc6..0000000000000 --- a/third_party/protobuf/deps.bzl +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright lowRISC contributors (OpenTitan project). -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -load("@com_google_protobuf//:protobuf_deps.bzl", _protobuf_deps = "protobuf_deps") - -def protobuf_deps(): - _protobuf_deps() diff --git a/third_party/protobuf/repos.bzl b/third_party/protobuf/repos.bzl deleted file mode 100644 index 076416fceeb40..0000000000000 --- a/third_party/protobuf/repos.bzl +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright lowRISC contributors (OpenTitan project). -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -def protobuf_repos(): - http_archive( - name = "com_google_protobuf", - sha256 = "3bd7828aa5af4b13b99c191e8b1e884ebfa9ad371b0ce264605d347f135d2568", - strip_prefix = "protobuf-3.19.4", - urls = [ - "https://github.com/protocolbuffers/protobuf/archive/v3.19.4.tar.gz", - ], - ) From b6d60047f88e7aeef0108d5993118362eb532d0e Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Thu, 19 Dec 2024 16:47:05 +0000 Subject: [PATCH 3/7] [bazel] Fix external include paths These paths are not stable and should not be hard coded. Files must use the path relative to `includes = [...]` parameters added to `cc_library` rules. These paths change under bzlmod. Signed-off-by: James Wainwright --- third_party/freertos/BUILD.freertos.bazel | 4 +++- third_party/llvm_compiler_rt/BUILD.llvm_compiler_rt.bazel | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/third_party/freertos/BUILD.freertos.bazel b/third_party/freertos/BUILD.freertos.bazel index 3404163487f10..a91505525bd1d 100644 --- a/third_party/freertos/BUILD.freertos.bazel +++ b/third_party/freertos/BUILD.freertos.bazel @@ -7,13 +7,14 @@ package(default_visibility = ["//visibility:public"]) cc_library( name = "portmacro", hdrs = ["portable/GCC/RISC-V/portmacro.h"], + include_prefix = "external/freertos", includes = ["portable/GCC/RISC-V"], target_compatible_with = ["@platforms//cpu:riscv32"], ) cc_library( name = "hdrs", - srcs = [ + hdrs = [ "include/FreeRTOS.h", "include/StackMacros.h", "include/atomic.h", @@ -33,6 +34,7 @@ cc_library( "include/task.h", "include/timers.h", ], + include_prefix = "external/freertos", includes = ["include"], deps = [ ":portmacro", diff --git a/third_party/llvm_compiler_rt/BUILD.llvm_compiler_rt.bazel b/third_party/llvm_compiler_rt/BUILD.llvm_compiler_rt.bazel index 3513fb28649ef..7846059dcca06 100644 --- a/third_party/llvm_compiler_rt/BUILD.llvm_compiler_rt.bazel +++ b/third_party/llvm_compiler_rt/BUILD.llvm_compiler_rt.bazel @@ -26,7 +26,10 @@ cc_library( name = "hdrs", srcs = [ "include/profile/InstrProfData.inc", + ], + hdrs = [ "lib/profile/InstrProfiling.h", ], + include_prefix = "external/llvm_compiler_rt", includes = ["include"], ) From 46b2253a190aa3e12ce1113efafd0cd1c98b896e Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Tue, 17 Dec 2024 13:48:37 +0000 Subject: [PATCH 4/7] [bazel] Migrate source repositories to bzlmod These repositories are not Bazel-aware, we're only using them for their sources. Each dependency's `_repos()` function is made private and run from a bzlmod extension which is called from `MODULE.bazel` and the repositories are brought into the module's namespace. Signed-off-by: James Wainwright --- MODULE.bazel | 70 ++ MODULE.bazel.lock | 800 ++++++++++++++++++ WORKSPACE.bzlmod | 73 -- .../coremark/{repos.bzl => extensions.bzl} | 6 +- .../freertos/{repos.bzl => extensions.bzl} | 6 +- .../github/{repos.bzl => extensions.bzl} | 6 +- third_party/hsm/{repos.bzl => extensions.bzl} | 6 +- .../hyperdebug/{repos.bzl => extensions.bzl} | 6 +- .../{repos.bzl => extensions.bzl} | 6 +- .../lychee/{repos.bzl => extensions.bzl} | 11 +- .../{repos.bzl => extensions.bzl} | 6 +- .../open-dice/{repos.bzl => extensions.bzl} | 11 +- .../openocd/{repos.bzl => extensions.bzl} | 11 +- .../{repos.bzl => extensions.bzl} | 6 +- .../rust/{repos.bzl => extensions.bzl} | 11 +- .../shellcheck/{repos.bzl => extensions.bzl} | 11 +- .../sphincsplus/{repos.bzl => extensions.bzl} | 10 +- .../tock/{repos.bzl => extensions.bzl} | 16 +- .../wycheproof/{repos.bzl => extensions.bzl} | 6 +- .../xkcp/{repos.bzl => extensions.bzl} | 6 +- 20 files changed, 971 insertions(+), 113 deletions(-) rename third_party/coremark/{repos.bzl => extensions.bzl} (89%) rename third_party/freertos/{repos.bzl => extensions.bzl} (90%) rename third_party/github/{repos.bzl => extensions.bzl} (83%) rename third_party/hsm/{repos.bzl => extensions.bzl} (94%) rename third_party/hyperdebug/{repos.bzl => extensions.bzl} (83%) rename third_party/llvm_compiler_rt/{repos.bzl => extensions.bzl} (87%) rename third_party/lychee/{repos.bzl => extensions.bzl} (77%) rename third_party/nist_cavp_testvectors/{repos.bzl => extensions.bzl} (98%) rename third_party/open-dice/{repos.bzl => extensions.bzl} (78%) rename third_party/openocd/{repos.bzl => extensions.bzl} (87%) rename third_party/riscv-compliance/{repos.bzl => extensions.bzl} (87%) rename third_party/rust/{repos.bzl => extensions.bzl} (67%) rename third_party/shellcheck/{repos.bzl => extensions.bzl} (77%) rename third_party/sphincsplus/{repos.bzl => extensions.bzl} (93%) rename third_party/tock/{repos.bzl => extensions.bzl} (97%) rename third_party/wycheproof/{repos.bzl => extensions.bzl} (85%) rename third_party/xkcp/{repos.bzl => extensions.bzl} (90%) diff --git a/MODULE.bazel b/MODULE.bazel index 7332b75d97adb..2c71e18e4a58e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -39,3 +39,73 @@ include("//third_party/python:python.MODULE.bazel") bitstreams_repo = use_repo_rule("//rules:bitstreams.bzl", "bitstreams_repo") bitstreams_repo(name = "bitstreams") + +# Source repositories (not Bazel-aware): +github_tools = use_extension("//third_party/github:extensions.bzl", "github_tools") +use_repo(github_tools, "com_github_gh") + +lychee = use_extension("//third_party/lychee:extensions.bzl", "lychee") +use_repo(lychee, "lychee") + +serde_annotate = use_extension("//third_party/rust:extensions.bzl", "serde_annotate") +use_repo(serde_annotate, "lowrisc_serde_annotate") + +shellcheck = use_extension("//third_party/shellcheck:extensions.bzl", "shellcheck") +use_repo(shellcheck, "shellcheck") + +tock = use_extension("//third_party/tock:extensions.bzl", "tock") +use_repo(tock, "elf2tab", "libtock", "tock") + +openocd = use_extension("//third_party/openocd:extensions.bzl", "openocd") +use_repo(openocd, "openocd") + +freertos = use_extension("//third_party/freertos:extensions.bzl", "freertos") +use_repo(freertos, "freertos") + +llvm_compiler_rt = use_extension("//third_party/llvm_compiler_rt:extensions.bzl", "llvm_compiler_rt") +use_repo(llvm_compiler_rt, "llvm_compiler_rt") + +riscv_compliance = use_extension("//third_party/riscv-compliance:extensions.bzl", "riscv_compliance") +use_repo(riscv_compliance, "riscv-compliance") + +coremark = use_extension("//third_party/coremark:extensions.bzl", "coremark") +use_repo(coremark, "coremark") + +xkcp = use_extension("//third_party/xkcp:extensions.bzl", "xkcp") +use_repo(xkcp, "xkcp") + +hsm = use_extension("//third_party/hsm:extensions.bzl", "hsm") +use_repo(hsm, "cloud_kms_hsm", "sc_hsm", "softhsm2") + +nist_cavp = use_extension("//third_party/nist_cavp_testvectors:extensions.bzl", "nist_cavp") +use_repo( + nist_cavp, + "nist_cavp_aes_gcm", + "nist_cavp_aes_kat", + "nist_cavp_aes_kw_sp_800_38f", + "nist_cavp_drbg_sp_800_90a_root", + "nist_cavp_ecdh_sp_800_56a", + "nist_cavp_ecdsa_fips_186_4", + "nist_cavp_hmac_fips_198_1", + "nist_cavp_rsa_fips_186_3", + "nist_cavp_sha2_fips_180_4", + "nist_cavp_sha3_fips_202", + "nist_cavp_shake_fips_202", +) + +wycheproof = use_extension("//third_party/wycheproof:extensions.bzl", "wycheproof") +use_repo(wycheproof, "wycheproof") + +sphincsplus = use_extension("//third_party/sphincsplus:extensions.bzl", "sphincsplus") +use_repo( + sphincsplus, + "sphincsplus_fips205_ipd", + "sphincsplus_sha256_kat", + "sphincsplus_shake256_kat", +) + +open_dice = use_extension("//third_party/open-dice:extensions.bzl", "open_dice") +use_repo(open_dice, "open-dice") + +hyperdebug = use_extension("//third_party/hyperdebug:extensions.bzl", "hyperdebug") +use_repo(hyperdebug, "hyperdebug_firmware") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 17bd94a9ecf70..14c3b297567e2 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -173,6 +173,806 @@ }, "selectedYankedVersions": {}, "moduleExtensions": { + "//third_party/coremark:extensions.bzl%coremark": { + "general": { + "bzlTransitiveDigest": "oYo82g1v5+HVld/0IwdJ9ySQQ8T3TvFE4GeVWBErLKM=", + "usagesDigest": "2Rw2u4BdMyaIwI4YT4ljG3LsOQ4DRpLCsRYOyCC9ZfQ=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "coremark": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/coremark:BUILD.coremark.bazel", + "sha256": "a5964bf215786d65d08941b6f9a9a4f4e50524f5391fa3826db2994c47d5e7f3", + "strip_prefix": "coremark-eefc986ebd3452d6adde22eafaff3e5c859f29e4", + "urls": [ + "https://github.com/eembc/coremark/archive/eefc986ebd3452d6adde22eafaff3e5c859f29e4.tar.gz" + ], + "patches": [ + "@@//third_party/coremark:use_ottf_main.patch", + "@@//third_party/coremark:print_coremark_per_mhz.patch" + ], + "patch_args": [ + "-p1" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/freertos:extensions.bzl%freertos": { + "general": { + "bzlTransitiveDigest": "/FQJ+BTUkI8KVA6zH5bf9ISh+S5NtLe59qvFJ92eEYc=", + "usagesDigest": "LLGF1pNB1qTW2QYCRp1VH3TJcvhB6wtmdwscSSXF8YQ=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "freertos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/freertos:BUILD.freertos.bazel", + "sha256": "c4c29136071b84841c3f00675da35f5e61e83c1fa18ac43841c478f99190dd7d", + "strip_prefix": "FreeRTOS-Kernel-0b1e9d79c82c1bf00e93142f9d5b1b7b62446995", + "urls": [ + "https://github.com/FreeRTOS/FreeRTOS-Kernel/archive/0b1e9d79c82c1bf00e93142f9d5b1b7b62446995.tar.gz" + ], + "patches": [ + "@@//third_party/freertos:0001-Remove-mtime-address-macros.patch", + "@@//third_party/freertos:0002-Remove-references-to-stdlib.h.patch", + "@@//third_party/freertos:0003-Replace-string.h-with-references-to-OT-memory.h.patch" + ], + "patch_args": [ + "-p1" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/github:extensions.bzl%github_tools": { + "general": { + "bzlTransitiveDigest": "EijGD0pPTUwod3bEz+vvY4dP/AJLWuVNEXIsPH9Y6Ts=", + "usagesDigest": "7DkmGJiB80+4T2k2zjL0cI8Af4j+MK7nqUFAFA7eJNY=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "com_github_gh": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/cli/cli/releases/download/v2.13.0/gh_2.13.0_linux_amd64.tar.gz", + "sha256": "9e833e02428cd49e0af73bc7dc4cafa329fe3ecba1bfe92f0859bf5b11916401", + "build_file": "@@//third_party/github:BUILD.gh.bazel", + "strip_prefix": "gh_2.13.0_linux_amd64" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/hsm:extensions.bzl%hsm": { + "general": { + "bzlTransitiveDigest": "N0Ig5Wjtbydk+0T+3/AbZ1OZwIU2gSl7/vCkLVDUhck=", + "usagesDigest": "mu3b1NhkSkrsBm0cZ6CBA9ZVEvuZ6YymSKRyvB8ZrG0=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "cloud_kms_hsm": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/hsm:BUILD.cloud_kms_hsm.bazel", + "url": "https://github.com/GoogleCloudPlatform/kms-integrations/releases/download/pkcs11-v1.2/libkmsp11-1.2-linux-amd64.tar.gz", + "strip_prefix": "libkmsp11-1.2-linux-amd64", + "sha256": "81fff58d5835f05d550ff86c88fa6fb92a733bde8b232e1482d85a3cf07c6396" + } + }, + "softhsm2": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/hsm:BUILD.softhsm2.bazel", + "url": "https://github.com/opendnssec/SoftHSMv2/archive/4975c0df4c7090e97a3860ae21079a9597cfedc6.tar.gz", + "strip_prefix": "SoftHSMv2-4975c0df4c7090e97a3860ae21079a9597cfedc6", + "sha256": "72cf979ec4f74ca4555861dcae45cf7d1b667cc2e4f3ee3fb26e6ff1b99aec95", + "patches": [ + "@@//third_party/hsm:0001-Disable-filename-logging.patch" + ], + "patch_args": [ + "-p1" + ] + } + }, + "sc_hsm": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/hsm:BUILD.sc_hsm.bazel", + "url": "https://github.com/CardContact/sc-hsm-embedded/archive/refs/tags/V2.12.tar.gz", + "strip_prefix": "sc-hsm-embedded-2.12", + "sha256": "707fca9df630708e0e59a7d4a8a7a016c56c83a585957f0fd9f806c0762f1944" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/hyperdebug:extensions.bzl%hyperdebug": { + "general": { + "bzlTransitiveDigest": "3loY09fIwvLLGCrs/lE9Nt6Xix9Rw7i7fe+dxmoegxw=", + "usagesDigest": "K8zzt/ed9B09EhnXxX3ZDGxVJrCxWeFKaYd/lNFhIlU=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "hyperdebug_firmware": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "urls": [ + "https://github.com/lowRISC/hyperdebug-firmware/releases/download/20241211_02/hyperdebug-firmware.tar.gz" + ], + "sha256": "8b72dfe4ecb6a2258228e62c2246c5beffe8339d440a592c483534fa3f54d679", + "build_file": "@@//third_party/hyperdebug:BUILD" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/llvm_compiler_rt:extensions.bzl%llvm_compiler_rt": { + "general": { + "bzlTransitiveDigest": "9by7wGNqZ6xTeVHbEPrcTWDSPfJ9nySxFHb5oN+PilM=", + "usagesDigest": "zPU6Y/UeGIc1XYL+S8s9utiQWrKdW0oDmXUJf+QpxLQ=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "llvm_compiler_rt": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/llvm_compiler_rt:BUILD.llvm_compiler_rt.bazel", + "sha256": "46abe68f006646c15f6d551a2be0ac27e681c5fcc646d712389a5e50ddf69c60", + "strip_prefix": "compiler-rt-16.0.2.src", + "urls": [ + "https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.2/compiler-rt-16.0.2.src.tar.xz" + ], + "patches": [ + "@@//third_party/llvm_compiler_rt:0001-Headers.patch", + "@@//third_party/llvm_compiler_rt:0002-invalid-data.patch" + ], + "patch_args": [ + "-p1" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/lychee:extensions.bzl%lychee": { + "general": { + "bzlTransitiveDigest": "dp7fsvt0uZMcrNBnGFx2cmYh9oABupZn0OznHP8v7gs=", + "usagesDigest": "C1lJ0XTlqnpJ48SmBdn/WIadQ9tEgkVJOczF9mZgztU=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "lychee": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/lycheeverse/lychee/releases/download/v0.14.3/lychee-v0.14.3-x86_64-unknown-linux-gnu.tar.gz", + "build_file_content": "\npackage(default_visibility = [\"//visibility:public\"])\nexports_files(glob([\"**\"]))\n", + "sha256": "2a47a11d7fd3498ea3e0f8f58909e1673d652f917205d41dcf852fed1ad56ff7" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/nist_cavp_testvectors:extensions.bzl%nist_cavp": { + "general": { + "bzlTransitiveDigest": "Gjp4LYJpz37w0eJZ8Zh2O5/odp2pTpQNPVNGzzySui4=", + "usagesDigest": "OcvHjjhd3a8vcDiholHHqKWbiCZg1Qe4uSruL97NaGI=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "nist_cavp_aes_gcm": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "sha256": "f9fc479e134cde2980b3bb7cddbcb567b2cd96fd753835243ed067699f26a023", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/mac/gcmtestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/gcmtestvectors.zip" + ] + } + }, + "nist_cavp_ecdsa_fips_186_4": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "strip_prefix": "186-4ecdsatestvectors", + "sha256": "fe47cc92b4cee418236125c9ffbcd9bb01c8c34e74a4ba195d954bcb72824752", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/dss/186-4ecdsatestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/186-4ecdsatestvectors.zip" + ] + } + }, + "nist_cavp_sha3_fips_202": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "sha256": "cd07701af2e47f5cc889d642528b4bf11f8b6eb55797c7307a96828ed8d8fc8c", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/sha3/sha-3bytetestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/sha-3bytetestvectors.zip" + ] + } + }, + "nist_cavp_sha2_fips_180_4": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "strip_prefix": "shabytetestvectors", + "sha256": "929ef80b7b3418aca026643f6f248815913b60e01741a44bba9e118067f4c9b8", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabytetestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/shabytetestvectors.zip" + ] + } + }, + "nist_cavp_shake_fips_202": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "sha256": "debfebc3157b3ceea002b84ca38476420389a3bf7e97dc5f53ea4689a16de4c7", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/sha3/shakebytetestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/shakebytetestvectors.zip" + ] + } + }, + "nist_cavp_aes_kat": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "sha256": "a203b16c9246b2ebae31dee5de21a606be80cf78ceabaca37150236fa098eb60", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/aes/KAT_AES.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/KAT_AES.zip" + ] + } + }, + "nist_cavp_hmac_fips_198_1": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "sha256": "418c3837d38f249d6668146bd0090db24dd3c02d2e6797e3de33860a387ae4bd", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/mac/hmactestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/hmactestvectors.zip" + ] + } + }, + "nist_cavp_drbg_sp_800_90a_root": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "sha256": "5f7e5658ebd5b4e6785a7b12fa32333511d2acc2f2d9c5ae1ffa16b699377769", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/drbg/drbgtestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/drbgtestvectors.zip" + ] + } + }, + "nist_cavp_aes_kw_sp_800_38f": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "strip_prefix": "kwtestvectors", + "sha256": "04a4a82e4de65bca505125295003f9c75a5a815afda046dc83661b8b580dfdf3", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/mac/kwtestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/kwtestvectors.zip" + ] + } + }, + "nist_cavp_rsa_fips_186_3": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "sha256": "8405aeb3572a4f98ed4b1a3ccb3f2f49e725462dd28ec4759d6a15d88855d19c", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/dss/186-3rsatestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/186-3rsatestvectors.zip" + ] + } + }, + "nist_cavp_ecdh_sp_800_56a": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/nist_cavp_testvectors:BUILD.nist_cavp_common.bazel", + "sha256": "5fff092551f2d72e89a3d9362711878708f9a14b502f0dfae819649105b0ea39", + "urls": [ + "https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/components/ecccdhtestvectors.zip", + "https://storage.googleapis.com/ot-crypto-test-vectors/nist/ecccdhtestvectors.zip" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/open-dice:extensions.bzl%open_dice": { + "general": { + "bzlTransitiveDigest": "CFBwD8rTE8Hk/R2huNOcNoh+1tuu3eRvYQ6N/QK5aHk=", + "usagesDigest": "JS7GxioQYipTmuvH3Q9liClSKpuPbE8hW9EyTeNJMo8=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "open-dice": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/open-dice:BUILD.open-dice.bazel", + "strip_prefix": "open-dice-cf3f4cc7a3506a33ee3a437544ef6f40056b3563", + "urls": [ + "https://github.com/google/open-dice/archive/cf3f4cc7a3506a33ee3a437544ef6f40056b3563.zip" + ], + "sha256": "d7ce830111451afe2a255cac3b750f82e50efe2aaf6bac0b076881c964cfe78d", + "patches": [ + "@@//third_party/open-dice:Add-a-local-strlen-implementation.patch" + ], + "patch_args": [ + "-p1" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/openocd:extensions.bzl%openocd": { + "general": { + "bzlTransitiveDigest": "l5MEHQifrShllgIds01fPKYZEF4zYajzohBzWgzsKPU=", + "usagesDigest": "gXMbnbxNBTg41VMJTLfBtmRVZ3szz+CcSyKiAFRilWQ=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "openocd": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "urls": [ + "https://deb.debian.org/debian/pool/main/o/openocd/openocd_0.12.0.orig.tar.bz2", + "https://sourceforge.net/projects/openocd/files/openocd/0.12.0/openocd-0.12.0.tar.gz" + ], + "strip_prefix": "openocd-0.12.0", + "build_file": "@@//third_party/openocd:BUILD.openocd.bazel", + "sha256": "af254788be98861f2bd9103fe6e60a774ec96a8c374744eef9197f6043075afa", + "patches": [ + "@@//third_party/openocd:calloc_transpose.patch", + "@@//third_party/openocd:reset_on_dmi_op_error.patch", + "@@//third_party/openocd:string_truncate_build_error.patch" + ], + "patch_args": [ + "-p1" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ], + [ + "", + "lowrisc_opentitan", + "" + ] + ] + } + }, + "//third_party/riscv-compliance:extensions.bzl%riscv_compliance": { + "general": { + "bzlTransitiveDigest": "yy13CaTTAIrDakPXT4CFPd6k3fhD8hs/HK/1/HZDyYM=", + "usagesDigest": "X4fjnmL/qLY3Umq+OyBElFJjNuEhyxpVugPcBohIft0=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "riscv-compliance": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/riscv-compliance:BUILD.riscv-compliance.bazel", + "sha256": "e77d823189c145314e48d4c29bcecc844b9c1582826ff406ec499cad7e95d0e4", + "strip_prefix": "riscv-arch-test-2636302c27557b42d99bed7e0537beffdf8e1ab4", + "urls": [ + "https://github.com/riscv/riscv-compliance/archive/2636302c27557b42d99bed7e0537beffdf8e1ab4.tar.gz" + ], + "patches": [ + "@@//third_party/riscv-compliance:0001-Add-configurable-trap-alignment-and-entry-point-to-p.patch" + ], + "patch_args": [ + "-p1" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/rust:extensions.bzl%serde_annotate": { + "general": { + "bzlTransitiveDigest": "8BSPmJM760qSNqw/vNiW5gmYLbOh+RsgYr5gVFwJsnc=", + "usagesDigest": "f3vkrggnvurUr7AjDoyA0uajHinigRunP6EApG+RHVo=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "lowrisc_serde_annotate": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "sha256": "7d6db7c811469f3abd6b58745bd2b8ebb7596a68974739da51bc8b6568c8002a", + "strip_prefix": "serde-annotate-0.0.11", + "url": "https://github.com/lowRISC/serde-annotate/archive/refs/tags/v0.0.11.tar.gz" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/shellcheck:extensions.bzl%shellcheck": { + "general": { + "bzlTransitiveDigest": "UIeragyuFpm0yynHLg1qNyWE8ghAzq2gFgyIvUXN3ek=", + "usagesDigest": "Rucq6bklWqi54V/TEFtVgtWWDptAoJOETXUJwpHGCWk=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "shellcheck": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.linux.x86_64.tar.xz", + "sha256": "700324c6dd0ebea0117591c6cc9d7350d9c7c5c287acbad7630fa17b1d4d9e2f", + "strip_prefix": "shellcheck-v0.9.0", + "build_file_content": "\npackage(default_visibility = [\"//visibility:public\"])\nexports_files(glob([\"**\"]))\n" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/sphincsplus:extensions.bzl%sphincsplus": { + "general": { + "bzlTransitiveDigest": "EpuqZN0OW8qwjX/Wl2Nh+WYdwRDNIzWaLUh3Vh7jCpc=", + "usagesDigest": "t8W6lQlG2im5bAEMpO63sMVuFLwNVvAkEO/SNLXXEnQ=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "sphincsplus_shake256_kat": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/sphincsplus:BUILD.sphincsplus_common.bazel", + "sha256": "95f5c79995ad8a3bc752c760f93ec409763cf2b23d1a7a7404219f26d665f7ab", + "urls": [ + "https://storage.googleapis.com/ot-crypto-test-vectors/sphincsplus/sphincsplus_shake256_128s_fips205-ipd.zip" + ] + } + }, + "sphincsplus_sha256_kat": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/sphincsplus:BUILD.sphincsplus_common.bazel", + "sha256": "1656a6aa06d731905ef72fcfbdf65f365d4c0fe89cbf3b24d1dbb64669a25e35", + "urls": [ + "https://storage.googleapis.com/ot-crypto-test-vectors/sphincsplus/sphincsplus_sha256_128s_fips205-ipd.zip" + ] + } + }, + "sphincsplus_fips205_ipd": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/sphincs/sphincsplus/archive/129b72c80e122a22a61f71b5d2b042770890ccee.tar.gz", + "strip_prefix": "sphincsplus-129b72c80e122a22a61f71b5d2b042770890ccee/ref", + "build_file": "@@//third_party/sphincsplus:BUILD.sphincsplus.bazel", + "sha256": "b301faa7a42ef538323a732929d49341b1cbd8375f643f7d98ca32cd6efacc32", + "patches": [ + "@@//third_party/sphincsplus:sphincsplus-namespace.patch" + ], + "patch_args": [ + "-p2" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ], + [ + "", + "lowrisc_opentitan", + "" + ] + ] + } + }, + "//third_party/tock:extensions.bzl%tock": { + "general": { + "bzlTransitiveDigest": "UmizRybXL82LkwYxSo53UxBonqPh0KDRHy7+wQplhvs=", + "usagesDigest": "fQHPKaIGApMNRxDqTd07pSqd9IzEr+5D869in2Lsz48=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "libtock": { + "bzlFile": "@@//rules:repo.bzl", + "ruleClassName": "bare_repository", + "attributes": { + "local": "", + "strip_prefix": "libtock-rs-a2c6ad80648e3ba073e7433b4330706df052a6ae", + "url": "https://github.com/tock/libtock-rs/archive/a2c6ad80648e3ba073e7433b4330706df052a6ae.tar.gz", + "sha256": "888d1925cd760e818385d13187286d6b87f763c548a4dc1bb26e55786dc95636", + "additional_files_content": { + "BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"libtock\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//apis/adc\",\n \"//apis/air_quality\",\n \"//apis/alarm\",\n \"//apis/ambient_light\",\n \"//apis/buttons\",\n \"//apis/buzzer\",\n \"//apis/console\",\n \"//apis/gpio\",\n \"//apis/leds\",\n \"//apis/low_level_debug\",\n \"//apis/ninedof\",\n \"//apis/proximity\",\n \"//apis/sound_pressure\",\n \"//apis/temperature\",\n \"//panic_handlers/debug_panic\",\n \"//platform\",\n \"//runtime\",\n ],\n)\n\n\n", + "apis/adc/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"adc\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_adc\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_adc\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/air_quality/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"air_quality\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_air_quality\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_air_quality\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/alarm/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"alarm\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_alarm\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_alarm\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/ambient_light/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"ambient_light\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_ambient_light\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_ambient_light\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/buttons/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"buttons\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_buttons\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_buttons\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/buzzer/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"buzzer\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_buzzer\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_buzzer\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/console/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"console\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_console\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_console\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/gpio/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"gpio\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_gpio\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_gpio\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/leds/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"leds\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_leds\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_leds\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/low_level_debug/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"low_level_debug\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_low_level_debug\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_low_level_debug\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/ninedof/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"ninedof\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_ninedof\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_ninedof\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n \"@tock_index//:libm\",\n ],\n)\n\n\n", + "apis/proximity/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"proximity\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_proximity\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_proximity\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/sound_pressure/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"sound_pressure\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_sound_pressure\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_sound_pressure\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "apis/temperature/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"temperature\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_temperature\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_temperature\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n", + "build_scripts/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"build_scripts\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_build_scripts\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_build_scripts\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \n ],\n)\n\n\nfilegroup(\n name = \"layout\",\n srcs = [\"libtock_layout.ld\"],\n)\n\n", + "panic_handlers/debug_panic/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"debug_panic\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_debug_panic\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_debug_panic\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//apis/console\",\n \"//apis/low_level_debug\",\n \"//platform\",\n \"//runtime\",\n ],\n)\n\n\n", + "panic_handlers/small_panic/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"small_panic\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_small_panic\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_small_panic\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//apis/low_level_debug\",\n \"//platform\",\n \"//runtime\",\n ],\n)\n\n\n", + "platform/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"platform\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_platform\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_platform\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \n ],\n)\n\n\n", + "runtime/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"runtime\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"libtock_runtime\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=libtock_runtime\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//platform\",\n ],\n)\n\n\n" + } + } + }, + "elf2tab": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/tock/elf2tab/archive/2f0e2f0ef01e37799850d1b12f48b93a0b32a203.tar.gz", + "sha256": "b8b2ec7d8b9d052667d34190f98a0f5e69a0ba93ce69f00f2fdda7b5e241b963", + "strip_prefix": "elf2tab-2f0e2f0ef01e37799850d1b12f48b93a0b32a203", + "build_file": "@@//third_party/tock:BUILD.elf2tab.bazel" + } + }, + "tock": { + "bzlFile": "@@//rules:repo.bzl", + "ruleClassName": "bare_repository", + "attributes": { + "local": "", + "strip_prefix": "tock-e81987f6a41e9b92f60fda1d5283f46b3cb597b5", + "url": "https://github.com/tock/tock/archive/e81987f6a41e9b92f60fda1d5283f46b3cb597b5.tar.gz", + "sha256": "b7c239f3bd7e7727eee99814661424e1e50587fe9068cec1943a7bb6743ed777", + "additional_files_content": { + "BUILD": "exports_files(glob([\"**\"]))", + "arch/riscv/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"riscv\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"riscv\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=riscv\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//kernel\",\n \"//libraries/tock-register-interface:tock-registers\",\n \"//libraries/riscv-csr\",\n ],\n)\n\n\n", + "arch/rv32i/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"rv32i\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"rv32i\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=rv32i\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//arch/riscv\",\n \"//kernel\",\n \"//libraries/tock-register-interface:tock-registers\",\n \"//libraries/riscv-csr\",\n ],\n)\n\n\n", + "boards/BUILD": "\npackage(default_visibility = [\"//visibility:public\"])\n\nfilegroup(\n name = \"kernel_layout\",\n srcs = [\"kernel_layout.ld\"],\n)\n", + "boards/components/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"components\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"components\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=components\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//kernel\",\n \"//capsules/core:capsules-core\",\n \"//capsules/extra:capsules-extra\",\n ],\n)\n\n\n", + "boards/opentitan/earlgrey-cw310/BUILD": "\npackage(default_visibility = [\"//visibility:public\"])\n\nfilegroup(\n name = \"kernel_srcs\",\n srcs = glob([\"**/*.rs\"]),\n)\n", + "capsules/aes_gcm/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"capsules-aes-gcm\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"capsules_aes_gcm\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=capsules_aes_gcm\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//kernel\",\n \"//libraries/enum_primitive\",\n \"//libraries/tickv\",\n \"@tock_index//:ghash\",\n ],\n)\n\n\n", + "capsules/core/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"capsules-core\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"capsules_core\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=capsules_core\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//kernel\",\n \"//libraries/enum_primitive\",\n \"//libraries/tickv\",\n ],\n)\n\n\n", + "capsules/extra/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"capsules-extra\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"capsules_extra\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=capsules_extra\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//kernel\",\n \"//libraries/enum_primitive\",\n \"//libraries/tickv\",\n \"//capsules/core:capsules-core\",\n ],\n)\n\n\n", + "chips/earlgrey/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"earlgrey\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"earlgrey\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=earlgrey\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//chips/lowrisc\",\n \"//arch/rv32i\",\n \"//kernel\",\n ],\n)\n\n\n", + "chips/lowrisc/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"lowrisc\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"lowrisc\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=lowrisc\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//arch/rv32i\",\n \"//kernel\",\n ],\n)\n\n\n", + "libraries/enum_primitive/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"enum_primitive\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"enum_primitive\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=enum_primitive\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \n ],\n)\n\n\n", + "libraries/riscv-csr/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"riscv-csr\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"riscv_csr\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=riscv_csr\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//libraries/tock-register-interface:tock-registers\",\n ],\n)\n\n\n", + "libraries/tickv/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"tickv\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"tickv\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=tickv\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \n ],\n)\n\n\n", + "libraries/tock-cells/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"tock-cells\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"tock_cells\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=tock_cells\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \n ],\n)\n\n\n", + "libraries/tock-tbf/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"tock-tbf\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"tock_tbf\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=tock_tbf\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \n ],\n)\n\n\n", + "libraries/tock-register-interface/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"tock-registers\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \"default\",\n \"register_types\",\n ],\n crate_name = \"tock_registers\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=tock_registers\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \n ],\n)\n\n\n", + "kernel/BUILD": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by the crate_build function in\n# //rules:rust.bzl.\n###############################################################################\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nrust_library(\n name = \"kernel\",\n srcs = glob([\"**/*.rs\"]),\n compile_data = glob(\n include = [\"**\"],\n exclude = [\n \"**/* *\",\n \"BUILD\",\n \"BUILD.bazel\",\n \"WORKSPACE\",\n \"WORKSPACE.bazel\",\n ],\n ),\n crate_features = [\n \n ],\n crate_name = \"kernel\",\n crate_root = \"src/lib.rs\",\n edition = \"2021\",\n rustc_flags = [\n \"--cap-lints=allow\",\n ],\n tags = [\n \"cargo-bazel\",\n \"crate-name=kernel\",\n \"manual\",\n \"noclippy\",\n \"norustfmt\",\n ],\n version = \"0.1.0\",\n deps = [\n \"//libraries/tock-register-interface:tock-registers\",\n \"//libraries/tock-cells\",\n \"//libraries/tock-tbf\",\n ],\n)\n\n\n" + } + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "", + "" + ], + [ + "", + "bazel_skylib", + "bazel_skylib~" + ], + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/wycheproof:extensions.bzl%wycheproof": { + "general": { + "bzlTransitiveDigest": "kmt2c9L8O0JlFangp9yjBM7ywczDXTg/NqMMNMcSlaU=", + "usagesDigest": "dk98a4xQ9Y0k11OyordVp7uZl3+PELs8YTaEadUagiE=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "wycheproof": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/wycheproof:BUILD.wycheproof_common.bazel", + "sha256": "a7a4c18d0d5609b26f3341dc7a9dd6829174d542ee6f0434f5fa7319e0811b75", + "strip_prefix": "wycheproof-snapshot-d9f6ec7d8bd8c96da05368999094e4a75ba5cb3d", + "url": "https://github.com/lowRISC/wycheproof/archive/refs/tags/snapshot-d9f6ec7d8bd8c96da05368999094e4a75ba5cb3d.tar.gz" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "//third_party/xkcp:extensions.bzl%xkcp": { + "general": { + "bzlTransitiveDigest": "Dz8R8hb9r3rBc3oCTg9Wf9JSXuw7jfMvoUrEckHZJoU=", + "usagesDigest": "qkYYTGDkeziq6h2yN6tT+eOx8e9MK0QFk+UIBidIGTE=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "xkcp": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "build_file": "@@//third_party/xkcp:BUILD.xkcp.bazel", + "sha256": "bfd50261e0196988f7c4f45871b82e5ec9c3a74e18276f50dda48ab51f3cdb53", + "strip_prefix": "XKCP-56ae09923153c3e801a6891eb19e4a3b5bb6f6e2/lib", + "urls": [ + "https://github.com/XKCP/XKCP/archive/56ae09923153c3e801a6891eb19e4a3b5bb6f6e2.tar.gz" + ], + "patches": [ + "@@//third_party/xkcp:add_config_header.patch", + "@@//third_party/xkcp:add_main_license.patch" + ], + "patch_args": [ + "-p1" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, "@@apple_support~//crosstool:setup.bzl%apple_cc_configure_extension": { "general": { "bzlTransitiveDigest": "Co35oEwSoYZFy42IHjYfE7VkKR1WykyxhRlbUGSa3XA=", diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index 855bdc4c726aa..50cb50b09dcee 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -18,75 +18,6 @@ crt_deps() load("@crt//config:registration.bzl", "crt_register_toolchains") crt_register_toolchains(riscv32 = True) -# Tools for release automation -load("//third_party/github:repos.bzl", "github_tools_repos") -github_tools_repos() - -# Lychee link checker. -load("//third_party/lychee:repos.bzl", "lychee_repos") -lychee_repos() - -# Rust Toolchain + crates.io Dependencies -load("//third_party/rust:repos.bzl", "rust_repos") -rust_repos() - -# Shellcheck -load("//third_party/shellcheck:repos.bzl", "shellcheck_repos") -shellcheck_repos() - -# Tock dependencies. -load("//third_party/tock:repos.bzl", tock_repos="tock_repos") -tock_repos( - # For developing tock/libtock along side OpenTitan, set these parameters - # to your local checkout of tock and libtock-rs respectively. - #tock = "../tock", - #libtock = "../libtock-rs", -) - -# OpenOCD -load("//third_party/openocd:repos.bzl", "openocd_repos") -openocd_repos() - -# FreeRTOS; used by the OTTF -load("//third_party/freertos:repos.bzl", "freertos_repos") -freertos_repos() - -# LLVM Compiler Runtime for Profiling -load("//third_party/llvm_compiler_rt:repos.bzl", "llvm_compiler_rt_repos") -llvm_compiler_rt_repos() - -# RISC-V Compliance Tests -load("//third_party/riscv-compliance:repos.bzl", "riscv_compliance_repos") -riscv_compliance_repos() - -# CoreMark benchmark -load("//third_party/coremark:repos.bzl", "coremark_repos") -coremark_repos() - -# The standard Keccak algorithms -load("//third_party/xkcp:repos.bzl", "xkcp_repos") -xkcp_repos() - -# HSM related repositories (SoftHSM2, etc) -load("//third_party/hsm:repos.bzl", "hsm_repos") -hsm_repos() - -# NIST CAVP Test Vectors -load("//third_party/nist_cavp_testvectors:repos.bzl", "nist_cavp_repos") -nist_cavp_repos() - -# Wycheproof Test Vectors -load("//third_party/wycheproof:repos.bzl", "wycheproof_repos") -wycheproof_repos() - -# SPHINCS+ Test Vectors -load("//third_party/sphincsplus:repos.bzl", "sphincsplus_repos") -sphincsplus_repos() - -# CBOR reader & writer from open-dice -load("//third_party/open-dice:repos.bzl", "open_dice_repos") -open_dice_repos() - # Setup for linking in externally managed test and provisioning customizations # for both secure/non-secure manufacturer domains. load("//rules:hooks_setup.bzl", "hooks_setup", "provisioning_exts_setup", "secure_hooks_setup") @@ -117,10 +48,6 @@ provisioning_exts_repo(name = "provisioning_exts") load("//rules:nonhermetic.bzl", "nonhermetic_repo") nonhermetic_repo(name = "nonhermetic") -# Binary firmware image for HyperDebug -load("//third_party/hyperdebug:repos.bzl", "hyperdebug_repos") -hyperdebug_repos() - register_toolchains( "//rules/opentitan:localtools", ) diff --git a/third_party/coremark/repos.bzl b/third_party/coremark/extensions.bzl similarity index 89% rename from third_party/coremark/repos.bzl rename to third_party/coremark/extensions.bzl index 16f3c486f5fb5..08321a13b1cd0 100644 --- a/third_party/coremark/repos.bzl +++ b/third_party/coremark/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def coremark_repos(): +coremark = module_extension( + implementation = lambda _: _coremark_repos(), +) + +def _coremark_repos(): http_archive( name = "coremark", build_file = Label("//third_party/coremark:BUILD.coremark.bazel"), diff --git a/third_party/freertos/repos.bzl b/third_party/freertos/extensions.bzl similarity index 90% rename from third_party/freertos/repos.bzl rename to third_party/freertos/extensions.bzl index 20962660a1c04..f3ad53a8c7a7d 100644 --- a/third_party/freertos/repos.bzl +++ b/third_party/freertos/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def freertos_repos(): +freertos = module_extension( + implementation = lambda _: _freertos_repos(), +) + +def _freertos_repos(): http_archive( name = "freertos", build_file = Label("//third_party/freertos:BUILD.freertos.bazel"), diff --git a/third_party/github/repos.bzl b/third_party/github/extensions.bzl similarity index 83% rename from third_party/github/repos.bzl rename to third_party/github/extensions.bzl index acddb1498202c..d6e8967455e7e 100644 --- a/third_party/github/repos.bzl +++ b/third_party/github/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def github_tools_repos(): +github_tools = module_extension( + implementation = lambda _: _github_tools_repos(), +) + +def _github_tools_repos(): http_archive( name = "com_github_gh", url = "https://github.com/cli/cli/releases/download/v2.13.0/gh_2.13.0_linux_amd64.tar.gz", diff --git a/third_party/hsm/repos.bzl b/third_party/hsm/extensions.bzl similarity index 94% rename from third_party/hsm/repos.bzl rename to third_party/hsm/extensions.bzl index d011ad78a35f2..b56bf272a2fd0 100644 --- a/third_party/hsm/repos.bzl +++ b/third_party/hsm/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def hsm_repos(): +hsm = module_extension( + implementation = lambda _: _hsm_repos(), +) + +def _hsm_repos(): http_archive( name = "softhsm2", build_file = Label("//third_party/hsm:BUILD.softhsm2.bazel"), diff --git a/third_party/hyperdebug/repos.bzl b/third_party/hyperdebug/extensions.bzl similarity index 83% rename from third_party/hyperdebug/repos.bzl rename to third_party/hyperdebug/extensions.bzl index e9290b5e90965..a859868306c23 100644 --- a/third_party/hyperdebug/repos.bzl +++ b/third_party/hyperdebug/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def hyperdebug_repos(): +hyperdebug = module_extension( + implementation = lambda _: _hyperdebug_repos(), +) + +def _hyperdebug_repos(): http_archive( name = "hyperdebug_firmware", urls = ["https://github.com/lowRISC/hyperdebug-firmware/releases/download/20241211_02/hyperdebug-firmware.tar.gz"], diff --git a/third_party/llvm_compiler_rt/repos.bzl b/third_party/llvm_compiler_rt/extensions.bzl similarity index 87% rename from third_party/llvm_compiler_rt/repos.bzl rename to third_party/llvm_compiler_rt/extensions.bzl index 6bcdae7714cb1..8d4e5c29b2a7b 100644 --- a/third_party/llvm_compiler_rt/repos.bzl +++ b/third_party/llvm_compiler_rt/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def llvm_compiler_rt_repos(): +llvm_compiler_rt = module_extension( + implementation = lambda _: _llvm_compiler_rt_repos(), +) + +def _llvm_compiler_rt_repos(): http_archive( name = "llvm_compiler_rt", build_file = Label("//third_party/llvm_compiler_rt:BUILD.llvm_compiler_rt.bazel"), diff --git a/third_party/lychee/repos.bzl b/third_party/lychee/extensions.bzl similarity index 77% rename from third_party/lychee/repos.bzl rename to third_party/lychee/extensions.bzl index 6881dd715ccd3..879f25e7b96df 100644 --- a/third_party/lychee/repos.bzl +++ b/third_party/lychee/extensions.bzl @@ -2,9 +2,13 @@ # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 -load("//rules:repo.bzl", "http_archive_or_local") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def lychee_repos(local = None): +lychee = module_extension( + implementation = lambda _: _lychee_repos(), +) + +def _lychee_repos(): LYCHEE_VERSION = "v0.14.3" url = "/".join([ @@ -13,10 +17,9 @@ def lychee_repos(local = None): "lychee-{}-x86_64-unknown-linux-gnu.tar.gz".format(LYCHEE_VERSION), ]) - http_archive_or_local( + http_archive( name = "lychee", url = url, - local = local, build_file_content = """ package(default_visibility = ["//visibility:public"]) exports_files(glob(["**"])) diff --git a/third_party/nist_cavp_testvectors/repos.bzl b/third_party/nist_cavp_testvectors/extensions.bzl similarity index 98% rename from third_party/nist_cavp_testvectors/repos.bzl rename to third_party/nist_cavp_testvectors/extensions.bzl index 2e5f7f6d37d9e..4d8b9275ba653 100644 --- a/third_party/nist_cavp_testvectors/repos.bzl +++ b/third_party/nist_cavp_testvectors/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def nist_cavp_repos(): +nist_cavp = module_extension( + implementation = lambda _: _nist_cavp_repos(), +) + +def _nist_cavp_repos(): """Load NIST CAVP test vectors The NIST website that serves the test vectors (csrc.nist.gov) is sometimes diff --git a/third_party/open-dice/repos.bzl b/third_party/open-dice/extensions.bzl similarity index 78% rename from third_party/open-dice/repos.bzl rename to third_party/open-dice/extensions.bzl index 03bccf412eea5..8dc76b1fa43ab 100644 --- a/third_party/open-dice/repos.bzl +++ b/third_party/open-dice/extensions.bzl @@ -2,12 +2,15 @@ # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 -load("//rules:repo.bzl", "http_archive_or_local") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def open_dice_repos(local = None): - http_archive_or_local( +open_dice = module_extension( + implementation = lambda _: _open_dice_repos(), +) + +def _open_dice_repos(): + http_archive( name = "open-dice", - local = local, build_file = Label("//third_party/open-dice:BUILD.open-dice.bazel"), strip_prefix = "open-dice-cf3f4cc7a3506a33ee3a437544ef6f40056b3563", urls = ["https://github.com/google/open-dice/archive/cf3f4cc7a3506a33ee3a437544ef6f40056b3563.zip"], diff --git a/third_party/openocd/repos.bzl b/third_party/openocd/extensions.bzl similarity index 87% rename from third_party/openocd/repos.bzl rename to third_party/openocd/extensions.bzl index 3b699ed6cde9d..d9f3079494614 100644 --- a/third_party/openocd/repos.bzl +++ b/third_party/openocd/extensions.bzl @@ -2,13 +2,16 @@ # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 -load("//rules:repo.bzl", "http_archive_or_local") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def openocd_repos(local = None): +openocd = module_extension( + implementation = lambda _: _openocd_repos(), +) + +def _openocd_repos(): OPENOCD_VERSION = "0.12.0" - http_archive_or_local( + http_archive( name = "openocd", - local = local, urls = [ # The sourceforge URL is the canonical one, but the site is not reliable and slow to download. # Prefer to use Debian mirror of the tar ball and have sourceforge as backup. diff --git a/third_party/riscv-compliance/repos.bzl b/third_party/riscv-compliance/extensions.bzl similarity index 87% rename from third_party/riscv-compliance/repos.bzl rename to third_party/riscv-compliance/extensions.bzl index 09cc0fe345671..a32906924f9c0 100644 --- a/third_party/riscv-compliance/repos.bzl +++ b/third_party/riscv-compliance/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def riscv_compliance_repos(): +riscv_compliance = module_extension( + implementation = lambda _: _riscv_compliance_repos(), +) + +def _riscv_compliance_repos(): http_archive( name = "riscv-compliance", build_file = Label("//third_party/riscv-compliance:BUILD.riscv-compliance.bazel"), diff --git a/third_party/rust/repos.bzl b/third_party/rust/extensions.bzl similarity index 67% rename from third_party/rust/repos.bzl rename to third_party/rust/extensions.bzl index e5a1b3dc5e8a8..03b9c8562f3d6 100644 --- a/third_party/rust/repos.bzl +++ b/third_party/rust/extensions.bzl @@ -2,12 +2,15 @@ # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 -load("@//rules:repo.bzl", "http_archive_or_local") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def rust_repos(rules_rust = None, serde_annotate = None): - http_archive_or_local( +serde_annotate = module_extension( + implementation = lambda _: _serde_annotate_repo(), +) + +def _serde_annotate_repo(): + http_archive( name = "lowrisc_serde_annotate", - local = serde_annotate, sha256 = "7d6db7c811469f3abd6b58745bd2b8ebb7596a68974739da51bc8b6568c8002a", strip_prefix = "serde-annotate-0.0.11", url = "https://github.com/lowRISC/serde-annotate/archive/refs/tags/v0.0.11.tar.gz", diff --git a/third_party/shellcheck/repos.bzl b/third_party/shellcheck/extensions.bzl similarity index 77% rename from third_party/shellcheck/repos.bzl rename to third_party/shellcheck/extensions.bzl index 645a79d77760d..aa5651afd2113 100644 --- a/third_party/shellcheck/repos.bzl +++ b/third_party/shellcheck/extensions.bzl @@ -2,14 +2,17 @@ # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 -load("//rules:repo.bzl", "http_archive_or_local") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def shellcheck_repos(local = None): +shellcheck = module_extension( + implementation = lambda _: _shellcheck_repos(), +) + +def _shellcheck_repos(): SHELLCHECK_VERSION = "v0.9.0" - http_archive_or_local( + http_archive( name = "shellcheck", - local = local, url = "https://github.com/koalaman/shellcheck/releases/download/{version}/shellcheck-{version}.linux.x86_64.tar.xz".format( version = SHELLCHECK_VERSION, ), diff --git a/third_party/sphincsplus/repos.bzl b/third_party/sphincsplus/extensions.bzl similarity index 93% rename from third_party/sphincsplus/repos.bzl rename to third_party/sphincsplus/extensions.bzl index 01296c19ddafa..816aab151680f 100644 --- a/third_party/sphincsplus/repos.bzl +++ b/third_party/sphincsplus/extensions.bzl @@ -2,10 +2,13 @@ # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 -load("//rules:repo.bzl", "http_archive_or_local") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def sphincsplus_repos(local = None): +sphincsplus = module_extension( + implementation = lambda _: _sphincsplus_repos(), +) + +def _sphincsplus_repos(local = None): http_archive( name = "sphincsplus_shake256_kat", build_file = Label("@lowrisc_opentitan//third_party/sphincsplus:BUILD.sphincsplus_common.bazel"), @@ -28,9 +31,8 @@ def sphincsplus_repos(local = None): "https://storage.googleapis.com/ot-crypto-test-vectors/sphincsplus/sphincsplus_sha256_128s_fips205-ipd.zip", ], ) - http_archive_or_local( + http_archive( name = "sphincsplus_fips205_ipd", - local = local, url = "https://github.com/sphincs/sphincsplus/archive/129b72c80e122a22a61f71b5d2b042770890ccee.tar.gz", strip_prefix = "sphincsplus-129b72c80e122a22a61f71b5d2b042770890ccee/ref", build_file = "@lowrisc_opentitan//third_party/sphincsplus:BUILD.sphincsplus.bazel", diff --git a/third_party/tock/repos.bzl b/third_party/tock/extensions.bzl similarity index 97% rename from third_party/tock/repos.bzl rename to third_party/tock/extensions.bzl index 8564db003d034..0195207a50d71 100644 --- a/third_party/tock/repos.bzl +++ b/third_party/tock/extensions.bzl @@ -2,7 +2,8 @@ # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 -load("@//rules:repo.bzl", "bare_repository", "http_archive_or_local") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@//rules:repo.bzl", "bare_repository") load("@//rules:rust.bzl", "crate_build") # Exports the kernel_layout.ld file so it can be used in opentitan rules. @@ -34,10 +35,14 @@ filegroup( ) """ -def tock_repos(tock = None, libtock = None, elf2tab = None): +tock = module_extension( + implementation = lambda _: _tock_repos(), +) + +def _tock_repos(): bare_repository( name = "tock", - local = tock, + local = None, strip_prefix = "tock-e81987f6a41e9b92f60fda1d5283f46b3cb597b5", url = "https://github.com/tock/tock/archive/e81987f6a41e9b92f60fda1d5283f46b3cb597b5.tar.gz", sha256 = "b7c239f3bd7e7727eee99814661424e1e50587fe9068cec1943a7bb6743ed777", @@ -149,7 +154,7 @@ def tock_repos(tock = None, libtock = None, elf2tab = None): bare_repository( name = "libtock", - local = libtock, + local = None, strip_prefix = "libtock-rs-a2c6ad80648e3ba073e7433b4330706df052a6ae", url = "https://github.com/tock/libtock-rs/archive/a2c6ad80648e3ba073e7433b4330706df052a6ae.tar.gz", sha256 = "888d1925cd760e818385d13187286d6b87f763c548a4dc1bb26e55786dc95636", @@ -287,9 +292,8 @@ def tock_repos(tock = None, libtock = None, elf2tab = None): }, ) - http_archive_or_local( + http_archive( name = "elf2tab", - local = elf2tab, url = "https://github.com/tock/elf2tab/archive/2f0e2f0ef01e37799850d1b12f48b93a0b32a203.tar.gz", sha256 = "b8b2ec7d8b9d052667d34190f98a0f5e69a0ba93ce69f00f2fdda7b5e241b963", strip_prefix = "elf2tab-2f0e2f0ef01e37799850d1b12f48b93a0b32a203", diff --git a/third_party/wycheproof/repos.bzl b/third_party/wycheproof/extensions.bzl similarity index 85% rename from third_party/wycheproof/repos.bzl rename to third_party/wycheproof/extensions.bzl index cbbb512e5458b..dcbdfd734eae0 100644 --- a/third_party/wycheproof/repos.bzl +++ b/third_party/wycheproof/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def wycheproof_repos(): +wycheproof = module_extension( + implementation = lambda _: _wycheproof_repos(), +) + +def _wycheproof_repos(): http_archive( name = "wycheproof", build_file = Label("//third_party/wycheproof:BUILD.wycheproof_common.bazel"), diff --git a/third_party/xkcp/repos.bzl b/third_party/xkcp/extensions.bzl similarity index 90% rename from third_party/xkcp/repos.bzl rename to third_party/xkcp/extensions.bzl index 56433cc1afd0a..826eddd245bc1 100644 --- a/third_party/xkcp/repos.bzl +++ b/third_party/xkcp/extensions.bzl @@ -4,7 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -def xkcp_repos(): +xkcp = module_extension( + implementation = lambda _: _xkcp_repos(), +) + +def _xkcp_repos(): http_archive( name = "xkcp", build_file = Label("//third_party/xkcp:BUILD.xkcp.bazel"), From 8fe9951299bfa4e8eb3dbe60f7cde2cbb926e9e8 Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Thu, 19 Dec 2024 15:34:34 +0000 Subject: [PATCH 5/7] [bazel] Move third party patch files into `patches` subdirectories This matches the convention of other third party packages with patches. Signed-off-by: James Wainwright --- MODULE.bazel.lock | 12 ++++++------ third_party/coremark/extensions.bzl | 4 ++-- third_party/coremark/patches/BUILD | 3 +++ .../{ => patches}/print_coremark_per_mhz.patch | 0 .../coremark/{ => patches}/use_ottf_main.patch | 0 third_party/freertos/extensions.bzl | 6 +++--- .../0001-Remove-mtime-address-macros.patch | 0 .../0002-Remove-references-to-stdlib.h.patch | 0 ...ace-string.h-with-references-to-OT-memory.h.patch | 0 third_party/freertos/patches/BUILD | 3 +++ third_party/hsm/extensions.bzl | 2 +- .../0001-Disable-filename-logging.patch | 0 third_party/hsm/patches/BUILD | 3 +++ third_party/llvm_compiler_rt/extensions.bzl | 4 ++-- .../{ => patches}/0001-Headers.patch | 0 .../{ => patches}/0002-invalid-data.patch | 0 third_party/llvm_compiler_rt/patches/BUILD | 3 +++ third_party/open-dice/extensions.bzl | 2 +- .../Add-a-local-strlen-implementation.patch | 0 third_party/open-dice/patches/BUILD | 3 +++ third_party/openocd/extensions.bzl | 6 +++--- third_party/openocd/patches/BUILD | 3 +++ .../openocd/{ => patches}/calloc_transpose.patch | 0 .../{ => patches}/reset_on_dmi_op_error.patch | 0 .../{ => patches}/string_truncate_build_error.patch | 0 third_party/riscv-compliance/extensions.bzl | 2 +- ...gurable-trap-alignment-and-entry-point-to-p.patch | 0 third_party/riscv-compliance/patches/BUILD | 3 +++ third_party/sphincsplus/extensions.bzl | 2 +- third_party/sphincsplus/patches/BUILD | 3 +++ .../{ => patches}/sphincsplus-namespace.patch | 0 third_party/xkcp/extensions.bzl | 4 ++-- third_party/xkcp/patches/BUILD | 3 +++ .../xkcp/{ => patches}/add_config_header.patch | 0 .../xkcp/{ => patches}/add_main_license.patch | 0 35 files changed, 49 insertions(+), 22 deletions(-) create mode 100644 third_party/coremark/patches/BUILD rename third_party/coremark/{ => patches}/print_coremark_per_mhz.patch (100%) rename third_party/coremark/{ => patches}/use_ottf_main.patch (100%) rename third_party/freertos/{ => patches}/0001-Remove-mtime-address-macros.patch (100%) rename third_party/freertos/{ => patches}/0002-Remove-references-to-stdlib.h.patch (100%) rename third_party/freertos/{ => patches}/0003-Replace-string.h-with-references-to-OT-memory.h.patch (100%) create mode 100644 third_party/freertos/patches/BUILD rename third_party/hsm/{ => patches}/0001-Disable-filename-logging.patch (100%) create mode 100644 third_party/hsm/patches/BUILD rename third_party/llvm_compiler_rt/{ => patches}/0001-Headers.patch (100%) rename third_party/llvm_compiler_rt/{ => patches}/0002-invalid-data.patch (100%) create mode 100644 third_party/llvm_compiler_rt/patches/BUILD rename third_party/open-dice/{ => patches}/Add-a-local-strlen-implementation.patch (100%) create mode 100644 third_party/open-dice/patches/BUILD create mode 100644 third_party/openocd/patches/BUILD rename third_party/openocd/{ => patches}/calloc_transpose.patch (100%) rename third_party/openocd/{ => patches}/reset_on_dmi_op_error.patch (100%) rename third_party/openocd/{ => patches}/string_truncate_build_error.patch (100%) rename third_party/riscv-compliance/{ => patches}/0001-Add-configurable-trap-alignment-and-entry-point-to-p.patch (100%) create mode 100644 third_party/riscv-compliance/patches/BUILD create mode 100644 third_party/sphincsplus/patches/BUILD rename third_party/sphincsplus/{ => patches}/sphincsplus-namespace.patch (100%) create mode 100644 third_party/xkcp/patches/BUILD rename third_party/xkcp/{ => patches}/add_config_header.patch (100%) rename third_party/xkcp/{ => patches}/add_main_license.patch (100%) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 14c3b297567e2..d5c20e23d0feb 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -614,7 +614,7 @@ }, "//third_party/openocd:extensions.bzl%openocd": { "general": { - "bzlTransitiveDigest": "l5MEHQifrShllgIds01fPKYZEF4zYajzohBzWgzsKPU=", + "bzlTransitiveDigest": "2eeMsIQtcbolmQMIoVKJgBFOnDb3HmVUb5IMMUl1daI=", "usagesDigest": "gXMbnbxNBTg41VMJTLfBtmRVZ3szz+CcSyKiAFRilWQ=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -632,9 +632,9 @@ "build_file": "@@//third_party/openocd:BUILD.openocd.bazel", "sha256": "af254788be98861f2bd9103fe6e60a774ec96a8c374744eef9197f6043075afa", "patches": [ - "@@//third_party/openocd:calloc_transpose.patch", - "@@//third_party/openocd:reset_on_dmi_op_error.patch", - "@@//third_party/openocd:string_truncate_build_error.patch" + "@@//third_party/openocd/patches:calloc_transpose.patch", + "@@//third_party/openocd/patches:reset_on_dmi_op_error.patch", + "@@//third_party/openocd/patches:string_truncate_build_error.patch" ], "patch_args": [ "-p1" @@ -749,7 +749,7 @@ }, "//third_party/sphincsplus:extensions.bzl%sphincsplus": { "general": { - "bzlTransitiveDigest": "EpuqZN0OW8qwjX/Wl2Nh+WYdwRDNIzWaLUh3Vh7jCpc=", + "bzlTransitiveDigest": "485ueZ+12PKxYqfzXJys3RtLKOhMG13J3FG1gelEKfU=", "usagesDigest": "t8W6lQlG2im5bAEMpO63sMVuFLwNVvAkEO/SNLXXEnQ=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -786,7 +786,7 @@ "build_file": "@@//third_party/sphincsplus:BUILD.sphincsplus.bazel", "sha256": "b301faa7a42ef538323a732929d49341b1cbd8375f643f7d98ca32cd6efacc32", "patches": [ - "@@//third_party/sphincsplus:sphincsplus-namespace.patch" + "@@//third_party/sphincsplus/patches:sphincsplus-namespace.patch" ], "patch_args": [ "-p2" diff --git a/third_party/coremark/extensions.bzl b/third_party/coremark/extensions.bzl index 08321a13b1cd0..4a803198aa779 100644 --- a/third_party/coremark/extensions.bzl +++ b/third_party/coremark/extensions.bzl @@ -18,8 +18,8 @@ def _coremark_repos(): "https://github.com/eembc/coremark/archive/eefc986ebd3452d6adde22eafaff3e5c859f29e4.tar.gz", ], patches = [ - Label("//third_party/coremark:use_ottf_main.patch"), - Label("//third_party/coremark:print_coremark_per_mhz.patch"), + Label("//third_party/coremark/patches:use_ottf_main.patch"), + Label("//third_party/coremark/patches:print_coremark_per_mhz.patch"), ], patch_args = ["-p1"], ) diff --git a/third_party/coremark/patches/BUILD b/third_party/coremark/patches/BUILD new file mode 100644 index 0000000000000..3e8bb41965a28 --- /dev/null +++ b/third_party/coremark/patches/BUILD @@ -0,0 +1,3 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/coremark/print_coremark_per_mhz.patch b/third_party/coremark/patches/print_coremark_per_mhz.patch similarity index 100% rename from third_party/coremark/print_coremark_per_mhz.patch rename to third_party/coremark/patches/print_coremark_per_mhz.patch diff --git a/third_party/coremark/use_ottf_main.patch b/third_party/coremark/patches/use_ottf_main.patch similarity index 100% rename from third_party/coremark/use_ottf_main.patch rename to third_party/coremark/patches/use_ottf_main.patch diff --git a/third_party/freertos/extensions.bzl b/third_party/freertos/extensions.bzl index f3ad53a8c7a7d..939d5a27eefc7 100644 --- a/third_party/freertos/extensions.bzl +++ b/third_party/freertos/extensions.bzl @@ -18,9 +18,9 @@ def _freertos_repos(): "https://github.com/FreeRTOS/FreeRTOS-Kernel/archive/0b1e9d79c82c1bf00e93142f9d5b1b7b62446995.tar.gz", ], patches = [ - Label("//third_party/freertos:0001-Remove-mtime-address-macros.patch"), - Label("//third_party/freertos:0002-Remove-references-to-stdlib.h.patch"), - Label("//third_party/freertos:0003-Replace-string.h-with-references-to-OT-memory.h.patch"), + Label("//third_party/freertos/patches:0001-Remove-mtime-address-macros.patch"), + Label("//third_party/freertos/patches:0002-Remove-references-to-stdlib.h.patch"), + Label("//third_party/freertos/patches:0003-Replace-string.h-with-references-to-OT-memory.h.patch"), ], patch_args = ["-p1"], ) diff --git a/third_party/freertos/0001-Remove-mtime-address-macros.patch b/third_party/freertos/patches/0001-Remove-mtime-address-macros.patch similarity index 100% rename from third_party/freertos/0001-Remove-mtime-address-macros.patch rename to third_party/freertos/patches/0001-Remove-mtime-address-macros.patch diff --git a/third_party/freertos/0002-Remove-references-to-stdlib.h.patch b/third_party/freertos/patches/0002-Remove-references-to-stdlib.h.patch similarity index 100% rename from third_party/freertos/0002-Remove-references-to-stdlib.h.patch rename to third_party/freertos/patches/0002-Remove-references-to-stdlib.h.patch diff --git a/third_party/freertos/0003-Replace-string.h-with-references-to-OT-memory.h.patch b/third_party/freertos/patches/0003-Replace-string.h-with-references-to-OT-memory.h.patch similarity index 100% rename from third_party/freertos/0003-Replace-string.h-with-references-to-OT-memory.h.patch rename to third_party/freertos/patches/0003-Replace-string.h-with-references-to-OT-memory.h.patch diff --git a/third_party/freertos/patches/BUILD b/third_party/freertos/patches/BUILD new file mode 100644 index 0000000000000..3e8bb41965a28 --- /dev/null +++ b/third_party/freertos/patches/BUILD @@ -0,0 +1,3 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/hsm/extensions.bzl b/third_party/hsm/extensions.bzl index b56bf272a2fd0..194796b16ce46 100644 --- a/third_party/hsm/extensions.bzl +++ b/third_party/hsm/extensions.bzl @@ -16,7 +16,7 @@ def _hsm_repos(): strip_prefix = "SoftHSMv2-4975c0df4c7090e97a3860ae21079a9597cfedc6", sha256 = "72cf979ec4f74ca4555861dcae45cf7d1b667cc2e4f3ee3fb26e6ff1b99aec95", patches = [ - Label("//third_party/hsm:0001-Disable-filename-logging.patch"), + Label("//third_party/hsm/patches:0001-Disable-filename-logging.patch"), ], patch_args = ["-p1"], ) diff --git a/third_party/hsm/0001-Disable-filename-logging.patch b/third_party/hsm/patches/0001-Disable-filename-logging.patch similarity index 100% rename from third_party/hsm/0001-Disable-filename-logging.patch rename to third_party/hsm/patches/0001-Disable-filename-logging.patch diff --git a/third_party/hsm/patches/BUILD b/third_party/hsm/patches/BUILD new file mode 100644 index 0000000000000..3e8bb41965a28 --- /dev/null +++ b/third_party/hsm/patches/BUILD @@ -0,0 +1,3 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/llvm_compiler_rt/extensions.bzl b/third_party/llvm_compiler_rt/extensions.bzl index 8d4e5c29b2a7b..bf8c2efa56df6 100644 --- a/third_party/llvm_compiler_rt/extensions.bzl +++ b/third_party/llvm_compiler_rt/extensions.bzl @@ -18,8 +18,8 @@ def _llvm_compiler_rt_repos(): "https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.2/compiler-rt-16.0.2.src.tar.xz", ], patches = [ - Label("//third_party/llvm_compiler_rt:0001-Headers.patch"), - Label("//third_party/llvm_compiler_rt:0002-invalid-data.patch"), + Label("//third_party/llvm_compiler_rt/patches:0001-Headers.patch"), + Label("//third_party/llvm_compiler_rt/patches:0002-invalid-data.patch"), ], patch_args = ["-p1"], ) diff --git a/third_party/llvm_compiler_rt/0001-Headers.patch b/third_party/llvm_compiler_rt/patches/0001-Headers.patch similarity index 100% rename from third_party/llvm_compiler_rt/0001-Headers.patch rename to third_party/llvm_compiler_rt/patches/0001-Headers.patch diff --git a/third_party/llvm_compiler_rt/0002-invalid-data.patch b/third_party/llvm_compiler_rt/patches/0002-invalid-data.patch similarity index 100% rename from third_party/llvm_compiler_rt/0002-invalid-data.patch rename to third_party/llvm_compiler_rt/patches/0002-invalid-data.patch diff --git a/third_party/llvm_compiler_rt/patches/BUILD b/third_party/llvm_compiler_rt/patches/BUILD new file mode 100644 index 0000000000000..3e8bb41965a28 --- /dev/null +++ b/third_party/llvm_compiler_rt/patches/BUILD @@ -0,0 +1,3 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/open-dice/extensions.bzl b/third_party/open-dice/extensions.bzl index 8dc76b1fa43ab..87de10e88100a 100644 --- a/third_party/open-dice/extensions.bzl +++ b/third_party/open-dice/extensions.bzl @@ -16,7 +16,7 @@ def _open_dice_repos(): urls = ["https://github.com/google/open-dice/archive/cf3f4cc7a3506a33ee3a437544ef6f40056b3563.zip"], sha256 = "d7ce830111451afe2a255cac3b750f82e50efe2aaf6bac0b076881c964cfe78d", patches = [ - Label("//third_party/open-dice:Add-a-local-strlen-implementation.patch"), + Label("//third_party/open-dice/patches:Add-a-local-strlen-implementation.patch"), ], patch_args = ["-p1"], ) diff --git a/third_party/open-dice/Add-a-local-strlen-implementation.patch b/third_party/open-dice/patches/Add-a-local-strlen-implementation.patch similarity index 100% rename from third_party/open-dice/Add-a-local-strlen-implementation.patch rename to third_party/open-dice/patches/Add-a-local-strlen-implementation.patch diff --git a/third_party/open-dice/patches/BUILD b/third_party/open-dice/patches/BUILD new file mode 100644 index 0000000000000..3e8bb41965a28 --- /dev/null +++ b/third_party/open-dice/patches/BUILD @@ -0,0 +1,3 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/openocd/extensions.bzl b/third_party/openocd/extensions.bzl index d9f3079494614..71fb889cae2d0 100644 --- a/third_party/openocd/extensions.bzl +++ b/third_party/openocd/extensions.bzl @@ -23,9 +23,9 @@ def _openocd_repos(): sha256 = "af254788be98861f2bd9103fe6e60a774ec96a8c374744eef9197f6043075afa", # See Issue(#18087) patches = [ - Label("@lowrisc_opentitan//third_party/openocd:calloc_transpose.patch"), - Label("@lowrisc_opentitan//third_party/openocd:reset_on_dmi_op_error.patch"), - Label("@lowrisc_opentitan//third_party/openocd:string_truncate_build_error.patch"), + Label("@lowrisc_opentitan//third_party/openocd/patches:calloc_transpose.patch"), + Label("@lowrisc_opentitan//third_party/openocd/patches:reset_on_dmi_op_error.patch"), + Label("@lowrisc_opentitan//third_party/openocd/patches:string_truncate_build_error.patch"), ], patch_args = ["-p1"], ) diff --git a/third_party/openocd/patches/BUILD b/third_party/openocd/patches/BUILD new file mode 100644 index 0000000000000..3e8bb41965a28 --- /dev/null +++ b/third_party/openocd/patches/BUILD @@ -0,0 +1,3 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/openocd/calloc_transpose.patch b/third_party/openocd/patches/calloc_transpose.patch similarity index 100% rename from third_party/openocd/calloc_transpose.patch rename to third_party/openocd/patches/calloc_transpose.patch diff --git a/third_party/openocd/reset_on_dmi_op_error.patch b/third_party/openocd/patches/reset_on_dmi_op_error.patch similarity index 100% rename from third_party/openocd/reset_on_dmi_op_error.patch rename to third_party/openocd/patches/reset_on_dmi_op_error.patch diff --git a/third_party/openocd/string_truncate_build_error.patch b/third_party/openocd/patches/string_truncate_build_error.patch similarity index 100% rename from third_party/openocd/string_truncate_build_error.patch rename to third_party/openocd/patches/string_truncate_build_error.patch diff --git a/third_party/riscv-compliance/extensions.bzl b/third_party/riscv-compliance/extensions.bzl index a32906924f9c0..c56b39a9b796d 100644 --- a/third_party/riscv-compliance/extensions.bzl +++ b/third_party/riscv-compliance/extensions.bzl @@ -18,7 +18,7 @@ def _riscv_compliance_repos(): "https://github.com/riscv/riscv-compliance/archive/2636302c27557b42d99bed7e0537beffdf8e1ab4.tar.gz", ], patches = [ - Label("//third_party/riscv-compliance:0001-Add-configurable-trap-alignment-and-entry-point-to-p.patch"), + Label("//third_party/riscv-compliance/patches:0001-Add-configurable-trap-alignment-and-entry-point-to-p.patch"), ], patch_args = ["-p1"], ) diff --git a/third_party/riscv-compliance/0001-Add-configurable-trap-alignment-and-entry-point-to-p.patch b/third_party/riscv-compliance/patches/0001-Add-configurable-trap-alignment-and-entry-point-to-p.patch similarity index 100% rename from third_party/riscv-compliance/0001-Add-configurable-trap-alignment-and-entry-point-to-p.patch rename to third_party/riscv-compliance/patches/0001-Add-configurable-trap-alignment-and-entry-point-to-p.patch diff --git a/third_party/riscv-compliance/patches/BUILD b/third_party/riscv-compliance/patches/BUILD new file mode 100644 index 0000000000000..3e8bb41965a28 --- /dev/null +++ b/third_party/riscv-compliance/patches/BUILD @@ -0,0 +1,3 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/sphincsplus/extensions.bzl b/third_party/sphincsplus/extensions.bzl index 816aab151680f..00a7dec4a27a3 100644 --- a/third_party/sphincsplus/extensions.bzl +++ b/third_party/sphincsplus/extensions.bzl @@ -38,7 +38,7 @@ def _sphincsplus_repos(local = None): build_file = "@lowrisc_opentitan//third_party/sphincsplus:BUILD.sphincsplus.bazel", sha256 = "b301faa7a42ef538323a732929d49341b1cbd8375f643f7d98ca32cd6efacc32", patches = [ - Label("@lowrisc_opentitan//third_party/sphincsplus:sphincsplus-namespace.patch"), + Label("@lowrisc_opentitan//third_party/sphincsplus/patches:sphincsplus-namespace.patch"), ], patch_args = ["-p2"], ) diff --git a/third_party/sphincsplus/patches/BUILD b/third_party/sphincsplus/patches/BUILD new file mode 100644 index 0000000000000..3e8bb41965a28 --- /dev/null +++ b/third_party/sphincsplus/patches/BUILD @@ -0,0 +1,3 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/sphincsplus/sphincsplus-namespace.patch b/third_party/sphincsplus/patches/sphincsplus-namespace.patch similarity index 100% rename from third_party/sphincsplus/sphincsplus-namespace.patch rename to third_party/sphincsplus/patches/sphincsplus-namespace.patch diff --git a/third_party/xkcp/extensions.bzl b/third_party/xkcp/extensions.bzl index 826eddd245bc1..4b2878249d6d9 100644 --- a/third_party/xkcp/extensions.bzl +++ b/third_party/xkcp/extensions.bzl @@ -19,8 +19,8 @@ def _xkcp_repos(): "https://github.com/XKCP/XKCP/archive/56ae09923153c3e801a6891eb19e4a3b5bb6f6e2.tar.gz", ], patches = [ - Label("//third_party/xkcp:add_config_header.patch"), - Label("//third_party/xkcp:add_main_license.patch"), + Label("//third_party/xkcp/patches:add_config_header.patch"), + Label("//third_party/xkcp/patches:add_main_license.patch"), ], patch_args = ["-p1"], ) diff --git a/third_party/xkcp/patches/BUILD b/third_party/xkcp/patches/BUILD new file mode 100644 index 0000000000000..3e8bb41965a28 --- /dev/null +++ b/third_party/xkcp/patches/BUILD @@ -0,0 +1,3 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 diff --git a/third_party/xkcp/add_config_header.patch b/third_party/xkcp/patches/add_config_header.patch similarity index 100% rename from third_party/xkcp/add_config_header.patch rename to third_party/xkcp/patches/add_config_header.patch diff --git a/third_party/xkcp/add_main_license.patch b/third_party/xkcp/patches/add_main_license.patch similarity index 100% rename from third_party/xkcp/add_main_license.patch rename to third_party/xkcp/patches/add_main_license.patch From a81a87beeabaaf5b9d7299b94dfd88820d6201c1 Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Thu, 19 Dec 2024 16:55:51 +0000 Subject: [PATCH 6/7] [bazel] Remove `local` parameter from `bare_repository` This is no longer used / usable with Bzlmod. Use `override_repo` in the `MODULE.bazel` instead. Signed-off-by: James Wainwright --- rules/repo.bzl | 28 +++++++++------------------- third_party/tock/extensions.bzl | 2 -- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/rules/repo.bzl b/rules/repo.bzl index 2dcaae0d313c2..5e36491378b94 100644 --- a/rules/repo.bzl +++ b/rules/repo.bzl @@ -27,23 +27,11 @@ def http_archive_or_local(local = None, **kwargs): ) def _bare_repository_impl(rctx): - if rctx.attr.local: - # Although not particularly well documented, the `get_child` function will only add - # the workspace for relative paths, and simply ignore it if given an absolute path. - path = rctx.workspace_root.get_child(rctx.attr.local) - - # NOTE By default, Bazel will automatically watch those directories and refetch - # the repository if they change. - for child in path.readdir(): - rctx.symlink(child, child.basename) - elif rctx.attr.url: - rctx.download_and_extract( - url = rctx.attr.url, - sha256 = rctx.attr.sha256, - stripPrefix = rctx.attr.strip_prefix, - ) - else: - fail("Specify a `url` or `local` path") + rctx.download_and_extract( + url = rctx.attr.url, + sha256 = rctx.attr.sha256, + stripPrefix = rctx.attr.strip_prefix, + ) for rpath, lpath in rctx.attr.additional_files.items(): rctx.symlink(rctx.path(lpath), rpath) @@ -53,10 +41,12 @@ def _bare_repository_impl(rctx): bare_repository = repository_rule( implementation = _bare_repository_impl, attrs = { - "url": attr.string(doc = "Location of an archive file (exclusive with `local`)."), + "url": attr.string( + mandatory = True, + doc = "Location of an archive file (exclusive with `local`).", + ), "sha256": attr.string(doc = "SHA256 of the archive."), "strip_prefix": attr.string(doc = "Prefix to strip when extracting the archive."), - "local": attr.string(doc = "Path to a local subdirectory (exclusive with `url`)."), "additional_files": attr.string_dict( doc = "Additional files to place in the repository (mapping repo filename to local file).", ), diff --git a/third_party/tock/extensions.bzl b/third_party/tock/extensions.bzl index 0195207a50d71..2168574279412 100644 --- a/third_party/tock/extensions.bzl +++ b/third_party/tock/extensions.bzl @@ -42,7 +42,6 @@ tock = module_extension( def _tock_repos(): bare_repository( name = "tock", - local = None, strip_prefix = "tock-e81987f6a41e9b92f60fda1d5283f46b3cb597b5", url = "https://github.com/tock/tock/archive/e81987f6a41e9b92f60fda1d5283f46b3cb597b5.tar.gz", sha256 = "b7c239f3bd7e7727eee99814661424e1e50587fe9068cec1943a7bb6743ed777", @@ -154,7 +153,6 @@ def _tock_repos(): bare_repository( name = "libtock", - local = None, strip_prefix = "libtock-rs-a2c6ad80648e3ba073e7433b4330706df052a6ae", url = "https://github.com/tock/libtock-rs/archive/a2c6ad80648e3ba073e7433b4330706df052a6ae.tar.gz", sha256 = "888d1925cd760e818385d13187286d6b87f763c548a4dc1bb26e55786dc95636", From 1b61e88697485983abae7d803638b6bc806bcf88 Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Thu, 2 Jan 2025 14:15:36 +0000 Subject: [PATCH 7/7] [bazel] Remove `http_archive_or_local` rule This functionality is now implemented directly in bzlmod using the `override_repo` and `inject_repo` functions in `MODULE.bazel`. Signed-off-by: James Wainwright --- ci/scripts/check-bazel-banned-rules.sh | 2 +- rules/repo.bzl | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/ci/scripts/check-bazel-banned-rules.sh b/ci/scripts/check-bazel-banned-rules.sh index e5c597bf7828c..c4886e8d0481f 100755 --- a/ci/scripts/check-bazel-banned-rules.sh +++ b/ci/scripts/check-bazel-banned-rules.sh @@ -9,6 +9,6 @@ set -e GIT_REPOS=$(./bazelisk.sh query "kind('(new_)?git_repository', //external:*)") if [[ ${GIT_REPOS} ]]; then echo "Bazel's 'git_repository' rule is insecure and incompatible with OpenTitan's airgapping strategy." - echo "Please replace $GIT_REPOS with our 'http_archive_or_local' rule and set a sha256 so it can be canonically reproducible." + echo "Please replace $GIT_REPOS with 'http_archive' rule and set a sha256 so it can be canonically reproducible." exit 1 fi diff --git a/rules/repo.bzl b/rules/repo.bzl index 5e36491378b94..f5217da8685c2 100644 --- a/rules/repo.bzl +++ b/rules/repo.bzl @@ -2,30 +2,6 @@ # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@bazel_skylib//lib:paths.bzl", "paths") - -def http_archive_or_local(local = None, **kwargs): - if not local: - http_archive(**kwargs) - elif ("build_file" in kwargs or - "build_file_content" in kwargs or - "workspace_file" in kwargs or - "workspace_file_content" in kwargs): - native.new_local_repository( - name = kwargs.get("name"), - path = local, - build_file = kwargs.get("build_file"), - build_file_content = kwargs.get("build_file_content"), - workspace_file = kwargs.get("workspace_file"), - workspace_file_content = kwargs.get("workspace_file_content"), - ) - else: - native.local_repository( - name = kwargs.get("name"), - path = local, - ) - def _bare_repository_impl(rctx): rctx.download_and_extract( url = rctx.attr.url,