summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh7
1 files changed, 6 insertions, 1 deletions
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 d08575a237..1ed4b9a22c 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
@@ -38,13 +38,18 @@ gbmc_upgrade_fetch() (
return 1
fi
+ # Determine the path of the image file for the correct machine
+ # Our netboot can serve us images for multiple models
+ local machine
+ machine="$(source /etc/os-release && echo "$OPENBMC_TARGET_MACHINE")" || return
+
# Ensure some sane output file limit
# Currently no BMC image is larger than 64M
ulimit -H -f $((96 * 1024 * 1024)) || return
timeout=$((SECONDS + 120))
while (( SECONDS < timeout )); do
local st=(0)
- wget -q -O - "$bootfile_url" | tar -xC "$tmpdir" || st=("${PIPESTATUS[@]}")
+ wget -q -O - "$bootfile_url" | tar -xC "$tmpdir" "firmware-gbmc/$machine" || st=("${PIPESTATUS[@]}")
(( st[0] != 0 )) || break
(shopt -s nullglob dotglob; rm -rf -- "${tmpdir:?}"/*)
sleep 5