cleanup: rewrite boot partition setup

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/8/head
Robert Nelson 13 years ago
parent 88594dfb57
commit d7487b1f10

@ -904,25 +904,31 @@ else
fi fi
format_boot_partition format_boot_partition
}
mkdir ${TEMPDIR}/disk function populate_boot {
mount ${MMC}${PARTITION_PREFIX}1 ${TEMPDIR}/disk echo "Populating Boot Partition"
echo "-----------------------------"
if [ "${SPL_BOOT}" ] ; then mkdir -p ${TEMPDIR}/disk
if ls ${TEMPDIR}/dl/${MLO} >/dev/null 2>&1;then
cp -v ${TEMPDIR}/dl/${MLO} ${TEMPDIR}/disk/MLO if mount -t vfat ${MMC}${PARTITION_PREFIX}1 ${TEMPDIR}/disk; then
fi
fi
if [ ! "${DD_UBOOT}" ] ; then if [ "${SPL_BOOT}" ] ; then
if ls ${TEMPDIR}/dl/${UBOOT} >/dev/null 2>&1;then if [ -f ${TEMPDIR}/dl/${MLO} ]; then
if echo ${UBOOT} | grep img > /dev/null 2>&1;then cp -v ${TEMPDIR}/dl/${MLO} ${TEMPDIR}/disk/MLO
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/u-boot.img fi
else fi
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/u-boot.bin
if [ ! "${DD_UBOOT}" ] ; then
if [ -f ${TEMPDIR}/dl/${UBOOT} ]; then
if echo ${UBOOT} | grep img > /dev/null 2>&1;then
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/u-boot.img
else
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/u-boot.bin
fi
fi
fi fi
fi
fi
VMLINUZ="vmlinuz-*" VMLINUZ="vmlinuz-*"
UIMAGE="uImage.net" UIMAGE="uImage.net"
@ -1110,7 +1116,17 @@ cd ${TEMPDIR}/disk
sync sync
cd ${DIR}/ cd ${DIR}/
umount ${TEMPDIR}/disk || true umount ${TEMPDIR}/disk || true
echo "done"
echo "Finished populating Boot Partition"
echo "-----------------------------"
else
echo "-----------------------------"
echo "Unable to mount ${MMC}${PARTITION_PREFIX}1 at ${TEMPDIR}/disk to complete populating Boot Partition"
echo "Please retry running the script, sometimes rebooting your system helps."
echo "-----------------------------"
exit
fi
} }
function reset_scripts { function reset_scripts {
@ -1556,5 +1572,6 @@ fi
unmount_all_drive_partitions unmount_all_drive_partitions
create_partitions create_partitions
populate_boot
reset_scripts reset_scripts

Loading…
Cancel
Save