diff --git a/mk_mmc.sh b/mk_mmc.sh index e656d70..0a8dc0d 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -671,27 +671,28 @@ fi mkfs.vfat -F 16 ${MMC}${PARTITION_PREFIX}1 -n ${BOOT_LABEL} } -function dd_uboot { - -dd if=${TEMPDIR}/dl/${UBOOT} of=${MMC} seek=1 bs=1024 - -#for now, lets default to fat16 -parted --script ${PARTED_ALIGN} ${MMC} mkpart primary fat16 10 100 -#parted --script ${PARTED_ALIGN} ${MMC} mkpart primary ext3 10 100 - -echo "" -echo "Formating Boot Partition" -echo "" +function dd_uboot_before_boot_partition { + echo "" + echo "Using dd to place bootloader before BOOT Partition" + echo "-----------------------------" + dd if=${TEMPDIR}/dl/${UBOOT} of=${MMC} seek=1 bs=1024 -mkfs.vfat -F 16 ${MMC}${PARTITION_PREFIX}1 -n ${BOOT_LABEL} -#mkfs.ext3 ${MMC}${PARTITION_PREFIX}1 -L ${BOOT_LABEL} + #For now, lets default to fat16, but this could be ext2/3/4 + echo "Using parted to create BOOT Partition" + echo "-----------------------------" + parted --script ${PARTED_ALIGN} ${MMC} mkpart primary fat16 10 100 + #parted --script ${PARTED_ALIGN} ${MMC} mkpart primary ext3 10 100 + echo "Formating Boot Partition" + echo "-----------------------------" + mkfs.vfat -F 16 ${MMC}${PARTITION_PREFIX}1 -n ${BOOT_LABEL} + #mkfs.ext3 ${MMC}${PARTITION_PREFIX}1 -L ${BOOT_LABEL} } function create_partitions { if [ "${DO_UBOOT_DD}" ] ; then - dd_uboot + dd_uboot_before_boot_partition else uboot_in_boot_partition fi