LinuxForum.Fans
Тема

CentOS 6.3 не получается собрать драйвер

Автор: miol 25 сообщений 5974 просмотров
#308276

Есть необходимость собрать драйвер из исходников. При сборке вываливается с ошибкой, причину ошибки нагуглить не удается. Подскажите пожалуйста куда копать.
Инструкция к драйверу http://www.intel.com/support/network/adapter/pro100/sb/CS-032498.htm.

text
 
uname -r
  2.6.32-358.0.1.el6.x86_64
text

ls
  igb-4.1.2

cd igb-4.1.2/src/

make install make -C /lib/modules/2.6.32-358.0.1.el6.x86_64/build SUBDIRS=/root/igb-4.1.2/src modules make[1]: Entering directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64' CC [M] /root/igb-4.1.2/src/igb_main.o In file included from /root/igb-4.1.2/src/igb.h:56, from /root/igb-4.1.2/src/igb_main.c:53: /root/igb-4.1.2/src/kcompat.h: In function ‘mmd_eee_cap_to_ethtool_sup_t’: /root/igb-4.1.2/src/kcompat.h:3225: error: ‘MDIO_EEE_100TX’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3225: error: (Each undeclared identifier is reported only once /root/igb-4.1.2/src/kcompat.h:3225: error: for each function it appears in.) /root/igb-4.1.2/src/kcompat.h:3227: error: ‘MDIO_EEE_1000T’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3229: error: ‘MDIO_EEE_10GT’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3231: error: ‘MDIO_EEE_1000KX’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3233: error: ‘MDIO_EEE_10GKX4’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3235: error: ‘MDIO_EEE_10GKR’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h: In function ‘mmd_eee_adv_to_ethtool_adv_t’: /root/igb-4.1.2/src/kcompat.h:3253: error: ‘MDIO_EEE_100TX’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3255: error: ‘MDIO_EEE_1000T’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3257: error: ‘MDIO_EEE_10GT’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3259: error: ‘MDIO_EEE_1000KX’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3261: error: ‘MDIO_EEE_10GKX4’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3263: error: ‘MDIO_EEE_10GKR’ undeclared (first use in this function) make[2]: *** [/root/igb-4.1.2/src/igb_main.o] Error 1 make[1]: *** [_module_/root/igb-4.1.2/src] Error 2 make[1]: Leaving directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64' make: *** [default] Error 2

#308300

А попробуй пакет сделать, как там написано

text
rpmbuild -tb igb.tar.gz
#308314
text

Compile the driver module:

make install

может для начала make сделать:? не?

#308317
text

