blob: 12076846e068ff71045f1c08ef4172cb57d54ec1 [file] [log] [blame]
Gunnar Millse8221902017-02-03 15:59:06 -06001#!/bin/sh
2
3help=$'Generate SquashFS image Script
4
5Generates a SquashFS image from the PNOR image
6
7usage: generate-squashfs [OPTION]
8
9Options:
10 -h, --help Display this help text and exit.
11'
12
Gunnar Mills18f7cdb2017-02-07 16:44:19 -060013declare -a partitions=(
14"HBB"
15"HBEL"
16"GUARD"
17"HBD"
18"DJVPD"
19"MVPD"
20"CVPD"
21"HBI"
22"SBE"
23"HCODE"
24"HBRT"
25"PAYLOAD"
26"TEST"
27"TESTRO"
28"HBBL"
29"GLOBAL"
30"RINGOVD"
31"SBKT"
32"OCC"
33)
34
Gunnar Millse8221902017-02-03 15:59:06 -060035while [[ $# -gt 0 ]]; do
36 key="$1"
37 case $key in
38 -h|--help)
39 echo "$help"
40 exit
41 ;;
42 *)
43 echo "Unknown option $1. Display available options with -h or --help"
44 exit
45 ;;
46 esac
47done
Gunnar Mills18f7cdb2017-02-07 16:44:19 -060048
49for partition in "${partitions[@]}"; do
50 echo "Reading ${partition}..."
51 pflash_cmd="pflash --partition=${partition} --read=/tmp/${partition}"
52 ${pflash_cmd} || exit 1
53done