From a24e1a0654e31fd08f1fb6b66f752df7696ed5f3 Mon Sep 17 00:00:00 2001 From: ficus Date: Sun, 18 Nov 2012 22:46:11 +0100 Subject: clean up kernel mangling scripts --- config/hooks/kernel-image.sh.binary | 7 ------- config/hooks/kernel-image.sh.chroot | 25 +++++++++++++------------ 2 files changed, 13 insertions(+), 19 deletions(-) delete mode 100755 config/hooks/kernel-image.sh.binary (limited to 'config') 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 -- cgit v1.2.3