Read partitions from pnor.
Change-Id: I9300baf5060ac95445f715b4a0db9201dc023c04
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/generate-squashfs b/generate-squashfs
index 0c8d852..1207684 100755
--- a/generate-squashfs
+++ b/generate-squashfs
@@ -10,6 +10,28 @@
-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
@@ -23,3 +45,9 @@
;;
esac
done
+
+for partition in "${partitions[@]}"; do
+ echo "Reading ${partition}..."
+ pflash_cmd="pflash --partition=${partition} --read=/tmp/${partition}"
+ ${pflash_cmd} || exit 1
+done