add mmc boot partition along with uinitrd update script

pull/8/head
Robert Nelson 15 years ago committed by Robert Nelson
parent 78cf44c9d1
commit 0062d7e0a4

@ -186,15 +186,7 @@ else
sudo cp -v ${DIR}/scripts/dvi-normal-${DIST}.cmd ${DIR}/disk/boot.cmd sudo cp -v ${DIR}/scripts/dvi-normal-${DIST}.cmd ${DIR}/disk/boot.cmd
fi fi
echo "#!/bin/sh" > /tmp/rebuild_uinitrd.sh sudo cp -v ${DIR}/scripts/rebuild_uinitrd.sh ${DIR}/disk/rebuild_uinitrd.sh
echo "" >> /tmp/rebuild_uinitrd.sh
echo "echo \"This script requires: uboot-mkimage and initramfs-tools installed\"" >> /tmp/rebuild_uinitrd.sh
echo "DIR=\$PWD" >> /tmp/rebuild_uinitrd.sh
echo "sudo update-initramfs -u -k \$(uname -r)" >> /tmp/rebuild_uinitrd.sh
echo "sudo mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-\$(uname -r) \${DIR}/uInitrd" >> /tmp/rebuild_uinitrd.sh
echo "" >> /tmp/rebuild_uinitrd.sh
sudo cp -v /tmp/rebuild_uinitrd.sh ${DIR}/disk/rebuild_uinitrd.sh
sudo chmod +x ${DIR}/disk/rebuild_uinitrd.sh sudo chmod +x ${DIR}/disk/rebuild_uinitrd.sh
cd ${DIR}/disk cd ${DIR}/disk

