Help: Compiling 8192cu driver from source

This forum is for topics dealing with problems with software specifically in the ARMv6h repo.

Help: Compiling 8192cu driver from source

Postby UserOP » Sun Nov 22, 2015 9:20 pm

Goal: Disable the LED on the Edimax EW-7811Un wifi adapter.
How? Modify and compile the 8192cu source code.
Issue: Compile errors.

System setup:
  • Raspberry Pi A+ running 4.1.12-2-ARCH ARM
  • Compiling on the Raspberry Pi

I am completely new to modifying and compiling kernel modules. I am eager to learn, please be gentle. Here's what I've tried and found so far.

Arch build system:
1. Installed Arch Build System, developer tools, synced:
$this->bbcode_second_pass_code('', '
pacman -S abs base-devel
abs
')
2. Found out the alarm repository requires different setup.
$this->bbcode_second_pass_code('', '
git clone git://github.com/archlinuxarm/PKGBUILDs.git
cp /var/abs/PKGBUILDs/alarm/dkms-8192cu ~/ -R
cd /home/alarm/dkms-8192cu
makepkg -g >> PKGBUILD
makepkg -S
')
3. At this point I see a src folder. It is empty. I check the PKBUILD file and see a source listing for https://www.dropbox.com/s/61askvmgh6iyh ... 911.tar.gz . The link 404's, which explains the empty src folder.

Downloading and compiling source from RealTek:
1. Download and unpack the Linux drivers from realtek, version 4.0.2_9000.
2. Modify the driver/Makefile:
$this->bbcode_second_pass_code('', '
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_BCM2708 = y

ifeq ($(CONFIG_PLATFORM_ARM_BCM2708), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE :=
KVER := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
endif
')
3. Run make with the following errors:
$this->bbcode_second_pass_code('', '
/home/alarm/8192cu/driver/hal/rtl8192c/rtl8192c_rf6052.c: In function 'PHY_RFShadowRefresh':
/home/alarm/8192cu/driver/hal/rtl8192c/rtl8192c_rf6052.c:1020:37: warning: iteration 63u invokes undefined behavior [-Waggressive-loop-optimizations]
RF_Shadow[eRFPath][Offset].Value = 0;
^
/home/alarm/8192cu/driver/hal/rtl8192c/rtl8192c_rf6052.c:1018:3: note: containing loop
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
^
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/rtl8192c_dm.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/rtl8192c_rxdesc.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/rtl8192c_cmd.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/usb/usb_halinit.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/usb/rtl8192cu_led.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/usb/rtl8192cu_xmit.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/usb/rtl8192cu_recv.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/usb/usb_ops_linux.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/rtl8192c_sreset.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/rtl8192c_xmit.o
CC [M] /home/alarm/8192cu/driver/hal/rtl8192c/usb/Hal8192CUHWImg.o
CC [M] /home/alarm/8192cu/driver/os_dep/osdep_service.o
CC [M] /home/alarm/8192cu/driver/os_dep/linux/os_intfs.o
/home/alarm/8192cu/driver/os_dep/linux/os_intfs.c:999:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.ndo_select_queue = rtw_select_queue,
^
/home/alarm/8192cu/driver/os_dep/linux/os_intfs.c:999:22: note: (near initialization for 'rtw_netdev_ops.ndo_select_queue')
CC [M] /home/alarm/8192cu/driver/os_dep/linux/usb_intf.o
CC [M] /home/alarm/8192cu/driver/os_dep/linux/usb_ops_linux.o
CC [M] /home/alarm/8192cu/driver/os_dep/linux/ioctl_linux.o
CC [M] /home/alarm/8192cu/driver/os_dep/linux/xmit_linux.o
CC [M] /home/alarm/8192cu/driver/os_dep/linux/mlme_linux.o
CC [M] /home/alarm/8192cu/driver/os_dep/linux/recv_linux.o
CC [M] /home/alarm/8192cu/driver/os_dep/linux/ioctl_cfg80211.o
CC [M] /home/alarm/8192cu/driver/os_dep/linux/rtw_android.o
/home/alarm/8192cu/driver/os_dep/linux/rtw_android.c: In function 'rtw_android_cmdstr_to_num':
/home/alarm/8192cu/driver/os_dep/linux/rtw_android.c:233:11: error: implicit declaration of function 'strnicmp' [-Werror=implicit-function-declaration]
if(0 == strnicmp(cmdstr , android_wifi_cmd_str[cmd_num], strlen(android_wifi_cmd_str[cmd_num])) )
^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/alarm/8192cu/driver/os_dep/linux/rtw_android.o' failed
make[2]: *** [/home/alarm/8192cu/driver/os_dep/linux/rtw_android.o] Error 1
Makefile:1384: recipe for target '_module_/home/alarm/8192cu/driver' failed
make[1]: *** [_module_/home/alarm/8192cu/driver] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.1.12-2-ARCH/build'
Makefile:593: recipe for target 'modules' failed
make: *** [modules] Error 2
')
UserOP
 
Posts: 1
Joined: Sun Nov 22, 2015 8:20 pm

Return to ARMv6h

Who is online

Users browsing this forum: No registered users and 19 guests