[oe] [PATCH][mtd-utils][how to] Numonyx chip support

Michał Stawinski nazgee at gmail.com
Thu Feb 25 11:26:48 UTC 2010


Hi all,
I am a newb in working with open projects, so please take it easy if I'll do
something wrong.

Below (and in the attachment) is "git format-patch" output.
It introduces support for Numonyx memories, that have oobsize=64 and
pagesize=4096, that are used e.g. in OMAP3, igep0020b machine.

Solution is very straightforward, though you'll probably reject my patch, as
diff contains full path to files that i altered (not relative to mtd-utils).
I hope however, that you can tell me how to generate patches for sepcific
packages correctly, so it won't contain whole path (e.g.
a/build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nanddump.c)

That is how I've done it:
- "git pull"      //to update oe dev branch
- bitbake mtd-utils      //to get *.c files refreshed
- git checkout -b mtd_utils      //to create my new development branch
- git add
build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nanddump.c
//to add files I am going to alter
- git commit     //to create a starting point for my development
- :::editing=>compiling=>testing:::
- git commit     //to check in changes I've made
- git format-patch HEAD^     //to create patch from changes I've made

What am I doing wrong? Sources of packages like mitd-utils are not added to
.git repository in OE tree, and when I add it manually to it (as above), and
then create patch, whole path relative to OR root is generated, which makes
my patch useles to other builds than the one I did (IGEPv2).

I really'd like to contribute, but I can't find any how-to realted to *.c
sources editing (*.bb editing is straightforward, as these files are already
in oe git tree).

//==================================================
---
 .../mtd-utils-1.3.1-r0/git/nanddump.c              |    1 +
 .../mtd-utils-1.3.1-r0/git/nandwrite.c             |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git
a/build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nanddump.c
b/build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nanddump.c
index 6926c66..dfc15de 100644
---
a/build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nanddump.c
+++
b/build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nanddump.c
@@ -210,6 +210,7 @@ int main(int argc, char * const argv[])

     /* Make sure device page sizes are valid */
     if (!(meminfo.oobsize == 128 && meminfo.writesize == 4096) &&
+            !(meminfo.oobsize == 64 && meminfo.writesize == 4096) &&
             !(meminfo.oobsize == 64 && meminfo.writesize == 2048) &&
             !(meminfo.oobsize == 32 && meminfo.writesize == 1024) &&
             !(meminfo.oobsize == 16 && meminfo.writesize == 512) &&
diff --git
a/build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nandwrite.c
b/build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nandwrite.c
index b77edd6..bd45879 100644
---
a/build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nandwrite.c
+++
b/build/tmp-igep0020/work/armv7a-angstrom-linux-gnueabi/mtd-utils-1.3.1-r0/git/nandwrite.c
@@ -294,6 +294,7 @@ int main(int argc, char * const argv[])
     if (!(meminfo.oobsize == 16 && meminfo.writesize == 512) &&
             !(meminfo.oobsize == 8 && meminfo.writesize == 256) &&
             !(meminfo.oobsize == 64 && meminfo.writesize == 2048) &&
+            !(meminfo.oobsize == 64 && meminfo.writesize == 4096) &&
             !(meminfo.oobsize == 128 && meminfo.writesize == 4096)) {
         fprintf(stderr, "Unknown flash (not normal NAND)\n");
         close(fd);
-- 
1.6.3.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-oobsize-64-and-writesize-4096-as-normal-nand-e.g.patch
Type: application/octet-stream
Size: 2110 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20100225/7a73ab3a/attachment-0002.obj>


More information about the Openembedded-devel mailing list