From 5e6da68c992f7966cc7656c0166aa95b5b05dfa6 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Wed, 23 Jan 2013 17:03:51 -0600 Subject: [PATCH] bootscripts: specify uboot load cmd directly Signed-off-by: Robert Nelson --- hwpack/am335x-bone.conf | 1 + hwpack/imx51-babbage.conf | 2 +- hwpack/imx53-qsb.conf | 2 +- hwpack/imx6q-sabrelite.conf | 1 + hwpack/omap3-beagle-xm.conf | 1 + hwpack/omap4-panda.conf | 1 + mk_mmc.sh | 73 +++++++++++++------------------------ 7 files changed, 31 insertions(+), 50 deletions(-) diff --git a/hwpack/am335x-bone.conf b/hwpack/am335x-bone.conf index aa5d7ef..386ec56 100644 --- a/hwpack/am335x-bone.conf +++ b/hwpack/am335x-bone.conf @@ -21,6 +21,7 @@ boot_image="bootz" boot_script="uEnv.txt" boot_fstype="fat" uboot_SCRIPT_ENTRY="loaduimage" +uboot_CMD_LOAD="fatload" #http://rcn-ee.net/deb/wheezy-armhf/LATEST-omap-psp kernel_subarch="omap-psp" diff --git a/hwpack/imx51-babbage.conf b/hwpack/imx51-babbage.conf index 5ff4e4d..f1ad816 100644 --- a/hwpack/imx51-babbage.conf +++ b/hwpack/imx51-babbage.conf @@ -23,8 +23,8 @@ boot_name="u-boot.imx" boot_image="bootz" boot_script="uEnv.txt" boot_fstype="ext2" -uboot_CMD_FS_GENERIC=1 uboot_SCRIPT_ENTRY="loaduimage" +uboot_CMD_LOAD="load" #http://rcn-ee.net/deb/wheezy-armhf/LATEST-imx kernel_subarch="imx" diff --git a/hwpack/imx53-qsb.conf b/hwpack/imx53-qsb.conf index b9dfbe7..df71044 100644 --- a/hwpack/imx53-qsb.conf +++ b/hwpack/imx53-qsb.conf @@ -23,8 +23,8 @@ boot_name="u-boot.imx" boot_image="bootz" boot_script="uEnv.txt" boot_fstype="ext2" -uboot_CMD_FS_GENERIC=1 uboot_SCRIPT_ENTRY="loaduimage" +uboot_CMD_LOAD="load" #http://rcn-ee.net/deb/wheezy-armhf/LATEST-imx kernel_subarch="imx" diff --git a/hwpack/imx6q-sabrelite.conf b/hwpack/imx6q-sabrelite.conf index 9266eed..4cd4968 100644 --- a/hwpack/imx6q-sabrelite.conf +++ b/hwpack/imx6q-sabrelite.conf @@ -26,6 +26,7 @@ boot_scr_wrapper=1 boot_script="uEnv.txt" boot_fstype="ext2" uboot_SCRIPT_ENTRY="loaduimage" +uboot_CMD_LOAD="ext2load" #http://rcn-ee.net/deb/wheezy-armhf/LATEST-imx kernel_subarch="imx" diff --git a/hwpack/omap3-beagle-xm.conf b/hwpack/omap3-beagle-xm.conf index 62197a1..c2721d0 100644 --- a/hwpack/omap3-beagle-xm.conf +++ b/hwpack/omap3-beagle-xm.conf @@ -21,6 +21,7 @@ boot_image="bootz" boot_script="uEnv.txt" boot_fstype="fat" uboot_SCRIPT_ENTRY="loaduimage" +uboot_CMD_LOAD="fatload" #http://rcn-ee.net/deb/wheezy-armhf/LATEST-omap kernel_subarch="omap" diff --git a/hwpack/omap4-panda.conf b/hwpack/omap4-panda.conf index 87299ed..8a8d3a3 100644 --- a/hwpack/omap4-panda.conf +++ b/hwpack/omap4-panda.conf @@ -21,6 +21,7 @@ boot_image="bootz" boot_script="uEnv.txt" boot_fstype="fat" uboot_SCRIPT_ENTRY="loaduimage" +uboot_CMD_LOAD="fatload" #http://rcn-ee.net/deb/wheezy-armhf/LATEST-omap kernel_subarch="omap" diff --git a/mk_mmc.sh b/mk_mmc.sh index 632ff94..278f9f2 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -360,59 +360,28 @@ function boot_uenv_txt_template { __EOF__ fi - if [ "${uboot_CMD_FS_GENERIC}" ] ; then - cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ - console=SERIAL_CONSOLE - - mmcroot=FINAL_PART ro - mmcrootfstype=FINAL_FSTYPE rootwait fixrtc - - xyz_load_image=load mmc 0:1 ${kernel_addr} \${kernel_file} - xyz_load_initrd=load mmc 0:1 ${initrd_addr} \${initrd_file}; setenv initrd_size \${filesize} - xyz_load_dtb=load mmc 0:1 ${dtb_addr} /dtbs/\${dtb_file} - - __EOF__ - - else - cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ - console=SERIAL_CONSOLE - - mmcroot=FINAL_PART ro - mmcrootfstype=FINAL_FSTYPE rootwait fixrtc - - boot_fstype=${boot_fstype} - xyz_load_image=\${boot_fstype}load mmc 0:1 ${kernel_addr} \${kernel_file} - xyz_load_initrd=\${boot_fstype}load mmc 0:1 ${initrd_addr} \${initrd_file}; setenv initrd_size \${filesize} - xyz_load_dtb=\${boot_fstype}load mmc 0:1 ${dtb_addr} /dtbs/\${dtb_file} - - __EOF__ - fi - - if [ "${uboot_CMD_FS_GENERIC}" ] ; then - cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ - console=DICONSOLE + cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ + console=SERIAL_CONSOLE - mmcroot=/dev/ram0 rw + mmcroot=FINAL_PART ro + mmcrootfstype=FINAL_FSTYPE rootwait fixrtc - xyz_load_image=load mmc 0:1 ${kernel_addr} \${kernel_file} - xyz_load_initrd=load mmc 0:1 ${initrd_addr} \${initrd_file}; setenv initrd_size \${filesize} - xyz_load_dtb=load mmc 0:1 ${dtb_addr} /dtbs/\${dtb_file} + xyz_load_image=${uboot_CMD_LOAD} mmc 0:1 ${kernel_addr} \${kernel_file} + xyz_load_initrd=${uboot_CMD_LOAD} mmc 0:1 ${initrd_addr} \${initrd_file}; setenv initrd_size \${filesize} + xyz_load_dtb=${uboot_CMD_LOAD} mmc 0:1 ${dtb_addr} /dtbs/\${dtb_file} - __EOF__ + __EOF__ - else - cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ - console=DICONSOLE + cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ + console=DICONSOLE - mmcroot=/dev/ram0 rw + mmcroot=/dev/ram0 rw - boot_fstype=${boot_fstype} - xyz_load_image=\${boot_fstype}load mmc 0:1 ${kernel_addr} \${kernel_file} - xyz_load_initrd=\${boot_fstype}load mmc 0:1 ${initrd_addr} \${initrd_file}; setenv initrd_size \${filesize} - xyz_load_dtb=\${boot_fstype}load mmc 0:1 ${dtb_addr} /dtbs/\${dtb_file} + xyz_load_image=${uboot_CMD_LOAD} mmc 0:1 ${kernel_addr} \${kernel_file} + xyz_load_initrd=${uboot_CMD_LOAD} mmc 0:1 ${initrd_addr} \${initrd_file}; setenv initrd_size \${filesize} + xyz_load_dtb=${uboot_CMD_LOAD} mmc 0:1 ${dtb_addr} /dtbs/\${dtb_file} - __EOF__ - fi + __EOF__ if [ ! "${need_dtbs}" ] ; then cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ @@ -1228,8 +1197,7 @@ function populate_boot { if [ "${boot_scr_wrapper}" ] ; then cat > ${TEMPDIR}/bootscripts/loader.cmd <<-__EOF__ echo "boot.scr -> uEnv.txt wrapper..." - setenv boot_fstype ${boot_fstype} - \${boot_fstype}load mmc \${mmcdev}:\${mmcpart} \${loadaddr} uEnv.txt + ${uboot_CMD_LOAD} mmc \${mmcdev}:\${mmcpart} \${loadaddr} uEnv.txt env import -t \${loadaddr} \${filesize} run ${uboot_SCRIPT_ENTRY} __EOF__ @@ -1437,6 +1405,7 @@ function check_uboot_type { case "${UBOOT_TYPE}" in beagle_bx) uboot_SCRIPT_ENTRY="loaduimage" + uboot_CMD_LOAD="fatload" SYSTEM="beagle_bx" board="BEAGLEBOARD_BX" is_omap @@ -1449,6 +1418,7 @@ function check_uboot_type { ;; beagle_cx) uboot_SCRIPT_ENTRY="loaduimage" + uboot_CMD_LOAD="fatload" SYSTEM="beagle_cx" board="BEAGLEBOARD_CX" is_omap @@ -1467,6 +1437,7 @@ function check_uboot_type { ;; beagle_xm_kms) uboot_SCRIPT_ENTRY="loaduimage" + uboot_CMD_LOAD="fatload" SYSTEM="beagle_xm" board="BEAGLEBOARD_XM" is_omap @@ -1480,6 +1451,7 @@ function check_uboot_type { ;; bone) uboot_SCRIPT_ENTRY="loaduimage" + uboot_CMD_LOAD="fatload" SYSTEM="bone" board="BEAGLEBONE_A" is_omap @@ -1516,6 +1488,7 @@ function check_uboot_type { ;; panda_dtb) uboot_SCRIPT_ENTRY="loaduimage" + uboot_CMD_LOAD="fatload" SYSTEM="panda_dtb" board="PANDABOARD" is_omap @@ -1529,6 +1502,7 @@ function check_uboot_type { ;; panda_es) uboot_SCRIPT_ENTRY="loaduimage" + uboot_CMD_LOAD="fatload" SYSTEM="panda_es" board="PANDABOARD_ES" is_omap @@ -1539,6 +1513,7 @@ function check_uboot_type { ;; panda_es_dtb) uboot_SCRIPT_ENTRY="loaduimage" + uboot_CMD_LOAD="fatload" SYSTEM="panda_es_dtb" board="PANDABOARD_ES" is_omap @@ -1551,6 +1526,7 @@ function check_uboot_type { ;; panda_es_kms) uboot_SCRIPT_ENTRY="loaduimage" + uboot_CMD_LOAD="fatload" SYSTEM="panda_es" board="PANDABOARD_ES" is_omap @@ -1565,6 +1541,7 @@ function check_uboot_type { ;; crane) uboot_SCRIPT_ENTRY="loaduimage" + uboot_CMD_LOAD="fatload" SYSTEM="crane" board="CRANEBOARD" is_omap