[openib-general] ofed backports update
Michael S. Tsirkin
mst at mellanox.co.il
Mon Dec 11 06:48:13 PST 2006
Here's a small update on OFED 1.2 backports. This describes a change
I did a couple of weeks ago but never got to documenting.
NOTE: This info is relevant only for people developing OFED kernel code,
everything is transparent for others.
NOTE: This is by *no means* a comprehensive writeup of OFED build process -
just a small update for people familiar with development in OFED 1.1.
Background:
OFED 1.1 did all backports by applying patches under
kernel_patches/backports/<kernel version>/ directory.
To back-port a package, you just stuck a patch there
and one OFED detected an appropriate kernel, it was applied before build.
In many cases - where the kernel we are back-porting to was simply
missing some macro - what patch actually did was just add a file
under the include directory, and OFED build scripts knew to pick
these up before standard linux includes.
Managing these became somewhat of a pain as it is often hard to
see the history of a patch: try git diff on a patch that sits in git tree
and see what I mean.
Update:
So for OFED 1.2 I've created a new directory kernel_addons, and converted
all patches that created new files to plain files under the relevant
kernel directory. OFED scripts now look there for files before standard
Linux headers.
For an example, look at how backport to 2.6.18 looks:
http://staging.openfabrics.org/git/?p=~vlad/ofed_1_2/.git;a=tree;f=kernel_addons/backport/2.6.18/include/linux;h=5eabed1f98596f92ce149dae65c4ab1ceb1d6a67;hb=HEAD
Unfortunately, not all patches are of this form - some really tweak source
inside the infiniband subtree - but we can strive to reduce the number of this
and in this way make maintaining backports more of a seamless process.
Bottom line
There are now 2 mechanisms for back-porting in OFED:
- if you want to add a kernel-specific file, stick it under
kernel_addons/backport/<kernel-version>/.
- if you must change an existing file depending on kernel version, stick
a patch in kernel_patches/backports/<kernel version>/.
--
MST
More information about the general
mailing list