heads/initrd/bin/flashrom-kgpe-d16-openbmc.sh
Thierry Laurion 8da5d5d723
Add dual support for real bash and busybox's bash(ash)
- modify bash to have it configured with -Os
2023-03-08 12:45:44 -05:00

19 lines
411 B
Bash
Executable File

#!/bin/bash
. /etc/functions
TRACE "Under /bin/flashrom-kgpe-d16-openbmc.sh"
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..."
exit 0