The bootcmd setting for mx51evk in l-m-c exceeds max args

Bug #659720 reported by Shawn Guo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Medium
Loïc Minier

Bug Description

We currently have following line in mx51evk boot.scr created by l-m-c.

setenv bootcmd 'mmcinfo; mmc init; fatload mmc 0:2 0x90000000 uImage; fatload mmc 0:2 0x90800000 uInitrd; bootm 0x90000000 0x98000000'

When sourcing the boot.scr, we will get the following error in u-boot.

** Too many args (max. 16) **

And the last two addresses will get lost, and it gets us the following bootcmd, which gets u-boot booting kernel from address 0.

bootcmd=mmcinfo; mmc init; fatload mmc 0:2 0x90000000 uImage; fatload mmc 0:2 0x90800000 uInitrd; bootm

Revision history for this message
Shawn Guo (shawnguo) wrote :

Actually, we do not need to add anything before the first "fatload". We set the bootcmd in boot.scr, and boot.scr itself is in mmc boot partition. We have to get mmc ready before doing "fatload boot.scr" in u-boot. In another word, when u-boot runs at the command in boot.scr, the mmc must be already initialized.

As mx51evk u-boot implements generic mmc than legacy one, "mmc rescan 0" should be used to initialize mmc instead of "mmc init". See details and patch for mx51evk default env on https://bugs.launchpad.net/u-boot-linaro/+bug/655461

Revision history for this message
Shawn Guo (shawnguo) wrote :

Fix for this problem is simple, removing "mmcinfo; mmc init;" from setenv bootcmd line.

=== modified file 'linaro-media-create'
--- linaro-media-create 2010-10-12 15:31:29 +0000
+++ linaro-media-create 2010-10-14 01:29:29 +0000
@@ -361,7 +361,7 @@

     mx51evk)
       cat > ${TMP_DIR}/boot.cmd << BOOTCMD
-setenv bootcmd 'mmcinfo; mmc init; fatload mmc 0:2 $KERNEL_ADDR uImage; fatload mmc 0:2 $INITRD_ADDR uInitrd; bootm $KERNEL_ADDR $INITRD_ADDR'
+setenv bootcmd 'fatload mmc 0:2 $KERNEL_ADDR uImage; fatload mmc 0:2 $INITRD_ADDR uInitrd; bootm $KERNEL_ADDR $INITRD_ADDR'
 setenv bootargs '${serial_opts} ${splash_opts} ${lowmem_opt} ${boot_snippet} rootwait ro'
 boot
 BOOTCMD

Loïc Minier (lool)
Changed in linaro-image-tools:
status: New → Fix Released
importance: Undecided → Medium
assignee: nobody → Loïc Minier (lool)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.