Get partitions from pflash

Change-Id: Ice9ff3ba6548235d0e69182e9b4527f6bf860863
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/generate-squashfs b/generate-squashfs
index e9eb9e6..200974d 100755
--- a/generate-squashfs
+++ b/generate-squashfs
@@ -12,28 +12,6 @@
    -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"
-)
-
 outfile=`pwd`"/pnor.xz.squashfs"
 
 while [[ $# -gt 0 ]]; do
@@ -55,6 +33,7 @@
 done
 
 scratch_dir=`mktemp -d` || exit 1
+partitions=($(pflash --info | grep ID | awk '{print $2}'))
 
 for partition in "${partitions[@]}"; do
   echo "Reading ${partition}..."