MY-IMX6开发指导手册 WIFI(RTL8188EUS)

来自明远智睿的wiki
Admin讨论 | 贡献2018年6月11日 (一) 15:53的版本

跳转至: 导航搜索

文档说明(file instruction)


系统环境说明(system environment instruction)

  • 编译主机CPU架构:64位

compife CPU architecture of host:64 bit

  • 编译主机系统:Linux

compife host system:Linux

  • Linux 发行版:Ubuntu

Linux release version:Ubuntu

  • Ubuntu版本类型:服务器版

Ubuntu version type:server version

  • Ubuntu版本号:12.04.5

Ubuntu version no.:12.04.5

  • Ubuntu系统类型:x86-64

Ubuntu system type:x86-64

操作说明(operation instruction)

1)文档中以“$”开头的行,其后是Linux命令。
line begin with “$”in the file,follow it by Linux command。
2)文档中所有的Linux命令建议手动输入到Linux主机执行(直接复制、粘贴到Linux主机上执行,可能会执行失败)。
it is recommended to enter manually all Linux commands in the file to Linux host for execution(copying,pasting directly to Linux host may cause failure in execution)。
3)文档中的Linux执行命令,如果空格后的下一个字符是“-”的(如:sudo apt-get –y install之类的),请手动输入到Linux主机执行(直接复制、粘贴到Linux主机上执行,通常会执行失败)。
if space is followed by “-”in Linux execution commands in the file(example:sudo apt-get –y install such as),please enter manually to Linux host for execution(copying,pasting directly to Linux host may cause failure in execution)。
4)文档中所有一行没写完的Linux命令请手动输入到Linux主机执行,(因为复制、粘贴命令不能包含类似“换行符”之类的特殊字符)。
unfinished Linux command in any line in the file,please enter manually to Linux host for execution,(because copying,pasting can't contain special charater such as“line break”)。
5)按文档输入并执行Linux命令时注意观察命令的执行结果与文档图片中的是否一致,以确认命令是否输入有误及是否执行失败。
pay attention to whether the execution result is consistent with the document image when you enter and execute the command. to confirm whether the command was entered incorrectly or failed to execute.

其它说明(other instruction)

截图说明(screenshots instruction)

为使视图看起来简洁整齐,截图中的命令提示符统一使用myzr$。
to make the view look neat and tidy , the command prompt in the screenshot should used uniformly with myzr$。

图片中的Linux命令(Linux command in image)

在文档的图片中观察“myzr$”开头的行可以直观的看到输入的Linux命令。
In the image of the document, you can see the input Linux command visually from the lines that start with “myzr$”。

准备源码(prepare source code)


下载源码包(download source code package)

在网盘下载 RTL8188EUS_RTL8189ES_linux_v4.1.7_9024.20130916.zip
in network disk download RTL8188EUS_RTL8189ES_linux_v4.1.7_9024.20130916.zip

解压源码包(decompress source code package)

创建工作目录(create working directory)

这里我们创建 ~/my-i.mx6/02_source/modules/rtl8188eus 作为WIFI(RTL8188EUS)移植的工作目录。
here we create ~/my-i.mx6/02_source/modules/rtl8188eus as working directory for WIFI(RTL8188EUS)porting。
$ mkdir ~/my-i.mx6/02_source/modules/rtl8188eus -p

复制源码包到工作目录copy source code package to working directory()

将下载的源码包复制到 ~/my-i.mx6/02_source/modules/rtl8188eus 。
copy source code package downloaded to ~/my-i.mx6/02_source/modules/rtl8188eus 。
这一步自己采取相应方式完成。
this step should be done by your own approach。


解压源码(decompress source code)

1)解压源码包
decompress source code package

  • 进入源码目录

enter source code directory
$ cd ~/my-i.mx6/02_source/modules/rtl8188eus

  • 解压

decompress
$ unzip RTL8188EUS_RTL8189ES_linux_v4.1.7_9024.20130916.zip
2)解压驱动包
decompress driving package

  • 进入驱动目录

enter driving directory
$ cd RTL8188EUS_RTL8189ES_linux_v4.1.7_9024.20130916/driver/

  • 解压

dcompress
$ tar zxf rtl8188EUS_rtl8189ES_linux_v4.1.7_9024.20130916.tar.gz

准备编译(prepare compife)



进入驱动代码目录(enter driving code directory)

$ cd rtl8188EUS_rtl8189ES_linux_v4.1.7_9024.20130916/

配置Makefile(configure Makefile)

