|
|
@ -1164,12 +1164,13 @@ function unmount_all_drive_partitions {
|
|
|
|
LC_ALL=C parted --script ${MMC} mklabel msdos || drive_error_ro
|
|
|
|
LC_ALL=C parted --script ${MMC} mklabel msdos || drive_error_ro
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function omap_fatfs_boot_part_error {
|
|
|
|
function fatfs_boot_error {
|
|
|
|
echo "Failure: [parted --script ${MMC} set 1 boot on]"
|
|
|
|
echo "Failure: [parted --script ${MMC} set 1 boot on]"
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function omap_fatfs_boot_part {
|
|
|
|
function fatfs_boot {
|
|
|
|
|
|
|
|
#For: TI: Omap/Sitara Devices
|
|
|
|
echo ""
|
|
|
|
echo ""
|
|
|
|
echo "Using fdisk to create an omap compatible fatfs BOOT partition"
|
|
|
|
echo "Using fdisk to create an omap compatible fatfs BOOT partition"
|
|
|
|
echo "-----------------------------"
|
|
|
|
echo "-----------------------------"
|
|
|
@ -1190,14 +1191,25 @@ function omap_fatfs_boot_part {
|
|
|
|
|
|
|
|
|
|
|
|
echo "Setting Boot Partition's Boot Flag"
|
|
|
|
echo "Setting Boot Partition's Boot Flag"
|
|
|
|
echo "-----------------------------"
|
|
|
|
echo "-----------------------------"
|
|
|
|
LC_ALL=C parted --script ${MMC} set 1 boot on || omap_fatfs_boot_part_error
|
|
|
|
LC_ALL=C parted --script ${MMC} set 1 boot on || fatfs_boot_error
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function dd_to_drive {
|
|
|
|
function 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=${MMC} seek=${dd_seek} bs=${dd_bs}
|
|
|
|
dd if=${TEMPDIR}/dl/${UBOOT} of=${MMC} seek=${dd_uboot_seek} bs=${dd_uboot_bs}
|
|
|
|
|
|
|
|
bootloader_installed=1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function dd_spl_uboot_boot {
|
|
|
|
|
|
|
|
#For: Samsung: Exynos 4 Devices
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "Using dd to place bootloader on drive"
|
|
|
|
|
|
|
|
echo "-----------------------------"
|
|
|
|
|
|
|
|
dd if=${TEMPDIR}/dl/${UBOOT} of=${MMC} seek=${dd_spl_uboot_seek} bs=${dd_spl_uboot_bs}
|
|
|
|
|
|
|
|
dd if=${TEMPDIR}/dl/${UBOOT} of=${MMC} seek=${dd_uboot_seek} bs=${dd_uboot_bs}
|
|
|
|
bootloader_installed=1
|
|
|
|
bootloader_installed=1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1233,11 +1245,15 @@ function create_partitions {
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
case "${bootloader_location}" in
|
|
|
|
case "${bootloader_location}" in
|
|
|
|
omap_fatfs_boot_part)
|
|
|
|
fatfs_boot)
|
|
|
|
omap_fatfs_boot_part
|
|
|
|
fatfs_boot
|
|
|
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
dd_uboot_boot)
|
|
|
|
|
|
|
|
dd_uboot_boot
|
|
|
|
|
|
|
|
LC_ALL=C parted --script ${PARTED_ALIGN} ${MMC} mkpart primary ${parted_format} ${boot_startmb} ${boot_endmb}
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
dd_to_drive)
|
|
|
|
dd_spl_uboot_boot)
|
|
|
|
dd_to_drive
|
|
|
|
dd_spl_uboot_boot
|
|
|
|
LC_ALL=C parted --script ${PARTED_ALIGN} ${MMC} mkpart primary ${parted_format} ${boot_startmb} ${boot_endmb}
|
|
|
|
LC_ALL=C parted --script ${PARTED_ALIGN} ${MMC} mkpart primary ${parted_format} ${boot_startmb} ${boot_endmb}
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
*)
|
|
|
@ -1352,9 +1368,12 @@ function populate_boot {
|
|
|
|
#!/bin/sh
|
|
|
|
#!/bin/sh
|
|
|
|
format=1.0
|
|
|
|
format=1.0
|
|
|
|
board=${BOOTLOADER}
|
|
|
|
board=${BOOTLOADER}
|
|
|
|
|
|
|
|
|
|
|
|
bootloader_location=${bootloader_location}
|
|
|
|
bootloader_location=${bootloader_location}
|
|
|
|
dd_seek=${dd_seek}
|
|
|
|
dd_spl_uboot_seek=${dd_spl_uboot_seek}
|
|
|
|
dd_bs=${dd_bs}
|
|
|
|
dd_spl_uboot_bs=${dd_spl_uboot_bs}
|
|
|
|
|
|
|
|
dd_uboot_seek=${dd_uboot_seek}
|
|
|
|
|
|
|
|
dd_uboot_bs=${dd_uboot_bs}
|
|
|
|
|
|
|
|
|
|
|
|
boot_image=${boot}
|
|
|
|
boot_image=${boot}
|
|
|
|
boot_script=${boot_script}
|
|
|
|
boot_script=${boot_script}
|
|
|
@ -1442,7 +1461,7 @@ function check_mmc {
|
|
|
|
function is_omap {
|
|
|
|
function is_omap {
|
|
|
|
IS_OMAP=1
|
|
|
|
IS_OMAP=1
|
|
|
|
|
|
|
|
|
|
|
|
bootloader_location="omap_fatfs_boot_part"
|
|
|
|
bootloader_location="fatfs_boot"
|
|
|
|
spl_name="MLO"
|
|
|
|
spl_name="MLO"
|
|
|
|
boot_name="u-boot.img"
|
|
|
|
boot_name="u-boot.img"
|
|
|
|
|
|
|
|
|
|
|
@ -1479,11 +1498,11 @@ function is_omap {
|
|
|
|
function is_imx {
|
|
|
|
function is_imx {
|
|
|
|
IS_IMX=1
|
|
|
|
IS_IMX=1
|
|
|
|
|
|
|
|
|
|
|
|
bootloader_location="dd_to_drive"
|
|
|
|
bootloader_location="dd_uboot_boot"
|
|
|
|
unset spl_name
|
|
|
|
unset spl_name
|
|
|
|
boot_name="u-boot.imx"
|
|
|
|
boot_name="u-boot.imx"
|
|
|
|
dd_seek="1"
|
|
|
|
dd_uboot_seek="1"
|
|
|
|
dd_bs="1024"
|
|
|
|
dd_uboot_bs="1024"
|
|
|
|
boot_startmb="2"
|
|
|
|
boot_startmb="2"
|
|
|
|
|
|
|
|
|
|
|
|
SUBARCH="imx"
|
|
|
|
SUBARCH="imx"
|
|
|
@ -1506,17 +1525,20 @@ function check_uboot_type {
|
|
|
|
unset USE_UIMAGE
|
|
|
|
unset USE_UIMAGE
|
|
|
|
unset USE_KMS
|
|
|
|
unset USE_KMS
|
|
|
|
unset dtb_file
|
|
|
|
unset dtb_file
|
|
|
|
|
|
|
|
|
|
|
|
unset bootloader_location
|
|
|
|
|
|
|
|
unset spl_name
|
|
|
|
|
|
|
|
unset boot_name
|
|
|
|
|
|
|
|
unset need_dtbs
|
|
|
|
unset need_dtbs
|
|
|
|
KERNEL_SEL="STABLE"
|
|
|
|
KERNEL_SEL="STABLE"
|
|
|
|
|
|
|
|
|
|
|
|
boot="bootz"
|
|
|
|
boot="bootz"
|
|
|
|
|
|
|
|
unset spl_name
|
|
|
|
|
|
|
|
unset boot_name
|
|
|
|
|
|
|
|
unset bootloader_location
|
|
|
|
|
|
|
|
unset dd_spl_uboot_seek
|
|
|
|
|
|
|
|
unset dd_spl_uboot_bs
|
|
|
|
|
|
|
|
unset dd_uboot_seek
|
|
|
|
|
|
|
|
unset dd_uboot_bs
|
|
|
|
|
|
|
|
|
|
|
|
unset boot_scr_wrapper
|
|
|
|
unset boot_scr_wrapper
|
|
|
|
unset usbnet_mem
|
|
|
|
unset usbnet_mem
|
|
|
|
unset dd_seek
|
|
|
|
|
|
|
|
unset dd_bs
|
|
|
|
|
|
|
|
boot_partition_size="50"
|
|
|
|
boot_partition_size="50"
|
|
|
|
|
|
|
|
|
|
|
|
case "${UBOOT_TYPE}" in
|
|
|
|
case "${UBOOT_TYPE}" in
|
|
|
@ -1720,8 +1742,8 @@ function check_uboot_type {
|
|
|
|
SERIAL_CONSOLE="${SERIAL},115200"
|
|
|
|
SERIAL_CONSOLE="${SERIAL},115200"
|
|
|
|
boot="bootm"
|
|
|
|
boot="bootm"
|
|
|
|
USE_UIMAGE=1
|
|
|
|
USE_UIMAGE=1
|
|
|
|
dd_seek="2"
|
|
|
|
dd_uboot_seek="2"
|
|
|
|
dd_bs="512"
|
|
|
|
dd_uboot_bs="512"
|
|
|
|
kernel_addr="0x10000000"
|
|
|
|
kernel_addr="0x10000000"
|
|
|
|
initrd_addr="0x12000000"
|
|
|
|
initrd_addr="0x12000000"
|
|
|
|
load_addr="0x10008000"
|
|
|
|
load_addr="0x10008000"
|
|
|
|