mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-03-06 21:51:52 +01:00
compat-wireless: updates and minor warning removal
This commit is contained in:
parent
364833936d
commit
6ce2d528ea
6 changed files with 438 additions and 8 deletions
|
|
@ -45,4 +45,6 @@ AUX whynot-2.6.31.patch 4272 RMD160 74ec1c66cfb376cf2c83401aa3edcdbfdd019438 SHA
|
|||
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
|
||||
EBUILD compat-wireless-builder-3.4_rc3.ebuild 8349 RMD160 674c4e0b87093376904818c10b480f6732e0004c SHA1 921a6ea2e016e2dd61e7d94638bd94f43f676289 SHA256 1c9d41f42a8dcb1307155f1f9cd29e9f8a6072d9d7206de797656bc18ea34a79
|
||||
EBUILD compat-wireless-builder-3.3.6.ebuild 8114 RMD160 4caa97edf641909aee4734d7b4bba857dd9b6950 SHA1 483b7b120c3b5c63a5121e557c0b45dde51ab05a SHA256 c9e8ebbeb62ec9d18ebca5a93a134956f2216ae59e9fde06147a46fa216f405e
|
||||
EBUILD compat-wireless-builder-3.4_rc3.ebuild 8116 RMD160 8dbbdba92c18d8ce0b45c7dab6589a28cbbbdb34 SHA1 d63c0ed2ae6878d5ceee7b9390f77659b7161329 SHA256 422aaffa64070c9c5a5f449505c120c7eefbb43481c4c8cd24177835627eec71
|
||||
EBUILD compat-wireless-builder-3.4_rc7.ebuild 8116 RMD160 8dbbdba92c18d8ce0b45c7dab6589a28cbbbdb34 SHA1 d63c0ed2ae6878d5ceee7b9390f77659b7161329 SHA256 422aaffa64070c9c5a5f449505c120c7eefbb43481c4c8cd24177835627eec71
|
||||
|
|
|
|||
|
|
@ -0,0 +1,217 @@
|
|||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="4"
|
||||
inherit git-2 linux-mod linux-info versionator eutils
|
||||
|
||||
##Stable
|
||||
|
||||
MY_P=${P/_rc/-rc}
|
||||
MY_PV=v${PV/_rc/-rc}
|
||||
MY_PVS=v$(get_version_component_range 1-2)
|
||||
DESCRIPTION="Stable kernel pre-release wifi subsystem backport"
|
||||
HOMEPAGE="http://wireless.kernel.org/en/users/Download/stable"
|
||||
CRAZY_VERSIONING="2"
|
||||
#SRC_URI="http://www.orbit-lab.org/kernel/${PN}-3.0-stable/${MY_PVS}/${MY_P}-${CRAZY_VERSIONING}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm x86"
|
||||
IUSE="+apply_cherrypicks +apply_crap +apply_stable +apply_pending atheros_obey_crda bluetooth b43 b44 debugfs debug-driver full-debug injection livecd loadmodules +tarball noleds"
|
||||
|
||||
DEPEND="!net-wireless/compat-wireless
|
||||
apply_stable? ( dev-util/quilt )"
|
||||
RDEPEND="${DEPEND}
|
||||
livecd? ( =sys-kernel/linux-firmware-99999999 )
|
||||
!livecd? ( >=sys-kernel/linux-firmware-20110709 )
|
||||
sys-fs/udev"
|
||||
|
||||
#S="${WORKDIR}"/"${MY_P}"-${CRAZY_VERSIONING}
|
||||
S="${WORKDIR}/compat-wireless"
|
||||
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."
|
||||
|
||||
#these things are not optional
|
||||
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_ !"
|
||||
linux_chkconfig_module LIBIPW || ewarn "CONFIG_LIBIPW really should be set or there will be no WEXT compat"
|
||||
|
||||
if use b43; then
|
||||
linux_chkconfig_module SSB || die "You need to enable CONFIG_SSB or USE=-b43"
|
||||
fi
|
||||
if use b44; then
|
||||
linux_chkconfig_module SSB || die "You need to enable CONFIG_SSB or USE=-b44"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
|
||||
EGIT_SOURCEDIR="${WORKDIR}/allstable"
|
||||
EGIT_COMMIT="refs/tags/${MY_PV}"
|
||||
git-2_src_unpack
|
||||
unset EGIT_DIR
|
||||
unset EGIT_COMMIT
|
||||
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git"
|
||||
EGIT_SOURCEDIR="${WORKDIR}/linux-next"
|
||||
git-2_src_unpack
|
||||
unset EGIT_DIR
|
||||
|
||||
EGIT_REPO_URI="git://github.com/mcgrof/compat.git"
|
||||
EGIT_SOURCEDIR="${WORKDIR}/compat"
|
||||
EGIT_BRANCH="linux-$(get_version_component_range 1).$(get_version_component_range 2).y"
|
||||
git-2_src_unpack
|
||||
unset EGIT_DIR
|
||||
unset EGIT_BRANCH
|
||||
|
||||
EGIT_REPO_URI="git://github.com/mcgrof/compat-wireless.git"
|
||||
EGIT_SOURCEDIR="${WORKDIR}/compat-wireless"
|
||||
EGIT_BRANCH="linux-$(get_version_component_range 1).$(get_version_component_range 2).y"
|
||||
git-2_src_unpack
|
||||
unset EGIT_DIR
|
||||
unset EGIT_BRANCH
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
use apply_cherrypicks && apply="${apply} -n"
|
||||
use apply_pending && apply="${apply} -p"
|
||||
use apply_stable && apply="${apply} -s"
|
||||
use apply_crap && apply="${apply} -c"
|
||||
|
||||
#CAUTION: on this line GIT_TREE asks for linux-next but wants stable
|
||||
GIT_TREE="${WORKDIR}/allstable" GIT_COMPAT_TREE="${WORKDIR}/compat" NEXT_TREE="${WORKDIR}/linux-next" scripts/admin-update.sh -s refresh || die
|
||||
#CAUTION: but on this line GIT_TREE wants stable
|
||||
GIT_TREE="${WORKDIR}/allstable" GIT_COMPAT_TREE="${WORKDIR}/compat" NEXT_TREE="${WORKDIR}/linux-next" scripts/admin-update.sh${apply} || die
|
||||
|
||||
if use tarball; then
|
||||
rm -rf .git/
|
||||
set_arch_to_kernel
|
||||
emake KLIB_BUILD="${DESTDIR}"/lib/modules/"${KV_FULL}"/build clean
|
||||
find ./ -type f -name *.orig | xargs rm -f
|
||||
find ./ -type f -name *.rej | xargs rm -f
|
||||
use apply_cherrypicks && applied="${applied}n"
|
||||
use apply_pending && applied="${applied}p"
|
||||
#use apply_stable && applied="${applied}s"
|
||||
use apply_crap && applied="${applied}c"
|
||||
if [ "${applied}" ]; then
|
||||
applied="-${applied}"
|
||||
fi
|
||||
tar -Jcf "${WORKDIR}"/${P}${applied}.tar.xz "${WORKDIR}/compat-wireless/" || die
|
||||
fi
|
||||
|
||||
# CONFIG_CFG80211_REG_DEBUG=y
|
||||
sed -i '/CFG80211_REG_DEBUG/s/^# *//' "${S}"/config.mk
|
||||
|
||||
#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..."
|
||||
epatch "${FILESDIR}"/ath_regd_optional.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}"/ipw2200-inject.2.6.36.patch
|
||||
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
|
||||
# Disable B44 ethernet driver
|
||||
if ! use b44; then
|
||||
sed -i '/CONFIG_B44=/s/ */#/' "${S}"/config.mk || die "unable to disable B44 driver"
|
||||
sed -i '/CONFIG_B44_PCI=/s/ */#/' "${S}"/config.mk || die "unable to disable B44 driver"
|
||||
fi
|
||||
|
||||
# Disable B43 driver
|
||||
if ! use b43; then
|
||||
sed -i '/CONFIG_B43=/s/ */#/' "${S}"/config.mk || die "unable to disable B43 driver"
|
||||
sed -i '/CONFIG_B43_PCI_AUTOSELECT=/s/ */#/' "${S}"/config.mk || die "unable to disable B43 driver"
|
||||
#CONFIG_B43LEGACY=
|
||||
fi
|
||||
|
||||
# fixme: there are more bluethooth settings in the config.mk
|
||||
if ! use bluetooth; then
|
||||
sed -i '/CONFIG_COMPAT_BLUETOOTH=/s/ */#/' "${S}"/config.mk || die "unable to disable bluetooth driver"
|
||||
sed -i '/CONFIG_COMPAT_BLUETOOTH_MODULES=/s/ */#/' "${S}"/config.mk || die "unable to bluetooth B44 driver"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
addpredict "${KERNEL_DIR}"
|
||||
set_arch_to_kernel
|
||||
emake KLIB_BUILD="${DESTDIR}"/lib/modules/"${KV_FULL}"/build || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use tarball; then
|
||||
insinto /usr/share/${PN}
|
||||
doins "${WORKDIR}"/${P}${applied}.tar.xz
|
||||
fi
|
||||
|
||||
for file in $(find -name \*.ko); do
|
||||
insinto "/lib/modules/${KV_FULL}/updates/$(dirname ${file})"
|
||||
doins "${file}"
|
||||
done
|
||||
dosbin scripts/athenable scripts/b43load scripts/iwl-enable \
|
||||
scripts/madwifi-unload scripts/athload scripts/iwl-load \
|
||||
scripts/b43enable scripts/unload.sh
|
||||
|
||||
dodir /usr/lib/compat-wireless
|
||||
exeinto /usr/lib/compat-wireless
|
||||
doexe scripts/modlib.sh
|
||||
|
||||
dodoc README
|
||||
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
|
||||
|
||||
if use !livecd; then
|
||||
if use loadmodules; then
|
||||
einfo "Attempting to unload modules..."
|
||||
/usr/sbin/unload.sh 2>&1 | grep -E FATAL && ewarn "Unable to remove running modules, system may be unhappy, reboot HIGHLY recommended!"
|
||||
einfo "Triggering automatic reload of needed modules..."
|
||||
/sbin/udevadm trigger
|
||||
einfo "We have attempted to load your new modules for you, this may fail horribly, or may just cause a network hiccup."
|
||||
einfo "If you experience any issues reboot is the simplest course of action."
|
||||
fi
|
||||
fi
|
||||
if use !loadmodules; then
|
||||
einfo "You didn't USE=loadmodules but you can still attempt to switch to the new drivers without reboot."
|
||||
einfo "Run 'unload.sh' then 'udevadm trigger' to cause udev to load the needed drivers."
|
||||
einfo "If unload.sh fails for some reason you should be able to simply reboot to fix everything and load the new modules."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
remove_moduledb
|
||||
}
|
||||
|
|
@ -37,9 +37,6 @@ 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
|
||||
ewarn "Please report that you saw this message in #pentoo on irc.freenode.net along with your uname -r"
|
||||
fi
|
||||
|
||||
#these things are not optional
|
||||
linux_chkconfig_module MAC80211 || die "CONFIG_MAC80211 must be built as a _module_ !"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,217 @@
|
|||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="4"
|
||||
inherit git-2 linux-mod linux-info versionator eutils
|
||||
|
||||
##Stable
|
||||
|
||||
MY_P=${P/_rc/-rc}
|
||||
MY_PV=v${PV/_rc/-rc}
|
||||
MY_PVS=v$(get_version_component_range 1-2)
|
||||
DESCRIPTION="Stable kernel pre-release wifi subsystem backport"
|
||||
HOMEPAGE="http://wireless.kernel.org/en/users/Download/stable"
|
||||
CRAZY_VERSIONING="2"
|
||||
#SRC_URI="http://www.orbit-lab.org/kernel/${PN}-3.0-stable/${MY_PVS}/${MY_P}-${CRAZY_VERSIONING}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE="+apply_cherrypicks +apply_crap +apply_stable +apply_pending atheros_obey_crda bluetooth b43 b44 debugfs debug-driver full-debug injection livecd loadmodules +tarball noleds"
|
||||
|
||||
DEPEND="!net-wireless/compat-wireless
|
||||
apply_stable? ( dev-util/quilt )"
|
||||
RDEPEND="${DEPEND}
|
||||
livecd? ( =sys-kernel/linux-firmware-99999999 )
|
||||
!livecd? ( >=sys-kernel/linux-firmware-20110709 )
|
||||
sys-fs/udev"
|
||||
|
||||
#S="${WORKDIR}"/"${MY_P}"-${CRAZY_VERSIONING}
|
||||
S="${WORKDIR}/compat-wireless"
|
||||
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."
|
||||
|
||||
#these things are not optional
|
||||
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_ !"
|
||||
linux_chkconfig_module LIBIPW || ewarn "CONFIG_LIBIPW really should be set or there will be no WEXT compat"
|
||||
|
||||
if use b43; then
|
||||
linux_chkconfig_module SSB || die "You need to enable CONFIG_SSB or USE=-b43"
|
||||
fi
|
||||
if use b44; then
|
||||
linux_chkconfig_module SSB || die "You need to enable CONFIG_SSB or USE=-b44"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
|
||||
EGIT_SOURCEDIR="${WORKDIR}/allstable"
|
||||
EGIT_COMMIT="refs/tags/${MY_PV}"
|
||||
git-2_src_unpack
|
||||
unset EGIT_DIR
|
||||
unset EGIT_COMMIT
|
||||
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git"
|
||||
EGIT_SOURCEDIR="${WORKDIR}/linux-next"
|
||||
git-2_src_unpack
|
||||
unset EGIT_DIR
|
||||
|
||||
EGIT_REPO_URI="git://github.com/mcgrof/compat.git"
|
||||
EGIT_SOURCEDIR="${WORKDIR}/compat"
|
||||
EGIT_BRANCH="linux-$(get_version_component_range 1).$(get_version_component_range 2).y"
|
||||
git-2_src_unpack
|
||||
unset EGIT_DIR
|
||||
unset EGIT_BRANCH
|
||||
|
||||
EGIT_REPO_URI="git://github.com/mcgrof/compat-wireless.git"
|
||||
EGIT_SOURCEDIR="${WORKDIR}/compat-wireless"
|
||||
EGIT_BRANCH="linux-$(get_version_component_range 1).$(get_version_component_range 2).y"
|
||||
git-2_src_unpack
|
||||
unset EGIT_DIR
|
||||
unset EGIT_BRANCH
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
use apply_cherrypicks && apply="${apply} -n"
|
||||
use apply_pending && apply="${apply} -p"
|
||||
use apply_stable && apply="${apply} -s"
|
||||
use apply_crap && apply="${apply} -c"
|
||||
|
||||
#CAUTION: on this line GIT_TREE asks for linux-next but wants stable
|
||||
GIT_TREE="${WORKDIR}/allstable" GIT_COMPAT_TREE="${WORKDIR}/compat" NEXT_TREE="${WORKDIR}/linux-next" scripts/admin-update.sh -s refresh || die
|
||||
#CAUTION: but on this line GIT_TREE wants stable
|
||||
GIT_TREE="${WORKDIR}/allstable" GIT_COMPAT_TREE="${WORKDIR}/compat" NEXT_TREE="${WORKDIR}/linux-next" scripts/admin-update.sh${apply} || die
|
||||
|
||||
if use tarball; then
|
||||
rm -rf .git/
|
||||
set_arch_to_kernel
|
||||
emake KLIB_BUILD="${DESTDIR}"/lib/modules/"${KV_FULL}"/build clean
|
||||
find ./ -type f -name *.orig | xargs rm -f
|
||||
find ./ -type f -name *.rej | xargs rm -f
|
||||
use apply_cherrypicks && applied="${applied}n"
|
||||
use apply_pending && applied="${applied}p"
|
||||
#use apply_stable && applied="${applied}s"
|
||||
use apply_crap && applied="${applied}c"
|
||||
if [ "${applied}" ]; then
|
||||
applied="-${applied}"
|
||||
fi
|
||||
tar -Jcf "${WORKDIR}"/${P}${applied}.tar.xz "${WORKDIR}/compat-wireless/" || die
|
||||
fi
|
||||
|
||||
# CONFIG_CFG80211_REG_DEBUG=y
|
||||
sed -i '/CFG80211_REG_DEBUG/s/^# *//' "${S}"/config.mk
|
||||
|
||||
#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..."
|
||||
epatch "${FILESDIR}"/ath_regd_optional.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}"/ipw2200-inject.2.6.36.patch
|
||||
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
|
||||
# Disable B44 ethernet driver
|
||||
if ! use b44; then
|
||||
sed -i '/CONFIG_B44=/s/ */#/' "${S}"/config.mk || die "unable to disable B44 driver"
|
||||
sed -i '/CONFIG_B44_PCI=/s/ */#/' "${S}"/config.mk || die "unable to disable B44 driver"
|
||||
fi
|
||||
|
||||
# Disable B43 driver
|
||||
if ! use b43; then
|
||||
sed -i '/CONFIG_B43=/s/ */#/' "${S}"/config.mk || die "unable to disable B43 driver"
|
||||
sed -i '/CONFIG_B43_PCI_AUTOSELECT=/s/ */#/' "${S}"/config.mk || die "unable to disable B43 driver"
|
||||
#CONFIG_B43LEGACY=
|
||||
fi
|
||||
|
||||
# fixme: there are more bluethooth settings in the config.mk
|
||||
if ! use bluetooth; then
|
||||
sed -i '/CONFIG_COMPAT_BLUETOOTH=/s/ */#/' "${S}"/config.mk || die "unable to disable bluetooth driver"
|
||||
sed -i '/CONFIG_COMPAT_BLUETOOTH_MODULES=/s/ */#/' "${S}"/config.mk || die "unable to bluetooth B44 driver"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
addpredict "${KERNEL_DIR}"
|
||||
set_arch_to_kernel
|
||||
emake KLIB_BUILD="${DESTDIR}"/lib/modules/"${KV_FULL}"/build || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use tarball; then
|
||||
insinto /usr/share/${PN}
|
||||
doins "${WORKDIR}"/${P}${applied}.tar.xz
|
||||
fi
|
||||
|
||||
for file in $(find -name \*.ko); do
|
||||
insinto "/lib/modules/${KV_FULL}/updates/$(dirname ${file})"
|
||||
doins "${file}"
|
||||
done
|
||||
dosbin scripts/athenable scripts/b43load scripts/iwl-enable \
|
||||
scripts/madwifi-unload scripts/athload scripts/iwl-load \
|
||||
scripts/b43enable scripts/unload.sh
|
||||
|
||||
dodir /usr/lib/compat-wireless
|
||||
exeinto /usr/lib/compat-wireless
|
||||
doexe scripts/modlib.sh
|
||||
|
||||
dodoc README
|
||||
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
|
||||
|
||||
if use !livecd; then
|
||||
if use loadmodules; then
|
||||
einfo "Attempting to unload modules..."
|
||||
/usr/sbin/unload.sh 2>&1 | grep -E FATAL && ewarn "Unable to remove running modules, system may be unhappy, reboot HIGHLY recommended!"
|
||||
einfo "Triggering automatic reload of needed modules..."
|
||||
/sbin/udevadm trigger
|
||||
einfo "We have attempted to load your new modules for you, this may fail horribly, or may just cause a network hiccup."
|
||||
einfo "If you experience any issues reboot is the simplest course of action."
|
||||
fi
|
||||
fi
|
||||
if use !loadmodules; then
|
||||
einfo "You didn't USE=loadmodules but you can still attempt to switch to the new drivers without reboot."
|
||||
einfo "Run 'unload.sh' then 'udevadm trigger' to cause udev to load the needed drivers."
|
||||
einfo "If unload.sh fails for some reason you should be able to simply reboot to fix everything and load the new modules."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
remove_moduledb
|
||||
}
|
||||
|
|
@ -78,5 +78,5 @@ EBUILD compat-wireless-3.3-r1.ebuild 6316 RMD160 fc9b8edd8a0cc23f9341cfab5a442c1
|
|||
EBUILD compat-wireless-3.3.ebuild 6274 RMD160 cbcf230cf7d18ec716b70ff2b2daf35d09d6ad94 SHA1 ee60dded6871ee6e0f7983dc618b20db97daec65 SHA256 71cecd0c190a6e7e769e09ad3d567837abf13cf307ba55f93e898a8d26b4c15a
|
||||
EBUILD compat-wireless-3.4_rc1-r1.ebuild 6104 RMD160 7b9d2483fb6723210c58c3395097c6fa83bcfff1 SHA1 c97b5d442880b8f63b6ecacfee25c1e793d6243d SHA256 62aa12b407887d185ecf615156055c95996683226afb335becfb8c0f4b2a65f7
|
||||
EBUILD compat-wireless-3.4_rc1.ebuild 6136 RMD160 b31d2a92ffa6fbf22ed92a6d1387dceee4dc14af SHA1 d1eadd70a8c1ca1abb8c60e842daefa66d997afb SHA256 c251d84ecafe0562548cc922bf412a5d3b311c1aebf8449b6d73a11d4cdfd649
|
||||
EBUILD compat-wireless-3.4_rc3.ebuild 6104 RMD160 b1bace70039846b456c411558f705452cd21c2ba SHA1 f80755d7895743e15e2d10d2e905f338649c3a56 SHA256 fe3bfc7588121d31c2fdf0a5086c197d85867b040e0b1b0f0931132ba8a24892
|
||||
EBUILD compat-wireless-3.4_rc3.ebuild 5871 RMD160 eeb5416f47e243363963716a450e98fdd790d050 SHA1 52a78fb5581cf18efb8af2372d00232a37d0ae35 SHA256 609960ce2388900472d079cba2947ed6fa73275dd9b0adbb1cc94e5a8b500ef7
|
||||
MISC metadata.xml 228 RMD160 cd3fb26b5d8049ab5dba38f21d7654ec033aa0eb SHA1 3148dfbdced7a623a311d21c6f728ab9c7135dae SHA256 8715828d1bff71d5d96b991ba600bae9376c1c80c96f0f102260fc335ca22487
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@ 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
|
||||
ewarn "Please report that you saw this message in #pentoo on irc.freenode.net along with your uname -r"
|
||||
fi
|
||||
|
||||
#these things are not optional
|
||||
linux_chkconfig_module MAC80211 || die "CONFIG_MAC80211 must be built as a _module_ !"
|
||||
|
|
|
|||
Loading…
Reference in a new issue