compat-wireless: added n900 use flag for wl1251 injection

This commit is contained in:
grimmlin 2011-08-25 22:25:48 +00:00
parent a54f01449a
commit e571e21e1a
3 changed files with 1834 additions and 0 deletions

View file

@ -41,6 +41,7 @@ AUX ubnt-wifi-station-ext2.patch 1006 RMD160 986218c0099e2ea95347391cd09c69ad51f
AUX whynot-2.6.31.patch 4272 RMD160 74ec1c66cfb376cf2c83401aa3edcdbfdd019438 SHA1 18f5680625ad68ebba773c8f39a04edf6456e2f2 SHA256 a1839efde553fb6c78b7121f94a3dc5401c146f9ff3e017e61de1b0298f4b371
AUX whynot-2.6.32.patch 666 RMD160 fcca9ac8d2152bebe51643a4250dffed383aae68 SHA1 5d7261437f5c98758f13c6c3f8a5676769b05013 SHA256 07cfc03d0ad5c47bec08d320afa63c79c0e6be9109dcf42b9811aad10bdc9c63
AUX whynot.patch 4106 RMD160 ac38e8dbbe1a59607fe16b36f327a9ba73a001e7 SHA1 2208598c9f9811d368db099c863be2a2af11681e SHA256 956cf3a0a8b8e1f0f0e3df985e351799f325a44e4cddf042d677a9e8109b7c9e
AUX wl1251-inject-2.6.37.patch 47143 RMD160 35cfb086e93ce041fa6d9a698c7e630013ca666c SHA1 526dfe86d2002dd0a2868f5793fc982bd677a340 SHA256 04660a1f7fb241aafeb7fba3a7791cc31fd74efa75fa73616b3abe6b39f89b36
DIST compat-wireless-2.6.32.8.tar.bz2 2007299 RMD160 5afdf36753d78addc3dd9b94e3961506529d4fd5 SHA1 694b453db50cd22798b754d022aca1e5ba45c8f1 SHA256 d48a86e82fb314b96097d437215a8c85fe5072d00586a00ef9950d26ba1e673b
DIST compat-wireless-2.6.33.tar.bz2 2266149 RMD160 599ab94e51179627407877b4c3c657175f44642d SHA1 03a148cf01bc92c8a4f2e0b61234f523a3f42d01 SHA256 740c8749808d82495c40a3139fc12e751463a82eb949804dfe96e166f0848200
DIST compat-wireless-2.6.34.tar.bz2 2370805 RMD160 a3e4635ccd100f95509783090458ceb646e97cba SHA1 84d99b0008785d91918a6b29575fc6de86552751 SHA256 4e4af0df6c74461571925bea8f315f86a6dee3f4a74bbafed7950fdf30fdddd4
@ -57,6 +58,7 @@ EBUILD compat-wireless-2.6.34-r2.ebuild 3918 RMD160 48f91620cf68a993e63d3c9dfe56
EBUILD compat-wireless-2.6.35-r1.ebuild 5471 RMD160 dcc6f3666823faee305165a846cd37065ac9e2cb SHA1 74c3474682925c35629cffaad6a7ec522e31f5c9 SHA256 25c0b5e0db7fe4d1e9942acbe7f0325e1ef8d7e92488f0f554734bca2d0e86e0
EBUILD compat-wireless-2.6.36.ebuild 5332 RMD160 c4a19864f8703fce0b9369fc597f165290c56661 SHA1 efb406e9ab4ea21021f0e09edbfdb2e5d2a08f7e SHA256 52f02128f594db9950425aa03cd90cf9d5ff54d6475b25db696c58cd8c0a75d2
EBUILD compat-wireless-2.6.37-r7.ebuild 5443 RMD160 629fefa357220ebbad14d4f42979072a6ced87cc SHA1 7cd2e349de253e0f62abbe6c11bbfdc1558877e7 SHA256 f08fb77d9972331aae217e050e034e3bfd17d933c5eb22a272d05c7022f70462
EBUILD compat-wireless-2.6.37-r8.ebuild 5665 RMD160 c4c93e64ff823ded6d960ac3fe13f14110afec70 SHA1 8698fc5a1268acfb62ba8f7d63522d66eccb60f8 SHA256 e772bd9a4c2c39332e0844476a7d9f3452576736f6c072562250644e787350d0
EBUILD compat-wireless-2.6.38.2-r1.ebuild 5641 RMD160 2a7056e079083a3cfd5ce42b8b48b51ccdfd6430 SHA1 ea2b0a1d8ce9298ead5cdca1ec5c0b43140aed32 SHA256 e226115a59b6c8b91585231ca007d8929dc5f3e4ea7e1e4807c81a2e788869a1
EBUILD compat-wireless-2.6.39-r1.ebuild 5452 RMD160 400562e5a513c9686ea30773d689cebcf8c4c4ef SHA1 144b17dd5de5113db1b1c7cc2a5811f9461d086e SHA256 f93936fa1e85242c8380d6c0ae045b8e7d25930490fe5111f33e7736d9e26aea
EBUILD compat-wireless-3.0.ebuild 6461 RMD160 51e211bac46f5fedf4bf66d28fa84acf20793537 SHA1 6ff1ad045dd488334e2e84ddae5b4ceb67f2e71f SHA256 ed6bf245e9011e40296dac5f32f52f4166a9f684872509ef634f6aff78ba641e

