You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
netinstall/scripts/beagle-erase-nand-and-copy-...

29 lines
810 B

diff --git a/lib/chroot-setup.sh b/lib/chroot-setup.sh
index 629f541..c5fbc37 100644
--- a/lib/chroot-setup.sh
+++ b/lib/chroot-setup.sh
@@ -122,6 +122,23 @@ chroot_cleanup () {
mv /target/sbin/initctl.REAL /target/sbin/initctl
fi
+ if [ -e /target/boot/initrd.img ]; then
+ /usr/sbin/flash_eraseall /dev/mtd2
+ fi
+
+
+ if [ -e /etc/rcn.conf ]; then
+ mkdir -p /tmp/mmc
+ mount /dev/mmcblk0p1 /tmp/mmc
+ cp /tmp/mmc/boot.scr /tmp/mmc/netinstall.scr
+ cp /tmp/mmc/normal.scr /tmp/mmc/boot.scr
+ cp /tmp/mmc/uInitrd /tmp/mmc/uInitrd.net
+ cp /tmp/mmc/uInitrd.final /tmp/mmc/uInitrd
+ rm -f /etc/rcn.conf
+ umount /tmp/mmc
+ fi
+
+
# Undo the mounts done by the packages during installation.
# Reverse sorting to umount the deepest mount points first.
# Items with count of 1 are new.