* [U-Boot] ext2fs.c/ext2fs_mount() fails when inode_size = 256
@ 2009-08-12 16:18 Bob Furber
2009-08-12 20:07 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Bob Furber @ 2009-08-12 16:18 UTC (permalink / raw)
To: u-boot
Our SBC have been happily booting uClinux from ext3 partitioned SD cards
prepared on a Fedora Linux-2.6.15 PC.
But, when we prepared our 2GB SD cards on a brand new Ubuntu
Linux-2.6.27 PC, out SBCs were no longer able to find /boot/linux.bin.
Linux/dumpe2fs showed that the bootable [Fedora] 2GB SD cards had
inode_size = 128, whereas the delinquent [Ubuntu] SD cards had
inode_size = 256. Adding a "-I 128" switch to mkfs.ext3 in the script
that prepares an 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 ext2fs.c/ext2fs_mount():
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.
When reading a 2GB/256 byte inode card,
ext2fs_mount()/ext2fs_read_inode(data, 2, data->inode) returns
data->inode filled with zeros. Either there is a flaw in data or data is
not being interpreted correctly. Regrettably, the root problem eludes me.
Any thoughts or comments would be appreciated.
Bob Furber
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] ext2fs.c/ext2fs_mount() fails when inode_size = 256
2009-08-12 16:18 [U-Boot] ext2fs.c/ext2fs_mount() fails when inode_size = 256 Bob Furber
@ 2009-08-12 20:07 ` Wolfgang Denk
[not found] ` <4A832C44.3060503@steroidmicros.com>
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2009-08-12 20:07 UTC (permalink / raw)
To: u-boot
Dear Bob Furber,
In message <4A82EB38.6060802@steroidmicros.com> you wrote:
> Our SBC have been happily booting uClinux from ext3 partitioned SD cards
> prepared on a Fedora Linux-2.6.15 PC.
...
> Any thoughts or comments would be appreciated.
You failed to mention some really important fects, like for example
which version of U-Boot you are using.
Me deems that it must be an old one.
This commit most probably fixes your issue:
commit 56fdaadc124a8ef9ec0fd8ff578233ec3b1137be
Author: Weirich, Bernhard <Bernhard.Weirich@riedel.net>
Date: Wed Jun 10 14:00:37 2009 +0200
ext2: fix inode size and calculations
Signed-off-by: unsik Kim <donari75@gmail.com>
Signed-off-by: Bernhard Weirich <bernhard.weirich@riedel.net>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Wolfgang Denk <wd@denx.de>
I recommend you update your code, and try again.
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
I'm what passes for a Unix guru in my office. This is a frightening
concept. - Lee Ann Goldstein, in <3k55ba$c43@butch.lmsc.lockheed.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] ext2fs.c/ext2fs_mount() fails when inode_size = 256
[not found] ` <4A832C44.3060503@steroidmicros.com>
@ 2009-08-12 21:40 ` Wolfgang Denk
2009-08-13 21:48 ` Bob Furber
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2009-08-12 21:40 UTC (permalink / raw)
To: u-boot
Dear Bob Furber,
please keep the mailing list on cc:
In message <4A832C44.3060503@steroidmicros.com> you wrote:
>
> > You failed to mention some really important fects, like for example
> > which version of U-Boot you are using.
>
> ftp://ftp.denx.de/pub/u-boot/ --> u-boot-2009.08-rc2.tar.bz2, which
> appeared to be the most recent relrase.
Indeed.
> > This commit most probably fixes your issue:
> >
> > commit 56fdaadc124a8ef9ec0fd8ff578233ec3b1137be
> > Author: Weirich, Bernhard <Bernhard.Weirich@riedel.net>
> > Date: Wed Jun 10 14:00:37 2009 +0200
> >
> > ext2: fix inode size and calculations
> >
> > Signed-off-by: unsik Kim <donari75@gmail.com>
> > Signed-off-by: Bernhard Weirich <bernhard.weirich@riedel.net>
> > Signed-off-by: Wolfgang Denk <wd@denx.de>
> > Tested-by: Wolfgang Denk <wd@denx.de>
> >
>
> Forgive me, but I am new at this and I have no idea how to locate
> "commit 56fdaadc124a8ef9ec0fd8ff578233ec3b1137be".
You can use for example "git show" in your U-Boot git repository.
In worst case, you can search the CHANGELOG.
Anyway - commit 56fdaadc is:
-> git-describe 56fdaadc
v2009.08-rc1-1-g56fdaad
so it's the first commit after v2009.08-rc1 and thus included in
v2009.08-rc2.
If this doesn't work for you, I'd be interested in receiving a test
case, i. e. a minimal (as small as possible) file system image that
shows the erroneous behaviour.
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
I don't mind criticism. You know me. I've never been one to take
offence at criticism. No one could say I'm the sort to take offence
at criticism -- Not twice, anyway. Not without blowing bubbles.
- Terry Pratchett, _Witches Abroad_
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] ext2fs.c/ext2fs_mount() fails when inode_size = 256
2009-08-12 21:40 ` Wolfgang Denk
@ 2009-08-13 21:48 ` Bob Furber
2009-08-13 22:03 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Bob Furber @ 2009-08-13 21:48 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
Thanks Wolfgang. You were right. I had used u-boot-2009.08-rc1 which
still had the 128 byte inode size hard-coded in
...\u-boot-2009.08-rc1\fs\ext2\ext2fs.c. Upgrading to u-boot-2009.08-rc2
now allows me to boot from 2GB SD cards formatted with Ubuntu-2.6.27.
Thanks,
Bob Furber
> please keep the mailing list on cc:
>
My carelessness. I am new to this list and accustomed to simply click
"Reply".
> In message <4A832C44.3060503@steroidmicros.com> you wrote:
>
>>> You failed to mention some really important fects, like for example
>>> which version of U-Boot you are using.
>>>
>> ftp://ftp.denx.de/pub/u-boot/ --> u-boot-2009.08-rc2.tar.bz2, which
>> appeared to be the most recent relrase.
>>
>
> Indeed.
>
>
>>> This commit most probably fixes your issue:
>>>
>>> commit 56fdaadc124a8ef9ec0fd8ff578233ec3b1137be
>>> Author: Weirich, Bernhard <Bernhard.Weirich@riedel.net>
>>> Date: Wed Jun 10 14:00:37 2009 +0200
>>>
>>> ext2: fix inode size and calculations
>>>
>>> Signed-off-by: unsik Kim <donari75@gmail.com>
>>> Signed-off-by: Bernhard Weirich <bernhard.weirich@riedel.net>
>>> Signed-off-by: Wolfgang Denk <wd@denx.de>
>>> Tested-by: Wolfgang Denk <wd@denx.de>
>>>
>>>
>> Forgive me, but I am new at this and I have no idea how to locate
>> "commit 56fdaadc124a8ef9ec0fd8ff578233ec3b1137be".
>>
>
> You can use for example "git show" in your U-Boot git repository.
> In worst case, you can search the CHANGELOG.
>
> Anyway - commit 56fdaadc is:
>
> -> git-describe 56fdaadc
> v2009.08-rc1-1-g56fdaad
>
> so it's the first commit after v2009.08-rc1 and thus included in
> v2009.08-rc2.
>
> If this doesn't work for you, I'd be interested in receiving a test
> case, i. e. a minimal (as small as possible) file system image that
> shows the erroneous behaviour.
>
> Best regards,
>
> Wolfgang Denk
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] ext2fs.c/ext2fs_mount() fails when inode_size = 256
2009-08-13 21:48 ` Bob Furber
@ 2009-08-13 22:03 ` Wolfgang Denk
2009-08-13 22:19 ` Bob Furber
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2009-08-13 22:03 UTC (permalink / raw)
To: u-boot
Dear Bob Furber,
In message <4A848A12.2070001@steroidmicros.com> you wrote:
>
> Thanks Wolfgang. You were right. I had used u-boot-2009.08-rc1 which
> still had the 128 byte inode size hard-coded in
> ...\u-boot-2009.08-rc1\fs\ext2\ext2fs.c. Upgrading to u-boot-2009.08-rc2
> now allows me to boot from 2GB SD cards formatted with Ubuntu-2.6.27.
Thanks for the confirmation.
Note: Your keyboard seems to be broken, it emits backslashes where
there should be forward slashes.
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
C++ is the best example of second-system effect since OS/360.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] ext2fs.c/ext2fs_mount() fails when inode_size = 256
2009-08-13 22:03 ` Wolfgang Denk
@ 2009-08-13 22:19 ` Bob Furber
0 siblings, 0 replies; 6+ messages in thread
From: Bob Furber @ 2009-08-13 22:19 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
>> Thanks Wolfgang. You were right. I had used u-boot-2009.08-rc1 which
>> still had the 128 byte inode size hard-coded in
>> ...\u-boot-2009.08-rc1\fs\ext2\ext2fs.c. Upgrading to u-boot-2009.08-rc2
>> now allows me to boot from 2GB SD cards formatted with Ubuntu-2.6.27.
>>
>
> Thanks for the confirmation.
>
> Note: Your keyboard seems to be broken, it emits backslashes where
> there should be forward slashes.
>
Yes, I feel like a intruder in U-boot land, given that I use a
WinVistaPC for our s/w maintenance ;o)
Bob Furber
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-08-13 22:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-12 16:18 [U-Boot] ext2fs.c/ext2fs_mount() fails when inode_size = 256 Bob Furber
2009-08-12 20:07 ` Wolfgang Denk
[not found] ` <4A832C44.3060503@steroidmicros.com>
2009-08-12 21:40 ` Wolfgang Denk
2009-08-13 21:48 ` Bob Furber
2009-08-13 22:03 ` Wolfgang Denk
2009-08-13 22:19 ` Bob Furber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox