summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2019-09-25 04:16:09 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-09-27 04:13:15 +0300
commitdcd861cd47dea2e0ccd7f010568f0a23b3f705ec (patch)
tree203218ff9ecd5b8945532640b94a1653ee7072c8
parent0ccee0236941550f7555cfc0bb86630dd36365cb (diff)
downloadopenbmc-dcd861cd47dea2e0ccd7f010568f0a23b3f705ec.tar.xz
phosphor: image_types_phosphor: flash overrides
Add an override based on FLASH_SIZE, for use with the hardcoded offsets that exist when building raw flash images. This lets us have different flash layouts for different size flash modules that can be shared between machines. The existing 32MiB layouts are unchanged: partition: size: offset u-boot: 384 KiB (0 KiB) u-boot-env: 128 KiB (384 KiB) kernel/FIT: 4352 KiB (512 KiB) rootfs: 23808 KiB (4864 KiB) rwfs: 4MiB (28672 KiB) The new layout is as follows: partition: size: offset u-boot: 896 KiB (0 KiB) u-boot-env: 128 KiB (896 KiB) kernel/FIT: 9 MiB (1 MiB) rootfs: 86 MiB (10 MiB) rwfs: 32MiB (96 MiB) (From meta-phosphor rev: 9e84ca2ad4aa7f864bb53faa6f21ae580d64d07d) Change-Id: I4edf302d4e738b31906cd03459ad6f2f44c3c749 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
-rw-r--r--meta-phosphor/classes/image_types_phosphor.bbclass6
-rw-r--r--meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass3
2 files changed, 9 insertions, 0 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass
index ae90c0e444..f7742c85e2 100644
--- a/meta-phosphor/classes/image_types_phosphor.bbclass
+++ b/meta-phosphor/classes/image_types_phosphor.bbclass
@@ -27,6 +27,7 @@ IMAGE_TYPEDEP_mtd-ubi-tar = "${FLASH_UBI_BASETYPE}"
IMAGE_TYPES_MASKED += "mtd-static mtd-static-alltar mtd-static-tar mtd-ubi mtd-ubi-tar"
# Flash characteristics in KB unless otherwise noted
+DISTROOVERRIDES .= ":flash-${FLASH_SIZE}"
FLASH_SIZE ?= "32768"
FLASH_PEB_SIZE ?= "64"
# Flash page and overhead sizes in bytes
@@ -36,13 +37,18 @@ FLASH_NOR_UBI_OVERHEAD ?= "64"
# Fixed partition offsets
FLASH_UBOOT_OFFSET ?= "0"
FLASH_KERNEL_OFFSET ?= "512"
+FLASH_KERNEL_OFFSET_flash-131072 ?= "1024"
FLASH_UBI_OFFSET ?= "${FLASH_KERNEL_OFFSET}"
FLASH_ROFS_OFFSET ?= "4864"
+FLASH_ROFS_OFFSET_flash-131072 ?= "10240"
FLASH_RWFS_OFFSET ?= "28672"
+FLASH_RWFS_OFFSET_flash-131072 ?= "98304"
# UBI volume sizes in KB unless otherwise noted.
FLASH_UBI_RWFS_SIZE ?= "6144"
+FLASH_UBI_RWFS_SIZE_flash-131072 ?= "32768"
FLASH_UBI_RWFS_TXT_SIZE ?= "6MiB"
+FLASH_UBI_RWFS_TXT_SIZE_flash-131072 ?= "32MiB"
SIGNING_KEY ?= "${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv"
INSECURE_KEY = "${@'${SIGNING_KEY}' == '${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv'}"
diff --git a/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass
index 6b0a78ec04..0280133fe5 100644
--- a/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass
+++ b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass
@@ -41,7 +41,10 @@ SYSTEMD_SERVICE_phosphor-software-manager-updater-ubi += " \
BMC_RW_MTD ??= "bmc"
BMC_RO_MTD ??= "bmc"
BMC_KERNEL_MTD ??= "bmc"
+FLASH_SIZE ?= "32768"
+DISTROOVERRIDES .= ":flash-${FLASH_SIZE}"
BMC_RW_SIZE ??= "0x600000"
+BMC_RW_SIZE_flash-131072 = "0x2000000"
SYSTEMD_SUBSTITUTIONS += "RW_MTD:${BMC_RW_MTD}:obmc-flash-bmc-ubirw.service"
SYSTEMD_SUBSTITUTIONS += "RO_MTD:${BMC_RO_MTD}:obmc-flash-bmc-ubiro@.service"
SYSTEMD_SUBSTITUTIONS += "KERNEL_MTD:${BMC_KERNEL_MTD}:obmc-flash-bmc-ubiro@.service"