8192cu.ko module

Started by venatici, October 16, 2012, 05:23:41 PM

Previous topic - Next topic

venatici

Hi I was compiled and used the 8192cu.ko module to my previous arch linux image without tvout console whitch uname was 2.6.35-6-ARCH+.
I downloaded new image with tvout console and compiled again the 8192cu.ko 3 times with the same problem that modprobe says

8192cu: disagrees about version of symbol module_layout
ERROR: could not insert '8192cu': Exec format error

what is different now

Thanks

thomas41546

Are you sure you are compiling against the right kernel sources?

venatici

No i am not sure at all.
I use rootfs latest from olimex wordpress url: https://docs.google.com/open?id=0B-bAEPML8fwlNDFUYkx0ZkNWV3c

I  compiled with kernel26-headers 2.6.35.3-6- that i had from previous arch installation, module showed the same error.
I  compiled with kernel26-headers 2.6.35.3-8- from mirror.archlinuxarm.org , module showed the same error.

I looked in the bash memory and i found url from kyril's site that has the rootfs and newer kernel26-headers 2.6.35.3-6- , with the same error.

So i ask which is the correct sources file , or maybe there is a problem on modules symbols file on this rootfs.

Thanks


Bobi

#3
Hey, can somebody help on this topic?

I think I have the same problem. I followed these instructions so far: https://www.olimex.com/Products/OLinuXino/iMX233/_resources/Arch_Linux_wifi_setup.txt and I have the kernel(Linux-alarm-2.6.35-6-ARCH image) which I found from Kean's blog here: http://dev.moorescloud.com/2012/11/02/getting-your-microsd-card-boot-image-ready/

I have a few questions:
- How do I tell make to compile to the right kernel sources?
I guess it is this line in the Makefile:
KSRC ?= /usr/src/linux-2.6.35-8-ARCH+

- Do you have any idea why I have the sources /usr/src/linux-2.6.35-8-ARCH+ and at the same time I have /lib/modules/2.6.35-6-ARCH+ and how can I fix this?

- Do you think this is causing the problem - because the driver was compiled against the 2.6.35-8 sources and the kernel is actually 2.6.35-6

Thanks!

Fadil Berisha

Quote from: Bobi on November 12, 2012, 02:54:50 PM

I have a few questions:
- How do I tell make to compile to the right kernel sources?
Let discuss based on code from instructions:
---------------------------------------------------------
ifeq ($(CONFIG_PLATFORM_ARM_iMX233), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE := /usr/bin/
KVER  := KVER  := 2.6.35-6-ARCH+
KSRC ?= /usr/src/linux-2.6.35-6-ARCH+
MODDESTDIR := /usr/lib/modules/2.6.35-6-ARCH+/kernel/drivers/net/wireless/rtl818x
endif
---------------------------------------------------------

Get info for your running kernel- run command:
uname -r
write answer on variable KVER
KVER := ___________

(not KVER := KVER :=___________)

On line KSRC write linux sources. In your case  /usr/src/linux-2.6.35-8-ARCH+
I will suggest to remove line MODDESTDIR since make will install driver in right place /usr/lib/modules/<your_kernele_version>
So after those corrections do:

make
make install

depmod -a
insmod 8192cu.ko

After this continue with instructions bellow this line
Verify that the driver has been installed:
Hope this help.

Fadil Berisha

Bobi

Hi Fadil,

Thanks for your reply and advices. I tried your advices but with no luck so far. Do you have the same driver working on your system? Can you share what are the settings you have?

Thanks for explaining in more details the changes to the Makefile, here is what I have now:
--------------------------------
ifeq ($(CONFIG_PLATFORM_ARM_iMX233), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE := /usr/bin/
KVER := 2.6.35-6-ARCH+
KSRC ?= /usr/src/linux-2.6.35-8-ARCH+
endif
--------------------------------

It looks like being ok, make goes without any problems. However when I reach the step insmod 8192cu.ko it gives me the same error:
8192cu: disagrees about version of symbol module_layout
Error: could not insert module 8192cu.ko: Invalid module format

Thanks!
Bobi

Fadil Berisha

Quote from: Bobi on November 13, 2012, 12:36:56 AM
Hi Fadil,

Do you have the same driver working on your system? Can you share what are the settings you have?


Hi Bobi,

I do have driver working with olinuxino-mini and 8192 on maxi as USB dongle. I compiled driver as integral part of kernel 3.7-rc4, not as module.
Instructions are inside driver sources (downloaded from Realtek web site) as pdf file. Since driver 8188cu require CONFIG_WIRELESS_EXT, you need to select also to build driver for prism chipset as host AP (this selection activate CONFIG_WIRELESS_EXT).

Fadil Berisha

idragoev

Hi Fadil
we managed to compile the driver and now we have working WiFi module ;-)

However we currently make all this manually - after each restart we do:
1) insmod 8192cu.ko
2) wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
3) dhcpcd wlan0

The questions are:
1) Where do we have to add these commands in order to be executed on boot? - /etc/rc.local may be?
2) Is it possible to execute these commands automatically each time the WiFi dongle is plugged in the USB?
3) If the dongle is removed, should we unload the modules and if yes - how?

Thanks in advance,
Ivan

Fadil Berisha

Hi Ivan,

Quote from: idragoev on November 16, 2012, 09:16:56 AM

1) insmod 8192cu.ko
2) wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
3) dhcpcd wlan0


1) You should add 8192cu to /etc/modules
2) Configure your network /etc/network/interfaces adding dhcp for wlan0 and point your wpa_supplicant.conf:
   auto wlan0
   iface wlan0 inet dhcp
   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Fadil Berisha

   

idragoev

Hi Fadil,
thanks for the reply.

I have one more question: the 8192cu.ko module should be copied where exactly? Should I copy it to /usr/lib/modiles/?

Thanks
Ivan

Fadil Berisha

Quote from: idragoev on November 19, 2012, 02:30:19 PM

I have one more question: the 8192cu.ko module should be copied where exactly?

Since you can activate module with:

insmod 8192cu.ko

that mean modules are already copied on right place at /lib/modules/<kernel-release>
Proper method to copy modules (the same machine they are compiled on) is to use automatic module install command:

make modules_install

If you are doing cross compile, use env variable INSTALL_MOD_PATH to point where is path /lib/modules

Fadil Berisha


idragoev

Hi,
we have beautifully working WiFi now.
there is a blog post for the whole process: http://www.agilart.com/blog/the-olinuxino-micro-wifi-sd-cards-farbric

Thanks to all ;-)
Ivan