[openib-general] ofed backports update

Yosef Etigin yosefe at voltaire.com
Thu Dec 14 02:19:16 PST 2006


On Mon, 2006-12-11 at 16:48 +0200, Michael S. Tsirkin wrote:
> 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>/.
> 

I was running the ‘configure’ script under ofed root.

In ofed 1.1, it is possible to run configure without flags to patch the
sources, and then run it again –without-patches and with the desired
flags.

In ofed 1.2 (Vlad’s tree) this scenario causes compilation error while
running ‘make’ afterwards (2.6.9-34ELsmp and on 2.6.16.21-0.8, but NOT
2.6.19) causes compilation errors later on.

However, when I just ran configure on a fresh source, with all the
desired flags, it worked just fine.

It seems to happen because the configure only patches Makefiles with the
selected components with the kernel-addons include path.

Maybe it should patch all Makefiles, or copy the files to ./include?


_______________________________________________________________
Yosef Etigin, ib-host-stack
Voltaire – The Grid Backbone
www.voltaire.com




More information about the general mailing list