trying to install my usb to ethernet adaptor

Ok, at first I thought, maybe it will not need any doing. Apparently not though. The disk that came with it said “windows 98, xp, vista, 7” and “Mac OSX” so I figured there was nothing on it that was relevent. Fool that I am. For on the disk was a folder called “Linux” and in that folder were 4 files: asix.h, Makefile, usbnet.c and readme2.6.x which I guess was not written by an English speaker.

Anyway, I just want to check a few things. First it asks me (in the readme) to copy the kernel source directory to my template directory.

  1. Would the kernel source directory be /usr/src/linux/kernel ? If no, what is it?
  2. Is my template directory a specific directory somewhere, or is it just their way of saying some arbitrary other directory to do things in (presumably with the files from the cd in it)?

The readme file in the version on that website is much better though reads moar

Secondly it tells me to compile it then says that “after successful compilation the usbnet.ko will be created under the current directory”. .'.
3. Do I actually need to do any of that since I am pretty sure I already have compiled usbnet.ko when I configured it the first time (because when I decided to get a usb to ethernet adaptor I checked and unless it was actually usb-net or some other variation of the same basic set of words then it was there)?

Thirdly it says “if you want to use modeprobe command to mount Belkin F5D5055 driver, execute the following command: make install”

OK, I am confused.
4.Where exactly does asix.h come into it?

Heh, and threads like this (elsewhere) do not fill me with confidence: http://ccforums.clearfoundation.com/showflat.php?Cat=0&Number=118780&an=0&page=2 lol

Much better readme file in that asix website’s version though!

If it makes any difference I tried to find anything mentioning asix in linux-2.6.33-zen2-r1/.config and found nothing (neither y or n)… however AX8817X=y…

I downloaded the stuff too form http://www.asix.com.tw/download.php?sub=downloadsearch&PSNoID=100 and had a look into the README - not really helpful for a beginner:

  1. You should be certain that the Kernel-sources are installed - if yes, you should find those under /usr/scr/linux, if not do install those

  2. You should be certain the kernel-headers are installed

If both is present you have roughly the following output:

swen@Augustus:~/Playyard/ASIX$ ls
AX88772B_772A_760_772_178_LINUX2.6.32_Driver_v3.2.0_Source.tar.bz2
swen@Augustus:~/Playyard/ASIX$ tar vxjf AX88772B_772A_760_772_178_LINUX2.6.32_Driver_v3.2.0_Source.tar.bz2
asix.c
asix.h
Makefile
readme
swen@Augustus:~/Playyard/ASIX$ ls -l
total 3
-rwxr--r-- 1 swen swen 88231 2010-06-03 12:28 asix.c
-rwxr--r-- 1 swen swen 15063 2010-05-04 09:02 asix.h
-rw-r--r-- 1 swen swen 20056 2010-07-01 06:14 AX88772B_772A_760_772_178_LINUX2.6.32_Driver_v3.2.0_Source.tar.bz2
-rwxr--r-- 1 swen swen   699 2009-10-14 06:59 Makefile
-rwxr--r-- 1 swen swen  5465 2010-06-03 13:07 readme
swen@Augustus:~/Playyard/ASIX$ make
make -C /lib/modules/2.6.26-2-amd64/build SUBDIRS=/home2/swen/Playyard/ASIX modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.26-2-amd64'
  CC [M]  /home2/swen/Playyard/ASIX/asix.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home2/swen/Playyard/ASIX/asix.mod.o
  LD [M]  /home2/swen/Playyard/ASIX/asix.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.26-2-amd64'
swen@Augustus:~/Playyard/ASIX$ ls -l
total 134
-rwxr--r-- 1 swen swen 88231 2010-06-03 12:28 asix.c
-rwxr--r-- 1 swen swen 15063 2010-05-04 09:02 asix.h
-rw-r--r-- 1 swen swen 55385 2010-07-01 06:14 asix.ko
-rw-r--r-- 1 swen swen  3367 2010-07-01 06:14 asix.mod.c
-rw-r--r-- 1 swen swen 11736 2010-07-01 06:14 asix.mod.o
-rw-r--r-- 1 swen swen 44640 2010-07-01 06:14 asix.o
-rw-r--r-- 1 swen swen 20056 2010-07-01 06:14 AX88772B_772A_760_772_178_LINUX2.6.32_Driver_v3.2.0_Source.tar.bz2
-rwxr--r-- 1 swen swen   699 2009-10-14 06:59 Makefile
-rw-r--r-- 1 swen swen    41 2010-07-01 06:14 modules.order
-rw-r--r-- 1 swen swen     0 2010-07-01 06:14 Module.symvers
-rwxr--r-- 1 swen swen  5465 2010-06-03 13:07 readme
swen@Augustus:~/Playyard/ASIX$

Become root (sudo or su) and run

make install

This should load the module into the kernel.

