
On Wed, Nov 16, 2011 at 7:34 PM, Dirk Behme dirk.behme@de.bosch.com wrote:
On 12.11.2011 11:36, Jason Liu wrote:
Add the initial support for Freescale i.MX6Q Armadillo2 board Support: MMC boot from slot 0/1, debug UART(UART4), usdhc.
...
diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h new file mode 100644 index 0000000..a4c7b31 --- /dev/null +++ b/include/configs/mx6qarm2.h
...
+#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "uimage=uImage\0" \
- "mmcdev=0\0" \
- "mmcpart=2\0" \
- "mmcroot=/dev/mmcblk0p3 rw\0" \
- "mmcrootfstype=ext3 rootwait\0" \
- "mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \
- "root=${mmcroot} " \
- "rootfstype=${mmcrootfstype}\0" \
- "loadbootscript=" \
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}
${script};\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
- "source\0" \
- "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}
${uimage}\0" \
- "mmcboot=echo Booting from mmc ...; " \
- "run mmcargs; " \
- "bootm\0" \
- "netargs=setenv bootargs console=ttymxc0,${baudrate} " \
- "root=/dev/nfs " \
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
- "netboot=echo Booting from net ...; " \
- "run netargs; " \
- "dhcp ${uimage}; bootm\0" \
+#define CONFIG_BOOTCOMMAND \
- "if mmc rescan ${mmcdev}; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loaduimage; then " \
- "run mmcboot; " \
- "else run netboot; " \
- "fi; " \
- "fi; " \
- "else run netboot; fi"
Testing this with the latest mainline kernel and a Linaro developer rootfs I'd like to propose the following changes to these settings [1]:
- Introduce a ${console} variable to centralize the console configuration
- The recent mainline kernel uses ttymxc3 instead of ttymxc0 for the
console. I.e. switch from ttymxc0 to ttymxc3
- Add a 'mmc dev ${mmcdev}' command to be able to switch between the SD
slots
- Use the SD card slot at the CPU board by default. Instead the one on the
expansion base board. I.e. switch from mmcdev=0 to mmcdev=1
- The Linaro rootfs uses EXT4. For this, remove the hard coded
rootfstype=ext3 and let the kernel auto detect the rootfs type.
Best regards
Dirk
[1]
include/configs/mx6qarm2.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
Index: a/include/configs/mx6qarm2.h
--- a/include/configs/mx6qarm2.h +++ b/include/configs/mx6qarm2.h @@ -78,13 +78,12 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ "uimage=uImage\0" \
- "mmcdev=0\0" \
- "mmcdev=1\0" \
- "console=ttymxc3\0" \
"mmcpart=2\0" \
- "mmcroot=/dev/mmcblk0p3 rw\0" \
- "mmcrootfstype=ext3 rootwait\0" \
- "mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \
- "root=${mmcroot} " \
- "rootfstype=${mmcrootfstype}\0" \
- "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
- "root=${mmcroot}\0" \
"loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ @@ -93,7 +92,7 @@ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm\0" \
- "netargs=setenv bootargs console=ttymxc0,${baudrate} " \
- "netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \ "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ "netboot=echo Booting from net ...; " \ @@ -101,6 +100,7 @@ "dhcp ${uimage}; bootm\0" \
#define CONFIG_BOOTCOMMAND \
- "mmc dev ${mmcdev};" \
"if mmc rescan ${mmcdev}; then " \ "if run loadbootscript; then " \ "run bootscript; " \
Thanks for the testing and the suggestion for config file change. I will pull it in the v2 version and put a test-by you into the commit log.
Jason Liu