diff options
-rw-r--r-- | classes/image_type_tezi.bbclass | 26 |
1 files 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 } })] |