# Monitor Mode with Orinoco, PCMCIA-CS and 2.6.7-gentoo-r11

## Trader

Hi!

Can anybody help me getting the above configuration up and running? I can´t find patches for the 2.6.7 kernel. Do I have to start pcmcia via rc-update or will the kernel handle pcmcia?

Thanks

Trader

----------

## DiskBreaker

You could try some of the ebuilds for the Orinoco drivers I've made, they all include Monitor Mode support:

orinoco-driver-0.13e.ebuild

orinoco-driver-0.15rc1.ebuild

orinoco-driver-cvs-0.15.ebuild

The first one is a patched version of the current stable Orinoco driver, the second is from the unstable branch and the third is directly from CVS. Just put them in your portage-overlay and emerge. They all work with 2.6.7 and should be able to replace the driver from pcmcia_cs. Since you have a PCMCIA-Card, the driver you will need to modprobe after emerge will most likely be orinoco_cs.

Hope this works for you,

DiskBreaker

----------

## Trader

bash-2.05b# ACCEPT_KEYWORDS="~x86" emerge orinoco-driver

Calculating dependencies ...done!

>>> emerge (1 of 1) net-wireless/orinoco-driver-0.13e to /

>>> Downloading http://ftp.easynet.nl/mirror/gentoo/distfiles/orinoco-0.13e.tar.bz2

Error: The file was not found on the server!

>>> Downloading ftp://ftp.easynet.nl/mirror/gentoo/distfiles/orinoco-0.13e.tar.bz2

Error: A file called orinoco-0.13e.tar.bz2 was not found on the server

>>> Downloading http://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/orinoco-0.13e.tar.bz2

Error: The file was not found on the server!

>>> Downloading ftp://gentoo.inode.at/source/distfiles/orinoco-0.13e.tar.bz2

Error: A file called orinoco-0.13e.tar.bz2 was not found on the server

>>> Downloading http://www.informatik.uni-bremen.de/~plasmahh/orinoco-0.13e.tar.bz2

A error occured while trying to get info from the server

!!! Couldn't download orinoco-0.13e.tar.bz2. Aborting

What can I do now?

Thanks

Trader

----------

## Trader

bash-2.05b# ACCEPT_KEYWORDS="~x86" emerge orinoco-driver

Calculating dependencies ...done!

>>> emerge (1 of 1) net-wireless/orinoco-driver-0.13e to /

>>> md5 src_uri  :Wink:  orinoco-0.13e.tar.bz2

>>> Unpacking source...

 * /usr/src/linux is a symbolic link

 * Determining the real directory of the Linux kernel source code

 * Building for Linux 2.6.7-gentoo-r11 found in /usr/src/linux

 * which outputs to /usr/src/linux

 * By not using the kernel's ability to output to an alternative

 * directory, some external module builds may fail.

 * See <insert link to user doc here>

>>> Unpacking orinoco-0.13e.tar.bz2 to /var/tmp/portage/orinoco-driver-0.13e/work

/usr/sbin/ebuild.sh: line 225: cd: /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e: No such file or directory

>>> Source unpacked.

make: *** No targets specified and no makefile found.  Stop.

!!! ERROR: net-wireless/orinoco-driver-0.13e failed.

!!! Function kernel-mod_src_compile, Line 156, Exitcode 2

!!! (no error message)

----------

## Trader

bash-2.05b# ACCEPT_KEYWORDS="~x86" emerge orinoco-driver

Calculating dependencies ...done!

>>> emerge (1 of 1) net-wireless/orinoco-driver-0.13e to /

>>> md5 src_uri  :Wink:  orinoco-0.13e-SN-5.tar.bz2

>>> Unpacking source...

 * /usr/src/linux is a symbolic link

 * Determining the real directory of the Linux kernel source code

 * Building for Linux 2.6.7-gentoo-r11 found in /usr/src/linux

 * which outputs to /usr/src/linux

 * By not using the kernel's ability to output to an alternative

 * directory, some external module builds may fail.

 * See <insert link to user doc here>

>>> Unpacking orinoco-0.13e-SN-5.tar.bz2 to /var/tmp/portage/orinoco-driver-0.13e/work

>>> Source unpacked.

make -C /lib/modules/2.6.7-gentoo-r11/build SUBDIRS=/var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5 modules

make[1]: Entering directory `/usr/src/linux-2.6.7-gentoo-r11'

Makefile:450: /usr/src/linux-2.6.7-gentoo-r11/arch/x86/Makefile: No such file or directory

make[1]: *** No rule to make target `/usr/src/linux-2.6.7-gentoo-r11/arch/x86/Makefile'.  Stop.

