From 9e2373a492c3294ac6ade3e32566714e8790245e Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 4 Sep 2017 10:02:08 -0700 Subject: image_type_tezi: support non-SPL eMMC targets Colibri iMX7 Dual 1GB uses eMMC but no SPL. Make sure that Tezi flashes the u-boot.imx binary to the location where the boot loader expects the image. Signed-off-by: Stefan Agner Acked-by: Marcel Ziswiler --- classes/image_type_tezi.bbclass | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass index aba7711..ea2d539 100644 --- a/classes/image_type_tezi.bbclass +++ b/classes/image_type_tezi.bbclass @@ -27,6 +27,21 @@ def rootfs_tezi_emmc(d): output = subprocess.check_output(args) bootfssize_kb = int(output.splitlines()[-1].split()[0]) + bootpart_rawfiles = [] + + has_spl = d.getVar('SPL_BINARY', True) + if has_spl: + bootpart_rawfiles.append( + { + "filename": d.getVar('SPL_BINARY', True), + "dd_options": "seek=2" + }) + bootpart_rawfiles.append( + { + "filename": d.getVar('UBOOT_BINARY', True), + "dd_options": "seek=138" if has_spl else "seek=2" + }) + return [ OrderedDict({ "name": "mmcblk0", @@ -59,16 +74,7 @@ def rootfs_tezi_emmc(d): "name": "mmcblk0boot0", "content": { "filesystem_type": "raw", - "rawfiles": [ - { - "filename": d.getVar('SPL_BINARY', True), - "dd_options": "seek=2" - }, - { - "filename": d.getVar('UBOOT_BINARY', True), - "dd_options": "seek=138" - } - ] + "rawfiles": bootpart_rawfiles } })] -- cgit v1.2.3