rpmbuild -tb igb-4.1.2.tar.gz

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.J5QQdo + umask 022 + cd /root/rpmbuild/BUILD + cd /root/rpmbuild/BUILD + rm -rf igb-4.1.2 + /usr/bin/gzip -dc /root/igb-4.1.2.tar.gz + /bin/tar -xvvf - drwxr-xr-x root/root 0 2012-12-01 02:06 igb-4.1.2/ -rw-r--r-- root/root 9510 2012-12-01 02:06 igb-4.1.2/igb.spec -rwxr--r-x root/root 9767 2012-12-01 02:06 igb-4.1.2/igb.7 -rw-r--r-- root/root 3847 2012-12-01 02:06 igb-4.1.2/pci.updates -rw-r--r-- root/root 1098 2012-12-01 02:06 igb-4.1.2/SUMS drwxr-xr-x root/root 0 2012-12-01 02:06 igb-4.1.2/src/ -rw-r--r-- root/root 6901 2012-12-01 02:06 igb-4.1.2/src/e1000_api.h -rw-r--r-- root/root 2678 2012-12-01 02:06 igb-4.1.2/src/e1000_nvm.h -rw-r--r-- root/root 15726 2012-12-01 02:06 igb-4.1.2/src/e1000_manage.c -rw-r--r-- root/root 2049 2012-12-01 02:06 igb-4.1.2/src/igb_vmdq.h -rw-r--r-- root/root 25703 2012-12-01 02:06 igb-4.1.2/src/igb_procfs.c -rw-r--r-- root/root 23614 2012-12-01 02:06 igb-4.1.2/src/e1000_i210.c -rw-r--r-- root/root 89286 2012-12-01 02:06 igb-4.1.2/src/e1000_phy.c -rw-r--r-- root/root 28340 2012-12-01 02:06 igb-4.1.2/src/kcompat.c -rw-r--r-- root/root 21607 2012-12-01 02:06 igb-4.1.2/src/igb.h -rw-r--r-- root/root 19893 2012-12-01 02:06 igb-4.1.2/src/e1000_82575.h -rw-r--r-- root/root 24133 2012-12-01 02:06 igb-4.1.2/src/e1000_nvm.c -rw-r--r-- root/root 81176 2012-12-01 02:06 igb-4.1.2/src/e1000_defines.h -rw-r--r-- root/root 30658 2012-12-01 02:06 igb-4.1.2/src/igb_sysfs.c -rw-r--r-- root/root 97505 2012-12-01 02:06 igb-4.1.2/src/e1000_82575.c -rw-r--r-- root/root 11195 2012-12-01 02:06 igb-4.1.2/src/e1000_phy.h -rw-r--r-- root/root 97832 2012-12-01 02:06 igb-4.1.2/src/kcompat.h -rw-r--r-- root/root 63770 2012-12-01 02:06 igb-4.1.2/src/e1000_mac.c -rw-r--r-- root/root 16 2012-12-01 02:06 igb-4.1.2/src/Module.supported -rw-r--r-- root/root 4023 2012-12-01 02:06 igb-4.1.2/src/e1000_mbx.h -rw-r--r-- root/root 4066 2012-12-01 02:06 igb-4.1.2/src/e1000_mac.h -rw-r--r-- root/root 24499 2012-12-01 02:06 igb-4.1.2/src/igb_ptp.c -rw-r--r-- root/root 3388 2012-12-01 02:06 igb-4.1.2/src/e1000_i210.h -rw-r--r-- root/root 12621 2012-12-01 02:06 igb-4.1.2/src/igb_regtest.h -rw-r--r-- root/root 32551 2012-12-01 02:06 igb-4.1.2/src/e1000_api.c -rw-r--r-- root/root 13650 2012-12-01 02:06 igb-4.1.2/src/e1000_mbx.c -rw-r--r-- root/root 4249 2012-12-01 02:06 igb-4.1.2/src/e1000_osdep.h -rw-r--r-- root/root 75926 2012-12-01 02:06 igb-4.1.2/src/igb_ethtool.c -rw-r--r-- root/root 13282 2012-12-01 02:06 igb-4.1.2/src/igb_vmdq.c -rw-r--r-- root/root 19011 2012-12-01 02:06 igb-4.1.2/src/e1000_hw.h -rw-r--r-- root/root 36060 2012-12-01 02:06 igb-4.1.2/src/e1000_regs.h -rw-r--r-- root/root 22036 2012-12-01 02:06 igb-4.1.2/src/igb_param.c -rw-r--r-- root/root 3560 2012-12-01 02:06 igb-4.1.2/src/e1000_manage.h -rw-r--r-- root/root 232190 2012-12-01 02:06 igb-4.1.2/src/igb_main.c -rw-r--r-- root/root 29764 2012-12-01 02:06 igb-4.1.2/src/kcompat_ethtool.c -rw-r--r-- root/root 11303 2012-12-01 02:06 igb-4.1.2/src/Makefile -rw-r--r-- root/root 18671 2012-12-01 02:06 igb-4.1.2/COPYING -rwxr--r-x root/root 34478 2012-12-01 02:06 igb-4.1.2/README + STATUS=0 + '[' 0 -ne 0 ']' + cd igb-4.1.2 + /bin/chmod -Rf a+rX,u+w,g-w,o-w . + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.FpJYnm + umask 022 + cd /root/rpmbuild/BUILD + cd igb-4.1.2 + make -C src clean make: Entering directory `/root/rpmbuild/BUILD/igb-4.1.2/src' rm -rf igb.ko igb.o igb.mod.c igb.mod.o igb_main.o e1000_82575.o e1000_i210.o e1000_mac.o e1000_nvm.o e1000_phy.o e1000_manage.o igb_param.o igb_ethtool.o kcompat.o e1000_api.o e1000_mbx.o igb_vmdq.o igb_sysfs.o igb_procfs.o igb_ptp.o \ igb.7.gz .*cmd .tmp_versions Module.markers Module.symvers modules.order make: Leaving directory `/root/rpmbuild/BUILD/igb-4.1.2/src' + make -C src make: Entering directory `/root/rpmbuild/BUILD/igb-4.1.2/src' make -C /lib/modules/2.6.32-358.0.1.el6.x86_64/build SUBDIRS=/root/rpmbuild/BUILD/igb-4.1.2/src modules make[1]: Entering directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64' CC [M] /root/rpmbuild/BUILD/igb-4.1.2/src/igb_main.o In file included from /root/rpmbuild/BUILD/igb-4.1.2/src/igb.h:56, from /root/rpmbuild/BUILD/igb-4.1.2/src/igb_main.c:53: /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h: In function 'mmd_eee_cap_to_ethtool_sup_t': /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3225: error: 'MDIO_EEE_100TX' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3225: error: (Each undeclared identifier is reported only once /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3225: error: for each function it appears in.) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3227: error: 'MDIO_EEE_1000T' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3229: error: 'MDIO_EEE_10GT' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3231: error: 'MDIO_EEE_1000KX' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3233: error: 'MDIO_EEE_10GKX4' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3235: error: 'MDIO_EEE_10GKR' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h: In function 'mmd_eee_adv_to_ethtool_adv_t': /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3253: error: 'MDIO_EEE_100TX' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3255: error: 'MDIO_EEE_1000T' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3257: error: 'MDIO_EEE_10GT' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3259: error: 'MDIO_EEE_1000KX' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3261: error: 'MDIO_EEE_10GKX4' undeclared (first use in this function) /root/rpmbuild/BUILD/igb-4.1.2/src/kcompat.h:3263: error: 'MDIO_EEE_10GKR' undeclared (first use in this function) make[2]: *** [/root/rpmbuild/BUILD/igb-4.1.2/src/igb_main.o] Error 1 make[1]: *** [_module_/root/rpmbuild/BUILD/igb-4.1.2/src] Error 2 make[1]: Leaving directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64' make: *** [default] Error 2 make: Leaving directory `/root/rpmbuild/BUILD/igb-4.1.2/src' error: Bad exit status from /var/tmp/rpm-tmp.FpJYnm (%build)

RPM build errors: Bad exit status from /var/tmp/rpm-tmp.FpJYnm (%build)

#308318

2 i2ks

text

make

make -C /lib/modules/2.6.32-358.0.1.el6.x86_64/build SUBDIRS=/root/igb-4.1.2/src modules make[1]: Entering directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64' CC [M] /root/igb-4.1.2/src/igb_main.o In file included from /root/igb-4.1.2/src/igb.h:56, from /root/igb-4.1.2/src/igb_main.c:53: /root/igb-4.1.2/src/kcompat.h: In function ‘mmd_eee_cap_to_ethtool_sup_t’: /root/igb-4.1.2/src/kcompat.h:3225: error: ‘MDIO_EEE_100TX’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3225: error: (Each undeclared identifier is reported only once /root/igb-4.1.2/src/kcompat.h:3225: error: for each function it appears in.) /root/igb-4.1.2/src/kcompat.h:3227: error: ‘MDIO_EEE_1000T’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3229: error: ‘MDIO_EEE_10GT’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3231: error: ‘MDIO_EEE_1000KX’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3233: error: ‘MDIO_EEE_10GKX4’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3235: error: ‘MDIO_EEE_10GKR’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h: In function ‘mmd_eee_adv_to_ethtool_adv_t’: /root/igb-4.1.2/src/kcompat.h:3253: error: ‘MDIO_EEE_100TX’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3255: error: ‘MDIO_EEE_1000T’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3257: error: ‘MDIO_EEE_10GT’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3259: error: ‘MDIO_EEE_1000KX’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3261: error: ‘MDIO_EEE_10GKX4’ undeclared (first use in this function) /root/igb-4.1.2/src/kcompat.h:3263: error: ‘MDIO_EEE_10GKR’ undeclared (first use in this function) make[2]: *** [/root/igb-4.1.2/src/igb_main.o] Error 1 make[1]: *** [_module_/root/igb-4.1.2/src] Error 2 make[1]: Leaving directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64' make: *** [default] Error 2

#308325

какого-то пакета не хватает. какого сказать не могу.

#308330

Установи пакет kernel-devel и возможно ещё kernel-header.

#308331

2 i2ks

У меня такая же мысль возникла, но вот только какой пакет нужен я так и не на гуглил.

Полазил в src/kcompat.h в том месте где возникает ошибка, но безрезультатно. Сишник из меня никакой, а интуитивно ничего...

#308333

2 Vascom

Стоят.

text

yum install kernel-devel kernel-headers
  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile
   * base: mirror.majorhost.net
   * extras: mirror.majorhost.net
   * updates: centosp3.centos.org
  Setting up Install Process
  Package kernel-devel-2.6.32-358.0.1.el6.x86_64 already installed and latest version
  Package kernel-headers-2.6.32-358.0.1.el6.x86_64 already installed and latest version
  Nothing to do
#308335

Может ядро слишком уж древнее?
А в нём разве нет этого драйвера?

#308337

compat-glibc-headers и compat-glibc еще поставь

#308339

Покажи вывод команды

text
grep IGB /boot/config-2.6.32-358.0.1.el6.x86_64
#308340

2 Vascom
Я пытаюсь завести SR-IOV. На штатном драйвере при попытке

text
modprobe -r igb; modprobe igb max_vfs=7

в консоль выкидывает

text
igb 0000:02:00.0 SR-IOV: bus number out of range

и ничего не происходит.

Решил попробывать на intel'овском.

#308341

2 i2ks

Стоят

text

yum install compat-glibc-headers compat-glibc
  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile
   * base: mirror.majorhost.net
   * extras: mirror.majorhost.net
   * updates: centosp3.centos.org
  Setting up Install Process
  Package 1:compat-glibc-headers-2.5-46.2.x86_64 already installed and latest version
  Package 1:compat-glibc-2.5-46.2.x86_64 already installed and latest version
  Nothing to do

#308342

2 Vascom

text

grep IGB /boot/config-2.6.32-358.0.1.el6.x86_64
  CONFIG_IGB=m
  CONFIG_IGB_DCA=y
  CONFIG_IGB_PTP=y
  CONFIG_IGBVF=m
#308343

Ну так штатный и интеловский должны быть идентичны. Лучше напиши в багзиллу о проблеме.

#308344

2 Vascom
С моим английским это прям проблема.

#308352
"miol⇓" написал:
/root/igb-4.1.2/src/kcompat.h:3225: error: ‘MDIO_EEE_100TX’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3225: error: (Each undeclared identifier is reported only once
/root/igb-4.1.2/src/kcompat.h:3225: error: for each function it appears in.)
/root/igb-4.1.2/src/kcompat.h:3227: error: ‘MDIO_EEE_1000T’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3229: error: ‘MDIO_EEE_10GT’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3231: error: ‘MDIO_EEE_1000KX’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3233: error: ‘MDIO_EEE_10GKX4’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3235: error: ‘MDIO_EEE_10GKR’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h: In function ‘mmd_eee_adv_to_ethtool_adv_t’:
/root/igb-4.1.2/src/kcompat.h:3253: error: ‘MDIO_EEE_100TX’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3255: error: ‘MDIO_EEE_1000T’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3257: error: ‘MDIO_EEE_10GT’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3259: error: ‘MDIO_EEE_1000KX’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3261: error: ‘MDIO_EEE_10GKX4’ undeclared (first use in this function)
/root/igb-4.1.2/src/kcompat.h:3263: error: ‘MDIO_EEE_10GKR’ undeclared (first use in this function)

Эти неопределенные переменные должны находиться в файле mdio.h для ядер 2.6.32 и выше
Поищите его в системе.

#308361

ТС, подключите ELRepo и поставьте kmod-igb. Там версия 4.1.2. И не мучайтесь.

#308372

2 alexfinn
Я ставил kmod-igb с ELRepo результат тот же.


modprobe -r igb; modprobe igb max_vfs=7
в консоль выкидывает
igb 0000:02:00.0 SR-IOV: bus number out of range
Войдите или зарегистрируйтесь, чтобы ответить.