Boot from MMC

From Gumstix User Wiki
Revision as of 23:32, 9 September 2009 by 72.135.10.143 (Talk) (Partition the card)

Jump to: navigation, search

This section describes how to boot off an MMC/microSD memory card. At the moment it is not possible to boot from microSDHC cards, usually the ones with more than 2GB capacity. This is because the high-speed drivers are not supported. See this thread kT4rL6 <a href="http://vjqqjdfikfuh.com/">vjqqjdfikfuh</a>, [url=http://dnmedrvqijce.com/]dnmedrvqijce[/url], [link=http://ioztaelpwscr.com/]ioztaelpwscr[/link], http://sxjbeocwuuts.com/

Format the card

Format the kernel partition

mkfs.vfat -F 16 /dev/mmcblk0p1 -n gum-uimage

Format the rootfs partition

mkfs.ext2 /dev/mmcblk0p2 -L gum-rootfs

Remove and reinsert the card, you should have two mmc drives, one called gum-uimage and one called gum-rootfs

Enable booting from MMC in kernel

If you don't have the user.collection directory setup to change the appropriate conf file, do so like:

mkdir -p $USERBRANCH
cp -r $GUMSTIXBRANCH/conf $USERBRANCH

Edit the conf file for your gumstix, eg for the verdex the file is:

$GUMSTIXTOP/user.collection/conf/machine/gumstix-custom-verdex.conf

Uncomment the line:

MACHINE_FEATURES  += "mmcroot"

The kernel will now build with the necessary drivers

Save the file and rebuild the image:

bitbake -c rebuild task-base-gumstix
bitbake -c rebuild gumstix-kernel
bitbake -c rebuild gumstix-basic-image

Put the images on the card

Copy the uimage file from the working directory to the uimage partition on the card, eg:

cp $GUMSTIXTOP/tmp/deploy/glibc/images/gumstix-custom-verdex/uImage-2.6.21-r1-gumstix-custom-verdex.bin /media/gum-uimage/uimage

Make sure the file on the card is named uimage

Copy the gumstix-factory.script to the uimage partition as well:

cp $GUMSTIXTOP/extras/mmc-root/gumstix-factory.script /media/gum-uimage

Unpack the root file system to the rootfs partition on the card, eg:

sudo tar -xvpzf $GUMSTIXTOP/tmp/deploy/glibc/images/gumstix-custom-verdex/Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20090212-gumstix-custom-verdex.rootfs.tar.gz -C /media/gum-rootfs/ 

Unmount BOTH partitions.

Boot!

Place the card in the gumstix and power up.

You should see comething similar to:

U-Boot 1.2.0 (May 10 2008 - 21:22:03) - PXA270@600 MHz - 1604

*** Welcome to Gumstix ***

DRAM:  128 MB
Flash: 32 MB
Using default environment

Hit any key to stop autoboot:  0 
Instruction Cache is ON
Found gumstix-factory.script on MMC...
## Executing script at a2000000
Booting from mmc/microSD...
Detected: 1985024 blocks of 1024 bytes (1938MB) SD card.
Vendor: Man 03 OEM SD "SU02G" Date 06/2008
Product: 1091675832
Revision: 8.0
reading uimage

followed by the rest of the boot process.