嵌入式 hi3518c平台上无线网卡rtl8188eu系列网卡移植小结

原创 2013年12月02日 14:57:07

首先修改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  := 3.0.8
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  install  our Wi-Fidriver:
1)  Using install.sh  script for  PC-Linux and  2)  Step by  step  manually.  The  former
targets  for end  users  who are  not familiar  with Linux  system, while  the later  for
engineers who want to portour Wi-Fi driver ontodifferentplatforms.
1.  Using install.sh Script for PC-Linux
For  driver compilation  and installation  in PC-Linux,  we provide  an  install.sh
script  to  do the  duties  automatically.  If  you want  to  use our  Wi-Fi solutions  to  access
network  on PC-Linux,  you can  just  run install.sh  script and  then control  Wi-Fi  with
utilities  such as  Network  Manager.  For  further information  about Wi-Fi  station  mode,
please refer to:
document/Quick_Start_Guide_for_Station_Mode.pdf.
If  you  want to  apply  our Wi-Fi  solutions on  other embedded  platforms,  you
should readand checkthe followingparagraphs.
2.  Decompress the driversource tarball
The  driver source  tar ball  is located  in the  driver folder  of  our software  package.
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.  Selecting Chip T ype with make_drv Script (forcompound release)
Our  driver source  release has  two types:  1) single  release, which  can build  out
driver  only for singlechiptype,and  2) compound  release, whichcan build out  drivers
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.  Compilation Settings in Makefile
4.1.  Adding orSelecting T arget Platform
The default target platform is PC-Linux, if you donot wanttocompile driver for
otherplatforms you canskip this section.
T o  add  or select  target platform  for compilation,  we provide  two sections  in
Makefile:  1) platform  selection section  and 2)  platform setting  section. First,  you
should look atthe platform selection section of Makefile:
The  platform selection  section consists  of entries  with ‘CONFIG_PLA TFORM_’
prefix.  Only one  entry  is allowed  to  be set  with value  ‘y’  and  others with  ‘n’.  The
CONFIG_PLATFORM_I386_PC                  y
CONFIG_PLA TFORM_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
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’  is selectedbydefault.
We  can  select an  existing entry  or  add  new  entry for  your target  platform.  For
example, toadd andselect a new entry , ‘CONFIG_PLATFORM_NEW’:
Second, you shouldcreateand/or modify thecorresponding  entry inside platform
settingsection. For example, addingthe followingentry  in platform setting sectionfor
‘CONFIG_PLA TFORM_NEW’  we justadd:
4.2.  PlatformSetting Section in Detail
EXTRA_CFLAGS
The  EXTRA_CFLAGS is  usually used  to  carry some  additional settings  at
compilation time throughmacro definitions.
Macro  Effect
CONFIG_BIG_ENDIAN  Define some internal datastructure as big endian.
CONFIG_LITTLE_ENDIAN  Define some internal datastructure as little endian.
CONFIG_MINIMAL_MEMORY_USAGE  For better  performance in  powerful platform,  we
allocate  large physical  continuous memory  as  TX/RX
IO  buffers. In  some embedded  platform, there  is
chance  to fail  to allocate  memory . Define  this  macroto
prevent this situation.
CONFIG_PLA TFORM_ANDROID  Older Android  kernel do  not  has CONFIG_ANDROID
defined.  Define this  macro  to force  the  Android
corresponding  code inside  our driver  to  be compiled.
For  newer Android  kernel, it  has  no need  to define  this
macro,  otherwise, warning  message about  redefinition
will show up
ifeq ($(CONFIG_PLA TFORM_NEW), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE :=/opt/new/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
KSRC := /opt /new/kernel
endif
CONFIG_PLATFORM_I386_PC          n
CONFIG_PLATFORM_NEW    y
4
ARCH
TheARCH is used to specify the architecture of the target platformCPU, such as:
arm, mips, i386, etc.
CROSS_COMPILE
The  CROSS_COMPILE is  used  to specify  the toolchain  prefix used  for  driver
compilation.
KSRC
The  KSRC  is used  to specify  the path  of kernel  source used  for  driver
compilation
MODULE_NAME
Differentmodule name is assigned to drivers for differentchips:
If you  wantto change  the modulename,  you can set value of MODULE_NAME
here. For example, settingmodule name as ‘wlan’:
4.3.  Other Compilation Settings
We still have some compilationsettings couldbe applied. Forsettings andfurther
informationaboutpowersaving mode, please refer to:
document/HowT o_enable_the_power_saving_functionality .pdf.
If  you  know what  the macro  means in  the autoconf  file, you  could modify  the
Chip type  Default module name
RTL8192CU-series  8192cu
RTL8192CE-series  8192ce
RTL8192DU-series  8192du
RTL8192DE-series  8192de
RTL8723AS-series  8723as
RTL8723AU-series  8723au
RTL8189ES-series  8189es
RTL8188EU-series  8188eu
ifeq ($(CONFIG_PLA TFORM_NEW), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE :=/opt/new/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
KSRC := /opt /new/kernel
MODULE_NAME := wlan
endif
5
configuration  by yourself.  See the  following table  for  the autoconf  file you  should
modifyfor a specific chip type:
5.  Integrating DriverSource into Linux Kernel Tree
This paragraph is for integrating our driver source into Linuxkernel tree and
buildingsystem. If you havenoneedtodo this, simplyskip thisparagraph.
For compoundrelease driver source, make_drvshould be execute toselect chip
typefor the driver source. Please refer to:
“3. SelectingChip T ypewith make_drvScript (for compoundrelease)”.
For  different chip  types, we  have different  suggestions for    and
touse for the integration process:
Assuming  the driver  source is  for RTL8192CU-series,  to integrate  driver  source
into kernel buildingsystem, go through the followingsteps:
1).  Copy  the driver  source folder  into drivers/net/wireless/  and rename  it  as
, rtl8192cu.
Chip type  Autoconf file to modif y
RTL8192CU-series autoconf_rtl8192c_usb_linux.h
RTL8192CE-series autoconf_rtl8192c_pci_linux.h
RTL8192DU-series autoconf_rtl8192d_usb_linux.h
RTL8192DE-series autoconf_rtl8192d_pci_linux.h
RTL8723AS-series autoconf_rtl8723a_sdio_linux.h
RTL8723AU-series autoconf_rtl8723a_usb_linux.h
RTL8189ES-series autoconf_rtl8189e_sdio_linux.h
RTL8188EU-series autoconf_rtl8188e_usb_linux.h
Chip type   
RTL8192CU-series CONFIG_RTL8192CU  rtl8192cu
RTL8192CE-series CONFIG_RTL8192CE  rtl8192du
RTL8192DU-series CONFIG_RTL8192DU  rtl8192du
RTL8192DE-series CONFIG_RTL8192DE  rtl8192de
RTL8723AS-series CONFIG_RTL8723AS  rtl8723as
RTL8723AU-series CONFIG_RTL8723AU  rtl8723au
RTL8189ES-series CONFIG_RTL8189ES  rtl8189es
RTL8188EU-series CONFIG_RTL8188EU  rtl8188eu
6
2).  Add  the following  line into drivers/net/wireless/Makefile, CONFIG_RTL8192CU
is for , rtl8192cuis for :
3).  Add  the following  line into drivers/net/wireless/Kconfig, rtl8192cu  is  for
:
4).  Config  kernel, for example,with  ‘make menuconfig’ command  to select ‘y’  or‘m’
for our driver .
5).  Now, you canbuild kernel with ‘make’command.
6.  Compiling Driver
6.1.  Compiling Driverin DriverSource Folder
For compilingdriver inthe originaldriver source folder , simply cdinto the
driver source folder andstart builddriver with‘make’  command.
If everything goes well, it will produce a MODULE_NAME.ko file.The
MODULE_NAME is specifiedinMakefile. Please refer to:
“MODULE_NAME” in “4.2. Platform SettingSection in Detail”.
6.2.  Compiling Driver under Kernel Tree
For compilingdriver under kerneltree, please refer to:
“5. IntegratingDriver Source intoLinux Kernel Tree”.
7.  DriverInstallation
If you  have compiled Wi-Fi driveras  kernel module and produced a .kofile  such
as 8192cu.ko, you should insert driver module with‘insmod’  command:
As for driver compiledin kernel, it has no needtodo ‘insmod’command

