Skip to content

Commit

Permalink
[orchestrator] fix path of non-emulation perso bins
Browse files Browse the repository at this point in the history
The personalization binaries of non-emulation SKUs are checked into the
the repo, and therefore have a different path. Fix the orchestrator
script to use the correct path for these binaries.

Signed-off-by: Tim Trippel <[email protected]>
  • Loading branch information
timothytrippel committed Dec 5, 2024
1 parent 2f4e838 commit df426c3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
4 changes: 3 additions & 1 deletion sw/device/silicon_creator/manuf/base/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ filegroup(
[
":ft_fw_bundle_{}".format(sku)
for sku in EARLGREY_SKUS.keys()
],
] + [
"//sw/device/silicon_creator/manuf/base/binaries:perso_bins",
],
)

[
Expand Down
9 changes: 9 additions & 0 deletions sw/device/silicon_creator/manuf/base/binaries/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ load("//rules/opentitan:cc.bzl", "exec_env_filegroup")

package(default_visibility = ["//visibility:public"])

filegroup(
name = "perso_bins",
srcs = [
"ft_personalize_sival_fpga_cw340_rom_with_fake_keys.signed.bin",
"ft_personalize_sival_fpga_hyper310_rom_with_fake_keys.signed.bin",
"ft_personalize_sival_silicon_creator.signed.bin",
],
)

exec_env_filegroup(
name = "ft_personalize_sival",
testonly = True,
Expand Down
19 changes: 12 additions & 7 deletions sw/host/provisioning/orchestrator/src/ot_dut.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@

# yapf: disable
# CP & FT Device Firmware
_BASE_DEV_DIR = "sw/device/silicon_creator/manuf/base" # noqa: E221
_CP_DEVICE_ELF = "{base_dir}/sram_cp_provision_{target}.elf" # noqa: E221
_FT_INDIVID_DEVICE_ELF = "{base_dir}/sram_ft_individualize_{sku}_{target}.elf" # noqa: E221
_FT_PERSO_DEVICE_BIN = "{base_dir}/ft_personalize_{sku}_{target}.prod_key_0.prod_key_0.signed.bin" # noqa: E221, E501
_FT_FW_BUNDLE_BIN = "{base_dir}/ft_fw_bundle_{sku}_{target}.img" # noqa: E221
_BASE_DEV_DIR = "sw/device/silicon_creator/manuf/base" # noqa: E221
_CP_DEVICE_ELF = "{base_dir}/sram_cp_provision_{target}.elf" # noqa: E221
_FT_INDIVID_DEVICE_ELF = "{base_dir}/sram_ft_individualize_{sku}_{target}.elf" # noqa: E221
_FT_PERSO_EMULATION_BIN = "{base_dir}/ft_personalize_{sku}_{target}.prod_key_0.prod_key_0.signed.bin" # noqa: E221, E501
_FT_PERSO_SKU_BIN = "{base_dir}/binaries/ft_personalize_{sku}_{target}.signed.bin" # noqa: E221, E501
_FT_FW_BUNDLE_BIN = "{base_dir}/ft_fw_bundle_{sku}_{target}.img" # noqa: E221
# CP & FT Host Binaries
_CP_HOST_BIN = "sw/host/provisioning/cp/cp"
_FT_HOST_BIN = "sw/host/provisioning/ft/ft_{sku}"
Expand Down Expand Up @@ -168,11 +169,15 @@ def run_ft(self) -> None:
"""Runs the FT provisioning flow on the target DUT."""
logging.info("Running FT provisioning ...")

# Set cmd args and device ELF.
# Set cmd args and device binaries.
host_bin = _FT_HOST_BIN.format(sku=self.sku_config.name)
host_flags = _BASE_PROVISIONING_FLAGS
individ_elf = _FT_INDIVID_DEVICE_ELF
perso_bin = _FT_PERSO_DEVICE_BIN
# Emulation perso bins are signed online with fake keys, and therefore
# have different file naming patterns than production SKUs.
perso_bin = _FT_PERSO_EMULATION_BIN
if self.sku_config.name != "emulation":
perso_bin = _FT_PERSO_SKU_BIN
fw_bundle_bin = _FT_FW_BUNDLE_BIN
if self.fpga:
# Set host flags and device binaries for FPGA DUT.
Expand Down

0 comments on commit df426c3

Please sign in to comment.