Customers can port this Realtek WiFi linux driver to specific platform for their products including Android. This document will describe the way to let this driver to support the specific platform with Linux operation system. Basically, the driver Makefile file is the only file we have to modify.
First of all, you can look at the following section of Makefile file:
CONFIG_PLATFORM_I386_PC = y
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ARM_S3C2K4 = n
CONFIG_PLATFORM_ARM_PXA2XX = n
CONFIG_PLATFORM_ARM_S3C6K4 = n
CONFIG_PLATFORM_MIPS_RMI = n
CONFIG_PLATFORM_RTD2880B = n
CONFIG_PLATFORM_MIPS_AR9132 = n
CONFIG_PLATFORM_MT53XX = n
CONFIG_PLATFORM_RTK_DMP = n
If the platform which you want to support is already in the list, just modify the CONFIG_PLATFORM_I386_PC to n and modify your platform item to y.
Ex:
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ANDROID_X86 = y
After this modification, it is necessary to check the corresponding section and content. You may change the compiler flag, arch, tool chain…etc.
※ For Android platform, We need to add CONFIG_PLATFORM_ANDROID into EXTRA_CFLAGS
ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
ARCH := $(SUBARCH)
CROSS_COMPILE := i686-unknown-linux-gnu-
KSRC := /usr/src/froyo-x86/out/target/product/eeepc/obj/kernel
endif
If the platform which you want to support is NOT in the list, you can add your own CONFIG Name and CONFIG section.
CONFIG_PLATFORM_NEW_SUPP = y
ifeq ($(CONFIG_PLATFORM_NEW_SUPP), y)
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
ARCH:=
CROSS_COMPILE:=
KVER:=
KSRC:=
After adding your own platform CONFIG Name and CONFIG section, this linux driver has to be compiled again and it will support your new platform.
mb7375