2011-07-21

[DM368][RTL8191] Porting RTL8191S to DM368/IPNC

The target is to install RTL8191SU, USB dongle, to davinci DM368.

Steps:
1. get official device driver from Realtek

2. in the software package, there are some documentation we would like to read first.
I suggest
HowTo support more VidPids.doc - check if VID/PID is included in code (os_intf/linux/usb_intf.c)
HowTo support new platform(including Android).doc - change Makefile 
In Makefile, I added a new platform CONFIG_PLATFORM_DM368 so the following lines were added
###
CONFIG_PLATFORM_DM368 = y
ifeq ($(CONFIG_PLATFORM_DM368), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE = arm_v5t_le-
KSRC := [YOUR KERNEL SRC]/ipnc/ti-davinci
endif
###
3. No problem after above change, we got 8712u.ko. However, when inserting module "insmod 8712u.ko", some error messages were prompted.


# insmod 8712u.ko
8712u: Unknown symbol strcasecmp
insmod: cannot insert `8712u.ko': Unknown symbol in module (-1): No such file or directory

It's apparently that the function "strcasecmp" is not included in the C library in DM368/IPNC. I confirmed it by checking include/linux/string.h (as well as asm/string.h). I decided not to modify lib but change rtl871x_ioctl_linux.c instead.

in rtl871x_ioctl_linux.c, there are couple lines of code using "strcasecmp". I use "strcmp" with small characters instead. for example

// if(0 == strcasecmp(ext,"RSSI")){
if(0 == strcmp(ext,"rssi")){

4. After all the change, the module can successfully be installed and "wlan0" can be find by "ifconfig -a"

1 comment:

  1. Thanks, I had the same proble porting that driver on Sigma smp86xx and I fix only changing strcasecmp to strcmp without change to small charaters.

    ReplyDelete