@ -1,25 +1,32 @@
diff --git a/lib/chroot-setup.sh b/lib/chroot-setup.sh diff --git a/lib/chroot-setup.sh b/lib/chroot-setup.sh
index 61bc6ae..3406f4e 100644 index 61bc6ae..fea0a1b 100644
--- a/lib/chroot-setup.sh --- a/lib/chroot-setup.sh
+++ b/lib/chroot-setup.sh +++ b/lib/chroot-setup.sh
@@ -110,6 +110,9 @@ EOF @@ -110,6 +110,12 @@ EOF
APT_LISTCHANGES_FRONTEND=none APT_LISTCHANGES_FRONTEND=none
export APT_LISTCHANGES_FRONTEND export APT_LISTCHANGES_FRONTEND
+ cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf + cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf
+ cp /etc/e2fsck.conf /target/etc/e2fsck.conf + cp /etc/e2fsck.conf /target/etc/e2fsck.conf
+
+
+
+ +
return 0 return 0
} }
@@ -120,6 +123,23 @@ chroot_cleanup () { @@ -120,6 +126,33 @@ chroot_cleanup () {
mv /target/sbin/initctl.REAL /target/sbin/initctl mv /target/sbin/initctl.REAL /target/sbin/initctl
fi fi
+ if [ -e /target/boot/initrd.img ]; then + if [ -e /target/boot/initrd.img ]; then
+ /usr/sbin/flash_eraseall /dev/mtd2 + /usr/sbin/flash_eraseall /dev/mtd2
+
+
+ fi + fi
+ +
+
+
+ if [ -e /etc/rcn.conf ]; then + if [ -e /etc/rcn.conf ]; then
+ mkdir -p /tmp/mmc + mkdir -p /tmp/mmc
+ mount /dev/mmcblk0p1 /tmp/mmc + mount /dev/mmcblk0p1 /tmp/mmc
@ -27,10 +34,16 @@ index 61bc6ae..3406f4e 100644
+ cp /tmp/mmc/normal.scr /tmp/mmc/boot.scr + cp /tmp/mmc/normal.scr /tmp/mmc/boot.scr
+ cp /tmp/mmc/uInitrd /tmp/mmc/uInitrd.net + cp /tmp/mmc/uInitrd /tmp/mmc/uInitrd.net
+ cp /tmp/mmc/uInitrd.final /tmp/mmc/uInitrd + cp /tmp/mmc/uInitrd.final /tmp/mmc/uInitrd
+ umount /tmp/mmc
+
+ mkdir -p /target/boot/uboot
+ echo "/dev/mmcblk0p1 /boot/uboot auto defaults 0 0" >> /target/etc/fstab
+
+ cp -r /lib/modules/`uname -r`/ /target/lib/modules/ + cp -r /lib/modules/`uname -r`/ /target/lib/modules/
+ cp -r /lib/firmware/ /target/lib/ + cp -r /lib/firmware/ /target/lib/
+ rm -f /etc/rcn.conf + rm -f /etc/rcn.conf
+ umount /tmp/mmc +
+
+ fi + fi
+ +
# Undo the mounts done by the packages during installation. # Undo the mounts done by the packages during installation.

@ -0,0 +1,7 @@
#!/bin/sh
echo "This script requires: uboot-mkimage and initramfs-tools installed"
DIR=$PWD
sudo update-initramfs -u -k $(uname -r)
sudo mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-$(uname -r) ${DIR}/uInitrd

@ -1,20 +1,26 @@
diff --git a/lib/chroot-setup.sh b/lib/chroot-setup.sh diff --git a/lib/chroot-setup.sh b/lib/chroot-setup.sh
index 61bc6ae..bc67b04 100644 index 61bc6ae..a889e23 100644
--- a/lib/chroot-setup.sh --- a/lib/chroot-setup.sh
+++ b/lib/chroot-setup.sh +++ b/lib/chroot-setup.sh
@@ -110,6 +110,8 @@ EOF @@ -110,6 +110,12 @@ EOF
APT_LISTCHANGES_FRONTEND=none APT_LISTCHANGES_FRONTEND=none
export APT_LISTCHANGES_FRONTEND export APT_LISTCHANGES_FRONTEND
+
+ cp /etc/e2fsck.conf /target/etc/e2fsck.conf + cp /etc/e2fsck.conf /target/etc/e2fsck.conf
+
+
+
+ +
return 0 return 0
} }
@@ -120,6 +122,19 @@ chroot_cleanup () { @@ -120,6 +126,27 @@ chroot_cleanup () {
mv /target/sbin/initctl.REAL /target/sbin/initctl mv /target/sbin/initctl.REAL /target/sbin/initctl
fi fi
+
+
+ if [ -e /etc/rcn.conf ]; then + if [ -e /etc/rcn.conf ]; then
+ mkdir -p /tmp/mmc + mkdir -p /tmp/mmc
+ mount /dev/mmcblk0p1 /tmp/mmc + mount /dev/mmcblk0p1 /tmp/mmc
@ -22,10 +28,16 @@ index 61bc6ae..bc67b04 100644
+ cp /tmp/mmc/normal.scr /tmp/mmc/boot.scr + cp /tmp/mmc/normal.scr /tmp/mmc/boot.scr
+ cp /tmp/mmc/uInitrd /tmp/mmc/uInitrd.net + cp /tmp/mmc/uInitrd /tmp/mmc/uInitrd.net
+ cp /tmp/mmc/uInitrd.final /tmp/mmc/uInitrd + cp /tmp/mmc/uInitrd.final /tmp/mmc/uInitrd
+ umount /tmp/mmc
+
+ mkdir -p /target/boot/uboot
+ echo "/dev/mmcblk0p1 /boot/uboot auto defaults 0 0" >> /target/etc/fstab
+
+ cp -r /lib/modules/`uname -r`/ /target/lib/modules/ + cp -r /lib/modules/`uname -r`/ /target/lib/modules/
+ cp -r /lib/firmware/ /target/lib/ + cp -r /lib/firmware/ /target/lib/
+ rm -f /etc/rcn.conf + rm -f /etc/rcn.conf
+ umount /tmp/mmc +
+
+ fi + fi
+ +
# Undo the mounts done by the packages during installation. # Undo the mounts done by the packages during installation.

Loading…
Cancel
Save