Hi, I'm in trouble with the "boot from sd" issue.
I have a board that boot from ssp0 sd card. Fortunately I've a eeprom in my pcb.
I've programmed the eeprom with the freescale provided patch:
but the boot still fail when try to mount root fs.
No filesystem could mount root, tried: ext3 ext2 vfat msdos iso9660 ntfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
[<c00344a8>] (dump_backtrace+0x0/0x114) from [<c03f1330>] (dump_stack+0x18/0x1c)
r7:c04a59ae r6:00008000 r5:c7c16022 r4:c05663d8
[<c03f1318>] (dump_stack+0x0/0x1c) from [<c03f13ac>] (panic+0x78/0xf4)
[<c03f1334>] (panic+0x0/0xf4) from [<c000902c>] (mount_block_root+0x1d8/0x218)
r3:00000000 r2:00000020 r1:c7c27f60 r0:c04a5a55
[<c0008e54>] (mount_block_root+0x0/0x218) from [<c0009130>] (mount_root+0xc4/0xf c)
[<c000906c>] (mount_root+0x0/0xfc) from [<c00092d4>] (prepare_namespace+0x16c/0x 1c4)
[<c0009168>] (prepare_namespace+0x0/0x1c4) from [<c00084f8>] (kernel_init+0x128/ 0x170)
[<c00083d0>] (kernel_init+0x0/0x170) from [<c005010c>] (do_exit+0x0/0x6dc)
Obviously the sd and the root fs is ok, I've already done all the hardware controls and I'm sure is all right. I'm sure that the boot is from eeprom, because I've controlled it with an oscilloscope.
I've found only a solution, if I make a reset after the kernel panic, the board reboots itself and the boot process is ok.
Anyone have a solution that works for this incredibly (no fix scheduled) problem?
Thanks to all in advance.
which version of BSP or kernel are you using? Have you try the latest BSP?
what type of your rootfs? ext3 or ext4 will be more stable.
have you try different SD cards?
I use LTIB 2.6.35_10.12.01 BSP, my rootfs is formatted in ext3.
I tried several sd cards on my board and on EVK.
I've used kingston, verbatim and samsung micro sd card class 4. And also a team micro sd card class 10.
I'am waiting some industrial micro sd cards for other tests.
Some sd cards have problems on some of my board but not on others.
The same sd cards sometimes works without problem on the EVK, sometimes not.
I've noted that sd cards class 10 seems to work better.
The kernel is always loaded without problem, Only when it load the rootfs the kernel panic appear.
I've also tried with and without the boot from eeprom, but the result is the same.
When the system start, I'm able to execute my program without any error. My program fill the 80% of the ram present in the board. That's why I think my ram is ok.
What I don't understand is this.
If my board goes to panic, if I made a reset, the board reboot itself and the next boot is always ok.
Another thing that i don't understand is this.
The patch tell me that the problem is in clock polarity at startup.
""When boot mode is set as boot from SD/eMMC on SSP0/1, the SSP_SCK polarity is not correctly setup in ROM. The POLARITY bit in HW_SSP_CTRL1 register should be set to “1” – command and data output on falling edge of clock – according to SD and eMMC specification. However the POLARITY bit is set to “0” in ROM in existing silicon (TO1.2). As a result, input setup time (tISU) at SD/eMMC input may not be met.""
Ok, but why this affects the mount of the rootfs? The linux kernel don't set this register correctly?
Thanks in advance.
Did you apply the patches for 10.12?
There is a newer version of BSP, you may try to use the newer version (L2.6.35_1.1.1) .
I'm trying the demo kernel and it seems to work perfectly on 3 different sd cards.
Now I will try to recompile the kernel with ltib and retest the system.
Thanks for the hint!
I think that patch has not relation to rootfs problem.
These may be signal inegrity issues, so recommended to check
signals by oscilloscope. These may be brownout issues,
due to ripples o power supplies lines.
One can try to test SD transfers with OBDS test
"IMX_OBDS : On-Board Diagnostic Suit for the i.MX28"
As I expected.
I referred to this patch because in the past I had asked to a freescale FAE, and he told me to try this patch.
Thanks for your help.
Now I'm trying to run the obd tests.
In the pdf attached there is a link for get Sourcery G++ Lite 2008q3-66 (http://compass.freescale.net/go/217844329), but this link isn't working.
Do you know where I can find this program?
There is a chance to compile obd with the tools included in ltib?
Another question, do you know how to debug linux kernel directly on the board with jtag? I have the keil ulink pro jtag probe.
I think you can easily port obds (just one sd test) to keil,
it is not big size. Regarding debug it may be useful to check