From 110b938fab33ad6b50acb2732293e5da62247827 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Wed, 4 Dec 2019 10:48:11 +0100 Subject: image_type_tezi.bbclass: change logic on spl deployment Use OFFSET_SPL_PAYLOAD to decide if a SPL has to be deployed or not. This allows a simple integration of machines which have an SPL (as e.g. verdin-imx8mm has) but do aggregate the SPL and U-Boot proper into one binary. Signed-off-by: Max Krummenacher Signed-off-by: Ming Liu --- classes/image_type_tezi.bbclass | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'classes/image_type_tezi.bbclass') diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass index ced429c..f34fb5d 100644 --- a/classes/image_type_tezi.bbclass +++ b/classes/image_type_tezi.bbclass @@ -115,8 +115,7 @@ def rootfs_tezi_emmc(d, distro=False): bootpart_rawfiles = [] - has_spl = d.getVar('SPL_BINARY') - if has_spl: + if offset_spl: bootpart_rawfiles.append( { "filename": d.getVar('SPL_BINARY'), @@ -125,7 +124,7 @@ def rootfs_tezi_emmc(d, distro=False): bootpart_rawfiles.append( { "filename": d.getVar('UBOOT_BINARY_TEZI_EMMC'), - "dd_options": "seek=" + (offset_spl if has_spl else offset_bootrom) + "dd_options": "seek=" + (offset_spl if offset_spl else offset_bootrom) }) return [ @@ -317,7 +316,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 - if d.getVar('SPL_BINARY'): + if d.getVar('OFFSET_SPL_PAYLOAD'): uboot_file += " " + d.getVar('SPL_BINARY') else: bb.fatal("Toradex flash type unknown") @@ -388,7 +387,7 @@ python rootfs_tezi_run_distro_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 - if d.getVar('SPL_BINARY'): + if d.getVar('OFFSET_SPL_PAYLOAD'): uboot_file += " " + d.getVar('SPL_BINARY') else: bb.fatal("Toradex flash type unknown") -- cgit v1.2.3