diff --git a/init_scripts/generic-debian.sh b/init_scripts/generic-debian.sh
index e4d0af785a89c57a130915c2536f85b5c7ee176a..039b010a792455ae0b6f89f0f30e909c23d1c85e 100644
--- a/init_scripts/generic-debian.sh
+++ b/init_scripts/generic-debian.sh
@@ -53,14 +53,12 @@ start|reload|force-reload|restart)
 		fi
 	fi
 
-	#if [ -f /usr/local/bin/node ] && [ -f /opt/cloud9/server.js ] ; then
-		#/usr/local/bin/node /opt/cloud9/server.js -l 0.0.0.0 -w /var/lib/cloud9 -p 3000 >/opt/cloud9/log 2>&1 &
-	#fi
-
-	#if [ -f /opt/cloud9/bin/cloud9.sh ] ; then
-		#/opt/cloud9/bin/cloud9.sh -l 0.0.0.0 -w /var/lib/cloud9 -p 3000 >/opt/cloud9/log 2>&1 &
-	#fi
-
+	if [ -f /boot/uboot/flash-eMMC.txt ] ; then
+		if [ -f /opt/scripts/beaglebone-black-eMMC-flasher.sh ] ; then
+			mkdir -p /boot/uboot/debug/
+			/bin/bash /opt/scripts/beaglebone-black-eMMC-flasher.sh >/boot/uboot/debug/flash-eMMC.log 2>&1
+		fi
+	fi
 	;;
 stop)
 	exit 0
diff --git a/init_scripts/generic-ubuntu.conf b/init_scripts/generic-ubuntu.conf
index 9ec99027bc00aedee703b929ffce3c9b31d698d0..541293b3f77976c5606d861a945486c05958e6de 100644
--- a/init_scripts/generic-ubuntu.conf
+++ b/init_scripts/generic-ubuntu.conf
@@ -42,4 +42,11 @@ if [ -f /boot/uboot/SOC.sh ] && [ -f /boot/uboot/run_boot-scripts ] ; then
 		/bin/sh /opt/boot-scripts/${board}.sh >/dev/null 2>&1 &
 	fi
 fi
+
+if [ -f /boot/uboot/flash-eMMC.txt ] ; then
+	if [ -f /opt/scripts/beaglebone-black-eMMC-flasher.sh ] ; then
+		mkdir -p /boot/uboot/debug/
+		/bin/bash /opt/scripts/beaglebone-black-eMMC-flasher.sh >/boot/uboot/debug/flash-eMMC.log 2>&1
+	fi
+fi
 end script
diff --git a/scripts/chroot.sh b/scripts/chroot.sh
index b422b0bb3a0910b90524d2fc51423bc0e5a0981c..970350af1d4552a62f84ff49e4ed6b3c8e1f03af 100755
--- a/scripts/chroot.sh
+++ b/scripts/chroot.sh
@@ -766,6 +766,9 @@ if [ "x${chroot_enable_xorg}" = "xenable" ] ; then
 	sudo mv /tmp/${wfile} ${tempdir}/etc/X11/${wfile}
 fi
 
+sudo mkdir -p ${tempdir}/opt/scripts/ || true
+sudo cp -v ${DIR}/device_scripts/*.sh ${tempdir}/opt/scripts/
+
 if [ -d ${DIR}/deploy/${export_filename}/ ] ; then
 	rm -rf ${DIR}/deploy/${export_filename}/ || true
 fi