mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 04:57:55 +00:00
copy file and compute sha256 before flashing
This commit is contained in:
parent
7a9ab72144
commit
84f1d0af39
@ -1,4 +1,13 @@
|
||||
#!/bin/sh
|
||||
. /etc/functions
|
||||
|
||||
ROM="$1"
|
||||
if [ -z "$1" ]; then
|
||||
die "Usage: $0 /media/x230.rom"
|
||||
fi
|
||||
|
||||
cp "$ROM" /tmp/x230.rom
|
||||
sha256sum /tmp/x230.rom
|
||||
|
||||
flashrom \
|
||||
--force \
|
||||
@ -6,4 +15,8 @@ flashrom \
|
||||
--programmer internal \
|
||||
--layout /etc/x230-layout.txt \
|
||||
--image BIOS \
|
||||
-w "$*"
|
||||
-w /tmp/x230.rom \
|
||||
|| die "$ROM: Flash failed"
|
||||
|
||||
warn "Reboot and hopefully it works..."
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user