diff --git a/hwpack/am335x-bone-serial.conf b/hwpack/am335x-bone-serial.conf index fffcf99..71478e9 100644 --- a/hwpack/am335x-bone-serial.conf +++ b/hwpack/am335x-bone-serial.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="fat" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="fatfs_boot" -boot_fstype="fat" use_sfdisk=1 spl_name="MLO" boot_name="u-boot.img" diff --git a/hwpack/am335x-bone-video.conf b/hwpack/am335x-bone-video.conf index ee5ae39..39208cb 100644 --- a/hwpack/am335x-bone-video.conf +++ b/hwpack/am335x-bone-video.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="fat" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="fatfs_boot" -boot_fstype="fat" use_sfdisk=1 spl_name="MLO" boot_name="u-boot.img" diff --git a/hwpack/am335x-boneblack.conf b/hwpack/am335x-boneblack.conf index ea4a717..7c23485 100644 --- a/hwpack/am335x-boneblack.conf +++ b/hwpack/am335x-boneblack.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="fat" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="fatfs_boot" -boot_fstype="fat" use_sfdisk=1 spl_name="MLO" boot_name="u-boot.img" diff --git a/hwpack/imx51-babbage.conf b/hwpack/imx51-babbage.conf index bd29590..e73ce03 100644 --- a/hwpack/imx51-babbage.conf +++ b/hwpack/imx51-babbage.conf @@ -10,11 +10,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest/" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="ext2" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="dd_uboot_boot" -boot_fstype="ext2" dd_uboot_bs="512" dd_uboot_seek="2" use_sfdisk=1 diff --git a/hwpack/imx53-qsb.conf b/hwpack/imx53-qsb.conf index 0b66ca3..ada1617 100644 --- a/hwpack/imx53-qsb.conf +++ b/hwpack/imx53-qsb.conf @@ -10,11 +10,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest/" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="ext2" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="dd_uboot_boot" -boot_fstype="ext2" dd_uboot_bs="512" dd_uboot_seek="2" use_sfdisk=1 diff --git a/hwpack/imx6dl-wandboard.conf b/hwpack/imx6dl-wandboard.conf index e47d22d..0c8fb7b 100644 --- a/hwpack/imx6dl-wandboard.conf +++ b/hwpack/imx6dl-wandboard.conf @@ -10,14 +10,13 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest/" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="ext2" conf_boot_startmb="1" +conf_boot_endmb="96" bootloader_location="dd_uboot_boot" -boot_fstype="ext2" dd_uboot_bs="512" dd_uboot_seek="2" -boot_partition_size="96" -boot_startmb="1" use_sfdisk=1 unset spl_name boot_name="u-boot.imx" diff --git a/hwpack/imx6q-sabrelite.conf b/hwpack/imx6q-sabrelite.conf index c589902..e90d0dc 100644 --- a/hwpack/imx6q-sabrelite.conf +++ b/hwpack/imx6q-sabrelite.conf @@ -9,11 +9,10 @@ conf_board="MX6QSABRELITE_D" conf_bootloader_in_flash="1" #Bootloader Partition: +conf_boot_fstype="ext2" conf_boot_startmb="1" conf_boot_endmb="96" -boot_fstype="ext2" -boot_startmb="1" use_sfdisk=1 #Bootloader: u-boot features: diff --git a/hwpack/imx6q-sabresd.conf b/hwpack/imx6q-sabresd.conf index b74c0e9..4baecd8 100644 --- a/hwpack/imx6q-sabresd.conf +++ b/hwpack/imx6q-sabresd.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest/" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="ext2" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="dd_uboot_boot" -boot_fstype="ext2" dd_uboot_bs="512" dd_uboot_seek="2" use_sfdisk=1 diff --git a/hwpack/imx6q-wandboard.conf b/hwpack/imx6q-wandboard.conf index 24a94e1..54c9b6d 100644 --- a/hwpack/imx6q-wandboard.conf +++ b/hwpack/imx6q-wandboard.conf @@ -10,11 +10,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest/" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="ext2" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="dd_uboot_boot" -boot_fstype="ext2" dd_uboot_bs="512" dd_uboot_seek="2" use_sfdisk=1 diff --git a/hwpack/omap3-beagle-xm-v3.9-dt.conf b/hwpack/omap3-beagle-xm-v3.9-dt.conf index f42dd14..f17063f 100644 --- a/hwpack/omap3-beagle-xm-v3.9-dt.conf +++ b/hwpack/omap3-beagle-xm-v3.9-dt.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="fat" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="fatfs_boot" -boot_fstype="fat" use_sfdisk=1 spl_name="MLO" boot_name="u-boot.img" diff --git a/hwpack/omap3-beagle-xm.conf b/hwpack/omap3-beagle-xm.conf index 24fffbc..d9c2fef 100644 --- a/hwpack/omap3-beagle-xm.conf +++ b/hwpack/omap3-beagle-xm.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="fat" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="fatfs_boot" -boot_fstype="fat" use_sfdisk=1 spl_name="MLO" boot_name="u-boot.img" diff --git a/hwpack/omap4-panda-a4.conf b/hwpack/omap4-panda-a4.conf index 6f9095e..d2cbdb2 100644 --- a/hwpack/omap4-panda-a4.conf +++ b/hwpack/omap4-panda-a4.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="fat" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="fatfs_boot" -boot_fstype="fat" use_sfdisk=1 spl_name="MLO" boot_name="u-boot.img" diff --git a/hwpack/omap4-panda-es.conf b/hwpack/omap4-panda-es.conf index eaa4cb0..73437e3 100644 --- a/hwpack/omap4-panda-es.conf +++ b/hwpack/omap4-panda-es.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="fat" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="fatfs_boot" -boot_fstype="fat" use_sfdisk=1 spl_name="MLO" boot_name="u-boot.img" diff --git a/hwpack/omap4-panda-v3.10-dt.conf b/hwpack/omap4-panda-v3.10-dt.conf index 41d3a7c..90b9af6 100644 --- a/hwpack/omap4-panda-v3.10-dt.conf +++ b/hwpack/omap4-panda-v3.10-dt.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="fat" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="fatfs_boot" -boot_fstype="fat" use_sfdisk=1 spl_name="MLO" boot_name="u-boot.img" diff --git a/hwpack/omap4-panda.conf b/hwpack/omap4-panda.conf index 4dae929..7a82b13 100644 --- a/hwpack/omap4-panda.conf +++ b/hwpack/omap4-panda.conf @@ -8,11 +8,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="fat" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="fatfs_boot" -boot_fstype="fat" use_sfdisk=1 spl_name="MLO" boot_name="u-boot.img" diff --git a/hwpack/wandboard-dl.conf b/hwpack/wandboard-dl.conf index 784d602..bec6169 100644 --- a/hwpack/wandboard-dl.conf +++ b/hwpack/wandboard-dl.conf @@ -10,11 +10,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest/" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="ext2" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="dd_uboot_boot" -boot_fstype="ext2" dd_uboot_bs="512" dd_uboot_seek="2" use_sfdisk=1 diff --git a/hwpack/wandboard-quad.conf b/hwpack/wandboard-quad.conf index 1ca6315..7448fc1 100644 --- a/hwpack/wandboard-quad.conf +++ b/hwpack/wandboard-quad.conf @@ -10,11 +10,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest/" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="ext2" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="dd_uboot_boot" -boot_fstype="ext2" dd_uboot_bs="512" dd_uboot_seek="2" use_sfdisk=1 diff --git a/hwpack/wandboard-solo.conf b/hwpack/wandboard-solo.conf index 9dfa5e2..b498ef9 100644 --- a/hwpack/wandboard-solo.conf +++ b/hwpack/wandboard-solo.conf @@ -10,11 +10,11 @@ conf_bl_http="http://rcn-ee.net/deb/tools/latest/" conf_bl_listfile="bootloader-ng" #Bootloader Partition: +conf_boot_fstype="ext2" conf_boot_startmb="1" conf_boot_endmb="96" bootloader_location="dd_uboot_boot" -boot_fstype="ext2" dd_uboot_bs="512" dd_uboot_seek="2" use_sfdisk=1 diff --git a/mk_mmc.sh b/mk_mmc.sh index 1b35806..73f1057 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -1049,7 +1049,7 @@ initrd_device_settings () { dd_uboot_bs=${dd_uboot_bs} conf_bootcmd=${conf_bootcmd} - boot_fstype=${boot_fstype} + boot_fstype=${conf_boot_fstype} serial_tty=${SERIAL} loadaddr=${conf_loadaddr} @@ -1164,7 +1164,7 @@ sfdisk_boot_partition () { echo "-----------------------------" LC_ALL=C sfdisk --in-order --Linux --unit M "${MMC}" <<-__EOF__ - ${conf_boot_startmb},${conf_boot_endmb},0xe,* + ${conf_boot_startmb},${conf_boot_endmb},${sfdisk_fstype},* __EOF__ sync @@ -1203,7 +1203,7 @@ format_boot_partition () { create_partitions () { unset bootloader_installed - if [ "x${boot_fstype}" = "xfat" ] ; then + if [ "x${conf_boot_fstype}" = "xfat" ] ; then parted_format="fat16" mount_partition_format="vfat" mkfs="mkfs.vfat -F 16" @@ -1227,7 +1227,7 @@ create_partitions () { dd_uboot_boot if [ "${use_sfdisk}" ] ; then LC_ALL=C sfdisk --in-order --Linux --unit M "${MMC}" <<-__EOF__ - ${conf_boot_startmb},${conf_boot_endmb},0x83,* + ${conf_boot_startmb},${conf_boot_endmb},${sfdisk_fstype},* __EOF__ else LC_ALL=C parted --script ${MMC} mkpart primary ${parted_format} ${conf_boot_startmb} ${conf_boot_endmb} @@ -1300,7 +1300,7 @@ populate_boot () { if [ "${ACTUAL_DTB_FILE}" ] ; then echo "Copying Device Tree Files:" - if [ "x${boot_fstype}" = "xfat" ] ; then + if [ "x${conf_boot_fstype}" = "xfat" ] ; then tar xfvo "${DIR}/dl/${DISTARCH}/${ACTUAL_DTB_FILE}" -C ${TEMPDIR}/disk/dtbs else tar xfv "${DIR}/dl/${DISTARCH}/${ACTUAL_DTB_FILE}" -C ${TEMPDIR}/disk/dtbs @@ -1358,7 +1358,7 @@ populate_boot () { dd_uboot_bs=${dd_uboot_bs} conf_bootcmd=${conf_bootcmd} - boot_fstype=${boot_fstype} + boot_fstype=${conf_boot_fstype} serial_tty=${SERIAL} loadaddr=${conf_loadaddr} @@ -1514,6 +1514,24 @@ process_dtb_conf () { show_board_warning fi + if [ ! "${conf_boot_fstype}" ] ; then + echo "Error: [conf_boot_fstype] not defined, stopping..." + exit + else + case "${conf_boot_fstype}" in + fat) + sfdisk_fstype="0xE" + ;; + ext2|ext3|ext4) + sfdisk_fstype="0x83" + ;; + *) + echo "Error: [conf_boot_fstype] not recognized, stopping..." + exit + ;; + esac + fi + if [ ! "${conf_boot_startmb}" ] ; then echo "Warning: [conf_boot_startmb] was undefined setting as: 1" conf_boot_startmb="1" @@ -1546,7 +1564,7 @@ process_dtb_conf () { if [ "${conf_uboot_CONFIG_CMD_FS_GENERIC}" ] ; then conf_fileload="load" else - if [ "x${boot_fstype}" = "xfat" ] ; then + if [ "x${conf_boot_fstype}" = "xfat" ] ; then conf_fileload="fatload" else conf_fileload="ext2load" @@ -1597,7 +1615,7 @@ is_omap () { conf_zreladdr="0x80008000" conf_fdtaddr="0x815f0000" - boot_fstype="fat" + conf_boot_fstype="fat" SERIAL="ttyO2" SERIAL_CONSOLE="${SERIAL},115200n8"