diff options
Diffstat (limited to 'update_bios.sh')
-rwxr-xr-x[-rw-r--r--] | update_bios.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/update_bios.sh b/update_bios.sh index c42b3e3..d40f41c 100644..100755 --- a/update_bios.sh +++ b/update_bios.sh @@ -4,15 +4,16 @@ set -e : ${FLASHROM:="sudo flashrom -p dediprog"} : ${CBFSTOOL:=cbfstool} -ROM=$0 -OLDROM=$(mktemp) -NEWROM=$(mktemp) -MACS=$(mktemp) +ROM=$1 +OLDROM=$(mktemp --tmpdir coreboot.old.XXXXXXX) +NEWROM=$(mktemp --tmpdir coreboot.new.XXXXXXX) +MACS=$(mktemp --tmpdir xioh_data.XXXXXXX) +NAME=xioh_data $FLASHROM -r $OLDROM -$CBFSTOOL $OLDROM extract macs $MACS +$CBFSTOOL $OLDROM extract $NAME $MACS cp $ROM $NEWROM -$CBFSTOOL $NEWROM add $MACS macs raw 0xfff00000 +$CBFSTOOL $NEWROM add $MACS $NAME raw 0xfff00000 $FLASHROM -w $NEWROM rm $OLDROM $NEWROM $MACS |