SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By theta
#34149
My EP9302 board works very well. Only the SD/MMC card doesn't
work. I tried some kernels, one compiled by myself with this
options enabled, but nothing happened:
MMC/SD Card Support --->
<*> MMC Support
<*> MMC block device driver
<*> ARM AMBA Multimedia Card Interface support

Is the SD/MMC slot supported by 2.6 kernels?

Regards
By FPGA
#42731
Hello!
I have CS-EP9302 Rev.A board and have some trouble with newest kernels...
Original 2.6.8 kernel works fine + customized by myself and compiled with Crater - 2.6.17 kernel also works fine. BUT, when I using 2.6.20 Linux do not starting... =(
I found this nice document about 2.6.24 kernel and patch at http://dev.ivanov.eu/projects/cs-e9302/ and followed it excatly line by line with the only exception zImage instead of uImage, because I'm using original RedBoot from the board with no changes. The compiler was used is /usr/local/arm/4.1.1-920t/bin/arm-linux-
I successfully received zImage - I put it in place of old-robustly-working 2.6.8 linux image but it's no working... Help me, please, I'm newbie and can't solve this trouble...
Here is output from minicom:
Code: Select all
+Ethernet eth0: MAC address 00:00:00:00:54:33
IP: 192.168.0.4/255.255.255.0, Gateway: 192.168.0.3
Default server: 192.168.0.3, DNS server IP: 192.168.0.3

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version v2_0 - built 08:14:43, Aug 22 2006

Platform: Cirrus Logic EDB9302 Board (ARM920T) Rev A
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x02000000, 0x00041e68-0x01fdd000 available
FLASH: 0x60000000 - 0x61000000, 128 blocks of 0x00020000 bytes each.
== Executing boot script in 10.000 seconds - enter ^C to abort
RedBoot> ping -n 5 -h 192.168.0.3
Network PING - from 192.168.0.4 to 192.168.0.3
PING - received 5 of 5 expected
RedBoot> load -v -r -m tftp -h 192.168.0.3 zImage -b 0x00042000
|
Raw file loaded 0x00042000-0x001cb4bf, assumed entry at 0x00042000
RedBoot> load -v -r -m tftp -h 192.168.0.3 ramdisk.gz -b 0x00800000
\
Raw file loaded 0x00800000-0x00ae6290, assumed entry at 0x00800000
RedBoot> exec -r 0x00800000 -s 0x00300000 -b 0x00042000 -l 0x00200000 -c "console=ttyAM root=/dev/ram"
Uncompressing Linux...................................................................................................... done, booting the kernel.

 
And nothing more happening...
Command line args to kernel is the same as for 2.6.8 and 2.6.14 kernels I used before, "console=ttyAM root=/dev/ram"
By tequilaguru
#43847
If you have the filesystem in the card, you should point root to it. then it should boot.

exec -c "console=ttyAM root=/dev/mmcblk0p1 rootdelay=5"

I noticed there is a bug when reading/writing the rootfs, after some load the card stops responding. Could someone reproduce this?.
By bolatd
#44135
Hi,
If you would like to use SD/MMC memory support for CS-E9302 without any problem as in http://dev.ivanov.eu/projects/cs-e9302/, you should use edb9302 patched U-Boot as bootloader and install eldk (Embedded Linux Development Kit) to compile both linux kernel and U-boot succesfully.
ELDK and U-boot can be obtained from http://www.glomationinc.com/support.html
The compiler you used "/usr/local/arm/4.1.1-920t/bin/arm-linux-" is not capable to create uImage from zImage, so you must install eldk in your system.
You may edit "u-boot-1.2.0/include/configs/edb9302.h" file to determine default u-boot environment varibles.
You may use cirrus logic download utility to burn u-boot.bin into strata flash memory.
~$./download -b 57600 -o 0k -p S0 u-boot.bin
Some USB to Serial converter provide some problems doe to its voltage converter.
Sincerely
Bolat DINC
By FPGA
#45506
tequilaguru and bolatd, thank you very much for your reply!
I have downloaded U-boot from http://www.glomationinc.com/Support/u-b ... 02.tar.bz2 but there are no ELDK on this page. But I found ELDK on this site: http://www.denx.de/wiki/view/DULG/ELDKAvailability
Is this: http://mirror.switch.ch/ftp/mirror/eldk ... -linux-x86 - exaсtly what I need? I should download arm-2007-01-21.iso or arm-2007-01-21-src.iso ? :)
By bolatd
#46544
Hi FPGA,
You can use arm-2007-01-21.iso.
Mount arm-2007-01-21.iso file into a temporary directory. (as a root user)
You can see the installation instructions and the install scripts in this directory.
Sincerely.
Bolat DINC
By FPGA
#46712
10x bolatd
I have already downloaded this. But... I found that the kernel could be built without any special software. uImage for u-boot built without ELDK with help of plain "/usr/local/arm/4.1.1-920t/bin/arm-linux-" + path to "mkimage" from u-boot in PATH environment variable.
So, I have successfully boot my new uImage with u-boot and it works :)
Unfortunately, I encountered with several problems...

