8192.ko Module Format Error on Debian

I am using the debian wheezy image form here with Robert Nelson’s kernel
http://www.armhf.com/index.php/boards/beaglebone-black/#wheezy

I am trying to get my little edimax usb wifi to work. So far i have determined that the modules that come with debian right now do not work with my dongle. So I built my own from source using the following process on the beaglebone black itself.

Get headers from the kernel dev’s site. These match the kernel at the current time

wget http://rcn-ee.net/deb/wheezy-armhf/v3.8.13-bone20/linux-headers-3.8.13-bone20_1.0wheezy_armhf.deb

dpkg -i linux-headers-3.8.13-bone20_1.0wheezy_armhf.deb

Still need more source. Need to get mainline source and then patch it

wget https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.8.13.tar.bz2

wget http://rcn-ee.net/deb/wheezy-armhf/v3.8.13-bone20/patch-3.8.13-bone20.diff.gz

wget http://rcn-ee.net/deb/wheezy-armhf/v3.8.13-bone20/defconfig

Uncompress source & wait

tar xvjf linux-3.8.13.tar.bz2

Cd /linux-3.8.13

Apply Patch. If patch doesn’t exist then apt-get install patch

zcat …/patch-3.8.13-bone20.diff.gz | patch -p1

copy defconfig:

cp …/defconfig .config

Put it in the correct directory

sudo mv linux-3.8.13 /usr/src/

cd /usr/src/linux-3.8.13

sudo make oldconfig

sudo make prepare

sudo make modules_prepare

Go back to driver source folder

Cd ~/wifi/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105

follow instructions on http://bonenotes.tumblr.com/ to patch source

wget [https://raw.github.com/cmicali/rtl8192cu_beaglebone/master/util/rtl-8192-beaglebone-linux-3.8.patch](https://raw.github.com/cmicali/rtl8192cu_beaglebone/master/util/rtl-8192-beaglebone-linux-3.8.patch)
patch -p1 < rtl-8192-beaglebone-linux-3.8.patch

make KSRC=/usr/src/linux-3.8.13/ CROSS_COMPILE= ARCH=arm

sudo insmod 8192cu.ko

Error: could not insert module 8192cu.ko: Invalid module format

some other info

$ lsmod
Module Size Used by
c_can_platform 4645 0
c_can 9223 1 c_can_platform
can_dev 8944 1 c_can

dmesg

[ 1749.507523] 8192cu: no symbol version for module_layout

$ uname -r
3.8.13-bone20

ls -l /lib/firmware/rtlwifi/rtl8712u.bin
-rw-r–r-- 1 root root 122328 Jan 6 2013 /lib/firmware/rtlwifi/rtl8712u.bin

$ lsusb
Bus 001 Device 002: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Only error i saw during the process

make KSRC=/usr/src/linux-3.8.13/ CROSS_COMPILE= ARCH=arm
make ARCH=arm CROSS_COMPILE= -C /usr/src/linux-3.8.13/ M=/home/debian/wifi/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105 modules
make[1]: Entering directory `/usr/src/linux-3.8.13’

WARNING: Symbol version dump /usr/src/linux-3.8.13/Module.symvers
is missing; modules will have no dependencies and modversions.

some searching on the internet indicates that this is the result of the incorrect source version for the kernel that is being run. I’m a little lost on how that would happen.

Just use gkanidl's script to setup the correct source tree:

wget https://raw.github.com/gkaindl/beaglebone-ubuntu-scripts/master/bb-get-rcn-kernel-source.sh
chmod +x bb-get-rcn-kernel-source.sh
./bb-get-rcn-kernel-source.sh

then patch the src, build, etc..

Regards,

that solved the issue i was having. Thank you and gkanidl for the great script and kernel.

for those who are attempting to do the same thing. here are what the complete instructions should be. It is worth noting that this module works with the version of hostapd that is included in the zip from realtek. I’ll post some instructions later.

To get the Edimax EW-7811Un usb wifi adapter to work on debian with Robert Nelson’s kernel

Get kernel source, headers and patch using script

wget https://raw.github.com/gkaindl/beaglebone-ubuntu-scripts/master/bb-get-rcn-kernel-source.sh

chmod +x bb-get-rcn-kernel-source.sh

./bb-get-rcn-kernel-source.sh

Get wifi driver source and compile

Following steps from http://bonenotes.tumblr.com/

Download the Unix/Linux driver from the Realtek web site - It will be called something like RTL8192xC_USB_linux_v3.4.4_4749.20121105.zip

Unzip the file and then unpack the driver source which is driver/tl8188C_8192C_usb_linux_v3.4.4_4749.20121105.tar.gz in the zip file

cp rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105.tar.gz ~/

tar xvfz rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105.tar.gz

cd rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105

Download this patch to add BB config and to fix building on linux 3.8 into the driver directory and apply it

wget https://raw.github.com/cmicali/rtl8192cu_beaglebone/master/util/rtl-8192-beaglebone-linux-3.8.patch

patch -p1 < rtl-8192-beaglebone-linux-3.8.patch

Build the driver

make CROSS_COMPILE=

Install the driver, as root

make install

edit the file “/etc/modprobe.d/blacklist.conf” and add the line so that the old module is not used.

blacklist rtl8192cu

Load module, as root

modprobe 8192cu

The module should load itself at reboot

It’s awesome that you got it to work .I tried to do the same to rtl8192eu and sadly the patch by cmicali does not work. Is there any chance to get it to work.Or should I ask cmicali for instructions on patching.Thank you.