I am trying to build madwifi modules for my system:
- Soekris 4521 (using i386-elf as the TARGET for building madwifi)
- buildroot environment with 2.6.20 kernel
- Madwifi version
- Card is Airlink AWLC4130

Builds and installs correctly with the following command: I run "depmod" once the installation is complete. modules.dep seems to be correct. ath_hal is the first module I am trying to install.

Starting to look at the code, and I would appreciate any help.  Kernel .config seems to be alright as well.  Every variable that has the string SYSCTL and PROC has been enabled. Kernel builds and runs well.  I am using module-init-tools from the buildroot package as well. (similar error occurred when I used busybox' own module tools).

Error message:
# modprobe ath_hal
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
BUG: unable to handle kernel NULL pointer dereference at virtual address 00000002
 printing eip:
*pde = 00000000
Oops: 0000 [#1]
Modules linked in: ath_hal(P)
CPU:    0
EIP:    0060:[<c011848d>]    Tainted: P      VLI
EFLAGS: 00010286   (2.6.20 #6)
EIP is at register_proc_table+0xd/0x120
eax: 00000002   ebx: 00000002   ecx: c10c47e0   edx: c10a5c00
esi: 00001533   edi: 00000002   ebp: c1144000   esp: c1145f60
ds: 007b   es: 007b   ss: 0068
Process exe (pid: 416, ti=c1144000 task=c10c95d0 task.ti=c1144000)
Stack: c0110276 c1145f6c c10c47e0 c1144000 c10c47e0 00001533 00000002 c1144000
       c011841e c485c7b6 080d90c8 bfed4648 c486806e c4860f40 00000001 c4866780
       c012e772 00000005 c0153fa3 080d90f0 080d90c8 c0102b50 080d90f0 00032e2e
Call Trace:
 [<c0110276>] __cond_resched+0x16/0x40
 [<c011841e>] register_sysctl_table+0x5e/0x90
 [<c486806e>] init_ath_hal+0x6e/0x83 [ath_hal]
 [<c012e772>] sys_init_module+0xe2/0x150
 [<c0153fa3>] sys_close+0x43/0x80
 [<c0102b50>] syscall_call+0x7/0xb
Code: 15 10 b4 38 c0 e8 34 01 00 00 89 d8 5b e9 4c 9c 03 00 8d b6 00 00 00 00 8d bf 00 00 00 00 55 57 56 53 83 ec 10
EIP: [<c011848d>] register_proc_table+0xd/0x120 SS:ESP 0068:c1145f60

Build commands:

$(MADWIFI_BUILD_DIR)/.built: $(MADWIFI_BUILD_DIR)/.configured
        $(MAKE) -C $(MADWIFI_BUILD_DIR) \
                ARCH=i386 TARGET=i386-elf \
                TOOLPREFIX=$(TARGET_CROSS) \
                DESTDIR=$(TARGET_DIR) \
                KMODPATH=lib/modules/$(LINUX_VERSION)/net \
                CFLAGS="$(TARGET_CFLAGS)" all
        touch $@

madwifi-install: $(MADWIFI_BUILD_DIR)/.built
        $(MAKE) -C $(MADWIFI_BUILD_DIR) \
                ARCH=i386 TARGET=i386-elf \
                DESTDIR=$(TARGET_DIR) \
                KMODPATH=lib/modules/$(LINUX_VERSION)/net \
                TOOLPREFIX=$(TARGET_CROSS) \
                CFLAGS="$(TARGET_CFLAGS)" install

- ardenfort