From 54db98dee932f18f21c6234adb87b4f20dfcb282 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 09 Dec 2014 01:42:49 -0500 Subject: Extract MLO and u-boot.bin from .deb archives debootstrap doesn't unpack extra packages in the first stage. --- diff --git a/debeagle.sh b/debeagle.sh index 5247236..7151cba 100755 --- a/debeagle.sh +++ b/debeagle.sh @@ -230,6 +230,7 @@ install_debian() local part_prefix='' local boot_mp='' local root_mp='' + local archives='' case "${target}" in /dev/mmcblk*) part_prefix='p';; @@ -242,10 +243,13 @@ install_debian() debootstrap --arch=armhf --include=linux-image-armmp,u-boot-omap \ --foreign "${suite}" "${root_mp}" ${mirror} - cp "${root_mp}/usr/lib/u-boot/omap3_beagle/MLO" \ - "${boot_mp}/MLO" - cp "${root_mp}/usr/lib/u-boot/omap3_beagle/u-boot.bin" \ - "${boot_mp}/u-boot.img" + archives="${root_mp}/var/cache/apt/archives" + ar p "${archives}/"linux-image-*-armmp_*_armhf.deb data.tar.xz | \ + tar -xJO ./usr/lib/u-boot/omap3_beagle/MLO \ + >"${boot_mp}/MLO" + ar p "${archives}/"u-boot-omap_*_armhf.deb data.tar.xz | \ + tar -xJO ./usr/lib/u-boot/omap3_beagle/u-boot.bin \ + >"${boot_mp}/u-boot.img" cat >"${boot_mp}/uEnv.txt" <<-EOF mpurate=1000 -- cgit v0.9.1