I definitely have the kernel sources because I already recompiled it when my video card was playing up.
I did the make part and that worked (when I used the website version not the crappy cd version which just deleted all the files and didn’t make anything).
Make install is not working because there is nothing at /lib/modules/2.6.33-zen2/kernel/drivers/usb

If I just mkdir that, will that work? Or will it not work because something should be there that isn’t?

I just tested it on an Ubuntu machine and it compiled fine:

swen@Caligula:~/Playyard/ASIX$ uname -a
Linux Caligula 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux
swen@Caligula:~/Playyard/ASIX$ ls -l
total 20
-rw-r--r-- 1 swen swen 20056 2010-07-01 06:45 AX88772B_772A_760_772_178_LINUX2.6.32_Driver_v3.2.0_Source.tar.bz2
swen@Caligula:~/Playyard/ASIX$ tar vxjf AX88772B_772A_760_772_178_LINUX2.6.32_Driver_v3.2.0_Source.tar.bz2
tar: Record size = 8 blocks
asix.c
asix.h
Makefile
readme
swen@Caligula:~/Playyard/ASIX$ make
make -C /lib/modules/2.6.32-22-generic/build SUBDIRS=/home/swen/Playyard/ASIX modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-22-generic'
  CC [M]  /home/swen/Playyard/ASIX/asix.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/swen/Playyard/ASIX/asix.mod.o
  LD [M]  /home/swen/Playyard/ASIX/asix.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-22-generic'
swen@Caligula:~/Playyard/ASIX$ ls -l
total 240
-rwxr--r-- 1 swen swen 88231 2010-06-03 12:28 asix.c
-rwxr--r-- 1 swen swen 15063 2010-05-04 09:02 asix.h
-rw-r--r-- 1 swen swen 46410 2010-07-01 06:46 asix.ko
-rw-r--r-- 1 swen swen  3740 2010-07-01 06:46 asix.mod.c
-rw-r--r-- 1 swen swen  7284 2010-07-01 06:46 asix.mod.o
-rw-r--r-- 1 swen swen 39744 2010-07-01 06:46 asix.o
-rw-r--r-- 1 swen swen 20056 2010-07-01 06:45 AX88772B_772A_760_772_178_LINUX2.6.32_Driver_v3.2.0_Source.tar.bz2
-rwxr--r-- 1 swen swen   699 2009-10-14 06:59 Makefile
-rw-r--r-- 1 swen swen    40 2010-07-01 06:46 modules.order
-rw-r--r-- 1 swen swen     0 2010-07-01 06:46 Module.symvers
-rwxr--r-- 1 swen swen  5465 2010-06-03 13:07 readme
swen@Caligula:~/Playyard/ASIX$

I wondering - you use an uncommon kernel?

if the make file reads:

CURRENT = $(shell uname -r) TARGET = asix OBJS = asix.o MDIR = drivers/net/usb KDIR = /lib/modules/$(CURRENT)/build SUBLEVEL= $(shell uname -r | cut -d '.' -f 3 | cut -d '.' -f 1 | cut -d '-' -f 1 | cut -d '_' -f 1)

ifneq (,$(filter $(SUBLEVEL),14 15 16 17 18 19 20 21))
MDIR = drivers/usb/net
endif

EXTRA_CFLAGS = -DEXPORT_SYMTAB
PWD = $(shell pwd)
DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR)

obj-m := $(TARGET).o

default:
make -C $(KDIR) SUBDIRS=$(PWD) modules

$(TARGET).o: $(OBJS)
$(LD) $(LD_RFLAG) -r -o $@ $(OBJS)

install:
su -c “cp -v $(TARGET).ko $(DEST) && /sbin/depmod -a”

clean:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean

.PHONY: modules clean

-include $(KDIR)/Rules.make

Wouldn’t changing the first line:

CURRENT = $(shell uname -r)
to
CURRENT = whatever_her_kernel_version_IS_named
then running [b]make && make install[/b] work?

if uname -r is getting it wrong

Perhaps the output of “ls -la /lib/modules/” would help too.

ls -l /lib/modules says:
total 12
drwxr-xr-x 3 root root 4096 June 8 20:56 .
drwxr-xr-x 8 root root 4096 June 26 20:56 …
drwxr-xr-x 4 root root 4096 June 10 20:56 2.6.33-zen2

Ah but mark I was wrong before, its not the “2.6.33-zen2” that’s right in both places.

OK, we got past make and make install.

Now I’m stuck at insmod saying that the device is busy.

The install-mode of the Makefile should load the modul into the kernel. May run a


lsmod | grep aix

device is busy

Typically this would indicate a previous version of the driver is loaded (?) and locked in by other drivers, OR, the device is already in use by a “different” driver … as a first step I might be inclined to recommend “depmod -a” followed by a reboot … (!)

Yah, we worked out I already had it.
That the AX8817X thing IS asix.
I feel really stupid lol,