OpenWrt Forum Archive

Topic: Compiling OpenWrt with 2.6.17 kernel

The content of this topic has been archived on 5 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I've downloaded OpenWrt from the svn repository, and I used it to build packages for my ixp4xx-based AP, which has a 2.6.17 kernel installed on it.. Now, I have the need to recompile the madwifi drivers, after having patched them, but I'm not able to force OpenWrt to build everything for a 2.6.17 kernel.. I tried to change the version and the md5sum in include/kernel-version.mk, but compilation fails because it tries to apply 2.6.19-r2 kernel patches (which fail to apply).. I tried a brute-force approach removing the patches but the kernel does not compile without them.. Is it possible to make OpenWrt work with kernel 2.6.17? I looked into older revisions, but the oldest that I can fetch (6000 if I remember well) still contains kernel 2.6.19-r1..

Any suggestion? Thank you in advance for any help.

ixp4xx has only recently started working properly.

I have a diff against 6476 that puts the old 2.6.17 (well uses 2.6.17.14) kernel stuff back for brcm-2.6 (I use it on a wgt634u) - and a few newer fixes. - maybe you could take the ixp4xx stuff from prior to 2.6.19 being added in a similar way but however it was not working properly then at all.

http://openwrt.vcp-springe.de/experimen … ainst-6476

h3sp4wn wrote:

ixp4xx has only recently started working properly.

I have a diff against 6476 that puts the old 2.6.17 (well uses 2.6.17.14) kernel stuff back for brcm-2.6 (I use it on a wgt634u) - and a few newer fixes. - maybe you could take the ixp4xx stuff from prior to 2.6.19 being added in a similar way but however it was not working properly then at all.

http://openwrt.vcp-springe.de/experimen … ainst-6476

I've downloaded revision 6476 and then I applied your patch, but when I do "make" there are still problems when it tries to apply kernel patches, which fail.. I removed every patch and then the compilation process finished correctly but I was not able to load madwifi/atheros modules on my router:

script that load the modules which create the wifi* interfaces:

#!/bin/sh
# I load with insmod the modules I've compiled with OpenWRT toolchain
insmod ./modules/ath_hal.ko
insmod ./modules/wlan.ko
insmod ./modules/ath_rate_sample.ko
insmod ./modules/ath_pci.ko autocreate=none countrycode=380 outdoor=1 xchanmode=1
insmod ./modules/wlan_acl.ko
insmod ./modules/wlan_ccmp.ko
insmod ./modules/wlan_tkip.ko
insmod ./modules/wlan_wep.ko
insmod ./modules/wlan_xauth.ko
insmod ./modules/wlan_scan_ap.ko
insmod ./modules/wlan_scan_sta.ko
modprobe aes
athctrl  -i wifi0 -d 1000
athctrl  -i wifi1 -d 1000

dmesg output:

