Bug 38017 - first stab at a ndiswrapper ebuild
|
Bug#:
38017
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: enhancement
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: mobile@gentoo.org
|
Reported By: jbooth@uiuc.edu
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: first stab at a ndiswrapper ebuild
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2004-01-12 17:11 0000
|
Works fine, except doesn't play nice with sandbox. Nobody wanted to talk to me
to give me any hints how to work around it, so I guess someone else gets to fix
it, then maybe I can learn from what they did.
No other ebuilds that did kernel installs were enlightening unfortunatly.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Just finished making an install doc for this in the forums.
Link:http://forums.gentoo.org/viewtopic.php?p=786853#786853
I was getting ready to make an ebuild myself before i came apon this one. I'll test out the ebuild in a minute.
Is there anyway we could incorperate some more of the install process into the ebuild. I do not know if that would be possible with all the different card dependent drivers. Or maybe we could just put an einfo line in the ebuild with the forum link to the doc? Just some suggestions.
Also, could someone please post on here if this gets into portage so I can update my doc.
Towards the end of your ebuild you started typing ndiswapper instead of
ndiswrapper. So needless to say it failed. I will fix it if I get a chance
tonight.
OK I think I see the reason you did this, because there is already a
ndiswrapper module. Hows about we call it ndiswrap.
And another thing, from everyting i read in ndiswrapper's docs all you needed
to do was
make install (in ndiswrapper directory)
and
make (in ndiswrapper/utils)
Im not sure why you are doing it differently, I was just going by the doc.
make install would probably not work with ebuild's sandbox. The 'ndiswapper'
is just a typo. Should still work though
There is still a problem that I cannot seem to figure out. For some reason
make (in the drivers directory) is failing because it is detecting the wrong
${ARCH}. If you change the command to make || die you will see the error.
I also am not sure if your recent change is going to work because there is
already a "ndiswrapper" module. That is the reason for in the INSTALL and in
my doc, on the forums, there was a module called "wlan0" created.
Are you testing these ebuilds? I am trying to figure out where the problem is
because i can install it by hand with no problem, but it fails in the ebuild.
I'll keep hacking...
One more thing, it might be a 2.6 kernel problem, because I just noticed you
have tested only on 2.4. Can anyone else test this on 2.6?
I don't have a problem compiling which is probably because I am using 2.4. Try
changing it to
ARCH="i386" make || die
the ebuild dose the setup for 2.4 but gentoo's modules-update should hopefully
automatically convert the modules.conf to modprobe.conf for 2.6.
Where dose the other ndiswrapper module come from is it another ebuild. Feel
free to change it dose.
What is the status of this? I noticed development has come to a stop. Can we
get this commited to portage now? Masked for now seems to make sense.
Hey,
i finally got this bug on my list a little while ago. I'm away at a con this weekend, but i'll get this in next week. I've had to clean up the ebuild, a few things:
1) perl to do what "sed" was written for == no no. ebuilds are basically bash on speed, so you should try to stick to basic utilities and not bother loading perl if you don't need it.
2) Ebuilds should be "location agnostic." i.e. they should not rely on being on the machine that the ebuild is aimed at. I'll be moving the hardware detection to a config() function and adding some einfo in pkg_postinst so people can run that if they want to.
sorry for the delay. (:
Okay, so an initial version of this has been added to the ebuild. Most of the
vendor and device ID detection code was moved to a pkg_config() function which
people can run after installing the driver. For now, the 2.6 sandbox issue is
unfixed, pending the major 2.6 module work being done in bug #32737
Thanks for the initial ebuild! Leaving marked NEW til a final version with
better 2.6 support is done.
Hi.
I tried emerging this ebuild, but the compile failed. I'm using the gentoo-sources 2.4.22-r7 kernel. Here's the output:
arachne root # ACCEPT_KEYWORDS="~x86" emerge net-wireless/ndiswrapper
Calculating dependencies ...done!
>>> emerge (1 of 1) net-wireless/ndiswrapper-0.4 to /
>>> md5 src_uri ;-) ndiswrapper-0.4.tar.gz
>>> Unpacking source...
* /usr/src/linux is a symbolic link
* Determining the real directory of the Linux kernel source code
* Building for Linux 2.4.22-gentoo-r7 found in /usr/src/linux
>>> Unpacking ndiswrapper-0.4.tar.gz to /var/tmp/portage/ndiswrapper-0.4/work
>>> Source unpacked.
make -C driver
make[1]: Entering directory `/var/tmp/portage/ndiswrapper-0.4/work/ndiswrapper/driver'
make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
gcc -march=pentium3 -O3 -pipe -DTEST_PM -DEXPORT_SYMTAB -DMODVERSIONS -include //usr/src/linux/include/linux/modversions.h -DLINUX -D__KERNEL__ -DMODULE -I//usr/src/linux/include -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -O2 -c -o wrapper.o wrapper.c
wrapper.c:1126: error: variable `ndis_ethtool_ops' has initializer but incomplete type
wrapper.c:1127: error: unknown field `get_link' specified in initializer
wrapper.c:1127: warning: excess elements in struct initializer
wrapper.c:1127: warning: (near initialization for `ndis_ethtool_ops')
wrapper.c: In function `setup_dev':
wrapper.c:1613: error: structure has no member named `ethtool_ops'
wrapper.c: At top level:
wrapper.c:1126: error: storage size of `ndis_ethtool_ops' isn't known
make[1]: *** [wrapper.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/ndiswrapper-0.4/work/ndiswrapper/driver'
make: *** [all] Error 2
!!! ERROR: net-wireless/ndiswrapper-0.4 failed.
!!! Function src_compile, Line 32, Exitcode 2
!!! (no error message)
It seems the v0.4 ov ndiswrapper requires a linux kernel of at least 2.4.23.
I'll try to get a v0.3 ebuild in to portage, as apparently this works with
slightly older kernels. You can either test with a newer kernel, and report
back, or wait til 0.3 is available and try that.
Okay, i've just added version 0.3 to portage. Please test that if you've not
upgraded your kernel.
I should have read the INSTALL file in the portage working dir and noticed the
>=2.4.23 requirement!
I migrated to the gs-sources kernel 2.4.25, and now the ebuild compiled nicely
and I'm successfully using the min-pci 54g wireless nic in my Dell Inspiron
8500.
That's pretty darn exciting.
Could I suggest that you mod the ebuild to print out a message pointing that
out? Might help others figure out what to do.
OK, a few suggestions:
1) ``uname'' should not be used anywhere, use the provided-by-Portage check_kv
function which uses /usr/src/linux. You can then implement check_KV to
check for > 2.4.23 kernels - see "get_KV_info()" in nvidia-kernel and
use ${KV} to install the modules should go.
2) The ``lspci'' code won't handle multiple cards. Implent a ``while read''
instead; so you can then parse each entry. Also; use ``cut'' instead of
that Perl script. For multiple cards it would be nice to add the manufacturer
name to the config file as well. Do this by simply ``while read'''ing each
matching line; storing the whole line in one variable; then filtering it
separately. Then use ``lspci -s $Bus:$Slot:$Function.$SubFunc'' using
the original variable to get the device name; use ``cut'' here as well.
3) Might be better to use a ``cat <<EOF > ${D}/etc/modules.d/ndiswrapper''
for the static configuration areas so you're invoking less echo's.
4) SLOT should be "${KV}"; also please fix up the "DESCRIPTION".
Thanks.
Not a huge deal, but if lspci is going to be used in pkg_config, shouldn't
pciutils be listed as a dependency?
Version 0.5 (released today) seems to work on 2.6 kernels without any patching.
I didn't use an ebuild, i just got the source, typed "make" and "make install"
and could modprobe it.
Marking this as fixed because it's been fixed in later bug reports and newer
versions and newer ebuilds.