mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 18:34:57 +02:00
inject.sh: minor code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+7
-16
@@ -228,9 +228,7 @@ extract_kbc1126ec()
|
|||||||
) || $err "$board: can't extract kbc1126 ec firmware - $dontflash"
|
) || $err "$board: can't extract kbc1126 ec firmware - $dontflash"
|
||||||
|
|
||||||
x_ e "$appdir/ec.bin.fw1" f && x_ e "$appdir/ec.bin.fw2" f
|
x_ e "$appdir/ec.bin.fw1" f && x_ e "$appdir/ec.bin.fw2" f
|
||||||
|
x_ cp "$appdir/"ec.bin.fw* "${_dest%/*}/"
|
||||||
cp "$appdir/"ec.bin.fw* "${_dest%/*}/" || \
|
|
||||||
$err "!cp 1126ec $_dest - $dontflash"; :
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extract_e6400vga()
|
extract_e6400vga()
|
||||||
@@ -318,10 +316,8 @@ inject()
|
|||||||
esac
|
esac
|
||||||
[ "$new_mac" = "keep" ] && new_mac=""
|
[ "$new_mac" = "keep" ] && new_mac=""
|
||||||
|
|
||||||
if [ -n "$new_mac" ] && [ "$new_mac" != "restore" ]; then
|
[ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
|
||||||
x_ make -C util/nvmutil clean
|
x_ make -C util/nvmutil clean && x_ make -C util/nvmutil
|
||||||
x_ make -C util/nvmutil
|
|
||||||
fi
|
|
||||||
|
|
||||||
check_release "$archive" || $err "'$archive' is not a release archive"
|
check_release "$archive" || $err "'$archive' is not a release archive"
|
||||||
|
|
||||||
@@ -510,11 +506,10 @@ insert()
|
|||||||
|
|
||||||
_offset=""
|
_offset=""
|
||||||
|
|
||||||
if [ "$_t" = "fsp" ]; then
|
if [ "$_t" = "fsp" ] && [ $# -gt 3 ]; then
|
||||||
[ $# -gt 3 ] && _offset="$4"
|
_offset="$4"
|
||||||
else
|
elif [ $# -gt 3 ] && _offset="-b $4" && [ -z "$4" ]; then
|
||||||
[ $# -gt 3 ] && _offset="-b $4" && [ -z "$4" ] && \
|
$err "insert $*, $rom: offset given but empty (undefined)"
|
||||||
$err "insert $*, $rom: offset given but empty (undefined)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ "$nukemode" = "nuke" ] || x_ e "$_dest" f
|
[ "$nukemode" = "nuke" ] || x_ e "$_dest" f
|
||||||
@@ -551,10 +546,6 @@ modify_mac()
|
|||||||
|
|
||||||
printf "\nGbE NVM written to '%s':\n" "$archive"
|
printf "\nGbE NVM written to '%s':\n" "$archive"
|
||||||
x_ "$nvm" "$xbmklocal/gbe" dump | grep -v "bytes read from file" || :
|
x_ "$nvm" "$xbmklocal/gbe" dump | grep -v "bytes read from file" || :
|
||||||
|
|
||||||
[ "$new_mac" = "restore" ] && \
|
|
||||||
printf "\nDefault GbE file '%s' written, unmodified.\n" \
|
|
||||||
"${CONFIG_GBE_BIN_PATH##*../}"; :
|
|
||||||
}
|
}
|
||||||
|
|
||||||
newmac()
|
newmac()
|
||||||
|
|||||||
Reference in New Issue
Block a user