  fi;
  
  if [ "${CMDLINE_ADD}" != "" ]; then
-@@ -1512,11 +1513,7 @@ if [ "${write_image_name}" != "" ]; then
+@@ -1512,11 +1512,7 @@ if [ "${write_image_name}" != "" ]; then
  	fi
  fi
  

 echo -n "Making Boot image... ";
 MKBOOTARG+="--kernel ${kernel_image} ";
 MKBOOTARG+="--ramdisk ${ramdisk} ";
@@ -1977,8 +1974,12 @@ if [ "${reuse_systemimg}" = "true" ] || [ "${skip_systemimg}" = "true" ]; then
 elif [ "${rootdev_type}" = "internal" ]; then
 	APP_TAG+="-e s/APPFILE/${localsysfile}/ ";
 	if [ "${target_partname}" = "" -o "${target_partname}" = "APP" ]; then
-		build_fsimg "$localsysfile" "$fillpat" \
-		    "$rootfssize" "$rootfs_type" "$rootfs_dir" "$cmdline";
+    echo "Skipping image build and setting target_partfile to INITRD."
+    # target_partfile=${INITRD}
+    # cp ${INITRD} ./system.img
+    ln -fs ${INITRD} ./system.img
+		#build_fsimg "$localsysfile" "$fillpat" \
+		#    "$rootfssize" "$rootfs_type" "$rootfs_dir" "$cmdline";
 	fi;
 elif [ "${rootdev_type}" = "network" -o "${rootdev_type}" = "external" ]; then
 	APP_TAG+="-e s/APPFILE/${localsysfile}/ ";
-- 
2.27.0


From 922eac9382d7261ea0ef891ab2d8455c9b0db4c5 Mon Sep 17 00:00:00 2001
From: Christian Stewart <christian@paral.in>
Date: Fri, 17 Jul 2020 13:58:43 -0700
Subject: [PATCH] Adjust flash.sh for flashing Buildroot-produced disk image

Signed-off-by: Christian Stewart <christian@paral.in>
---
 flash.sh | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/flash.sh b/flash.sh
index 38c0cbb..b4ed264 100755
--- a/flash.sh
+++ b/flash.sh
@@ -1339,9 +1339,9 @@ elif [ "${target_rootdev}" == "internal" ] || \
 		usage allunknown 1;
 	fi
 
-	cmdline+="root=PARTUUID=${rootfsuuid} rw rootwait rootfstype=ext4 "
+	cmdline+="root=/dev/${target_rootdev} rw rootwait"
 else
-	cmdline+="root=/dev/${target_rootdev} rw rootwait rootfstype=ext4 "
