Re-add the flashrom script for kgpe-d16-openbmc

This commit is contained in:
Kyle Rankin 2018-05-11 14:23:48 -07:00
parent 3c88bc5d86
commit b276e355d9
No known key found for this signature in database
GPG Key ID: 555577116BFA74B9
2 changed files with 16 additions and 3 deletions

View File

@ -16,9 +16,6 @@ case "$CONFIG_BOARD" in
"kgpe-d16" )
FLASHROM_OPTIONS='--force --noverify --programmer internal'
;;
"kgpe-d16-openbmc" )
FLASHROM_OPTIONS='--programmer="ast1100:spibus=2,cpu=reset" -c "S25FL128P......0"'
;;
* )
die "ERROR: No board has been configured!\n\nEach board requires specific flashrom options and it's unsafe to flash without them.\n\nAborting."
;;

View File

@ -0,0 +1,16 @@
#!/bin/sh
. /etc/functions
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