Diese Website existiert nur weil wir Werbung mit AdSense ausliefern.
Bitte den AdBlocker daher auf dieser Website ausschalten! Danke.

Kernel-Module kompilieren schlägt immer fehl

Alles rund um die Systemverwaltung, die Administration und Konfiguration Eures Linuxsystems

Moderator: Moderatoren

Antworten
hannesd
Newbie
Newbie
Beiträge: 2
Registriert: 27. Mai 2009, 09:49

Kernel-Module kompilieren schlägt immer fehl

Beitrag von hannesd » 27. Mai 2009, 10:11

Hallo allerseits

Ich habe ein openSUSE 11.1-System (2.6.27.21-0.1-pae), mit installiertem Bonding-Treiber (Version 3.3.0). Der neue Kernel (2.6.29) hat eine neue Version des Bonding-Treibers verfügbar (3.5.0). Ich habe nun die Kernel-Source heruntergeladen und entpackt. Dann folgendes Makefile erstellt:

Code: Alles auswählen

opensuse:/tmp/linux-2.6.29/drivers/net/bonding # cat Makefile
#
# Makefile for the Ethernet Bonding driver
#
obj-m := bonding.o
bonding-objs := bond_main.o bond_3ad.o bond_alb.o bond_sysfs.o

all:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Das Kompilieren mit "make" schlägt jedoch immer mit folgender Fehlermeldung fehl:

Code: Alles auswählen

opensuse:/tmp/linux-2.6.29/drivers/net/bonding # make
make -C /lib/modules/2.6.27.21-0.1-pae/build M=/tmp/linux-2.6.29/drivers/net/bonding modules
make[1]: Entering directory `/usr/src/linux-2.6.27.21-0.1-obj/i386/pae'
make -C /usr/src/linux-2.6.27.21-0.1 O=/usr/src/linux-2.6.27.21-0.1-obj/i386/pae/. modules
  CC [M]  /tmp/linux-2.6.29/drivers/net/bonding/bond_main.o
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_vlan_rx_registerâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:456: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:459: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:460: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_vlan_rx_add_vidâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:478: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:481: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:482: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_vlan_rx_kill_vidâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:508: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:511: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:516: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_add_vlans_on_slaveâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:532: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:540: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:541: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:544: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:548: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_del_vlans_from_slaveâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:556: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:566: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:574: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:580: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:581: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_check_dev_linkâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:690: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:698: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_compute_featuresâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1350: error: âNETIF_F_ONE_FOR_ALLâ undeclared (first use in this function)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1350: error: (Each undeclared identifier is reported only once
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1350: error: for each function it appears in.)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1353: error: implicit declaration of function ânetdev_increment_featuresâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1362: error: implicit declaration of function ânetdev_fix_featuresâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_enslaveâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1388: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1397: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1479: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_get_statsâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:3906: error: implicit declaration of function âdev_get_statsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:3906: warning: initialization makes pointer from integer without a cast
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_neigh_setupâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4129: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4130: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4131: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_change_mtuâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4165: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_set_mac_addressâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4252: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4255: error: dereferencing pointer to incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: At top level:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4585: error: variable âbond_netdev_opsâ has initializer but incomplete type
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4586: error: unknown field ândo_openâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4586: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4586: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4587: error: unknown field ândo_stopâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4587: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4587: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4588: error: unknown field ândo_start_xmitâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4588: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4588: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4589: error: unknown field ândo_get_statsâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4589: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4589: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4590: error: unknown field ândo_do_ioctlâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4590: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4590: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4591: error: unknown field ândo_set_multicast_listâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4591: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4591: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4592: error: unknown field ândo_change_mtuâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4592: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4592: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4593: error: unknown field ândo_set_mac_addressâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4593: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4593: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4594: error: unknown field ândo_neigh_setupâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4594: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4594: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4595: error: unknown field ândo_vlan_rx_registerâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4595: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4595: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4596: error: unknown field ândo_vlan_rx_add_vidâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4596: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4596: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4597: error: unknown field ândo_vlan_rx_kill_vidâ specified in initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4597: warning: excess elements in struct initializer
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4597: warning: (near initialization for âbond_netdev_opsâ)
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function âbond_initâ:
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4632: error: âstruct net_deviceâ has no member named ânetdev_opsâ
/tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4643: error: âIFF_MASTER_ARPMONâ undeclared (first use in this function)
make[4]: *** [/tmp/linux-2.6.29/drivers/net/bonding/bond_main.o] Error 1
make[3]: *** [_module_/tmp/linux-2.6.29/drivers/net/bonding] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.27.21-0.1-obj/i386/pae'
make: *** [all] Error 2
Das Verzeichnis "opensuse:/tmp/linux-2.6.29/drivers/net/bonding #" hat folgenden Inhalt:

Code: Alles auswählen

opensuse:/tmp/linux-2.6.29/drivers/net/bonding # l
total 384
drwxr-xr-x  2 root root   4096 May 27 10:09 ./
drwxr-xr-x 40 root root  12288 Mar 24 00:12 ../
-rw-r--r--  1 root root    268 May 26 15:36 Makefile
-rw-r--r--  1 root root    223 Mar 24 00:12 Makefile.sav
-rw-r--r--  1 root root  81699 Mar 24 00:12 bond_3ad.c
-rw-r--r--  1 root root   9463 Mar 24 00:12 bond_3ad.h
-rw-r--r--  1 root root  45798 Mar 24 00:12 bond_alb.c
-rw-r--r--  1 root root   4802 Mar 24 00:12 bond_alb.h
-rw-r--r--  1 root root   5432 Mar 24 00:12 bond_ipv6.c
-rw-r--r--  1 root root 139910 Mar 24 00:12 bond_main.c
-rw-r--r--  1 root root  43529 Mar 24 00:12 bond_sysfs.c
-rw-r--r--  1 root root  10845 Mar 24 00:12 bonding.h
Meine Frage: Was ist hier noch falsch? Kann überhaupt ein einzelnes Treiber-Module kompiliert werden? Kann das Modul auch nur mit "gcc" übersetzt werden (ohne Mithilfe eines Makefiles bzw. "make")?
Besten Dank für Eure Mithilfe.
Hannes

Werbung:
jengelh
Guru
Guru
Beiträge: 4039
Registriert: 20. Nov 2004, 17:42
Kontaktdaten:

Re: Kernel-Module kompilieren schlägt immer fehl

Beitrag von jengelh » 27. Mai 2009, 18:40

hannesd hat geschrieben:Der neue Kernel (2.6.29) hat eine neue Version des Bonding-Treibers verfügbar (3.5.0). Ich habe nun die Kernel-Source heruntergeladen und entpackt.[...]
Das Kompilieren mit "make" schlägt jedoch immer [...] fehl.
Klar, weil der Bonding aus 2.6.29 auch eigentlich nur für 2.6.29 ausgelegt ist. Mit etwas Arbeit kann man das sicher auch für 2.6.27 laufbar machen, aber da werden einige die Schultern zucken und fragen warum du nicht eher ein neues Kernel-RPM nimmst (shameless advertisement included).

hannesd
Newbie
Newbie
Beiträge: 2
Registriert: 27. Mai 2009, 09:49

[SOLVED] Re: Kernel-Module kompilieren schlägt immer fehl

Beitrag von hannesd » 28. Mai 2009, 07:01

OK, besten Dank für Eurer Feedback.
Hannes

Hier noch ein Link zum selben Post in einem anderen Forum:
http://www.linuxforen.de/forums/showthr ... ost1712533

Antworten