  echo ""
  echo ""
  echo "Syncing..."
-@@ -1096,10 +1254,66 @@ then
+@@ -1096,10 +1254,64 @@ then
  
  fi
  

+	echo "rootfs.tar.xz copied"
+	[ -f ./mk-eMMC-boot.sh ] && cp -a mk-eMMC-boot.sh  $PATH_TO_SDROOTFS/mk_inand
+	# Copy Image to dest directory
+	cp $PATH_TO_SDBOOT/u-boot.img $PATH_TO_SDROOTFS/image
+
+	if [ "$BOOTIMG" != "" ] ; then
+		cp $PATH_TO_SDBOOT/u-boot.img $PATH_TO_SDBOOT/image
+		echo "u-boot.img copied"
+	elif [ "$BOOTBIN" != "" ] ; then
+		cp $PATH_TO_SDBOOT/u-boot.bin $PATH_TO_SDBOOT/image
+		echo "u-boot.bin copied"
+	else
+		echo "No U-Boot file found"

 
 sudo mount -t vfat ${DRIVE}${P}1 boot/
 sudo mount -t ext3 ${DRIVE}${P}2 rootfs/
+if [ "$PARTS" -eq "5" ]
+then
+sudo mount -t ext3 ${DRIVE}${P}3 initramfs/
+fi
