From 99be05ed822881904002a4aa14895d8e8b8d6005 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Fri, 25 Mar 2011 09:51:18 -0500 Subject: [PATCH] cleanup: patches are more readable/maintainable Signed-off-by: Robert Nelson --- scripts/maverick-tweaks.diff | 16 +++++++++++----- scripts/natty-tweaks.diff | 16 +++++++++++----- scripts/squeeze-tweaks.diff | 14 ++++++++++---- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/scripts/maverick-tweaks.diff b/scripts/maverick-tweaks.diff index bbb6587..6c98236 100644 --- a/scripts/maverick-tweaks.diff +++ b/scripts/maverick-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,37 @@ +@@ -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 @@ -11,22 +11,28 @@ index 0000000..6d06fc7 +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 -+ mv /tmp/mmc/user.scr /tmp/mmc/boot.scr + rm -f /tmp/mmc/uInitrd.net || true + -+ #Thank You Ubuntu; arrrggg!!! ++ #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 + -+ mv /tmp/mmc/uImage.net /tmp/mmc/uImage ++ #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 -+ rm -f /tmp/mmc/linux-image-*_1.0*_armel.deb || true ++ ++ #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 + diff --git a/scripts/natty-tweaks.diff b/scripts/natty-tweaks.diff index bbb6587..6c98236 100644 --- a/scripts/natty-tweaks.diff +++ b/scripts/natty-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,37 @@ +@@ -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 @@ -11,22 +11,28 @@ index 0000000..6d06fc7 +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 -+ mv /tmp/mmc/user.scr /tmp/mmc/boot.scr + rm -f /tmp/mmc/uInitrd.net || true + -+ #Thank You Ubuntu; arrrggg!!! ++ #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 + -+ mv /tmp/mmc/uImage.net /tmp/mmc/uImage ++ #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 -+ rm -f /tmp/mmc/linux-image-*_1.0*_armel.deb || true ++ ++ #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 + diff --git a/scripts/squeeze-tweaks.diff b/scripts/squeeze-tweaks.diff index b5d0a54..9e78c7a 100644 --- a/scripts/squeeze-tweaks.diff +++ b/scripts/squeeze-tweaks.diff @@ -3,23 +3,29 @@ new file mode 100755 index 0000000..6d06fc7 --- /dev/null +++ b/usr/lib/finish-install.d/08rcn-omap -@@ -0,0 +1,34 @@ +@@ -0,0 +1,40 @@ +#!/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 -+ mv /tmp/mmc/user.scr /tmp/mmc/boot.scr + rm -f /tmp/mmc/uInitrd.net || true + -+ mv /tmp/mmc/uImage.net /tmp/mmc/uImage ++ #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 -+ rm -f /tmp/mmc/linux-image-*_1.0*_armel.deb || true ++ ++ #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 +