diff options
author | Noe Rubinstein <nrubinstein@avencall.com> | 2012-08-23 17:23:41 +0200 |
---|---|---|
committer | Noe Rubinstein <nrubinstein@avencall.com> | 2012-08-23 17:23:41 +0200 |
commit | 79ec3e7aa1a03b34e04e38b9be40d3597f552cf4 (patch) | |
tree | 03ec06d9dba51ecec0d4a9b3d2b723f88dc3fe6a | |
parent | e04b0ae790fc7b21efbcdc9fafc53e080c8c2521 (diff) |
Fix 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 |