make[1]: Leaving directory `/usr/src/linux-2.6.7-gentoo-r11'

make: *** [modules] Error 2

!!! ERROR: net-wireless/orinoco-driver-0.13e failed.

!!! Function kernel-mod_src_compile, Line 156, Exitcode 2

!!! (no error message)

----------

## DiskBreaker

Sorry about that, there were some typos in the ebuild as you have noticed. I fixed them now here:

https://bugs.gentoo.org/attachment.cgi?id=35469&action=view

 *Trader wrote:*   

> 
> 
> make[1]: Entering directory `/usr/src/linux-2.6.7-gentoo-r11'
> 
> Makefile:450: /usr/src/linux-2.6.7-gentoo-r11/arch/x86/Makefile: No such file or directory
> ...

 

Have you previously compiled the kernel in /usr/src/linux-2.6.7-gentoo-r11 without any problems? Somehow the kernel Makefile is looking for x86 as your arch where it should be i386.

Otherwise just comment this line with a #:

```
kernel-mod_src_compile
```

in the ebuild and it should work.

Sorry about that,

DiskBreaker

----------

## Trader

make -C /lib/modules/2.6.7-gentoo-r11/build SUBDIRS=/var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5 modules

make[1]: Entering directory `/usr/src/linux-2.6.7-gentoo-r11'

Makefile:450: /usr/src/linux-2.6.7-gentoo-r11/arch/x86/Makefile: No such file or directory

make[1]: *** No rule to make target `/usr/src/linux-2.6.7-gentoo-r11/arch/x86/Makefile'.  Stop.

