2007-10-31 12:04:42 Loading uClinux Kernel from MMC/SD on BF537
Steve Strobel (UNITED STATES)
Message: 46208 Is the MMC interface supported by U-Boot for the Blackfin? I am using a SD (secure digital) card on a custom BF537 board. It works fine from uClinux (I have tested FAT, VFAT, JFFS and EXT2 filesystems on it). I tried accessing those filesystems from U-Boot, hoping to be able to load a uClinux kernel image from them. I found examples of listing files and loading kernel images on the ARM platform with the command "mmcinit" followed by "ls" and "fsload" (for JFFS), "ext2ls" for ext2, and "fatls" and "fatload" (for FAT), but I haven't found the same on Blackfin.
I had to enable the appropriate filesystems in U-Boot to get those commands to be recognized, but even after doing that, I continued to get errors like:
serial_bf537> fatls mmc 0
** Invalid boot device **
Looking at the source for those commands, it appears that they need CONFIG_MMC to be defined at compile time to add the needed support. I tried defining CONFIG_MMC in my include/configs/<target>.h file (which is derived from the BF537 Stamp version) and got linker errors on the functions mm2info, mmc_write, mmc2info, mmc_read, and mmc_init. They seem to be defined only in cpu/pxa/mmc.c (nowhere in the Blackfin part of the tree). Does that mean that the MMC functions aren't supported in U-Boot for Blackfin at all, or am I missing something? I am using U-Boot 1.1.6-svn23 (ADI-2007R1).
This is relevant for me because I currently have only a small SPI flash on my board for U-Boot. I planned to fetch the kernel from SD using U-Boot. Getting uClinux to mount its rootfs from the SD isn't a problem. If U-Boot doesn't support loading the kernel image from SD, I guess my options are to add that support, or to use a larger SPI flash so it can hold the kernel too. Any other suggestions? Is it possible to load a raw kernel image from SD (without using a filesystem) as it is with SPI or parallel flash?
Instructions for "Booting from SD" on OpenMoko: <http://wiki.openmoko.org/wiki/Booting_from_SD>.
"mmcinit" and "fatload mmc 1 a2000000 uboot.bin" used at <http://osdir.com/ml/distributions.gumstix.general/2004-09/msg00103.html>
"mmcinit", "fatls mmc 1" and "fatload mmc 1 a2000000 rootfs.arm_nofpu.jffs2" used at <http://docwiki.gumstix.org/Replacing_the_filesystem_image#Flashing_from_MMC>
"mmcinit" and "ext2ls mmc 0" used at <http://wiki.openmoko.org/wiki/Bootloader#MMC.2FSD>.
2007-10-31 13:22:42 Re: Loading uClinux Kernel from MMC/SD on BF537
Anders Larsson (SWEDEN)
Message: 46214 Have a look at the patch for U-Boot our developer Axel posted called "MMC support for FAT16 with partitions and several related bugfixes". It was rejected (listed as closed) but contains all the functionality you need.
2007-10-31 13:40:34 Re: Loading uClinux Kernel from MMC/SD on BF537
Steve Strobel (UNITED STATES)
Message: 46215 Thanks, Anders, for the pointer to the patch. Do you know if it will also support other filesystems? I have been concerned about using FAT16 on SD because of its lack of wear leveling and power-fail safety. (http://www.aleph1.co.uk/lurker/message/20031229.175452.34bfe45e.en.html says that Sandisk SD cards don't do wear leveling). Are my concerns unfounded in your opinion?
2008-01-23 10:46:45 Re: Loading uClinux Kernel from MMC/SD on BF537
Karol Bizewski (POLAND)
Message: 50035 Hello! I have tested partition patch, but it doesn't work for me. I made 2 partition on MMC. When i run fatload mmc 1:1 ... u-boot says that there is only one raw FAT partition.
How to fix it?