Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 24096 Details for
Bug 32737
Compiling external kernel modules with 2.6 kernels
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
new hostap-driver ebuild that uses O= foo to compile against clean 2.6 kernel source
hostap-driver-0.1.2-r2.ebuild (text/plain), 4.46 KB, created by
Peter Johanson (RETIRED)
on 2004-01-19 13:25:31 UTC
(
hide
)
Description:
new hostap-driver ebuild that uses O= foo to compile against clean 2.6 kernel source
Filename:
MIME Type:
Creator:
Peter Johanson (RETIRED)
Created:
2004-01-19 13:25:31 UTC
Size:
4.46 KB
patch
obsolete
># Copyright 1999-2003 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License v2 ># $Header: /home/cvsroot/gentoo-x86/net-wireless/hostap-driver/hostap-driver-0.1.2-r1.ebuild,v 1.1 2004/01/03 00:18:21 wschlich Exp $ > >inherit eutils > >DESCRIPTION="HostAP wireless drivers" >HOMEPAGE="http://hostap.epitest.fi/" >SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz > http://dev.gentoo.org/~latexer/files/patches/${PN}-2.6-makefile-fix.diff" >LICENSE="GPL-2" >SLOT="0" >KEYWORDS="x86" >IUSE="pcmcia hostap-nopci hostap-noplx" >DEPEND=">=net-wireless/wireless-tools-25 > pcmcia? ( >=sys-apps/pcmcia-cs-3.2.1 )" >RDEPEND="!net-wireless/hostap" >S="${WORKDIR}/${P}" >LIB_PATH="/lib/modules/${KV}" > >src_unpack() { > local myconfigpath > check_KV > unpack ${P}.tar.gz > cd "${S}" > > epatch "${FILESDIR}/${P}.firmware.diff.bz2" > > # Patch to build things in ${S}/tmp using kbuild > epatch "${DISTDIR}/${PN}-2.6-makefile-fix.diff" > mkdir ${S}/tmp > > okvminor="${KV#*.}" ; okvminor="${okvminor%%.*}" > > ## set compiler options > sed -i -e "s:gcc:${CC}:" \ > ${S}/Makefile > > if [ "${okvminor}" -gt "4" ] > then > sed -i -e "s:^# KERNEL_OUTPUT_PATH=.*:KERNEL_OUTPUT_PATH=/var/tmp/kernel-output/${KV}/:" ${S}/Makefile > myconfigpath=/var/tmp/kernel-output/${KV}/.config > else > myconfigpath=/usr/src/linux/.config > fi > > ## fix for new coreutils (#31801) > sed -i -e "s:tail -1:tail -n 1:" "${S}/Makefile" > > ## use pcmcia-cs sources if kernel tree pcmcia support is disabled and USE=pcmcia is set > if use pcmcia >&/dev/null; then > if egrep '^CONFIG_PCMCIA=[ym]' ${myconfigpath} >&/dev/null; then > einfo "Kernel PCMCIA is enabled, skipping external pcmcia-cs sources" > else > einfo "Kernel PCMCIA is disabled, using external pcmcia-cs sources" > ## get ebuild of currently installed pcmcia-cs package > PCMCIA_CS_EBUILD=(/var/db/pkg/sys-apps/pcmcia-cs-*/pcmcia-cs-*.ebuild) ## use bash globbing > if [ ! -f "${PCMCIA_CS_EBUILD}" ]; then > die "ERROR: pcmcia-cs ebuild (${PCMCIA_CS_EBUILD}) not found - are you sure pcmcia-cs is installed?" > fi > PCMCIA_CS_VER="${PCMCIA_CS_EBUILD##*/}" ## -> pcmcia-cs-VER.ebuild > PCMCIA_CS_VER="${PCMCIA_CS_VER/pcmcia-cs-/}" ## strip 'pcmcia-cs-' > PCMCIA_CS_VER="${PCMCIA_CS_VER/.ebuild/}" ## strip '.ebuild' > PCMCIA_PATH="${WORKDIR}/pcmcia-cs-${PCMCIA_CS_VER}" > sed -i -e "s:^PCMCIA_PATH=:PCMCIA_PATH=${PCMCIA_PATH}:" "${S}/Makefile" > ## unpack external pcmcia-cs sources > cd "${WORKDIR}" > unpack pcmcia-cs-${PCMCIA_CS_VER}.tar.gz ## unpack the pcmcia-cs sources to PCMCIA_PATH > cd pcmcia-cs-${PCMCIA_CS_VER} > ## when not configured, pcmcia-cs spits out lots of errors (since 3.2.5) > if ! ./Configure -n --srctree --kernel=/usr/src/linux >&/dev/null; then > eerror "External pcmcia-cs configuration failed" > die > fi > fi > fi >} > >src_compile() { > > local mydrivers > > okvminor="${KV#*.}" ; okvminor="${okvminor%%.*}" > if [ "${okvminor}" -lt 5 ] > then > use pcmcia && mydrivers="${mydrivers} pccard" > use hostap-nopci || mydrivers="${mydrivers} pci" > use hostap-noplx || mydrivers="${mydrivers} plx" > > einfo "Building the following drivers: ${mydrivers}" > emake EXTRA_CFLAGS="-DPRISM2_DOWNLOAD_SUPPORT" ${mydrivers} || die > else > # 2.6 kernel doesn't like you messing with ARCH > unset ARCH > > # hostap-driver doesn't let you specify drivers and use 2.6 (ugh) > emake || die > fi >} > >src_install() { > local kobj > okvminor="${KV#*.}" ; okvminor="${okvminor%%.*}" > dodir ${LIB_PATH}/net > if [ "${okvminor}" -lt 5 ] > then > kobj="o" > else > kobj="ko" > fi > > cp ${S}/driver/modules/{hostap.${kobj},hostap_crypt_wep.${kobj}} \ > ${D}${LIB_PATH}/net/ ># local myinstall="install_hostap install_crypt" > > if use pcmcia >&/dev/null; then > dodir ${LIB_PATH}/pcmcia > dodir /etc/pcmcia > cp ${S}/driver/modules/hostap_cs.${kobj} ${D}/${LIB_PATH}/pcmcia/ > cp ${S}/driver/etc/hostap_cs.conf ${D}/etc/pcmcia/ > if [ -r /etc/pcmcia/prism2.conf ]; then > einfo "You may need to edit or remove /etc/pcmcia/prism2.conf" > einfo "This is usually a result of conflicts with the" > einfo "linux-wlan-ng drivers." > fi ># myinstall="${myinstall} install_pccard" > fi > > if ! use hostap-nopci >&/dev/null; then > cp ${S}/driver/modules/hostap_pci.${kobj} \ > ${D}${LIB_PATH}/net/ ># myinstall="${myinstall} install_pci" > fi > > if ! use hostap-noplx >&/dev/null; then > cp ${S}/driver/modules/hostap_plx.${kobj} \ > ${D}${LIB_PATH}/net/ ># myinstall="${myinstall} install_plx" > fi ># emake DESTDIR="${D}" ${myinstall} > dodoc README ChangeLog >} >pkg_postinst(){ > einfo "Checking kernel module dependancies" > depmod -a >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 32737
:
23927
|
24094
|
24095
|
24096
|
24131
|
24646
|
24647
|
24649
|
24650
|
24651
|
25235
|
25237
|
25238
|
25239
|
25279
|
25280
|
25281
|
25282
|
25283
|
25363
|
25453
|
25454
|
25497
|
26588
|
26635
|
26643
|
27538
|
30030
|
31314
|
31315
|
31317
|
31345
|
31346
|
31347
|
32935
|
33123
|
33124
|
33125
|
33356
|
36615