mk_mmc.sh: build the dd command up

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/37/head
Robert Nelson 11 years ago
parent d80978f9b2
commit ff15f4dc9d

@ -10,8 +10,11 @@ conf_bl_listfile="bootloader-ng"
conf_boot_fstype="ext2" conf_boot_fstype="ext2"
bootloader_location="dd_uboot_boot" bootloader_location="dd_uboot_boot"
dd_uboot_bs="1024" uboot_name="u-boot.sunxi"
dd_uboot_count=
dd_uboot_seek="8" dd_uboot_seek="8"
dd_uboot_conf="fsync,notrunc"
dd_uboot_bs="1024"
unset spl_name unset spl_name
boot_name="u-boot.sunxi" boot_name="u-boot.sunxi"

@ -10,8 +10,11 @@ conf_bl_listfile="bootloader-ng"
conf_boot_fstype="ext2" conf_boot_fstype="ext2"
bootloader_location="dd_uboot_boot" bootloader_location="dd_uboot_boot"
dd_uboot_bs="1024" uboot_name="u-boot.sunxi"
dd_uboot_count=
dd_uboot_seek="8" dd_uboot_seek="8"
dd_uboot_conf="fsync,notrunc"
dd_uboot_bs="1024"
unset spl_name unset spl_name
boot_name="u-boot.sunxi" boot_name="u-boot.sunxi"

@ -923,11 +923,30 @@ sfdisk_partition_layout () {
} }
dd_uboot_boot () { dd_uboot_boot () {
#For: Freescale: i.mx5/6 Devices
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=${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 bootloader_installed=1
} }

Loading…
Cancel
Save