# ndiswrapper will not emerge......

## 67comet

Pretty much I'm at a total loss.

I first emerged RT2500 since I'm using a Belkin wifi card that has the need for that driver/module. It failed big time as soon as I tried to use it.

So I thought, Knoppix worked well with ndiswrapper and attempted an emerge as seen here:

```

# emerge ndiswrapper

Calculating dependencies ...done!

>>> emerge (1 of 1) net-wireless/ndiswrapper-1.2 to /

>>> md5 files   ;-) ndiswrapper-1.5.ebuild

>>> md5 files   ;-) ndiswrapper-1.2.ebuild

>>> md5 files   ;-) files/digest-ndiswrapper-1.2

>>> md5 files   ;-) files/digest-ndiswrapper-1.5

>>> md5 files   ;-) files/ndiswrapper-1.2-suspend2.patch

>>> md5 src_uri ;-) ndiswrapper-1.2.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-gentoo-r2

 * Checking for suitable kernel configuration options:

>>> Unpacking source...

>>> Unpacking ndiswrapper-1.2.tar.gz to /var/tmp/portage/ndiswrapper-1.2/work

 * Applying ndiswrapper-1.2-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.2/driver/Makefile to use M= instead of SUBDIRS= ...                                         [ ok ]

>>> Source unpacked.

cc -Wall -g -DNDISWRAPPER_VERSION=\"1.2\"    -c -o loadndisdriver.o loadndisdriver.c

gcc -o loadndisdriver loadndisdriver.o

 * Preparing ndiswrapper module

make -C //usr/src/linux M=/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver \

        NDISWRAPPER_VERSION=1.2 \

        EXTRA_VERSION= modules

make[1]: Entering directory `/usr/src/linux-2.6.14-gentoo-r2'

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/hal.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/iw_ndis.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/loader.o

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/loader.c: In function `register_devices':

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/loader.c:963: warning: assignment from incompatible pointer type

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/misc_funcs.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ndis.o

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ndis.c:1721:5: warning: "LINUX_KERNEL_VERSION" is not defined

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ntoskernel.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/pe_linker.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/proc.o

  CC [M]  /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.o

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c:287:47: macro "halt" passed 1 arguments, but takes just 0

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c: In function `miniport_halt':

/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c:287: warning: statement with no effect

make[2]: *** [/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.o] Error 1

make[1]: *** [_module_/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.14-gentoo-r2'

make: *** [default] Error 

```

I'm really at a loss on this one. I mean there really isn't an error per say that I see, it just mentions the word error, but no explination in my book.

My kernel version is at the top of the code about 15 lines down.

Thanks for any help or direction in advance,

Justin

----------

## rev138

IIRC, I ran into the same problem with that kernel. Try unmasking a newer version of ndiswrapper, or using an older kernel.

----------

## SavageHcky7

I have the exact same problem, attempting to get wireless working on a Compaq Presario 2500 with a Broadcom 4306 chip.  I get the exact same result that you posted.  Have you had any success yet?

----------

## 67comet

I did get it to finally emerge by adding it to my package.keywords file and emerging. However, it's still not playing nice with my card. I got the drivers off my Belkin cd they took fine, then when I attempt modprobe nidswrapper it goes off on me MUCH the same way Nvidia does (still working that issue too).

ndiswrapper -l gives me ...

```

# ndiswrapper -l

Installed ndis drivers:

rt2500          driver present, hardware present

```

Perfect I assume .. 

Here is what I get when I try modprobe .. 

```

 # modprobe ndiswrapper

FATAL: Error inserting ndiswrapper (/lib/modules/2.6.14-gentoo-r2/misc/ndiswrapper.ko): Invalid module format

```

lspci to make sure I ain't jerkin' some wacky module that is wrong .. 

```

 # lspci

00:00.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 02)

00:01.0 PCI bridge: Intel Corporation 82815 815 Chipset AGP Bridge (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 01)

00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 01)

00:1f.1 IDE interface: Intel Corporation 82801BA IDE U100 (rev 01)

