compile drivers problems with kernel 2.4.26

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4745

bruce0525

23-04-2008 06:04:47

now I am importing drivers download to my embedded platform.
linux kernel version 2.4.26,
toolchain arm-elf-gcc,arm-elf-ld,provided by original arm platform.
and I use the arm-elf toolchain ,do some change in the Makefile,and change the kernel_src directory to my own linux directory, but when I use the drivers RT73_Linux_STA_Drv1.0.4.0.tar.gz, when make,print so many errors like /mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/build_arm/linux-2.4.26-em86xx/include/linux/coda.h259 parse error before `u_quad_t'
/mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/build_arm/linux-2.4.26-em86xx/include/linux/coda.h259 warning no semicolon at end of struct or union
/mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/build_arm/linux-2.4.26-em86xx/include/linux/coda.h267 parse error before `va_bytes'
....
In file included from rt_config.h198,
from rtmp_main.c40
rtmp_type.h78 parse error before `UINT16'
rtmp_type.h78 stray '\' in program
rtmp_type.h79 stray '\' in program
rtmp_type.h83 stray '\' in program
rtmp_type.h84 stray '\' in program
....
rtmp.h1673 warning type defaults to `int' in declaration of `RTMP_ADAPTER'
rtmp.h1673 warning type defaults to `int' in declaration of `PRTMP_ADAPTER'
rtmp.h1673 warning data definition has no type or storage class
rtmp.h1704 parse error before `pAd'
rtmp.h1705 warning function declaration isn't a prototype
rtmp.h1708 parse error before`pAd'

when use 2008_0117_RT73_Linux_STA_Drv1.1.0.0.tar.bz2
also have similar error
em86xx/include/linux/coda.h259 parse error before `u_quad_t'
/mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/build_arm/linux-2.4.26-em86xx/include/linux/coda.h259 warning no semicolon at end of struct or union
/mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/build_arm/linux-2.4.26-em86xx/include/linux/coda.h267 parse error before `va_bytes'

and i use the latest CVS rt73-cvs-2008042203,and do some revise to the code and makefile,it can make module rt73.o,but it can't work on 2.4.26,cos no firmware support
Using rt73.o
insmod unresolved symbol request_firmware
insmod unresolved symbol release_firmware

it seems something wrong with the match between kernel version and drivers,or the toolchain.
would somebody pls give me some suggestion.

bruce0525

23-04-2008 06:18:44

My changed config.mk
LINUX_SRC=/mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/build_arm/linux-2.4.26-em86xx
TARGET_MODDIR=/mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/build_arm/root/lib/modules/2.4.26-em86xx-uc0-sigma


My changed Makefile
######################################################################
# Module Name Makefile
# Abstract Makefile for rt73 linux driver on kernel series 2.4
######################################################################


#CC = cc
CC = /mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/toolchain/bin/arm-elf-gcc
LD = /mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/toolchain/bin/arm-elf-ld
LINUX_SRC =/mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/build_arm/linux-2.4.26-em86xx

include ./config.mk

WFLAGS = -Wall -Wstrict-prototypes -Wno-trigraphs
CFLAGS = -D__KERNEL__ -I$(LINUX_SRC)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h

## Comment/uncomment the following line to enable/disable debugging
#CFLAGS += -DDBG

CFLAGS += $(WFLAGS)

OBJ = rt73.o

rt73.o rtmp_main.o mlme.o connect.o rtusb_bulk.o rtusb_io.o sync.o assoc.o auth.o auth_rsp.o rtusb_data.o rtmp_init.o sanity.o rtmp_wep.o rtmp_info.o rtmp_tkip.o wpa.o md5.o
$(LD) -r $^ -o $@

MODDIR=/mnt/linux/lhh-sigma/bak_armutils_2.5.138.0/armutils_2.5.138.0/build_arm/root/lib/modules/2.4.26-em86xx-uc0-sigma

## NDDIR/ifcfg-rausb0
ND_CONF=/etc/sysconfig/network-scripts/ifcfg-rausb0

ifdef NDDIR
NDDIR = $(NDDIR)
else
NDDIR = /etc/sysconfig/network-scripts
endif
no change others.

bruce0525

23-04-2008 10:28:48

now i use rt73-cvs-2008042203,it compiled with no error.and make rt73.o modules.
but now have another question that when i insmod rt73.o
Using /mnt/rt73.o
rt73 init
usb.c registered new driver rt73

seems no error,then plug my TL-WN321G+ to usb
hub.c new USB device 0002.2-4, assigned address 2
rt73 idVendor = 0x148f, idProduct = 0x2573
call_usermodehelper return -2
rt73 Failed to request_firmware. Check your firmware file location
rt73 Failed to load Firmware.
usb.c USB device 2 (vend/prod 0x148f/0x2573) is not claimed by any active driver.

i have put the rt73.bin to /lib/firmwre, why still failed to request firmware.


when the second time i plug in ,the message is
hub.c new USB device 0002.2-4, assigned address 3
rt73 idVendor = 0x148f, idProduct = 0x2573
rt73 register_netdev failed err=-17
usb.c USB device 3 (vend/prod 0x148f/0x2573) is not claimed by any active driver.

don't tell me about firmware.i don't whether find the rt73.bin or not.

Vern

23-04-2008 18:30:20

Hi bruce0525,

If you can, compile with debug enabled, then do modprobe with the parameter debug=15 included. Repeat the steps outlined in your post, and attach a gzipped copy of /var/log/debug to a post here, and I'll look at it.

Thanks,

bruce0525

24-04-2008 10:18:52

hi vern.

I don't know why tell me error can't find modules when use modprobe on my 2.4.26 kernel platform
i can use insmod with debug=15,but no message generated on the location you told me.
now I use another drivers version with no firmware loading,and it can find the device correctly.and register correctly to net devicerausb0
get the right MAC address.
and also can scan ,get the AP information.
can manaully setup IP,
but can't dhcp me an IP yet.
I see the IP information Encryption keyoff
so maybe is only for register users ,need to pay for it. .
and in windows xp system,it also can't get IP from dhcp,and can't get access to internet.
so I think the drivers is ok now. and just need to know how to use it familiarly.

occasionally it will print kernel BUG at host/ehci-q.c1047!
but it seems don't affect my drivers work.
I don't know if I should care this imformation.

Vern

25-04-2008 17:48:56

now I use another drivers version with no firmware loading ...[/quote29g2d7rd]Uh, oh. we have[quote29g2d7rd]dVendor = 0x148f, idProduct = 0x2573[/quote29g2d7rd]in both the 2570 and rt73 hardware lists. Who makes the TL-WN321G+? Could you do a lausb -v and attach a gzipped copy of the output to a posting here?

From your post, it looks like the rt2570 driver is the one that gets the AP address and scans. Is it?

Thanks,

chinbjut

21-05-2008 09:20:49

rtmp_type.h78 parse error before `UINT16'
rtmp_type.h78 stray '\' in program
rtmp_type.h79 stray '\' in program
rtmp_type.h83 stray '\' in program
rtmp_type.h84 stray '\' in program
....

with the command "dos2unix "..
you can deal with it