inject.sh: simplified MAC address handling
Signed-off-by: Leah Rowe <leah@libreboot.org>25.04_branch
parent
3900122957
commit
2f17c5be3b
|
@ -107,7 +107,7 @@ patch_release_roms()
|
||||||
"'$archive': vendorfile insertion unsupported; $dontflash"
|
"'$archive': vendorfile insertion unsupported; $dontflash"
|
||||||
done
|
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" ] || rm -Rf "$tmpromdel" || :
|
||||||
[ "$xchanged" = "y" ] || return 0
|
[ "$xchanged" = "y" ] || return 0
|
||||||
|
@ -122,16 +122,11 @@ patch_release_roms()
|
||||||
|
|
||||||
modify_mac()
|
modify_mac()
|
||||||
{
|
{
|
||||||
[ -n "$CONFIG_GBE_BIN_PATH" ] || return 1
|
|
||||||
|
|
||||||
x_ cp "${CONFIG_GBE_BIN_PATH##*../}" "$xbmklocal/gbe"
|
x_ cp "${CONFIG_GBE_BIN_PATH##*../}" "$xbmklocal/gbe"
|
||||||
[ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
|
[ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
|
||||||
x_ "$nvm" "$xbmklocal/gbe" setmac "$new_mac"
|
x_ "$nvm" "$xbmklocal/gbe" setmac "$new_mac"
|
||||||
|
|
||||||
fx_ newmac x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
|
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()
|
newmac()
|
||||||
|
|
Loading…
Reference in New Issue