Skip to contentSkip to conversation

How to generate a patch limited to MTD subsystem

DISCUSSION llandre 3 participants 4 messages Aug 2, 2006 Memory technology devices (MTD)

lore
Share & tools
lore

llandre

author
#0 lore raw

I'm facing the following problem.
I'm working on custom hardware with kernel 2.6.15. I suspect I need to update the MTD subsystem with latest sources. How to do that without migrating to latest kernel? In other words I need to generate a patch from latest MTD code against MTD code included in v2.6.15 kernel. Is it possible? How?

TIA,
llandre

DAVE Electronics System House - R&D Department

web:   http://www.dave-tech.it
email: r&[email protected]
#1 lore raw
Quoted 2 lines · llandre

I'm facing the following problem.
I'm working on custom hardware with kernel 2.6.15. I suspect I need to update the MTD subsystem with latest sources. How to do that without migrating to latest kernel? In other words I need to generate a patch from latest MTD code against MTD code included in v2.6.15 kernel. Is it possible? How?

I'd do like this:

rm -rf linux-2.6.15/drivers/mtd
cp -r linux-latest/drivers/mtd linux-2.6.15/drivers/

rm linux-2.6.15/include/mtd
cp -r linux-latest/include/mtd linux-2.6.15/include/mtd

rm linux-2.6.15/include/linux/mtd
cp -r linux-latest/include/linux/mtd linux-2.6.15/include/linux/mtd

Then try to compile & run and resolve all problems. I suspect there are not going to be many of them.

Signature · 3 lines
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
author
#2 lore raw
Quoted 5 lines

I'd do like this:

rm -rf linux-2.6.15/drivers/mtd
cp -r linux-latest/drivers/mtd linux-2.6.15/drivers/

Quoted 8 lines

rm linux-2.6.15/include/mtd
cp -r linux-latest/include/mtd linux-2.6.15/include/mtd

rm linux-2.6.15/include/linux/mtd
cp -r linux-latest/include/linux/mtd linux-2.6.15/include/linux/mtd

Then try to compile & run and resolve all problems. I suspect there are not going to be many of them.

Hmm ... if I recall correctly MTD provides more stuff (JFFS2 for example), doesn't it?

Signature · 5 lines
llandre

DAVE Electronics System House - R&D Department
web:   http://www.dave-tech.it
email: r&[email protected]
#3 lore raw
Quoted 2 lines · llandre

Hmm ... if I recall correctly MTD provides more stuff (JFFS2 for example), doesn't it?

If you need JFFS2 as well, do similar for fs/jffs2, include/linux/jffs2*.

I don't know another way ...

In JFFS2 you'll probably meet more merging problems. There was an RB-tree rework (special macros were introduced), and you may have troubles compiling JFFS2 because of this. But this is solvable.

Signature · 3 lines
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.