From 6f8e73679efa17634027d431c8b362c1275cd9d6 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Mon, 21 Nov 2011 11:12:13 -0600 Subject: [PATCH] cleanup: move dl_bootloader Signed-off-by: Robert Nelson --- mk_mmc.sh | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index cd70f3c..b3bc9d8 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -231,6 +231,37 @@ esac } +function dl_bootloader { + echo "" + echo "Downloading Device's Bootloader" + echo "-----------------------------" + + mkdir -p ${TEMPDIR}/dl/${DIST} + mkdir -p ${DIR}/dl/${DIST} + + wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}tools/latest/bootloader + + if [ "$BETA_BOOT" ];then + ABI="ABX" + else + ABI="ABI" + fi + + if [ "${SPL_BOOT}" ] ; then + MLO=$(cat ${TEMPDIR}/dl/bootloader | grep "${ABI}:${ABI_VER}:MLO" | awk '{print $2}') + fi + + UBOOT=$(cat ${TEMPDIR}/dl/bootloader | grep "${ABI}:${ABI_VER}:UBOOT" | awk '{print $2}') + + if [ "${SPL_BOOT}" ] ; then + wget -c --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MLO} + MLO=${MLO##*/} + fi + + wget -c --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${UBOOT} + UBOOT=${UBOOT##*/} +} + function set_defaults { if [ "$USE_UENV" ];then @@ -322,37 +353,6 @@ fi } -function dl_bootloader { - echo "" - echo "Downloading Device's Bootloader" - echo "-----------------------------" - - mkdir -p ${TEMPDIR}/dl/${DIST} - mkdir -p ${DIR}/dl/${DIST} - - wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}tools/latest/bootloader - - if [ "$BETA_BOOT" ];then - ABI="ABX" - else - ABI="ABI" - fi - - if [ "${SPL_BOOT}" ] ; then - MLO=$(cat ${TEMPDIR}/dl/bootloader | grep "${ABI}:${ABI_VER}:MLO" | awk '{print $2}') - fi - - UBOOT=$(cat ${TEMPDIR}/dl/bootloader | grep "${ABI}:${ABI_VER}:UBOOT" | awk '{print $2}') - - if [ "${SPL_BOOT}" ] ; then - wget -c --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MLO} - MLO=${MLO##*/} - fi - - wget -c --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${UBOOT} - UBOOT=${UBOOT##*/} -} - function dl_xload_uboot { dl_bootloader