summaryrefslogtreecommitdiff
path: root/meta-google
diff options
context:
space:
mode:
authorBenjamin Fair <benjaminfair@google.com>2022-08-27 01:47:22 +0300
committerBenjamin Fair <benjaminfair@google.com>2022-09-30 04:27:55 +0300
commit3aad98eaa1e11d305e5d58bad91a801f0000bc30 (patch)
treebde19ad1362753e01b0746b18e8943cb64c56c87 /meta-google
parent66b090a3dd3ce755958b377f13f4861097f39ae0 (diff)
downloadopenbmc-3aad98eaa1e11d305e5d58bad91a801f0000bc30.tar.xz
meta-google: image_types_hoth: rearrange partitions
Move the update and image descriptor partitions to the end in images targeting 64-bit machines since we may not have space in the current location when the bootloader and kernel grow in size. Tested: Built for 64-bit platform and inspected cr51-image-layout.json Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: Ib66ebbb824319fd526a161bca9330b127f37fe6c
Diffstat (limited to 'meta-google')
-rw-r--r--meta-google/classes/image_types_hoth.bbclass42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-google/classes/image_types_hoth.bbclass b/meta-google/classes/image_types_hoth.bbclass
index 838e2647e2..79f23588d3 100644
--- a/meta-google/classes/image_types_hoth.bbclass
+++ b/meta-google/classes/image_types_hoth.bbclass
@@ -5,6 +5,10 @@ FLASH_HOTH_UPDATE_OFFSET:hoth = "${@1024 if FLASH_SIZE == '65536' else 31744}"
FLASH_HOTH_MAILBOX_OFFSET:hoth = "${@65472 if FLASH_SIZE == '65536' else 7168}"
unset FLASH_UBOOT_ENV_OFFSET
+# 64 bit kernels are larger, so they require a different layout
+FLASH_IMAGE_DESC_OFFSET:hoth:aarch64 = "${@61312 if FLASH_SIZE == '65536' else 7232}"
+FLASH_HOTH_UPDATE_OFFSET:hoth:aarch64 = "${@61376 if FLASH_SIZE == '65536' else 31744}"
+
python do_generate_static:append() {
_append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True),
'image-hoth-update'),
@@ -46,6 +50,44 @@ python do_generate_layout () {
convertPart(
'u_boot',
d.getVar('FLASH_UBOOT_OFFSET'),
+ d.getVar('FLASH_KERNEL_OFFSET'),
+ static=True,
+ wp=True),
+ convertPart(
+ 'kernel',
+ d.getVar('FLASH_KERNEL_OFFSET'),
+ d.getVar('FLASH_ROFS_OFFSET'),
+ static=True,
+ wp=True),
+ convertPart(
+ 'rofs',
+ d.getVar('FLASH_ROFS_OFFSET'),
+ d.getVar('FLASH_IMAGE_DESC_OFFSET'),
+ static=True,
+ wp=True),
+ convertPart(
+ 'image_descriptor',
+ d.getVar('FLASH_IMAGE_DESC_OFFSET'),
+ d.getVar('FLASH_HOTH_UPDATE_OFFSET'),
+ static=True,
+ wp=True),
+ convertPart(
+ 'hoth_update',
+ d.getVar('FLASH_HOTH_UPDATE_OFFSET'),
+ d.getVar('FLASH_RWFS_OFFSET')),
+ convertPart(
+ 'rwfs',
+ d.getVar('FLASH_RWFS_OFFSET'),
+ d.getVar('FLASH_HOTH_MAILBOX_OFFSET'),
+ persist=True),
+ convertPart(
+ 'hoth_mailbox',
+ d.getVar('FLASH_HOTH_MAILBOX_OFFSET'),
+ d.getVar('FLASH_SIZE')),
+ ] if d.getVar('TARGET_ARCH' == "aarch64") else [
+ convertPart(
+ 'u_boot',
+ d.getVar('FLASH_UBOOT_OFFSET'),
d.getVar('FLASH_IMAGE_DESC_OFFSET'),
static=True,
wp=True),