commit | 05f3b1b3683d0341ccfef633d08aa2f3a9fd8965 | [log] [tgz] |
---|---|---|
author | Patrick Williams <patrick@stwcx.xyz> | Mon Jun 19 15:46:02 2023 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Tue Jun 20 06:09:35 2023 +0000 |
tree | 0d69514b3d236c2ceb7e6a990b2d2b728080ee82 | |
parent | f7e361c441b541849cce85880fa4415afcc8da3e [diff] |
meta-phosphor: simplify FLASH_SIZE specification FLASH_SIZE was previously defaulted in a few bbclasses and bbappends, but this can result in it not being defined in all recipes if the machine has not overridden the FLASH_SIZE. openbmc/openbmc#3876 reported one such case where the u-boot-fw-utils recipe does not receive the correct FLASH_SIZE and ends up erasing the wrong flash region as if it were the u-boot enviroment. Specify it in the common include so it is available everywhere. Resolves openbmc/openbmc#3876. Change-Id: Iacdde1a5d0081b54321110d655da18bb3846cd14 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index 63de40e..70f285a 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass
@@ -46,7 +46,6 @@ # 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 FLASH_PAGE_SIZE ?= "1"
diff --git a/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass index 9d38ada..b798c6e 100644 --- a/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass +++ b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass
@@ -27,7 +27,6 @@ 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"
diff --git a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc index e57bc64..fb410ab 100644 --- a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc +++ b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
@@ -5,6 +5,8 @@ KERNEL_CLASSES ?= "kernel-fitimage" KERNEL_IMAGETYPES ?= "fitImage vmlinux" +FLASH_SIZE ?= "32768" + OBMC_IMAGE_INCLUDE = "static" OBMC_IMAGE_INCLUDE:df-obmc-static-norootfs = "static-norootfs" OBMC_IMAGE_INCLUDE:df-obmc-ubi-fs = "ubi-fs"
diff --git a/meta-phosphor/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-phosphor/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend index 0e18a7c..5c553bf 100644 --- a/meta-phosphor/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend +++ b/meta-phosphor/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
@@ -1,2 +1 @@ -FLASH_SIZE ?= "32768" ASPEED_IMAGE_SIZE_KB = "${FLASH_SIZE}"