aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-11-18 22:46:11 +0100
committerficus <ficus@robocracy.org>2012-11-18 23:34:27 +0100
commita24e1a0654e31fd08f1fb6b66f752df7696ed5f3 (patch)
tree90b96b5bd1b719254bc37ad50845b2a1b2d58201
parent1ad286b1daf8515d1532ae5fa6453e1cab0f174d (diff)
downloadtorouter-live-a24e1a0654e31fd08f1fb6b66f752df7696ed5f3.tar.gz
torouter-live-a24e1a0654e31fd08f1fb6b66f752df7696ed5f3.zip
clean up kernel mangling scripts
-rwxr-xr-xconfig/hooks/kernel-image.sh.binary7
-rwxr-xr-xconfig/hooks/kernel-image.sh.chroot25
2 files changed, 13 insertions, 19 deletions
diff --git a/config/hooks/kernel-image.sh.binary b/config/hooks/kernel-image.sh.binary
deleted file mode 100755
index d4618dc..0000000
--- a/config/hooks/kernel-image.sh.binary
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-set -e
-
-echo "re-copying kernel and initrd from chroot..."
-cp chroot/boot/uImage binary/live/
-cp chroot/boot/uInitrd binary/live/
diff --git a/config/hooks/kernel-image.sh.chroot b/config/hooks/kernel-image.sh.chroot
index 67059c4..2c15971 100755
--- a/config/hooks/kernel-image.sh.chroot
+++ b/config/hooks/kernel-image.sh.chroot
@@ -4,20 +4,17 @@ set -e
# TODO: this seems to be a null-op... flash-kernel is symlinked to `true`?
echo "Trying to flashing kernel..."
-/usr/sbin/flash-kernel || echo "Failed to flash kernel! Don't worry, will mangle"
+#/usr/sbin/flash-kernel || echo "Failed to flash kernel! Don't worry, will mangle"
+/usr/sbin/flash-kernel
echo "Mangling kernel..."
-
-# XXX: temporary
-cp /boot/initrd.img-* /boot/initrd.img
-
-#mkdir /tmp/initrd-repack
-#(cd /tmp/initrd-repack ; \
-# zcat /boot/initrd.img-* | cpio -i ; \
-# rm -f conf/param.conf ; \
-# find . | cpio --quiet -o -H newc | \
-# gzip -9 > /boot/initrd.img)
-#rm -rf /tmp/initrd-repack
+mkdir /tmp/initrd-repack
+(cd /tmp/initrd-repack ; \
+ zcat /boot/initrd.img-* | cpio -i ; \
+ rm -f conf/param.conf ; \
+ find . | cpio --quiet -o -H newc | \
+ gzip -9 > /boot/initrd.img)
+rm -rf /tmp/initrd-repack
(cd /boot ; \
cp /usr/lib/linux-image-*/kirkwood-dreamplug.dtb dtb ; \
@@ -28,3 +25,7 @@ cp /boot/initrd.img-* /boot/initrd.img
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 \
-n "Debian ramdisk (unknown version)" \
-d initrd.img uInitrd )
+
+echo "Creating /live and copying in boot images..."
+mkdir /live
+cp /boot/uInitrd /boot/uImage /boot/dtb /live