Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 85680 - madwifi ebuild enhancements
Summary: madwifi ebuild enhancements
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords: EBUILD, InVCS
Depends on:
Blocks:
 
Reported: 2005-03-17 13:53 UTC by Mark S
Modified: 2005-06-19 00:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New CVS version plus fixes (madwifi-driver-0.1_pre20050311.ebuild,1.76 KB, text/plain)
2005-03-17 13:54 UTC, Mark S
Details
Patch to change the build order so that the kernel modules compile cleanly (ath_rate_build_order.patch,314 bytes, patch)
2005-03-17 13:55 UTC, Mark S
Details | Diff
New CVS version plus fixes (digest-madwifi-driver-0.1_pre20050311,85 bytes, application/octet-stream)
2005-03-17 14:00 UTC, Mark S
Details
New CVS version plus fixes (madwifi-driver-0.1_pre20050311.ebuild,1.73 KB, text/plain)
2005-03-17 14:02 UTC, Mark S
Details
Proposed ebuild with modules.d changes (madwifi-driver-0.1_pre20050427.ebuild,1.78 KB, text/plain)
2005-04-26 21:39 UTC, Mark S
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark S 2005-03-17 13:53:23 UTC
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
Comment 1 Mark S 2005-03-17 13:54:46 UTC
Created attachment 53724 [details]
New CVS version plus fixes
Comment 2 Mark S 2005-03-17 13:55:29 UTC
Created attachment 53725 [details, diff]
Patch to change the build order so that the kernel modules compile cleanly
Comment 3 Mark S 2005-03-17 13:57:32 UTC
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 ""
>}
Comment 4 Mark S 2005-03-17 14:00:41 UTC
Created attachment 53726 [details]
New CVS version plus fixes
Comment 5 Mark S 2005-03-17 14:02:35 UTC
Created attachment 53727 [details]
New CVS version plus fixes
Comment 6 Stefan Schweizer (RETIRED) gentoo-dev 2005-03-17 21:51:49 UTC
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?
Comment 7 Mark S 2005-03-17 22:39:13 UTC
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.
Comment 8 Santiago Gala 2005-03-30 06:29:41 UTC
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)
Comment 9 Henrik Brix Andersen 2005-04-26 11:37:22 UTC
Adding solar to CC:
Comment 10 solar (RETIRED) gentoo-dev 2005-04-26 13:54:49 UTC
Please test and attach an update for madwifi-driver-0.1_pre'date -u +%Y%m%d'.ebuild
if still needed
Comment 11 Mark S 2005-04-26 21:39:50 UTC
Created attachment 57350 [details]
Proposed ebuild with modules.d changes

Removed patch for build-order changes since no longer needed to build modules
correctly.
Comment 12 solar (RETIRED) gentoo-dev 2005-04-28 09:31:12 UTC
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.

Comment 13 Henrik Brix Andersen 2005-06-04 05:11:47 UTC
Reporter, any solution to this?
Comment 14 Henrik Brix Andersen 2005-06-13 04:45:39 UTC
This bug report is awaiting feedback.
Comment 15 Mark S 2005-06-19 00:35:27 UTC
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...