summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-09 20:31:00 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-09 20:31:00 +0100
commit14d46abceda7a7ad6081b6ab321fb0efb4bc3325 (patch)
tree187793349006d58bb04749d8b3bb24f92f329e2f /include
parent6e521c2e1ea975133894ce7fc27702feed080547 (diff)
mrc.sh: operate on refcode in tmp area first
that way, the Intel GbE device can be enabled there, and only then would the refcode file be copied. otherwise, the current behaviour would leave buggy refcode in place, if the dd command failed. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r--include/mrc.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/mrc.sh b/include/mrc.sh
index 00fb8626..edd35414 100644
--- a/include/mrc.sh
+++ b/include/mrc.sh
@@ -30,11 +30,13 @@ extract_refcode()
mkdir -p "${_refdest%/*}" || err "ref: !mkdir -p ${_refdest%/*}"
x_ "$cbfstoolref" "$appdir/bios.bin" extract \
- -m x86 -n fallback/refcode -f "$_refdest" -r RO_SECTION
+ -m x86 -n fallback/refcode -f "$appdir/ref" -r RO_SECTION
# enable the Intel GbE device, if told by offset MRC_refcode_gbe
[ -z "$MRC_refcode_gbe" ] || x_ dd if="config/ifd/hp820g2/1.bin" \
- of="$_refdest" bs=1 seek=$MRC_refcode_gbe count=1 conv=notrunc; :
+ of="$appdir/ref" bs=1 seek=$MRC_refcode_gbe count=1 conv=notrunc; :
+
+ x_ mv "$appdir/ref" "$_refdest"
}
extract_shellball()