Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 3

5,042 bytes added, 16:43, 17 June 2022
no edit summary
<div>[[文件:Orange-pi-3-img10.png|600px]]</div>
The final file generated by the compilation will be saved in the output directory<br>
{| class="wikitable" style="width:800px;"
|-
| colspan=2|$ cd output
|-
| $ tree|| -L 2
|-
| .||
|-
| ├──|| images&nbsp;&nbsp;&nbsp;&nbsp;//Generated image file
|-
| │|| images&nbsp;&nbsp;&nbsp;&nbsp;//Generated image file
|-
| │|| └── OrangePi_3_ubuntu_xenial_server_linux4.9.118_v2.0.2.img
|-
| ├──|| kernel&nbsp;&nbsp;&nbsp;&nbsp;//Compile the generated kernel
|-
| │|| └── uImage_3
|-
| ├──|| rootfs&nbsp;&nbsp;&nbsp;&nbsp;//Compile the generated rootfs
|-
| ├──|| uboot&nbsp;&nbsp;&nbsp;&nbsp;//Compile the generated uboot image
|-
| │|| ├── boot0_sdcard_sun50iw6p1.bin
|-
| │|| ├── H6.dtb
|-
| │|| └── u-boot-sun50iw6p1.bin
|-
| └──|| xenial_arm64_server_rootfs.tar.gz
|}
<br>
=== '''Linux SDK usage example''' ===
<br>
The following will fully demonstrate the use of the Linux SDK by adding a rtl8812AU USB WIFI kernel module to the kernel source.<br>
<br>
* '''Get the source code of rtl8812AU from github'''
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd OrangePiH6_Linux4.9/kernel/drivers/net/wireless<br>
$ git clone https://github.com/diederikdehaas/rtl8812AU.git<br>
Cloning into 'rtl8812AU'...<br>
remote: Counting objects: 2347, done.<br>
Receiving objects: 100% (2347/2347), 7.87 MiB | 22.00 KiB/s, done.<br>
Resolving deltas: 100% (1292/1292), done.<br>
Checking connectivity... done.
</div>
<br>
* '''Add the configuration of rtl8812AU'''
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd OrangePiH6_Linux4.9/kernel/drivers/net/wireless<br>
$ git diff .<br>
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig<br>
index 373666b..b7ebd5c 100755<br>
--- a/drivers/net/wireless/Kconfig<br>
+++ b/drivers/net/wireless/Kconfig<br>
@@ -294,4 +294,5 @@ source "drivers/net/wireless/rtl8192eu/Kconfig"<br>
+source "drivers/net/wireless/rtl8812AU/Kconfig" endif # WLAN<br>
<br>
diff --git a/drivers/net/wireless/Makefile <br>
b/drivers/net/wireless/Makefile<br>
index fd8a466..3aef800 100755<br>
--- a/drivers/net/wireless/Makefile<br>
+++ b/drivers/net/wireless/Makefile<br>
@@ -66,3 +66,4 @@ obj-$(CONFIG_XR_WLAN) += xradio/<br>
+obj-$(CONFIG_RTL8812AU)&nbsp;&nbsp;+= rtl8812AU/
</div>
<br>
* Select Realtek 8812A USB WiFi in the kernel configuration and compile it into a kernel module
<br>
<div style="padding-left:300px;">[[文件:Orange-pi-3-img11.png|600px]]</div>
* '''Recompile the kernel according to the method of `` Compiling Linux and U-boot Source '''''
<div style="padding-left:300px;">[[文件:Orange-pi-3-img12.png|300px]]</div>
Partially compiled log looks like this:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
Start Compile.....<br>
Start Compile Module<br>
<p style="padding-left:10px;">
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_cmd.o<br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_security.o <br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_debug.o<br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_io.o<br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_ioctl_query.o <br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_ioctl_set.o<br>
</p>
</div>
After compiling, you can find the compiled kernel module in output / lib / modules /
4.9.118 + / kernel / drivers / net / wireless / rtl8812AU
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd output/lib/modules/4.9.118+/kernel/drivers/net/wireless/rtl8812AU<br>
$ ls <br>
'''8812au.ko'''
</div>
<br>
* '''Update kernel module'''
<br>
First, insert the SD card that has been burned with Linux firmware into a PC used
to compile Linux source code (physical or virtual machine with Ubuntu 18.04 installed). After the system recognizes and successfully mounts the inserted SD card, we can / media / $ LOGNAME see the name of the corresponding partition.
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd /media/$LOGNAME<br>
$ ls<br>
BOOT Store the kernel <br>
rootfs Root file system<br>
</div>
<br>
Then choose 6 Update Module to update the kernel module according to the instructions in the section `` Compiling Linux and U-boot Source ''
<div>[[文件:Orange-pi-3-img13.png|600px]]</div>
<br>
Next, you can start the system through the SD card and use the new 8812au.ko kernel module to drive the USB WIFI network card.
== '''Android firmware burning''' ==
<br>
 Android firmware cannot be written to the TF card via the dd command in Linux or the Win32 Diskimager tool in Windows. Need to use the tool PhoenixCard to write, PhoenixCard current latest version is PhoenixCard V4.1.2, can be downloaded from the official tool on the official website download page.<br>
<br>
=== '''Android firmware burning steps (TF card start up)''' ===
<br>
* '''Format TF card'''
 Check whether the inserted TF card is consistent with the selected drive letter, click the "Restore Card" button to start formatting the TF
<div>[[文件:Orange-pi-3-img14.png|600px]]</div>
<div>[[文件:Orange-pi-3-img15.png|600px]]</div>