(quickly updated for version 1.5...)
(this post explain how to create and install your own ebuild, but you can simply download it from
bugzilla)
I followed jamapii advice, and it worked so i'll explain it a little how to create a new ebuild from the version 1.2 one.
I assume that you know a little about making ebuilds, like how portage overlay work. You'll find information
here,
here and
here.
You can do all this in the standard portage directory (/usr/portage) but it'll be erased on emerge sync.
The portage overlay directory I use here is /usr/local/portage. You can use what you want, juste create it and put in /etc/make.conf :
1. Create portage overlay sub-directories for ndiswrapper :
Code: Select all
grubshka ~ # mkdir -p /usr/local/portage/net-wireless/ndiswrapper/files
2. Make an ebuild for version 1.5, copying version 1.2 one. The version is a parameter so you have nothing to change in the file :
Code: Select all
grubshka ndiswrapper # cp /usr/portage/net-wireless/ndiswrapper/ndiswrapper-1.2.ebuild /usr/local/portage/net-wireless/ndiswrapper/ndiswrapper-1.5.ebuild
(opt). Personnally I put the ~x86 mask for this package, but it's not really mandatory, just because i'm maniac

If you want to do it change KEYWORDS="x86" to KEYWORDS="~x86" in ndiswrapper-1.5.ebuild
And I had the flag in my package.keyword file :
Code: Select all
echo "net-wireless/ndiswrapper ~x86" >> /etc/portage/package.keywords
3. Make a suspend patch for version 1.5, copying version 1.2 one. Version is written statically in this file so you have to change every occurence of "ndiswrapper-1.2" to "ndiswrapper-1.5". Here I do it with sed but you can copy et edit it.
Code: Select all
grubshka ndiswrapper # sed -e 's/ndiswrapper-1.2/ndiswrapper-1.5/' /usr/portage/net-wireless/ndiswrapper/files/ndiswrapper-1.2-suspend2.patch > /usr/local/portage/net-wireless/ndiswrapper/files/ndiswrapper-1.5-suspend2.patch
WARNING : I'm not sure of this step, it works for me, but if you want you can disable suspend2 patch, just remove lines concerning it in ndiswrapper-1.5.ebuild.
4. Now, generate the ebuild digest file with the ebuild command :
Code: Select all
grubshka ndiswrapper # cd /usr/local/portage/net-wireless/ndiswrapper
grubshka ndiswrapper # ebuild ndiswrapper-1.5.ebuild digest
>>> Downloading http://mesh.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.5.tar.gz
--22:30:54-- http://mesh.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.5.tar.gz
=> `/usr/portage/distfiles/ndiswrapper-1.5.tar.gz'
Resolving mesh.dl.sourceforge.net... 213.203.218.122
Connecting to mesh.dl.sourceforge.net|213.203.218.122|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 168,549 (165K) [application/x-gzip]
100%[======================================================================================>] 168,549 188.23K/s
22:30:55 (187.50 KB/s) - `/usr/portage/distfiles/ndiswrapper-1.5.tar.gz' saved [168549/168549]
>>> Generating digest file...
<<< ndiswrapper-1.5.tar.gz
>>> Generating manifest file...
<<< ndiswrapper-1.5.ebuild
<<< files/digest-ndiswrapper-1.5
<<< files/ndiswrapper-1.5-suspend2.patch
>>> Computed message digests.
5. So let's verify it could be emerged :
Code: Select all
grubshka ndiswrapper # emerge -pv ndiswrapper
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild U ] net-wireless/ndiswrapper-1.5 -debug 0 kB [1]
Total size of downloads: 0 kB
Portage overlays:
[1] /usr/local/portage
6. OK, emerge it :
Code: Select all
grubshka ndiswrapper # emerge ndiswrapper
Calculating dependencies ...done!
>>> emerge (1 of 1) net-wireless/ndiswrapper-1.5 to /
>>> md5 files ;-) ndiswrapper-1.5.ebuild
>>> md5 files ;-) files/digest-ndiswrapper-1.5
>>> md5 files ;-) files/ndiswrapper-1.5-suspend2.patch
>>> md5 src_uri ;-) ndiswrapper-1.5.tar.gz
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 2.6.14-rc3-nitro1
* Checking for suitable kernel configuration options:
>>> Unpacking source...
>>> Unpacking ndiswrapper-1.5.tar.gz to /var/tmp/portage/ndiswrapper-1.5/work
* Applying ndiswrapper-1.5-suspend2.patch ... [ ok ]
* The only kernels that will work are gentoo-sources, vanilla-sources, and suspend2-sources.
* No other kernels are supported. Kernels like the mm kernels will NOT work.
* Converting ndiswrapper-1.5/driver/Makefile to use M= instead of SUBDIRS= ... [ ok ]
>>> Source unpacked.
BLA BLA BLA... Compiling stuff ;)
* GNU info directory index is up-to-date.
* IMPORTANT: 1 config files in /etc need updating.
* Type emerge --help config to learn how to update config files.
Like in the version 1.2, I simply ignore the warning about 4K kernel stack, and all work. If you have problem with this, search in the forum, I remember I saw other threads for this problem. (edit :
This one for example.)
6. The config file need updating :
Code: Select all
grubshka ndiswrapper # etc-update
Scanning Configuration files...
Automerging trivial changes in: ndiswrapper
Exiting: Nothing left to do; exiting. :)
7. And load the module :
Code: Select all
grubshka ndiswrapper # modprobe ndiswrapper
grubshka ndiswrapper # lsmod
Module Size Used by
ndiswrapper 184980 0
forcedeth 19904 0
snd_intel8x0 29856 0
snd_ac97_codec 92092 1 snd_intel8x0
snd_ac97_bus 2048 1 snd_ac97_codec
nvidia_agp 6428 1
agpgart 29384 1 nvidia_agp
8. Install hardware, see ndiswrapper doc for information... After, see if all is installed :
Code: Select all
grubshka ndiswrapper # ndiswrapper -l
Installed ndis drivers:
wmp54gs driver present, hardware present
wmp54gsa driver present, hardware present
grubshka ndiswrapper # /etc/init.d/net.wlan0 start
* Starting wlan0
* Configuring wireless network for wlan0
Warning: Driver for device wlan0 has been compiled with version 19
of Wireless Extension, while this program supports up to version 17.
Some things may be broken...
* wlan0 connected to "grubwifi" at 00:0F:66:4B:3D:46
* in auto mode (WEP disabled)
* Bringing up wlan0
* 192.168.51.2
(you can see the sweet Wireless Extension warning jumped from 18 to 19... I someone have an idea on that...)
9. A little test :
Code: Select all
grubshka ndiswrapper # ping 192.168.51.1
PING 192.168.51.1 (192.168.51.1) 56(84) bytes of data.
64 bytes from 192.168.51.1: icmp_seq=1 ttl=150 time=9.32 ms
64 bytes from 192.168.51.1: icmp_seq=2 ttl=150 time=16.5 ms
64 bytes from 192.168.51.1: icmp_seq=3 ttl=150 time=1.45 ms
--- 192.168.51.1 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5004ms
rtt min/avg/max/mdev = 1.457/7.672/16.543/4.667 ms
That's all folks !
(I'm french and this is my first long post in english, don't hesitate to correct english errors)
Ciao