heads/initrd/bin/cbfs.sh
Sergii Dmytruk 5ee3219322
Add cbfs wrapper script to handle PNOR
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2022-11-11 00:59:12 +02:00

11 lines
207 B
Bash
Executable File

#!/bin/sh
set -e -o pipefail
. /etc/functions
. /tmp/config
if pnor "$2" -r HBI > /tmp/pnor.part 2>/dev/null; then
cbfs "$@" -o /tmp/pnor.part && pnor "$2" -w HBI < /tmp/pnor.part
else
cbfs "$@"
fi