From 61f596fa1d1cb29d8be2b151569485d6d14558a8 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Thu, 20 Jun 2013 16:11:22 -0500 Subject: [PATCH] imx6q-sabrelite: now supports the factory bootloader too Signed-off-by: Robert Nelson --- hwpack/imx6q-sabrelite.conf | 4 +++- mk_mmc.sh | 22 +++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/hwpack/imx6q-sabrelite.conf b/hwpack/imx6q-sabrelite.conf index caa326f..3ae177d 100644 --- a/hwpack/imx6q-sabrelite.conf +++ b/hwpack/imx6q-sabrelite.conf @@ -40,6 +40,8 @@ conf_uboot_use_uenvcmd=1 #can the bootloader auto detect the device: (*.dtb)? #uboot_fdt_auto_detection=1 +conf_uboot_bootscript="6x_bootscript" + #Kernel: #http://rcn-ee.net/deb/wheezy-armhf/LATEST-imx kernel_subarch="imx" @@ -71,4 +73,4 @@ HAS_IMX_BLOB=1 VIDEO_FB="mxcdi1fb" VIDEO_TIMING="RGB24,1280x720M@60" -conf_note="For bootloader UPGRADE (correct u-boot.imx is in the boot partition) see: http://eewiki.net/display/linuxonarm/i.MX6x+SABRE+Lite#i.MX6xSABRELite-Initialboot:UpgradeBootloader" +conf_note_bootloader="http://eewiki.net/display/linuxonarm/i.MX6x+SABRE+Lite+SPI+Flash+Recovery" diff --git a/mk_mmc.sh b/mk_mmc.sh index a2eab90..9d1b997 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -1218,15 +1218,22 @@ populate_boot () { echo "-----------------------------" fi - if [ "${boot_scr_wrapper}" ] ; then + if [ "${conf_uboot_bootscript}" ] ; then cat > ${TEMPDIR}/bootscripts/loader.cmd <<-__EOF__ - echo "boot.scr -> uEnv.txt wrapper..." + echo "${conf_uboot_bootscript} -> uEnv.txt wrapper..." + #boundarydevices.com uses disk over mmcdev + if test -n \$disk; then + setenv mmcdev \$disk + setenv mmcpart 1 + fi ${conf_fileload} mmc \${mmcdev}:\${mmcpart} \${loadaddr} uEnv.txt env import -t \${loadaddr} \${filesize} - run ${conf_entrypt} + run uenvcmd __EOF__ - mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "wrapper" -d ${TEMPDIR}/bootscripts/loader.cmd ${TEMPDIR}/disk/boot.scr - cp -v ${TEMPDIR}/disk/boot.scr ${TEMPDIR}/disk/backup/boot.scr + cat ${TEMPDIR}/bootscripts/loader.cmd + echo "-----------------------------" + mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "wrapper" -d ${TEMPDIR}/bootscripts/loader.cmd ${TEMPDIR}/disk/${conf_uboot_bootscript} + cp -v ${TEMPDIR}/disk/${conf_uboot_bootscript} ${TEMPDIR}/disk/backup/${conf_uboot_bootscript} fi echo "Copying uEnv.txt based boot scripts to Boot Partition" @@ -1314,6 +1321,11 @@ populate_boot () { echo ${conf_note} echo "-----------------------------" fi + if [ "${conf_note_bootloader}" ] ; then + echo "This script requires the bootloader to be already installed, see:" + echo ${conf_note_bootloader} + echo "-----------------------------" + fi echo "Reporting Bugs:" echo "https://github.com/RobertCNelson/netinstall/issues" echo "Please include: /var/log/netinstall.log from RootFileSystem"