summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2017-07-18 12:24:24 -0500
committerAdriana Kobylak <anoo@us.ibm.com>2017-07-19 12:35:07 -0500
commit3d29ad4912e3f1efe365e892a88bb340d8fdea4a (patch)
treecfa91c3b06ee96d2e51564c66338b69a46255661 /meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash
parent77da88c680bbccd481c3879b80b3a0768803fbaf (diff)
downloadtalos-openbmc-3d29ad4912e3f1efe365e892a88bb340d8fdea4a.tar.gz
talos-openbmc-3d29ad4912e3f1efe365e892a88bb340d8fdea4a.zip
openpower-software-manager: Adjust the size of the ubi volume
The ubi volume size is the allocated size when they're created so need to set the max size needed at creation time. The size will be passed in with an argument (via openbmc/openbmc#1979) so for now approximate the sizes based on current file sizes. Decrease the size of the read-only partition to save some space, since even though the volume size adjusts to the size of the image, ubi will still reserve that space for the volume. Increase the size of the read-write volume to be able to fit the read-write partitions. Slightly increase the size of the prsv volume, there are only 3 pnor prsv partitions of a few KB each. Change-Id: I3175c731fa19127b6b16db5fe7af0cebc66e7ead Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash')
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios17
1 files changed, 11 insertions, 6 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
index 2b8394718..cbe58e13c 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
@@ -57,11 +57,12 @@ mount_squashfs() {
mkdir "${mountdir}"
fi
- # Create a static ubi volume of arbitrary size 32MB,
- # the volume will shrink to fit the pnor image if smaller
+ # Create a static ubi volume of arbitrary size 24MB,
+ # the current pnor image is ~19MB
+ # TODO Set size based on file size openbmc/openbmc#1840
vol="$(findubi "${name}")"
if [ -z "${vol}" ]; then
- ubimkvol "${ubidev}" -N "${name}" -s 32MiB --type=static
+ ubimkvol "${ubidev}" -N "${name}" -s 24MiB --type=static
vol="$(findubi "${name}")"
fi
@@ -86,15 +87,19 @@ mount_ubi() {
ubidev="/dev/ubi${pnor}"
mountdir="/media/${name}"
+ if [[ "${name}" == "pnor-prsv" ]]; then
+ size="2MiB"
+ else
+ size="16MiB"
+ fi
+
if [ ! -d "${mountdir}" ]; then
mkdir "${mountdir}"
fi
- # Create a dynamic ubi volume of initial arbitrary size 1MB,
- # the volume will grow dynamically as needed
vol="$(findubi "${name}")"
if [ -z "${vol}" ]; then
- ubimkvol "${ubidev}" -N "${name}" -s 1MiB
+ ubimkvol "${ubidev}" -N "${name}" -s "${size}"
fi
if ! is_mounted "${name}"; then
OpenPOWER on IntegriCloud