meta-google: gbmc-update: Allow multi-image
We have a few machines where mutliple images are served to the BMC. We
want to allow for both images to be stored without processing.
Change-Id: I20d342981a5139d26b71c2e10c4861ae9dfbe432
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh
index f002b22..9d55eee 100644
--- a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh
+++ b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh
@@ -45,7 +45,9 @@
# Ensure some sane output file limit
# Currently no BMC image is larger than 64M
- ulimit -H -f $((96 * 1024 * 1024)) || return
+ # We want to allow 2 images and a small amount of metadata (2*64+2)M
+ local max_mb=$((2*64 + 2))
+ ulimit -f $((max_mb * 1024 * 1024 / 512)) || return
timeout=$((SECONDS + 300))
while (( SECONDS < timeout )); do
local st=(0)