meta-google: hoth: add support for 128mb
Make Hoth offsets apply to 128mb flash
Tested:
After build one platform,
cr51-image-layout.json:
{
"build_timestamp": 1715204310,
"flash_capacity": 134217728,
"major": 5,
"minor": 6,
"name": "gbmc image",
"platform": "GBMC",
"point": 24,
"region": [
{
"length": 4194304,
"name": "u_boot",
"offset": 0,
"region_type": [
"STATIC",
"WRITE_PROTECTED"
]
},
{
"length": 8388608,
"name": "kernel",
"offset": 4194304,
"region_type": [
"STATIC",
"WRITE_PROTECTED"
]
},
{
"length": 117309440,
"name": "rofs",
"offset": 12582912,
"region_type": [
"STATIC",
"WRITE_PROTECTED"
]
},
{
"length": 65536,
"name": "image_descriptor",
"offset": 129892352,
"region_type": [
"STATIC",
"WRITE_PROTECTED"
]
},
{
"length": 1048576,
"name": "hoth_update",
"offset": 129957888,
"region_type": []
},
{
"length": 3145728,
"name": "rwfs",
"offset": 131006464,
"region_type": [
"PERSISTENT"
]
},
{
"length": 65536,
"mailbox_length": 1024,
"name": "hoth_mailbox",
"offset": 134152192,
"region_type": [
"MAILBOX"
]
}
],
"subpoint": 50
}
Change-Id: I35f2a15d5af0493a631aef13d589c14b1372fc0b
Signed-off-by: ShouEnHsiao <shouenhsiao@google.com>
diff --git a/meta-google/classes/image_types_hoth.bbclass b/meta-google/classes/image_types_hoth.bbclass
index f01ed90..00e9c4c 100644
--- a/meta-google/classes/image_types_hoth.bbclass
+++ b/meta-google/classes/image_types_hoth.bbclass
@@ -9,9 +9,14 @@
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}"
+FLASH_IMAGE_DESC_OFFSET:hoth:aarch64:flash-131072 = "126848"
+FLASH_HOTH_UPDATE_OFFSET:hoth:aarch64:flash-131072 = "126912"
+FLASH_HOTH_MAILBOX_OFFSET:hoth:aarch64:flash-131072 = "131008"
+
# Leave a zero-size u-boot env partition.
FLASH_UBOOT_ENV_OFFSET = "${FLASH_KERNEL_OFFSET}"
FLASH_UBOOT_ENV_OFFSET:flash-65536 = "${FLASH_KERNEL_OFFSET:flash-65536}"
+FLASH_UBOOT_ENV_OFFSET:flash-131072 = "${FLASH_KERNEL_OFFSET:flash-131072}"
# Support BMC image to have secondary hoth firmware
ENABLE_HOTH_SECONDARY ?= "no"