Using MMC/SD card with Olimex CS-E9302
This is an archive page. You will be redirected to the current one in a few seconds.
I have added MMC/SD card support for Olimex's CS-E9302. I successfully booted Debian GNU/Linux Etch from an SD card, log is here.
Warning: this is an experimental code!
linux-2.6.24-rc8_ep93xx_mmc.patch.gz: Patch for kernel 2.6.24-rc8 (2.6.24.x) can be downloaded here. Card detection is working in this version!
cs-e9302_root2.tar.gz: I removed the udev daemon, because it caused errors. It is a root filesystem for CS-E9302 which contains Debian Etch. It
is based on the root filesystem of SAM9-L9260. Username: root, password: olimex.
linux-2.6.24-rc7_ep93xx_mmc.patch.gz (old): Patch for kernel 2.6.24-rc7 can be downloaded here. Card detection does not work, thus you must insert
your card before booting and you should not remove the card.
(old): There is a root filesystem for CS-E9302 which contains Debian
Etch. It is based on the root filesystem of SAM9-L9260. Username: root, password: olimex.
u-boot-1.3.3_cs-e9302.patch: Patch for U-Boot 1.3.3 to support CS-E9302 boards.
You can report bugs on Sparkfun's forum.
Cirrus Logic's GCC compiler downloaded and installed (http://arm.cirrus.com/files/tools/arm-linux-gcc-4.1.1-920t.tar.bz2) or ELDK >= 4.0 (http://www.denx.de/wiki/view/DULG/ELDKAvailability http://ftp.sunet.se/pub/Linux/distributions/eldk/4.1/arm-linux-x86/iso/arm-2007-01-21.iso)
I used Debian GNU/Linux 4.0 Etch, but other Linux distributions should work.
I recommend to use U-Boot. You can download the patch here for U-Boot 1.3.3.
How to compile the kernel?
- Download, unpack Linux 18.104.22.168 and apply the patch.
- Configure the kernel
- Compile the kernel
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-22.214.171.124.tar.bz2
Instead of uImage you can create zImage or whatever you want.
$ wget http://dev.ivanov.eu/projects/cs-e9302/linux-2.6.24-rc8_ep93xx_mmc.patch.gz
$ tar -xjf linux-126.96.36.199.tar.bz2
$ cd linux-188.8.131.52/
$ zcat ../linux-2.6.24-rc8_ep93xx_mmc.patch.gz|patch -p1
patching file arch/arm/mach-ep93xx/core.c
patching file cs-e9302_kernel_config
patching file drivers/net/arm/ep93xx_eth.c
patching file drivers/net/arm/ep93xx_eth.h
patching file drivers/spi/Kconfig
patching file drivers/spi/Makefile
patching file drivers/spi/spi_ep93xx.c
patching file include/asm-arm/arch-ep93xx/ep93xx-regs.h
$ cp cs-e9302_kernel_config .config
$ make ARCH=arm oldconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux- uImage
How to copy root filesystem to MMC/SD card?
Your device node can be sda1, sdc1 instead of sdb1! Be careful!
- Backup your MMC/SD card. All files will be deleted!
- Download, unpack the root filesystem.
- Mount card and untar package.
- Umount card.
Note: You can
change the partition type to 0x83 (Linux) with fdisk, but it is not
$ wget http://dev.ivanov.eu/projects/cs-e9302/cs-e9302_root2.tar.gz
$ mkfs.ext3 -L root /dev/sdb1
$ mount /dev/sdb1 /mnt
$ cd /mnt
$ tar -xjf ~/cs-e9302_root2.tar.gz
$ umount /mnt
How to boot the kernel?
You should use the following boot arguments if you want to use your MMC/SD card as root filesystem:
console=ttyAM root=/dev/mmcblk0p1 rootdelay=5