1) prepatched for EDB9302 u-boot 1.2.0 works fine through serial port and TFTP, BUT... utility for y-modem download and kermit is not working... and any second (2nd) TFTP transfer through TFTP hangs!!! =(
Code: Select all
U-Boot 1.2.0 (Apr  7 2008 - 01:56:38)

DRAM:  32 MB
Flash: 16 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
TFTP from server 192.168.1.1; our IP address is 192.168.1.2
Filename 'uImage'.
Load address: 0x200000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #######################################################
done
Bytes transferred = 1610992 (1894f0 hex)
EDB9302> tftp 0x400000 ramdisk
TFTP from server 192.168.1.1; our IP address is 192.168.1.2
Filename 'ramdisk'.
Load address: 0x400000
Loading: #
And nothing more...
How to solve this problem? Where I can obtain latest version of u-boot with support of EDB9302??? Or how to move support for EDB9302 to latest u-boot 1.3.1?..
So, I can only download my kernel, but there are no possibility to send ramdisk image... =(((
With old redboot my tftp server could serve many many files many times...

2) Then I tried to place root fs in SD card...
I bought Kingston 1 GB SD card and formatted it as in instruction (and placed Debian on it). Then I downloaded kernel image with help of TFTP (tftp working only once in my u-boot build, only one file... =((( ) and changed bootargs to place root fs at SD card...
Card itself works fine through my USB card reader on my desktop Linux, but when boot it shows me:
Code: Select all
Waiting 5sec before mounting root device...
mmc_attach_sd
mmc_attach_sd BUG_ON(!host);
mmc_attach_sd WARN_ON(!host->claimed);
mmc_attach_bus(host, &mmc_sd_ops);
err = mmc_sd_init_card(host, host->ocr, NULL);
SD ERROR!!!
mmc0: error -84 whilst initialising SD card
And then kernel panic, no rootfs of course...
I heavily commented with printk sd card driver and searching place of error and it's reasons, but is there someone who know how to fix that?
By bolatd
#48453
Hi,
There is a bug in tftp routines in u-boot in this version, so you cannot download binary images via tftp twice.
Now I have been trying to figure out what is bug in u-boot via arm-linux-gdb.
Another issues about SD/MMC card patch that there is a bug read/write block routines in the patch. I have ran into same problem, so i left sd/mmc root file system support and i use USB stick as a root file system by enabling USB mass storage support kernel configuration.
That is all for now.
Take Care.
Bolat DINC
By FPGA
#48586
Oh, thanks for info :)
P.S. How often you visiting this forum and this topic?
Fri Mar 28, Wed Apr 16, Sat Apr 19, Sat May 17 and 20 May... :roll:
By bolatd
#48677
Hi,
Sorry for the latency.
Sincerely.
Bolat DINC
By FPGA
#48731
Dou you know how to fix this problem with SD/MMC driver?
BTW, author of the patch, ivanovp, is not responding on mail messages and not visiting this forum, sad... =(
P.S.
I'm also using my SD card for rootfs through USB card reader as "USB mass storage" + using NFS as rootfs - very convenient thing, it's better than any flash during development time... :)
By bolatd
#48743
Hi FPGA,
I actually don`t know what is the problem SD/MMC patch.
I am trying to figure out what is the problems in both u-boot and SD/MMC patch for the linux kernel by using arm-linux-gdb and OpenOCD.
As you know OpenOCD has a GDB server and by using the elf file with arm-linux-gdb, you can manage to debug a remote embedded system.
Now i crashed into remote debug problem, cause i cannot insert a hardware break point in u-boot flash resident code.
If you know any information about remote debugging using OpenOCD and arm-linux-gdb, it will be so FINE ;)
Thanks
Bolat DINC
By FPGA
#48908
bolatd wrote:Hi FPGA,
I actually don`t know what is the problem SD/MMC patch.
I am trying to figure out what is the problems in both u-boot and SD/MMC patch for the linux kernel by using arm-linux-gdb and OpenOCD.
As you know OpenOCD has a GDB server and by using the elf file with arm-linux-gdb, you can manage to debug a remote embedded system.
Now i crashed into remote debug problem, cause i cannot insert a hardware break point in u-boot flash resident code.
If you know any information about remote debugging using OpenOCD and arm-linux-gdb, it will be so FINE ;)
Try to use printk :wink:
Have you already inserted printk in most important parts of MMC driver? I think this simple approach could be helpful...
Sorry, I have J-link clone JTAG adapter but on my way to get it works in my desktop Linux (originally it available only in windows)... So, I dont have practice with GDB + OpenOCD yet...
By Carlov
#58149
Message removed by Carlov
Last edited by Carlov on Sat Apr 18, 2009 6:05 am, edited 2 times in total.