* [U-Boot-Users] [PATCH] Write YAFFS filesystem images to NAND
@ 2006-09-07 18:46 Frank Mandarino
2006-09-07 19:12 ` Blair Barnett
0 siblings, 1 reply; 3+ messages in thread
From: Frank Mandarino @ 2006-09-07 18:46 UTC (permalink / raw)
To: u-boot
Hi,
The attached patch for common/cmd_nand.c provides the ability to write
YAFFS filesystem images to NAND flash memory, using the newer MTD-based
nand code.
The patch extends the nand write command to parse a ".yaffs1" suffix for
yaffs1 filesystems, or a ".yaffs" or ".yaffs2" suffix for yaffs2
filesystems.
Yaffs1 filesystems support 512-byte page, 16-byte oob NAND chips, while
yaffs2 filesystems support 2048-byte page, 64-byte oob NAND chips.
Yaffs1 filesystem images can be generated using the mkyaffsimage utility
in the yaffs2/utils directory.
Yaffs2 filesystem images can be generated using the mkyaffs2image
utility in the yaffs2/utils directory, after applying Sergey Kubushyn's
patch. See
http://aleph1.co.uk/lurker/message/20060211.004601.77b55bf3.en.html.
So, for example, to write a yaffs1 filesystem image of length 0x526320
from address 0x20000000 in ram to offset 0x100000 in flash, run the command:
nand write.yaffs1 20000000 100000 526320
The area to be written must be erased before writing the filesystem.
I have tested this code with yaffs1 filesystems, and, in fact, I am
finally able to run Linux with rootfstype=yaffs. I am unable to test
with yaffs2 filesystems because I don't have access to a system using
2048+64 NAND chips.
Regards,
../fam
--
Frank Mandarino fmandarino(a)endrelia.com
Endrelia Technologies Inc.
Toronto, Ontario, Canada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nand_write_yaffs.patch
Type: text/x-patch
Size: 5209 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060907/d4405bb3/attachment.bin
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] [PATCH] Write YAFFS filesystem images to NAND
2006-09-07 18:46 [U-Boot-Users] [PATCH] Write YAFFS filesystem images to NAND Frank Mandarino
@ 2006-09-07 19:12 ` Blair Barnett
2006-09-07 20:07 ` Frank Mandarino
0 siblings, 1 reply; 3+ messages in thread
From: Blair Barnett @ 2006-09-07 19:12 UTC (permalink / raw)
To: u-boot
Hi Frank,
You can run yaffs2 in yaffs1 compatibility mode.
Check the yaffs2 source for the correct configuration options.
-blair
On Thu, 2006-09-07 at 11:46, Frank Mandarino wrote:
> Hi,
>
> The attached patch for common/cmd_nand.c provides the ability to write
> YAFFS filesystem images to NAND flash memory, using the newer MTD-based
> nand code.
>
> The patch extends the nand write command to parse a ".yaffs1" suffix for
> yaffs1 filesystems, or a ".yaffs" or ".yaffs2" suffix for yaffs2
> filesystems.
>
> Yaffs1 filesystems support 512-byte page, 16-byte oob NAND chips, while
> yaffs2 filesystems support 2048-byte page, 64-byte oob NAND chips.
>
> Yaffs1 filesystem images can be generated using the mkyaffsimage utility
> in the yaffs2/utils directory.
>
> Yaffs2 filesystem images can be generated using the mkyaffs2image
> utility in the yaffs2/utils directory, after applying Sergey Kubushyn's
> patch. See
> http://aleph1.co.uk/lurker/message/20060211.004601.77b55bf3.en.html.
>
> So, for example, to write a yaffs1 filesystem image of length 0x526320
> from address 0x20000000 in ram to offset 0x100000 in flash, run the command:
>
> nand write.yaffs1 20000000 100000 526320
>
> The area to be written must be erased before writing the filesystem.
>
> I have tested this code with yaffs1 filesystems, and, in fact, I am
> finally able to run Linux with rootfstype=yaffs. I am unable to test
> with yaffs2 filesystems because I don't have access to a system using
> 2048+64 NAND chips.
>
> Regards,
> ../fam
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] [PATCH] Write YAFFS filesystem images to NAND
2006-09-07 19:12 ` Blair Barnett
@ 2006-09-07 20:07 ` Frank Mandarino
0 siblings, 0 replies; 3+ messages in thread
From: Frank Mandarino @ 2006-09-07 20:07 UTC (permalink / raw)
To: u-boot
Hi Blair,
Thanks for the response, but I'm not sure what you are getting at.
I am aware of the yaffs1 compatibility mode, and I think I am running
the yaffs2 code in that mode. At least I only installed the yaffs2 code
into my Linux kernel.
But this has nothing to do with U-Boot's ability to write a yaffs
filesystem image to NAND flash.
In yaffs1 compatibility mode, I believe the yaffs2 code assumes that the
OOB is formatted as it is in a yaffs1 filesystem, so I am providing a
way to write the older yaffs1 OOB format, or the newer yaffs2 OOB format.
Regards,
../fam
Blair Barnett wrote:
> Hi Frank,
>
> You can run yaffs2 in yaffs1 compatibility mode.
> Check the yaffs2 source for the correct configuration options.
>
> -blair
>
> On Thu, 2006-09-07 at 11:46, Frank Mandarino wrote:
>> Hi,
>>
>> The attached patch for common/cmd_nand.c provides the ability to write
>> YAFFS filesystem images to NAND flash memory, using the newer MTD-based
>> nand code.
>>
>> The patch extends the nand write command to parse a ".yaffs1" suffix for
>> yaffs1 filesystems, or a ".yaffs" or ".yaffs2" suffix for yaffs2
>> filesystems.
>>
>> Yaffs1 filesystems support 512-byte page, 16-byte oob NAND chips, while
>> yaffs2 filesystems support 2048-byte page, 64-byte oob NAND chips.
>>
>> Yaffs1 filesystem images can be generated using the mkyaffsimage utility
>> in the yaffs2/utils directory.
>>
>> Yaffs2 filesystem images can be generated using the mkyaffs2image
>> utility in the yaffs2/utils directory, after applying Sergey Kubushyn's
>> patch. See
>> http://aleph1.co.uk/lurker/message/20060211.004601.77b55bf3.en.html.
>>
>> So, for example, to write a yaffs1 filesystem image of length 0x526320
>> from address 0x20000000 in ram to offset 0x100000 in flash, run the command:
>>
>> nand write.yaffs1 20000000 100000 526320
>>
>> The area to be written must be erased before writing the filesystem.
>>
>> I have tested this code with yaffs1 filesystems, and, in fact, I am
>> finally able to run Linux with rootfstype=yaffs. I am unable to test
>> with yaffs2 filesystems because I don't have access to a system using
>> 2048+64 NAND chips.
>>
>> Regards,
>> ../fam
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
Frank Mandarino fmandarino(a)endrelia.com
Endrelia Technologies Inc.
Toronto, Ontario, Canada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-07 20:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-07 18:46 [U-Boot-Users] [PATCH] Write YAFFS filesystem images to NAND Frank Mandarino
2006-09-07 19:12 ` Blair Barnett
2006-09-07 20:07 ` Frank Mandarino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox