diff --git a/hwpack/A10-OLinuXino-Lime.conf b/hwpack/A10-OLinuXino-Lime.conf index 2c55a72..19555f5 100644 --- a/hwpack/A10-OLinuXino-Lime.conf +++ b/hwpack/A10-OLinuXino-Lime.conf @@ -10,8 +10,11 @@ conf_bl_listfile="bootloader-ng" conf_boot_fstype="ext2" bootloader_location="dd_uboot_boot" -dd_uboot_bs="1024" +uboot_name="u-boot.sunxi" +dd_uboot_count= dd_uboot_seek="8" +dd_uboot_conf="fsync,notrunc" +dd_uboot_bs="1024" unset spl_name boot_name="u-boot.sunxi" diff --git a/hwpack/A20-OLinuXino-Lime.conf b/hwpack/A20-OLinuXino-Lime.conf index b624a79..d3611cc 100644 --- a/hwpack/A20-OLinuXino-Lime.conf +++ b/hwpack/A20-OLinuXino-Lime.conf @@ -10,8 +10,11 @@ conf_bl_listfile="bootloader-ng" conf_boot_fstype="ext2" bootloader_location="dd_uboot_boot" -dd_uboot_bs="1024" +uboot_name="u-boot.sunxi" +dd_uboot_count= dd_uboot_seek="8" +dd_uboot_conf="fsync,notrunc" +dd_uboot_bs="1024" unset spl_name boot_name="u-boot.sunxi" diff --git a/mk_mmc.sh b/mk_mmc.sh index bec1795..3db5943 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -923,11 +923,30 @@ sfdisk_partition_layout () { } dd_uboot_boot () { - #For: Freescale: i.mx5/6 Devices echo "" echo "Using dd to place bootloader on drive" echo "-----------------------------" - dd if=${TEMPDIR}/dl/${UBOOT} of=${media} seek=${dd_uboot_seek} bs=${dd_uboot_bs} + + unset dd_uboot + if [ ! "x${dd_uboot_count}" = "x" ] ; then + dd_uboot="${dd_uboot}count=${dd_uboot_count} " + fi + + if [ ! "x${dd_uboot_seek}" = "x" ] ; then + dd_uboot="${dd_uboot}seek=${dd_uboot_seek} " + fi + + if [ ! "x${dd_uboot_conf}" = "x" ] ; then + dd_uboot="${dd_uboot}conv=${dd_uboot_conf} " + fi + + if [ ! "x${dd_uboot_bs}" = "x" ] ; then + dd_uboot="${dd_uboot}bs=${dd_uboot_bs}" + fi + + echo "${uboot_name}: dd if=${uboot_name} of=${media} ${dd_uboot}" + echo "-----------------------------" + dd if=${TEMPDIR}/dl/${UBOOT} of=${media} ${dd_uboot} bootloader_installed=1 }