bootloader: allow use of a local spl/bootloader for testing

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/8/head
Robert Nelson 13 years ago
parent 998b21dce6
commit e4db61d315

@ -34,6 +34,8 @@ PARTITION_PREFIX=""
unset MMC unset MMC
unset USE_BETA_BOOTLOADER unset USE_BETA_BOOTLOADER
unset USE_LOCAL_BOOT
unset LOCAL_BOOTLOADER
unset ADDON unset ADDON
unset FIRMWARE unset FIRMWARE
@ -179,6 +181,22 @@ function rcn-ee_down_use_mirror {
RCNEEDOWN=1 RCNEEDOWN=1
} }
function local_bootloader {
echo ""
echo "Using Locally Stored Device Bootloader"
echo "-----------------------------"
if [ "${spl_name}" ] ; then
MLO=${LOCAL_SPL}
echo "SPL Bootloader: ${MLO}"
fi
if [ "${boot_name}" ] ; then
UBOOT=${LOCAL_BOOTLOADER}
echo "UBOOT Bootloader: ${UBOOT}"
fi
}
function dl_bootloader { function dl_bootloader {
echo "" echo ""
echo "Downloading Device's Bootloader" echo "Downloading Device's Bootloader"
@ -1045,7 +1063,11 @@ function dd_to_drive {
echo "" echo ""
echo "Using dd to place bootloader on drive" echo "Using dd to place bootloader on drive"
echo "-----------------------------" echo "-----------------------------"
dd if=${TEMPDIR}/dl/${UBOOT} of=${MMC} seek=1 bs=1024 if [ ! "${LOCAL_BOOTLOADER}" ] ; then
dd if=${TEMPDIR}/dl/${UBOOT} of=${MMC} seek=1 bs=1024
else
dd if=${UBOOT} of=${MMC} seek=1 bs=1024
fi
bootloader_installed=1 bootloader_installed=1
#For now, lets default to fat16, but this could be ext2/3/4 #For now, lets default to fat16, but this could be ext2/3/4
@ -1871,6 +1893,16 @@ while [ ! -z "$1" ]; do
--use-experimental-kernel) --use-experimental-kernel)
EXPERIMENTAL_KERNEL=1 EXPERIMENTAL_KERNEL=1
;; ;;
--spl)
checkparm $2
LOCAL_SPL="$2"
USE_LOCAL_BOOT=1
;;
--bootloader)
checkparm $2
LOCAL_BOOTLOADER="$2"
USE_LOCAL_BOOT=1
;;
--use-beta-bootloader) --use-beta-bootloader)
USE_BETA_BOOTLOADER=1 USE_BETA_BOOTLOADER=1
;; ;;
@ -1905,7 +1937,13 @@ fi
check_root check_root
detect_software detect_software
dl_bootloader
if [ "${USE_LOCAL_BOOT}" ] ; then
local_bootloader
else
dl_bootloader
fi
dl_kernel_image dl_kernel_image
dl_netinstall_image dl_netinstall_image

Loading…
Cancel
Save