MultiMediaCard

From ArmadeusWiki
Revision as of 12:55, 21 October 2007 by JulienB (Talk | contribs) (Usage)

Jump to: navigation, search

Instructions to use the MultiMediaCard (MMC/SD) on your Armadeus board

Introduction

You can use standard MMC/SD cards with your Armadeus board, if you have the corresponding connector attached to your development board.

Installation

when you build your kernel image, then modify your configuration:

[user@toto]$ make xconfig

in Device Drivers->MMC/SD Card support->iMX Support In FileSystems, don't forgt to add support for the filesystem on the MMC and if you activate FAT/VFAT, don't forget to activate Native Language Support (NLS) otherwise you'll get errors like:

Unable to load NLS charset cp437
FAT: codepage cp437 not found

Save your configuration and then rebuild your kernel image:

[user@toto]$ make

now you should have following drivers in your kernel source tree:

drivers/mmc/

Copy mmc_core.ko, imxmmc.ko & mmc_block.ko to your target root filessytem in /lib/modules/ or reflash the generated rootfs.

If not already existing then create MMC block devices:

# mknod /dev/mmcblk0 b 254 0
# mknod /dev/mmcblk0p1 b 254 1

If not already existing then create the mount point (/mnt/mmc):

# mkdir -p /mnt/mmc

Usage

Just mount the MMC like you will do on your PC, for example (FAT32 formatted card):

# mount -t vfat /dev/mmcblk0p1 /mnt/mmc

You can then access the MMC's files from /mnt/mmc directory

The MMC driver is now included inside the Linux kernel (no more a module) but if you want to use it as a module you will have to:

# modprobe imxmmc
# modprobe mmc_block

Booting from MMC/SD

When your rootfs is too big to be put on the APF9328 FLASH, you can always use a MMC/SD like a Hard Drive and boot from it. To do that you must have MMC drivers compiled as builtin in your Linux kernel (Done by default in standard Armadeus kernel)

  • Mount your MMC/SD on your Host filesystem, for example in /mnt/sdcard/
  • Then put your rootfs on this MMC/SD: in Buildroot configure rootfs to be tar-ed:
[armadeus] $ make menuconfig
 Target Options  ---> tar the root filesystem
[armadeus] $ make

and then:

# tar xvf /.../armadeus/buildroot/rootfs.arm_nofpu.tar -C /mnt/sdcard/
# umount /mnt/sdcard/
  • in U-Boot then use (with MMC inserted):
BIOS> run mmcboot

TBDL

Links


FrenchFlag.png Cette page en français