GIT vs. Linux 4.x
MTD development is kept in GIT and managed according to standard Linux development practices. Development is based off of one of several trees, depending on what you're targeting. For MTD development, patches are kept in the linux-mtd.git repository. The master (also called mtd/fixes), nand/fixes and spi-nor/fixes branches target the current release cycle (use this only for bugfixes other material that's worthy of rapid integration into Linus' tree), while the mtd/next, nand/next and spi-nor/next branches target the next Linux release (use this for most development). UBI and UBIFS development is tracked separately, in linux-ubifs.git. User-space tools are kept in mtd-utils.git.
All of the kernel trees are included in the linux-next tree and are viewable using gitweb at http://git.infradead.org/, along with a separate tree for the userspace tools, and users' own trees.
Tree Name | GIT URL | Gitweb URL |
---|---|---|
MTD | git://git.infradead.org/linux-mtd.git | http://git.infradead.org/linux-mtd.git |
UBI / UBIFS | git://git.infradead.org/linux-ubifs.git | http://git.infradead.org/linux-ubifs.git |
MTD user-space tools | git://git.infradead.org/mtd-utils.git | http://git.infradead.org/mtd-utils.git |
This website | git://git.infradead.org/mtd-www.git | http://git.infradead.org/mtd-www.git |
Gitweb can give patches between specific points in the tree. To obtain the full patch between Linus' official kernel tree and the current MTD tree, use the following URL: http://git.infradead.org/?p=linux-mtd.git;a=commitdiff_plain;h=master;hp=linus. This produces a full patch from the branch known as 'linus' in the git repository, which represents the last point at which Linus' official kernel tree was merged into the MTD git tree. This should apply correctly to the current kernel, but beware that it will not include changes which were already taken by Linus.
When cloning the tree, please try to conserve network bandwidth (and your own disk space) by using 'alternates' -- if you have a local clone of Linus' official kernel tree, share the object directory with that instead of downloading the same objects all over again. With GIT 1.3.0 and onwards, that's simple enough. Assuming you have a local tree named '~/git/linux' already, you can clone the MTD tree as follows:
git clone --reference ~/git/linux git://git.infradead.org/linux-mtd.git
Users with accounts on git.infradead.org can create their own trees there, which are also accessible via public git:// URLs and visible in gitweb. For more details see the GIT HOWTO.
Patch submission
If you have the facility to do so, please create a temporary git tree from which patches can be pulled. The GIT HOWTO documents how to do this. Please make sure that any such such GIT trees are based on the current linux-mtd GIT tree and not on Linus' tree, so that unnecessary merges are avoided.
Users without an account on git.infradead.org (which is a different machine to the old cvs.infradead.org) may send trivial patches to the mailing list -- but expect to be given an account and expected to use git if you make a habit of it.
If you are sending patches to the mailing list, please remember to base them on the appropriate tree listed above, not Linus' tree. Patches submitted to the mailing list are tracked in Patchwork.
Patch Format Guidelines
In order to make the lives of the patchmonkeys/maintainers easier, a few simple rules should be followed when submitting patches
- Provide a short summary line of the patch in the format:
- Empty new line
- Add a long comment to explain the patch
- Add the appropriate origin information
[PATCH] mtd: DETAILEDTARGET: short summary
DETAILEDTARGET should be one of the MTD subcomponents, e.g. nand, chips, maps, core, and/or a filename if it simplifies the review/recognition of patch relevance.
Please use understandable wording. We are not experts in witchcraft. Please omit comments which just resemble the short summary line for simple patches.
[From: Realname <realmail>]
[Acked-by: Realname <realmail>]
Signed-off-by: Realname <realmail>
Kernel versions
The MTD code in the linux kernel is updated from the MTD GIT tree in kernel version 4.x (newest) only. The 2.4 kernel does not have NAND support in JFFS2, and will not have anything but high-priority bug-fixes applied to it.
As of March 2005 we dropped Linux 2.4 support from CVS head. This means we no longer care whether the CVS code can be used on Linux 2.4 or not.
As of April 2006 we stopped using CVS altogether and switched to a GIT tree based on the current 2.6 kernel. You may be able to massage the current code to work in older kernels, if you have a sufficient supply of illegal narcotics that you actually desire such a thing. Please don't ask us about it though.
If you are using the ancient 2.4 kernel, that's probably because you're interested in stablity -- it is old and long-tested code. If that's what you want, then you should use the original JFFS2 code which is part of the 2.4 kernel. It's old and slow and doesn't support NAND flash, but it is stable, and is maintained.
The MTD community is neither able nor interested to provide support for new MTD and JFFS2 code with ancient kernels. Move yourself and update to a recent kernel. If you use a vendor supplied kernel, please get support from your kernel vendor. Do not ask on the mailinglist for help with such problems. You are either ignored or you get a pointer to this text. Please save the bandwidth and our time to sort out such questions.