diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-17 13:00:17 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-17 13:00:17 +0100 |
commit | 136bd66c2809dcdb1b9475687101332f2d91d4cb (patch) | |
tree | 5442662d2c01755d2038ec5e0a2f2359b57e7c02 /include/mrc.sh | |
parent | dbe109d7b541af4c218620dee7c3523bad6ed1fc (diff) |
mrc.sh: merge extract_mrc with extract_shellball
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/mrc.sh')
-rw-r--r-- | include/mrc.sh | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/mrc.sh b/include/mrc.sh index a132f574..775831f8 100644 --- a/include/mrc.sh +++ b/include/mrc.sh @@ -6,16 +6,9 @@ eval "`setvars "" MRC_url MRC_url_bkup MRC_hash MRC_board SHELLBALL`" -extract_mrc() -{ - extract_shellball - x_ "$cbfstool" "$appdir/"bios.bin extract -n mrc.bin \ - -f "$_pre_dest" -r RO_SECTION -} - extract_refcode() { - extract_shellball + extract_mrc # cbfstool after coreboot 4.13 changed the stage file attribute scheme, # and refcode is extracted from an image using the old scheme. we use @@ -33,7 +26,7 @@ extract_refcode() x_ mv "$appdir/ref" "$_pre_dest" } -extract_shellball() +extract_mrc() { chkvars "MRC_board" "CONFIG_MRC_FILE" SHELLBALL="chromeos-firmwareupdate-$MRC_board" @@ -42,7 +35,10 @@ extract_shellball() x_ cd "$appdir" extract_partition "${MRC_url##*/}" extract_archive "$SHELLBALL" . - ) || err "mrc download/extract failure"; : + ) || err "mrc download/extract failure" + + x_ "$cbfstool" "$appdir/"bios.bin extract -n mrc.bin \ + -f "${_pre_dest%/*}/mrc.bin" -r RO_SECTION } extract_partition() |