summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-12-09 01:42:49 (EST)
committer P. J. McDermott <pj@pehjota.net>2014-12-09 01:43:36 (EST)
commit54db98dee932f18f21c6234adb87b4f20dfcb282 (patch)
tree597c970d92b3dbe4f8414cf7b0cd140ded7eb903
parent2c4802ca372a3617b25b13bd94b08e019e4c58d9 (diff)
Extract MLO and u-boot.bin from .deb archives
debootstrap doesn't unpack extra packages in the first stage.
-rwxr-xr-xdebeagle.sh12
1 files changed, 8 insertions, 4 deletions
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