Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #628 (closed defect: fixed)

Opened 13 years ago

Last modified 11 years ago

kbuild related changes in linux >2.6.16 expose weakness in madwifi's Makefiles

Reported by: kelmo Assigned to:
Priority: major Milestone: version 0.9.x - progressive release candidate phase
Component: madwifi: makefiles Version: trunk
Keywords: Cc:
Patch is attached: 0 Pending:

Description

Shortly after linux 2.6.16, a patch was introduced that altered the behaviour of kbuild in such a way that module symbol information is no longer being shared between the nested components of the madwifi driver. This results in many spurious warnings:

Checking requirements... ok.
Checking kernel configuration... ok.
if [ -d .svn ]; then \
                ver=`svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//'`; \
        elif [ -s SNAPSHOT ]; then \
                ver=`sed -e '/^Revision: */!d;s///;q' SNAPSHOT`; \
        else \
                ver=`date +%F`; \
        fi; \
        echo "#define SVNVERSION \"$ver\"" > svnversion.h
mkdir -p ./symbols
for i in ./ath_hal ./net80211 ath_rate/sample ./ath; do \
                make -C $i || exit 1; \
        done
make[1]: Entering directory `/home/kelmo/madwifi/madwifi-ng/ath_hal'
cp -f ./../hal/public/x86_64-elf.opt_ah.h opt_ah.h
make -C /lib/modules/2.6.17-rc4-kel-1/build SUBDIRS=/home/kelmo/madwifi/madwifi-ng/ath_hal MODVERDIR=/home/kelmo/madwifi/madwifi-ng/ath_hal/../symbols modules
make[2]: Entering directory `/home/kelmo/src/linux-2.6.17-rc4-kel-1'
  CC [M]  /home/kelmo/madwifi/madwifi-ng/ath_hal/ah_osdep.o
  HOSTCC  /home/kelmo/madwifi/madwifi-ng/ath_hal/uudecode
echo "deps_/home/kelmo/madwifi/madwifi-ng/ath_hal/x86_64-elf.hal.o :=" >/home/kelmo/madwifi/madwifi-ng/ath_hal/.x86_64-elf.hal.o.cmd
/home/kelmo/madwifi/madwifi-ng/ath_hal/uudecode -o /home/kelmo/madwifi/madwifi-ng/ath_hal/x86_64-elf.hal.o /home/kelmo/madwifi/madwifi-ng/ath_hal/../hal/public/x86_64-elf.hal.o.uu
  LD [M]  /home/kelmo/madwifi/madwifi-ng/ath_hal/ath_hal.o
  Building modules, stage 2.
  MODPOST
  CC      /home/kelmo/madwifi/madwifi-ng/ath_hal/ath_hal.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/ath_hal/ath_hal.ko
make[2]: Leaving directory `/home/kelmo/src/linux-2.6.17-rc4-kel-1'
make[1]: Leaving directory `/home/kelmo/madwifi/madwifi-ng/ath_hal'
make[1]: Entering directory `/home/kelmo/madwifi/madwifi-ng/net80211'
make -C /lib/modules/2.6.17-rc4-kel-1/build SUBDIRS=/home/kelmo/madwifi/madwifi-ng/net80211 MODVERDIR=/home/kelmo/madwifi/madwifi-ng/net80211/../symbols modules
make[2]: Entering directory `/home/kelmo/src/linux-2.6.17-rc4-kel-1'
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/if_media.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_beacon.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_crypto.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_crypto_none.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_input.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_node.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_output.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_power.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_proto.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_scan.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_wireless.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_linux.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_monitor.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_acl.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_crypto_ccmp.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_scan_ap.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_scan_sta.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_crypto_tkip.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_crypto_wep.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/net80211/ieee80211_xauth.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_wep.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_tkip.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_ccmp.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_acl.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_xauth.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_scan_sta.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_scan_ap.o
  Building modules, stage 2.
  MODPOST
  CC      /home/kelmo/madwifi/madwifi-ng/net80211/wlan.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan.ko
  CC      /home/kelmo/madwifi/madwifi-ng/net80211/wlan_acl.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_acl.ko
  CC      /home/kelmo/madwifi/madwifi-ng/net80211/wlan_ccmp.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_ccmp.ko
  CC      /home/kelmo/madwifi/madwifi-ng/net80211/wlan_scan_ap.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_scan_ap.ko
  CC      /home/kelmo/madwifi/madwifi-ng/net80211/wlan_scan_sta.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_scan_sta.ko
  CC      /home/kelmo/madwifi/madwifi-ng/net80211/wlan_tkip.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_tkip.ko
  CC      /home/kelmo/madwifi/madwifi-ng/net80211/wlan_wep.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_wep.ko
  CC      /home/kelmo/madwifi/madwifi-ng/net80211/wlan_xauth.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/net80211/wlan_xauth.ko
