heads/initrd/bin/flashrom-kgpe-d16-openbmc.sh

19 lines
408 B
Bash
Raw Normal View History

#!/bin/bash
2018-03-01 05:40:46 +00:00
. /etc/functions
TRACE "Under /bin/flashrom-kgpe-d16-openbmc.sh"
2018-03-01 05:40:46 +00:00
ROM="$1"
if [ -z "$1" ]; then
die "Usage: $0 /media/kgpe-d16-openbmc.rom"
fi
cp "$ROM" /tmp/kgpe-d16-openbmc.rom
sha256sum /tmp/kgpe-d16-openbmc.rom
flashrom --programmer="ast1100:spibus=2,cpu=reset" -c "S25FL128P......0" -w /tmp/kgpe-d16-openbmc.rom \
|| die "$ROM: Flash failed"
warn "Reboot and hopefully it works"
2018-03-01 05:40:46 +00:00
exit 0