|
|
|
diff --git a/usr/lib/finish-install.d/08rcn-omap b/usr/lib/finish-install.d/08rcn-omap
|
|
|
|
new file mode 100755
|
|
|
|
index 0000000..6d06fc7
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/usr/lib/finish-install.d/08rcn-omap
|
|
|
|
@@ -0,0 +1,45 @@
|
|
|
|
+#!/bin/sh -e
|
|
|
|
+cp /etc/e2fsck.conf /target/etc/e2fsck.conf
|
|
|
|
+
|
|
|
|
+if [ -e /etc/rcn.conf ]; then
|
|
|
|
+ mkdir -p /tmp/mmc
|
|
|
|
+ mount /dev/mmcblk0p1 /tmp/mmc
|
|
|
|
+
|
|
|
|
+ #Remove NetInstall bits
|
|
|
|
+ rm -f /tmp/mmc/boot.scr || true
|
|
|
|
+ rm -f /tmp/mmc/uInitrd.net || true
|
|
|
|
+
|
|
|
|
+ #Install kernel image deb
|
|
|
|
+ LD_LIBRARY_PATH=/target/lib /target/usr/bin/dpkg-deb -x /tmp/mmc/linux-image-*_1.0*_armel.deb /target/
|
|
|
|
+ rm -f /tmp/mmc/linux-image-*_1.0*_armel.deb || true
|
|
|
|
+
|
|
|
|
+ #Use the final boot files
|
|
|
|
+ mv /tmp/mmc/user.scr /tmp/mmc/boot.scr
|
|
|
|
+
|
|
|
|
+ mkdir -p /target/boot/uboot
|
|
|
|
+ echo "/dev/mmcblk0p1 /boot/uboot auto defaults 0 0" >> /target/etc/fstab
|
|
|
|
+
|
|
|
|
+ #smsc95xx kevent workaround/hack
|
|
|
|
+ echo "vm.min_free_kbytes = 8192" >> /target/etc/sysctl.conf
|
|
|
|
+
|
|
|
|
+ if [ ! -e /etc/rcn-serial.conf ]; then
|
|
|
|
+ cat /target/etc/inittab | grep SERIAL || echo "S:2345:respawn:/sbin/getty 115200 SERIAL" >> /target/etc/inittab
|
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
+ cp -r /lib/firmware/ /target/lib/
|
|
|
|
+
|
|
|
|
+ rm -f /etc/rcn.conf
|
|
|
|
+
|
|
|
|
+ #Generate new initrd.img-*
|
|
|
|
+ mount -o bind /sys /target/sys
|
|
|
|
+ chroot /target update-initramfs -c -k `uname -r`
|
|
|
|
+ chroot /target mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uInitrd
|
|
|
|
+ cp /target/boot/uInitrd /tmp/mmc/uInitrd
|
|
|
|
+ chroot /target mkimage -A arm -O linux -T kernel -C none -a ZRELADD -e ZRELADD -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uImage
|
|
|
|
+ cp /target/boot/uImage /tmp/mmc/uImage
|
|
|
|
+ umount /target/sys
|
|
|
|
+
|
|
|
|
+ sync
|
|
|
|
+ umount /tmp/mmc
|
|
|
|
+fi
|
|
|
|
+
|