heads/initrd/bin/flashrom-kgpe-d16-openbmc.sh
Thierry Laurion 8259d3ca1e
Add TRACE function tracing function to output on console when enabled
- Add TRACE function tracing output under etc/functions, depending on CONFIG_ENABLE_FUNCTION_TRACING_OUTPUT enabled in board configs
- Replace current DEBUG to TRACE calls in code, reserving DEBUG calls for more verbose debugging later on (output of variables etc)
- add 'export CONFIG_ENABLE_FUNCTION_TRACING_OUTPUT=y' in qemu-coreboot(fb)whiptail-tpm1(-hotp) boards to see it in action
2023-02-20 11:44:52 -05:00

19 lines
409 B
Bash
Executable File

#!/bin/sh
. /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