MYZR-SAMA5 Linux-3.18 RTL8188EU 开发指导
目录
= 准备源码(prepare source code) =
下载源码包(download source code package)
在网盘下载 rtl8188EUS_linux_v4.3.0.9_15178.20150907.tar.xz
download rtl8188EUS_linux_v4.3.0.9_15178.20150907.tar.xz from the network disk
解压源码包(decompress source code package)
创建工作目录(create working directory)
这里我们创建 ~/my-demo/exclude_src 目录,并在该目录下工作。
here we create ~/my-demo/exclude_src directory,and work under the directory。
$ mkdir ~/my-demo/exclude_src -p
复制源码包到工作目录(copy source code package to working directory)
将下载的源码包复制到 ~/my-demo/exclude_src 。
copy source code package downloaded to ~/my-demo/exclude_src 。
这一步自己采取相应方式完成。
next step should be done in your own way
解压源码(decompress source code package)
- 进入源码目录
enter source code directory
$ cd ~/my-demo/exclude_src
- 解压
decompress
$ tar xf rtl8188EUS_linux_v4.3.0.9_15178.20150907.tar.xz
= 编译模块(compile module) =
检查配置(check configuration)
说明:模块编译存在两个依赖关系,交叉编译编译链和内核,并且需要在指定路径。
instruction:module compilation exist with two dependent relationships,cross compilation link and kernel,which need to be in the path designated
- 使编译配置文件生效
validate configured file of compilation
$ source ~/my-sama5/03_tools/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.config
- 检查内核源码路径
check path of source code in kernel
$ ls ~/my-sama5/02_source/linux-at91-linux4sam_4.7
如果内核源码存在并且路径正确会看到内核源码目录的内容。
if there is kernel source code and in correct path then content of kernel source code directory can be found
如果命令的执行结果异常,需要按照《MY-SAMA5 L318 编译手册》重新编译一次内核。
if result of execution of command is anormal,need to re-compife kernel with reference to《MY-SAMA5 L318 compilation manual》
编译(compile)
- 进入驱动代码目录
enter driving code directory
$ cd rtl8188EUS_linux_v4.3.0.9_15178.20150907/
- 执行编译命令
execute compilation command
$ make
目标文件(target file)
- 查看目标文件信息
check target file information
$ file *.ko
执行 file 命令可以看到编译出来的模块的信息,类似如下:
execute file command to see module information compiled,example
8188eu.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), BuildID[sha1]=0x1a3bbb865d785effc8acfebf9e2c8faf066b3fbf, not stripped
8188eu.ko 即编译得到的目标文件
8188eu.ko is the target file compiled
= WIFI测试(WIFI test) =
见 MY-SAMA5 Linux-3.18 测试手册
refer to MY-SAMA5 Linux-3.18 test manual