相关文章推荐

嵌入式 hi3518c平台上无线网卡rtl8188eu系列网卡移植

嵌入式 hi3518c平台上无线网卡rtl8188eu系列网卡移植   首先修改driver下驱动文件中的Makefile文件: 添加自己的平台,我的平台是hi3518c,具体操作如下:...

hi3518e移植wifi模块注意事项

最近在海思平台上移植mt7601和5370两款wif模块,加载驱动和启用网络设备时都发现循环打印一个RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqT...

Hi3518ev200 mt7601wifi驱动笔记

Hi3518EV100 切HI3518EV200后,wifi在ap模式下报如下错误. V100的内核版本linux3.0.y ,V200为linux3.4.5. 一是版本不对,而是缺少接口支持E...

wifi(rtl8188eu)移植及调试笔记

/* * Dave/nova_wangwenbo@126.com */wifi移植及调试笔记一.rtl8188eu1.修改设备树: 添加wifi ap电源控制引脚WIFI,power...

rtl8188etv无线网卡驱动移植

hi3520d , hi3518e 等arm嵌入式系统驱动RTL8188ETV无线网卡
  • imlsq
  • imlsq
  • 2017年06月02日 15:59
  • 1228

libtiff中的tag标签含义

TIFFTAG_ARTIST 1 char** TIFFTAG_BADFAXLINES 1 uint32*TIFFTAG_BITSPERSAMPLE 1 uint16* 每个像素点位数TIFFTAG_...
  • Augusdi
  • Augusdi
  • 2013年08月27日 15:24
  • 2513

目标检测之adaboost+harr分类器

浅析人脸检测之Haar分类器方法 一、Haar分类器的前世今生        人脸检测属于计算机视觉的范畴,早期人们的主要研究方向是人脸识别,即根据人脸来识别人物的身份,后来在复杂背景下的...

rtl8188eu无线网卡驱动移植

基于3.14内核rtl8188eu驱动移植 时间:2016-01-08作者:华清远见 最近的项目上要用到3.14的内核,我们需要一个可以使用wifi连接外网的文件系统,我们的w...

linux(debian)安装USB无线网卡(tp-link TL-WN725N rtl8188eu )

1: 台式机家里面不想再走线了。 于是去某东买了个USB无线网卡。tp的WN725N USB,非常小, 和罗技的优联接收器差不多大。 2: 驱动能自己识别是不指望了,既然是usb网卡,插入USB...
  • rainysia
  • rainysia
  • 2014年01月01日 00:36
  • 57441

rtl8188eu_linux无线网卡驱动

  • 2014年11月09日 19:10
  • 1.24MB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:嵌入式 hi3518c平台上无线网卡rtl8188eu系列网卡移植小结
举报原因:
原因补充:

(最多只允许输入30个字)