00:1f.2 USB Controller: Intel Corporation 82801BA/BAM USB (Hub #1) (rev 01)

00:1f.3 SMBus: Intel Corporation 82801BA/BAM SMBus (rev 01)

00:1f.4 USB Controller: Intel Corporation 82801BA/BAM USB (Hub #2) (rev 01)

01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev a1)

02:09.0 Network controller: RaLink RT2500 802.11G Cardbus/mini-PCI (rev 01)

02:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

02:0e.0 Multimedia audio controller: Creative Labs SB Audigy (rev 03)

02:0e.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port

```

and lsmod leaves me..... Um shouldn't there be "something?" ..

```

 # lsmod

Module                  Size  Used by

```

and yes that is ALL lsmod tells me.

Guess dmesg might be usefull?

```

# dmesg | grep rt2500

rt2500: version magic '2.6.14-gentoo-r2 PENTIUMIII gcc-3.4' should be '2.6.14-gentoo-r2 SMP preempt PENTIUMIII gcc-3.4'

```

Aha .. there it is .. rt2500 .. cool .. ur . what the?

I've tried re-compiling ndiswrapper and rt2500 (tried using rt2500 first) . with no change in anything. I also followed two or three seperate how-to articals with dud results.

I'm SOOO mad, Gentoo is the Distro I choose to use on my server and my personal workstation, however on my wifes laptop and now her desktop with wireless it's just not playing nice (Thus friggin' Kubuntu is on her lappy for now). Her desktop goes up on the second floor, so there is no way I can run cat5 or 6 up there (gov't housing) so wireless is the only route. After I get wireless working, audio up and nvidia playing nice I've got to tackle her all in one Epson printer, should make for a fun weekend NOT... 

Take care and thanks for the attention to this post, baby steps are better then no steps.

Justin

----------

## rev138

There's a newer kernel revision out as of yesterday, Maybe you should try your luck with that one.

If not, just downgrade to 2.6.13. You don't NEED the latest kernel, do you?

----------

## 67comet

Nope no need to keep to the latest. The issue is I "really" suck at changing my kernel lol .. 

I mean I use that Stage 1/3 gcc-3.4.4 install .. and it uses #make && make modules && make modules_install && make install method .. .. I kinda get lost on .. Well, after I symlink the kernel source inside /usr/src/ to linux (making /usr/src/gentoo-sources-2.6.14-r2 into /usr/src/linux .. I kinda get lost on what to tell grub to hunt down).

I mean normaly I simply remove linux, redo the symlink to the new kernel, run make && etc && etc again and tada, I'm no longer running the kernel I was .. I think ..

Anyhow, I'll play for a minute and see what I can figure out.

Justin

P.S. The docs for kernel upgrade don't make sence to me much since I use that string of compile info for my kernel.

----------

## oracleofmist

I used to suck at updating my kernel too...it'd break terribly after an update...practice practice practice...that's how i learned anyhow

----------

## oracleofmist

I'm having the same problem...on a 2.6.14-r2 kernel

here is my output:

```
gentoo dwl520 # modprobe ndiswrapper

FATAL: Error inserting ndiswrapper (/lib/modules/2.6.14-gentoo-r2/misc/ndiswrapper.ko): Unknown symbol in module, or unknown parameter (see dmesg)

```

```
gentoo dwl520 # ndiswrapper -l

Installed ndis drivers:

prismnic                driver present, hardware present 

```

dmesg:

```
 [<c02d8de5>] idecd_ioctl+0x85/0x90

 [<c02b1932>] blkdev_driver_ioctl+0x52/0x90

 [<c02b1a14>] blkdev_ioctl+0xa4/0x1b0

 [<c016034b>] block_ioctl+0x2b/0x30

 [<c016a7c6>] do_ioctl+0x86/0xa0

 [<c03e4a78>] do_page_fault+0x178/0x5d7

 [<c016a995>] vfs_ioctl+0x65/0x1d0

 [<c016ab45>] sys_ioctl+0x45/0x80

 [<c0102e81>] syscall_call+0x7/0xb

arq->state: 4

Badness in as_insert_request at drivers/block/as-iosched.c:1519

 [<c02b5591>] as_insert_request+0x61/0x170

 [<c02abf58>] __elv_add_request+0x78/0xc0

 [<c02abfe0>] elv_add_request+0x40/0x70

 [<c02af4d7>] blk_execute_rq_nowait+0x47/0x60

 [<c02af57b>] blk_execute_rq+0x8b/0xc0

 [<c02af7d0>] blk_end_sync_rq+0x0/0x40

 [<c02b0ae3>] blk_rq_bio_prep+0x73/0xa0

 [<c02f4378>] cdrom_read_cdda_bpc+0x188/0x1f0

 [<c02f441e>] cdrom_read_cdda+0x3e/0xb0

 [<c02f576d>] mmc_ioctl+0x54d/0xa90

 [<c012a730>] autoremove_wake_function+0x0/0x60

 [<c012a730>] autoremove_wake_function+0x0/0x60

 [<c02b35e5>] scsi_cmd_ioctl+0x75/0x490

 [<c026cf79>] n_tty_receive_buf+0x189/0x1010

 [<c02f50ed>] cdrom_ioctl+0xc5d/0xd00

 [<c013ccd7>] __alloc_pages+0x2e7/0x470

 [<c02d8de5>] idecd_ioctl+0x85/0x90

 [<c02b1932>] blkdev_driver_ioctl+0x52/0x90

 [<c02b1a14>] blkdev_ioctl+0xa4/0x1b0

 [<c016034b>] block_ioctl+0x2b/0x30

 [<c016a7c6>] do_ioctl+0x86/0xa0

 [<c03e4a78>] do_page_fault+0x178/0x5d7

 [<c016a995>] vfs_ioctl+0x65/0x1d0

 [<c016ab45>] sys_ioctl+0x45/0x80

 [<c0102e81>] syscall_call+0x7/0xb

arq->state: 4

Badness in as_insert_request at drivers/block/as-iosched.c:1519

 [<c02b5591>] as_insert_request+0x61/0x170

 [<c02abf58>] __elv_add_request+0x78/0xc0

 [<c02abfe0>] elv_add_request+0x40/0x70

 [<c02af4d7>] blk_execute_rq_nowait+0x47/0x60

 [<c02af57b>] blk_execute_rq+0x8b/0xc0

 [<c02af7d0>] blk_end_sync_rq+0x0/0x40

 [<c02b0ae3>] blk_rq_bio_prep+0x73/0xa0

 [<c02f4378>] cdrom_read_cdda_bpc+0x188/0x1f0

 [<c02f441e>] cdrom_read_cdda+0x3e/0xb0

 [<c02f576d>] mmc_ioctl+0x54d/0xa90

 [<c012a730>] autoremove_wake_function+0x0/0x60

 [<c012a730>] autoremove_wake_function+0x0/0x60

 [<c02b35e5>] scsi_cmd_ioctl+0x75/0x490

 [<c026cf79>] n_tty_receive_buf+0x189/0x1010

 [<c02f50ed>] cdrom_ioctl+0xc5d/0xd00

 [<c013ccd7>] __alloc_pages+0x2e7/0x470

 [<c02d8de5>] idecd_ioctl+0x85/0x90

 [<c02b1932>] blkdev_driver_ioctl+0x52/0x90

 [<c02b1a14>] blkdev_ioctl+0xa4/0x1b0

 [<c016034b>] block_ioctl+0x2b/0x30

 [<c016a7c6>] do_ioctl+0x86/0xa0

 [<c03e4a78>] do_page_fault+0x178/0x5d7

 [<c016a995>] vfs_ioctl+0x65/0x1d0

 [<c016ab45>] sys_ioctl+0x45/0x80

 [<c0102e81>] syscall_call+0x7/0xb

arq->state: 4

Badness in as_insert_request at drivers/block/as-iosched.c:1519

 [<c02b5591>] as_insert_request+0x61/0x170

 [<c02abf58>] __elv_add_request+0x78/0xc0

 [<c02abfe0>] elv_add_request+0x40/0x70

 [<c02af4d7>] blk_execute_rq_nowait+0x47/0x60

 [<c02af57b>] blk_execute_rq+0x8b/0xc0

 [<c02af7d0>] blk_end_sync_rq+0x0/0x40

 [<c02b0ae3>] blk_rq_bio_prep+0x73/0xa0

 [<c02f4378>] cdrom_read_cdda_bpc+0x188/0x1f0

 [<c02f441e>] cdrom_read_cdda+0x3e/0xb0

 [<c02f576d>] mmc_ioctl+0x54d/0xa90

 [<c012a730>] autoremove_wake_function+0x0/0x60

 [<c012a730>] autoremove_wake_function+0x0/0x60

 [<c02b35e5>] scsi_cmd_ioctl+0x75/0x490

 [<c026cf79>] n_tty_receive_buf+0x189/0x1010

 [<c02f50ed>] cdrom_ioctl+0xc5d/0xd00

 [<c013ccd7>] __alloc_pages+0x2e7/0x470

 [<c02d8de5>] idecd_ioctl+0x85/0x90

 [<c02b1932>] blkdev_driver_ioctl+0x52/0x90

 [<c02b1a14>] blkdev_ioctl+0xa4/0x1b0

 [<c016034b>] block_ioctl+0x2b/0x30

 [<c016a7c6>] do_ioctl+0x86/0xa0

 [<c03e4a78>] do_page_fault+0x178/0x5d7

 [<c016a995>] vfs_ioctl+0x65/0x1d0

 [<c016ab45>] sys_ioctl+0x45/0x80

 [<c0102e81>] syscall_call+0x7/0xb

```

lspci:

```
00:0a.0 Network controller: Intersil Corporation Prism 2.5 Wavelan chipset (rev 01)

```

----------

## rev138

 *oracleofmist wrote:*   

> I'm having the same problem...on a 2.6.14-r2 kernel

 

Which version of ndiswrapper are you using?

----------

## rev138

 *oracleofmist wrote:*   

> 
> 
> ```
> 00:0a.0 Network controller: Intersil Corporation Prism 2.5 Wavelan chipset (rev 01)
> 
> ...

 

Can't you just use the Intersil Prism driver included in the kernel?

----------

## NetTrodon

Only you need unamsk last release editing /etc/portage/package.keywords

This is the content of my /etc/portage/package.keywords

```
net-wireless/ndiswrapper ~x86

```

or as root type:

```
echo "net-wireless/ndiswrapper ~x86" >> /etc/portage/packge.keywords
```

Don't forget the "" and >>

In last, re-emerge.

Obviusly this problem occur with kernel 2.6.14 after upgrade frpm 2.6.12

----------

## SavageHcky7

Thanks NetTrodon (especially for the details) and rev138!  This fixed my problem, and I am now up and running with the on-board wireless!!  Kernel 2.6.14-gentoo-r2, ndiswrapper version 1.5, driver bcmwl5 (Broadcom, 03/19/2003, 3.10.53.0)

Thanks again!!

----------

## NetTrodon

In Windows, in the icon tray, you have view the state of a Dell 1350 WLan Wireless (Broadcom 43xx), but not in linux.

With this code you have view this, read a byte who change when on or off the wireless.

```
#!/bin/bash

STATUS_WLAN="$(/sbin/setpci -s 02:02.00 b0)"

WLAN_CARD="Dell WLAN1350 Mini-PCI:"

case $STATUS_WLAN in

        ff)

                echo "${WLAN_CARD} OFF"

                echo "To turn on, press Fn-F2"

                ;;

        fe)

                echo "${WLAN_CARD} ON"

                echo "To turn off, press Fn-F2"

                ;;

        *)

                echo "${WLAN_CARD }UNDEFINED"

                echo "Your CARD IS POSSIBLE BROKEN"

                ;;

esac

```

If you wish, try this code in your computer. Try as root, or you get an error form pcilib. Put in /usr/local/bin with user:group root:root (chown root:root) and permissions 0700 (chmod 0700) and you view the state of your broadcom.

I think what this code will execute correctly, i use bcmwl5 driver, too.

----------

## masinger53

I'm getting the same error with emerge of ndiswrapper on 2.6.14-gentoo-r2 and it was not a  kernel upgrade, but a new install (although I have recompiled the kernel once since the intall).  I tried adding to package.keywords exactly as above:

```
masmobile / # echo "net-wireless/ndiswrapper ~x86" >> /etc/portage/packge.keywords
```

but it gave the same error as previously.  Any suggestions?

----------

## rev138

 *masinger53 wrote:*   

> Any suggestions?

 

This may be just a typo on the forums, but the word "package" is not spelled right on that line.

----------

## masinger53

Doh!  I found that after trying twice to emerge, then doing the ebuild thing like https://forums.gentoo.org/viewtopic-t-387339-highlight-emerge+ndiswrapper.html, then noticing that it was generating 1.2 build messages then dorking around with that for a bit, then finally opening the package.keywords file and seeing there was nothing for ndiswrapper and a pesky misspelled packge.keywords file.  <slaps hand to forehead>

However, now that I have it compiled successfully, modprobe is failing to insert with this message:

```
FATAL: Error inserting ndiswrapper (/lib/modules/2.6.14-gentoo-r2/misc/ndiswrapper.ko): Invalid argument
```

So I'm looking around for the solution to that one.  :Confused: 

----------

## masinger53

Like so many of my problems, this too was of my own making -- needed to do the ndiswrapper -i /blah/blah/blah/driver step before doing modprobe.  So I got ndiswrapper compiled, inserted, running, and now I'm working on the getting it to connect to the dhcp server through the wireless access point.  (I'm also compiling OpenOffice, setting up Samba on my baby server, viewing 4 or 5 howtos on the stuff I've not yet implemented on this laptop, e.g., sound, multimedia, firewire, Eclipse IDE. etc.)

I continue to be impressed with the very refreshingly un-slashdot-like quality of the Genoo community.  And I am afraid I am becoming a somewhat of a Gentoo geek/freak -- I actually enjoy finding out how to make it work.

----------

