Skip to content

Commit b252d7e

Browse files
timothytrippelpamaury
authored andcommitted
[bazel] fix bug in filegroup
Multiple copies of a fake-signed and real-signed perso binaries were getting copied to the orchestrator.zip package which was causing errors downstream as the fake-signed sival perso images were overwriting the real-signed perso binaries. Signed-off-by: Tim Trippel <[email protected]> (cherry picked from commit c6db441)
1 parent aa1dbe8 commit b252d7e

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

sw/device/silicon_creator/manuf/base/BUILD

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44

55
load("@//rules:manuf.bzl", "device_id_header")
66
load("@//rules:signing.bzl", "offline_presigning_artifacts", "offline_signature_attach")
7-
load(
8-
"@provisioning_exts//:cfg.bzl",
9-
"EXT_SIGNED_PERSO_BINS",
10-
)
117
load("//rules:const.bzl", "CONST", "hex")
128
load("//rules:manifest.bzl", "manifest")
139
load("//rules/opentitan:cc.bzl", "opentitan_binary_assemble")
@@ -391,15 +387,24 @@ manifest(d = {
391387
filegroup(
392388
name = "ft_personalize_all",
393389
testonly = True,
394-
srcs = [
395-
":ft_personalize_{}".format(sku)
396-
for sku in EARLGREY_SKUS.keys()
397-
] +
398-
[
399-
":ft_fw_bundle_{}".format(sku)
400-
for sku in EARLGREY_SKUS.keys()
401-
] + ["//sw/device/silicon_creator/manuf/base/binaries:ft_personalize_sival"] +
402-
EXT_SIGNED_PERSO_BINS,
390+
# The depset(...).to_list() syntax removes duplicate bazel targets. Some
391+
# SKUs have duplicate "staging" versions that are identical to their
392+
# production counterparts, including the perso binaries used, except for CA
393+
# keys, so we need to remove duplicates.
394+
srcs = depset([
395+
# Select pre-signed / checked-in perso binaries over ones
396+
# built on the fly with fake keys if a pre-signed one
397+
# exists.
398+
config.get(
399+
"perso_bin",
400+
":ft_personalize_{}".format(sku),
401+
)
402+
for sku, config in EARLGREY_SKUS.items()
403+
] +
404+
[
405+
":ft_fw_bundle_{}".format(sku)
406+
for sku in EARLGREY_SKUS.keys()
407+
]).to_list(),
403408
)
404409

405410
[

sw/device/silicon_creator/manuf/base/provisioning_inputs.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ EARLGREY_OTP_CFGS = {
1616
"em00": "//hw/top_earlgrey/data/otp/emulation:otp_consts",
1717
} | EXT_EARLGREY_OTP_CFGS
1818

19-
EXT_SIGNED_PERSO_BINS = []
20-
2119
# A dictionary of SKU configurations that will be used to generate FT
2220
# personalization binaries that configure OTP and flash info pages as defined
2321
# in these bazel targets.

sw/device/silicon_creator/manuf/extensions/cfg.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ EXT_EARLGREY_SKUS = {
2525
# }
2626
}
2727

28-
EXT_SIGNED_PERSO_BINS = []
29-
3028
# This enables downstream integrators to define external Earlgrey execution
3129
# environments. See the upstream Silicon Owner execution environments defined
3230
# in the `EARLGREY_SILICON_OWNER_ROM_EXT_ENVS` dictionary in

0 commit comments

Comments
 (0)