From 6010504269357f3f0f9d4e9d3a8ed66e621c06e6 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Sat, 8 Jun 2013 14:48:18 -0500 Subject: [PATCH] testing: use sfdisk over fdisk on omap Signed-off-by: Robert Nelson --- mk_mmc.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 0615634..1211bbb 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -1073,6 +1073,19 @@ fatfs_boot () { LC_ALL=C parted --script ${MMC} set 1 boot on || fatfs_boot_error } +sfdisk_fatfs_boot () { + #For: TI: Omap/Sitara Devices + echo "" + echo "Using sfdisk to create an omap compatible fatfs BOOT partition" + echo "-----------------------------" + + LC_ALL=C sfdisk --DOS --sectors 63 --heads 255 --unit M "${MMC}" <<-__EOF__ + ,${boot_partition_size},0xe,* + __EOF__ + + sync +} + dd_uboot_boot () { #For: Freescale: i.mx5/6 Devices echo "" @@ -1120,7 +1133,11 @@ create_partitions () { case "${bootloader_location}" in fatfs_boot) - fatfs_boot + if [ "${use_sfdisk}" ] ; then + sfdisk_fatfs_boot + else + fatfs_boot + fi ;; dd_uboot_boot) dd_uboot_boot @@ -1735,6 +1752,7 @@ checkparm () { } error_invalid_uboot_dtb=1 +unset use_sfdisk # parse commandline options while [ ! -z "$1" ] ; do @@ -1822,6 +1840,9 @@ while [ ! -z "$1" ] ; do --use-beta-bootloader) USE_BETA_BOOTLOADER=1 ;; + --use-sfdisk) + use_sfdisk=1 + ;; esac shift done