Skip to contentSkip to conversation

yaffs2 u-boot patching support

U-Boot Charles Manning 3 participants 6 messages Apr 16, 2012 – Apr 25, 2012

lore
Share & tools
lore
#0 lore raw

Hello ubooters and yaffsers

I was commissioned to refresh yaffs2 in u-boot and add a mechanism to support dynamic yaffs partition set up (way simpler than screwing around with mtd part) and manual configuration.

Rather than do this as a once off, I set this scripting up so that this can
be done at any time (painlessly I hope) to bring in the fresh code (as per Linux patching).

Basically...

Get latest from yaffs git.

cd yaffs2-dir/direct/u-boot

./patch-u-boot.sh uboot-dir

Edit your u-boot config file and add

#define CONFIG_YAFFS2 1

Rebuild u-boot (mrproper probably a Good Idea). Job done.

OK, so how does the new dynamic partition stuff work?

There are 2 new commands: ydevconfig configures a mount point "partition" and ydevls lists the mount points and their state

So for example let us say we want a mount point called foo on NAND device 0 starting at block 55 and ending at block 999.

ydevconfig foo 0 55 999

Now you want to mount it.

ymount foo

Access files and do stuff...

yls foo
yls -l foo # more info
ymkdir foo/dir
...

You can have multiple mountpoints in use at the same time though they are not allowed to overlap.

inband tags is selected automatically if there is insufficient space in oobavail to store the tags.

Have fun.

Charles

#1 lore raw
Quoted 9 lines · Charles Manning

Hello ubooters and yaffsers

I was commissioned to refresh yaffs2 in u-boot and add a mechanism to support dynamic yaffs partition set up (way simpler than screwing around with mtd part) and manual configuration.

Rather than do this as a once off, I set this scripting up so that this can
be done at any time (painlessly I hope) to bring in the fresh code (as per Linux patching).

Just to put this out there, if you're not submitting patches to get the code into git, should the current support in-tree be removed?

Signature · 1 line
Tom
#2 lore raw
Quoted 7 lines · On Friday 20 April 2012 09:40:50 Tom Rini wrote:
Quoted 6 lines · Charles Manning

Hello ubooters and yaffsers

I was commissioned to refresh yaffs2 in u-boot and add a mechanism to support dynamic yaffs partition set up (way simpler than screwing around with mtd part) and manual configuration.

Quoted 6 lines
Quoted 3 lines

Rather than do this as a once off, I set this scripting up so that this
can be done at any time (painlessly I hope) to bring in the fresh code (as per Linux patching).

Just to put this out there, if you're not submitting patches to get the code into git, should the current support in-tree be removed?

I think it is worth having yaffs in the main code base, but not the old stuff.

The primary reason to have a "patch-in" script is to allow people to refresh the yaffs they are using in a pretty painless way.

-- Charles

#3 lore raw
Quoted 12 lines · Charles Manning
Quoted 11 lines · On Friday 20 April 2012 09:40:50 Tom Rini wrote:
Quoted 9 lines · Charles Manning

Hello ubooters and yaffsers

I was commissioned to refresh yaffs2 in u-boot and add a mechanism to support dynamic yaffs partition set up (way simpler than screwing around with mtd part) and manual configuration.

Rather than do this as a once off, I set this scripting up so that this
can be done at any time (painlessly I hope) to bring in the fresh code (as per Linux patching).

Quoted 7 lines
Quoted 2 lines

Just to put this out there, if you're not submitting patches to get the code into git, should the current support in-tree be removed?

I think it is worth having yaffs in the main code base, but not the old stuff.

The primary reason to have a "patch-in" script is to allow people to refresh the yaffs they are using in a pretty painless way.

OK, but why not just update mainline? When you posted the original message, the next branch of master was open. Today master is open. I'm pretty sure that a pull request from the yaffs2 maintainers to update the codebase would be accepted if it's self contained to fs/yaffs2 and reviewed if it touches stuff outside. This isn't the old days... Thanks!

Signature · 1 line
Tom
#4 lore raw
In reply to Charles Manning
Quoted 4 lines · Charles Manning
Quoted 3 lines · On Friday 20 April 2012 09:40:50 Tom Rini wrote:
Quoted 2 lines · Charles Manning

Hello ubooters and yaffsers

Hi Charles,

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines

I was commissioned to refresh yaffs2 in u-boot and add a mechanism to support dynamic yaffs partition set up (way simpler than screwing around with mtd part) and manual configuration.

Rather than do this as a once off, I set this scripting up so that this
can be done at any time (painlessly I hope) to bring in the fresh code (as per Linux patching).

Quoted 7 lines
Quoted 2 lines

Just to put this out there, if you're not submitting patches to get the code into git, should the current support in-tree be removed?

I think it is worth having yaffs in the main code base, but not the old stuff.

The primary reason to have a "patch-in" script is to allow people to refresh the yaffs they are using in a pretty painless way.

Well, why do not push your patches directly to ML ? This increases surely the number of testers, and after ypur patches will be merged thare is not need for external scripts.

Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#5 lore raw
Quoted 21 lines · On Tuesday 24 April 2012 03:33:35 Stefano Babic wrote:
Quoted 3 lines · Charles Manning
Quoted 2 lines · On Friday 20 April 2012 09:40:50 Tom Rini wrote:
Quoted 1 line · Charles Manning

Hello ubooters and yaffsers

Hi Charles,

Quoted 14 lines
Quoted 10 lines
Quoted 7 lines

I was commissioned to refresh yaffs2 in u-boot and add a mechanism to support dynamic yaffs partition set up (way simpler than screwing around with mtd part) and manual configuration.

Rather than do this as a once off, I set this scripting up so that
this can be done at any time (painlessly I hope) to bring in the fresh code (as per Linux patching).

Just to put this out there, if you're not submitting patches to get the code into git, should the current support in-tree be removed?

I think it is worth having yaffs in the main code base, but not the old stuff.

Quoted 6 lines
Quoted 2 lines

The primary reason to have a "patch-in" script is to allow people to refresh the yaffs they are using in a pretty painless way.

Well, why do not push your patches directly to ML ? This increases surely the number of testers, and after ypur patches will be merged thare is not need for external scripts.

I have sent a pull request to the list.
https://github.com/cdhmanning/u-boot-yaffs2

-- CHarles