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