make[1]: Leaving directory `/usr/src/linux-2.6.7-gentoo-r11'

make: *** [modules] Error 2

!!! ERROR: net-wireless/orinoco-driver-0.13e failed.

!!! Function src_compile, Line 39, Exitcode 2

!!! Make error

bash-2.05b# ls -al /usr/src/linux-2.6.7-gentoo-r11/arch/

alpha      cris       ia64       mips       ppc64      sparc      v850

arm        h8300      m68k       parisc     s390       sparc64    x86_64

arm26      i386       m68knommu  ppc        sh         um

bash-2.05b# ls -al /usr/src/linux-2.6.7-gentoo-r11/arch/x86_64/

boot           Kconfig        Makefile       oprofile

defconfig      kernel         Makefile.orig  pci

ia32           lib            mm

bash-2.05b# ls -al /usr/src/linux-2.6.7-gentoo-r11/arch/x86_64/

boot           Kconfig        Makefile       oprofile

defconfig      kernel         Makefile.orig  pci

ia32           lib            mm

bash-2.05b# ls -al /usr/src/linux-2.6.7-gentoo-r11/arch/x86_64/

Here ist the problem, I think:

Makefile:450: /usr/src/linux-2.6.7-gentoo-r11/arch/x86/Makefile: No such file or directory

I don´t have this directory. Should I symlink it?

Thanks for your help!

Trader

----------

## Trader

bash-2.05b# ln -s /usr/src/linux/arch/i386/ /usr/src/linux/arch/x86

bash-2.05b# ACCEPT_KEYWORDS="~x86" emerge orinoco-driver

Calculating dependencies ...done!

>>> emerge (1 of 1) net-wireless/orinoco-driver-0.13e to /

>>> md5 src_uri  :Wink:  orinoco-0.13e-SN-5.tar.bz2

>>> Unpacking source...

 * /usr/src/linux is a symbolic link

 * Determining the real directory of the Linux kernel source code

 * Building for Linux 2.6.7-gentoo-r11 found in /usr/src/linux

 * which outputs to /usr/src/linux

 * By not using the kernel's ability to output to an alternative

 * directory, some external module builds may fail.

 * See <insert link to user doc here>

>>> Unpacking orinoco-0.13e-SN-5.tar.bz2 to /var/tmp/portage/orinoco-driver-0.13                                                                            e/work

>>> Source unpacked.

make -C /lib/modules/2.6.7-gentoo-r11/build SUBDIRS=/var/tmp/portage/orinoco-dri                                                                            ver-0.13e/work/orinoco-0.13e-SN-5 modules

make[1]: Entering directory `/usr/src/linux-2.6.7-gentoo-r11'

  CC [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/hermes.o

  CC [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco.                                                                            o

  CC [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_cs.o

  CC [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_plx.o

  CC [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_tmd.o

/var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco.c: In function `orinoco_set_mac_address':

/var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco.c:2653: warning: unused variable `priv'

  CC [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_pci.o

  Building modules, stage 2.

  MODPOST

  CC      /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/hermes.mod.o

  CC      /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco.mod.o

  CC      /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_cs.mod.o

  CC      /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_pci.mod.o

  CC      /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_plx.mod.o

  CC      /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_tmd.mod.o

  LD [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/hermes.ko

  LD [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco.ko

  LD [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_pci.ko

  LD [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_plx.ko

  LD [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_tmd.ko

  LD [M]  /var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5/orinoco_cs.ko

make[1]: Leaving directory `/usr/src/linux-2.6.7-gentoo-r11'

make -C /lib/modules/2.6.7-gentoo-r11/build SUBDIRS=/var/tmp/portage/orinoco-driver-0.13e/work/orinoco-0.13e-SN-5 modules

make[1]: Entering directory `/usr/src/linux-2.6.7-gentoo-r11'

  Building modules, stage 2.

  MODPOST

make[1]: Leaving directory `/usr/src/linux-2.6.7-gentoo-r11'

>>> Install orinoco-driver-0.13e into /var/tmp/portage/orinoco-driver-0.13e/image/ category net-wireless

 * Backing up old Orinoco kernel modules.

ACCESS DENIED  rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/hermes.ko

install: cannot backup `/lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/hermes.ko': Permission denied

ACCESS DENIED  rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_cs.ko

install: cannot backup `/lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_cs.ko': Permission denied

ACCESS DENIED  rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco.ko

install: cannot backup `/lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco.ko': Permission denied

ACCESS DENIED  rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_pci.ko

install: cannot backup `/lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_pci.ko': Permission denied

ACCESS DENIED  rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_plx.ko

install: cannot backup `/lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_plx.ko': Permission denied

ACCESS DENIED  rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_tmd.ko

install: cannot backup `/lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_tmd.ko': Permission denied

man:

prepallstrip:

strip:

>>> Completed installing into /var/tmp/portage/orinoco-driver-0.13e/image/

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------

LOG FILE = "/tmp/sandbox-net-wireless_-_orinoco-driver-0.13e-10205.log"

rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/hermes.ko

rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_cs.ko

rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco.ko

rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_pci.ko

rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_plx.ko

rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/orinoco_tmd.ko

--------------------------------------------------------------------------------

mes.ko.05b# ls -al /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/her

-rw-r--r--  1 root root 9542 15. Jul 13:38 /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/hermes.ko

bash-2.05b#

----------

## DiskBreaker

 *Trader wrote:*   

> 
> 
>  * Backing up old Orinoco kernel modules.
> 
> ACCESS DENIED  rename:    /lib/modules/2.6.7-gentoo-r11/kernel/drivers/net/wireless/hermes.ko
> ...

 

Hmm, looks like my idea to backup old kernel modules isn't working properly... remove/uncomment the following line from the ebuild:

```
install -b -S .orig *.$KV_OBJ ${MODULEDIR}/
```

I'm still not quite sure on the Makefile/arch problem... are you running on a x86-64bit platform?

Sorry about that and thanks for helping me debug my ebuild  :Smile: 

----------

## Trader

Hi DiskBreaker!

First of all: Thank you for providing an ebuild for the orinico chipset. I´m running the kernel on a normal Intel P4 Laptop. Nothing with 64bit etc. The kernel .config was made by genkernel, I haven´t changed anything.

I moved the old modules manually and finally could emerge the ebuild. (After I did the symlink).

It's working fine. If you need more help, I would like to test it. I have more pcs I could test it on.

Thanks 

Trader[/quote]

----------

## DiskBreaker

 *Trader wrote:*   

> It's working fine. If you need more help, I would like to test it. I have more pcs I could test it on.

 

I've fixed a few things and made some new ebuilds, if you want you could try them out and see if they work better:

orinoco-driver-0.13e.ebuild

orinoco-driver-0.15_rc2.ebuild

----------

## Cheesepie

 *Trader wrote:*   

> bash-2.05b# ln -s /usr/src/linux/arch/i386/ /usr/src/linux/arch/x86
> 
> bash-2.05b# ACCEPT_KEYWORDS="~x86" emerge orinoco-driver
> 
> Calculating dependencies ...done!
> ...

 

having the exact same "access violation" error here , with all 3 versions of the ebuild :-\

EDIT----

Nevermind, 

deleting the following line from the ebuild worked

[quote]install -b -S .orig *.$KV_OBJ ${MODULEDIR}/[/qoute]

----------

