inject.sh: simplified MAC address handling

Signed-off-by: Leah Rowe <leah@libreboot.org>
25.04_branch
Leah Rowe 2025-05-07 17:00:41 +01:00
parent 3900122957
commit 2f17c5be3b
1 changed files with 1 additions and 6 deletions

View File

@ -107,7 +107,7 @@ patch_release_roms()
"'$archive': vendorfile insertion unsupported; $dontflash"
done
[ -z "$new_mac" ] || modify_mac || printf "\nGbE not defined\n" 1>&2
[ -z "$new_mac" ] || [ -z "$CONFIG_GBE_BIN_PATH" ] || modify_mac
[ "$xchanged" = "y" ] || rm -Rf "$tmpromdel" || :
[ "$xchanged" = "y" ] || return 0
@ -122,16 +122,11 @@ patch_release_roms()
modify_mac()
{
[ -n "$CONFIG_GBE_BIN_PATH" ] || return 1
x_ cp "${CONFIG_GBE_BIN_PATH##*../}" "$xbmklocal/gbe"
[ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
x_ "$nvm" "$xbmklocal/gbe" setmac "$new_mac"
fx_ newmac x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
printf "\nGbE NVM written to '%s':\n" "$archive"
x_ "$nvm" "$xbmklocal/gbe" dump | grep -v "bytes read from file" || :
}
newmac()