blob: f2bfe649191fc6af6822c2f3bae0152afb1d31f1 [file]
# Licensed under the Apache-2.0 license
# SPDX-License-Identifier: Apache-2.0
load("@openprot_python_deps//:requirements.bzl", "requirement")
load("@pigweed//pw_build:pw_py_importable_runfile.bzl", "pw_py_importable_runfile")
load("@rules_python//python:defs.bzl", "py_binary")
load("//target/earlgrey/tooling:qemu.bzl", "qemu_cfg", "qemu_otp")
pw_py_importable_runfile(
name = "opentitantool-runfiles",
src = "@opentitan_devbundle//:opentitantool/opentitantool",
executable = True,
import_location = "opentitan.opentitantool",
)
pw_py_importable_runfile(
name = "verilator-runfiles",
src = "@opentitan_devbundle//:earlgrey/verilator/Vchip_sim_tb",
executable = True,
import_location = "opentitan.verilator",
)
pw_py_importable_runfile(
name = "test_rom-runfiles",
src = "@opentitan_devbundle//:earlgrey/test_rom/test_rom_sim_verilator.39.scr.vmem",
import_location = "opentitan.test_rom",
)
pw_py_importable_runfile(
name = "test_otp-runfiles",
src = "@opentitan_devbundle//:earlgrey/otp/img_rma.24.vmem",
import_location = "opentitan.test_otp",
)
pw_py_importable_runfile(
name = "rom_ext_cw310-runfiles",
src = "@opentitan_devbundle//:rom_ext/rom_ext_dice_x509_slot_virtual_fpga_cw310.prod_key_0.prod_key_0.signed.bin",
import_location = "opentitan.rom_ext_cw310",
)
pw_py_importable_runfile(
name = "rom_ext_cw340-runfiles",
src = "@opentitan_devbundle//:rom_ext/rom_ext_dice_x509_slot_virtual_fpga_cw340.prod_key_0.prod_key_0.signed.bin",
import_location = "opentitan.rom_ext_cw340",
)
pw_py_importable_runfile(
name = "bitstream_hyper310-runfiles",
src = "@opentitan_devbundle//:earlgrey/bitstreams/bitstream_fpga_hyper310.bit",
import_location = "opentitan.bitstream_hyper310",
)
pw_py_importable_runfile(
name = "bitstream_hyper340-runfiles",
src = "@opentitan_devbundle//:earlgrey/bitstreams/bitstream_fpga_hyper340.bit",
import_location = "opentitan.bitstream_hyper340",
)
pw_py_importable_runfile(
name = "app_prod_ecdsa-runfiles",
src = "@opentitan_devbundle//:fake_keys/app_prod_ecdsa_p256.der",
executable = False,
import_location = "opentitan.fake_keys.app_prod_ecdsa",
)
# Canonical per-package cfg/otp targets; also serve as smoke tests for the
# qemu_cfg and qemu_otp rules (all defaults).
qemu_cfg(
name = "qemu_earlgrey_cfg",
testonly = True,
)
qemu_otp(
name = "qemu_rma_otp",
testonly = True,
)
py_binary(
name = "opentitan_runner",
srcs = [
"opentitan_runner.py",
],
main = "opentitan_runner.py",
deps = [
":app_prod_ecdsa-runfiles",
":bitstream_hyper310-runfiles",
":bitstream_hyper340-runfiles",
":opentitantool-runfiles",
":rom_ext_cw310-runfiles",
":rom_ext_cw340-runfiles",
":test_otp-runfiles",
":test_rom-runfiles",
":verilator-runfiles",
"@pigweed//pw_tokenizer/py:detokenize",
"@rules_python//python/runfiles",
],
)
exports_files(["qemu_start.sh"])
py_binary(
name = "qemu_runner",
testonly = True,
srcs = ["qemu_runner.py"],
data = [":qemu_start.sh"],
main = "qemu_runner.py",
deps = [
"@pigweed//pw_tokenizer/py:detokenize",
],
)
py_binary(
name = "qemu_cfg_gen",
srcs = ["qemu_cfg_gen.py"],
main = "qemu_cfg_gen.py",
)
py_binary(
name = "qemu_constants_dumper",
srcs = ["qemu_constants_dumper.py"],
deps = [
"//third_party/qemu:ot",
requirement("hjson"),
],
)