The order of building the madwifi modules is very important for this package. The current madwifi ebuild fails to build some kernel modules on some systems, which results in the kernel modules not being installed, and the madwifi drivers not working. Also, it would be nice to add the ath0 required modules to modules.conf for automatic kernel loading when required. Reproducible: Always Steps to Reproduce: 1. Emerge madwifi-driver 2. Some kernel modules fail to compile 3. This happens every time
Created attachment 53724 [details] New CVS version plus fixes
Created attachment 53725 [details, diff] Patch to change the build order so that the kernel modules compile cleanly
Comment on attachment 53724 [details] New CVS version plus fixes ># Copyright 1999-2005 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-driver/madwifi-driver-0.1_pre2005xxxx.ebuild,v 1.3 2005/01/10 04:12:17 solar Exp $ > >inherit eutils linux-mod > >DESCRIPTION="Wireless driver for Atheros chipset a/b/g cards" >HOMEPAGE="http://madwifi.sourceforge.net/" >SRC_URI="http://madwifi.otaku42.de/${PV:7:4}/${PV:11:2}/madwifi-cvs-snapshot-${PV:7:4}-${PV:11:2}-${PV:13:2}.tar.bz2" >LICENSE="GPL-2" >KEYWORDS="~x86 ~amd64" >IUSE="" >DEPEND="app-arch/sharutils" >RDEPEND="" >S=${WORKDIR}/madwifi > >pkg_setup() { > linux-mod_pkg_setup > > use x86 && TARGET=i386-elf > use amd64 && TARGET=x86_64-elf > MODULE_NAMES="ath_hal(net:${S}/ath_hal) wlan(net:${S}/net80211) wlan_acl(net:${S}/net80211) > wlan_ccmp(net:${S}/net80211) wlan_tkip(net:${S}/net80211) wlan_wep(net:${S}/net80211) > wlan_xauth(net:${S}/net80211) ath_rate_onoe(net:${S}/ath_rate/onoe) ath_pci(net:${S}/ath)" > BUILD_PARAMS="KERNELPATH=${ROOT}${KV_DIR} KERNELRELEASE=${KV_FULL} > TARGET=${TARGET} TOOLPREFIX=/usr/bin/" > BUILD_TARGETS="all" >} > >src_unpack() { > unpack ${A} > cd ${S} > epatch ${FILESDIR}/ath_rate_build_order.patch > > for dir in ath ath_hal net80211 ath_rate/amrr ath_rate/onoe; do > convert_to_m ${S}/${dir}/Makefile > done >} > >src_install() { > dodoc README COPYRIGHT > > linux-mod_src_install > > # /etc/modules.d/madwifi > dodir /etc/modules.d > echo 'probeall ath0 ath_hal ath_pci wlan' > ${D}/etc/modules.d/madwifi || die > >} > >pkg_postinst() { > linux-mod_pkg_postinst > modules-update || return 0 > > einfo "" > einfo "The madwifi drivers create an interface named 'athX'" > einfo "Create /etc/init.d/net.ath0 and add a line for athX" > einfo "in /etc/conf.d/net like 'iface_ath0=\"dhcp\"'" > einfo "" >}
Created attachment 53726 [details] New CVS version plus fixes
Created attachment 53727 [details] New CVS version plus fixes
Can you please always attach ebuilds as text/plain? It looks like most of your changes are already taken care of in 20050224, so only the modules.d-stuff is left over .. are you sure you did that right? Where do you know the 3 needed modules from?
Sorry about the ebuilds, I am still learning my way around the gentoo bugzilla. I'm not sure about 20050224, but the changes are still relevant to 20050311, as they still have not changed the order of building the modules in the Makefile. Since ath_rate depends on wlan, wlan needs to be compiled first. As for the modules.d-stuff, the three needed modules, ath_hal, ath_pci and wlan are the 3 main modules needed for the driver. The other modules (wlan_wep etc) are loaded by these dynamically, so we don't need to worry about them. This is from the madwifi documentation. I have tested this configuration extensively on my machine, and it works perfectly.
For what is worth, March 29, 2005 I built madwifi from cvs on a TiBook (the package is masked there). I just did export TOOLPREFIX=/usr/bin make KERNELPATH=/usr/src/linux-2.6.11.6 sudo make KERNELPATH=/usr/src/linux-2.6.11.6 install and it worked magically after I set "sudo /etc/init.d/pcmcia start" with a SMC card using the 11 chip (a + b, no g) The package can probably be unmasked for this architecture (I use ~ppc kernel and gcc)
Adding solar to CC:
Please test and attach an update for madwifi-driver-0.1_pre'date -u +%Y%m%d'.ebuild if still needed
Created attachment 57350 [details] Proposed ebuild with modules.d changes Removed patch for build-order changes since no longer needed to build modules correctly.
This ebuild fails with the following Calculating dependencies ...done! >>> emerge (1 of 1) net-wireless/madwifi-driver-0.1_pre20050427 to / >>> md5 files ;-) madwifi-driver-0.1_pre20050420.ebuild >>> md5 files ;-) madwifi-driver-0.1_pre20050427.ebuild >>> md5 files ;-) madwifi-driver-0.1_pre20050107.ebuild >>> md5 files ;-) madwifi-driver-0.1_pre20050224.ebuild >>> md5 files ;-) files/digest-madwifi-driver-0.1_pre20050107 >>> md5 files ;-) files/digest-madwifi-driver-0.1_pre20050224 >>> md5 files ;-) files/digest-madwifi-driver-0.1_pre20050420 >>> md5 files ;-) files/digest-madwifi-driver-0.1_pre20050427 >>> md5 files ;-) files/madwifi-multi-ssid-support.patch >>> md5 files ;-) files/madwifi-driver-2.6.8-20040814-proc_dointvec.patch >>> md5 files ;-) files/madwifi-driver-0.1-arp-packets-33958.patch >>> md5 src_uri ;-) madwifi-cvs-snapshot-2005-04-27.tar.bz2 * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.4.30-hardened-r1 >>> Unpacking source... >>> Unpacking madwifi-cvs-snapshot-2005-04-27.tar.bz2 to /space/portage-tmp/portage/madwifi-driver-0.1_pre20050427/work >>> Source unpacked. * Preparing ath_hal module cp ./../hal/linux/ah_osdep.c ah_osdep.c uudecode ./../hal/public/i386-elf.hal.o.uu uudecode: hal.o: No such file or directory make: *** [hal.o] Error 1 make: *** Waiting for unfinished jobs.... !!! ERROR: net-wireless/madwifi-driver-0.1_pre20050427 failed. !!! Function linux-mod_src_compile, Line 454, Exitcode 2 !!! Unable to make KERNELPATH=//usr/src/linux KERNELRELEASE=2.4.30-hardened-r1 TARGET=i386-elf TOOLPREFIX=/usr/bin/ all. !!! If you need support, post the topmost build error, NOT this status message.
Reporter, any solution to this?
This bug report is awaiting feedback.
The ebuild failing is not related to this bug, could just be that snapshot... anyways, the build order is ok it looks like from cvs 20050420 and up, so we can close this bug. However, it would be worthwhile adding the modules.d changes to portage, since this saves the user from manually echoing all that stuff into modules.autoload...