The l-m-c is broken for mx51evk due to the following two bugs. I posted the patches there. Please review the patches and pick them up if they are ok.
The bootcmd setting for mx51evk in l-m-c exceeds max args https://bugs.launchpad.net/linaro-image-tools/+bug/659720
=== 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
imx51 hwpack: bootloader installed incorrectly and configured incorrectly https://bugs.launchpad.net/linux-linaro/+bug/656962
=== modified file 'linaro-media-create' --- linaro-media-create 2010-10-12 15:31:29 +0000 +++ linaro-media-create 2010-10-14 06:27:53 +0000 @@ -503,7 +503,7 @@ ;;
mx51evk) - sudo dd if=binary/usr/lib/u-boot/mx51evk/u-boot.imx of=/dev/mmcblk0 \ + sudo dd if=binary/usr/lib/u-boot/mx51evk/u-boot.imx of=${MMC} \ bs=1024 seek=1 sudo mkimage -A arm -O linux -T kernel -C none -a 0x90008000 \ -e 0x90008000 -n Linux \
Dear Shawn Guo,
In message AANLkTimK0HqF69uzq8oiD0TWaxUUXTsN1zzu_5ZeuMkN@mail.gmail.com you wrote:
The l-m-c is broken for mx51evk due to the following two bugs. I posted the patches there. Please review the patches and pick them up if they are ok.
The bootcmd setting for mx51evk in l-m-c exceeds max args https://bugs.launchpad.net/linaro-image-tools/+bug/659720
=== 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
Another trivial change is just to omit some of the redundant spaces in the command line: s/; /;/g
i.e. change into
setenv bootcmd 'mmcinfo;mmc init;fatload mmc 0:2 $KERNEL_ADDRuImage;fatload mmc 0:2 $INITRD_ADDR uInitrd;bootm $KERNEL_ADDR
The correct way to fix this is of course to submit a patch to U-Boot to increase the CONFIG_MAX_ARGS option.
Best regards,
Wolfgang Denk
Thanks for the comment, Wolfgang.
Agreed that u-boot needs a patch to increase CONFIG_MAX_ARGS. But my point is that it's not necessary to put "mmcinfo; mmc init;" in the command, as I explained like below on the bug page. With that removed, the current CONFIG_MAX_ARGS still fits.
Quote from https://bugs.launchpad.net/linaro-image-tools/+bug/659720: 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 the 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
On Thu, Oct 14, 2010 at 12:36 PM, Wolfgang Denk wd@denx.de wrote:
Dear Shawn Guo,
In message AANLkTimK0HqF69uzq8oiD0TWaxUUXTsN1zzu_5ZeuMkN@mail.gmail.com you wrote:
The l-m-c is broken for mx51evk due to the following two bugs. I posted the patches there. Please review the patches and pick them up if they are ok.
The bootcmd setting for mx51evk in l-m-c exceeds max args https://bugs.launchpad.net/linaro-image-tools/+bug/659720
=== 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
Another trivial change is just to omit some of the redundant spaces in the command line: s/; /;/g
i.e. change into
setenv bootcmd 'mmcinfo;mmc init;fatload mmc 0:2 $KERNEL_ADDRuImage;fatload mmc 0:2 $INITRD_ADDR uInitrd;bootm $KERNEL_ADDR
The correct way to fix this is of course to submit a patch to U-Boot to increase the CONFIG_MAX_ARGS option.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de The price of curiosity is a terminal experience. - Terry Pratchett, _The Dark Side of the Sun_
On Thu, Oct 14, 2010, Shawn Guo wrote:
Quote from https://bugs.launchpad.net/linaro-image-tools/+bug/659720: 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.
So it means we have to track which platforms use which MMC init command; how ugly :-/ is there a way we could test for it?
In fact, I don't understand the need for mmc rescan and mmc init at all; why can't this simply be done when mmc accesses are done?
On 14 October 2010 10:38, Loïc Minier loic.minier@linaro.org wrote:
So it means we have to track which platforms use which MMC init command; how ugly :-/ is there a way we could test for it?
Can't we just define this incompatibility as a bug in uboot and get it fixed? :-)
-- PMM
Unless I am mistaken the mmc init vs mmc rescan should not be an issue if the default env in u-boot is correct. As background, legacy mmc drivers need mmc init and new generic mmc drivers need mmc rescan. I agree that this change is annoying, however the difference can be handled in the default env. See the patch "ARMV7: OMAP4: Use generic mmc driver on Beagle" for details:
http://www.sakoman.com/cgi-bin/gitweb.cgi?p=u-boot.git%3Ba=commitdiff%3Bh=cc...
On Thu, Oct 14, 2010 at 3:38 AM, Loïc Minier loic.minier@linaro.org wrote:
On Thu, Oct 14, 2010, Shawn Guo wrote:
Quote from https://bugs.launchpad.net/linaro-image-tools/+bug/659720: 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.
So it means we have to track which platforms use which MMC init command; how ugly :-/ is there a way we could test for it?
In fact, I don't understand the need for mmc rescan and mmc init at all; why can't this simply be done when mmc accesses are done?
-- Loïc Minier
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
On Sat, Oct 16, 2010, John Rigby wrote:
Unless I am mistaken the mmc init vs mmc rescan should not be an issue if the default env in u-boot is correct. As background, legacy mmc drivers need mmc init and new generic mmc drivers need mmc rescan. I agree that this change is annoying, however the difference can be handled in the default env. See the patch "ARMV7: OMAP4: Use generic mmc driver on Beagle" for details:
Why does one need to call mmc init or mmc rescan explicitly?
Hi Shawn,
I tried your linaro-media-create changes ... I put them in this branch: https://code.launchpad.net/~dave-martin-arm/linaro-image-tools/mx51evk-fixes
There are still a couple of errors which stop correct installation of u-boot when using linaro-media-create --image_file.
I still couldn't get a bootable system though. The U-Boot environment didn't get set up correctly.
Do you have any thoughts? More details and a run log from linaro-media-create are here: https://bugs.launchpad.net/u-boot-linaro/+bug/656962
Cheers ---Dave
Hi Dave,
On Thu, Oct 14, 2010 at 9:13 PM, Dave Martin dave.martin@linaro.org wrote:
There are still a couple of errors which stop correct installation of u-boot when using linaro-media-create --image_file.
I always use l-m-c with --mmc, never --image_file. Will have a try later.
I still couldn't get a bootable system though. The U-Boot environment didn't get set up correctly.
Honestly, we are still far away from a bootable system. Besides above two bug fixes, we have tot address the following things to get a bootable mx51evk headless.
- Correct the default mx51evk u-boot env to mmc boot I posted the patch on https://bugs.launchpad.net/u-boot-linaro/+bug/655461/comments/10
- Linaro mx51evk kernel has no mmc driver available yet. I applied patches sent out by Zhu Richard on linux-arm (still under review)
- mii_bus fails to register on imx51 (https://bugs.launchpad.net/linux-linaro/+bug/655641) Remove CONFIG_FIXED_PHY can work around the issue
- mx51evk booting stops at mountall (https://bugs.launchpad.net/linux-linaro/+bug/659799) The following supports need to be added to fix the problem.
CONFIG_TMPFS CONFIG_DEVTMPFS CONFIG_DEVTMPFS_MOUNT
- No serial console login is available. I was told to fix the problem by change line #15 in /bin/auto-serial-console as below. tty[A-Z]* ) --> tty[a-zA-Z]* )
And there are some issues I'm still trying to confirm:
- The root UUID seems not working for me, and I have to use root=/dev/mmcblk0p3 in kernel cmdline. - System gets reboot after running (idle) for ~40 minutes.
Hi,
On Thu, Oct 14, 2010 at 3:14 PM, Shawn Guo shawn.gsc@gmail.com wrote:
[...]
Honestly, we are still far away from a bootable system. Besides above two bug fixes, we have tot address the following things to get a bootable mx51evk headless.
Ah, OK --- looks like I may have misunderstood the status of imx51.
Can I suggest that we stop offering the iMX51 configurations for testing on qa.linaro.org, or at least have a prominent note somewhere on the qa tracker mentioning the known problems?
Since I have an mx51evk board I've been trying to test these, but this just wastes time if the images are known not to work...
We can add them back into the list when there's enough functionality for the regular test procedure to succeed?
Cheers ---Dave
Hi Shawn,
I tried your linaro-media-create changes ... I put them in this branch: https://code.launchpad.net/~dave-martin-arm/linaro-image-tools/mx51evk-fixes
There are still a couple of errors which stop correct installation of u-boot when using linaro-media-create --image_file.
I still couldn't get a bootable system though. The U-Boot environment didn't get set up correctly.
Do you have any thoughts? More details and a run log from linaro-media-create are here: https://bugs.launchpad.net/u-boot-linaro/+bug/656962
Cheers ---Dave