summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2018-02-14 16:35:30 -0600
committerAdriana Kobylak <anoo@us.ibm.com>2018-03-01 15:26:57 -0600
commitb70005d476ffa20e278739bde0bc31d180b1e3e8 (patch)
tree6de84ea120aae9e599c06f76d6fd2f9e4c37b392 /meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc
parenta317e387272a352100c7d4a9f8a02500f521d63d (diff)
downloadtalos-openbmc-b70005d476ffa20e278739bde0bc31d180b1e3e8.tar.gz
talos-openbmc-b70005d476ffa20e278739bde0bc31d180b1e3e8.zip
Increase default size of UBI read-write volume
The default size of the UBI read-write volume is currently set to 4MB. There are no plans to store more than one BMC rootfs image on the chip so in a 32MB flash chip, accounting for the current rootfs image size of ~15MB with plans to grow to ~20MB with the addition of redfish and other packages, it is safe to increase the read-write volume size to 6MB since the current size is already almost completely taken up if there are multiple error logs / dumps on the system. In addition, make the size configurable from a recipe so that the size can be changed in a per-system basis. And during code update, check the current size and update it if it's different, this allows systems to be able to be resized to a new size by performing factory reset after a code update that sets the new size. Tested: - Booted on QEMU and verified non-ubi system (romulus) retains the current 4MB read-write volume, and ubi system (witherspoon) has a 6MB volume. - Code updated to an image that has these changes and verified the rwfs_size env variable changes to 6MB, and that a subsequent factory reset rebuilds the volume with size 6MB. Change-Id: I995eb560c1bd87ee95712c731e3d6e55bc0b2735 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc')
-rw-r--r--meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc9
1 files changed, 7 insertions, 2 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc
index 12c6c762b..d04651611 100644
--- a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc
+++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc
@@ -108,10 +108,14 @@ ubi_rw() {
rw="${rwmtd#mtd}"
ubidev="/dev/ubi${rw}"
- # Create a ubi volume of size 4MB, that is the current size of the rwfs image
+ rwsize="$(fw_printenv -n rwfs_size)"
+ if [[ "${imgsize}" != "${rwsize}" ]]; then
+ fw_setenv rwfs_size "${imgsize}"
+ fi
+
vol="$(findubi "${name}")"
if [ -z "${vol}" ]; then
- ubimkvol "${ubidev}" -N "${name}" -s 4MiB
+ ubimkvol "${ubidev}" -N "${name}" -s "${imgsize}"
fi
}
@@ -387,6 +391,7 @@ case "$1" in
ubirw)
reqmtd="$2"
name="$3"
+ imgsize="$4"
ubi_rw
;;
ubiro)
OpenPOWER on IntegriCloud