From dd633c6ff71b358b9683c504be3b514089825e68 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 6 Feb 2023 09:57:56 +0100 Subject: image_type_tezi: allow for a third boot component The Verdin AM62 needs a third binary blob in the eMMC boot area. Add the possibility to specify a third one. To use it define TPL_BINARY with the name of the file containing the first boot blob to be stored at OFFSET_BOOTROM_PAYLOAD and define OFFSET_TPL_PAYLOAD with the offset where the first boot blob expects the next one. Not defining TPL_BINARY keeps the image.json creation the same as before. Related-to: ELB-5012 Signed-off-by: Max Krummenacher (cherry picked from commit 501e8b7893e336e535412435706189f68217f497) --- classes/image_type_tezi.bbclass | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass index 478af69..44bdcd0 100644 --- a/classes/image_type_tezi.bbclass +++ b/classes/image_type_tezi.bbclass @@ -137,21 +137,31 @@ def rootfs_tezi_emmc(d, use_bootfiles): emmcdevboot0 = d.getVar('EMMCDEVBOOT0') imagename = d.getVar('IMAGE_LINK_NAME') offset_bootrom = d.getVar('OFFSET_BOOTROM_PAYLOAD') + offset_tpl = d.getVar('OFFSET_TPL_PAYLOAD') offset_spl = d.getVar('OFFSET_SPL_PAYLOAD') bootpart_rawfiles = [] filesystem_partitions = [] + offset_payload = offset_bootrom + if offset_tpl: + bootpart_rawfiles.append( + { + "filename": d.getVar('TPL_BINARY'), + "dd_options": "seek=" + offset_payload + }) + offset_payload = offset_tpl if offset_spl: bootpart_rawfiles.append( { "filename": d.getVar('SPL_BINARY'), - "dd_options": "seek=" + offset_bootrom + "dd_options": "seek=" + offset_payload }) + offset_payload = offset_spl bootpart_rawfiles.append( { "filename": d.getVar('UBOOT_BINARY_TEZI_EMMC'), - "dd_options": "seek=" + (offset_spl if offset_spl else offset_bootrom) + "dd_options": "seek=" + offset_payload }) if use_bootfiles: @@ -344,6 +354,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 += " " + 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: -- cgit v1.2.3