diff --git a/mk_mmc.sh b/mk_mmc.sh index a8e1671..9dd3663 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -63,9 +63,15 @@ function dl_xload_uboot { ABI="ABI" fi +case "$SYSTEM" in + beagle) + MLO=$(cat ${TEMPDIR}/dl/bootloader | grep "${ABI}:1 MLO" | awk '{print $3}') UBOOT=$(cat ${TEMPDIR}/dl/bootloader | grep "${ABI}:1 UBOOT" | awk '{print $3}') + ;; +esac + wget -c --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MLO} wget -c --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${UBOOT} @@ -642,6 +648,25 @@ function check_mmc { fi } +function check_uboot_type { + IN_VALID_UBOOT=1 + unset DO_UBOOT + +case "$UBOOT_TYPE" in + beagle) + + SYSTEM=beagle + unset IN_VALID_UBOOT + DO_UBOOT=1 + + ;; +esac + + if [ "$IN_VALID_UBOOT" ] ; then + usage + fi +} + function check_distro { IN_VALID_DISTRO=1 @@ -684,6 +709,9 @@ required options: --mmc Unformated MMC Card +--uboot + beagle - + --distro Debian: squeeze @@ -730,6 +758,11 @@ while [ ! -z "$1" ]; do fi check_mmc ;; + --uboot) + checkparm $2 + UBOOT_TYPE="$2" + check_uboot_type + ;; --distro) checkparm $2 DISTRO_TYPE="$2"