Add misc partition, identify root by PARTUUID

- Add back the misc partiton: fastboot stores boot data here for stuff
like reboot-bootloader
- Update kernel cmdline and fstab to mount / by GPT PARTUUID: now we
should be able to move that partition around freely, as needed.

Change-Id: If24c293671dbefda008184684f46e6796357296a
diff --git a/boot.txt b/boot.txt
index d602c64..5798938 100644
--- a/boot.txt
+++ b/boot.txt
@@ -2,7 +2,7 @@
 fdt_file=fsl-imx8mq-phanbell.dtb
 image=Image
 script=boot.scr
-cmdline="console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 root=/dev/mmcblk${bootdev}p2 rootfstype=ext4 rw rootwait init=/sbin/init"
+cmdline="console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 root=PARTUUID=70672ec3-5eee-49ff-b3b1-eb1fbd406bf5 rootfstype=ext4 rw rootwait init=/sbin/init"
 
 fatload mmc ${bootdev}:1 ${loadaddr} ${image}
 fatload mmc ${bootdev}:1 ${fdt_addr} ${fdt_file}
diff --git a/flash.sh b/flash.sh
index 8fa6b31..f565624 100755
--- a/flash.sh
+++ b/flash.sh
@@ -8,6 +8,7 @@
 fastboot flash bootloader0 ${PRODUCT_OUT}/u-boot.imx
 fastboot flash gpt ${PRODUCT_OUT}/partition-table.img
 fastboot reboot-bootloader
+fastboot erase misc
 fastboot flash boot ${PRODUCT_OUT}/boot.img
 fastboot flash rootfs ${PRODUCT_OUT}/rootfs.img
 fastboot reboot
diff --git a/overlay/etc/fstab b/overlay/etc/fstab
index 7264471..ede8bce 100644
--- a/overlay/etc/fstab
+++ b/overlay/etc/fstab
@@ -1,5 +1,5 @@
 /dev/mmcblk1p1	/boot	vfat	defaults	0	0
-/dev/mmcblk1p2	/	ext4	defaults,discard,noatime,nodiratime	0	1
+PARTUUID=70672ec3-5eee-49ff-b3b1-eb1fbd406bf5	/	ext4	defaults,discard,noatime,nodiratime	0	1
 
 none	/proc	proc	defaults	0	0
 none	/sys	sysfs	defaults	0	0
diff --git a/partition-table.bpt b/partition-table.bpt
index 16631f9..13b7212 100644
--- a/partition-table.bpt
+++ b/partition-table.bpt
@@ -22,9 +22,23 @@
       "position": 1
     },
     {
-      "label": "rootfs",
+      "label": "misc",
       "offset": 41943040,
-      "size": 12834570240,
+      "size": 1048576,
+      "grow": false,
+      "guid": "8d34ae73-b586-4f9a-b0e8-ec448b882071",
+      "type_guid": "6b2378b0-0fbc-4aa9-a4f6-4d6e17281c47",
+      "flags": "0x0000000000000000",
+      "persist": false,
+      "ignore": false,
+      "ab": false,
+      "ab_expanded": false,
+      "position": 2
+    },
+    {
+      "label": "rootfs",
+      "offset": 50331648,
+      "size": 12826181632,
       "grow": true,
       "guid": "70672ec3-5eee-49ff-b3b1-eb1fbd406bf5",
       "type_guid": "0f2778c4-5cc1-4300-8670-6c88b7e57ed6",
@@ -33,7 +47,7 @@
       "ignore": false,
       "ab": false,
       "ab_expanded": false,
-      "position": 2
+      "position": 3
     }
   ]
 }