From d727222702b48c3bad912de383de12fba145ce6a Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 21 Jun 2011 12:35:57 -0500 Subject: [PATCH] scripts: merge tweak files Signed-off-by: Robert Nelson --- mk_mmc.sh | 12 ++++- ...squeeze-tweaks.diff => debian-tweaks.diff} | 22 +++++---- scripts/maverick-tweaks.diff | 49 ------------------- .../{natty-tweaks.diff => ubuntu-tweaks.diff} | 5 +- 4 files changed, 27 insertions(+), 61 deletions(-) rename scripts/{squeeze-tweaks.diff => debian-tweaks.diff} (89%) delete mode 100644 scripts/maverick-tweaks.diff rename scripts/{natty-tweaks.diff => ubuntu-tweaks.diff} (94%) diff --git a/mk_mmc.sh b/mk_mmc.sh index 3038630..ee6afc7 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -429,7 +429,17 @@ fi #exit cd ${TEMPDIR}/initrd-tree/ - sudo patch -p1 < ${DIR}/scripts/${DIST}-tweaks.diff + case "$DIST" in + maverick) + sudo patch -p1 < ${DIR}/scripts/ubuntu-tweaks.diff + ;; + natty) + sudo patch -p1 < ${DIR}/scripts/ubuntu-tweaks.diff + ;; + squeeze) + sudo patch -p1 < ${DIR}/scripts/debian-tweaks.diff + ;; + esac cd ${DIR}/ case "$DIST" in diff --git a/scripts/squeeze-tweaks.diff b/scripts/debian-tweaks.diff similarity index 89% rename from scripts/squeeze-tweaks.diff rename to scripts/debian-tweaks.diff index 9e78c7a..0df103e 100644 --- a/scripts/squeeze-tweaks.diff +++ b/scripts/debian-tweaks.diff @@ -3,7 +3,7 @@ new file mode 100755 index 0000000..6d06fc7 --- /dev/null +++ b/usr/lib/finish-install.d/08rcn-omap -@@ -0,0 +1,40 @@ +@@ -0,0 +1,44 @@ +#!/bin/sh -e +cp /etc/e2fsck.conf /target/etc/e2fsck.conf + @@ -15,20 +15,14 @@ index 0000000..6d06fc7 + rm -f /tmp/mmc/boot.scr || true + rm -f /tmp/mmc/uInitrd.net || true + -+ #install deb and create uInitrd ++ #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 -+ 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 + -+ #Setup for final install ++ #Use the final boot files + mv /tmp/mmc/user.scr /tmp/mmc/boot.scr + mv /tmp/mmc/uImage.net /tmp/mmc/uImage + -+ sync -+ umount /tmp/mmc -+ + mkdir -p /target/boot/uboot + echo "/dev/mmcblk0p1 /boot/uboot auto defaults 0 0" >> /target/etc/fstab + @@ -42,5 +36,15 @@ index 0000000..6d06fc7 + 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 ++ umount /target/sys ++ ++ sync ++ umount /tmp/mmc +fi + diff --git a/scripts/maverick-tweaks.diff b/scripts/maverick-tweaks.diff deleted file mode 100644 index 6c98236..0000000 --- a/scripts/maverick-tweaks.diff +++ /dev/null @@ -1,49 +0,0 @@ -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,43 @@ -+#!/bin/sh -e -+cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf -+cp /etc/ttyO2.conf /target/etc/init/ttyO2.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 -+ -+ #Cleanup Ubuntu's mess -+ rm -f /tmp/mmc/uInitrd || true -+ rm -f /tmp/mmc/uInitrd.bak || true -+ rm -f /tmp/mmc/uImage || true -+ rm -f /tmp/mmc/uImage.bak || true -+ -+ #install deb and create uInitrd -+ 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 -+ 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 -+ -+ #Setup for final install -+ mv /tmp/mmc/user.scr /tmp/mmc/boot.scr -+ mv /tmp/mmc/uImage.net /tmp/mmc/uImage -+ -+ sync -+ umount /tmp/mmc -+ -+ 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 -+ -+ cp -r /lib/firmware/ /target/lib/ -+ -+ rm -f /etc/rcn.conf -+fi -+ diff --git a/scripts/natty-tweaks.diff b/scripts/ubuntu-tweaks.diff similarity index 94% rename from scripts/natty-tweaks.diff rename to scripts/ubuntu-tweaks.diff index a3116b9..e494a5a 100644 --- a/scripts/natty-tweaks.diff +++ b/scripts/ubuntu-tweaks.diff @@ -22,11 +22,11 @@ index 0000000..6d06fc7 + rm -f /tmp/mmc/uImage || true + rm -f /tmp/mmc/uImage.bak || true + -+ #install deb and create uInitrd ++ #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 + -+ #Setup for final install ++ #Use the final boot files + mv /tmp/mmc/user.scr /tmp/mmc/boot.scr + mv /tmp/mmc/uImage.net /tmp/mmc/uImage + @@ -40,6 +40,7 @@ index 0000000..6d06fc7 + + 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