From 174a00275298304b6c6cee70f1aacbcc5979d064 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 09 Dec 2014 03:42:39 -0500 Subject: Extract kernel and make a U-Boot image --- diff --git a/debeagle.sh b/debeagle.sh index 357f788..1d816d6 100755 --- a/debeagle.sh +++ b/debeagle.sh @@ -231,6 +231,7 @@ install_debian() local boot_mp='' local root_mp='' local archives='' + local linux_version='' case "${target}" in /dev/mmcblk*) part_prefix='p';; @@ -258,6 +259,16 @@ install_debian() optargs="consoleblank=0" console="tty0 console=ttyS2,115200n8" EOF + linux_version="$(printf '%s\n' \ + "${archives}/"linux-image-*-armmp_*_armhf.deb | sed \ + "s|^${archives}/linux-image-\\(.*-armmp\\)_.*\$|\1|")" + ar p "${archives}/"linux-image-*-armmp_*_armhf.deb data.tar.xz | \ + tar -xJO "./boot/vmlinuz-${linux_version}" \ + >"${boot_mp}/vmlinuz" + mkimage -A arm -O linux -T kernel -C none \ + -a 0x80008000 -e 0x80008000 -n "Linux ${linux_version}" \ + -d "${boot_mp}/vmlinuz" "${root_mp}/boot/uImage" + cp "${root_mp}/boot/uImage" "${boot_mp}/uImage" umount "${boot_mp}" umount "${root_mp}" -- cgit v0.9.1