make[2]: Leaving directory `/home/kelmo/src/linux-2.6.17-rc4-kel-1'
make[1]: Leaving directory `/home/kelmo/madwifi/madwifi-ng/net80211'
make[1]: Entering directory `/home/kelmo/madwifi/madwifi-ng/ath_rate/sample'
make -C /lib/modules/2.6.17-rc4-kel-1/build SUBDIRS=/home/kelmo/madwifi/madwifi-ng/ath_rate/sample MODVERDIR=/home/kelmo/madwifi/madwifi-ng/ath_rate/sample/../../symbols modules
make[2]: Entering directory `/home/kelmo/src/linux-2.6.17-rc4-kel-1'
  CC [M]  /home/kelmo/madwifi/madwifi-ng/ath_rate/sample/sample.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/ath_rate/sample/ath_rate_sample.o
  Building modules, stage 2.
  MODPOST
WARNING: "ieee80211_iterate_nodes" [/home/kelmo/madwifi/madwifi-ng/ath_rate/sample/ath_rate_sample.ko] undefined!
WARNING: "ath_hal_computetxtime" [/home/kelmo/madwifi/madwifi-ng/ath_rate/sample/ath_rate_sample.ko] undefined!
WARNING: "ether_sprintf" [/home/kelmo/madwifi/madwifi-ng/ath_rate/sample/ath_rate_sample.ko] undefined!
  CC      /home/kelmo/madwifi/madwifi-ng/ath_rate/sample/ath_rate_sample.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/ath_rate/sample/ath_rate_sample.ko
make[2]: Leaving directory `/home/kelmo/src/linux-2.6.17-rc4-kel-1'
make[1]: Leaving directory `/home/kelmo/madwifi/madwifi-ng/ath_rate/sample'
make[1]: Entering directory `/home/kelmo/madwifi/madwifi-ng/ath'
make -C /lib/modules/2.6.17-rc4-kel-1/build SUBDIRS=/home/kelmo/madwifi/madwifi-ng/ath MODVERDIR=/home/kelmo/madwifi/madwifi-ng/ath/../symbols modules
make[2]: Entering directory `/home/kelmo/src/linux-2.6.17-rc4-kel-1'
  CC [M]  /home/kelmo/madwifi/madwifi-ng/ath/if_ath.o
  CC [M]  /home/kelmo/madwifi/madwifi-ng/ath/if_ath_pci.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/ath/ath_pci.o
  Building modules, stage 2.
  MODPOST
WARNING: "ath_hal_getwirelessmodes" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_rate_setupxtxdesc" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_rate_newstate" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_find_txnode" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_getrssi" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_chan2mode" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_crypto_encap" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_dturbo_switch" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_hal_init_channels" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_rate_findrate" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_rate_node_init" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_state_name" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_chan2ieee" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_mark_dfs" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_announce" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_vap_detach" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_start_running" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_media_status" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_input_all" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_wme_acnames" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_create_vap" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_rate_detach" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_send_qosnulldata" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_rate_node_cleanup" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_hal_probe" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_ibss_merge" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_vap_attach" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_iterate_nodes" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_getcfframe" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_beacon_alloc" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_beacon_miss" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_media_change" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_crypto_delkey" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_note" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_cipher_none" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_hal_detach" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_stop_running" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_hal_mhz2ieee" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_dfs_test_return" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_ioctl_create_vap" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_dump_pkt" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_crypto_setkey" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_crypto_newkey" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_hal_computetxtime" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_rate_newassoc" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_input_monitor" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_free_node" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_ifdetach" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_vap_setup" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ether_sprintf" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_rate_attach" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_find_rxnode" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_find_channel" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_beacon_update" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "_ath_hal_attach" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_ifattach" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_input" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_encap" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
WARNING: "ath_rate_tx_complete" [/home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko] undefined!
  CC      /home/kelmo/madwifi/madwifi-ng/ath/ath_pci.mod.o
  LD [M]  /home/kelmo/madwifi/madwifi-ng/ath/ath_pci.ko
make[2]: Leaving directory `/home/kelmo/src/linux-2.6.17-rc4-kel-1'
make[1]: Leaving directory `/home/kelmo/madwifi/madwifi-ng/ath'

Some discussion about this on lkml: http://lkml.org/lkml/2006/4/21/4

Some other enhancements were also made, that could help us enhance the madwifi makefile system: link (This would only be true for bleeding edge kernel however)

I think we need to take a good look at $linux/Documentation/kbuild/modules.txt Section 5.3 and ponder how the nested Makefile/build system of madwifi can be improved for linux 2.6.

Anybody with suggestions on how to proceed?

Change History

05/27/06 06:24:10 changed by proski

Should be fixed in r1605 (with some extra polish in r1608 and r1609).

05/28/06 05:29:50 changed by kelmo

  • status changed from new to closed.
  • resolution set to fixed.

I agree

04/01/08 02:07:10 changed by anonymous

If you want to temporarily resolve this w/o a lot of work, go into your kernel source makefile and comment out the rm -rF section under the crmodverdir: section. After I did this there are no problems compiling older versions that compile in individual directories w/o unresolved symbols. Then you will want to specify a MODVERDIR=somewhere/.tmp_versions file. I setup my build script to wipe out the mod.o files in there each time make clean was run. Took a few days to figure out how to do this.