blob: 7d3c2b8b7a416f0d39cd5f90421c2ac7bc72e314 [file] [log] [blame]
Chris Frantz340e6232021-08-25 15:56:28 -07001# 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 Trippel174d4842022-04-15 13:47:58 -07005load("@rules_python//python:defs.bzl", "py_binary")
Timothy Trippel024e3932022-04-20 15:40:55 -07006load("@ot_python_deps//:requirements.bzl", "requirement")
Timothy Trippel174d4842022-04-15 13:47:58 -07007
Chris Frantz340e6232021-08-25 15:56:28 -07008package(default_visibility = ["//visibility:public"])
9
10exports_files(glob(["**"]))
Drew Macrae399af402021-11-01 18:15:09 +000011
12genrule(
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 Trippel174d4842022-04-15 13:47:58 -070018
Chris Frantzc10cc892022-04-21 18:17:32 -070019genrule(
20 name = "full_version_file",
21 outs = ["full_version.txt"],
22 cmd = """cp bazel-out/volatile-status.txt $@""",
23 stamp = 1, # this provides volatile-status.txt
24)
25
Timothy Trippel174d4842022-04-15 13:47:58 -070026py_binary(
Timothy Trippel024e3932022-04-20 15:40:55 -070027 name = "otbn_build",
28 srcs = ["otbn_build.py"],
29 imports = ["../hw/ip/otbn/util/"],
30 deps = [
31 requirement("pyelftools"),
32 "//hw/ip/otbn/util:otbn_as",
Timothy Trippela7b30e62022-04-20 16:26:09 -070033 "//hw/ip/otbn/util:otbn_ld",
Timothy Trippel024e3932022-04-20 15:40:55 -070034 ],
35)
36
37py_binary(
Timothy Trippel4a903632022-04-15 15:04:39 -070038 name = "rom_chip_info",
39 srcs = ["rom_chip_info.py"],
40)
41
42py_binary(
Timothy Trippel174d4842022-04-15 13:47:58 -070043 name = "regtool",
44 srcs = ["regtool.py"],
45 deps = [
46 "//util/reggen:countermeasure",
47 "//util/reggen:gen_cheader",
48 "//util/reggen:gen_dv",
49 "//util/reggen:gen_fpv",
50 "//util/reggen:gen_html",
51 "//util/reggen:gen_json",
52 "//util/reggen:gen_rtl",
53 "//util/reggen:gen_rust",
54 "//util/reggen:gen_sec_cm_testplan",
55 "//util/reggen:gen_selfdoc",
56 "//util/reggen:ip_block",
57 "//util/reggen:version",
58 ],
59)
Dan McArdlec6f17692022-06-22 14:53:42 -040060
61py_test(
62 name = "generate_compilation_db_test",
63 srcs = [
64 "generate_compilation_db.py",
65 "generate_compilation_db_test.py",
66 ],
67)