* RE: FTL and Endianity
@ 2001-07-06 12:52 Siders, Keith
2001-07-09 9:32 ` David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Siders, Keith @ 2001-07-06 12:52 UTC (permalink / raw)
To: linux-mtd
So since I'm using big-endian MIPS, does this effect JFFS2? That is,
does FTL stand for Flash Translation Layer, or some such thing?
Keith
-> -----Original Message-----
-> From: David Woodhouse [mailto:dwmw2@infradead.org]
-> Sent: Friday, July 06, 2001 6:35 AM
-> To: Alexandr Andreev
-> Cc: linux-mtd@lists.infradead.org
-> Subject: Re: FTL and Endianity
->
->
->
-> andreev@niisi.msk.ru said:
-> > But when the ftl_fromat utility creates an ftl partition,
-> it doesn't
-> > swap any field of the header. So, it doesn't matter on
-> which endianity
-> > the FTL driver and ftl_format works, it must be the same only. Am i
-> > wrong?
->
-> You're right - except that it does matter in theory. The FTL spec is
-> defined as little-endian. So while it would _work_ if you do it all
-> backwards, it's technically wrong.
->
-> I'd be happier to fix ftl_format and ftl_check to do the
-> byteswapping than
-> to remove same from ftl.c.
->
-> --
-> dwmw2
->
->
->
-> ______________________________________________________
-> Linux MTD discussion mailing list
-> http://lists.infradead.org/mailman/listinfo/linux-mtd/
->
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FTL and Endianity
2001-07-06 12:52 FTL and Endianity Siders, Keith
@ 2001-07-09 9:32 ` David Woodhouse
2001-07-09 12:56 ` nftl_format/nftlmount problems Felix Radensky
0 siblings, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2001-07-09 9:32 UTC (permalink / raw)
To: Siders, Keith; +Cc: linux-mtd
keith_siders@toshibatv.com said:
> So since I'm using big-endian MIPS, does this effect JFFS2? That is,
> does FTL stand for Flash Translation Layer, or some such thing?
JFFS2 is host-endian. It shouldn't affect you at all. You don't need to use
FTL, JFFS works directly on the flash.
If you're making your JFFS2 filesystem images on a little-endian box for
use on your target, make sure you use the appropriate arguments to
mkfs.jffs2 to make it do the byteswapping.
--
dwmw2
^ permalink raw reply [flat|nested] 7+ messages in thread
* nftl_format/nftlmount problems.
2001-07-09 9:32 ` David Woodhouse
@ 2001-07-09 12:56 ` Felix Radensky
0 siblings, 0 replies; 7+ messages in thread
From: Felix Radensky @ 2001-07-09 12:56 UTC (permalink / raw)
Cc: linux-mtd
Hi, all
I'm using the latest CVS mtd code with 2.4.2 kernel from Monta Vista.
My platform is a custom PowerPC 405GP based board. I'm booting my
kernel from 96M DiskOnChip 2000. The technique uses M-Systems
DFORMAT utility to create so called "binary" partition and store kernel
image on it. ROM monitor reads kernel image and loads it into memory.
This works ok. However, nftl code in linux kernel has problems calculating
the correct DOC geometry (I suspect endian issues). So I tried to use
nftl_format
(which supposed to handle big endian correctly), like this:
# nftl_format /dev/mtd0 606208
(my "binary" partition occupies 37 erase units).
The kernel still boots, but nftlmount code complains about not being able
to find a valid boot record.
If I run nftl_format on the entire DOC and boot via network, everything
if fine, i.e. nftl code correctly recognizes DOC geometry.
Please advice.
Thanks in advance.
Felix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* FTL and Endianity
@ 2001-07-06 18:25 Alexandr Andreev
2001-07-06 10:30 ` David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Alexandr Andreev @ 2001-07-06 18:25 UTC (permalink / raw)
To: dwmw2, linux-mtd@lists.infrared.org
Hi,
It is about FTL again.
I have got a MIPS big endian machine with CFI flash. And i obliged to
hack ftl.c
to provide correct endianity working. I mean, i must undef all
cpu_to_le32 and the
others macros. For little endian machines these macros do nothing, but
for my big
endian MIPS these macros are unusable too. Did anybody test FTL with big
endian CPU?
If no, we need to throw these macros out. In any case, we have to be
able to
configure this behaviour.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FTL and Endianity
2001-07-06 18:25 FTL and Endianity Alexandr Andreev
@ 2001-07-06 10:30 ` David Woodhouse
2001-07-06 19:26 ` Alexandr Andreev
0 siblings, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2001-07-06 10:30 UTC (permalink / raw)
To: Alexandr Andreev; +Cc: linux-mtd@lists.infrared.org
andreev@niisi.msk.ru said:
> Did anybody test FTL with big endian CPU? If no, we need to throw
> these macros out. In any case, we have to be able to configure this
> behaviour.
I didn't test - I think others did though. FTL is defined to be
little-endian. Why do you say the macros are unusable?
--
dwmw2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FTL and Endianity
2001-07-06 10:30 ` David Woodhouse
@ 2001-07-06 19:26 ` Alexandr Andreev
2001-07-06 11:35 ` David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Alexandr Andreev @ 2001-07-06 19:26 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd@lists.infrared.org
David Woodhouse wrote:
>
>I didn't test - I think others did though. FTL is defined to be
>little-endian. Why do you say the macros are unusable?
>
As i can see, cpu_to_le32 and others macros, are usable only when FTL
reading the FTL header. But when the ftl_fromat utility creates an ftl
partition, it doesn't swap any field of the header.
So, it doesn't matter on which endianity the FTL driver and ftl_format
works, it must be the same only.
Am i wrong?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FTL and Endianity
2001-07-06 19:26 ` Alexandr Andreev
@ 2001-07-06 11:35 ` David Woodhouse
0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2001-07-06 11:35 UTC (permalink / raw)
To: Alexandr Andreev; +Cc: linux-mtd
andreev@niisi.msk.ru said:
> But when the ftl_fromat utility creates an ftl partition, it doesn't
> swap any field of the header. So, it doesn't matter on which endianity
> the FTL driver and ftl_format works, it must be the same only. Am i
> wrong?
You're right - except that it does matter in theory. The FTL spec is
defined as little-endian. So while it would _work_ if you do it all
backwards, it's technically wrong.
I'd be happier to fix ftl_format and ftl_check to do the byteswapping than
to remove same from ftl.c.
--
dwmw2
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-07-09 12:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-06 12:52 FTL and Endianity Siders, Keith
2001-07-09 9:32 ` David Woodhouse
2001-07-09 12:56 ` nftl_format/nftlmount problems Felix Radensky
-- strict thread matches above, loose matches on Subject: below --
2001-07-06 18:25 FTL and Endianity Alexandr Andreev
2001-07-06 10:30 ` David Woodhouse
2001-07-06 19:26 ` Alexandr Andreev
2001-07-06 11:35 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox