From 0a686dd48811aef82fdd72392a1c6dd28046dea1 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 30 Nov 2019 16:28:31 +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 --- classes/image_type_tezi.bbclass | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass index 5369c96..8bff8a0 100644 --- a/classes/image_type_tezi.bbclass +++ b/classes/image_type_tezi.bbclass @@ -117,8 +117,7 @@ def rootfs_tezi_emmc(d): bootpart_rawfiles = [] - has_spl = d.getVar('SPL_BINARY') - if has_spl: + if offset_spl: bootpart_rawfiles.append( { "filename": d.getVar('SPL_BINARY'), @@ -127,7 +126,7 @@ def rootfs_tezi_emmc(d): 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 [ @@ -320,7 +319,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") @@ -396,7 +395,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