|
|
|
@ -204,6 +204,8 @@ function dl_bootloader {
|
|
|
|
|
echo ""
|
|
|
|
|
echo "Downloading Device's Bootloader"
|
|
|
|
|
echo "-----------------------------"
|
|
|
|
|
bootlist="bootloader-ng"
|
|
|
|
|
minimal_boot="1"
|
|
|
|
|
unset disable_mirror
|
|
|
|
|
|
|
|
|
|
mkdir -p ${TEMPDIR}/dl/${DISTARCH}
|
|
|
|
@ -211,25 +213,32 @@ function dl_bootloader {
|
|
|
|
|
|
|
|
|
|
unset RCNEEDOWN
|
|
|
|
|
if [ "${disable_mirror}" ] ; then
|
|
|
|
|
wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/tools/latest/bootloader
|
|
|
|
|
wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/tools/latest/${bootlist}
|
|
|
|
|
else
|
|
|
|
|
echo "attempting to use rcn-ee.net for dl files [10 second time out]..."
|
|
|
|
|
wget -T 10 -t 1 --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/tools/latest/bootloader
|
|
|
|
|
wget -T 10 -t 1 --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/tools/latest/${bootlist}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ ! -f ${TEMPDIR}/dl/bootloader ] ; then
|
|
|
|
|
if [ ! -f ${TEMPDIR}/dl/${bootlist} ] ; then
|
|
|
|
|
if [ "${disable_mirror}" ] ; then
|
|
|
|
|
echo "error: can't connect to rcn-ee.net, retry in a few minutes (backup mirror down)"
|
|
|
|
|
exit
|
|
|
|
|
else
|
|
|
|
|
rcn-ee_down_use_mirror
|
|
|
|
|
wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/tools/latest/bootloader
|
|
|
|
|
wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/tools/latest/${bootlist}
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${RCNEEDOWN}" ] ; then
|
|
|
|
|
sed -i -e "s/rcn-ee.net/rcn-ee.homeip.net:81/g" ${TEMPDIR}/dl/bootloader
|
|
|
|
|
sed -i -e 's:81/deb/:81/dl/mirrors/deb/:g' ${TEMPDIR}/dl/bootloader
|
|
|
|
|
sed -i -e "s/rcn-ee.net/rcn-ee.homeip.net:81/g" ${TEMPDIR}/dl/${bootlist}
|
|
|
|
|
sed -i -e 's:81/deb/:81/dl/mirrors/deb/:g' ${TEMPDIR}/dl/${bootlist}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
boot_version=$(cat ${TEMPDIR}/dl/${bootlist} | grep "VERSION:" | awk -F":" '{print $2}')
|
|
|
|
|
if [ "x${boot_version}" != "x${minimal_boot}" ] ; then
|
|
|
|
|
echo "Error: This script is out of date and unsupported..."
|
|
|
|
|
echo "Please Visit: https://github.com/RobertCNelson to find updates..."
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${USE_BETA_BOOTLOADER}" ] ; then
|
|
|
|
@ -239,7 +248,7 @@ function dl_bootloader {
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${spl_name}" ] ; then
|
|
|
|
|
MLO=$(cat ${TEMPDIR}/dl/bootloader | grep "${ABI}:${BOOTLOADER}:SPL" | awk '{print $2}')
|
|
|
|
|
MLO=$(cat ${TEMPDIR}/dl/${bootlist} | grep "${ABI}:${BOOTLOADER}:SPL" | awk '{print $2}')
|
|
|
|
|
wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MLO}
|
|
|
|
|
MLO=${MLO##*/}
|
|
|
|
|
echo "SPL Bootloader: ${MLO}"
|
|
|
|
@ -248,7 +257,7 @@ function dl_bootloader {
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${boot_name}" ] ; then
|
|
|
|
|
UBOOT=$(cat ${TEMPDIR}/dl/bootloader | grep "${ABI}:${BOOTLOADER}:BOOT" | awk '{print $2}')
|
|
|
|
|
UBOOT=$(cat ${TEMPDIR}/dl/${bootlist} | grep "${ABI}:${BOOTLOADER}:BOOT" | awk '{print $2}')
|
|
|
|
|
wget --directory-prefix=${TEMPDIR}/dl/ ${UBOOT}
|
|
|
|
|
UBOOT=${UBOOT##*/}
|
|
|
|
|
echo "UBOOT Bootloader: ${UBOOT}"
|
|
|
|
|