summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEmanuele Ghidoli <emanuele.ghidoli@toradex.com>2023-06-14 19:30:45 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2023-06-28 11:14:21 +0200
commitbf083c9a770955fdb19086f7dc38a09101f43aa3 (patch)
tree0bc5fb4d0c3a4bc8fe84ed2e7549d1f68b7ca8bc /classes
parentb403c70751bfd0e927b0f0aec9db4ef5bf45ebd7 (diff)
image_type_tezi: select TPL binary based on PID4
Move TPL_BINARY from a variable to a variable flag using the PID4 as a flag and generate the image json file according to that. This requires changes on the machine conf where TPL_BINARY is used. This is required to support different SoC type (GP/HS-FS) that requires a different tiboot3.bin on the Verdin AM62. Related-to: ELB-5227 Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> (cherry picked from commit 7fd635f58748064dd034c91605cf6ed25a56a900)
Diffstat (limited to 'classes')
-rw-r--r--classes/image_type_tezi.bbclass26
1 files changed, 21 insertions, 5 deletions
diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass
index 3e8dcbd..4dcdbbb 100644
--- a/classes/image_type_tezi.bbclass
+++ b/classes/image_type_tezi.bbclass
@@ -146,11 +146,15 @@ def rootfs_tezi_emmc(d, use_bootfiles):
filesystem_partitions = []
offset_payload = offset_bootrom
- if offset_tpl:
- bootpart_rawfiles.append(
+ if offset_tpl:
+ # TPL_BINARY contain product_id <-> filename mapping
+ tplmapping = d.getVarFlags('TPL_BINARY')
+ for f, v in tplmapping.items():
+ bootpart_rawfiles.append(
{
- "filename": d.getVar('TPL_BINARY'),
- "dd_options": "seek=" + offset_payload
+ "filename": v,
+ "dd_options": "seek=" + offset_payload,
+ "product_ids": f
})
offset_payload = offset_tpl
if offset_spl:
@@ -337,6 +341,18 @@ def rootfs_tezi_json(d, flash_type, flash_data, json_file, uenv_file):
json.dump(data, outfile, indent=4)
bb.note("Toradex Easy Installer metadata file {0} written.".format(json_file))
+def tpl_binaries(d):
+ tplmapping = d.getVarFlags('TPL_BINARY')
+
+ if tplmapping is not None:
+ tpl_bins = []
+ for key, val in tplmapping.items():
+ if val not in tpl_bins:
+ tpl_bins.append(val)
+ return " " + " ".join(tpl_bins)
+ else:
+ return ""
+
python rootfs_tezi_run_json() {
artifacts = "%s/%s.%s" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME'), d.getVar('TEZI_ROOT_SUFFIX'))
flash_type = d.getVar('TORADEX_FLASH_TYPE')
@@ -355,7 +371,7 @@ python rootfs_tezi_run_json() {
uenv_file = d.getVar('UBOOT_ENV_TEZI_EMMC')
uboot_file = d.getVar('UBOOT_BINARY_TEZI_EMMC')
# TODO: Multi image/raw NAND with SPL currently not supported
- uboot_file += " " + d.getVar('TPL_BINARY') if d.getVar('OFFSET_TPL_PAYLOAD') else ""
+ uboot_file += tpl_binaries(d);
uboot_file += " " + d.getVar('SPL_BINARY') if d.getVar('OFFSET_SPL_PAYLOAD') else ""
artifacts += " " + "%s/%s.%s" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME'), d.getVar('TEZI_BOOT_SUFFIX')) if use_bootfiles else ""
else: