mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-09 04:51:27 +02:00
compat-wireless/openrc: I believe I've perfected the auto rebuild and auto reload of wifi modules. I RULE YOU
This commit is contained in:
parent
458b00f8ae
commit
517be1b426
4 changed files with 153 additions and 2 deletions
|
|
@ -69,5 +69,6 @@ EBUILD compat-wireless-2.6.39_rc1.ebuild 5352 RMD160 843acbacc6d8c1c30c873f4e050
|
|||
EBUILD compat-wireless-2.6.39_rc6.ebuild 5385 RMD160 8ce900d26c9b30cb585308d37c43bd5fb4efabb7 SHA1 e79c57c130816c9ddb13fc251739a679f3c54d98 SHA256 eb29169be7583e0531f3ee9fd89218507dd80da64f4f92fb3b1d343c867f0a8d
|
||||
EBUILD compat-wireless-3.0_rc1.ebuild 5703 RMD160 263a5bc297a7a123c8f0e9dfcd5cb11bb88ed8f7 SHA1 1a06b22bc6ee579ccde6bd8a2c0f723955d88d55 SHA256 437ef076b8c1b864b0d2193d5c66bb8b0e0a67080bd895ed772863edb3ffa454
|
||||
EBUILD compat-wireless-3.0_rc4-r1.ebuild 5613 RMD160 f70a05365a265407451eed6a74b91cb1d3ab2bc5 SHA1 7ad8bdf1dec216d050807a035cc8e882f8674d1d SHA256 b038e285306f8ec254977b9a59c6157da25168b332c6a689f9290cbb94a20859
|
||||
EBUILD compat-wireless-3.0_rc4-r2.ebuild 5839 RMD160 85e1636bdfb5e73f3a7d8b9eefc5e637fc6791c0 SHA1 9edfdc1128bbedfea86bdc6bf9e6dc14ce8093a0 SHA256 91caa75920122bf53dc2b015e7973f48d7630c1ce1d0dc9dd30940efc73a5635
|
||||
EBUILD compat-wireless-3.0_rc4.ebuild 5650 RMD160 bffef5f32337d8eda8d25fd9cc427c3da68c8d97 SHA1 c05e8892f913a642681531977f7b6a18ea528387 SHA256 95d1fdbe4fb38d72bb0ee3f4a814ea6aa9bbee1a4b4da35aa1747605a74c84a3
|
||||
MISC metadata.xml 228 RMD160 cd3fb26b5d8049ab5dba38f21d7654ec033aa0eb SHA1 3148dfbdced7a623a311d21c6f728ab9c7135dae SHA256 8715828d1bff71d5d96b991ba600bae9376c1c80c96f0f102260fc335ca22487
|
||||
|
|
|
|||
150
net-wireless/compat-wireless/compat-wireless-3.0_rc4-r2.ebuild
Normal file
150
net-wireless/compat-wireless/compat-wireless-3.0_rc4-r2.ebuild
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="4"
|
||||
inherit linux-mod linux-info versionator eutils
|
||||
|
||||
##Stable
|
||||
|
||||
MY_P=${P/_rc/-rc}
|
||||
|
||||
MY_PV=v$(get_version_component_range 1-2).0
|
||||
DESCRIPTION="Stable kernel pre-release wifi subsystem backport"
|
||||
HOMEPAGE="http://wireless.kernel.org/en/users/Download/stable"
|
||||
CRAZY_VERSIONING="1"
|
||||
SRC_URI="http://www.orbit-lab.org/kernel/${PN}-3.0-stable/${MY_PV}/${MY_P}-${CRAZY_VERSIONING}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~arm ~amd64 ~x86"
|
||||
IUSE="atheros_obey_crda bluetooth debugfs debug-driver full-debug injection livecd loadmodules noleds tinyversionoverride"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=">=sys-kernel/linux-firmware-20110604
|
||||
sys-fs/udev"
|
||||
|
||||
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."
|
||||
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."
|
||||
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() {
|
||||
epatch "${FILESDIR}"/make-make.patch
|
||||
|
||||
#this patch fixes a trivial typo in the config.mk
|
||||
epatch "${FILESDIR}"/fix-typos-2.6.36_rc5.patch
|
||||
|
||||
#this may or may not HELP the channel -1 issue. this is not a fix
|
||||
epatch "${FILESDIR}"/channel-negative-one-maxim.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..."
|
||||
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}"/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
|
||||
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
|
||||
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"
|
||||
|
||||
# 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() {
|
||||
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
|
||||
/usr/sbin/unload.sh
|
||||
/sbin/udevadm trigger
|
||||
einfo "Your new modules have been loaded for you, sorry for the network hiccup."
|
||||
fi
|
||||
fi
|
||||
einfo "If you didn't USE=loadmodules you can still switch to the new drivers without reboot."
|
||||
einfo "Run 'unload.sh' then 'udevadm trigger' to cause udev to load the needed drivers."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
remove_moduledb
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ AUX 00-linux-link.start 220 RMD160 b0ad204479455da3c92d09d3be4134e445f629a6 SHA1
|
|||
AUX 9999/0001-msg-style.patch 1714 RMD160 15a9a9075dce18fb0beece6a3324c143ec973ed2 SHA1 b9082ab1160952a3412be3deb3825d901cce5d49 SHA256 4c819af483240b1c822d25ae3e604376b6255b4577c191bddfc84c309efab08e
|
||||
AUX 9999/0002-useful-functions.patch 1801 RMD160 5b4ca22e434a3c3d9202e5e95d7dfd4518e0393a SHA1 86f4a4f49989c688269a6e1f95c27ef00f5186ca SHA256 de5e11cd8c514353a5f97b13df52a7220b1b967dd0586336d16864d6c372c62f
|
||||
AUX 9999/0003-KV.patch 2565 RMD160 62ebe49be43f9b3691400a5a6ebf05c8cb048f0b SHA1 b61e1fe0fc49705a44b0e9fde1d8ec0cfc1e343a SHA256 44be27f8bf419489b29507a8ddab74ff890d6ebcfa316570077393f1c6bac082
|
||||
AUX compat-wireless.start 794 RMD160 417fc49fd1e0dedc5c977c997a0f95b521c69819 SHA1 1da35c571b9b4f60c4c8e0d0e5383d494bfd0eac SHA256 0293b983cc80edaf91d24184069f9dce2eb84f936306f2423b7c222210a67d1f
|
||||
AUX compat-wireless.start 754 RMD160 05a4f97b90bf64607c6242680eebba58a19a2235 SHA1 2489192bdbc200bd866e749b92fc37518c368922 SHA256 6f5270147ceeea10c2ffb347925bfe3d14581459cdd94e92b6541b383988a85c
|
||||
AUX openrc-0.5.2-dont-wipe-wtmp.patch 684 RMD160 c1d7df47f123327e03523fc133583a464fc88c71 SHA1 24aa51d63ce6c8b3f9263f41f312f763a9450a44 SHA256 c850f9e948ff1726ec20d73f0afc894e3a010e0285d046eb19b573b781a59e45
|
||||
AUX openrc-0.5.2-fix-default-domain.patch 682 RMD160 4bd23f777d795401370d8fdac70ca29b7fc16529 SHA1 628513765c65a64e3a586d13e305387b24321095 SHA256 bb49923afdbc8a10e5e2c4a0176ab3e67b047057fc9ae2027f25c88250b29064
|
||||
AUX openrc-0.5.2-fix-iproute2-support.patch 835 RMD160 859e4c8d2c1c8fe8b787432beea370bc955a5e7c SHA1 0cd6fea09ca65945aa86905fc9665d8410186f3c SHA256 491c0444de2d8a11ff17343abb9295e61178db0d3b07e3b075424abe3f287827
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ then
|
|||
then
|
||||
#the line below should rebuild compat-wireless iff it was already
|
||||
#installed and isn't installed for the current kernel version
|
||||
grep --quiet compat-wireless /var/lib/portage/world && ( emerge --nodeps -1 compat-wireless && /usr/sbin/unload.sh && udevadm trigger )
|
||||
grep --quiet compat-wireless /var/lib/portage/world && ( emerge --nodeps -1 compat-wireless & )
|
||||
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue