blob: 89e5cf524b20f670a5f4b5c011ce85507a1f1c0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/sh
set -e
# This script adds the DreamPlug's device tree file to the kernel image,
# generates uImage and uInitrd style files (for use with u-boot, as opposed to
# syslinux-style images), and moves those files to /live.
echo "Mangling kernel..."
# TBD: is it necessary to do this first stage of mangling which removes the
# conf/param.conf file, which may or may not be clobbering kernel boot
# arguments?
mkdir -p /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 ; \
cat vmlinuz-* dtb >> temp-kernel ; \
mkimage -A arm -O linux -T kernel -n "Debian kernel (unknown version)" \
-C none -a 0x8000 -e 0x8000 -d temp-kernel uImage ; \
rm -f temp-kernel ; \
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 -p /live
cp /boot/uInitrd /boot/uImage /boot/dtb /live
|