Monday, June 10, 2013

Belkin F7D1101 Wireless USB on android Cubieboard

Preconfigured Android Livesuit image from Cubieboard website only support Wireless Usb with RTL8192cu and RTL8188eu chipset. For anyone that have wireless USB with chipset 8712u (8188su) such as Belkin F7D1101 (list of similar device) must add the driver manually. Here you can find how to compile the driver and configure it in android cubieboard.


You need the following files to be able to compile the driver:
  1. Android TV BOX Allwinner source (download from here).
  2. RTL8712u driver (download from realtek website).


Extract the android source, in this example we will extract to /mnt/
mkdir /mnt/
cd /mnt/
tar zxvf cubieboard_opentv.tar.gz
cd cubieboard-tv-sdk/kernel/allwinner/common/
Edit Makefile, and add '+' on the EXTRAVERSION string
Copy default config file from arch/arm/configs/cubieboard_defconfig and do make prepare and make module_prepare.
mkdir /mnt/
cp arch/arm/configs/cubieboard_defconfig .config
export ARCH=arm
export CROSS_COMPILE="/mnt/cubieboard-tv-sdk/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"
make prepare
make module_prepare
Extract driver from realtek website, and go to driver folder and extract again the file in that directory.
Edit Makefile in the extracted file directory and do these steps:
  1. Change to n for CONFIG_PLATFORM_I386_PC value.
  2. On the end CONFIG_PLATFORM, add the following line CONFIG_PLATFORM_CB = y
  3. Add the following code before ifneq ($(KERNELRELEASE),) line
    ifeq ($(CONFIG_PLATFORM_CB), y)
    ARCH := arm
    CROSS_COMPILE := /mnt/cubieboard-tv-sdk/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
    KSRC := /mnt/cubieboard-tv-sdk/kernel/allwinner/common
  4. After that, in the same terminal, you can execute make.
When compilation finish, you will get 8712u.ko file. If you don't want to compile yourself, just grab the file here. Copy this file to your android using adb in /system/lib/modules/ (for cubieboard android image, will be different for another image)


To activate the driver, on TTL console or terminal application, type insmod /system/lib/modules/8712u.ko and enter. After that, activate the wifi on the setting. You should be able to search network and connect to access point.

Enable the driver on boot

To enable the driver on boot, you must follow instruction on how to unpack and pack livesuit image, from this site, follow instruction on how to unpack the boot partition and edit init.sun4i.rc file and add insmod /system/lib/modules/8712u.ko. Repack  the image and flash to your board.


No comments: