2023-02-08 21:01:48 +00:00
|
|
|
#!/bin/bash
|
2018-03-01 05:40:46 +00:00
|
|
|
. /etc/functions
|
|
|
|
|
2024-02-01 19:30:31 +00:00
|
|
|
TRACE_FUNC
|
2023-02-18 17:58:43 +00:00
|
|
|
|
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
|
|
|
|
|
2024-09-08 13:51:33 +00:00
|
|
|
flashprog --programmer="ast1100:spibus=2,cpu=reset" -c "S25FL128P......0" -w /tmp/kgpe-d16-openbmc.rom \
|
2018-03-01 05:40:46 +00:00
|
|
|
|| die "$ROM: Flash failed"
|
|
|
|
|
2023-08-22 18:34:29 +00:00
|
|
|
warn "Reboot and hopefully it works"
|
2018-03-01 05:40:46 +00:00
|
|
|
exit 0
|