On 10/27/2010 06:03 PM, EredicatorX wrote:
Short version.
OS: Fedora 13
Kernel: 2.6.34.7-61.fc13.i686.PAE
Hardware: Lenovo x100e
Problem:Trying to build drivers for realtec wireless lan.
When I tried to build drivers initally with
rtl8192se_linux_2.6.0018.1025.2010 every time I would try to load the
driver with modprobe it would error and say " Invalid module format"
modprobe r8192se_pci
FATAL: Error inserting r8192se_pci
(/lib/modules/2.6.34.7-61.fc13.i686.PAE/kernel/drivers/net/wireless/r8192se_pci.ko):
Invalid module format
I modified /usr/src/kernel/2.6.34.7-61.fc13.i686/Makefile and changed
EXTRAVERSION = .7-61.fc13.i686
TO
EXTRAVERSION = .7-61.fc13.i686.PAE
I then did "make modules" which generated a new version of version.h&
utsrelease.h which had the correct PAE version in it. The build error
out after that.
Went back to my sources and did a make clean, make and then make install.
modprobe r8192se_pci now cause a core dump.
I have built kernels in the past but it has been a long time and never
had to build a PAE version. What else would be required for me to change
in order to build the kernel modules correctly and then build the
driver? In the end I am not trying to compile a custom kernel I simply
want to use the kernel I have and be able to build drivers against it as
needed.
Thanks in advance.
I included core dumps and other info in the long version below.
LONG VERSION:
Built driver rtl8192se_linux_2.6.0018.1025.2010
make
make install
All finished ok.
modprobe generates this error.
[root@etop rtl8192se_linux_2.6.0018.1025.2010]# modprobe r8192se_pci
WARNING: All config files need .conf: /etc/modprobe.d/ndiswrapper, it
will be ignored in a future release.
FATAL: Error inserting r8192se_pci
(/lib/modules/2.6.34.7-61.fc13.i686.PAE/kernel/drivers/net/wireless/r8192se_pci.ko):
Invalid module format
dmesg output
r8192se_pci: version magic '2.6.34.7-61.fc13.i686 SMP mod_unload 686 '
should be '2.6.34.7-61.fc13.i686.PAE SMP mod_unload 686 '
vim Makefile and changed /usr/src/kernel/2.6.34.7-61.fc13.i686/Makefile
EXTRAVERSION = .7-61.fc13.i686
TO
EXTRAVERSION = .7-61.fc13.i686.PAE
[root@etop 2.6.34.7-61.fc13.i686]# make modules
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: *** No rule to make target `missing-syscalls'. Stop.
make: *** [prepare0] Error 2
Finally modprobe and coresponding core dump from dmesg
modprobe r8192se_pci
dmesg:
Linux kernel driver for RTL8192 based WLAN cards
Copyright (c) 2007-2008, Realsil Wlan Driver
rtl819xSE 0000:03:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
rtl819xSE 0000:03:00.0: setting latency timer to 64
rtl819xSE:region #1 not a MMIO resource, aborting
------------[ cut here ]------------
WARNING: at net/core/dev.c:4888 rollback_registered_many+0x88/0x1ad()
Hardware name: 3508CTO
Modules linked in: r8192se_pci(+) nls_utf8 fuse rfcomm sco bridge stp
llc bnep l2cap sunrpc cpufreq_ondemand powernow_k8 ip6t_REJECT
nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 uinput
snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_seq
snd_seq_device snd_pcm btusb thinkpad_acpi r8169 bluetooth uvcvideo
snd_timer cfg80211 wmi snd_page_alloc snd mii videodev rfkill
v4l1_compat joydev i2c_piix4 serio_raw soundcore k8temp microcode
aes_i586 aes_generic xts gf128mul dm_crypt video output usb_storage
radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded:
scsi_wait_scan]
Pid: 6777, comm: insmod Not tainted 2.6.34.7-61.fc13.i686.PAE #1
Call Trace:
[<c043f30a>] warn_slowpath_common+0x6a/0x81
[<c07174a2>] ? rollback_registered_many+0x88/0x1ad
[<c043f333>] warn_slowpath_null+0x12/0x15
[<c07174a2>] rollback_registered_many+0x88/0x1ad
[<c0717636>] rollback_registered+0x28/0x2d
[<c071768e>] unregister_netdevice_queue+0x53/0x70
[<c0717754>] unregister_netdev+0x1d/0x24
[<f8cbe707>] rtl8192_pci_probe+0x579/0x5b7 [r8192se_pci]
[<c05c2d70>] local_pci_probe+0x13/0x15
[<c05c3940>] pci_device_probe+0x48/0x6b
[<c065366b>] driver_probe_device+0xca/0x1d2
[<c06537bb>] __driver_attach+0x48/0x64
[<c0652c78>] bus_for_each_dev+0x42/0x6c
[<c065345b>] driver_attach+0x19/0x1b
[<c0653773>] ? __driver_attach+0x0/0x64
[<c0652f04>] bus_add_driver+0xfe/0x244
[<c05ae22b>] ? kset_find_obj+0x23/0x4e
[<c0653a26>] driver_register+0x81/0xe8
[<c05c3b00>] __pci_register_driver+0x3d/0x9a
[<f7f24000>] ? rtl8192_pci_module_init+0x0/0x118 [r8192se_pci]
[<f7f24107>] rtl8192_pci_module_init+0x107/0x118 [r8192se_pci]
[<c040305b>] do_one_initcall+0x51/0x13f
[<c0468fa1>] sys_init_module+0xac/0x1e3
[<c0408c9f>] sysenter_do_call+0x12/0x28
---[ end trace 71022fdbb6758c02 ]---
BUG: unable to handle kernel NULL pointer dereference at 000000d8
IP: [<c0781fcb>] packet_notifier+0x19/0x12b
*pdpt = 0000000032966001 *pde = 000000013e737067
Oops: 0000 [#1] SMP
last sysfs file: /sys/devices/virtual/net/pan0/statistics/collisions
Modules linked in: r8192se_pci(+) nls_utf8 fuse rfcomm sco bridge stp
llc bnep l2cap sunrpc cpufreq_ondemand powernow_k8 ip6t_REJECT
nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 uinput
snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_seq
snd_seq_device snd_pcm btusb thinkpad_acpi r8169 bluetooth uvcvideo
snd_timer cfg80211 wmi snd_page_alloc snd mii videodev rfkill
v4l1_compat joydev i2c_piix4 serio_raw soundcore k8temp microcode
aes_i586 aes_generic xts gf128mul dm_crypt video output usb_storage
radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded:
scsi_wait_scan]
Pid: 6777, comm: insmod Tainted: G W 2.6.34.7-61.fc13.i686.PAE
#1 3508CTO/3508CTO
EIP: 0060:[<c0781fcb>] EFLAGS: 00210286 CPU: 0
EIP is at packet_notifier+0x19/0x12b
EAX: 00000000 EBX: c09d2648 ECX: f2a3fe04 EDX: 00000011
ESI: f2a3fe04 EDI: 00000011 EBP: f2a3fdf4 ESP: f2a3fde4
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process insmod (pid
After you edited the Makefile so the extra version has the
PAE,
does not guarantee to you that the kernel config file you chose
chose is the i686-PAE config file.
If you really want to build the kernel from source correctly,
follow the instructions at
http://fedoraproject.org/wiki/Docs/CustomKernel