* [U-Boot] Problems with ext2ls & SD
@ 2009-03-26 18:52 DVM
2009-03-28 12:52 ` DVM
0 siblings, 1 reply; 5+ messages in thread
From: DVM @ 2009-03-26 18:52 UTC (permalink / raw)
To: u-boot
Hi
I am working on a port of 1.3.4 to the LPC313x and I am having some trouble
with the ext2fs. U-Boot reads blocks 0x00, 0x02, 0x08, 0x200. I modified the
code to dump the block data as it is read & verified that the data is
correct.
The ext2ls command returns nothing, I guess thats because block 0x200 is
full of zeros bt that Linux box is quite happy to read the SD card. Can
anyone help?
LPC3131EA # mmcinit
Card Detection Results:
CID: 2475 10000001 53442020 1a505175
CSD: 964000bb 6db7ff9f 5f5983c4 2f0032
card_type: 1
rca: b368
speed: 25000000
block_len: 200
device_size: 3c480000
blocknr: 1e2400
LPC3131EA # ext2ls mmc 0:0
get_dev: mmc
Using device mmc 0:0, directory: /
ext2fs_set_blk_dev 0
<s:2, o:0, l:204>
mci_read_blocks 2
Read 200 bytes
80 F1 00 00 80 C4 03 00 39 30 00 00 1C B4 03 00 75 F1 00 00 00 00 00 00 02
00 00 00 02 00 00 00 00 80 00 00 00 80 00 00 30 1E 00 00 DF AD C3 49 7A C2
C3 49 04 00 25 00 53 EF 00 00 01 00 00 00 6F AD C3 49 00 4E ED 00 00 00 00
00 01 00 00 00 00 00 00 00 0B 00 00 00 00 01 00 00 38 00 00 00 02 00 00 00
03 00 00 00 22 19 EA 74 80 82 4D 8F 82 A0 37 89 42 C3 79 92 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 43 4E 34 17 16 16 48 46 A2 FD F2 9D D1 86
47 FB 01 00 00 00 00 00 00 00 00 00 00 00 6F AD C3 49 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1C 00
1C 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
ext2fs read inode 1
ext2fs read blockgroup
<s:8, o:0, l:32>
mci_read_blocks 8
Read 200 bytes
3E 00 00 00 3F 00 00 00 40 00 00 00 D7 7D 25 1E 02 00 04 00 00 00 00 00 00
00 00 00 00 00 00 00 3E 80 00 00 3F 80 00 00 40 80 00 00 DD 7D 30 1E 00 00
04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 01 00 02 00 01
00 1B 7E 30 1E 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 3E 80 01 00
3F 80 01 00 40 80 01 00 DD 7D 30 1E 00 00 04 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 02 00 01 00 02 00 02 00 02 00 1B 7E 30 1E 00 00 04 00 00 00
00 00 00 00 00 00 00 00 00 00 3E 80 02 00 3F 80 02 00 40 80 02 00 DD 7D 30
1E 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 01 00 03 00
02 00 03 00 1B 7E 30 1E 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 3E
80 03 00 3F 80 03 00 40 80 03 00 5D 42 30 1E 00 00 04 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
ext2fs read inode blkno 0 blkoff 1
<s:512, o:128, l:128>
mci_read_blocks 200
Read 200 bytes
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
LPC3131EA #
--
View this message in context: http://www.nabble.com/Problems-with-ext2ls---SD-tp22728281p22728281.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Problems with ext2ls & SD
2009-03-26 18:52 [U-Boot] Problems with ext2ls & SD DVM
@ 2009-03-28 12:52 ` DVM
2009-03-28 19:06 ` Wolfgang Denk
2009-03-31 20:49 ` Wolfgang Denk
0 siblings, 2 replies; 5+ messages in thread
From: DVM @ 2009-03-28 12:52 UTC (permalink / raw)
To: u-boot
Further debugging reveals UBoot uses a fixed length for inodes (128 bye). The
inodes on my 2GB SD card are 256 bytes There was a patch that fizzled out
back in January looking at this
http://www.nabble.com/-U-Boot----PATCH--Fix-ext2-non-working-td21742132.html#a21742132
The superblock contains the inode length in the function
static int ext2fs_read_inode()
...
inodes_per_block = EXT2_BLOCK_SIZE (data) /
__le32_to_cpu(sblock->inode_size);
...
status = ext2fs_devread (((__le32_to_cpu (blkgrp.inode_table_id) + blkno)
<< LOG2_EXT2_BLOCK_SIZE (data)),
__le32_to_cpu(sblock->inode_size) * blkoff,
sizeof (struct ext2_inode), /*HACK till I fix up struct size*/
(char *) inode);
This seems to improve matters for me BUT I dont have any other hardware to
test on and I am no ext2fs guru. Does anyone else have any ideas?
--
View this message in context: http://www.nabble.com/Problems-with-ext2ls---SD-tp22728281p22756563.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Problems with ext2ls & SD
2009-03-28 12:52 ` DVM
@ 2009-03-28 19:06 ` Wolfgang Denk
[not found] ` <669754ad0903281214x77796b95x76062f1c428ecda8@mail.gmail.com>
2009-03-31 20:49 ` Wolfgang Denk
1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2009-03-28 19:06 UTC (permalink / raw)
To: u-boot
Dear DVM,
In message <22756563.post@talk.nabble.com> you wrote:
>
> Further debugging reveals UBoot uses a fixed length for inodes (128 bye). The
> inodes on my 2GB SD card are 256 bytes There was a patch that fizzled out
> back in January looking at this
Do you have a file system image that shows the error, i. e. that could
be usedfor testing?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Well I don't see why I have to make one man miserable when I can
make so many men happy." - Ellyn Mustard, about marriage
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Problems with ext2ls & SD
2009-03-28 12:52 ` DVM
2009-03-28 19:06 ` Wolfgang Denk
@ 2009-03-31 20:49 ` Wolfgang Denk
1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2009-03-31 20:49 UTC (permalink / raw)
To: u-boot
Dear DVM,
In message <22756563.post@talk.nabble.com> you wrote:
>
> Further debugging reveals UBoot uses a fixed length for inodes (128 bye). The
> inodes on my 2GB SD card are 256 bytes There was a patch that fizzled out
> back in January looking at this
...
> This seems to improve matters for me BUT I dont have any other hardware to
> test on and I am no ext2fs guru. Does anyone else have any ideas?
If you read my reply to that e-mail you read what I'm replying to you:
|Hm.... I tried the current code without your patch but I could not
|find any error case.
|
|But with your patch applied, I got this:
|
|=> ext2ls ide 0:4 bin
| ** ext2fs_devread() read outside partition sector 536870912
|Failed to mount ext2 filesystem...
|** Bad ext2 partition or disk - ide 0:4 **
|
|
|I tested this on a PowerPC system (big endian). Any chance there might
|be some endianess issues with your patch?
Please provide at least a test image!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It's not an optical illusion, it just looks like one. -- Phil White
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Problems with ext2ls & SD
[not found] ` <669754ad0903281214x77796b95x76062f1c428ecda8@mail.gmail.com>
@ 2009-04-25 19:24 ` Wolfgang Denk
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2009-04-25 19:24 UTC (permalink / raw)
To: u-boot
Dear Karl,
In message <669754ad0903281214x77796b95x76062f1c428ecda8@mail.gmail.com> you wrote:
>
> I am simply using fdisk under Ubuntu 8.04 and a 2GB SD card, I create a
> primary partition of type 0x83. When I run dumpe2fs it shows an inode size
> of 256 bytes.
I confirm the problem. I finally found some time to run some tests,
and was able to reproduce the problem.
I even re-tested the old patch that Ryan Chen posted long ago (in
July 2008), but as my earlier tests indicated, this patch is
seriously broken and does not work at all.
So we have to state that ext2 file system support in U-Boot is broken
for recent ext2 versions which use bigger inode sizes.
Best regards,
Viele Gr??e,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The most difficult thing in the world is to know how to do a thing
and to watch someone else doing it wrong, without commenting.
-- T.H. White
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-04-25 19:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 18:52 [U-Boot] Problems with ext2ls & SD DVM
2009-03-28 12:52 ` DVM
2009-03-28 19:06 ` Wolfgang Denk
[not found] ` <669754ad0903281214x77796b95x76062f1c428ecda8@mail.gmail.com>
2009-04-25 19:24 ` Wolfgang Denk
2009-03-31 20:49 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox