[ofa-general] So how do you build kernel modules for non-standard kernels?
Hoang-Nam Nguyen
HNGUYEN at de.ibm.com
Thu Mar 29 23:09:13 PDT 2007
general-bounces at lists.openfabrics.org wrote on 30.03.2007 01:47:49:
> We have here at LLNL a kernel which is based on RHEL4 U4 but has a kernel
> version which looks like this:
>
> 16:10:56 > uname -r
> 2.6.9-61chaos
>
> One of our engineers here downloaded the latest OFED 1.2 build and
> attempted to
> build the kernel modules, which fails. (I have included the ofed.
> conf file and
> build log)
>
> As we were afraid, build.sh does not detect the correct kernel version.
We
> attempted to work around the problem by:
>
> 1) installing the ofa_kernel-1.2-beta1.src.rpm
>
> 16:31:05 > rpm -i ofa_kernel-1.2-beta1.src.rpm
> warning: user vlad does not exist - using root
> warning: group vlad does not exist - using root
> warning: user vlad does not exist - using root
> warning: group vlad does not exist - using root
>
> 16:31:09 > ls */*ofa*
> SOURCES/ofa_kernel-1.2.tgz SPECS/ofa_kernel.spec*
>
> 2) Extracting the source from that install
> 3) Adding the following line to the configure script.
>
> get_backport_dir()
> ...
> 2.6.9-61*)
> echo 2.6.9_U4
> ;;
> ...
>
> 4) taring that source back up.
An alternative is to call configure <options>, make, make install
Issue configure --help to obtain a full list of options, ie to tell
which modules you want to build.
>
> 16:34:34 > ls */*ofa*
> SOURCES/ofa_kernel-1.2.tgz SPECS/ofa_kernel.spec*
>
> SOURCES/ofa_kernel-1.2:
> BUILD_ID Makefile@ drivers/ kernel_addons/ makefile@
> ofed_scripts/
> Documentation/ configure@ include/ kernel_patches/ net/
>
> 5) runing rpmbuild -ba ofa_kernel.spec
Looking at ofa_kernel.spec you need to set configure_options
as told above. Eg like this:
rpmbuild -bb --define='--with-core-mod' SPECS/ofa_kernel.spec
Frankly speaking, I haven't tried that out.
Regards
Nam
IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen,
Deutschland
Vorsitzender des Aufsichtsrats: Johann Weihen, Geschaeftsfuehrung: Herbert
Kircher
Sitz der Gesellschaft: Boeblingen, Registergericht: Amtsgericht Stuttgart,
HRB 243294
More information about the general
mailing list