blob: 12076846e068ff71045f1c08ef4172cb57d54ec1 [file] [log] [blame]
#!/bin/sh
help=$'Generate SquashFS image Script
Generates a SquashFS image from the PNOR image
usage: generate-squashfs [OPTION]
Options:
-h, --help Display this help text and exit.
'
declare -a partitions=(
"HBB"
"HBEL"
"GUARD"
"HBD"
"DJVPD"
"MVPD"
"CVPD"
"HBI"
"SBE"
"HCODE"
"HBRT"
"PAYLOAD"
"TEST"
"TESTRO"
"HBBL"
"GLOBAL"
"RINGOVD"
"SBKT"
"OCC"
)
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-h|--help)
echo "$help"
exit
;;
*)
echo "Unknown option $1. Display available options with -h or --help"
exit
;;
esac
done
for partition in "${partitions[@]}"; do
echo "Reading ${partition}..."
pflash_cmd="pflash --partition=${partition} --read=/tmp/${partition}"
${pflash_cmd} || exit 1
done