$ ./make_drv RTL8188eus

修改Makefile(modify Makefile)

添加新的平台类型(add new plaform type)

修改Makefile文件中的
modify in Makefile
CONFIG_PLATFORM_I386_PC = y
as
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_MYIMX6 = y

配置编译参数(configure compilation parameters)

在Makefile 文件中的“ifeq ($(CONFIG_PLATFORM_I386_PC), y)”前添加
add in front of “ifeq ($(CONFIG_PLATFORM_I386_PC), y in makefile)”
ifeq ($(CONFIG_PLATFORM_MYIMX6), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
MODULE_NAME := wlan
Endif

注意:每行都顶格。
note:topgrip each row。


修改配置文件(modify configuration file)

配置文件路径(configuration file path)

这里我们假设使用的编译配置文件为 ~/my-i.mx6/myimx6_3035_build_env
it supposed that the compifed configuration file we used is ~/my-i.mx6/myimx6_3035_build_env

配置文件内容(content of configuration file)

在内核的编译过程中我们创建过编译的配置文件,如果没有编译配置文件,请参考下面内容添加:
in the process of kernel compilation,we created compifed configuration file,if there is not compifed configuration file,please add with reference of below details:
  export ARCH=arm
  GCC_462_PATH=/home/myzr/my-i.mx6/03_tools/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin
  export CROSS_COMPILE=$GCC_462_PATH/arm-none-linux-gnueabi-


检查配置文件中的内核路径设置(check kernel path setting in configuration file)

我们需要在配置文件中添加MY-IMX6-EK200和MY-IMX6-EK314的内核源码路径。
we need to add kernel source code path for MY-IMX6-EK200 and MY-IMX6-EK314 in configuration file。
提示:这里MY-IMX6-EK200的内核路径为:${HOME}/my-i.mx6/02_source/myimx6ek200/linux-2.6-imx-imx_3.0.35_4.1.0。MY-IMX6-EK314的内核路径为:${HOME}/my-i.mx6/02_source/myimx6ek314/linux-2.6-imx-imx_3.0.35_4.1.0
tips:here the kernel path for MY-IMX6-EK200:${HOME}/my-i.mx6/02_source/myimx6ek200/linux-2.6-imx-imx_3.0.35_4.1.0。kernel path for MY-IMX6-EK314的:${HOME}/my-i.mx6/02_source/myimx6ek314/linux-2.6-imx-imx_3.0.35_4.1.0
在配置文件 ~/my-i.mx6/myimx6_3035_build_env 最后添加下面两行内容:
add below last two rows of content in configuration file~/my-i.mx6/myimx6_3035_build_env :
  MYIMX6EK200_KSRC=${HOME}/my-i.mx6/02_source/myimx6ek200/linux-2.6-imx-imx_3.0.35_4.1.0
  MYIMX6EK314_KSRC=${HOME}/my-i.mx6/02_source/myimx6ek314/linux-2.6-imx-imx_3.0.35_4.1.0


检查KSRC配置(check KSRC configuration)

在 ~/my-i.mx6/myimx6_3035_build_env 文件中检查 KSRC 配置。
check KSRC configuration in ~/my-i.mx6/myimx6_3035_build_env。
如果我们为MY-IMX6-EK200编译WIFI模块,则配置如下:
if we compife WIFI module for MY-IMX6-EK200,then configure as below:
export KSRC=${MYIMX6EK200_KSRC}
如果我们为MY-IMX6-EK314编译WIFI模块,则配置如下:
if we compife WIFI module for MY-IMX6-EK314,then configure as below:
export KSRC=${MYIMX6EK314_KSRC}


编译(compilation)


使MY-IMX6的编译配置文件生效(make effective configuration file for MY-IMX6)

因为内核模块编译需要指定平台、交叉编译工具、内核源码等,所以需要使MY-IMX6的编译配置文件生效。
because a designated platform,cross compifer tool,kernel source code are needed to compife kernel module,so it need to make effective configuration file for MY-IMX6 。
$ source ~/my-i.mx6/myimx6_3035_build_env

编译(compilation)

$ make

目标文件(target file)

$ ls
ls可以看到当前目录下有wlan.ko,wlan.do 即编译得到的目标文件
via ls you can see wlan.ko,wlan.do under current directory ,that is the target file compifed

WIFI 测试(WIFI test)


见《MY-IMX6-EKxxx Linux测试手册》
refer to 《MY-IMX6-EKxxx Linux test manual》
</div>