Difference between revisions of "MultiMediaCard"
(→Usage) |
(→Performances) |
||
Line 44: | Line 44: | ||
==Performances== | ==Performances== | ||
* [[MMC/SD#Supported_Cards]] | * [[MMC/SD#Supported_Cards]] | ||
+ | |||
+ | ==Troubleshots== | ||
+ | ===VFAT Code Page=== | ||
+ | If you encounter this message or something like that | ||
+ | Unable to load NLS charset cp437 | ||
+ | FAT: codepage cp437 not found | ||
+ | you have to change the right charset for the current file system: | ||
+ | make linux-menuconfig | ||
+ | In ''Device Drivers->MMC/SD Card support->iMX Support'' | ||
+ | |||
+ | In ''FileSystems->Native Language Support'' you can select the right charset: | ||
+ | ex: NLS ISO 8859-1 (Latin 1; Western European Languages) | ||
+ | |||
==Installation (obsolete now because driver is included in default Armadeus kernel)== | ==Installation (obsolete now because driver is included in default Armadeus kernel)== | ||
Revision as of 18:51, 29 May 2008
Instructions to use the MultiMediaCard (MMC/SD) on your Armadeus board
Contents
Introduction
You can use standard MMC/SD/miniSD/microSD cards with your Armadeus board:
- with a DevLight V1 you must have the corresponding connector attached to your development board. and use an adaptor for miniSD and microSD
- with a DevLight V2 you can use the onboard microSD connector
- with a DevFull you can use the MMC/SD onboard connector and an adaptor for miniSD and microSD
All needed drivers are included in standard Armadeus Linux image.
Usage (as a removable mass storage)
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)
- Format your MMC with Ext2 filesystem:
[armadeus] $ sudo mkfs.ext2 /dev/sdxx
- Mount your MMC/SD on your Host filesystem, for example in /media/mmc
[armadeus] $ sudo mkdir -p /media/mmc [armadeus] $ sudo mount /dev/sdxx /media/mmc
- Then put your rootfs on this MMC/SD: in Buildroot configure rootfs to be tar-ed:
[armadeus] $ make menuconfig
Target filesystem options --->
[armadeus] $ make
and then:
[armadeus] $ sudo tar xvf ./buildroot/binaries/armadeus/rootfs.arm.tar -C /media/mmc [armadeus] $ sudo umount /media/mmc
- in U-Boot then use (with MMC/SD/microSD inserted):
BIOS> run mmcboot
- if you want to automatically boot from SD at each startup then replace default bootcmd U-Boot macro:
BIOS> setenv bootcmd run mmcboot BIOS> saveenv
(default bootcmd is run jffsboot)
Performances
Troubleshots
VFAT Code Page
If you encounter this message or something like that
Unable to load NLS charset cp437 FAT: codepage cp437 not found
you have to change the right charset for the current file system:
make linux-menuconfig
In Device Drivers->MMC/SD Card support->iMX Support
In FileSystems->Native Language Support you can select the right charset:
ex: NLS ISO 8859-1 (Latin 1; Western European Languages)
Installation (obsolete now because driver is included in default Armadeus kernel)
When you build your kernel image, then modify its configuration:
[armadeus]$ make linux-menuconfig
in Device Drivers->MMC/SD Card support->iMX Support In FileSystems, don't forget to add support for the filesystem you want to use 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:
[armadeus]$ make linux
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 the 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
Links
Other languages: | |
---|---|
English • Français |