From 1305a2f8e8ed575e57fc1e3e7353f9a50f48171e Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 08 Dec 2014 23:48:45 -0500 Subject: Install Debian and the MLO and u-boot.img loaders --- diff --git a/debeagle.sh b/debeagle.sh index 1a35986..ffe4b82 100644 --- a/debeagle.sh +++ b/debeagle.sh @@ -53,6 +53,7 @@ main() esac make_parts_and_fs "${target}" + install_debian "${mirror}" "${suite}" "${target}" } print_usage() @@ -221,4 +222,37 @@ make_parts_and_fs() mke2fs -t ext2 "${target}${part_prefix}2" } +install_debian() +{ + local mirror="${1}" + local suite="${2}" + local target="${3}" + local part_prefix='' + local boot_mp='' + local root_mp='' + + case "${target}" in + /dev/mmcblk*) part_prefix='p';; + esac + boot_mp="$(mktemp -d)" + root_mp="$(mktemp -d)" + mount -o 'iocharset=iso8859-1' "${target}${part_prefix}1" "${boot_mp}" + mount "${target}${part_prefix}2" "${root_mp}" + + debootstrap --arch=armhf --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" + cat >"${boot_mp}/uEnv.txt" <<-EOF + mpurate=1000 + + dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M" + vram=16M + optargs="consoleblank=0" + console="tty0 console=ttyS2,115200n8" + EOF +} + main "${@}" -- cgit v0.9.1