首先修改driver下驱动文件中的Makefile文件:
添加自己的平台,我的平台是hi3518c,具体操作如下:
#add the new platform hi3518c alter by kj
CONFIG_PLATFORM_HI_3518C = y
添加平台的编译选项:
#add the compile option for hi_3518c alter by kj
ifeq ($(CONFIG_PLATFORM_HI_3518C), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN-DCONFIG_MINIMAL_MEMORY_USAGE
ARCH := arm
CROSS_COMPILE := arm-hisiv100nptl-linux-
KVER
KSRC :=/home/kongjun/mywork/develop_kj/Hi3518_SDK_V1.0.3.0/osdrv/kernel/linux-3.0.y
endif
注意:
CONFIG_POWER_SAVING =n(省电模式最好关闭)
下面是官方文档的编译说明:
Introduction
Inthis document, we introduce two ways to compileand
1)
targets
engineers who want to portour Wi-Fi driver ontodifferentplatforms.
1.
For
script
network
utilities
please refer to:
document/Quick_Start_Guide_for_Station_Mode.pdf.
If
should readand checkthe followingparagraphs.
2.
The
For example, to decompressrtl8188C_8192C_8192D_usb_linux_v3.3.0_2920.20111123.tar .gz :
root@driver/# tar zxvfrtl8188C_8192C_8192D_usb_linux_v3.3.0_2920.20111123.tar .gz
2
3.
Our
driver
for multiple chiptypes separately .
For compoundrelease driver , you will see make_drvscriptafter youdecompress
the driver tar ball locatedin driver folder . Before compilingdriver source, executing
the make_drv toselect the target chip type to compile. Forexample:
4.
4.1.
The default target platform is PC-Linux, if you donot wanttocompile driver for
otherplatforms you canskip this section.
T o
Makefile:
should look atthe platform selection section of Makefile:
The
prefix.
CONFIG_PLATFORM_I386_PC
CONFIG_PLA TFORM_ANDROID_X86
CONFIG_PLATFORM_ARM_S3C2K4
CONFIG_PLATFORM_ARM_PXA2XX
CONFIG_PLATFORM_ARM_S3C6K4
CONFIG_PLATFORM_MIPS_RMI
CONFIG_PLATFORM_RTD2880B
CONFIG_PLATFORM_MIPS_AR9132
CONFIG_PLATFORM_MT53XX
CONFIG_PLATFORM_RTK_DMP
root@rtl8188C_8192C_8192D_usb_linux_v3.3.0_2920.20111123#./make_drv
Please select chip type(1/2):
1) RTL8192cu
2) RTL8192du
#?1
You have selected RTL8192cu
3
‘CONFIG_PLA TFORM_I386_PC’
We