Microbit_Ubuntu wrote:
My problem is not with the SD card quality, but, with the way they have
been partitioned.
Linux/dumpe2fs showed that the bootable [Fedora-2.6.15] 2GB SD cards had
inode_size = 128, whereas the delinquent [Ubuntu-2.6.27] SD cards had
inode_size = 256. Adding a "-I 128" switch to mkfs.ext3 in the script
that prepares and loads the SD cards solved the problem. That is, our
SBCs can now boot from Ubuntu prepared SD cards. However, this brings up
the point that, somewhere along the line, the default inode_size for SD
cards is no longer 128 bytes. It could be double, quadruple or more.
There is some suspicious code in the U-Boot ext2fs.c/ext2fs_read_inode():
inodes_per_block = EXT2_BLOCK_SIZE (data) / 128;
However, when this was replaced by
inodes_per_block = EXT2_BLOCK_SIZE (data) / INODE_SIZE(data);
..the 2GB/128 byte inode SD cards booted and the 2GB/256 byte inode SD
cards didn't. Obviously there is something else at play which eludes me.
I have posted on the http://www.denx.de/wiki/U-Boot mailing list, in the
hopes they can shed some light on the subject. I shall keep you informed
if there is any progress.
Bfn,
Bob Furber
Hi Bob,
On Sun, 2009-08-09 at 17:22 -0700, Bob Furber wrote:
I am not sure where to turn on this baffling problem.
It seems that ext2fs partition layout or information on 2GB SD cards has
changed over time.
I have been using an old Fedora Linux PC (Fedora Core 2.6.15) to
partition SD cards and load uClinux onto them and our SBCs are quite
happy booting uClinux from these cards; even 2GB SD cards.
The problem started when we started using a new Ubuntu LinuxPC (2.6.27).
Our SBCs are quite happy booting uClinux from these cards ..EXCEPT for
2GB SD cards.
A SD card partitioned on the old Fedora Linux PC is unreadable on the
new UbuntuPC
A SD card partitioned on the UbuntuPC is READABLE on the old Fedora
Linux PC
Our SBCs cannot find /boot/linix.bin on a 2GB SD card prepared
(partitioned & loaded with uClinux) on the new UbuntuPC
Our SBCs CAN find /boot/linix.bin on a 256MB SD card prepared on the new
UbuntuPC
Our SBCs CAN find /boot/linix.bin on a 2GB SD card prepared on the old
Fedora Linux PC
And, yes, the same scripts are used on both Linux PCs and we have taken
into account the csd.rd_bl_len kludge used by 2GB SD cards to represent
the greater capacity. This is why 2GB SD cards loaded on our old Fedora
Linux PC happily boot on our PCs.
The SBCs use a modified dBUG monitor to boot uClinux from an SD card.
The modifications to dBUG were carried out in 2005 and consisted of
adding some SD card APIs and files lifted from U-boot and massaged:
cmd_ext2.c, ext2fs.c, dev.c, part.c & part_dos.c.
Has anyone come across this problem?
Thanks,
Bob Furber
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
I can't really give any specific help other than what you already tried, but
I have been in a similar situation.
I got some Olin 2 GB cards a little while ago and existing firmware I had
running (using SPI)
totally refused to run properly. Like you, I allowed the "hack" on the block
length
in CSD. My good old trusty card reader doesn't like the cards either.
I spent a bit of time stepping around further in my code but I never pinned it
down
as to where these 2 GB cards went to lala land. I gave up I must say... too
irritating.
A look at the card vendor's URL revealed they expect the consumer to buy
"their" card reader
products, which of course is a joke.
The last I checked, the consensus is/was that the 2 GB cards arena is a big
mess. Apparently,
more don't work than ones that actually do....
Seemed to me might as well move to HC... ?
I certainly appreciate/sympathise - I found it very irritating to say the least
:
These cards are sold with the SD spec logo - but they don't __comply__ !!!
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev