Software Archive
Read-only legacy content
17061 Discussions

Rebuild ofed-driver-3.1-0.1.build0.fc13.src.rpm

Nicolas_S_2
Beginner
413 Views

Hello,

I have successfully installed MPSS 3.1 on CentOS 6.4, and everything is working fine with the stock kernel. I want to update the kernel, so I tried to rebuild ofed drivers with rpmbuild --rebuild ofed-driver-3.1-0.1.build0.fc13.src.rpm, and it's not working very well...

It fails with :

    make[2]: *** [/home/toto/rpmbuild/BUILD/ofed-driver-3.1/ofa_kernel-1.5.4.1/drivers/net/mlx4] Error 2
      set -e ; perl /usr/src/kernels/2.6.32-358.23.2.el6.x86_64/scripts/recordmcount.pl "x86_64" "64" "objdump" "objcopy" "gcc" "ld" "nm" "" "" "1" "/home/toto/rpmbuild/BUILD/ofed-driver-3.1/ofa_kernel-1.5.4.1/driv;
      set -e ; perl /usr/src/kernels/2.6.32-358.23.2.el6.x86_64/scripts/recordmcount.pl "x86_64" "64" "objdump" "objcopy" "gcc" "ld" "nm" "" "" "1" "/home/toto/rpmbuild/BUILD/ofed-driver-3.1/ofa_kernel-1.5.4.1/driv;
    make[3]: *** [/home/toto/rpmbuild/BUILD/ofed-driver-3.1/ofa_kernel-1.5.4.1/drivers/infiniband/hw/qib] Error 2
    make[2]: *** [/home/toto/rpmbuild/BUILD/ofed-driver-3.1/ofa_kernel-1.5.4.1/drivers/infiniband] Error 2
    make[1]: *** [_module_/home/toto/rpmbuild/BUILD/ofed-driver-3.1/ofa_kernel-1.5.4.1] Error 2
    make[1]: Leaving directory `/usr/src/kernels/2.6.32-358.23.2.el6.x86_64'
    make: *** [kernel] Error 2
    error: Bad exit status from /var/tmp/rpm-tmp.LeLtOY (%build)


    RPM build errors:
        user build does not exist - using root
        group build does not exist - using root
        user build does not exist - using root
        group build does not exist - using root
        Bad exit status from /var/tmp/rpm-tmp.LeLtOY (%build)

When I launch the compilation with /usr/bin/make OPENIB_KERNEL_EXTRA_CFLAGS:=-I/usr/src/kernels/2.6.32-358.23.2.el6.x86_64/include/modules/ kernel, I get an explicit error message (full trace : http://pastebin.com/Ns7Ggunc  ) 

Could you please help me bypass this error ?

0 Kudos
3 Replies
Nicolas_S_2
Beginner
413 Views

The problem is coming from the updated kernel headers  : some definitions are redundant with OFED definitions. They don't exist with the stock kernel headers.

So, the solution seems to be patching  the OFED headers :

  • Update CentOS to get the lastest kernel :
    • yum update
  • Install needed packages :
    • yum install rpm-build redhat-lsb kernel-devel gcc
  • get MPSS 3.1 http://registrationcenter.intel.com/irc_nas/3678/mpss-3.1-rhel-6.4.tar, extract it, go to mpss folder/src and  rebuild mpss-modules :
    • rpmbuild --rebuild mpss-modules-3.1-0.1.build0.el6.src.rpm
  • install the rebuilded RPM :
    • yum install ~/rpmbuild/RPMS/x86_64/mpss-modules-dev-2.6.32-358.23.2.el6.x86_64-3.1-0.1.build0.el6.x86_64.rpm
  • in the mpss folder, go to src and extract ofed-driver-3.1-0.1.build0.fc13.src.rpm :
    • rpm2cpio ofed-driver-3.1-0.1.build0.fc13.src.rpm | cpio -idmv
  • extract ofed-driver-3.1.tgz : 
    • tar xfz ofed-driver-3.1.tgz
  • go to the extracted folder :
    • cd ofed-driver-3.1/src/patches/2.6.32-EL6.1/
  • create file patch for ethtool.h :

cat <<'EOF' > ethtool.h.patch
diff -Naur a/kernel_addons/backport/2.6.32-EL6.1/include/linux/ethtool.h b/kernel_addons/backport/2.6.32-EL6.1/include/linux/ethtool.h
--- a/kernel_addons/backport/2.6.32-EL6.1/include/linux/ethtool.h2013-11-28 15:07:36.182722948 +0100
+++ b/kernel_addons/backport/2.6.32-EL6.1/include/linux/ethtool.h2013-11-28 15:08:54.000726177 +0100
@@ -12,12 +12,12 @@
  * @ETHTOOL_ID_OFF: LED should be turned off (used iff %ETHTOOL_ID_ACTIVE
  *      is not supported)
  */
-enum ethtool_phys_id_state {
+/** enum ethtool_phys_id_state {
     ETHTOOL_ID_INACTIVE,
     ETHTOOL_ID_ACTIVE,
     ETHTOOL_ID_ON,
     ETHTOOL_ID_OFF
-};
+}; **/
 
 /* boolean flags controlling per-interface behavior characteristics.
  * When reading, the flag indicates whether or not a certain behavior
EOF

  • create file patch for netdevice.h

cat <<'EOF' > netdevice.h.patch
diff -Naur a/kernel_addons/backport/2.6.32-EL6.1/include/linux/netdevice.h b/kernel_addons/backport/2.6.32-EL6.1/include/linux/netdevice.h
 --- a/kernel_addons/backport/2.6.32-EL6.1/include/linux/netdevice.h2013-11-28 15:10:12.476725726 +0100
 +++ b/kernel_addons/backport/2.6.32-EL6.1/include/linux/netdevice.h2013-11-28 15:11:39.591743584 +0100
 @@ -23,11 +23,11 @@
   *     possible. Hence adding this function to avoid changes in driver source
   *     code and making this function to always return success.
   */
 -static inline int netif_set_real_num_rx_queues(struct net_device *dev,
 +/** static inline int netif_set_real_num_rx_queues(struct net_device *dev,
  unsigned int rxq)
  {
      return 0;
 -}
 +} **/
 
#define NETIF_F_RXHASH          (1 << 28) /* Receive hashing offload */
EOF

  • return to mpss/src folder :
    • cd ../../../../
  • tar ofed-driver folder
    • tar cpfz ofed-driver-3.1.tgz ofed-driver-3.1
  • create rpmbuild folder :
    • mkdir -p ~/rpmbuild/SOURCES
  • copy needed files :
    • cp intel-mic-ofed-kmod.spec ~/rpmbuild/
    • cp ofed-driver-3.1.tgz ~/rpmbuild/SOURCES/
  • go to ~/rpmbuild/
  • rebuild rpm and src.rpm files :
    • rpmbuild -ba intel-mic-ofed-kmod.spec

     

0 Kudos
Konrad_L_2
Beginner
413 Views

I tried to recompile the MPSS 3.1 modules when I execute the rebuild command:

[bash]rpmbuild --rebuild mpss-modules-3.1-0.1.build0.el6.src.rpm[/bash]

I get the following error message:

[bash]+ STATUS=0
+ '[' 0 -ne 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Otb7Qq
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd mpss-modules-3.1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ '[' -d modules ']'
+ make KERNEL_VERSION=3.8.13-rt14.25.el6rt.x86_64 KERNEL_SRC=/lib/modules/3.8.13-rt14.25.el6rt.x86_64/build 'CC=gcc ' 'LD=ld ' MIC_CARD_ARCH=k1om
make -C /lib/modules/3.8.13-rt14.25.el6rt.x86_64/build M=/root/rpmbuild/BUILD/mpss-modules-3.1 modules \
                INSTALL_MOD_PATH=
make[1]: Entering directory `/usr/src/kernels/3.8.13-rt14.25.el6rt.x86_64'
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/dma/mic_dma_lib.o
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/dma/mic_dma_md.o
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/host/acptboot.o
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/host/ioctl.o
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/host/linpm.o
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/host/linpsmi.o
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/host/linscif_host.o
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/host/linsysfs.o
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/host/linux.o
  CC   /root/rpmbuild/BUILD/mpss-modules-3.1/host/linvcons.o
/root/rpmbuild/BUILD/mpss-modules-3.1/host/linvcons.c: In function 'micvcons_create':
/root/rpmbuild/BUILD/mpss-modules-3.1/host/linvcons.c:96: error: 'struct tty_driver' has no member named 'minor_num'
make[2]: *** [/root/rpmbuild/BUILD/mpss-modules-3.1/host/linvcons.o] Error 1
make[1]: *** [_module_/root/rpmbuild/BUILD/mpss-modules-3.1] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.8.13-rt14.25.el6rt.x86_64'
make: *** [modules] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.Otb7Qq (%build)


RPM build errors:
    user build does not exist - using root
    group build does not exist - using root
    user build does not exist - using root
    group build does not exist - using root
    Bad exit status from /var/tmp/rpm-tmp.Otb7Qq (%build)

[/bash]

Does anyone know how to work around this error? I gues it might be a problem of the 3.8- Kernel? Do I have to patch something to avoid the [bash]'struct tty_driver' has no member named 'minor_num'[/bash] error message?

 

0 Kudos
TaylorIoTKidd
New Contributor I
413 Views

Konrad,

Our apologies for not getting back to you sooner. Were you able to resolve this issue?

Regards
--
Taylor

 

0 Kudos
Reply