 +		cp $PATH_TO_SDBOOT/uEnv.txt $PATH_TO_SDROOTFS/image
 +		echo "uEnv.txt copied"
 +	fi
-+	
-+	cp $START_DIR/initramfs.tar.xz $PATH_TO_SDROOTFS/image/initramfs.tar.xz
++
++	mv $START_DIR/initramfs.tar.xz $PATH_TO_SDROOTFS/image/initramfs.tar.xz
 +	echo "initramfs.tar.xz copied"
 +
 +echo ""

 echo ""
 echo ""
 echo "Syncing..."
@@ -1096,10 +1254,66 @@ 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
+	if [ "$BOOTIMG" != "" ] ; then
+		cp $PATH_TO_SDBOOT/u-boot.img $PATH_TO_SDROOTFS/image
+		echo "u-boot.img copied"
+	elif [ "$BOOTBIN" != "" ] ; then
+		cp $PATH_TO_SDBOOT/u-boot.bin $PATH_TO_SDROOTFS/image
+		echo "u-boot.bin copied"
+	else
+		echo "No U-Boot file found"
