summaryrefslogtreecommitdiff
path: root/meta-phosphor/classes/image_types_phosphor.bbclass
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2020-04-13 21:56:41 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-04-14 22:26:25 +0300
commite913dd89c69eb511142ed6ef584d63f0366d19f2 (patch)
tree5ffd28e88f5dff37e8c0d664d8dab1f6b6baaa29 /meta-phosphor/classes/image_types_phosphor.bbclass
parent45a42423b9ef2aa065bb688507530a228ffe7339 (diff)
downloadopenbmc-e913dd89c69eb511142ed6ef584d63f0366d19f2.tar.xz
image_types_phosphor: Add u-boot spl to static image
If the [SPL_BINARY][1] variable is set, add the spl binary to the static image, then increase the u-boot offset by the size of the spl (default to 64kb). [1]: https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-SPL_BINARY (From meta-phosphor rev: 31fdddf87d96ddeed1b16639368c6bea991392b1) Change-Id: I96fef2323dec511257ea17ce6d4aa888d3ba1dbf Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/classes/image_types_phosphor.bbclass')
-rw-r--r--meta-phosphor/classes/image_types_phosphor.bbclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass
index 39534db8d..0259cf634 100644
--- a/meta-phosphor/classes/image_types_phosphor.bbclass
+++ b/meta-phosphor/classes/image_types_phosphor.bbclass
@@ -42,6 +42,7 @@ FLASH_PAGE_SIZE ?= "1"
FLASH_NOR_UBI_OVERHEAD ?= "64"
# Fixed partition offsets
+FLASH_UBOOT_SPL_SIZE ?= "64"
FLASH_UBOOT_OFFSET ?= "0"
FLASH_KERNEL_OFFSET ?= "512"
FLASH_KERNEL_OFFSET_flash-131072 ?= "1024"
@@ -336,9 +337,19 @@ python do_generate_static() {
'if=%s' % imgpath,
'of=%s' % nor_image])
+ uboot_offset = int(d.getVar('FLASH_UBOOT_OFFSET', True))
+
+ spl_binary = d.getVar('SPL_BINARY', True)
+ if spl_binary:
+ _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True),
+ 'u-boot-spl.%s' % d.getVar('UBOOT_SUFFIX',True)),
+ int(d.getVar('FLASH_UBOOT_OFFSET', True)),
+ int(d.getVar('FLASH_UBOOT_SPL_SIZE', True)))
+ uboot_offset += int(d.getVar('FLASH_UBOOT_SPL_SIZE', True))
+
_append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True),
'u-boot.%s' % d.getVar('UBOOT_SUFFIX',True)),
- int(d.getVar('FLASH_UBOOT_OFFSET', True)),
+ uboot_offset,
int(d.getVar('FLASH_KERNEL_OFFSET', True)))
_append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True),