mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 10:12:04 +02:00
Revert "inject.sh: simplify remktar()"
This reverts commit 28f03d39cb.
The commit that this reverts, broke building release roms.
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+13
-9
@@ -13,7 +13,7 @@ cv="CONFIG_GBE_BIN_PATH"
|
|||||||
[ -n "$cvchk" ] && cv="$cv $cvchk"
|
[ -n "$cvchk" ] && cv="$cv $cvchk"
|
||||||
|
|
||||||
eval "`setvars "" archive boarddir IFD_platform ifdprefix tree new_mac \
|
eval "`setvars "" archive boarddir IFD_platform ifdprefix tree new_mac \
|
||||||
tdir board xchanged $cv`"
|
tmpromdir board xchanged $cv`"
|
||||||
|
|
||||||
inject()
|
inject()
|
||||||
{
|
{
|
||||||
@@ -41,8 +41,7 @@ inject()
|
|||||||
x_ e "$archive" f && check_release
|
x_ e "$archive" f && check_release
|
||||||
check_target && patch_release
|
check_target && patch_release
|
||||||
|
|
||||||
[ "$xchanged" != "y" ] || ( remktar ) || err
|
[ "$xchanged" = "y" ] && remktar
|
||||||
x_ mv "${tdir%"/bin/$board"}/bin/${relname}_${board}.tar.xz" "$archive"
|
|
||||||
|
|
||||||
xnot=" NOT" && [ "$xchanged" = "y" ] && xnot=""
|
xnot=" NOT" && [ "$xchanged" = "y" ] && xnot=""
|
||||||
printf "\n'%s' was%s modified\n" "$archive" "$xnot" 1>&2
|
printf "\n'%s' was%s modified\n" "$archive" "$xnot" 1>&2
|
||||||
@@ -81,13 +80,13 @@ patch_release()
|
|||||||
[ "$nuke" = "nuke" ] || x_ ./mk download "$board"
|
[ "$nuke" = "nuke" ] || x_ ./mk download "$board"
|
||||||
|
|
||||||
has_hashes="n"
|
has_hashes="n"
|
||||||
tdir="$tmpromdel/bin/$board"
|
tmpromdir="$tmpromdel/bin/$board"
|
||||||
|
|
||||||
remkdir "${tdir%"/bin/$board"}"
|
remkdir "${tmpromdir%"/bin/$board"}"
|
||||||
x_ tar -xf "$archive" -C "${tdir%"/bin/$board"}"
|
x_ tar -xf "$archive" -C "${tmpromdir%"/bin/$board"}"
|
||||||
|
|
||||||
for _hashes in "vendorhashes" "blobhashes"; do
|
for _hashes in "vendorhashes" "blobhashes"; do
|
||||||
e "$tdir/$_hashes" f && \
|
e "$tmpromdir/$_hashes" f && \
|
||||||
has_hashes="y" && hashfile="$_hashes" && break; :
|
has_hashes="y" && hashfile="$_hashes" && break; :
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -118,7 +117,7 @@ modify_mac()
|
|||||||
x_ make -C util/nvmutil clean && x_ make -C util/nvmutil && \
|
x_ make -C util/nvmutil clean && x_ make -C util/nvmutil && \
|
||||||
x_ "$nvm" "$xbloc/gbe" setmac "$new_mac"
|
x_ "$nvm" "$xbloc/gbe" setmac "$new_mac"
|
||||||
|
|
||||||
fx_ newmac x_ find "$tdir" -maxdepth 1 -type f -name "*.rom"
|
fx_ newmac x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
|
||||||
|
|
||||||
printf "\nThe following GbE NVM data will be written:\n"
|
printf "\nThe following GbE NVM data will be written:\n"
|
||||||
x_ "$nvm" "$xbloc/gbe" dump | grep -v "bytes read from file" || :
|
x_ "$nvm" "$xbloc/gbe" dump | grep -v "bytes read from file" || :
|
||||||
@@ -132,7 +131,12 @@ newmac()
|
|||||||
|
|
||||||
remktar()
|
remktar()
|
||||||
{
|
{
|
||||||
x_ cd "${tdir%"/bin/$board"}"
|
(
|
||||||
|
x_ cd "${tmpromdir%"/bin/$board"}"
|
||||||
printf "Re-building tar archive (please wait)\n"
|
printf "Re-building tar archive (please wait)\n"
|
||||||
mkrom_tarball "bin/$board" 1>/dev/null
|
mkrom_tarball "bin/$board" 1>/dev/null
|
||||||
|
) || err "Cannot re-generate '$archive'"
|
||||||
|
|
||||||
|
mv "${tmpromdir%"/bin/$board"}/bin/${relname}_${board}.tar.xz" \
|
||||||
|
"$archive" || err "'$archive' -> Can't overwrite"; :
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -256,7 +256,7 @@ getvfile()
|
|||||||
{
|
{
|
||||||
eval "`setcfg "config/vendor/$vcfg/pkg.cfg" 1`"
|
eval "`setcfg "config/vendor/$vcfg/pkg.cfg" 1`"
|
||||||
bootstrap && [ $# -gt 0 ] && getfiles && return 0 # download
|
bootstrap && [ $# -gt 0 ] && getfiles && return 0 # download
|
||||||
fx_ prep x_ find "$tdir" -maxdepth 1 -type f -name "*.rom"
|
fx_ prep x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
|
||||||
( check_vendor_hashes ) || err "$archive: Can't verify hashes"; :
|
( check_vendor_hashes ) || err "$archive: Can't verify hashes"; :
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,7 +390,7 @@ vfile()
|
|||||||
|
|
||||||
check_vendor_hashes()
|
check_vendor_hashes()
|
||||||
{
|
{
|
||||||
x_ cd "$tdir"
|
x_ cd "$tmpromdir"
|
||||||
[ "$has_hashes" = "n" ] || [ "$nuke" = "nuke" ] || sha512sum \
|
[ "$has_hashes" = "n" ] || [ "$nuke" = "nuke" ] || sha512sum \
|
||||||
--status -c "$hashfile" || x_ sha1sum --status -c "$hashfile"
|
--status -c "$hashfile" || x_ sha1sum --status -c "$hashfile"
|
||||||
x_ rm -f "$hashfile"
|
x_ rm -f "$hashfile"
|
||||||
|
|||||||
Reference in New Issue
Block a user