NDISwrapper Setup

From HotDec

Jump to: navigation, search

Contents

THIS PAGE IS WRONG, ndiswrapper has never been sucessfully use on the SBC !!!

There is a Wiki for general ndiswrapper installation instructions [1]

SBC Compilation Notes

The ndiswrapper needs to be pointed to the source directory for the kernel it is being compiled for. The Makefile assumes that we are compiling for the currently running version of the linux kernel (which is not exactly what we want). We need to either modify the Makefile to use the right kernel version.

Usually any Makefile that needs use the linux source files will do so in the same way. First the Makefile will get the name of the currently running kernel using the 'uname' program:

KVERS = `uname -r`

Next it will use the name of the kernel version to find the directory where the modules for the current kernel version are kept. The modules directory will have a soft link (called build and source) to the location of the kernel sources (and build directories).

KSRC = /lib/modules/$(KVERS)/build

The easiest way to get the Makefile to use the right package is to have already made and installed the modules that are going to be used on the SBC on the /lib/modules directory of the host. Then all that needs to be done is too changing the KVERS variable:

KVERS = 2.6.15.3-sbc-mar22-rtai

The other option is to change the KSRC value directly.

KSRC = /usr/local/src/linux-2.6.15.3-rtai

The problem with this is there is often other variable that use KVERS in one way or another, for example in the ndiswrapper/driver/Makefile there is

KVERS ?= $(shell uname -r)
KSRC  ?= /lib/modules/$(KVERS)/build
KPSUB := $(shell echo $(KVERS) | sed -e 's/\([^\.]*\)\.\([^\.]*\)\..*/\1\2/')
DESTDIR =
INST_DIR := $(DESTDIR)/lib/modules/$(KVERS)/misc


SBC Installation Notes

You also need to change some parts of the Mafefile so that the ndiswrapper drivers and utilities are installed with the /home3/sbc as the root directory. Moreover, ndiswrapper installs 'man' files which will take up too much space on the SBC, but are very useful on the host computer.


Summary of Makefile Changes

There are a couple of subfolders that also have makefiles that need to changed, here is a list of the changes to make:

In ndiswrapper-1.9/Makefile Change:

DESTDIR = 
mandir = $(DESTDIR)$(shell [ -d /usr/man/man8 ] && echo /usr/man || echo /usr/share/man )
KVERS ?= $(shell uname -r)

To:

DESTDIR = /home3/sbc                 # install files using /home3/sbc as root directory
mandir = /usr/local/share/man        # except for man files which we install to host computer
KVERS ?= 2.6.15.3-sbc-mar28-rtai     # use version string of the SBC kernel


In ndiswrapper-1.9/utils/Makefile Change:

DESTDIR = 
sbindir = $(DESTDIR)/sbin
usrsbindir = $(DESTDIR)/usr/sbin

To:

DESTDIR = /home3/sbc                                 # change this
sbindir = $(DESTDIR)/sbin
usrsbindir = $(DESTDIR)/usr/sbin


In ndiswrapper-1.9/driver/Makefile Change:

KVERS ?= $(shell uname -r)
KSRC  ?= /lib/modules/$(KVERS)/build
KPSUB := $(shell echo $(KVERS) | sed -e 's/\([^\.]*\)\.\([^\.]*\)\..*/\1\2/')
DESTDIR = 
INST_DIR := $(DESTDIR)/lib/modules/$(KVERS)/misc

To:

KVERS ?= 2.6.15.3-sbc-mar28-rtai                                             # change this
KSRC  ?= /lib/modules/$(KVERS)/build
KPSUB := $(shell echo $(KVERS) | sed -e 's/\([^\.]*\)\.\([^\.]*\)\..*/\1\2/')
DESTDIR = /home3/sbc                                                               # and this
INST_DIR := $(DESTDIR)/lib/modules/$(KVERS)/misc


Getting The Windows Driver

From the Proxim website http://support.proxim.com, go to 'Downloads Page'. In 'End-of-Life' section find 'ORiNOCO 842x-WD 11b Client PC Card'. Then download the windows driver zipfile '8240_drivers.zip'

Depmod on Host

The depmod program will look through the modules and determine dependencies. These are used by 'modprobe' to determine which modules depend on which other modules. When installing the kernel normally, depmod is already run, but when using a kernel module from outside the normal kernel tree ( a module like ndiswrapper.ko) depmod should be run again. Usually depmod will try to run on the modules for the currently running version of the linux kernel, but we must make it run for the SBC modules.

depmod -b /home3/sbc -e -v 2.6.15.3-sbc-apr13-rtai -F /sbc/boot/System.map-2.6.15.3-sbc-apr13-rtai

Personal tools