summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-09-04 10:02:08 -0700
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-10-03 14:46:27 +0200
commit9e2373a492c3294ac6ade3e32566714e8790245e (patch)
treefc2383d6c78f98cd5ea6ba011f475029207eb10a
parent0f7992bab1be0b4cf095ad78c33d7484041f6eb6 (diff)
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 <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--classes/image_type_tezi.bbclass26
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
}
})]