summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-12-09 03:42:39 (EST)
committer P. J. McDermott <pj@pehjota.net>2014-12-09 03:42:39 (EST)
commit174a00275298304b6c6cee70f1aacbcc5979d064 (patch)
treedae80dcc545f9617d93d716dff3b252a6e31eab9
parent7c16851cdbae6adc84d5504f6b05a5d27b741905 (diff)
Extract kernel and make a U-Boot image
-rwxr-xr-xdebeagle.sh11
1 files changed, 11 insertions, 0 deletions
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}"