Chris Frantz | 340e623 | 2021-08-25 15:56:28 -0700 | [diff] [blame] | 1 | # Copyright lowRISC contributors. |
| 2 | # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 3 | # SPDX-License-Identifier: Apache-2.0 |
| 4 | |
Timothy Trippel | 174d484 | 2022-04-15 13:47:58 -0700 | [diff] [blame] | 5 | load("@rules_python//python:defs.bzl", "py_binary") |
Timothy Trippel | 024e393 | 2022-04-20 15:40:55 -0700 | [diff] [blame] | 6 | load("@ot_python_deps//:requirements.bzl", "requirement") |
Timothy Trippel | 174d484 | 2022-04-15 13:47:58 -0700 | [diff] [blame] | 7 | |
Chris Frantz | 340e623 | 2021-08-25 15:56:28 -0700 | [diff] [blame] | 8 | package(default_visibility = ["//visibility:public"]) |
| 9 | |
| 10 | exports_files(glob(["**"])) |
Drew Macrae | 399af40 | 2021-11-01 18:15:09 +0000 | [diff] [blame] | 11 | |
| 12 | genrule( |
| 13 | name = "ot_version_file", |
| 14 | outs = ["ot_version.txt"], |
| 15 | cmd = """awk '/BUILD_GIT_VERSION/ { print $$2 }' bazel-out/volatile-status.txt > $@""", |
| 16 | stamp = 1, # this provides volatile-status.txt |
| 17 | ) |
Timothy Trippel | 174d484 | 2022-04-15 13:47:58 -0700 | [diff] [blame] | 18 | |
| 19 | py_binary( |
Timothy Trippel | 024e393 | 2022-04-20 15:40:55 -0700 | [diff] [blame] | 20 | name = "otbn_build", |
| 21 | srcs = ["otbn_build.py"], |
| 22 | imports = ["../hw/ip/otbn/util/"], |
| 23 | deps = [ |
| 24 | requirement("pyelftools"), |
| 25 | "//hw/ip/otbn/util:otbn_as", |
Timothy Trippel | a7b30e6 | 2022-04-20 16:26:09 -0700 | [diff] [blame^] | 26 | "//hw/ip/otbn/util:otbn_ld", |
Timothy Trippel | 024e393 | 2022-04-20 15:40:55 -0700 | [diff] [blame] | 27 | ], |
| 28 | ) |
| 29 | |
| 30 | py_binary( |
Timothy Trippel | 4a90363 | 2022-04-15 15:04:39 -0700 | [diff] [blame] | 31 | name = "rom_chip_info", |
| 32 | srcs = ["rom_chip_info.py"], |
| 33 | ) |
| 34 | |
| 35 | py_binary( |
Timothy Trippel | 174d484 | 2022-04-15 13:47:58 -0700 | [diff] [blame] | 36 | name = "regtool", |
| 37 | srcs = ["regtool.py"], |
| 38 | deps = [ |
| 39 | "//util/reggen:countermeasure", |
| 40 | "//util/reggen:gen_cheader", |
| 41 | "//util/reggen:gen_dv", |
| 42 | "//util/reggen:gen_fpv", |
| 43 | "//util/reggen:gen_html", |
| 44 | "//util/reggen:gen_json", |
| 45 | "//util/reggen:gen_rtl", |
| 46 | "//util/reggen:gen_rust", |
| 47 | "//util/reggen:gen_sec_cm_testplan", |
| 48 | "//util/reggen:gen_selfdoc", |
| 49 | "//util/reggen:ip_block", |
| 50 | "//util/reggen:version", |
| 51 | ], |
| 52 | ) |