From bd39f3bea7961b210bcf8c5a0e6c6a2fde12aab7 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Thu, 20 Dec 2012 12:21:37 -0600 Subject: [PATCH] hwpack: imx51-babbage: use new (v2013.01-rc) CMD_FS_GENERIC (load) over (ext2load/fatload) Signed-off-by: Robert Nelson --- hwpack/imx51-babbage.conf | 1 + mk_mmc.sh | 63 ++++++++++++++++++++++++++++----------- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/hwpack/imx51-babbage.conf b/hwpack/imx51-babbage.conf index 7321b0e..a50ad2d 100644 --- a/hwpack/imx51-babbage.conf +++ b/hwpack/imx51-babbage.conf @@ -23,6 +23,7 @@ boot_name="u-boot.imx" boot_image="bootz" boot_script="uEnv.txt" boot_fstype="ext2" +uboot_CMD_FS_GENERIC=1 #http://rcn-ee.net/deb/wheezy-armhf/LATEST-imx kernel_subarch="imx" diff --git a/mk_mmc.sh b/mk_mmc.sh index 51ac535..f962c6d 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -358,30 +358,59 @@ function boot_uenv_txt_template { __EOF__ fi - cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ - console=SERIAL_CONSOLE + if [ "${uboot_CMD_FS_GENERIC}" ] ; then + cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ + console=SERIAL_CONSOLE - mmcroot=FINAL_PART ro - mmcrootfstype=FINAL_FSTYPE rootwait fixrtc + 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} + 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__ + __EOF__ - cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ - console=DICONSOLE + else + cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ + console=SERIAL_CONSOLE - mmcroot=/dev/ram0 rw + 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} + 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__ + __EOF__ + fi + + if [ "${uboot_CMD_FS_GENERIC}" ] ; then + cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ + console=DICONSOLE + + mmcroot=/dev/ram0 rw + + 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/netinstall.cmd <<-__EOF__ + console=DICONSOLE + + 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} + + __EOF__ + fi if [ ! "${need_dtbs}" ] ; then cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__