I found the same link.
For your information: here's my ebuild
# cat /usr/local/portage/net-wireless/rt2x00/rt2x00-9999.ebuild
Code: Select all
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils linux-mod cvs
DESCRIPTION="Driver for the RaLink RT2x00 wireless chipsets"
HOMEPAGE="http://rt2x00.serialmonkey.com"
LICENSE="GPL-2"
SLOT="0"
ECVS_SERVER="rt2400.cvs.sourceforge.net:/cvsroot/rt2400"
ECVS_MODULE="source/rt2x00"
ECVS_LOCALNAME="${P}"
KEYWORDS="-* ~amd64 ~x86"
RDEPEND="net-wireless/wireless-tools"
IUSE_RT2X00_DEVICES="rt2400pci rt2500pci rt2500usb rt61pci rt73usb"
IUSE_RT2X00_EXTRA="rfkill"
IUSE="asm debug"
for x in ${IUSE_RT2X00_DEVICES} ${IUSE_RT2X00_EXTRA} ; do
IUSE="${IUSE} ${x}"
done
full="y"
for m in ${IUSE_RT2X00_DEVICES} ; do
if use "${m}" ; then
full="n"
break
fi
done
pkg_setup() {
CONFIG_CHECK="WIRELESS_EXT MAC80211 WLAN_80211"
ERROR_WIRELESS_EXT="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (WIRELESS_EXT)."
if use rfkill ; then
CONFIG_CHECK="${CONFIG_CHECK} RFKILL_INPUT"
fi
if use rt2400pci \
|| use rt2500pci \
|| use rt61pci ; then
CONFIG_CHECK="${CONFIG_CHECK} PCI"
fi
if use rt2500usb || use rt73usb ; then
CONFIG_CHECK="${CONFIG_CHECK} USB"
fi
if use rt61pci || use rt73usb ; then
CONFIG_CHECK="${CONFIG_CHECK} HOTPLUG FW_LOADER CRC_ITU_T"
ERROR_FW_LOADER="${P} requires support for Firmware module loading (CONFIG_FW_LOADER and CONFIG_HOTPLUG)."
fi
if use debug ; then
CONFIG_CHECK="${CONFIG_CHECK} DEBUG_FS"
ERROR_DEBUG_FS="${P} requires Kernel Debug FS support (CONFIG_DEBUG_FS)"
fi
kernel_is lt 2 6 22 && die "${P} requires at least kernel 2.6.22"
linux-mod_pkg_setup
BUILD_PARAMS="KERNDIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
BUILD_TARGETS=" " # Target "module" is not supported, so we blank it
}
# see http://rt2x00.serialmonkey.com/phpBB2/viewtopic.php?t=4109
src_unpack() {
cvs_src_unpack
cd "${S}"
epatch "${FILESDIR}"/rt2x00mac-parameter-overload.patch
}
src_compile() {
local m= asm="n" button="n" debug="n" yn= M=
use asm && asm="y"
use debug && debug="y"
use rfkill && button="y"
if [[ ${full} == "y" ]] ; then
ewarn "No module specified in USE flags - building everything."
fi
# Generate the config file now
echo "# Config file generated by portage" > config
# Enable the rt2x00lib module
echo "CONFIG_RT2X00=y" >> config
echo "CONFIG_RT2X00_ASM=${asm}" >> config
MODULE_NAMES="${MODULE_NAMES} rt2x00lib(rt2x00:)"
# Enable the new DEBUGFS module
if use debug ; then
echo "CONFIG_RT2X00_DEBUG=y" >> config
echo "CONFIG_RT2X00_DEBUGFS=y" >> config
MODULE_NAMES="${MODULE_NAMES} rt2x00debug(rt2x00:)"
fi
# rt2400pci, rt2500pci and rt61pci require eeprom_93cx6 and rt2x00pci
if use rt2400pci || use rt2500pci || use rt61pci || [[ ${full} == "y" ]] ; then
echo "CONFIG_EEPROM_93CX6=y" >> config
echo "CONFIG_EEPROM_93CX6_ASM=${asm}" >> config
MODULE_NAMES="${MODULE_NAMES} eeprom_93cx6(rt2x00:) rt2x00pci(rt2x00:)"
fi
# rt2500usb and rt73usb require rt2x00usb
if use rt2500usb || use rt73usb || [[ ${full} == "y" ]] ; then
MODULE_NAMES="${MODULE_NAMES} rt2x00usb(rt2x00:)"
fi
for m in ${IUSE_RT2X00_DEVICES} ; do
local yn="n" M=$(echo "${m}" | tr '[:lower:]' '[:upper:]')
if [[ ${full} == "y" ]] || use "${m}" ; then
yn="y"
fi
echo "CONFIG_${M}=${yn}" >> config
echo "CONFIG_${M}_BUTTON=${button}" >> config
if [[ ${yn} == "y" ]] ; then
MODULE_NAMES="${MODULE_NAMES} ${m}(rt2x00:)"
fi
done
linux-mod_src_compile
}
src_install() {
linux-mod_src_install
dodoc COPYING README THANKS
}
pkg_postinst() {
linux-mod_pkg_postinst
ewarn
ewarn "This is a CVS ebuild - please report any bugs to the rt2x00 forums"
ewarn "http://rt2x00.serialmonkey.com/phpBB2/viewforum.php?f=5"
ewarn
ewarn "Any bugs reported to Gentoo will be marked INVALID"
if use rt61pci || [[ ${full} == "y" ]] ; then
ewarn
ewarn "This driver requires third party firmware to be manually installed."
ewarn "Download from http://www.ralinktech.com/ralink/Home/Support/Linux.html"
ewarn "and install contents of Firmware RT2501(RT2561/RT2661) archive into"
ewarn "/lib/firmware or /usr/local/lib/firmware before loading driver module."
fi
if use rt73usb || [[ ${full} == "y" ]] ; then
ewarn
ewarn "This driver requires third party firmware to be manually installed."
ewarn "Download from http://www.ralinktech.com/ralink/Home/Support/Linux.html"
ewarn "and install contents of Firmware RT2501USB(RT2571W/RT2671) archive into"
ewarn "/lib/firmware or /usr/local/lib/firmware before loading driver module."
fi
ewarn
}
and this is the patch (to be put in the files-dir)
# cat /usr/local/portage/net-wireless/rt2x00/files/rt2x00mac-parameter-overload.patch
Code: Select all
--- rt2x00-9999/rt2x00mac.c 2007-08-11 21:00:22.243321485 +0200
+++ rt2x00-9999/rt2x00mac.c_new 2007-08-11 21:10:02.545792705 +0200
@@ -56,11 +56,11 @@
skb_put(skb, size);
if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)
- ieee80211_ctstoself_get(rt2x00dev->hw, rt2x00dev->interface.id,
+ ieee80211_ctstoself_get(rt2x00dev->hw,
frag_skb->data, frag_skb->len, control,
(struct ieee80211_cts *)(skb->data));
else
- ieee80211_rts_get(rt2x00dev->hw, rt2x00dev->interface.id,
+ ieee80211_rts_get(rt2x00dev->hw,
frag_skb->data, frag_skb->len, control,
(struct ieee80211_rts *)(skb->data));
Windoze : Plug and Pay...