<6>ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413, REGOPS_FUNC)
<6>wlan: 0.8.4.2 (0.9.2.1)
<6>ath_rate_sample: 1.2 (0.9.2.1)
<6>ath_pci: 0.9.4.5 (0.9.2.1)
<4>PCI: enabling device 0000:00:01.0 (0340 -> 0342)
<1>Unable to handle kernel NULL pointer dereference at virtual address 00000ee4
<1>pgd = c37fc000
<1>[00000ee4] *pgd=036ff031, *pte=00000000, *ppte=00000000
<4>Internal error: Oops: 17 [#1]
<4>Modules linked in:
<4>    bf0ec000 ath_pci
<4>    bf0e9000 ath_rate_sample
<4>    bf0cc000 wlan
<4>    bf09b000 ath_hal
<4>    bf095000 ixp400_eth
<4>    bf002000 ixp400
<4>    bf000000 ixp400th
<4>CPU: 0
<4>pc : [<bf0f82f0>]    lr : [<c0113a84>]    Tainted: P     
<4>sp : c3727de8  ip : c3727dc4  fp : c3727e20
<4>r10: 00000000  r9 : c4860000  r8 : 48000000
<4>r7 : 00000000  r6 : c0271848  r5 : c0271800  r4 : c372a000
<4>r3 : 00000000  r2 : c372a007  r1 : bf0f986f  r0 : c372a000
<4>Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  Segment user
<4>Control: 39FF  Table: 037FC000  DAC: 00000015
<4>Process insmod (pid: 933, stack limit = 0xc3726198)
<4>Stack: (0xc3727de8 to 0xc3728000)
<4>7de0:                   c00c2760 bf0f9c64 00000000 c3727e08 bf0f9b8c c0271800 
<4>7e00: c0271848 00000000 bf0f9b60 c485d000 00000000 c3727e48 c3727e24 c00d1268 
<4>7e20: bf0f8174 c0271914 c0271848 c00d1208 bf0f9b8c c0178b28 00000000 c3727e68 
<4>7e40: c3727e4c c00f14d4 c00d1214 c0271914 c0271848 c00f15ec bf0f9b8c c3727e80 
<4>7e60: c3727e6c c00f1670 c00f148c 00000000 c3727e84 c3727eac c3727e84 c00f0eb0 
<4>7e80: c00f15f8 c01ae700 c01ae700 c0271890 bf0f9ba0 bf0f9b8c c01ae600 00000000 
<4>7ea0: c3727ebc c3727eb0 c00f1410 c00f0e74 c3727ee4 c3727ec0 c00f0b0c c00f13fc 
<4>7ec0: bf0f9b8c c3b2f680 bf0f9e40 00000000 c0178b28 bf0f9e88 c3727ef8 c3727ee8 
<4>7ee0: c00f191c c00f0aac bf0f9b60 c3727f0c c3727efc c00d13fc c00f1894 00000000 
<4>7f00: c3727f1c c3727f10 bf0fb030 c00d13c8 c3727fa4 c3727f20 c004bd34 bf0fb00c 
<4>7f20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
<4>7f40: 00000000 0000000a 00000014 c486c758 c36f7de0 c486b918 0000000c 00000000 
<4>7f60: 000000d5 000000d5 bf0f9e4c c486b9e0 00000013 00000000 00000000 00000003 
<4>7f80: 00000000 00000000 00000080 c001cea4 c3726000 00000006 00000000 c3727fa8 
<4>7fa0: c001cd00 c004aebc 00000000 00000000 00900080 400a2000 00014684 000dd100 
<4>7fc0: 00000003 00000000 00000000 bed12efb 00000006 00000006 00000006 0000c660 
<4>7fe0: 4008a01c bed12cfc 0002b208 4008a02c 20000010 00900080 72617700 00000021 
<4>Backtrace: 
<4>Function entered at [<bf0f8168>] from [<c00d1268>]
<4>Function entered at [<c00d1208>] from [<c00f14d4>]
<4>Function entered at [<c00f1480>] from [<c00f1670>]
<4> r7 = BF0F9B8C  r6 = C00F15EC  r5 = C0271848  r4 = C0271914
<4>Function entered at [<c00f15ec>] from [<c00f0eb0>]
<4> r5 = C3727E84  r4 = 00000000 
<4>Function entered at [<c00f0e68>] from [<c00f1410>]
<4> r7 = 00000000  r6 = C01AE600  r5 = BF0F9B8C  r4 = BF0F9BA0
<4>Function entered at [<c00f13f0>] from [<c00f0b0c>]
<4>Function entered at [<c00f0aa0>] from [<c00f191c>]
<4>Function entered at [<c00f1888>] from [<c00d13fc>]
<4> r4 = BF0F9B60 
<4>Function entered at [<c00d13bc>] from [<bf0fb030>]
<4> r4 = 00000000 
<4>Function entered at [<bf0fb000>] from [<c004bd34>]
<4>Function entered at [<c004aeb0>] from [<c001cd00>]
<4>Code: e59f01a0 eb3ceb25 ea00004b e5947134 (e5d73ee4) 
<4> <6>wlan: mac acl policy registered

Did I make something wrong with your patch? Isn't it sufficient to download the right OpenWRT revision with SVN and then apply the patch with "patch -p0 < your_patch" from within the main directory of openwrt?

The discussion might have continued from here.