View file

@ -0,0 +1,147 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit linux-mod linux-info versionator eutils flag-o-matic
##Stable
MY_P=${P/_rc/-rc}
MY_PV=v$(get_version_component_range 1-3)
DESCRIPTION="Stable kernel pre-release wifi subsystem backport"
HOMEPAGE="http://wireless.kernel.org/en/users/Download/stable"
CRAZY_VERSIONING="4-sn"
SRC_URI="http://www.orbit-lab.org/kernel/${PN}-2.6-stable/${MY_PV}/${MY_P}-${CRAZY_VERSIONING}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 amd64 arm"
IUSE="atheros_obey_crda debugfs debug-driver full-debug injection noleds tinyversionoverride n900"
DEPEND=""
RDEPEND="!arm? ( =sys-kernel/linux-firmware-99999999 )"
S="${WORKDIR}"/"${MY_P}"-${CRAZY_VERSIONING}
RESTRICT="strip"
#CONFIG_CHECK="!DYNAMIC_FTRACE"
pkg_setup() {
linux-mod_pkg_setup
kernel_is -lt 2 6 27 && die "kernel 2.6.27 or higher is required for compat wireless to be installed"
kernel_is -gt $(get_version_component_range 1) $(get_version_component_range 2) $(get_version_component_range 3) && die "The version of compat-wireless you are trying to install contains older modules than your kernel. Failing before downgrading your system."
if kernel_is -eq $(get_version_component_range 1) $(get_version_component_range 2) $(get_version_component_range 3); then
if use tinyversionoverride; then
ewarn "You have the tinyversionoverride use flag set which means you know for a fact that your"
ewarn "kernel is older than the compat-wireless you are installing."
ewarn "Most likely you have no clue what you are doing and should hit control-C now"
ewarn "before you downgrade your system. Ten seconds to think about it."
epause 10
else
ewarn "Your kernel version is most likely newer than the compat-wireless release you are"
ewarn "trying to install. If you are certain that your kernel is older then you can set"
ewarn "the tinyversionoverride use flag to override this safety check."
epause 5
die "Your kernel version is too close to the compat-wireless version to risk installation."
fi
fi
linux_chkconfig_module MAC80211 || die "CONFIG_MAC80211 must be built as a _module_ !"
linux_chkconfig_module CFG80211 || die "CONFIG_CFG80211 must be built as a _module_ !"
}
src_prepare() {
#this patch fixes a trivial typo in the config.mk
epatch "${FILESDIR}"/fix-typos-2.6.36_rc5.patch
#this patch is needed to forcibly enable new ralink chips because the shipped config.mk doesn't enable them
epatch "${FILESDIR}"/force-enable-new-ralink-pci-2.6.36-rc5.patch
#this may or may not HELP the channel -1 issue. this is not a fix
# this breaks wl1251 patches
#epatch "${FILESDIR}"/channel-negative-one-maxim.patch
#add support for ubiquiti toy for Ray
epatch "${FILESDIR}"/ubnt-wifi-station-ext2.patch
#this patch ignores the regulatory settings of an atheros card and uses what CRDA thinks is right
if use atheros_obey_crda; then
ewarn "You have enabled atheros_obey_crda which doesn't do what you think."
ewarn "This use flag will cause the eeprom of the card to be ignored and force"
ewarn "world roaming on the device until crda provides a valid regdomain."
ewarn "Short version, this is not a way to break the law, this will automatically"
ewarn "make your card less functional unless you set a proper regdomain with iw/crda."
ewarn "Pausing for 10 secs..."
epause 10
epatch "${FILESDIR}"/ath_ignore_eeprom.patch
fi
if use injection; then
epatch "${FILESDIR}"/4002_mac80211-2.6.29-fix-tx-ctl-no-ack-retry-count.patch
epatch "${FILESDIR}"/4004_zd1211rw-2.6.28.patch
epatch "${FILESDIR}"/mac80211.compat08082009.wl_frag+ack_v1.patch
epatch "${FILESDIR}"/4013-runtime-enable-disable-of-mac80211-packet-injection.patch
# epatch "${FILESDIR}"/compat-chaos.patch
epatch "${FILESDIR}"/rtl8187-mac80211-injection-speed-2.6.30-rc3.patch
# epatch "${FILESDIR}"/super_secret_patch.diff
epatch "${FILESDIR}"/ipw2200-inject.2.6.36.patch
if use arm; then
epatch "${FILESDIR}"/wl1251-inject-2.6.37.patch
fi
fi
use noleds && epatch "${FILESDIR}"/leds-disable-strict.patch
use debug-driver && epatch "${FILESDIR}"/driver-debug.patch
use debugfs && sed -i '/DEBUGFS/s/^# *//' "${S}"/config.mk
if use full-debug; then
if use debug-driver ; then
sed -i '/CONFIG=/s/^# *//' "${S}"/config.mk
else
ewarn "Enabling full-debug includes debug-driver."
sed -i '/DEBUG=/s/^# *//' "${S}"/config.mk
fi
fi
}
src_compile() {
export LDFLAGS=$(raw-ldflags)
addpredict "${KERNEL_DIR}"
set_arch_to_kernel
if use n900; then
./scripts/driver-select wl1251
fi
emake KLIB_BUILD="${DESTDIR}"/lib/modules/"${KV_FULL}"/build || die "emake failed"
}
src_install() {
for file in $(find -name \*.ko); do
insinto "/lib/modules/${KV_FULL}/updates/$(dirname ${file})"
doins "${file}" || die "failed to install module ${file}"
done
dosbin scripts/athenable scripts/b43load scripts/iwl-enable \
scripts/madwifi-unload scripts/athload scripts/iwl-load \
scripts/b43enable scripts/unload.sh || die "script installation failed"
dodir /usr/lib/compat-wireless
exeinto /usr/lib/compat-wireless
doexe scripts/modlib.sh || die
dodoc README || die
dodir /$(get_libdir)/udev/rules.d/
insinto /$(get_libdir)/udev/rules.d/
doins udev/50-compat_firmware.rules
exeinto /$(get_libdir)/udev/
doexe udev/compat_firmware.sh
}
pkg_postinst() {
update_depmod
update_moduledb
einfo 'You may have problem if you do not run "depmod -ae" after this installation'
einfo 'To switch to the new drivers without reboot run unload.sh then load
your needed driver.'
}
pkg_postrm() {
remove_moduledb
}

File diff suppressed because it is too large Load diff