Difference between revisions of "Orange Pi 3B"

From Wiki-Orange Pi
Jump to: navigation, search
(Created page with "<span id="basic-features-of-orange-pi-3b"></span> = Basic features of Orange Pi 3B = <span id="what-is-orange-pi-3b"></span> == What is Orange Pi 3B == Orange Pi 3B adopts R...")
 
Line 1: Line 1:
<span id="basic-features-of-orange-pi-3b"></span>
+
'''Orange Pi 3B'''
= Basic features of Orange Pi 3B =
 
  
<span id="what-is-orange-pi-3b"></span>
+
'''用户手册'''
== What is Orange Pi 3B ==
 
  
Orange Pi 3B adopts Rockchip RK3566 quad-core 64-bit Cortex-A55 processor, adopts 22nm process, the main frequency can reach up to 1.8GHz, integrates ARM Mali-G52 GPU, embedded high-performance 2D image acceleration module, built-in 1 The AI accelerator NPU of Tops computing power can choose 2GB, 4GB or 8GB memory, and has up to 4K display processing capability.
+
<div class="figure">
  
Orange Pi 3B brings out quite a lot of interfaces, including HDMI output, M.2 PCIe2.0x1, Gigabit Ethernet port, USB2.0, USB3.0 interface and 40pin expansion pin header, etc. It can be widely used in high-end tablet, edge computing, artificial intelligence, cloud computing, AR/VR, smart security, smart home and other fields, covering various AIoT industries.
+
[[File:media/image2.jpeg|576x388px|_MG_1990(1)]]
  
Orange Pi 3B supports Android11, Ubuntu22.04, Ubuntu20.04, Debian11, Debian12, open source Hongmeng 4.0 Beta1, Orange Pi OS (Arch), Orange Pi OS (OH) based on open source Hongmeng and other operating systems.
+
</div>
 +
'''目录'''
  
<span id="purpose-of-orange-pi-3b"></span>
+
[[\l|1. Orange Pi 3B的基本特性 [7](#orange-pi-3b的基本特性)]]
== Purpose of Orange Pi 3B ==
 
  
We can use it to achieve:
+
[[\l|1.1. 什么是 Orange Pi 3B [7](#什么是-orange-pi-3b)]]
  
* A Linux desktop computer
+
[[\l|1.2. Orange Pi 3B的用途 [7](#orange-pi-3b的用途)]]
* A Linux web server
 
* Android tablet
 
* Android game console, etc.
 
  
'''Of course, there are more functions. Relying on a powerful ecosystem and a variety of expansion accessories, Orange Pi can help users easily realize the delivery from idea to prototype to mass production. It is a maker, dreamer, hobby The ideal creative platform for readers.'''
+
[[\l|1.3. Orange Pi 3B的硬件特性 [8](#orange-pi-3b的硬件特性)]]
  
<span id="hardware-features-of-orange-pi-3b"></span>
+
[[\l|1.4. Orange Pi 3B的顶层视图和底层视图 [10](#orange-pi-3b的顶层视图和底层视图)]]
== Hardware Features of Orange Pi 3B ==
 
  
{| class="wikitable"
+
[[\l|1.5. Orange Pi 3B的接口详情图 [11](#orange-pi-3b的接口详情图)]]
|-
+
 
|colspan=2|
+
[[\l|2. 开发板使用介绍 [13](#开发板使用介绍)]]
<div style="text-align:center"><big>'''Introduction to hardware features'''</big></div>
+
 
|-
+
[[\l|2.1. 准备需要的配件 [13](#准备需要的配件)]]
| Master chip
 
|  
 
Rockchip RK3566
 
|-
 
| CPU
 
|
 
Quad-core 64-bit Cortex-A55 processor, 22nm advanced technology, main frequency up to 1.8GHz
 
|-
 
| GPU
 
|
 
·ARM Mali G52 2EE graphics processor
 
  
·Support OpenGL ES 1.1/2.0/3.2, OpenCL 2.0, Vulkan 1.1
+
[[\l|2.2. 下载开发板的镜像和相关的资料 [16](#下载开发板的镜像和相关的资料)]]
  
·Embedded high-performance 2D acceleration hardware
+
[[\l|2.3. 基于Windows PC将Linux镜像烧写到TF卡的方法 [18](#基于windows-pc将linux镜像烧写到tf卡的方法)]]
  
|-
+
[[\l|2.3.1. 使用balenaEtcher烧录Linux镜像的方法 [18](#使用balenaetcher烧录linux镜像的方法)]]
| NPU
 
|
 
·Integrated RKNN NPU AI accelerator, 0.8Tops@INT8 performance
 
  
·Supports one-click conversion of C affe/TensorFlow/TFLite/ONNX/PyTorch/Keras/Darknet architecture models
+
[[\l|2.3.2. 使用RKDevTool烧录Linux镜像到TF卡中的方法 [21](#使用rkdevtool烧录linux镜像到tf卡中的方法)]]
  
|-
+
[[\l|2.3.3. 使用Win32Diskimager烧录Linux镜像的方法 [29](#使用win32diskimager烧录linux镜像的方法)]]
| VPU
 
|
 
·4K@60fps H.265/H.264/VP9 video decoding
 
  
·1080P@100fps H.265 video encoding
+
[[\l|2.4. 基于Ubuntu PC将Linux镜像烧写到TF卡的方法 [31](#基于ubuntu-pc将linux镜像烧写到tf卡的方法)]]
  
·1080P@60fps H.264 video encoding
+
[[\l|2.5. 烧录Linux镜像到eMMC中的方法 [35](#_Toc32616)]]
  
|-
+
[[\l|2.5.1. 使用RKDevTool烧录Linux镜像到eMMC中的方法 [35](#使用rkdevtool烧录linux镜像到emmc中的方法)]]
| PMU
 
|
 
Rockchip RK809-5
 
|-
 
| Memory
 
|
 
2GB/4GB/8GB (LPDDR4/4x)
 
|-
 
| storage
 
|
 
·Support eMMC module: 16GB/32GB/64GB/128GB
 
  
·SPI Flash: 16MB/32MB
+
[[\l|2.5.2. 使用dd命令烧录Linux镜像到eMMC中的方法 [43](#使用dd命令烧录linux镜像到emmc中的方法)]]
  
·M.2 M-KEY slot: SATA3 or PCIe2.0 NVME SSD
+
[[\l|2.6. 烧写Linux镜像到SPIFlash+NVMe SSD中的方法 [45](#烧写linux镜像到spiflashnvme-ssd中的方法)]]
  
·TF card slot
+
[[\l|2.6.1. 使用RKDevTool烧录的方法 [45](#使用rkdevtool烧录的方法)]]
  
|-
+
[[\l|2.6.2. 使用dd命令烧录的方法 [54](#使用dd命令烧录的方法)]]
| Wi-Fi+Bluetooth
 
|
 
Wi-Fi 5+BT 5.0,BLE(20U5622)
 
|-
 
| ethernet transceiver
 
|
 
10/100/1000Mbps Ethernet (onboard PHY chip: YT8531C)
 
|-
 
| show
 
|
 
·1x HDMI TX 2.0, maximum support 4K@60FPS
 
  
·1xMIPI DSI 2 Lane
+
[[\l|2.6.3. 使用balenaEtcher软件烧录的方法 [59](#使用balenaetcher软件烧录的方法)]]
  
·eDP1.3
+
[[\l|2.7. 烧录Android镜像到TF卡中的方法 [74](#烧录android镜像到tf卡中的方法)]]
  
|-
+
[[\l|2.7.1. 通过USB2.0烧录口将Android 镜像烧录到TF卡中的方法 [74](#通过usb2.0烧录口将android-镜像烧录到tf卡中的方法)]]
| Camera
 
|
 
1xMIPI CSI 2 Lane camera interface
 
|-
 
| USB
 
|
 
·1xUSB 2.0 supports Device or HOST mode
 
  
·1xUSB 3.0 HOST
+
[[\l|2.7.2. 使用SDDiskTool工具将Android镜像烧到TF卡的方法 [80](#使用sddisktool工具将android镜像烧到tf卡的方法)]]
  
·2xUSB 2.0 HOST
+
[[\l|2.8. 烧录Android镜像到eMMC中的方法 [83](#烧录android镜像到emmc中的方法)]]
  
|-
+
[[\l|2.8.1. 通过USB2.0烧录口将Android 镜像烧录到eMMC中的方法 [83](#通过usb2.0烧录口将android-镜像烧录到emmc中的方法)]]
| Audio
 
|
 
3.5mm headphone jack audio input/output
 
|-
 
| Button
 
|
 
1x MaskROM key, 1xRESET key, 1 xPOWER key
 
|-
 
| FAN
 
|
 
2Pin 1.25mm 5V fan interface
 
|-
 
| RTC
 
|
 
2Pin 1.25mm backup battery interface
 
|-
 
| 40Pin
 
|
 
40Pin function expansion interface, supports the following interface types:
 
  
GPIO, UART, I2C, SPI, PWM
+
[[\l|2.8.2. 通过TF卡将Android11镜像烧录到eMMC中的方法 [90](#通过tf卡将android11镜像烧录到emmc中的方法)]]
|-
 
| Power Supply
 
|
 
Type-C 5V3A
 
|-
 
| Supported OS
 
|
 
Android11, Ubuntu22.04, Ubuntu20.04, Debian11, Debian12, open source Hongmeng 4.0 Beta1, Orange Pi OS (Arch), Orange Pi OS (OH) based on open source Hongmeng and other operating systems.
 
|-
 
|colspan=2|
 
<div style="text-align:center"><big>'''Introduction of Appearance Specifications'''</big></div>
 
|-
 
| PCB size
 
|
 
85mm x 56mm x 17mm
 
|-
 
| weight
 
|
 
49g
 
|}
 
  
<span id="top-view-and-bottom-view-of-orange-pi-3b"></span>
+
[[\l|2.9. 烧录Android镜像到SPIFlash+NVMe SSD中的方法 [95](#烧录android镜像到spiflashnvme-ssd中的方法)]]
== Top view and bottom view of Orange Pi 3B ==
 
  
'''Top view:'''
+
[[\l|2.10. 使用RKDevTool清空SPIFlash的方法 [100](#使用rkdevtool清空spiflash的方法)]]
  
<div class="figure">
+
[[\l|2.11. 启动香橙派开发板 [107](#启动香橙派开发板)]]
  
[[File:pi3b-img3.png]]
+
[[\l|2.12. 调试串口的使用方法 [108](#调试串口的使用方法)]]
  
</div>
+
[[\l|2.12.1. 调试串口的连接说明 [108](#调试串口的连接说明)]]
'''Bottom view:'''
 
  
<div class="figure">
+
[[\l|2.12.2. Ubuntu平台调试串口的使用方法 [109](#ubuntu平台调试串口的使用方法)]]
  
[[File:pi3b-img4.png]]
+
[[\l|2.12.3. Windows平台调试串口的使用方法 [112](#windows平台调试串口的使用方法)]]
  
</div>
+
[[\l|2.13. 使用开发板40pin接口中的5v引脚供电说明 [116](#使用开发板40pin接口中的5v引脚供电说明)]]
<span id="interface-details-of-orange-pi-3b"></span>
 
== Interface details of Orange Pi 3B ==
 
  
[[File:pi3b-img5.png]]
+
[[\l|3. Ubuntu/Debian Server和Xfce桌面系统使用说明 [117](#_Toc7393)]]
  
[[File:pi3b-img6.png]]
+
[[\l|3.1. 已支持的Linux镜像类型和内核版本 [117](#已支持的linux镜像类型和内核版本)]]
  
'''The diameter of the four positioning holes is 3.0mm, and the diameter of the M.2 PICE device fixing hole is 3.5mm.'''
+
[[\l|3.2. Linux系统适配情况 [117](#_Toc10533)]]
  
<span id="introduction-to-the-use-of-the-development-board"></span>
+
[[\l|3.3. 本手册Linux命令格式说明 [118](#本手册linux命令格式说明)]]
= '''Introduction to the use of the development board''' =
 
  
<span id="prepare-the-required-accessories"></span>
+
[[\l|3.4. Linux系统登录说明 [119](#_Toc19677)]]
== Prepare the required accessories ==
 
  
# TF card, '''class 10''' or above high-speed SanDisk card with a minimum capacity of 16GB (recommended 32GB or above)
+
[[\l|3.4.1. Linux系统默认登录账号和密码 [119](#_Toc4893)]]
  
[[File:pi3b-img7.png]]
+
[[\l|3.4.2. 设置Linux系统终端自动登录的方法 [120](#设置linux系统终端自动登录的方法)]]
  
<ol start="2" style="list-style-type: decimal;">
+
[[\l|3.4.3. Linux桌面版系统自动登录说明 [120](#_Toc15422)]]
<li>TF card reader, used to burn the image into the TF card</li></ol>
 
  
[[File:pi3b-img8.png]]
+
[[\l|3.4.4. Linux桌面版系统root用户自动登录的设置方法 [121](#linux桌面版系统root用户自动登录的设置方法)]]
  
<ol start="3" style="list-style-type: decimal;">
+
[[\l|3.4.5. Linux桌面版系统禁用桌面的方法 [122](#linux桌面版系统禁用桌面的方法)]]
<li>Display with HDMI interface</li></ol>
 
  
[[File:pi3b-img9.png]]
+
[[\l|3.5. 板载LED灯测试说明 [123](#板载led灯测试说明)]]
  
<ol start="4" style="list-style-type: decimal;">
+
[[\l|3.6. 网络连接测试 [124](#_Toc3023)]]
<li>HDMI to HDMI cable, used to connect the development board to an HDMI monitor or TV for display</li></ol>
 
  
[[File:pi3b-img10.png]]
+
[[\l|3.6.1. 以太网口测试 [124](#以太网口测试)]]
  
'''Note, if you want to connect a 4K monitor, please make sure that the HDMI cable supports 4K video output.'''
+
[[\l|3.6.2. WIFI连接测试 [125](#_Toc8082)]]
  
<ol start="5" style="list-style-type: decimal;">
+
[[\l|3.6.3. 设置静态IP地址的方法 [132](#设置静态ip地址的方法)]]
<li>Power adapter, Orange Pi 3B is recommended to use 5V/3A or 5V/4A Type-C power supply for power supply</li></ol>
 
  
[[File:pi3b-img11.png]]
+
[[\l|3.7. SSH远程登录开发板 [140](#_Toc23407)]]
  
<ol start="6" style="list-style-type: decimal;">
+
[[\l|3.7.1. Ubuntu下SSH远程登录开发板 [140](#ubuntu下ssh远程登录开发板)]]
<li>The mouse and keyboard of the USB interface, as long as the mouse and keyboard of the standard USB interface are acceptable, the mouse and keyboard can be used to control the Orange Pi development board</li></ol>
 
  
[[File:pi3b-img12.png]]
+
[[\l|3.7.2. Windows下SSH远程登录开发板 [141](#windows下ssh远程登录开发板)]]
  
<ol start="7" style="list-style-type: decimal;">
+
[[\l|3.8. 上传文件到开发板Linux系统中的方法 [143](#上传文件到开发板linux系统中的方法)]]
<li>USB camera</li></ol>
 
  
[[File:pi3b-img13.png]]
+
[[\l|3.8.1. 在Ubuntu PC中上传文件到开发板Linux系统中的方法 [143](#在ubuntu-pc中上传文件到开发板linux系统中的方法)]]
  
<ol start="8" style="list-style-type: decimal;">
+
[[\l|3.8.2. 在Windows PC中上传文件到开发板Linux系统中的方法 [147](#在windows-pc中上传文件到开发板linux系统中的方法)]]
<li>5V cooling fan. As shown in the figure below, the development board has an interface for connecting the cooling fan, and the interface specification is '''2pin 1.25mm''' '''pitch'''</li></ol>
 
  
'''The fan on the development board can adjust the speed and switch through PWM.'''
+
[[\l|3.9. HDMI测试 [150](#hdmi测试)]]
  
[[File:pi3b-img14.png]]
+
[[\l|3.9.1. HDMI显示测试 [150](#hdmi显示测试)]]
  
<ol start="9" style="list-style-type: decimal;">
+
[[\l|3.9.2. HDMI转VGA显示测试 [151](#hdmi转vga显示测试)]]
<li>100M or 1000M network cable, used to connect the development board to the Internet</li></ol>
 
  
[[File:pi3b-img15.png]]
+
[[\l|3.9.3. HDMI分辨率设置方法 [152](#hdmi分辨率设置方法)]]
  
<ol start="10" style="list-style-type: decimal;">
+
[[\l|3.10. 蓝牙使用方法 [155](#蓝牙使用方法)]]
<li>USB2.0 male-to-male data cable, used to burn images to eMMC, NVMe SSD and other functions</li></ol>
 
  
<div class="figure">
+
[[\l|3.10.1. 桌面版镜像的测试方法 [155](#桌面版镜像的测试方法-1)]]
  
[[File:pi3b-img16.png]]
+
[[\l|3.11. USB接口测试 [158](#usb接口测试)]]
  
</div>
+
[[\l|3.11.1. 连接USB鼠标或键盘测试 [158](#连接usb鼠标或键盘测试)]]
<ol start="11" style="list-style-type: decimal;">
 
<li>'''3.3V''' USB to TTL module and DuPont line, when using serial port debugging function, need USB to TTL module and DuPont line to connect the development board and computer</li></ol>
 
  
[[File:pi3b-img17.png]] [[File:pi3b-img18.png]]
+
[[\l|3.11.2. 连接USB存储设备测试 [159](#连接usb存储设备测试)]]
  
<ol start="12" style="list-style-type: decimal;">
+
[[\l|3.11.3. USB无线网卡测试 [159](#usb无线网卡测试)]]
<li>A personal computer with Ubuntu and Windows operating systems installed</li></ol>
 
  
{| class="wikitable"
+
[[\l|3.11.4. USB摄像头测试 [167](#usb摄像头测试)]]
|-
 
| style="text-align: left;"| 1
 
| style="text-align: left;"| Ubuntu22.04 PC
 
| style="text-align: left;"| Optional, used to compile Linux source code
 
|-
 
| style="text-align: left;"| 2
 
| style="text-align: left;"| Windows PC
 
| style="text-align: left;"| For burning Android and Linux images
 
|}
 
  
<span id="download-the-image-of-the-development-board-and-related-materials"></span>
+
[[\l|3.12. 音频测试 [169](#音频测试)]]
== Download the image of the development board and related materials ==
 
  
# The website for downloading the English version of materials is:
+
[[\l|3.12.1. 在桌面系统中测试音频方法 [169](#在桌面系统中测试音频方法)]]
  
'''http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html'''
+
[[\l|3.12.2. 使用命令播放音频的方法 [171](#使用命令播放音频的方法)]]
  
<div class="figure">
+
[[\l|3.12.3. 使用命令测试录音的方法 [172](#使用命令测试录音的方法)]]
  
[[File:pi3b-img19.png]]
+
[[\l|3.13. 温度传感器 [173](#温度传感器)]]
  
</div>
+
[[\l|3.14. 40 Pin接口引脚说明 [173](#pin接口引脚说明)]]
<ol start="2" style="list-style-type: decimal;">
 
<li><p>The information mainly includes</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>'''Android source code:''' saved on Google Cloud Disk</p></li>
 
<li><p>'''Linux source code:''' saved on Github</p></li>
 
<li><p>'''User manual and schematic diagram:''' saved on Google Cloud Disk</p></li>
 
<li><p>'''Official tools:''' mainly include the software that needs to be used during the use of the development board</p></li>
 
<li><p>'''Android image:''' saved on Google Cloud Disk</p></li>
 
<li><p>'''Ubuntu image:''' saved on Google Cloud Disk</p></li>
 
<li><p>'''Debian image:''' saved on Google Cloud Disk</p></li>
 
<li><p>'''Orange Pi OS image:''' saved on Google Cloud Disk</p></li>
 
<li><p>'''OpenHarmony image:''' saved on Google Cloud Disk</p></li></ol>
 
</li></ol>
 
  
<span id="method-of-burning-linux-image-to-tf-card-based-on-windows-pc"></span>
+
[[\l|3.15. 安装wiringOP的方法 [175](#安装wiringop的方法)]]
== Method of burning Linux image to TF card based on Windows PC ==
 
  
'''Note that the Linux image mentioned here specifically refers to the images of Linux distributions such as Debian and Ubuntu downloaded from the''' [http://www.orangepi.org/html/serviceAndSupport/index.html Orange Pi data download page]'''.'''
+
[[\l|3.16. 40pin接口GPIO、I2C、UART、SPI和PWM测试 [176](#pin接口gpioi2cuartspi和pwm测试)]]
  
<span id="how-to-use-balenaetcher-to-burn-linux-image"></span>
+
[[\l|3.16.1. 40pin GPIO口测试 [177](#pin-gpio口测试)]]
=== How to use balenaEtcher to burn Linux image ===
 
  
# First prepare a TF card with a capacity of 16GB or more. The transmission speed of the TF card must be '''class 10''' or above. It is recommended to use a TF card of SanDisk and other brands
+
[[\l|3.16.2. 40pin GPIO口上下拉电阻的设置方法 [178](#pin-gpio口上下拉电阻的设置方法)]]
# Then use the card reader to insert the TF card into the computer
 
# Download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;'''.img'''&quot; is the image file of the operating system. The size is generally above 2GB.
 
# Then download the burning software of Linux image—'''balenaEtcher''', the download address is:
 
  
https://www.balena.io/etcher/
+
[[\l|3.16.3. 40pin SPI测试 [179](#pin-spi测试)]]
  
<ol start="5" style="list-style-type: decimal;">
+
[[\l|3.16.4. 40pin I2C测试 [181](#pin-i2c测试)]]
<li>After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded</li></ol>
 
  
[[File:pi3b-img20.png]]
+
[[\l|3.16.5. 40pin的UART测试 [182](#pin的uart测试)]]
  
<ol start="6" style="list-style-type: decimal;">
+
[[\l|3.16.6. PWM的测试方法 [184](#pwm的测试方法)]]
<li>Then you can choose to download the Portable version of balenaEtcher software. The Portable version does not need to be installed, and you can use it by double-clicking to open it</li></ol>
 
  
[[File:pi3b-img21.png]]
+
[[\l|3.17. wiringOP-Python的安装使用方法 [186](#wiringop-python的安装使用方法)]]
  
<ol start="7" style="list-style-type: decimal;">
+
[[\l|3.17.1. wiringOP-Python的安装方法 [186](#wiringop-python的安装方法)]]
<li>If the downloaded version of balenaEtcher needs to be installed, please install it before using it. If you downloaded the Portable version of balenaEtcher, just double-click to open it. The balenaEtcher interface after opening is shown in the figure below:</li></ol>
 
  
[[File:pi3b-img22.png]]
+
[[\l|3.17.2. 40pin GPIO口测试 [188](#pin-gpio口测试-1)]]
  
'''When opening balenaEtcher, if the following error is prompted:'''
+
[[\l|3.17.3. 40pin SPI测试 [190](#pin-spi测试-1)]]
  
[[File:pi3b-img23.png|209x164px]]
+
[[\l|3.17.4. 40pin I2C测试 [192](#pin-i2c测试-1)]]
  
'''Please select balenaEtcher, right-click, and select Run as administrator.'''
+
[[\l|3.17.5. 40pin的UART测试 [194](#pin的uart测试-1)]]
  
[[File:pi3b-img24.png|273x37px]]
+
[[\l|3.18. 硬件看门狗测试 [196](#硬件看门狗测试)]]
  
<ol start="8" style="list-style-type: decimal;">
+
[[\l|3.19. 查看RK3566芯片的序列号 [197](#查看rk3566芯片的序列号)]]
<li><p>The specific steps to use balenaEtcher to burn the Linux image are as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>First select the path of the Linux image file to be burned</p></li>
 
<li><p>Then select the drive letter of the TF card</p></li>
 
<li><p>Finally click Flash to start burning the Linux image to the TF card</p></li></ol>
 
</li></ol>
 
  
<div class="figure">
+
[[\l|3.20. 下载安装arm64版本balenaEtcher的方法 [197](#下载安装arm64版本balenaetcher的方法)]]
  
[[File:pi3b-img25.png|501x281px|03]]
+
[[\l|3.21. 宝塔Linux面板的安装方法 [199](#宝塔linux面板的安装方法)]]
  
</div>
+
[[\l|3.22. 设置中文环境以及安装中文输入法 [202](#设置中文环境以及安装中文输入法)]]
<ol start="9" style="list-style-type: decimal;">
 
<li>The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the TF card</li></ol>
 
  
[[File:pi3b-img26.png|428x268px]]
+
[[\l|3.22.1. Debian系统的安装方法 [202](#debian系统的安装方法)]]
  
<ol start="10" style="list-style-type: decimal;">
+
[[\l|3.22.2. Ubuntu 20.04系统的安装方法 [209](#ubuntu-20.04系统的安装方法)]]
<li>After burning the Linux image, balenaEtcher will also verify the image burned into the TF card by default to ensure that there is no problem in the burning process. As shown in the figure below, a green progress bar indicates that the image has been burnt, and balenaEtcher is verifying the burnt image</li></ol>
 
  
[[File:pi3b-img27.png|427x267px]]
+
[[\l|3.22.3. Ubuntu 22.04系统的安装方法 [213](#ubuntu-22.04系统的安装方法)]]
  
<ol start="11" style="list-style-type: decimal;">
+
[[\l|3.23. 远程登录Linux系统桌面的方法 [219](#远程登录linux系统桌面的方法)]]
<li>After the successful burning is completed, the display interface of balenaEtcher is shown in the figure below. If the green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, and then pull out the TF card and insert it into the TF card slot of the development board. up</li></ol>
 
  
<div class="figure">
+
[[\l|3.23.1. 使用NoMachine远程登录 [219](#使用nomachine远程登录)]]
  
[[File:pi3b-img28.png|523x324px|04]]
+
[[\l|3.23.2. 使用VNC远程登录 [223](#使用vnc远程登录)]]
  
</div>
+
[[\l|3.24. Linux系统支持的部分编程语言测试 [225](#linux系统支持的部分编程语言测试)]]
<span id="how-to-use-rkdevtool-to-burn-linux-image-to-tf-card"></span>
 
=== How to use RKDevTool to burn Linux image to TF card ===
 
  
# First, you need to prepare a good quality USB2.0 male-to-male data cable
+
[[\l|3.24.1. Debian Bullseye系统 [225](#debian-bullseye系统)]]
  
<div class="figure">
+
[[\l|3.24.2. Ubuntu Focal系统 [227](#ubuntu-focal系统)]]
  
[[File:pi3b-img16.png|146x143px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
+
[[\l|3.24.3. Ubuntu Jammy系统 [228](#ubuntu-jammy系统)]]
  
</div>
+
[[\l|3.25. QT的安装方法 [230](#qt的安装方法)]]
<ol start="2" style="list-style-type: decimal;">
 
<li><p>You also need to prepare a 16GB or larger capacity TF card. The transmission speed of the TF card must be '''class''' 10 or above. It is recommended to use a TF card of SanDisk and other brands</p></li>
 
<li><p>Then download the Rockchip driver '''DriverAssitant_v5.12.zip''' and '''MiniLoader''' and the burning tool '''RKDevTool_Release_v3.15.zip''' from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page''']</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>On the data download page of Orange Pi, first select the '''official tool''', and then enter the following folder</li></ol>
 
</li></ol>
 
  
<div class="figure">
+
[[\l|3.26. ROS安装方法 [238](#ros安装方法)]]
  
[[File:pi3b-img29.png|283x90px|6d1c77df7eeb7e491e5f79e8d85cbdc]]
+
[[\l|3.26.1. Ubuntu20.04安装ROS 1 Noetic的方法 [238](#ubuntu20.04安装ros-1-noetic的方法)]]
  
</div>
+
[[\l|3.26.2. Ubuntu20.04安装ROS 2 Galactic的方法 [242](#ubuntu20.04安装ros-2-galactic的方法)]]
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then download all the files below</li></ol>
 
  
<div class="figure">
+
[[\l|3.26.3. Ubuntu22.04安装ROS 2 Humble的方法 [245](#ubuntu22.04安装ros-2-humble的方法)]]
  
[[File:pi3b-img30.png|290x130px|34acacded202b29eee42fd20f5b4c92]]
+
[[\l|3.27. 安装内核头文件的方法 [247](#安装内核头文件的方法)]]
  
</div>
+
[[\l|3.28. 树莓派5寸屏幕的使用 [250](#树莓派5寸屏幕的使用)]]
'''Note that the &quot;MiniLoader-things needed to burn the Linux image&quot; folder is hereinafter referred to as the MiniLoader folder.'''
 
  
<ol start="4" style="list-style-type: decimal;">
+
[[\l|3.28.1. 树莓派5寸屏幕的组装方法 [250](#树莓派5寸屏幕的组装方法)]]
<li><p>Then download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;'''.img'''&quot; is the image file of the operating system , the size is generally more than 2GB</p></li>
 
<li><p>Then use the decompression software to decompress '''DriverAssitant_v5.12.zip''', and then find the '''DriverInstall.exe''' executable file in the decompressed folder and open it</p></li></ol>
 
  
[[File:pi3b-img31.png|464x136px]]
+
[[\l|3.28.2. 打开树莓派5寸屏幕配置的方法 [251](#打开树莓派5寸屏幕配置的方法)]]
  
<ol start="6" style="list-style-type: decimal;">
+
[[\l|3.28.3. 服务器版镜像旋转显示方向的方法 [254](#服务器版镜像旋转显示方向的方法)]]
<li><p>After opening '''DriverInstall.exe''', the steps to install the Rockchip driver are as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Click the &quot;'''Driver Installation'''&quot; button</li></ol>
 
</li></ol>
 
  
[[File:pi3b-img32.png|245x129px]]
+
[[\l|3.28.4. 桌面版镜像旋转显示和触摸方向的方法 [254](#桌面版镜像旋转显示和触摸方向的方法)]]
  
<ol start="2" style="list-style-type: lower-alpha;">
+
[[\l|3.29. 开关机logo使用说明 [257](#开关机logo使用说明)]]
<li>After waiting for a period of time, a pop-up window will prompt &quot;'''The driver is installed successfully'''&quot;, and then click the &quot;'''OK'''&quot; button.</li></ol>
 
  
[[File:pi3b-img33.png|254x132px]]
+
[[\l|3.30. ZFS文件系统的使用方法 [257](#zfs文件系统的使用方法)]]
  
<ol start="7" style="list-style-type: decimal;">
+
[[\l|3.30.1. 安装ZFS的方法 [258](#安装zfs的方法)]]
<li>Then decompress '''RKDevTool_Release_v3.15.zip''', this software does not need to be installed, just find '''RKDevTool''' in the decompressed folder and open it</li></ol>
 
  
[[File:pi3b-img34.png|448x132px]]
+
[[\l|3.30.2. 创建ZFS池的方法 [259](#创建zfs池的方法)]]
  
<ol start="8" style="list-style-type: decimal;">
+
[[\l|3.30.3. 测试ZFS的数据去重功能 [261](#测试zfs的数据去重功能)]]
<li>After opening the '''RKDevTool''' burning tool, because the computer has not connected to the development board through the USB2.0 male-to-male data cable at this time, the lower left corner will prompt &quot;'''No device found'''&quot;</li></ol>
 
  
[[File:pi3b-img35.png|402x189px]]
+
[[\l|3.30.4. 测试ZFS的数据压缩功能 [261](#测试zfs的数据压缩功能)]]
  
<ol start="9" style="list-style-type: decimal;">
+
[[\l|3.31. 关机和重启开发板的方法 [262](#关机和重启开发板的方法)]]
<li><p>Then start burning the Linux image to the TF card</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First, connect the development board to the Windows computer through the USB2.0 male-to-male data cable. The position of the USB2.0 programming port of the development board is shown in the figure below</li></ol>
 
</li></ol>
 
  
<div class="figure">
+
[[\l|4. Linux SDK——orangepi-build使用说明 [264](#_Toc10484)]]
  
[[File:pi3b-img36.png|271x115px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\1691131157154(1).jpg1691131157154(1)]]
+
[[\l|4.1. 编译系统需求 [264](#编译系统需求)]]
  
</div>
+
[[\l|4.1.1. 使用开发板的Ubuntu22.04系统编译 [264](#使用开发板的ubuntu22.04系统编译)]]
<ol start="2" style="list-style-type: lower-alpha;">
 
<li><p>Make sure the TF card slot is not inserted into the TF card</p></li>
 
<li><p>Then press and hold the MaskROM button on the development board, the position of the MaskROM button on the development board is shown in the figure below:</p></li></ol>
 
  
[[File:pi3b-img37.png|289x100px]]
+
[[\l|4.1.2. 使用x64的Ubuntu22.04电脑编译 [264](#使用x64的ubuntu22.04电脑编译)]]
  
<ol start="4" style="list-style-type: lower-alpha;">
+
[[\l|4.2. 获取Linux sdk的源码 [266](#获取linux-sdk的源码)]]
<li>Then connect the power supply of the Type-C interface to the development board, and power on, and then release the MaskROM button</li></ol>
 
  
<blockquote>[[File:pi3b-img38.png|305x94px]]
+
[[\l|4.2.1. 从github下载orangepi-build [266](#从github下载orangepi-build)]]
</blockquote>
 
<ol start="5" style="list-style-type: lower-alpha;">
 
<li>If the previous steps are successful, the development board will enter the '''MASKROM''' mode at this time, and the interface of the burning tool will prompt &quot;'''found a MASKROM device'''&quot;</li></ol>
 
  
[[File:pi3b-img39.png|454x213px]]
+
[[\l|4.2.2. 下载交叉编译工具链 [268](#下载交叉编译工具链)]]
  
<ol start="6" style="list-style-type: lower-alpha;">
+
[[\l|4.2.3. orangepi-build完整目录结构说明 [269](#orangepi-build完整目录结构说明)]]
<li><p>At this time, please insert the TF card into the TF card slot</p></li>
 
<li><p>Then place the mouse cursor in the area below</p></li></ol>
 
  
<div class="figure">
+
[[\l|4.3. 编译u-boot [270](#编译u-boot)]]
  
[[File:pi3b-img40.png|455x216px|图片1]]
+
[[\l|4.4. 编译Linux内核 [274](#_Toc12646)]]
  
</div>
+
[[\l|4.5. 编译rootfs [278](#编译rootfs)]]
<ol start="8" style="list-style-type: lower-alpha;">
 
<li>Then click the right mouse button and the selection interface shown in the figure below will pop up</li></ol>
 
  
[[File:pi3b-img41.png|453x213px]]
+
[[\l|4.6. 编译Linux镜像 [281](#编译linux镜像)]]
  
<ol style="list-style-type: lower-roman;">
+
[[\l|5. Android 11系统的使用说明 [285](#_Toc17425)]]
<li>Then select the '''import configuration''' option</li></ol>
 
  
[[File:pi3b-img42.png|458x215px]]
+
[[\l|5.1. 已支持的Android版本 [285](#已支持的android版本)]]
  
<ol start="10" style="list-style-type: lower-alpha;">
+
[[\l|5.2. Android 功能适配情况 [285](#android-功能适配情况)]]
<li>Then select the '''rk3588_Linux_tfcard.cfg''' configuration file in the '''MiniLoader''' folder downloaded earlier, and click '''Open'''</li></ol>
 
  
[[File:pi3b-img43.png|457x215px]]
+
[[\l|5.3. WIFI的连接测试方法 [286](#wifi的连接测试方法)]]
  
<ol start="11" style="list-style-type: lower-alpha;">
+
[[\l|5.4. Wi-Fi hotspot的使用方法 [288](#wi-fi-hotspot的使用方法)]]
<li>Then click '''OK'''</li></ol>
 
  
[[File:pi3b-img44.png|483x227px]]
+
[[\l|5.5. 蓝牙的测试方法 [290](#蓝牙的测试方法)]]
  
<ol start="12" style="list-style-type: lower-alpha;">
+
[[\l|5.6. 树莓派5寸屏幕的使用方法 [294](#树莓派5寸屏幕的使用方法)]]
<li>Then click the position shown in the figure below</li></ol>
 
  
[[File:pi3b-img45.png|486x228px]]
+
[[\l|5.7. 40pin 接口 GPIO、UART、SPI 和 PWM 测试 [295](#_Toc17235)]]
  
<ol start="13" style="list-style-type: lower-alpha;">
+
[[\l|5.7.1. 40pin GPIO 口测试 [295](#pin-gpio-口测试)]]
<li>Then select '''rk3566_MiniLoaderAll.bin''' in the '''MiniLoader''' folder downloaded earlier, and click to '''open'''</li></ol>
 
  
<div class="figure">
+
[[\l|5.7.2. 40pin的UART测试 [298](#pin的uart测试-2)]]
  
[[File:pi3b-img46.png|494x232px|[78~~Z7UFB@US@8P$QL%OM6]]
+
[[\l|5.7.3. 40pin的SPI测试 [301](#pin的spi测试)]]
  
</div>
+
[[\l|5.7.4. 40pin的PWM测试 [304](#pin的pwm测试)]]
<ol start="14" style="list-style-type: lower-alpha;">
 
<li>Then click the position shown in the figure below</li></ol>
 
  
[[File:pi3b-img47.png|493x232px]]
+
[[\l|5.8. ADB的使用方法 [307](#adb的使用方法)]]
  
<ol start="15" style="list-style-type: lower-alpha;">
+
[[\l|5.8.1. 使用网络连接adb调试 [307](#使用网络连接adb调试)]]
<li>Then select the path of the Linux image you want to burn, and then click '''Open'''</li></ol>
 
  
'''Before burning the image, it is recommended to rename the Linux image to be burned to orangepi.img or other shorter names, so that you can see the percentage value of the burning progress when burning the image.'''
+
[[\l|6. 附录 [309](#附录)]]
  
[[File:pi3b-img48.png|499x234px]]
+
[[\l|6.1. 用户手册更新历史 [309](#用户手册更新历史)]]
  
<ol start="16" style="list-style-type: lower-alpha;">
+
[[\l|6.2. 镜像更新历史 [309](#镜像更新历史)]]
<li>Then please check the '''mandatory write by address''' option</li></ol>
 
  
[[File:pi3b-img49.png|497x234px]]
+
<span id="orange-pi-3b的基本特性"></span>
 +
= Orange Pi 3B的基本特性 =
  
<ol start="17" style="list-style-type: lower-alpha;">
+
<span id="什么是-orange-pi-3b"></span>
<li>Click the execute button again to start burning the Linux image to the tf card of the development board</li></ol>
+
== 什么是 Orange Pi 3B ==
  
[[File:pi3b-img50.png|497x233px]]
+
Orange Pi 3B采用了瑞芯微RK3566四核64位Cortex-A55处理器,采用的22nm工艺,主频最高可达1.8GHz,集成ARM Mali-G52 GPU,内嵌高性能2D图像加速模块,内置0.8Tops算力的AI加速器NPU,可选2GB、4GB或者8GB内存,具有高达4K显示处理能力。
  
<ol start="18" style="list-style-type: lower-alpha;">
+
Orange Pi 3B引出了相当丰富的接口,包括HDMI输出、M.2 PCIe2.0x1、千兆网口、USB2.0、USB3.0接口和40pin扩展排针等。可广泛适用于高端平板、边缘计算、人工智能、云计算、AR/VR、智能安防、智能家居等领域,覆盖 AIoT各个行业。
<li>The display log after burning the Linux image is shown in the figure below</li></ol>
 
  
<div class="figure">
+
Orange Pi 3B支持Android11、Ubuntu22.04、Ubuntu20.04、Debian11、Debian12、开源鸿蒙4.0 Beta1、Orange Pi OS(Arch)、基于开源鸿蒙的Orange Pi OS(OH)等操作系统。
  
[[File:pi3b-img51.png|492x231px|%O4~FPPAT$0RH{3S~CGJ@@Q(1)]]
+
<span id="orange-pi-3b的用途"></span>
 +
== Orange Pi 3B的用途 ==
  
</div>
+
我们可以用它实现:
<ol start="19" style="list-style-type: lower-alpha;">
 
<li>After burning the Linux image to the TF card, the Linux system will start automatically.</li></ol>
 
  
<span id="how-to-use-win32diskimager-to-burn-linux-image"></span>
+
* 一台Linux桌面计算机
=== How to use Win32Diskimager to burn Linux image ===
+
* 一台Linux网络服务器
 +
* Android平板
 +
* Android游戏机等
  
<ol style="list-style-type: decimal;">
+
'''当然还有其他更多的功能,依托强大的生态系统以及各式各样的扩展配件,Orange Pi可以帮助用户轻松实现从创意到原型再到批量生产的交付,是创客、梦想家、业余爱好者的理想创意平台。'''
<li><p>First prepare a TF card with a capacity of 16GB or more. The transmission speed of the TF card must be '''class 10''' or above. It is recommended to use a TF card of SanDisk and other brands</p></li>
 
<li><p>Then use the card reader to insert the TF card into the computer</p></li>
 
<li><p>Then format the TF card</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>'''SD Card Formatter''' can be used to format the TF card. The download address is:</li></ol>
 
</li></ol>
 
  
https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip
+
<span id="orange-pi-3b的硬件特性"></span>
 +
== Orange Pi 3B的硬件特性 ==
  
<ol start="2" style="list-style-type: lower-alpha;">
 
<li><p>After downloading, unzip and install directly, and then open the software</p></li>
 
<li><p>If only a TF card is inserted into the computer, the drive letter of the TF card will be displayed in the &quot;'''Select card'''&quot; column. If multiple USB storage devices are inserted into the computer, you can select the corresponding drive letter of the TF card through the drop-down box</p></li></ol>
 
  
<div class="figure">
+
-----
  
[[File:pi3b-img52.png|209x228px|选区_199]]
 
  
</div>
+
-----
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Then click &quot;'''Format'''&quot;, a warning box will pop up before formatting, and formatting will start after selecting &quot;'''Yes (Y)'''&quot;</li></ol>
 
  
[[File:pi3b-img53.png|304x147px]]
+
{| class="wikitable"
 +
|-
 +
| '''硬件规格参数'''
 +
|
 +
|-
 +
| 主控芯片
 +
| Rockchip RK3566
 +
|-
 +
| CPU
 +
| 四核 64 位 Cortex-A55 处理器,22nm 先进工艺,主频最高 1.8GHz
 +
|-
 +
| GPU
 +
| ·ARM Mali G52 2EE图形处理器
  
<ol start="5" style="list-style-type: lower-alpha;">
+
·支持OpenGL ES 1.1/2.0/3.2,OpenCL 2.0,Vulkan 1.1
<li>After formatting the TF card, the information shown in the figure below will pop up, click OK</li></ol>
 
  
<blockquote>[[File:pi3b-img54.png|186x149px]]
+
·内嵌高性能2D加速硬件
</blockquote>
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>Download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;'''.img'''&quot; is the image file of the operating system. The size is generally more than 2GB</p></li>
 
<li><p>Use '''Win32Diskimager''' to burn the Linux image to the TF card</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The download page of Win32Diskimager is</li></ol>
 
</li></ol>
 
  
http://sourceforge.net/projects/win32diskimager/files/Archive/
+
|-
 +
| NPU
 +
| ·集成 RKNN NPU AI 加速器,0.8Tops@INT8 性能
  
<ol start="2" style="list-style-type: lower-alpha;">
+
·支持 C affe/TensorFlow/TFLite/ONNX/PyTorch/Keras/Darknet 架构模型一键转换
<li><p>After downloading, install it directly. The interface of Win32Diskimager is as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>First select the path of the image file</p></li>
 
<li><p>Then confirm that the drive letter of the TF card is consistent with that displayed in the &quot;'''Device'''&quot; column</p></li>
 
<li><p>Finally click &quot;'''Write'''&quot; to start burning</p></li></ol>
 
</li></ol>
 
  
<div class="figure">
+
|-
 +
| VPU
 +
| ·4K@60fps H.265/H.264/VP9 视频解码
  
[[File:pi3b-img55.png|297x206px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\a8fda8737c5b0b3b38fbb75ef68acfc.pnga8fda8737c5b0b3b38fbb75ef68acfc]]
+
·1080P@100fps H.265 视频编码
  
</div>
+
·1080P@60fpsH.264 视频编码
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>After the image writing is completed, click the &quot;'''Exit'''&quot; button to exit, and then you can pull out the TF card and insert it into the development board to start</li></ol>
 
  
<span id="method-of-burning-linux-image-to-tf-card-based-on-ubuntu-pc"></span>
+
|-
== Method of burning Linux image to TF card based on Ubuntu PC ==
+
| PMU
 +
| Rockchip RK809-5
 +
|-
 +
| 内存
 +
| 2GB/4GB/8GB (LPDDR4/4x)
 +
|-
 +
| 存储
 +
| ·支持eMMC模块:16GB/32GB/64GB/128GB
  
'''Note that the Linux image mentioned here specifically refers to the images of Linux distributions such as Debian and Ubuntu downloaded from the [http://www.orangepi.org/html/serviceAndSupport/index.html Orange Pi data download page], and the Ubuntu PC refers to the personal computer with the Ubuntu system installed.'''
+
·SPI Flash: 16MB/32MB
  
# First prepare a TF card with a capacity of 16GB or more. The transmission speed of the TF card must be '''class 10''' or above. It is recommended to use a TF card of SanDisk and other brands
+
·M.2 M-KEY插槽:SATA3 或者 PCIe2.0 NVME SSD
# Then use the card reader to insert the TF card into the computer
 
# Download the balenaEtcher software, the download address is
 
  
[https://www.balena.io/etcher/ '''https://www.balena.io/etcher/''']
+
·TF卡槽
  
<ol start="4" style="list-style-type: decimal;">
+
|-
<li>After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded</li></ol>
+
| Wi-Fi+蓝牙
 +
| Wi-Fi 5+BT 5.0,BLE(20U5622)
 +
|-
 +
| 以太网收发器
 +
| 10/100/1000Mbps以太网(板载PHY芯片:YT8531C)
 +
|-
 +
| 显示
 +
| ·1x HDMI TX 2.0,最大支持4K@60FPS
 +
 
 +
·1xMIPI DSI 2 Lane
  
[[File:pi3b-img20.png|434x208px]]
+
·eDP1.3
  
<ol start="5" style="list-style-type: decimal;">
+
|-
<li>Then choose to download the Linux version of the software</li></ol>
+
| 摄像头
 +
| 1xMIPI CSI 2 Lane摄像头接口
 +
|-
 +
| USB
 +
| ·1xUSB 2.0 支持Device或HOST模式
  
[[File:pi3b-img56.png|430x163px]]
+
·1xUSB 3.0 HOST
  
<ol start="6" style="list-style-type: decimal;">
+
·2xUSB 2.0 HOST
<li>Download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;'''.img'''&quot; is the image file of the operating system. The size is generally more than 2GB</li></ol>
 
  
<blockquote>The decompression command for the compressed package ending in 7z is as follows
+
|-
</blockquote>
+
| 音频
test@test:~$ '''7z x Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.160.7z'''
+
| 3.5mm耳机孔音频输入/输出
 +
|-
 +
| 按键
 +
| 1x MaskROM键,1xRESET键,1 xPOWER键
 +
|-
 +
| FAN
 +
| 2Pin 1.25mm规格的5V风扇接口
 +
|-
 +
| RTC
 +
| 2Pin 1.25mm规格的备用电池接口
 +
|-
 +
| 40Pin
 +
| 40Pin功能扩展接口,支持以下接口类型:
  
test@test:~$ '''ls Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.160.*'''
+
GPIO、UART、I2C、SPI、PWM
  
Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.160.7z Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.160.sha #checksum file
+
|-
 +
| 电源
 +
| Type-C 5V3A
 +
|-
 +
| 支持的操作系统
 +
| Android11、Ubuntu22 .04、Ubuntu20.04、Debian11、Debian12、开源鸿蒙4.0 Beta1、Orange Pi OS(Arch)、基于开源鸿蒙的Orange Pi OS(OH)等操作系统。
 +
|-
 +
| '''外观规格介绍'''
 +
|
 +
|-
 +
| PCB尺寸
 +
| 85mm x 56mm x 17mm
 +
|-
 +
| 重量
 +
| 49g
 +
|-
 +
| [] (media/image3.pn g){width=“0.2694 7944006999125in” height=“0.3153 127734033246in”}
  
Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.160.img #mirror file
+
rangePi™是 深圳市迅龙软件有 限公司的注册商标
  
<ol start="7" style="list-style-type: decimal;">
+
|
<li>After decompressing the image, you can first use the '''sha256sum -c *.sha''' command to calculate whether the checksum is correct. If the prompt is successful, it means that the downloaded image is '''correct''', and you can safely burn it to the TF card. If it prompts that the '''checksum does not match''', it means There is a problem with the downloaded image, please try to download again</li></ol>
+
|}
  
test@test:~$ '''sha256sum -c *.sha'''
+
<span id="orange-pi-3b的顶层视图和底层视图"></span>
 +
== Orange Pi 3B的顶层视图和底层视图 ==
  
Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.160.img: OK
+
'''顶层视图:'''
  
<ol start="8" style="list-style-type: decimal;">
+
<div class="figure">
<li>Then double-click '''balenaEtcher-1.5.109-x64.AppImage''' on the graphical interface of Ubuntu PC to open balenaEtcher (no installation required), and the interface after balenaEtcher is opened is shown in the figure below</li></ol>
 
  
[[File:pi3b-img57.png|423x251px]]
+
[[File:media/image4.jpeg|447x348px|_MG_1982(1)]]
  
<ol start="9" style="list-style-type: decimal;">
+
</div>
<li><p>The specific steps of using balenaEtcher to burn the Linux image are as follows</p>
+
'''底层视图:'''
<ol style="list-style-type: lower-alpha;">
 
<li><p>First select the path of the Linux image file to be burned</p></li>
 
<li><p>Then select the drive letter of the TF card</p></li>
 
<li><p>Finally, click Flash to start burning the Linux image to the TF card</p></li></ol>
 
</li></ol>
 
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img25.png|501x281px|03]]
+
[[File:media/image5.jpeg|438x331px|_MG_1986(1)]]
  
 
</div>
 
</div>
<ol start="10" style="list-style-type: decimal;">
+
<span id="orange-pi-3b的接口详情图"></span>
<li>The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the TF card</li></ol>
+
== Orange Pi 3B的接口详情图 ==
  
[[File:pi3b-img58.png|429x184px]]
+
<div class="figure">
  
<ol start="11" style="list-style-type: decimal;">
+
[[File:media/image6.jpeg|576x752px|06e73d88e8e969cc17f52f732f5f82b2]]
<li>After burning the Linux image, balenaEtcher will also verify the image burned into the TF card by default to ensure that there is no problem in the burning process. As shown in the figure below, a green progress bar indicates that the image has been burnt, and balenaEtcher is verifying the burnt image</li></ol>
 
  
[[File:pi3b-img59.png|436x190px]]
+
</div>
 +
[[File:media/image7.png|575x277px]]
  
<ol start="12" style="list-style-type: decimal;">
+
'''四个定位孔的直径都是3.0mm,M.2 PICE设备固定孔直径为3.5mm。'''
<li>After successful burning, the display interface of balenaEtcher is shown in the figure below. If a green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, and then pull out the TF card and insert it into the TF card slot of the development board for use. up</li></ol>
 
  
[[File:pi3b-img60.png|435x257px]]
+
= '''开发板使用介绍''' =
  
<span id="how-to-burn-linux-image-to-emmc"></span>
+
== 准备需要的配件 ==
== How to burn Linux image to eMMC ==
 
  
<span id="using-rkdevtool-to-burn-the-linux-image-into-emmc"></span>
+
<ol style="list-style-type: decimal;">
=== Using RKDevTool to burn the Linux image into eMMC ===
+
<li><p>TF卡,最小16GB容量(推荐32GB或以上)的'''class10'''级或以上的高速闪迪卡</p>
 +
<p>[[File:media/image8.png|124x96px]]</p></li>
 +
<li><p>TF卡读卡器,用于将镜像烧录到TF卡中</p>
 +
<p>[[File:media/image9.png|139x106px]]</p></li>
 +
<li><p>HDMI接口的显示器</p>
 +
<p>[[File:media/image10.png|256x195px]]</p></li>
 +
<li><p>HDMI转HDMI连接线,用于将开发板连接到HDMI显示器或者电视进行显示</p>
 +
<p>[[File:media/image11.png|199x129px]]</p>
 +
<p>'''注意,如果想接4K显示器,请确保HDMI线支持4K视频输出。'''</p></li>
 +
<li><p>电源适配器,Orange Pi 3B建议使用5V/3A或者5V/4A的Type-C电源供电</p>
 +
<p>[[File:media/image12.png|188x133px]]</p></li>
 +
<li><p>USB接口的鼠标和键盘,只要是标准USB接口的鼠标和键盘都可以,鼠标和键盘可以用来控制Orange Pi开发板</p>
 +
<p>[[File:media/image13.png|206x170px]]</p></li>
 +
<li><p>USB摄像头</p>
 +
<p>[[File:media/image14.png|255x148px]]</p></li>
 +
<li><p>5V的散热风扇。如下图所示,开发板上有用于接散热风扇的接口,接口规格为'''2pin 1.25mm间距'''</p>
 +
<p>'''开发板上的风扇可以通过PWM来调节转速和开关。'''</p>
 +
<p>[[File:media/image15.png|353x231px]]</p></li>
 +
<li><p>百兆或者千兆网线,用于将开发板连接到因特网</p>
 +
<p>[[File:media/image16.png|143x112px]]</p></li>
 +
<li><p>USB2.0公对公数据线,用于烧录镜像到eMMC、NVMe SSD等功能</p>
 +
<div class="figure">
  
'''Note that all the following operations are performed on a Windows computer.'''
+
[[File:media/image17.png|158x155px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
  
'''Note that the Linux image mentioned here specifically refers to the images of Linux distributions such as Debian and Ubuntu downloaded from the [http://www.orangepi.org/html/serviceAndSupport/index.html Orange Pi data download page].'''
+
</div></li>
 +
<li><p>'''3.3V'''的USB转TTL模块和杜邦线,使用串口调试功能时,需要USB转TTL模块和杜邦线来连接开发板和电脑</p>
 +
<p>[[File:media/image18.png|217x89px|G7U7JZX(V`L$`A6864]38$P]] [[File:media/image19.png|305x110px]]</p></li>
 +
<li><p>安装有Ubuntu和Windows操作系统的个人电脑</p></li></ol>
  
# The development board reserves the expansion interface of the eMMC module. Before burning the system to the eMMC, you first need to purchase an eMMC module that matches the eMMC interface of the development board. Then install the eMMC module to the development board. The eMMC module and the method of plugging into the development board are as follows:
+
{| class="wikitable"
 +
|-
 +
| style="text-align: left;"| 1
 +
| style="text-align: left;"| Ubuntu22.04 PC
 +
| style="text-align: left;"| 可选,用于编译Linux源码
 +
|-
 +
| style="text-align: left;"| 2
 +
| style="text-align: left;"| Windows PC
 +
| style="text-align: left;"| 用于烧录Android和Linux镜像
 +
|}
  
[[File:pi3b-img61.png|115x84px]] [[File:pi3b-img62.png|120x87px]]
+
== 下载开发板的镜像和相关的资料 ==
  
[[File:pi3b-img63.png|277x129px]]
+
# 中文版资料的下载网址为:
  
<ol start="2" style="list-style-type: decimal;">
+
'''http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html'''
<li>You also need to prepare a good quality USB2.0 male-to-male data cable</li></ol>
 
 
 
<div class="figure">
 
  
[[File:pi3b-img16.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
+
[[File:media/image20.png|576x455px]]
  
</div>
+
<ol start="2" style="list-style-type: decimal;">
<ol start="3" style="list-style-type: decimal;">
+
<li><p>英文版资料的下载网址为:</p>
<li><p>Then download the Rockchip driver '''DriverAssitant_v5.12.zip''' and '''MiniLoader''' and the burning tool '''RKDevTool_Release_v3.15.zip''' from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page''']</p>
+
<p>'''http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html'''</p>
 +
<p>[[File:media/image21.png|575x481px]]</p></li>
 +
<li><p>资料主要包含</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>On the data download page of Orange Pi, first select the official tool, and then enter the following folder</li></ol>
+
<li><p>'''Android源码''':保存在百度云盘和谷歌网盘上</p></li>
 +
<li><p>'''Linux源码''':保存在Github上</p></li>
 +
<li><p>'''用户手册和原理图:'''保存在百度云盘和谷歌网盘上</p></li>
 +
<li><p>'''官方工具:'''主要包括开发板使用过程中需要用到的软件</p></li>
 +
<li><p>'''Android镜像''':保存在百度云盘和谷歌网盘上</p></li>
 +
<li><p>'''Ubuntu镜像''':保存在百度云盘和谷歌网盘上</p></li>
 +
<li><p>'''Debian镜像''':保存在百度云盘和谷歌网盘上</p></li>
 +
<li><p>'''Orange Pi OS镜像''':保存在百度云盘和谷歌网盘上</p></li>
 +
<li><p>'''OpenHarmony镜像''':保存在百度云盘和谷歌网盘上</p></li></ol>
 
</li></ol>
 
</li></ol>
  
<div class="figure">
+
<span id="基于windows-pc将linux镜像烧写到tf卡的方法"></span>
 +
== 基于Windows PC将Linux镜像烧写到TF卡的方法 ==
  
[[File:pi3b-img29.png|360x115px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\6d1c77df7eeb7e491e5f79e8d85cbdc.png6d1c77df7eeb7e491e5f79e8d85cbdc]]
+
'''注意,这里说的Linux镜像具体指的是从[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange Pi资料下载页面]下载的Debian、Ubuntu这样的Linux发行版镜像。'''
  
</div>
+
<span id="使用balenaetcher烧录linux镜像的方法"></span>
<ol start="2" style="list-style-type: lower-alpha;">
+
=== '''使用'''balenaEtcher'''烧录Linux镜像的方法''' ===
<li>Then download all the files below</li></ol>
 
  
<div class="figure">
+
# 首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''级或'''class10'''级以上,建议使用闪迪等品牌的TF卡
 +
# 然后使用读卡器把TF卡插入电脑
 +
# 从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”'''.img'''”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上。
 +
# 然后下载Linux镜像的烧录软件——'''balenaEtcher''',下载地址为:
  
[[File:pi3b-img30.png|320x144px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\34acacded202b29eee42fd20f5b4c92.png34acacded202b29eee42fd20f5b4c92]]
+
[https://www.balena.io/etcher/ '''https://www.balena.io/etcher/''']
  
</div>
+
<ol start="5" style="list-style-type: decimal;">
'''Note that the &quot;MiniLoader-things needed to burn the Linux image&quot; folder is hereinafter referred to as the MiniLoader folder.'''
+
<li><p>进入balenaEtcher下载页面后,点击绿色的下载按钮会跳到软件下载的地方</p>
 +
<p>[[File:media/image22.png|359x172px]]</p></li>
 +
<li><p>然后可以选择下载balenaEtcher的Portable版本的软件,Portable版本无需安装,双击打开就可以使用</p>
 +
<p>[[File:media/image23.png|382x141px]]</p></li>
 +
<li><p>如果下载的是需要安装版本的balenaEtcher,请先安装再使用。如果下载的Portable版本balenaEtcher,直接双击打开即可,打开后的balenaEtcher界面如下图所示:</p>
 +
<p>[[File:media/image24.png|369x233px]]</p></li></ol>
  
<ol start="4" style="list-style-type: decimal;">
+
'''打开balenaEtcher时如果提示下面的错误:'''
<li><p>Then download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;'''.img'''&quot; is the image file of the operating system , the size is generally more than 2GB</p></li>
 
<li><p>Then use the decompression software to decompress '''DriverAssitant_v5.12.zip''', and then find the '''DriverInstall.exe''' executable file in the decompressed folder and open it</p></li></ol>
 
  
[[File:pi3b-img31.png|496x146px]]
+
[[File:media/image25.png|209x164px]]
  
<ol start="6" style="list-style-type: decimal;">
+
'''请选择balenaEtcher后点击右键,然后选择以管理员身份运行。'''
<li><p>After opening '''DriverInstall.exe''', the steps to install the Rockchip driver are as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Click the &quot;'''Driver Installation'''&quot; button</li></ol>
 
</li></ol>
 
  
[[File:pi3b-img32.png|284x149px]]
+
[[File:media/image26.png|273x37px]]
  
<ol start="2" style="list-style-type: lower-alpha;">
+
<ol start="8" style="list-style-type: decimal;">
<li>After waiting for a period of time, a pop-up window will prompt &quot;'''The driver is installed successfully'''&quot;, and then click the &quot;'''OK'''&quot; button.</li></ol>
+
<li><p>使用balenaEtcher烧录Linux镜像的具体步骤如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先选择要烧录的Linux镜像文件的路径</p></li>
 +
<li><p>然后选择TF卡的盘符</p></li>
 +
<li><p>最后点击Flash就会开始烧录Linux镜像到TF卡中</p>
 +
<p>[[File:media/image27.png|423x237px]]</p></li></ol>
 +
</li>
 +
<li><p>balenaEtcher烧录Linux镜像的过程显示的界面如下图所示,另外进度条显示紫色表示正在烧录Linux镜像到TF卡中</p>
 +
<p>[[File:media/image28.png|428x268px]]</p></li>
 +
<li><p>Linux镜像烧录完后,balenaEtcher默认还会对烧录到TF卡中的镜像进行校验,确保烧录过程没有出问题。如下图所示,显示绿色的进度条就表示镜像已经烧录完成,balenaEtcher正在对烧录完成的镜像进行校验</p>
 +
<p>[[File:media/image29.png|427x267px]]</p></li>
 +
<li><p>成功烧录完成后balenaEtcher的显示界面如下图所示,如果显示绿色的指示图标说明镜像烧录成功,此时就可以退出balenaEtcher,然后拔出TF卡插入到开发板的TF卡槽中使用了</p>
 +
<p>[[File:media/image30.png|430x266px]]</p></li></ol>
  
[[File:pi3b-img33.png|296x154px]]
+
<span id="使用rkdevtool烧录linux镜像到tf卡中的方法"></span>
 +
=== 使用RKDevTool烧录Linux镜像到TF卡中的方法 ===
  
<ol start="7" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li>Then decompress '''RKDevTool_Release_v3.15.zip''', this software does not need to be installed, just find '''RKDevTool''' in the decompressed folder and open it</li></ol>
+
<li><p>首先需要准备一根品质良好的USB2.0公对公数据线</p>
 +
<div class="figure">
  
[[File:pi3b-img34.png|484x143px]]
+
[[File:media/image17.png|146x143px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
  
<ol start="8" style="list-style-type: decimal;">
+
</div></li>
<li>After opening the '''RKDevTool''' burning tool, because the computer has not connected to the development board through the USB2.0 male-to-male data cable at this time, the lower left corner will prompt &quot;'''No device found'''&quot;</li></ol>
+
<li><p>还需要准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''级或'''class10'''级以上,建议使用闪迪等品牌的TF卡</p></li>
 
+
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载瑞芯微驱动'''DriverAssitant_v5.12.zip'''和'''MiniLoader'''以及烧录工具'''RKDevTool_Release_v3.15.zip'''</p>
[[File:pi3b-img35.png|442x208px]]
+
<ol style="list-style-type: lower-alpha;">
 
+
<li><p>在[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange &gt; Pi的资料下载页面]首先选择'''官方工具''',然后进入下面的文件夹中</p>
<ol start="9" style="list-style-type: decimal;">
+
<p>[[File:media/image31.png|267x56px]]</p></li>
<li><p>Then start burning the Linux image into eMMC</p>
+
<li><p>然后下载下面的所有文件</p>
 +
<p>[[File:media/image32.png|246x97px]]</p>
 +
<p>'''注意,“MiniLoader-烧录Linux镜像才需要用到的东西”文件夹下文简称为MiniLoader文件夹。'''</p></li></ol>
 +
</li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”'''.img'''”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上</p></li>
 +
<li><p>然后用解压软件解压'''DriverAssitant_v5.12.zip''',再在解压后的文件夹中找到'''DriverInstall.exe'''可执行文件并打开即可</p>
 +
<p>[[File:media/image33.png|464x136px]]</p></li>
 +
<li><p>打开'''DriverInstall.exe'''后安装瑞芯微驱动的步骤如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>点击”'''驱动安装'''”按钮</p>
 +
<p>[[File:media/image34.png|245x129px]]</p></li>
 +
<li><p>等待一段时间后,会弹出窗口提示”'''安装驱动成功'''”,然后点击'''“确定”'''按钮即可</p>
 +
<p>[[File:media/image35.png|254x132px]]</p></li></ol>
 +
</li>
 +
<li><p>然后解压'''RKDevTool_Release_v3.15.zip''',此软件无需安装,在解压后的文件夹中找到 '''RKDevTool'''打开即可</p>
 +
<p>[[File:media/image36.png|448x132px]]</p></li>
 +
<li><p>打开'''RKDevTool''' 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”'''没有发现设备'''”</p>
 +
<p>[[File:media/image37.png|402x189px]]</p></li>
 +
<li><p>然后开始烧录Linux镜像到TF卡中</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>First, connect the development board to the Windows computer through the USB2.0 male-to-male data cable. The position of the USB2.0 programming port of the development board is shown in the figure below</li></ol>
+
<li><p>首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录口的位置如下图所示</p>
</li></ol>
+
<p>[[File:media/image38.png|271x117px]]</p></li>
 
+
<li><p>确保TF卡插槽没有插入TF卡</p></li>
 +
<li><p>然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:</p>
 +
<p>[[File:media/image39.png|289x100px]]</p></li>
 +
<li><p>然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了</p>
 +
<p>[[File:media/image40.png|305x94px]]</p></li>
 +
<li><p>如果前面的步骤顺利,此时开发板会进入'''MASKROM'''模式,在烧录工具的界面上会提示”'''发现一个MASKROM设备'''”</p>
 +
<p>[[File:media/image41.png|454x213px]]</p></li>
 +
<li><p>此时请在TF卡插槽中插入TF卡</p></li>
 +
<li><p>然后将鼠标光标放在下面的这片区域中</p>
 +
<p>[[File:media/image42.png|452x212px]]</p></li>
 +
<li><p>然后点击鼠标右键会弹出下图所示的选择界面</p>
 +
<p>[[File:media/image43.png|453x213px]]</p></li>
 +
<li><p>然后选择'''导入配置'''选项</p>
 +
<p>[[File:media/image44.png|458x215px]]</p></li>
 +
<li><p>然后选择前面下载的'''MiniLoader'''文件夹中的'''rk3588_linux_tfcard.cfg'''配置文件,再点击'''打开'''</p>
 +
<p>[[File:media/image45.png|457x215px]]</p></li>
 +
<li><p>然后点击'''确定'''</p>
 +
<p>[[File:media/image46.png|483x227px]]</p></li>
 +
<li><p>然后点击下图所示的位置</p>
 +
<p>[[File:media/image47.png|486x228px]]</p></li>
 +
<li><p>再选择前面下载的'''MiniLoader'''文件夹中'''rk3566_MiniLoaderAll.bin''',再点击'''打开'''</p>
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img36.png|275x116px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\1691131157154(1).jpg1691131157154(1)]]
+
[[File:media/image48.png|494x232px|[78~~Z7UFB@US@8P$QL%OM6]]
  
</div>
+
</div></li>
<ol start="2" style="list-style-type: lower-alpha;">
+
<li><p>然后点击下图所示的位置</p>
<li><p>Make sure that the development board is not inserted into the TF card and not connected to the power supply</p></li>
+
<p>[[File:media/image49.png|493x232px]]</p></li>
<li><p>Then press and hold the MaskROM button on the development board, the position of the MaskROM button on the development board is shown in the figure below:</p></li></ol>
+
<li><p>然后选择想要烧录的Linux镜像的路径,再点击'''打开'''</p>
 +
<p>'''在烧录镜像前,建议将要烧录的Linux镜像重命名为orangepi.img或者其它比较短的名字,这样在烧录镜像的时候就能看到烧录进度的百分比数值。'''</p>
 +
<p>[[File:media/image50.png|499x234px]]</p></li>
 +
<li><p>然后请勾选上'''强制按地址写'''选项</p>
 +
<p>[[File:media/image51.png|497x234px]]</p></li>
 +
<li><p>再点击执行按钮就会开始烧录Linux镜像到开发板的tf卡中</p>
 +
<p>[[File:media/image52.png|497x233px]]</p></li>
 +
<li><p>Linux镜像烧录完后的显示log如下图所示</p>
 +
<div class="figure">
  
[[File:pi3b-img37.png|289x100px]]
+
[[File:media/image53.png|492x231px|%O4~FPPAT$0RH{3S~CGJ@@Q(1)]]
  
<ol start="4" style="list-style-type: lower-alpha;">
+
</div></li>
<li>Then connect the power supply of the Type-C interface to the development board, and power on, and then release the MaskROM button</li></ol>
+
<li><p>烧录完Linux镜像到tf卡中后,Linux系统会自动启动。</p></li></ol>
 +
</li></ol>
  
[[File:pi3b-img38.png|305x94px]]
+
<span id="使用win32diskimager烧录linux镜像的方法"></span>
 +
=== '''使用Win32Diskimager烧录Linux镜像的方法''' ===
  
<ol start="5" style="list-style-type: lower-alpha;">
+
<ol style="list-style-type: decimal;">
<li>If the previous steps are successful, the development board will enter the '''MASKROM''' mode at this time, and the interface of the burning tool will prompt &quot;'''found a MASKROM device'''&quot;</li></ol>
+
<li><p>首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''级或'''class10'''级以上,建议使用闪迪等品牌的TF卡</p></li>
 +
<li><p>然后使用读卡器把TF卡插入电脑</p></li>
 +
<li><p>接着格式化TF卡</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li>可以使用'''SD Card Formatter'''这个软件格式化TF卡,其下载地址为</li></ol>
 +
</li></ol>
  
[[File:pi3b-img39.png|457x215px]]
+
[https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip '''https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip''']
 
 
<ol start="6" style="list-style-type: lower-alpha;">
 
<li>Then place the mouse cursor in the area below</li></ol>
 
  
 +
<ol start="2" style="list-style-type: lower-alpha;">
 +
<li><p>下载完后直接解压安装即可,然后打开软件</p></li>
 +
<li><p>如果电脑只插入了TF卡,则”'''Select card'''”一栏中会显示TF卡的盘符,如果电脑插入了多个USB存储设备,可以通过下拉框选择TF卡对应的盘符</p>
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img64.png|458x215px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题-4.jpg未标题-4]]
+
[[File:media/image54.png|209x228px|选区_199]]
  
</div>
+
</div></li>
<ol start="7" style="list-style-type: lower-alpha;">
+
<li><p>然后点击”'''Format'''”,格式化前会弹出一个警告框,选择”'''是(Y)'''”后就会开始格式化</p></li></ol>
<li>Then click the right mouse button and the selection interface shown in the figure below will pop up</li></ol>
 
  
[[File:pi3b-img41.png|460x216px]]
+
[[File:media/image55.png|304x147px]]
  
<ol start="8" style="list-style-type: lower-alpha;">
+
<ol start="5" style="list-style-type: lower-alpha;">
<li>Then select the '''import configuration''' option</li></ol>
+
<li><p>格式化完TF卡后会弹出下图所示的信息,点击确定即可</p>
 +
<p>[[File:media/image56.png|186x149px]]</p></li></ol>
  
[[File:pi3b-img42.png|458x215px]]
+
<!-- -->
 +
<ol start="4" style="list-style-type: decimal;">
 +
<li><p>从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”'''.img'''”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上</p></li>
 +
<li><p>使用'''Win32Diskimager'''烧录Linux镜像到TF卡</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li>Win32Diskimager的下载页面为</li></ol>
 +
</li></ol>
  
<ol style="list-style-type: lower-roman;">
+
[http://sourceforge.net/projects/win32diskimager/files/Archive/ '''http://sourceforge.net/projects/win32diskimager/files/Archive/''']
<li>Then select the '''rk3588_Linux_emmc.cfg''' configuration file in the '''MiniLoader''' folder downloaded earlier, and click '''Open'''</li></ol>
 
  
[[File:pi3b-img65.png|466x219px]]
+
<ol start="2" style="list-style-type: lower-alpha;">
 +
<li><p>下载完后直接安装即可,Win32Diskimager界面如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先选择镜像文件的路径</p></li>
 +
<li><p>然后确认下TF卡的盘符和”'''设备'''”一栏中显示的一致</p></li>
 +
<li><p>最后点击”'''写入'''”即可开始烧录</p>
 +
<p>[[File:media/image57.png|297x206px]]</p></li></ol>
 +
</li>
 +
<li><p>镜像写入完成后,点击”'''退出'''”按钮退出即可,然后就可以拔出TF卡插到开发板中启动</p></li></ol>
  
<ol start="10" style="list-style-type: lower-alpha;">
+
<span id="基于ubuntu-pc将linux镜像烧写到tf卡的方法"></span>
<li>Then click '''OK'''</li></ol>
+
== 基于Ubuntu PC将Linux镜像烧写到TF卡的方法 ==
  
[[File:pi3b-img66.png|468x220px]]
+
'''注意,这里说的Linux镜像具体指的是从[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange Pi资料下载页面]下载的Debian、Ubuntu这样的Linux发行版镜像,Ubuntu PC指的是安装了Ubuntu系统的个人电脑。'''
  
<ol start="11" style="list-style-type: lower-alpha;">
+
# 首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''级或'''class10'''级以上,建议使用闪迪等品牌的TF卡
<li>Then click the position shown in the figure below</li></ol>
+
# 然后使用读卡器把TF卡插入电脑
 +
# 下载balenaEtcher软件,下载地址为
  
[[File:pi3b-img67.png|462x217px]]
+
[https://www.balena.io/etcher/ '''https://www.balena.io/etcher/''']
  
<ol start="12" style="list-style-type: lower-alpha;">
+
<ol start="4" style="list-style-type: decimal;">
<li>Then select '''rk3566_MiniLoaderAll.bin''' in the '''MiniLoader''' folder downloaded earlier, and then click to '''open'''</li></ol>
+
<li><p>进入balenaEtcher下载页面后,点击绿色的下载按钮会跳到软件下载的地方</p>
 +
<p>[[File:media/image22.png|434x208px]]</p></li>
 +
<li><p>然后选择下载Linux版本的软件即可</p>
 +
<p>[[File:media/image58.png|430x163px]]</p></li>
 +
<li><p>从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”'''.img'''”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上</p>
 +
<p>7z结尾的压缩包的解压命令如下所示</p>
 +
<p>test@test:~$ '''7z x Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.7z'''</p>
 +
<p>test@test:~$ '''ls Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.*'''</p>
 +
<p>Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.7z Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.sha #校验和文件</p>
 +
<p>Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.img #镜像文件</p></li>
 +
<li><p>解压镜像后可以先用'''sha256sum -c *.sha'''命令计算下校验和是否正确,如果提示'''成功'''说明下载的镜像没有错,可以放心的烧录到TF卡,如果提示'''校验和不匹配'''说明下载的镜像有问题,请尝试重新下载</p>
 +
<p>test@test:~$ '''sha256sum -c *.sha'''</p>
 +
<p>Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.img: OK</p></li>
 +
<li><p>然后在Ubuntu PC的图形界面双击'''balenaEtcher-1.5.109-x64.AppImage'''即可打开balenaEtcher('''无需安装'''),balenaEtcher打开后的界面显示如下图所示</p>
 +
<p>[[File:media/image59.png|423x251px]]</p></li>
 +
<li><p>使用balenaEtcher烧录Linux镜像的具体步骤如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先选择要烧录的Linux镜像文件的路径</p></li>
 +
<li><p>然后选择TF卡的盘符</p></li>
 +
<li><p>最后点击Flash就会开始烧录Linux镜像到TF卡中</p>
 +
<p>[[File:media/image60.png|431x278px]]</p></li></ol>
 +
</li>
 +
<li><p>balenaEtcher烧录Linux镜像的过程显示的界面如下图所示,另外进度条显示紫色表示正在烧录Linux镜像到TF卡中</p>
 +
<p>[[File:media/image61.png|429x184px]]</p></li>
 +
<li><p>Linux镜像烧录完后,balenaEtcher默认还会对烧录到TF卡中的镜像进行校验,确保烧录过程没有出问题。如下图所示,显示绿色的进度条就表示镜像已经烧录完成,balenaEtcher正在对烧录完成的镜像进行校验</p>
 +
<p>[[File:media/image62.png|436x190px]]</p></li></ol>
  
<div class="figure">
+
<!-- -->
 +
<ol start="12" style="list-style-type: decimal;">
 +
<li><p>成功烧录完成后balenaEtcher的显示界面如下图所示,如果显示绿色的指示图标说明镜像烧录成功,此时就可以退出balenaEtcher,然后拔出TF卡插入到开发板的TF卡槽中使用了</p>
 +
<p>[[File:media/image63.png|435x257px]]</p></li></ol>
  
[[File:pi3b-img68.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
+
<span id="烧录linux镜像到emmc中的方法"></span>
 +
== 烧录Linux镜像到eMMC中的方法 ==
  
</div>
+
<span id="使用rkdevtool烧录linux镜像到emmc中的方法"></span>
<ol start="13" style="list-style-type: lower-alpha;">
+
=== 使用RKDevTool烧录Linux镜像到eMMC中的方法 ===
<li>Then click the position shown in the figure below</li></ol>
 
  
[[File:pi3b-img69.png|459x216px]]
+
'''注意,下面所有的操作都是在Windows电脑中进行的。'''
  
<ol start="14" style="list-style-type: lower-alpha;">
+
'''注意,这里说的Linux镜像具体指的是从[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange Pi资料下载页面]下载的Debian、Ubuntu这样的Linux发行版镜像。'''
<li>Then select the path of the Linux image you want to burn, and then click '''Open'''</li></ol>
 
  
'''Before burning the image, it is recommended to rename the Linux image to be burned to orangepi.img or other shorter names, so that you can see the percentage value of the burning progress when burning the image.'''
+
<ol style="list-style-type: decimal;">
 +
<li><p>开发板预留了eMMC模块的扩展接口,烧录系统到eMMC前,首先需要购买一个与开发板eMMC接口相匹配的eMMC模块。然后将eMMC模块安装到开发板上。eMMC模块和插入开发板的方法如下所示:</p>
 +
<p>[[File:media/image64.png|115x84px]] [[File:media/image65.png|120x87px]]</p>
 +
<p>[[File:media/image66.png|277x129px]]</p></li>
 +
<li><p>还需要准备一根品质良好的USB2.0公对公数据线</p>
 +
<div class="figure">
  
[[File:pi3b-img48.png|499x234px]]
+
[[File:media/image17.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
  
<ol start="15" style="list-style-type: lower-alpha;">
+
</div></li>
<li>Then please check the option to '''force writing by address'''</li></ol>
+
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载瑞芯微驱动'''DriverAssitant_v5.12.zip'''和'''MiniLoader'''以及烧录工具'''RKDevTool_Release_v3.15.zip'''</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>在[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange &gt; Pi的资料下载页面]首先选择官方工具,然后进入下面的文件夹中</p>
 +
<p>[[File:media/image31.png|366x77px]]</p></li>
 +
<li><p>然后下载下面的所有文件</p>
 +
<p>[[File:media/image32.png|315x125px]]</p>
 +
<p>'''注意,“MiniLoader-烧录Linux镜像才需要用到的东西”文件夹下文简称为MiniLoader文件夹。'''</p></li></ol>
 +
</li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”'''.img'''”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上</p></li>
 +
<li><p>然后用解压软件解压'''DriverAssitant_v5.12.zip''',再在解压后的文件夹中找到'''DriverInstall.exe'''可执行文件并打开即可</p>
 +
<p>[[File:media/image33.png|496x146px]]</p></li>
 +
<li><p>打开'''DriverInstall.exe'''后安装瑞芯微驱动的步骤如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>点击”'''驱动安装'''”按钮</p>
 +
<p>[[File:media/image34.png|284x149px]]</p></li>
 +
<li><p>等待一段时间后,会弹出窗口提示”'''安装驱动成功'''”,然后点击'''“确定”'''按钮即可</p>
 +
<p>[[File:media/image35.png|296x154px]]</p></li></ol>
 +
</li>
 +
<li><p>然后解压'''RKDevTool_Release_v3.15.zip''',此软件无需安装,在解压后的文件夹中找到 '''RKDevTool'''打开即可</p>
 +
<p>[[File:media/image36.png|484x143px]]</p></li>
 +
<li><p>打开'''RKDevTool''' 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”'''没有发现设备'''”</p>
 +
<p>[[File:media/image37.png|442x208px]]</p></li>
 +
<li><p>然后开始烧录Linux镜像到eMMC中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录口的位置如下图所示</p>
 +
<p>[[File:media/image38.png|275x118px]]</p></li>
 +
<li><p>确保开发板没有插入TF卡,没有连接电源</p></li>
 +
<li><p>然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:</p>
 +
<p>[[File:media/image39.png|289x100px]]</p></li>
 +
<li><p>然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了</p>
 +
<p>[[File:media/image40.png|305x94px]]</p></li>
 +
<li><p>如果前面的步骤顺利,此时开发板会进入'''MASKROM'''模式,在烧录工具的界面上会提示”'''发现一个MASKROM设备'''”</p>
 +
<p>[[File:media/image41.png|457x215px]]</p></li>
 +
<li><p>然后将鼠标光标放在下面的这片区域中</p>
 +
<p>[[File:media/image42.png|458x215px]]</p></li>
 +
<li><p>然后点击鼠标右键会弹出下图所示的选择界面</p>
 +
<p>[[File:media/image43.png|460x216px]]</p></li>
 +
<li><p>然后选择'''导入配置'''选项</p>
 +
<p>[[File:media/image44.png|458x215px]]</p></li>
 +
<li><p>然后选择前面下载的'''MiniLoader'''文件夹中的'''rk3588_linux_emmc.cfg'''配置文件,再点击'''打开'''</p>
 +
<p>[[File:media/image67.png|466x219px]]</p></li>
 +
<li><p>然后点击'''确定'''</p>
 +
<p>[[File:media/image68.png|468x220px]]</p></li>
 +
<li><p>然后点击下图所示的位置</p>
 +
<p>[[File:media/image69.png|462x217px]]</p></li>
 +
<li><p>再选择前面下载的'''MiniLoader'''文件夹中'''rk3566_MiniLoaderAll.bin''',再点击'''打开'''</p>
 +
<div class="figure">
  
[[File:pi3b-img70.png|501x235px]]
+
[[File:media/image70.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
  
<ol start="16" style="list-style-type: lower-alpha;">
+
</div></li>
<li>Click the execute button again to start burning the Linux image to the eMMC of the development board</li></ol>
+
<li><p>然后点击下图所示的位置</p>
 +
<p>[[File:media/image71.png|459x216px]]</p></li>
 +
<li><p>然后选择想要烧录的Linux镜像的路径,再点击'''打开'''</p>
 +
<p>'''在烧录镜像前,建议将要烧录的Linux镜像重命名为orangepi.img或者其它比较短的名字,这样在烧录镜像的时候就能看到烧录进度的百分比数值。'''</p>
 +
<p>[[File:media/image50.png|499x234px]]</p></li>
 +
<li><p>然后请勾选上'''强制按地址写'''选项</p>
 +
<p>[[File:media/image72.png|501x235px]]</p></li>
 +
<li><p>再点击执行按钮就会开始烧录Linux镜像到开发板的eMMC中</p>
 +
<p>[[File:media/image73.png|502x236px]]</p></li>
 +
<li><p>Linux镜像烧录完后的显示log如下图所示</p>
 +
<p>[[File:media/image74.png|500x235px]]</p></li>
 +
<li><p>烧录完Linux镜像到eMMC中后,Linux系统会自动启动。</p>
 +
<p>'''注意,烧录镜像到eMMC中后如果测试发现启动不了,请清空下SPIFlash后再启动试下。清空SPIFlash的方法请参考[[\l|使用RKDevTool清空SPIFlash的方法]]小节的内容。'''</p></li></ol>
 +
</li></ol>
  
[[File:pi3b-img71.png|502x236px]]
+
<span id="使用dd命令烧录linux镜像到emmc中的方法"></span>
 +
=== 使用dd命令烧录Linux镜像到eMMC中的方法 ===
  
<ol start="17" style="list-style-type: lower-alpha;">
+
'''注意,这里说的Linux镜像具体指的是从Orange Pi资料下载页面下载的Debian、Ubuntu或者OPi OS Arch这样的Linux发行版镜像。'''
<li>The log displayed after burning the Linux image is shown in the figure below</li></ol>
 
  
[[File:pi3b-img72.png|500x235px]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>开发板预留了eMMC模块的扩展接口,烧录系统到eMMC前,首先需要购买一个与开发板eMMC接口相匹配的eMMC模块。然后将eMMC模块安装到开发板上。eMMC模块和插入开发板的方法如下所示:</p>
 +
<p>[[File:media/image64.png|115x84px]] [[File:media/image65.png|120x87px]]</p>
 +
<p>[[File:media/image66.png|286x133px]]</p></li>
 +
<li><p>使用dd命令烧录Linux镜像到eMMC中需要借助TF卡来完成,所以首先需要将Linux镜像烧录到TF卡上,然后使用TF卡启动开发板进入Linux系统。烧录Linux镜像到TF卡的方法请见[[\l|'''基于Windows PC将Linux镜像烧录到TF卡的方法''']]和[[\l|'''基于Ubuntu PC将Linux镜像烧录到TF卡的方法''']]两小节的说明。</p></li>
 +
<li><p>使用TF卡启动Linux系统后,我们首先将解压后的Linux镜像文件(从官网下载的Debian、Ubuntu镜像或者OPi OS(Arch)镜像)上传到TF卡中。上传Linux镜像文件到开发板中的方法请参考[[\l|'''上传文件到开发板Linux系统中的方法''']]小节的说明。</p></li>
 +
<li><p>上传完镜像到开发板的Linux系统中后,我们再在开发板Linux系统的命令行中进入镜像文件的存放路径,比如,我将开发板的Linux镜像存放在'''/home/orangepi/Desktop'''目录下了,然后进入'''/home/orangepi/Desktop'''目录就能看到上传的镜像文件了。</p>
 +
<p>orangepi@orangepi:~$ '''cd /home/orangepi/Desktop'''</p>
 +
<p>orangepi@orangepi:~/Desktop$ '''ls'''</p>
 +
<p>Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img</p>
 +
<p>'''怎么进入开发板Linux系统的命令行?'''</p></li></ol>
  
<ol start="18" style="list-style-type: lower-alpha;">
+
<!-- -->
<li>After burning the Linux image into the eMMC, the Linux system will start automatically.</li></ol>
+
# '''使用串口登录终端的方法请参考[[\l|调试串口的使用方法]]一小节的说明。'''
 +
# '''使用ssh远程登录Linux系统请参考[[\l|SSH远程登录开发板]]一小节的说明。'''
 +
# '''如果接了HDMI、LCD等显示屏幕,可以在桌面中打开一个命令行终端。'''
  
'''Note, after burning the image into eMMC, if the test finds that it cannot be started, please clear the SPIFlash and try again. For the method of clearing SPIFlash, please refer to [[\l|the method of using RKDevTool to clear SPIFlash]].'''
+
<!-- -->
 +
<ol start="5" style="list-style-type: decimal;">
 +
<li><p>接下来,我们先使用下面的命令确认下eMMC的设备节点</p>
 +
<p>orangepi@orangepi:~/Desktop$ '''ls /dev/mmcblk*boot0 | cut -c1-12'''</p>
 +
<p>'''/dev/mmcblk0'''</p></li>
 +
<li><p>然后我们可以使用dd命令清空下eMMC,注意'''of='''参数后面请填入上面命令输出的结果</p>
 +
<p>orangepi@orangepi:~/Desktop$ '''sudo dd bs=1M if=/dev/zero of=/dev/mmcblk0 count=1000 status=progress'''</p>
 +
<p>orangepi@orangepi:~/Desktop$ '''sudo sync'''</p></li>
 +
<li><p>然后就可以使用dd命令烧录开发板的Linux镜像到eMMC中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>下面的命令中 '''if=''' &gt; 参数后面是要填写Linux镜像存放的完整路径+Linux镜像的名字(比如'''/home/orangepi/Desktop/Linux镜像的名字''')。因为上面我们已经进入Linux镜像的路径下了,所以只需要填写Linux镜像的名字的即可。</p></li>
 +
<li><p>下面命令中的Linux镜像名请不要照抄,要替换为实际的镜像名(因为镜像的版本号可能会更新)。</p>
 +
<p>'''sudo dd bs=1M if=Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img of=/dev/mmcblk0 status=progress'''</p>
 +
<p>'''sudo''' '''sync'''</p>
 +
<p>'''注意,如果上传的是 .7z或者.xz 结尾Linux镜像压缩文件,使用dd命令烧录前请记得先解压。'''</p>
 +
<p>'''dd命令的所有参数的详细说明和更多用法可以在Linux系统中执行man dd命令来查看。'''</p></li></ol>
 +
</li>
 +
<li><p>当成功烧录开发板的Linux镜像到eMMC后,此时就可以使用'''poweroff'''命令关机了。然后请拔出TF卡,再短按电源按键开机,此时就会启动eMMC中的Linux系统了。</p>
 +
<p>'''注意,烧录镜像到eMMC中后如果测试发现启动不了,请清空下SPIFlash后再启动试下。清空SPIFlash的方法请参考[[\l|使用RKDevTool清空SPIFlash的方法]]小节的内容。'''</p></li></ol>
  
<span id="use-the-dd-command-to-burn-the-linux-image-into-emmc"></span>
+
<span id="烧写linux镜像到spiflashnvme-ssd中的方法"></span>
=== Use the dd command to burn the Linux image into eMMC ===
+
== 烧写Linux镜像到SPIFlash+NVMe SSD中的方法 ==
  
'''Note that the Linux image mentioned here specifically refers to the image of Linux distributions such as Debian, Ubuntu, OpenWRT or OPi OS Arch downloaded from the [http://www.orangepi.org/html/serviceAndSupport/index.html Orange Pi data download page].'''
+
'''注意,这里说的Linux镜像具体指的是从Orange Pi资料下载页面下载的Debian、Ubuntu这样的Linux发行版镜像。'''
  
# The development board reserves the expansion interface of the eMMC module. Before burning the system to the eMMC, you first need to purchase an eMMC module that matches the eMMC interface of the development board. Then install the eMMC module to the development board. The eMMC module and the method of plugging into the development board are as follows:
+
'''注意,下面所有的操作都是在Windows电脑中进行的。'''
  
[[File:pi3b-img61.png|115x84px]] [[File:pi3b-img62.png|120x87px]]
+
<span id="使用rkdevtool烧录的方法"></span>
 +
=== 使用RKDevTool烧录的方法 ===
  
[[File:pi3b-img63.png|286x133px]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>首先需要准备一个NVMe SSD固态硬盘,开发板M.2插槽支持的PCIe为PCIe2.0x1,理论最高速度为500MB/s。PCIe3.0和PCIe4.0的NVMe SSD也是可以用的,只是速度最高只有PCIe2.0x1的速度。</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>M.2 2230规格的SSD如下所示</p>
 +
<p>[[File:media/image75.png|157x128px]]</p></li>
 +
<li><p>M.2 2242规格的SSD如下所示</p>
 +
<p>[[File:media/image76.png|174x105px]]</p></li></ol>
 +
</li>
 +
<li><p>然后把NVMe SSD插入开发板的M.2 PCIe接口,并固定好</p>
 +
<p>[[File:media/image77.png|283x63px]]</p></li>
 +
<li><p>SPI Flash在开发板上的位置如下图所示,开始烧录前无需其他设置</p>
 +
<p>[[File:media/image78.png|266x211px]]</p></li>
 +
<li><p>然后需要准备一根品质良好的USB2.0公对公数据线</p>
 +
<div class="figure">
  
<ol start="2" style="list-style-type: decimal;">
+
[[File:media/image17.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
<li><p>Using the dd command to burn the Linux image to eMMC needs to be completed with the help of a TF card, so first you need to burn the Linux image to the TF card, and then use the TF card to start the development board to enter the Linux system. For the method of burning the Linux image to the TF card, please refer to the instructions in the two sections of [[\l|'''the method of burning the Linux image to the TF card based on the Windows PC''']] and [[\l|'''the method of burning the Linux image to the TF card based on the Ubuntu PC''']].</p></li>
 
<li><p>After using the TF card to start the Linux system, we first upload the decompressed Linux image file (Debian, Ubuntu image or OPi Arch image downloaded from the official website) to the TF card. For the method of uploading the Linux image file to the development board, please refer to the description in the section of [[\l|'''the method of uploading files to the development board Linux system''']].</p></li>
 
<li><p>After uploading the image to the Linux system of the development board, we enter the storage path of the image file in the command line of the Linux system of the development board. For example, I store the Linux image of the development board in the '''/home/orangepi/Desktop''' directory Download it, and then enter the '''/home/orangepi/Desktop''' directory to see the uploaded image file.</p></li></ol>
 
  
orangepi@orangepi:~$ '''cd /home/orangepi/Desktop'''
+
</div></li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载瑞芯微驱动'''DriverAssitant_v5.12.zip'''和'''MiniLoader'''以及烧录工具'''RKDevTool_Release_v3.15.zip'''</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>在[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange &gt; Pi的资料下载页面]首先选择'''官方工具''',然后进入下面的文件夹中</p>
 +
<p>[[File:media/image31.png|294x61px]]</p></li>
 +
<li><p>然后下载下面的所有文件</p>
 +
<p>[[File:media/image32.png|244x97px]]</p>
 +
<p>'''注意,“MiniLoader-烧录Linux镜像才需要用到的东西”文件夹下文简称为MiniLoader文件夹。'''</p></li></ol>
 +
</li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”'''.img'''”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上</p></li>
 +
<li><p>然后用解压软件解压'''DriverAssitant_v5.12.zip''',再在解压后的文件夹中找到'''DriverInstall.exe'''可执行文件并打开即可</p>
 +
<p>[[File:media/image33.png|446x131px]]</p></li>
 +
<li><p>打开'''DriverInstall.exe'''后安装瑞芯微驱动的步骤如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>点击”'''驱动安装'''”按钮</p>
 +
<p>[[File:media/image34.png|253x133px]]</p></li>
 +
<li><p>等待一段时间后,会弹出窗口提示”'''安装驱动成功'''”,然后点击'''“确定”'''按钮即可</p>
 +
<p>[[File:media/image35.png|269x140px]]</p></li></ol>
 +
</li>
 +
<li><p>然后解压'''RKDevTool_Release_v3.15.zip''',此软件无需安装,在解压后的文件夹中找到 '''RKDevTool'''打开即可</p>
 +
<p>[[File:media/image36.png|402x119px]]</p></li>
 +
<li><p>打开'''RKDevTool''' 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”'''没有发现设备'''”</p>
 +
<p>[[File:media/image37.png|402x189px]]</p></li>
 +
<li><p>然后开始烧录Linux镜像到SSD中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录接口的位置如下图所示</p>
 +
<p>[[File:media/image38.png|275x118px]]</p></li>
 +
<li><p>确保开发板没有连接电源和插入TF卡以及eMMC</p></li>
 +
<li><p>然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:</p>
 +
<p>[[File:media/image39.png|289x100px]]</p></li>
 +
<li><p>然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了</p>
 +
<p>[[File:media/image40.png|305x94px]]</p></li>
 +
<li><p>如果前面的步骤顺利,此时开发板会进入'''MASKROM'''模式,在烧录工具的界面上会提示”'''发现一个MASKROM设备'''”</p>
 +
<p>[[File:media/image41.png|457x215px]]</p></li>
 +
<li><p>然后将鼠标光标放在下面的这片区域中</p>
 +
<p>[[File:media/image42.png|459x216px]]</p></li>
 +
<li><p>然后点击鼠标右键会弹出下图所示的选择界面</p>
 +
<p>[[File:media/image43.png|453x213px]]</p></li>
 +
<li><p>然后选择'''导入配置'''选项</p>
 +
<p>[[File:media/image44.png|458x215px]]</p></li>
 +
<li><p>然后进入前面下载的'''MiniLoader'''文件夹中,然后选择'''rk3588_linux_pcie.cfg'''配置文件,再点击'''打开'''</p>
 +
<p>[[File:media/image80.png|462x217px]]</p></li>
 +
<li><p>然后点击'''确定'''</p>
 +
<p>[[File:media/image81.png|468x220px]]</p></li>
 +
<li><p>然后点击下图所示的位置</p>
 +
<p>[[File:media/image82.png|475x223px]]</p></li>
 +
<li><p>再选择前面下载的'''MiniLoader'''文件夹中'''rk3566_MiniLoaderAll.bin''',再点击'''打开'''</p>
 +
<div class="figure">
  
orangepi@orangepi:~/Desktop$ '''ls'''
+
[[File:media/image70.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
  
Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img
+
</div></li>
 +
<li><p>然后点击下图所示的位置</p>
 +
<p>[[File:media/image83.png|486x228px]]</p></li>
 +
<li><p>然后进入前面下载的'''MiniLoader'''文件夹中,再选择'''rk3566_rkspi_loader.img''',再点击'''打开'''</p>
 +
<div class="figure">
  
'''How to enter the command line of the development board Linux system?'''
+
[[File:media/image84.png|488x228px|GGU}ZN)TL%P[INB(M%MNJV7]]
  
# '''For the method of using the serial port to log in to the terminal, please refer to the instructions in the section on [[\l|how to use the debugging serial port]].'''
+
</div></li>
# '''Use ssh to remotely log in to the Linux system, please refer to the instructions in the section of [[\l|SSH remote login to the development board]].'''
+
<li><p>然后点击下图所示的位置</p>
# '''If HDMI, LCD and other display screens are connected, you can open a command line terminal on the desktop.'''
+
<p>[[File:media/image85.png|493x231px]]</p></li>
 +
<li><p>然后选择想要烧录的Linux镜像的路径,再点击'''打开'''</p>
 +
<p>'''在烧录镜像前,建议将要烧录的Linux镜像重命名为orangepi.img或者其它比较短的名字,这样在烧录镜像的时候就能看到烧录进度的百分比数值。'''</p>
 +
<p>[[File:media/image50.png|499x234px]]</p></li>
 +
<li><p>然后请勾选上'''强制按地址写'''选项</p>
 +
<p>[[File:media/image86.png|498x234px]]</p></li>
 +
<li><p>再点击执行按钮就会开始烧录Linux镜像到SSD中</p>
 +
<p>[[File:media/image87.png|500x235px]]</p></li>
 +
<li><p>Linux镜像烧录完后的显示log如下图所示</p>
 +
<p>[[File:media/image88.png|504x240px]]</p>
 +
<p>'''如果烧录有问题,请先清空下SPIFlash然后再烧录试下。清空SPIFlash的方法请参考下[[\l|使用RKDevTool清空SPIFlash的方法]]一小节的说明。'''</p></li>
 +
<li><p>镜像烧录完后会自动启动SPIFlash+PCIe &gt; SSD中的Linux系统,如果没有正常启动,请重新上电试下。</p></li></ol>
 +
</li></ol>
  
<!-- -->
+
=== 使用dd命令烧录的方法 ===
<ol start="5" style="list-style-type: decimal;">
+
 
<li>Next, we first use the following command to confirm the device node of eMMC</li></ol>
+
<ol style="list-style-type: decimal;">
 +
<li><p>首先需要准备一个NVMe SSD固态硬盘,开发板M.2插槽支持的PCIe为PCIe2.0x1,理论最高速度为500MB/s。PCIe3.0和PCIe4.0的NVMe SSD也是可以用的,只是速度最高只有PCIe2.0x1的速度。</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>M.2 2230规格的SSD如下所示</p>
 +
<p>[[File:media/image75.png|158x129px]]</p></li>
 +
<li><p>M.2 2242规格的SSD如下所示</p>
 +
<p>[[File:media/image76.png|192x116px]]</p></li></ol>
 +
</li>
 +
<li><p>然后把NVMe SSD插入开发板的M.2 PCIe接口,并固定好</p>
 +
<p>[[File:media/image77.png|283x63px]]</p></li>
 +
<li><p>SPI Flash在开发板上的位置如下图所示,开始烧录前无需其他设置</p>
 +
<p>[[File:media/image78.png|261x198px]]</p></li>
 +
<li><p>烧录Linux镜像到SPIFlash+NVMe SSD中需要借助TF卡来完成,所以首先需要将Linux镜像烧录到TF卡上,然后使用TF卡启动开发板进入Linux系统。烧录Linux镜像到TF卡的方法请见[[\l|'''基于Windows PC将Linux镜像烧写到TF卡的方法''']]和[[\l|'''基于Ubuntu PC将Linux镜像烧写到TF卡的方法''']]两小节的说明。</p></li>
 +
<li><p>使用TF卡启动Linux系统后,我们首先烧录u-boot镜像到SPI Flash中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>先运行下'''nand-sata-install''','''普通用户记得加sudo权限'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo nand-sata-install'''</p></li>
 +
<li><p>然后选择'''7 Install/Update ther bootloader on SPI Flash'''</p></li></ol>
 +
</li></ol>
  
orangepi@orangepi:~/Desktop$ '''ls /dev/mmcblk*boot0 | cut -c1-12'''
+
<div class="figure">
  
'''/dev/mmcblk0'''
+
[[File:media/image89.png|355x174px|IMG_256]]
  
<ol start="6" style="list-style-type: decimal;">
+
</div>
<li>Then we can use the dd command to clear the eMMC. Note that after the '''of=''' parameter, please fill in the output result of the above command</li></ol>
+
<ol start="3" style="list-style-type: lower-alpha;">
 +
<li>然后选择'''&lt;Yes&gt;'''</li></ol>
  
orangepi@orangepi:~/Desktop$ '''sudo dd bs=1M if=/dev/zero of=/dev/mmcblk0 count=1000 status=progress'''
+
<div class="figure">
  
orangepi@orangepi:~/Desktop$ '''sudo sync'''
+
[[File:media/image90.png|356x179px|IMG_256]]
  
<ol start="7" style="list-style-type: decimal;">
+
</div>
<li><p>Then you can use the dd command to burn the Linux image of the development board into the eMMC</p>
+
<ol start="4" style="list-style-type: lower-alpha;">
<ol style="list-style-type: lower-alpha;">
+
<li>然后请耐心等待烧录完成,烧录完成后显示如下所示(左下角会显示一个'''Done'''):</li></ol>
<li><p>In the following command, the if= parameter is followed by the full path where the Linux image is stored + the name of the Linux image (such as '''the name of /home/orangepi/Desktop/Linux image'''). Because we have entered the path of the Linux image above, we only need to fill in the name of the Linux image.</p></li>
 
<li><p>Please do not copy the Linux image name in the following command, but replace it with the actual image name (because the version number of the image may be updated).</p></li></ol>
 
</li></ol>
 
  
'''sudo dd bs=1M if=Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img of=/dev/mmcblk0 status=progress'''
+
<div class="figure">
  
'''sudo''' '''sync'''
+
[[File:media/image91.png|358x161px|IMG_256]]
  
'''Note, if you upload a .7z or .xz Linux image compressed file, please remember to decompress it before using the dd command to burn.'''
+
</div>
 +
<ol start="6" style="list-style-type: decimal;">
 +
<li><p>然后将Linux镜像文件(从官网下载的Debian或者Ubuntu镜像)上传到TF卡中。上传Linux镜像文件到开发板中的方法请参考[[\l|'''上传文件到开发板Linux系统中的方法''']]小节的说明。</p></li>
 +
<li><p>上传完镜像到开发板的Linux系统中后,我们再在开发板Linux系统的命令行中进入镜像文件的存放路径,比如,我将开发板的Linux镜像存放在'''/home/orangepi/Desktop'''目录下了,然后进入'''/home/orangepi/Desktop'''目录就能看到上传的镜像文件了。</p>
 +
<p>orangepi@orangepi:~$ '''cd /home/orangepi/Desktop'''</p>
 +
<p>orangepi@orangepi:~/Desktop$ '''ls'''</p>
 +
<p>Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img</p>
 +
<p>'''怎么进入开发板Linux系统的命令行?'''</p></li></ol>
  
'''The detailed description of all parameters of the dd command and more usage can be viewed by executing the man dd command in the Linux system.'''
+
<!-- -->
 +
# '''使用串口登录终端的方法请参考[[\l|调试串口的使用方法]]一小节的说明。'''
 +
# '''使用ssh远程登录Linux系统请参考[[\l|SSH远程登录开发板]]一小节的说明。'''
 +
# '''如果接了HDMI、LCD等显示屏幕,可以在桌面中打开一个命令行终端。'''
  
 +
<!-- -->
 
<ol start="8" style="list-style-type: decimal;">
 
<ol start="8" style="list-style-type: decimal;">
<li>After successfully burning the Linux image of the development board to the eMMC, you can use the '''poweroff''' command to shut down. Then please pull out the TF card, and then short press the power button to turn on, and then the Linux system in the eMMC will be started.</li></ol>
+
<li><p>接下来,我们先确认下NVMe SSD已经被开发板的Linux正常识别了。如果NVMe SSD正常识别了的话,使用'''sudo fdisk -l'''命令就能看到'''nvme'''相关的信息</p>
 
+
<p>orangepi@orangepi:~/Desktop$ '''sudo fdisk -l | grep &quot;nvme0n1&quot;'''</p>
'''Note, after burning the image into eMMC, if the test finds that it cannot be started, please clear the SPIFlash and try again. For the method of clearing SPIFlash, please refer to [[\l|the method of using RKDevTool to clear SPIFlash]].'''
+
<p>Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors</p>
 
+
<p>使用'''lspci'''命令可以看到一个NVMe相关的PCI设备</p>
<span id="how-to-write-linux-image-to-spiflashnvme-ssd"></span>
+
<p>orangepi@orangepi:~/Desktop$ '''lspci'''</p>
== How to write Linux image to SPIFlash+NVMe SSD ==
+
<p>00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)</p>
 
+
<p>01:00.0 Non-Volatile memory controller: Realtek Semiconductor Co., Ltd. Device 5765 (rev 01)</p></li>
'''Note that the Linux image mentioned here specifically refers to the images of Linux distributions such as Debian and Ubuntu downloaded from the [http://www.orangepi.org/html/serviceAndSupport/index.html Orange Pi data download page].'''
+
<li><p>然后我们可以使用dd命令清空下NVMe SSD(可选)</p>
 
+
<p>orangepi@orangepi3b:~/Desktop$ '''sudo dd bs=1M if=/dev/zero of=/dev/nvme0n1 count=2000 status=progress'''</p>
'''Note that all the following operations are performed on a Windows computer.'''
+
<p>orangepi@orangepi3b:~/Desktop$ '''sudo sync'''</p></li>
 +
<li><p>然后就可以使用dd命令烧录开发板的Linux镜像到NVMe SSD中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>下面的命令中 '''if=''' &gt; 参数后面是要填写Linux镜像存放的完整路径+Linux镜像的名字(比如'''/home/orangepi/Desktop/Linux镜像的名字''')。因为上面我们已经进入Linux镜像的路径下了,所以只需要填写Linux镜像的名字的即可。</p></li>
 +
<li><p>下面命令中的Linux镜像名请不要照抄,要替换为实际的镜像名(因为镜像的版本号可能会更新)。</p>
 +
<p>'''sudo dd bs=1M if=Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img of=/dev/nvme0n1 status=progress'''</p>
 +
<p>'''sudo''' '''sync'''</p>
 +
<p>'''注意,如果上传的是 .7z或者.xz 或者.gz结尾Linux镜像压缩文件,使用dd命令烧录前请记得先解压。'''</p>
 +
<p>'''dd命令的所有参数的详细说明和更多用法可以在Linux系统中执行man dd命令来查看。'''</p></li></ol>
 +
</li>
 +
<li><p>当成功烧录开发板的Linux镜像到NVMe SSD后,此时就可以使用'''poweroff'''命令关机了。然后请拔出TF卡,再短按电源按键开机,此时就会启动SPIFlash+NVMe SSD中的Linux系统了。</p></li>
 +
<li><p>启动NVMe SSD中的系统后,使用'''df -h'''命令可以看到实际的硬盘容量</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>128GB NVMe SSD</p>
 +
<p>orangepi@orangepi:~$ '''df -h'''</p>
 +
<p>Filesystem Size Used Avail Use% Mounted on</p>
 +
<p>udev 3.8G 8.0K 3.8G 1% /dev</p>
 +
<p>tmpfs 769M 1.4M 768M 1% /run</p>
 +
<p>'''/dev/nvme0n1p2 118G 5.8G 111G 5% /'''</p>
 +
<p>tmpfs 3.8G 0 3.8G 0% /dev/shm</p>
 +
<p>tmpfs 5.0M 4.0K 5.0M 1% /run/lock</p>
 +
<p>tmpfs 3.8G 16K 3.8G 1% /tmp</p>
 +
<p>'''/dev/nvme0n1p1 256M 90M 166M 36% /boot'''</p>
 +
<p>/dev/zram1 194M 9.9M 170M 6% /var/log</p>
 +
<p>tmpfs 769M 60K 769M 1% /run/user/1000</p>
 +
<p>tmpfs 769M 48K 769M 1% /run/user/0</p></li>
 +
<li><p>2TB NVMe SSD</p>
 +
<p>orangepi@orangepi:~$ '''df -h'''</p>
 +
<p>Filesystem Size Used Avail Use% Mounted on</p>
 +
<p>udev 3.8G 8.0K 3.8G 1% /dev</p>
 +
<p>tmpfs 769M 1.4M 768M 1% /run</p>
 +
<p>'''/dev/nvme0n1p2 1.9T 4.1G 1.8T 1% /'''</p>
 +
<p>tmpfs 3.8G 0 3.8G 0% /dev/shm</p>
 +
<p>tmpfs 5.0M 4.0K 5.0M 1% /run/lock</p>
 +
<p>/dev/zram2 3.7G 76K 3.5G 1% /tmp</p>
 +
<p>'''/dev/nvme0n1p1 256M 90M 166M 36% /boot'''</p>
 +
<p>/dev/zram1 194M 15M 165M 9% /var/log</p>
 +
<p>tmpfs 769M 60K 769M 1% /run/user/1000</p>
 +
<p>tmpfs 769M 48K 769M 1% /run/user/0</p></li></ol>
 +
</li>
 +
<li><p>当TF卡和NVMe SSD中烧录了一模一样的系统,'''如果TF卡和NVMe SSD都插在了开发板中,此时上电启动开发板,u-boot会优先启动TF卡中的系统'''。但由于TF卡和NVMe SSD中的系统一模一样,所以两个存储设备中的/'''boot'''分区和'''rootfs'''分区的UUID也一样,这样会导致TF卡启动的时候有可能会加载了NVMe SSD中的分区。运行下面的脚本可以解决这个问题。</p>
 +
<p>orangepi@orangepi:~$ '''sudo fix_mmc_ssd.sh'''</p>
 +
<p>'''一模一样的系统是指镜像名一字不差的意思。就算都是Debian11系统,版本不同也是不同的。'''</p></li></ol>
  
<span id="using-rkdevtool-to-burn"></span>
+
<span id="使用balenaetcher软件烧录的方法"></span>
=== Using RKDevTool to burn ===
+
=== 使用balenaEtcher软件烧录的方法 ===
  
 
<ol style="list-style-type: decimal;">
 
<ol style="list-style-type: decimal;">
<li><p>First, you need to prepare an NVMe SSD. The PCIe supported by the M.2 slot of the development board is PCIe2.0x1, and the theoretical maximum speed is 500MB/s. PCIe3.0 and PCIe4.0 NVMe SSDs are also available, but the highest speed is only PCIe2.0x1.</p>
+
<li><p>首先需要准备一个NVMe SSD固态硬盘,开发板M.2插槽支持的PCIe为PCIe2.0x1,理论最高速度为500MB/s。PCIe3.0和PCIe4.0的NVMe SSD也是可以用的,只是速度最高只有PCIe2.0x1的速度。</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>The M.2 2230 SSD is as follows</li></ol>
+
<li><p>M.2 2230规格的SSD如下所示</p>
</li></ol>
+
<p>[[File:media/image75.png|189x153px]]</p></li>
 +
<li><p>M.2 2242规格的SSD如下所示</p>
 +
<p>[[File:media/image76.png|238x144px]]</p></li></ol>
 +
</li>
 +
<li><p>然后把NVMe SSD插入开发板的M.2 PCIe接口,并固定好</p>
 +
<p>[[File:media/image77.png|283x63px]]</p></li>
 +
<li><p>SPI Flash在开发板上的位置如下图所示,开始烧录前无需其他设置</p>
 +
<p>[[File:media/image78.png|261x198px]]</p></li>
 +
<li><p>烧录Linux镜像到SPIFlash+NVMe SSD中需要借助TF卡来完成,所以首先需要将Linux镜像烧录到TF卡上,然后使用TF卡启动开发板进入Linux系统。烧录Linux镜像到TF卡的方法请见[[\l|'''基于Windows PC将Linux镜像烧写到TF卡的方法''']]和[[\l|'''基于Ubuntu PC将Linux镜像烧写到TF卡的方法''']]两小节的说明。</p></li>
 +
<li><p>启动进入TF卡中的Linux系统后,请先确认下NVMe SSD已经被开发板的Linux正常识别了。如果NVMe SSD正常识别了的话,使用'''sudo fdisk -l'''命令就能看到'''nvme'''相关的信息</p>
 +
<p>orangepi@orangepi:~/Desktop$ '''sudo fdisk -l | grep &quot;nvme0n1&quot;'''</p>
 +
<p>Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors</p>
 +
<p>使用'''lspci'''命令可以看到一个NVMe相关的PCI设备</p>
 +
<p>orangepi@orangepi:~/Desktop$ '''lspci'''</p>
 +
<p>00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)</p>
 +
<p>01:00.0 Non-Volatile memory controller: Realtek Semiconductor Co., Ltd. Device 5765 (rev 01)</p></li>
 +
<li><p>Linux镜像中已经预装了balenaEtcher,打开方法如下所示:</p></li></ol>
  
[[File:pi3b-img73.png|157x112px]]
+
<div class="figure">
  
<ol start="2" style="list-style-type: lower-alpha;">
+
[[File:media/image92.png|506x249px|IMG_256]]
<li>The M.2 2242 SSD is as follows</li></ol>
 
  
[[File:pi3b-img74.png|174x96px]]
+
</div>
 +
'''如果没有预装,balenaEtcher arm64版本的下载安装方法请参考[[\l|下载安装arm64版本balenaEtcher的方法]]小节的说明。'''
  
<ol start="2" style="list-style-type: decimal;">
+
<ol start="7" style="list-style-type: decimal;">
<li>Then insert the NVMe SSD into the M.2 PCIe interface of the development board and fix it</li></ol>
+
<li>balenaEtcher打开后的界面如下所示:</li></ol>
  
[[File:pi3b-img75.png|283x63px]]
+
<div class="figure">
  
<ol start="3" style="list-style-type: decimal;">
+
[[File:media/image93.png|406x207px|IMG_256]]
<li>The position of the SPI Flash on the development board is shown in the figure below, no other settings are required before starting the programming</li></ol>
 
 
 
[[File:pi3b-img76.png|266x211px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then you need to prepare a good quality USB2.0 male-to-male data cable</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img16.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
 
  
 
</div>
 
</div>
<ol start="5" style="list-style-type: decimal;">
+
<ol start="8" style="list-style-type: decimal;">
<li><p>Then download the Rockchip driver '''DriverAssitant_v5.12.zip''' and '''MiniLoader''' and the burning tool '''RKDevTool_Release_v3.15.zip''' from the Orange Pi data download page</p>
+
<li><p>使用balenaEtcher烧录u-boot到开发板SPI Flash中的方法如下所示:</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>On the data download page of Orange Pi, first select the '''official tool''', and then enter the following folder</li></ol>
+
<li>首先点击'''Flash from file'''</li></ol>
 
</li></ol>
 
</li></ol>
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img29.png|362x115px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\6d1c77df7eeb7e491e5f79e8d85cbdc.png6d1c77df7eeb7e491e5f79e8d85cbdc]]
+
[[File:media/image94.png|406x205px|IMG_256]]
  
 
</div>
 
</div>
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<ol start="2" style="list-style-type: lower-alpha;">
<li>Then download all the files below</li></ol>
+
<li>然后进入'''/usr/lib/linux-u-boot-legacy-orangepi3b_1.x.x_arm64'''目录,再选择'''rkspi_loader.img''',再点击'''Open'''打开</li></ol>
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img30.png|264x118px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\34acacded202b29eee42fd20f5b4c92.png34acacded202b29eee42fd20f5b4c92]]
+
[[File:media/image95.png|563x110px|IMG_256]]
  
 
</div>
 
</div>
'''Note that the &quot;MiniLoader-things needed to burn the Linux image&quot; folder is hereinafter referred to as the MiniLoader folder.'''
+
<ol start="3" style="list-style-type: lower-alpha;">
 +
<li><p>打开'''rkspi_loader.img'''后的界面如下所示:</p>
 +
<p>[[File:media/image96.png|379x181px]]</p></li>
 +
<li><p>然后点击'''Select target'''</p></li></ol>
  
<ol start="6" style="list-style-type: decimal;">
+
<div class="figure">
<li><p>Then download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;'''.img'''&quot; is the image file of the operating system , the size is generally more than 2GB</p></li>
 
<li><p>Then use the decompression software to decompress '''DriverAssitant_v5.12.zip''', and then find the '''DriverInstall.exe''' executable file in the decompressed folder and open it</p></li></ol>
 
  
[[File:pi3b-img31.png|446x131px]]
+
[[File:media/image97.png|379x171px|IMG_256]]
  
<ol start="8" style="list-style-type: decimal;">
+
</div>
<li><p>After opening '''DriverInstall.exe''', the steps to install the Rockchip driver are as follows</p>
+
<ol start="5" style="list-style-type: lower-alpha;">
<ol style="list-style-type: lower-alpha;">
+
<li>然后点击'''Show 2 hidden'''打开更多存储设备的选项</li></ol>
<li>Click the &quot;'''Driver Installation'''&quot; button</li></ol>
 
</li></ol>
 
  
[[File:pi3b-img32.png|253x133px]]
+
<div class="figure">
  
<ol start="2" style="list-style-type: lower-alpha;">
+
[[File:media/image98.png|385x155px|IMG_256]]
<li>After waiting for a period of time, a pop-up window will prompt &quot;'''The driver is installed successfully'''&quot;, and then click the &quot;'''OK'''&quot; button.</li></ol>
 
  
[[File:pi3b-img33.png|269x140px]]
+
</div>
 +
<ol start="6" style="list-style-type: lower-alpha;">
 +
<li>然后选择SPI Flash的设备名'''/dev/mtdblock0''',然后点击'''Select'''</li></ol>
  
<ol start="9" style="list-style-type: decimal;">
+
<div class="figure">
<li>Then decompress '''RKDevTool_Release_v3.15.zi'''p, this software does not need to be installed, just find '''RKDevTool''' in the decompressed folder and open it</li></ol>
 
  
[[File:pi3b-img34.png|402x119px]]
+
[[File:media/image99.png|389x264px|IMG_256]]
  
<ol start="10" style="list-style-type: decimal;">
+
</div>
<li>After opening the '''RKDevTool''' burning tool, because the computer is not connected to the development board through the USB2.0 male-to-male data cable at this time, the lower left corner will prompt &quot;'''No device found'''&quot;</li></ol>
+
<ol start="7" style="list-style-type: lower-alpha;">
 
+
<li>然后点击'''Flash'''</li></ol>
[[File:pi3b-img35.png|402x189px]]
 
 
 
<ol start="11" style="list-style-type: decimal;">
 
<li><p>Then start burning the Linux image to the SSD</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First, connect the development board to the Windows computer through the USB2.0 male-to-male data cable. The position of the USB2.0 programming interface of the development board is shown in the figure below</li></ol>
 
</li></ol>
 
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img36.png|275x116px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\1691131157154(1).jpg1691131157154(1)]]
+
[[File:media/image100.png|394x268px|IMG_256]]
  
 
</div>
 
</div>
<ol start="2" style="list-style-type: lower-alpha;">
+
<ol start="8" style="list-style-type: lower-alpha;">
<li><p>Make sure that the development board is not connected to the power supply and inserted into the TF card and eMMC</p></li>
+
<li>然后点击'''Yes, I’m sure'''</li></ol>
<li><p>Then press and hold the MaskROM button on the development board, the position of the MaskROM button on the development board is shown in the figure below:</p></li></ol>
 
  
[[File:pi3b-img37.png|289x100px]]
+
<div class="figure">
  
<ol start="4" style="list-style-type: lower-alpha;">
+
[[File:media/image101.png|396x269px|IMG_256]]
<li>Then connect the power supply of the Type-C interface to the development board, and power on, and then release the MaskROM button</li></ol>
 
  
[[File:pi3b-img38.png|305x94px]]
+
</div>
 +
<ol style="list-style-type: lower-roman;">
 +
<li>然后输入开发板Linux系统的密码'''orangepi''',就会开始烧录u-boot镜像到SPI &gt; Flash中</li></ol>
  
<ol start="5" style="list-style-type: lower-alpha;">
+
<div class="figure">
<li>If the previous steps are successful, the development board will enter the '''MASKROM''' mode at this time, and the interface of the burning tool will prompt &quot;'''found a MASKROM device'''&quot;</li></ol>
 
  
[[File:pi3b-img39.png|457x215px]]
+
[[File:media/image102.png|393x269px|IMG_256]]
  
<ol start="6" style="list-style-type: lower-alpha;">
+
</div>
<li>Then place the mouse cursor in the area below</li></ol>
+
<ol start="10" style="list-style-type: lower-alpha;">
 +
<li>烧录过程的显示如下所示:</li></ol>
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img64.png|458x215px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题-4.jpg未标题-4]]
+
[[File:media/image103.png|397x272px|IMG_256]]
  
 
</div>
 
</div>
<ol start="7" style="list-style-type: lower-alpha;">
+
<ol start="11" style="list-style-type: lower-alpha;">
<li>Then click the right mouse button and the selection interface shown in the figure below will pop up</li></ol>
+
<li>烧录完成后的显示如下所示:</li></ol>
  
[[File:pi3b-img41.png|453x213px]]
+
<div class="figure">
  
<ol start="8" style="list-style-type: lower-alpha;">
+
[[File:media/image104.png|395x225px|IMG_256]]
<li>Then select the '''import configuration''' option</li></ol>
 
  
[[File:pi3b-img42.png|458x215px]]
+
</div>
 +
<ol start="9" style="list-style-type: decimal;">
 +
<li><p>烧录TF卡中的Linux系统到NVMe SSD中的方法(此方法相当于将TF卡中的系统克隆到NVMe SSD)</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li>首先点击'''Clone drive'''</li></ol>
 +
</li></ol>
  
<ol style="list-style-type: lower-roman;">
+
<div class="figure">
<li>i. Then enter the '''MiniLoader''' folder downloaded earlier, then select the '''rk3588_Linux_pcie.cfg''' configuration file, and click '''Open'''</li></ol>
 
  
[[File:pi3b-img77.png|462x217px]]
+
[[File:media/image105.png|386x204px|IMG_256]]
  
<ol start="10" style="list-style-type: lower-alpha;">
+
</div>
<li>Then click '''OK'''</li></ol>
+
<ol start="2" style="list-style-type: lower-alpha;">
 +
<li>然后选择TF卡的设备名'''/dev/mmcblk1'''</li></ol>
  
[[File:pi3b-img78.png|468x220px]]
+
<div class="figure">
 
 
<ol start="11" style="list-style-type: lower-alpha;">
 
<li>Then click the position shown in the figure below</li></ol>
 
  
[[File:pi3b-img79.png|475x223px]]
+
[[File:media/image106.png|379x256px|IMG_256]]
  
<ol start="12" style="list-style-type: lower-alpha;">
+
</div>
<li>Then select '''rk3566_MiniLoaderAll.bin''' in the '''MiniLoader''' folder downloaded earlier, and then click to '''open'''</li></ol>
+
<ol start="3" style="list-style-type: lower-alpha;">
 +
<li>打开TF卡后的界面如下所示:</li></ol>
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img68.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
+
[[File:media/image107.png|381x191px|IMG_256]]
  
 
</div>
 
</div>
<ol start="13" style="list-style-type: lower-alpha;">
+
<ol start="4" style="list-style-type: lower-alpha;">
<li>Then click the position shown in the figure below</li></ol>
+
<li>然后点击'''Select target'''</li></ol>
 +
 
 +
<div class="figure">
  
[[File:pi3b-img80.png|486x228px]]
+
[[File:media/image97.png|379x171px|IMG_256]]
  
<ol start="14" style="list-style-type: lower-alpha;">
+
</div>
<li>Then enter the MiniLoader folder downloaded earlier, select '''rk3566_rkspi_loader.img''', and click '''Open'''</li></ol>
+
<ol start="5" style="list-style-type: lower-alpha;">
 +
<li>然后点击'''Show 2 hidden'''打开更多存储设备的选项</li></ol>
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img81.png|488x228px|GGU}ZN)TL%P[INB(M%MNJV7]]
+
[[File:media/image98.png|385x155px|IMG_256]]
  
 
</div>
 
</div>
<ol start="15" style="list-style-type: lower-alpha;">
+
<ol start="6" style="list-style-type: lower-alpha;">
<li>Then click the position shown in the figure below</li></ol>
+
<li>然后选择NVMe SSD的设备名'''/dev/nvme0n1''',然后点击'''Select'''</li></ol>
  
[[File:pi3b-img82.png|493x231px]]
+
[[File:media/image108.png|386x264px]]
  
<ol start="16" style="list-style-type: lower-alpha;">
+
<ol start="7" style="list-style-type: lower-alpha;">
<li>Then select the path of the Linux image you want to burn, and then click '''Open'''</li></ol>
+
<li>然后点击'''Flash'''</li></ol>
  
'''Before burning the image, it is recommended to rename the Linux image to be burned to orangepi.img or other shorter names, so that you can see the percentage value of the burning progress when burning the image.'''
+
<div class="figure">
  
[[File:pi3b-img48.png|499x234px]]
+
[[File:media/image109.png|389x264px|IMG_256]]
  
<ol start="17" style="list-style-type: lower-alpha;">
+
</div>
<li>Then please check '''the mandatory write by address''' option</li></ol>
+
<ol start="8" style="list-style-type: lower-alpha;">
 +
<li>然后点击'''Yes, I’m sure'''</li></ol>
  
[[File:pi3b-img83.png|498x234px]]
+
<div class="figure">
  
<ol start="18" style="list-style-type: lower-alpha;">
+
[[File:media/image110.png|392x268px|IMG_256]]
<li>Click the Execute button again to start burning the Linux image to the SSD</li></ol>
 
  
[[File:pi3b-img84.png|500x235px]]
+
</div>
 +
<ol style="list-style-type: lower-roman;">
 +
<li>然后输入开发板Linux系统的密码orangepi,就会开始烧录Linux镜像到SSD中</li></ol>
  
<ol start="19" style="list-style-type: lower-alpha;">
+
<div class="figure">
<li>The log displayed after burning the Linux image is shown in the figure below</li></ol>
 
  
[[File:pi3b-img85.png|504x240px]]
+
[[File:media/image111.png|390x267px|IMG_256]]
  
'''If there is a problem with burning, please clear the SPIFlash first and then try burning again. For the method of clearing SPIFlash, please refer to the description of [[\l|the method of using RKDevTool to clear SPIFlash]].'''
+
</div>
 +
<ol start="10" style="list-style-type: lower-alpha;">
 +
<li>烧录过程的显示如下所示:</li></ol>
  
<ol start="20" style="list-style-type: lower-alpha;">
+
[[File:media/image112.png|393x212px]]
<li>After the image is burnt, it will automatically start the Linux system in SPIFlash+PCIe SSD. If it does not start normally, please power on and try again.</li></ol>
 
  
<span id="the-method-of-using-the-dd-command-to-burn"></span>
+
<div class="figure">
=== The method of using the dd command to burn ===
 
  
<ol style="list-style-type: decimal;">
+
[[File:media/image113.png|395x205px|IMG_256]]
<li><p>First, you need to prepare an NVMe SSD. The PCIe supported by the M.2 slot of the development board is PCIe2.0x1, and the theoretical maximum speed is 500MB/s. PCIe3.0 and PCIe4.0 NVMe SSDs are also available, but the highest speed is only PCIe2.0x1.</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The M.2 2230 SSD is as follows</li></ol>
 
</li></ol>
 
  
[[File:pi3b-img73.png|158x114px]]
+
</div>
 +
<ol start="11" style="list-style-type: lower-alpha;">
 +
<li>烧录完成后的显示如下所示:</li></ol>
  
<ol start="2" style="list-style-type: lower-alpha;">
+
[[File:media/image114.png|398x227px]]
<li>The M.2 2242 SSD is as follows</li></ol>
 
  
[[File:pi3b-img74.png|192x104px]]
+
<ol start="12" style="list-style-type: lower-alpha;">
 
+
<li><p>然后需要扩容下NVMe SSD中rootfs分区的容量,步骤如下所示:</p>
<ol start="2" style="list-style-type: decimal;">
 
<li>Then insert the NVMe SSD into the M.2 PCIe interface of the development board and fix it</li></ol>
 
 
 
[[File:pi3b-img75.png|283x63px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>The position of SPI Flash on the development board is shown in the figure below, no other settings are required before starting to burn</li></ol>
 
 
 
[[File:pi3b-img76.png|261x198px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>Burning the Linux image to SPIFlash+NVMe SSD requires a TF card, so first you need to burn the Linux image to the TF card, and then use the TF card to start the development board to enter the Linux system. For the method of burning the Linux image to the TF card, please refer to the instructions in the two sections of [[\l|Method of burning Linux image to TF card based on Windows PC]] and [[\l|'''the method of burning the Linux image to the TF card based on the Ubuntu PC''']].</p></li>
 
<li><p>After using the TF card to start the Linux system, we first burn the u-boot image into the SPI Flash</p>
 
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>Run nand-sata-install first, '''ordinary users remember to add sudo permission'''</li></ol>
+
<li><p>首先打开'''GParted,'''如果系统没有预装Gparted,请使用apt命令安装下</p>
 +
<p>orangepi@orangepi:~$ '''sudo apt-get install -y gparted'''</p></li></ol>
 
</li></ol>
 
</li></ol>
  
orangepi@orangepi:~$ '''sudo nand-sata-install'''
+
<div class="figure">
 +
 
 +
[[File:media/image115.png|576x215px|IMG_256]]
  
 +
</div>
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<ol start="2" style="list-style-type: lower-alpha;">
<li>Then select '''7 Install/Update the bootloader on SPI Flash'''</li></ol>
+
<li>然后输入Linux系统的密码orangepi,再点击'''Authenticate'''</li></ol>
  
<div class="figure">
+
[[File:media/image116.png|356x173px]]
  
[[File:pi3b-img86.png|355x174px|IMG_256]]
 
 
</div>
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<ol start="3" style="list-style-type: lower-alpha;">
<li>Then select '''&lt;Yes&gt;'''</li></ol>
+
<li><p>然后点击'''Fix'''</p>
 +
<p>[[File:media/image117.png|355x261px]]</p></li>
 +
<li><p>然后选择NVMe SSD</p></li></ol>
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img87.png|356x179px|IMG_256]]
+
[[File:media/image118.png|452x187px|IMG_256]]
  
 
</div>
 
</div>
<ol start="4" style="list-style-type: lower-alpha;">
+
<ol start="5" style="list-style-type: lower-alpha;">
<li>Then please wait patiently for the burning to complete. After the burning is completed, the display will be as follows (a '''Done''' will be displayed in the lower left corner):</li></ol>
+
<li>选择NVMe SSD后的显示界面如下所所示:</li></ol>
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img88.png|358x161px|IMG_256]]
+
[[File:media/image119.png|451x187px|IMG_256]]
  
 
</div>
 
</div>
<ol start="6" style="list-style-type: decimal;">
+
<ol start="6" style="list-style-type: lower-alpha;">
<li><p>Then upload the Linux image file (Debian or Ubuntu image downloaded from the official website) to the TF card. For the method of uploading the Linux image file to the development board, please refer to the description in the section of [[\l|'''the method of uploading files to the development board Linux system''']].</p></li>
+
<li>然后选择'''/dev/nvme0n1p2'''分区,再击点击右键,再选择'''Resize/Move'''</li></ol>
<li><p>After uploading the image to the Linux system of the development board, we enter the storage path of the image file in the command line of the Linux system of the development board. For example, I store the Linux image of the development board in the '''/home/orangepi/Desktop''' directory Download it, and then enter the '''/home/orangepi/Desktop''' directory to see the uploaded image file.</p></li></ol>
 
  
orangepi@orangepi:~$ '''cd /home/orangepi/Desktop'''
+
<div class="figure">
  
orangepi@orangepi:~/Desktop$ '''ls'''
+
[[File:media/image120.png|448x345px|IMG_256]]
  
Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img
+
</div>
 +
<ol start="7" style="list-style-type: lower-alpha;">
 +
<li><p>然后在下图所示的位置将容量拖动到最大</p>
 +
<p>[[File:media/image121.png|339x210px]]</p></li>
 +
<li><p>然后点击'''Resize/Move'''</p>
 +
<p>[[File:media/image122.png|339x212px]]</p></li>
 +
<li><p>然后点击下图位置绿色的'''√'''</p>
 +
<p>[[File:media/image123.png|425x166px]]</p></li>
 +
<li><p>再点击'''Apply'''</p>
 +
<p>[[File:media/image124.png|378x276px]]</p></li>
 +
<li><p>然后点击'''Close'''关闭即可</p>
 +
<p>[[File:media/image125.png|383x234px]]</p></li></ol>
  
'''How to enter the command line of the development board Linux system?'''
+
<!-- -->
 
+
<ol start="13" style="list-style-type: lower-alpha;">
# '''For the method of using the serial port to log in to the terminal, please refer to the instructions in the section on [[\l|how to use the debugging serial port]].'''
+
<li>此时就可以使用'''sudo &gt; poweroff'''命令关机了。然后请拔出TF卡,再短按电源按键开机,此时就会启动SPIFlash+NVMe &gt; SSD中的Linux系统了。</li></ol>
# '''Use ssh to remotely log in to the Linux system, please refer to the instructions in the section of [[\l|SSH remote login to the development board]].'''
 
# '''If HDMI, LCD and other display screens are connected, you can open a command line terminal on the desktop.'''
 
  
 
<!-- -->
 
<!-- -->
<ol start="8" style="list-style-type: decimal;">
+
<ol start="10" style="list-style-type: decimal;">
<li>Next, let's confirm that the NVMe SSD has been recognized by the development board's Linux. If the NVMe SSD is recognized normally, use the '''sudo fdisk -l''' command to see '''nvme''' related information</li></ol>
+
<li><p>第'''9)''' 步是克隆TF卡中的系统到NMVe SSD中,我们还可以直接烧录Linux镜像文件到NVMe SSD中,这里大概说下步骤:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>上传Linux镜像文件到开发板的Linux系统中</p></li>
 +
<li><p>然后使用balenaEtcher烧录即可</p>
 +
<p>[[File:media/image126.png|463x291px]]</p></li>
 +
<li><p>'''使用这种方法烧录镜像后无需手动扩容,第一次启动会自动扩容。'''</p></li></ol>
 +
</li></ol>
  
orangepi@orangepi:~/Desktop$ '''sudo fdisk -l | grep &quot;nvme0n1&quot;'''
+
<span id="烧录android镜像到tf卡中的方法"></span>
 +
== 烧录Android镜像到TF卡中的方法 ==
  
Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors
+
<span id="通过usb2.0烧录口将android-镜像烧录到tf卡中的方法"></span>
 +
=== 通过USB2.0烧录口将Android 镜像烧录到TF卡中的方法 ===
  
Use the '''lspci''' command to see an NVMe-related PCI device
+
<ol style="list-style-type: decimal;">
 +
<li><p>首先准备一张8GB或更大容量的TF卡,TF卡的传输速度必须为class10或以上,建议使用闪迪等品牌的TF卡</p></li>
 +
<li><p>还需要准备一根品质良好的USB2.0公对公数据线</p>
 +
<div class="figure">
  
orangepi@orangepi:~/Desktop$ '''lspci'''
+
[[File:media/image17.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
  
00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)
+
</div></li>
 
+
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载瑞芯微驱动'''DriverAssitant_v5.12.zip'''和烧录工具'''RKDevTool_Release_v3.15.zip'''</p></li>
01:00.0 Non-Volatile memory controller: Realtek Semiconductor Co., Ltd. Device 5765 (rev 01)
+
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载Android的镜像。</p>
 
+
<ol style="list-style-type: lower-alpha;">
<ol start="9" style="list-style-type: decimal;">
+
<li><p>打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择'''TF卡和eMMC启动镜像'''文件夹中的镜像进行下载</p>
<li>Then we can use the dd command to clear the NVMe SSD (optional)</li></ol>
+
<p>[[File:media/image127.png|224x82px]]</p></li>
 +
<li><p>进入'''TF卡和eMMC启动镜像'''文件夹后可以看到下面两个镜像,它们的区别是:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>第一个镜像专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像</p></li>
 +
<li><p>如果要使用lcd屏幕,请选择带lcd的镜像</p>
 +
<p>[[File:media/image128.png|264x58px]]</p></li></ol>
 +
</li></ol>
 +
</li>
 +
<li><p>然后使用解压软件解压下载的Android镜像的压缩包,解压后的文件中,以”.img” 结尾的文件就是Android镜像文件,大小在1GB以上</p></li>
 +
<li><p>然后用解压软件解压'''DriverAssitant_v5.12.zip''',再在解压后的文件夹中找到'''DriverInstall.exe'''可执行文件并打开即可</p>
 +
<p>[[File:media/image33.png|575x169px]]</p></li>
 +
<li><p>打开'''DriverInstall.exe'''后安装瑞芯微驱动的步骤如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>点击”'''驱动安装'''”按钮</p>
 +
<p>[[File:media/image34.png|300x157px]]</p></li>
 +
<li><p>等待一段时间后,会弹出窗口提示”'''安装驱动成功'''”,然后点击'''“确定”'''按钮即可</p>
 +
<p>[[File:media/image35.png|315x164px]]</p></li></ol>
 +
</li>
 +
<li><p>然后解压'''RKDevTool_Release_v3.15.zip''',此软件无需安装,在解压后的文件夹中找到 '''RKDevTool'''打开即可</p>
 +
<p>[[File:media/image36.png|454x134px]]</p></li>
 +
<li><p>打开'''RKDevTool''' 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”'''没有发现设备'''”</p>
 +
<p>[[File:media/image37.png|442x208px]]</p></li>
 +
<li><p>然后开始烧录Android镜像到TF卡中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录接口的位置如下图所示</p>
 +
<p>[[File:media/image38.png|275x118px]]</p></li>
 +
<li><p>然后确保开发板没有插入TF卡,没有连接电源</p></li>
 +
<li><p>然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:</p>
 +
<p>[[File:media/image39.png|289x100px]]</p></li>
 +
<li><p>然后给开发板接上Type-C接口的电源,并上电</p>
 +
<p>[[File:media/image40.png|305x94px]]</p></li>
 +
<li><p>如果前面的步骤顺利,此时开发板会进入'''MASKROM'''模式,在烧录工具的界面上会提示”'''发现一个MASKROM设备'''”</p>
 +
<p>[[File:media/image41.png|457x215px]]</p></li>
 +
<li><p>然后再插入TF卡到开发板</p></li>
 +
<li><p>然后请选择'''高级功能'''</p>
 +
<p>[[File:media/image129.png|458x138px]]</p></li>
 +
<li><p>然后点击下图所示的位置</p>
 +
<p>[[File:media/image130.png|459x216px]]</p></li>
 +
<li><p>再选择前面下载的'''MiniLoader'''文件夹中的'''rk3566_MiniLoaderAll.bin''',再点击打开</p>
 +
<div class="figure">
 +
 
 +
[[File:media/image70.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
  
orangepi@orangepi3b:~/Desktop$ '''sudo dd bs=1M if=/dev/zero of=/dev/nvme0n1 count=2000 status=progress'''
+
</div></li>
 +
<li><p>然后点击'''下载'''</p>
 +
<p>[[File:media/image131.png|472x222px]]</p></li>
 +
<li><p>下载完'''rk3566_MiniLoaderAll.bin'''后的显示如下图所示</p>
 +
<p>[[File:media/image132.png|474x227px]]</p></li>
 +
<li><p>然后选择存储设备为'''SD''',再点击'''切换存储'''</p>
 +
<div class="figure">
  
orangepi@orangepi3b:~/Desktop$ '''sudo sync'''
+
[[File:media/image133.jpeg|477x222px|D~T2CO%X~K2@ELR98)BVP~2]]
  
<ol start="10" style="list-style-type: decimal;">
+
</div></li>
<li>Then you can use the dd command to burn the Linux image of the development board to the NVMe SSD</li></ol>
+
<li><p>切换成功的显示如下图所示</p>
 +
<div class="figure">
  
<!-- -->
+
[[File:media/image134.jpeg|474x223px|QFVLTK~19N32OK2UGH{D{AK]]
<ol style="list-style-type: lower-alpha;">
 
<li><p>In the following command, the if= parameter is followed by the full &gt; path where the Linux image is stored + the name of the Linux image &gt; (such as '''the name of /home/orangepi/Desktop/Linux image'''). &gt; Because we have entered the path of the Linux image above, we only &gt; need to fill in the name of the Linux image.</p></li>
 
<li><p>Please do not copy the Linux image name in the following command, &gt; but replace it with the actual image name (because the version &gt; number of the image may be updated).</p></li></ol>
 
  
'''sudo dd bs=1M if=Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img of=/dev/nvme0n1 status=progress'''
+
</div></li>
 +
<li><p>然后点击烧录工具的”'''升级固件'''”一栏</p>
 +
<p>[[File:media/image135.png|477x224px]]</p></li>
 +
<li><p>接着点击”'''固件'''”按钮选择需要烧录的Android镜像的路径</p>
 +
<p>[[File:media/image136.png|444x209px]]</p></li>
 +
<li><p>最后点击”'''升级'''”按钮就会开始烧录,烧录过程中的log如下图所示。烧录完成后Android系统会自动启动。</p></li></ol>
 +
</li></ol>
  
'''sudo''' '''sync'''
+
<div class="figure">
  
'''Note, if you upload a .7z or .xz or .gz Linux image compressed file, please remember to decompress it before using the dd command to burn.'''
+
[[File:media/image137.png|455x214px|GO~ZSPN`B]JCQM`@_9UU8[R]]
  
'''The detailed description of all parameters of the dd command and more usage can be viewed by executing the man dd command in the Linux system.'''
+
</div>
 +
<span id="使用sddisktool工具将android镜像烧到tf卡的方法"></span>
 +
=== 使用SDDiskTool工具将Android镜像烧到TF卡的方法 ===
  
<ol start="11" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li><p>After successfully burning the Linux image of the development board to the NVMe SSD, you can use the poweroff command to shut down. Then please pull out the TF card, and then short press the power button to turn on, then the Linux system in SPIFlash+NVMe SSD will be started.</p></li>
+
<li><p>首先准备一张8GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''或以上,建议使用闪迪等品牌的TF卡</p></li>
<li><p>After starting the system in the NVMe SSD, use the '''df -h''' command to see the actual hard disk capacity</p>
+
<li><p>然后使用读卡器把TF卡插入电脑</p></li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载SDDiskTool烧写工具,'''请确保SDDiskTool工具的版本为最新的v1.72'''</p></li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载Android11的镜像</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择'''TF卡和eMMC启动镜像'''文件夹中的镜像进行下载</p>
 +
<p>[[File:media/image127.png|224x82px]]</p></li>
 +
<li><p>进入'''TF卡和eMMC启动镜像'''文件夹后可以看到下面两个镜像,它们的区别是:</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>128GB NVMe SSD</li></ol>
+
<li><p>不带lcd的镜像是专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像</p></li>
 +
<li><p>如果要使用LCD屏幕,请选择带lcd的镜像</p>
 +
<p>[[File:media/image128.png|281x62px]]</p></li></ol>
 
</li></ol>
 
</li></ol>
 +
</li>
 +
<li><p>然后使用解压软件解压下载的Android镜像的压缩包,解压后的文件中,以”.img” 结尾的文件就是Android镜像文件,大小在1GB以上</p></li>
 +
<li><p>然后使用解压软件解压'''SDDiskTool_v1.72.zip''',此软件无需安装,在解压后的文件夹中找到'''SD_Firmware_Tool.exe'''打开即可</p>
 +
<p>[[File:media/image138.png|415x99px]]</p></li>
 +
<li><p>打开'''SDDiskTool'''后,如果TF卡识别正常,会在”'''选择可移动磁盘设备'''”一栏中显示插入的磁盘设备,'''请务必确认显示的磁盘设备和你想烧录的TF卡的盘符是一致的''',如果没有显示可以尝试拔插下TF卡</p>
 +
<p>[[File:media/image139.png|267x228px]]</p></li>
 +
<li><p>确认完盘符后,可以先格式化下TF卡,点击'''SDDiskTool'''中的'''恢复磁盘'''按钮即可,也可使用前面提到的'''SD Card Formatter'''进行TF卡的格式化</p>
 +
<p>[[File:media/image140.png|264x226px]]</p></li>
 +
<li><p>然后开始将Android镜像写入TF卡</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先在”'''选择功能模式'''”中勾选”'''SD启动'''”</p></li>
 +
<li><p>然后在”'''选择升级固件'''”一栏中选择Android镜像的路径</p></li>
 +
<li><p>最后点击”'''开始创建'''”按钮就会开始烧录Android镜像到TF卡中</p>
 +
<p>[[File:media/image141.png|286x242px]]</p></li></ol>
 +
</li>
 +
<li><p>烧录完后即可退出SDDiskTool软件,然后就可以把TF卡从电脑中拔出来插到开发板中启动了</p>
 +
<p>[[File:media/image142.png|288x244px]]</p></li></ol>
  
orangepi@orangepi:~$ '''df -h'''
+
<span id="烧录android镜像到emmc中的方法"></span>
 +
== 烧录Android镜像到eMMC中的方法 ==
  
Filesystem Size Used Avail Use% Mounted on
+
'''注意,烧录镜像到eMMC中后如果测试发现启动不了,请清空下SPIFlash后再启动试下。清空SPIFlash的方法请参考[[\l|使用RKDevTool清空SPIFlash的方法]]小节的内容。'''
  
udev 3.8G 8.0K 3.8G 1% /dev
+
<span id="通过usb2.0烧录口将android-镜像烧录到emmc中的方法"></span>
 +
=== 通过USB2.0烧录口将Android 镜像烧录到eMMC中的方法 ===
  
tmpfs 769M 1.4M 768M 1% /run
+
'''注意,下面所有的操作都是在Windows电脑中进行的。'''
  
'''/dev/nvme0n1p2 118G 5.8G 111G 5% /'''
+
<ol style="list-style-type: decimal;">
 +
<li><p>开发板预留了eMMC的扩展接口,烧录系统到eMMC前,首先需要购买一个与开发板eMMC接口相匹配的eMMC模块。然后将eMMC模块安装到开发板上。</p>
 +
<p>eMMC模块和插入开发板的方法如下所示:</p>
 +
<p>[[File:media/image64.png|115x84px]] [[File:media/image65.png|120x87px]]</p>
 +
<p>[[File:media/image66.png|286x133px]]</p></li>
 +
<li><p>还需要准备一根品质良好的USB2.0公对公数据线</p>
 +
<div class="figure">
  
tmpfs 3.8G 0 3.8G 0% /dev/shm
+
[[File:media/image17.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
  
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
+
</div></li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载瑞芯微驱动'''DriverAssitant_v5.12.zip'''和烧录工具'''RKDevTool_Release_v3.15.zip'''</p></li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载Android的镜像。</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择'''TF卡和eMMC启动镜像'''文件夹中的镜像进行下载</p>
 +
<p>[[File:media/image127.png|224x82px]]</p></li>
 +
<li><p>进入'''TF卡和eMMC启动镜像'''文件夹后可以看到下面两个镜像,它们的区别是:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>第一个镜像专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像</p></li>
 +
<li><p>如果要使用lcd屏幕,请选择带lcd的镜像</p>
 +
<p>[[File:media/image128.png|264x58px]]</p></li></ol>
 +
</li></ol>
 +
</li>
 +
<li><p>然后使用解压软件解压下载的Android镜像的压缩包,解压后的文件中,以”.img” 结尾的文件就是Android镜像文件,大小在1GB以上</p></li>
 +
<li><p>然后用解压软件解压'''DriverAssitant_v5.12.zip''',再在解压后的文件夹中找到'''DriverInstall.exe'''可执行文件并打开即可</p>
 +
<p>[[File:media/image33.png|575x169px]]</p></li>
 +
<li><p>打开'''DriverInstall.exe'''后安装瑞芯微驱动的步骤如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>点击”'''驱动安装'''”按钮</p>
 +
<p>[[File:media/image34.png|300x157px]]</p></li>
 +
<li><p>等待一段时间后,会弹出窗口提示”'''安装驱动成功'''”,然后点击'''“确定”'''按钮即可</p>
 +
<p>[[File:media/image35.png|315x164px]]</p></li></ol>
 +
</li>
 +
<li><p>然后解压'''RKDevTool_Release_v3.15.zip''',此软件无需安装,在解压后的文件夹中找到 '''RKDevTool'''打开即可</p>
 +
<p>[[File:media/image36.png|454x134px]]</p></li>
 +
<li><p>打开'''RKDevTool''' 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”'''没有发现设备'''”</p>
 +
<p>[[File:media/image37.png|442x208px]]</p></li>
 +
<li><p>然后开始烧录Android镜像到eMMC中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录接口的位置如下图所示</p>
 +
<p>[[File:media/image38.png|275x118px]]</p></li>
 +
<li><p>然后确保开发板没有插入TF卡,没有连接电源</p></li>
 +
<li><p>然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:</p>
 +
<p>[[File:media/image39.png|289x100px]]</p></li>
 +
<li><p>然后给开发板接上Type-C接口的电源,并上电</p>
 +
<p>[[File:media/image40.png|305x94px]]</p></li>
 +
<li><p>如果前面的步骤顺利,此时开发板会进入'''MASKROM'''模式,在烧录工具的界面上会提示”'''发现一个MASKROM设备'''”</p>
 +
<p>[[File:media/image41.png|457x215px]]</p></li>
 +
<li><p>然后请选择'''高级功能'''</p>
 +
<p>[[File:media/image129.png|458x138px]]</p></li>
 +
<li><p>然后点击下图所示的位置</p>
 +
<p>[[File:media/image130.png|459x216px]]</p></li>
 +
<li><p>再选择前面下载的'''MiniLoader'''文件夹中的'''rk3566_MiniLoaderAll.bin''',再点击打开</p>
 +
<div class="figure">
  
tmpfs 3.8G 16K 3.8G 1% /tmp
+
[[File:media/image70.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
  
'''/dev/nvme0n1p1 256M 90M 166M 36% /boot'''
+
</div></li>
 +
<li><p>然后点击'''下载'''</p>
 +
<p>[[File:media/image131.png|472x222px]]</p></li>
 +
<li><p>下载完'''MiniLoaderAll.bin'''后的显示如下图所示</p>
 +
<p>[[File:media/image143.png|474x223px]]</p></li>
 +
<li><p>然后选择存储设备为'''EMMC,'''再点击'''切换存储'''</p>
 +
<p>[[File:media/image144.png|468x225px]]</p></li>
 +
<li><p>切换成功的显示如下图所示</p>
 +
<p>[[File:media/image145.png|472x227px]]</p></li>
 +
<li><p>然后点击烧录工具的”'''升级固件'''”一栏</p>
 +
<p>[[File:media/image135.png|442x208px]]</p></li>
 +
<li><p>接着点击”'''固件'''”按钮选择需要烧录的Android镜像的路径</p>
 +
<p>[[File:media/image136.png|444x209px]]</p></li>
 +
<li><p>最后点击”'''升级'''”按钮就会开始烧录,烧录过程中的log如下图所示。烧录完成后Android系统会自动启动。</p>
 +
<div class="figure">
  
/dev/zram1 194M 9.9M 170M 6% /var/log
+
[[File:media/image137.png|455x214px|GO~ZSPN`B]JCQM`@_9UU8[R]]
  
tmpfs 769M 60K 769M 1% /run/user/1000
+
</div></li></ol>
 +
</li></ol>
  
tmpfs 769M 48K 769M 1% /run/user/0
+
<span id="通过tf卡将android11镜像烧录到emmc中的方法"></span>
 +
=== 通过TF卡将Android11镜像烧录到eMMC中的方法 ===
  
<ol start="2" style="list-style-type: lower-alpha;">
+
'''注意,下面所有的操作都是在Windows电脑中进行的。'''
<li>2TB NVMe SSD</li></ol>
 
  
orangepi@orangepi:~$ '''df -h'''
+
<ol style="list-style-type: decimal;">
 +
<li><p>开发板预留了eMMC的扩展接口,烧录系统到eMMC前,首先需要购买一个与开发板eMMC接口相匹配的eMMC模块。然后将eMMC模块安装到开发板上。eMMC模块和插入开发板的方法如下所示:</p>
 +
<p>[[File:media/image64.png|115x84px]] [[File:media/image65.png|120x87px]]</p>
 +
<p>[[File:media/image66.png|286x133px]]</p></li>
 +
<li><p>还需要准备一张8GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''或以上,建议使用闪迪等品牌的TF卡</p></li>
 +
<li><p>然后使用读卡器把TF卡插入电脑</p></li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载SDDiskTool烧写工具,'''请确保SDDiskTool工具的版本为最新的v1.72'''</p></li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载Android的镜像</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择'''TF卡和eMMC启动镜像'''文件夹中的镜像进行下载</p>
 +
<p>[[File:media/image127.png|224x82px]]</p></li>
 +
<li><p>进入'''TF卡和eMMC启动镜像'''文件夹后可以看到下面两个镜像,它们的区别是:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>第一个镜像专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像</p></li>
 +
<li><p>如果要使用lcd屏幕,请选择带lcd的镜像</p>
 +
<p>[[File:media/image128.png|283x62px]]</p></li></ol>
 +
</li></ol>
 +
</li>
 +
<li><p>然后使用解压软件解压下载的Android镜像的压缩包,解压后的文件中,以”.img” 结尾的文件就是Android镜像文件,大小在1GB以上</p></li>
 +
<li><p>然后使用解压软件解压'''SDDiskTool_v1.72.zip''',此软件无需安装,在解压后的文件夹中找到'''SD_Firmware_Tool.exe'''打开即可</p>
 +
<p>[[File:media/image138.png|429x103px]]</p></li>
 +
<li><p>打开'''SDDiskTool'''后,如果TF卡识别正常,会在”'''选择可移动磁盘设备'''”一栏中显示插入的磁盘设备,'''请务必确认显示的磁盘设备和你想烧录的TF卡的盘符是一致的''',如果没有显示可以尝试拔插下TF卡</p>
 +
<p>[[File:media/image139.png|267x228px]]</p></li>
 +
<li><p>确认完盘符后,可以先格式化下TF卡,点击'''SDDiskTool'''中的'''恢复磁盘'''按钮即可,也可使用前面提到的'''SD Card Formatter'''进行TF卡的格式化</p>
 +
<p>[[File:media/image140.png|247x212px]]</p></li>
 +
<li><p>然后开始将Android镜像写入TF卡</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先在'''“选择可移动磁盘设备”'''下面确认显示的盘符为TF卡对应的盘符</p></li>
 +
<li><p>然后在”'''选择功能模式'''”中选择'''“固件升级”'''</p></li>
 +
<li><p>然后在”'''选择升级固件'''”一栏中选择Android固件的路径</p></li>
 +
<li><p>最后点击”'''开始创建'''”按钮就会开始烧录</p>
 +
<p>[[File:media/image146.png|290x246px]]</p></li></ol>
 +
</li>
 +
<li><p>烧录完成后的显示如下图所示,然后就可以退出SDDiskTool</p>
 +
<p>[[File:media/image147.png|285x243px]]</p></li>
 +
<li><p>然后把TF卡从电脑中拔出来插到开发板中,开发板上电启动后就会自动开始将TF卡中的Android镜像烧录到开发板的eMMC中</p></li>
 +
<li><p>如果开发板连接了HDMI显示器,还可以从HDMI显示器中看到烧录Android镜像到eMMC中的进度条</p>
 +
<p>[[File:media/image148.png|430x247px]]</p></li>
 +
<li><p>当HDMI显示器显示如下信息时,说明烧录Android镜像到eMMC中已完成,此时就可以拔出TF卡,然后eMMC中的安卓系统就会开始启动。</p>
 +
<p>[[File:media/image149.png|576x389px]]</p></li></ol>
  
Filesystem Size Used Avail Use% Mounted on
+
<span id="烧录android镜像到spiflashnvme-ssd中的方法"></span>
 +
== 烧录Android镜像到SPIFlash+NVMe SSD中的方法 ==
  
udev 3.8G 8.0K 3.8G 1% /dev
+
'''注意,下面所有的操作都是在Windows电脑中进行的。'''
  
tmpfs 769M 1.4M 768M 1% /run
+
<ol style="list-style-type: decimal;">
 +
<li><p>首先需要准备一个NVMe SSD固态硬盘</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>M.2 2230规格的SSD如下所示</p>
 +
<p>[[File:media/image75.png|147x120px]]</p></li>
 +
<li><p>M.2 2242规格的SSD如下所示</p>
 +
<p>[[File:media/image76.png|216x131px]]</p></li></ol>
 +
</li>
 +
<li><p>然后把NVMe SSD插入开发板的M.2 PCIe接口,并固定好</p>
 +
<p>[[File:media/image77.png|283x63px]]</p></li>
 +
<li><p>SPI Flash在开发板上的位置如下图所示,开始烧录前无需其他设置</p>
 +
<p>[[File:media/image78.png|266x211px]]</p></li>
 +
<li><p>还需要准备一根品质良好的USB2.0公对公数据线</p>
 +
<div class="figure">
  
'''/dev/nvme0n1p2 1.9T 4.1G 1.8T 1% /'''
+
[[File:media/image17.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
  
tmpfs 3.8G 0 3.8G 0% /dev/shm
+
</div></li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载瑞芯微驱动'''DriverAssitant_v5.12.zip'''和烧录工具'''RKDevTool_Release_v3.15.zip'''</p></li>
 +
<li><p>然后下载Android11的镜像</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择'''SPIFlash-NVME &gt; SSD启动镜像'''文件夹中的镜像进行下载</p>
 +
<p>[[File:media/image150.png|195x65px]]</p></li>
 +
<li><p>进入'''SPIFlash-NVME &gt; SSD启动镜像'''文件夹后可以看到下面两个镜像,它们的区别是:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>不带lcd的镜像是专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像</p></li>
 +
<li><p>如果要使用LCD屏幕,请选择带lcd的镜像</p>
 +
<p>[[File:media/image151.png|305x58px]]</p></li></ol>
 +
</li></ol>
 +
</li>
 +
<li><p>然后用解压软件解压'''DriverAssitant_v5.12.zip''',再在解压后的文件夹中找到'''DriverInstall.exe'''可执行文件并打开即可</p>
 +
<p>[[File:media/image33.png|407x120px]]</p></li>
 +
<li><p>打开'''DriverInstall.exe'''后安装瑞芯微驱动的步骤如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>点击”'''驱动安装'''”按钮</p>
 +
<p>[[File:media/image34.png|286x150px]]</p></li>
 +
<li><p>等待一段时间后,会弹出窗口提示”'''安装驱动成功'''”,然后点击'''“确定”'''按钮即可</p>
 +
<p>[[File:media/image35.png|296x154px]]</p></li></ol>
 +
</li>
 +
<li><p>然后解压'''RKDevTool_Release_v3.15.zip''',此软件无需安装,在解压后的文件夹中找到 '''RKDevTool'''打开即可</p>
 +
<p>[[File:media/image36.png|413x122px]]</p></li>
 +
<li><p>打开'''RKDevTool''' 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”'''没有发现设备'''”</p>
 +
<p>[[File:media/image37.png|402x189px]]</p></li>
 +
<li><p>然后开始烧录Android镜像到SPIFlash+NVMe SSD中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录口的位置如下图所示</p>
 +
<p>[[File:media/image38.png|275x118px]]</p></li>
 +
<li><p>确保开发板没有插入TF卡,没有连接电源</p></li>
 +
<li><p>然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:</p>
 +
<p>[[File:media/image39.png|289x100px]]</p></li>
 +
<li><p>然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了</p>
 +
<p>[[File:media/image40.png|305x94px]]</p></li>
 +
<li><p>如果前面的步骤顺利,此时开发板会进入'''MASKROM'''模式,在烧录工具的界面上会提示”'''发现一个MASKROM设备'''”</p>
 +
<p>[[File:media/image41.png|443x208px]]</p></li>
 +
<li><p>然后点击烧录工具的”'''升级固件'''”一栏</p>
 +
<p>[[File:media/image135.png|442x208px]]</p></li>
 +
<li><p>接着点击”'''固件'''”按钮选择需要烧录的Android镜像</p>
 +
<p>[[File:media/image136.png|444x209px]]</p></li>
 +
<li><p>最后点击”'''升级'''”按钮就会开始烧录,烧录的过程如下图所示,可以看到,首先会烧录固件到SPIFlash中,然后烧录固件到PCIE中。烧录完成后Android系统会自动启动。</p>
 +
<p>[[File:media/image152.png|453x212px]]</p></li></ol>
 +
</li></ol>
  
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
+
<span id="使用rkdevtool清空spiflash的方法"></span>
 +
== 使用RKDevTool清空SPIFlash的方法 ==
  
/dev/zram2 3.7G 76K 3.5G 1% /tmp
+
<ol style="list-style-type: decimal;">
 +
<li><p>SPI Flash在开发板上的位置如下图所示</p>
 +
<p>[[File:media/image78.png|263x193px]]</p></li>
 +
<li><p>首先需要准备一根品质良好的USB2.0公对公数据线</p>
 +
<div class="figure">
  
'''/dev/nvme0n1p1 256M 90M 166M 36% /boot'''
+
[[File:media/image17.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
  
/dev/zram1 194M 15M 165M 9% /var/log
+
</div></li>
 +
<li><p>然后从[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载瑞芯微驱动'''DriverAssitant_v5.12.zip'''和'''MiniLoader'''以及烧录工具'''RKDevTool_Release_v3.15.zip'''</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>在[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange &gt; Pi的资料下载页面]首先选择'''官方工具''',然后进入下面的文件夹中</p>
 +
<p>[[File:media/image31.png|366x77px]]</p></li>
 +
<li><p>然后下载下面的所有文件</p>
 +
<p>[[File:media/image32.png|315x125px]]</p>
 +
<p>'''注意,“MiniLoader-烧录Linux镜像才需要用到的东西”文件夹下文简称为MiniLoader文件夹。'''</p></li></ol>
 +
</li>
 +
<li><p>然后用解压软件解压'''DriverAssitant_v5.12.zip''',再在解压后的文件夹中找到'''DriverInstall.exe'''可执行文件并打开即可</p>
 +
<p>[[File:media/image33.png|472x139px]]</p></li>
 +
<li><p>打开'''DriverInstall.exe'''后安装瑞芯微驱动的步骤如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>点击”'''驱动安装'''”按钮</p>
 +
<p>[[File:media/image34.png|276x145px]]</p></li>
 +
<li><p>等待一段时间后,会弹出窗口提示”'''安装驱动成功'''”,然后点击'''“确定”'''按钮即可</p>
 +
<p>[[File:media/image35.png|292x151px]]</p></li></ol>
 +
</li>
 +
<li><p>然后解压'''RKDevTool_Release_v3.15.zip''',此软件无需安装,在解压后的文件夹中找到 '''RKDevTool'''打开即可</p>
 +
<p>[[File:media/image36.png|467x138px]]</p></li>
 +
<li><p>打开'''RKDevTool''' 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”'''没有发现设备'''”</p>
 +
<p>[[File:media/image37.png|402x189px]]</p></li>
 +
<li><p>然后就可以开始清空SPI FLASH中的内容</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录口的位置如下图所示</p>
 +
<p>[[File:media/image38.png|275x118px]]</p></li>
 +
<li><p>确保开发板没有插入TF卡,没有连接电源</p></li>
 +
<li><p>然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:</p>
 +
<p>[[File:media/image39.png|289x100px]]</p></li>
 +
<li><p>然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了</p>
 +
<p>[[File:media/image40.png|305x94px]]</p></li>
 +
<li><p>如果前面的步骤顺利,此时开发板会进入'''MASKROM'''模式,在烧录工具的界面上会提示”'''发现一个MASKROM设备'''”</p>
 +
<p>[[File:media/image41.png|457x215px]]</p></li>
 +
<li><p>然后请选择'''高级功能'''</p>
 +
<p>[[File:media/image129.png|458x138px]]</p></li>
 +
<li><p>然后点击下图所示的位置</p>
 +
<p>[[File:media/image130.png|459x216px]]</p></li>
 +
<li><p>再选择前面下载的'''MiniLoader'''文件夹中的'''rk3566_MiniLoaderAll.bin''',再点击打开</p>
 +
<div class="figure">
  
tmpfs 769M 60K 769M 1% /run/user/1000
+
[[File:media/image70.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
  
tmpfs 769M 48K 769M 1% /run/user/0
+
</div></li>
 +
<li><p>然后点击'''下载'''</p>
 +
<p>[[File:media/image131.png|472x222px]]</p></li>
 +
<li><p>下载完'''rk3566_MiniLoaderAll.bin'''后的显示如下图所示</p>
 +
<p>[[File:media/image143.png|474x223px]]</p></li>
 +
<li><p>然后选择存储设备为'''SPINOR'''</p>
 +
<p>[[File:media/image153.png|467x220px]]</p></li>
 +
<li><p>然后点击'''切换存储'''</p>
 +
<p>[[File:media/image154.png|464x218px]]</p></li>
 +
<li><p>然后点击'''擦除所有'''就会开始擦除SPIFlash了</p>
 +
<p>[[File:media/image155.png|467x220px]]</p></li>
 +
<li><p>擦除SPIFlash后的显示log如下图所示</p>
 +
<p>[[File:media/image156.png|460x216px]]</p></li></ol>
 +
</li></ol>
  
<ol start="13" style="list-style-type: decimal;">
+
== 启动香橙派开发板 ==
<li>When the same system is programmed in the TF card and NVMe SSD, '''if both the TF card and NVMe SSD are inserted into the development board, then power on and start the development board, and u-boot will give priority to starting the system in the TF card.''' However, since the systems in the TF card and the NVMe SSD are exactly the same, the UUIDs of the /'''boot''' partition and the '''rootfs''' partition in the two storage devices are also the same, which may cause the partition in the NVMe SSD to be loaded when the TF card starts. Running the script below resolves this issue.</li></ol>
 
  
orangepi@orangepi:~$ '''sudo fix_mmc_ssd.sh'''
+
# 将烧录好镜像的TF卡插入香橙派开发板的TF卡插槽中。如果SPIFlash+NVMe SSD已经烧录好镜像了,那么就不需要插入TF卡了,只需确保NVMe SSD正常插入到开发板中即可。
 +
# 开发板有HDMI接口,可以通过HDMI转HDMI连接线把开发板连接到电视或者HDMI显示器。如果有购买LCD屏幕,也可以使用LCD屏幕来显示开发板的系统界面。如果有Type-C转HDMI的线,也可以通过Type-C接口来显示开发板的系统界面。
 +
# 接上USB鼠标和键盘,用于控制香橙派开发板。
 +
# 开发板有以太网口,可以插入网线用来上网。
 +
# 连接一个5V/3A或者5V/4A的USB Type-C接口的'''高品质'''的电源适配。
  
'''Exactly the same system means that the image name is exactly the same. Even if they are all Debian11 systems, the versions are different.'''
+
'''切记不要插入电压输出大于5V的电源适配器,会烧坏开发板。'''
  
<span id="how-to-use-balenaetcher-software-to-burn"></span>
+
'''系统上电启动过程中很多不稳定的现象基本都是供电有问题导致的,所以一个靠谱的电源适配器很重要。如果启动过程中发现有不断重启的现象,请更换下电源或者Type-C数据线再试下。'''
=== How to use balenaEtcher software to burn ===
 
  
<ol style="list-style-type: decimal;">
+
'''Type-C电源接口是不支持PD协商的。'''
<li><p>First, you need to prepare an NVMe SSD. The PCIe supported by the M.2 slot of the development board is PCIe2.0x1, and the theoretical maximum speed is 500MB/s. PCIe3.0 and PCIe4.0 NVMe SSDs are also available, but the highest speed is only PCIe2.0x1.</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The M.2 2230 SSD is as follows</li></ol>
 
</li></ol>
 
  
[[File:pi3b-img73.png|189x136px]]
+
'''另外请不要接到电脑的USB接口来给开发板供电。'''
  
<ol start="2" style="list-style-type: lower-alpha;">
+
<ol start="6" style="list-style-type: decimal;">
<li>The M.2 2242 SSD is as follows</li></ol>
+
<li><p>然后打开电源适配器的开关,如果一切正常,此时HDMI显示器或者LCD屏幕就能看到系统的启动画面了。</p></li>
 +
<li><p>如果想通过调试串口查看系统的输出信息,请使用串口线将开发板连接到电脑,串口的连接方法请参看[[\l|'''调试串口的使用方法''']]一节。</p></li></ol>
  
[[File:pi3b-img74.png|238x129px]]
+
== 调试串口的使用方法 ==
  
<ol start="2" style="list-style-type: decimal;">
+
=== 调试串口的连接说明 ===
<li>Then insert the NVMe SSD into the M.2 PCIe interface of the development board and fix it</li></ol>
 
  
[[File:pi3b-img75.png|283x63px]]
+
# 首先需要准备一个'''3.3V'''的USB转TTL模块,然后将USB转TTL模块的USB接口一端插入到电脑的USB接口中。
  
<ol start="3" style="list-style-type: decimal;">
+
'''为了更好的兼容性,推荐使用CH340 USB转TTL模块,请不要使用CP2102、PL2303类型的USB转TTL模块。'''
<li>The position of the SPI Flash on the development board is shown in the figure below, no other settings are required before starting the programming</li></ol>
 
  
[[File:pi3b-img76.png|261x198px]]
+
'''购买USB转TTL模块前,请确认模块支持1500000速率的波特率。'''
  
<ol start="4" style="list-style-type: decimal;">
+
[[File:media/image157.png|569x114px]]
<li><p>Burning the Linux image to SPIFlash+NVMe SSD requires a TF card, so first you need to burn the Linux image to the TF card, and then use the TF card to start the development board to enter the Linux system. For the method of burning the Linux image to the TF card, please refer to the instructions in the two sections of [[\l|'''the method of burning the Linux image to the TF card based on the Windows PC''']] and [[\l|'''the method of burning the Linux image to the TF card based on the Ubuntu PC''']].</p></li>
 
<li><p>After booting into the Linux system in the TF card, please confirm that the NVMe SSD has been properly recognized by the Linux of the development board. If the NVMe SSD is recognized normally, use the '''sudo fdisk -l''' command to see '''nvme''' related information</p></li></ol>
 
 
 
orangepi@orangepi:~/Desktop$ '''sudo fdisk -l | grep &quot;nvme0n1&quot;'''
 
 
 
Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors
 
 
 
Use the '''lspci''' command to see an NVMe-related PCI device
 
 
 
orangepi@orangepi:~/Desktop$ '''lspci'''
 
 
 
00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)
 
 
 
01:00.0 Non-Volatile memory controller: Realtek Semiconductor Co., Ltd. Device 5765 (rev 01)
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>The balenaEtcher has been pre-installed in the Linux image, and the opening method is as follows:</li></ol>
 
  
 +
<ol start="2" style="list-style-type: decimal;">
 +
<li><p>开发板的调试串口GND、RXD和TXD引脚的对应关系如下图所示</p>
 +
<p>[[File:media/image158.png|428x110px]]</p></li>
 +
<li><p>USB转TTL模块GND、TXD和RXD引脚需要通过杜邦线连接到开发板的调试串口上</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>USB转TTL模块的GND接到开发板的GND上</p></li>
 +
<li><p>USB转TTL模块的'''RX接到开发板的TX上'''</p></li>
 +
<li><p>USB转TTL模块的'''TX接到开发板的RX上'''</p></li></ol>
 +
</li>
 +
<li><p>USB转TTL模块连接电脑和Orange Pi开发板的示意图如下所示</p>
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img89.png|506x249px|IMG_256]]
+
[[File:media/image159.jpeg|524x189px|QQ图片20210204145010]]
  
 
</div>
 
</div>
'''If it is not pre-installed, for [[\l|how to download and install the arm64 version of balenaEtcher]], please refer to the instructions in the section on how to download and install the arm64 version of balenaEtcher.'''
+
<p>'''串口的TX和RX是需要交叉连接的,如果不想仔细区分TX和RX的顺序,可以把串口的TX和RX先随便接上,如果测试没有输出再交换下TX和RX的顺序,这样就总有一种顺序是对的'''</p></li></ol>
  
<ol start="7" style="list-style-type: decimal;">
+
<span id="ubuntu平台调试串口的使用方法"></span>
<li>The interface after balenaEtcher is opened is as follows:</li></ol>
+
=== Ubuntu平台调试串口的使用方法 ===
  
<div class="figure">
+
'''Linux下可以使用的串口调试软件有很多,如putty、minicom等,下面演示putty的使用方法。'''
  
[[File:pi3b-img90.png|406x207px|IMG_256]]
+
<ol style="list-style-type: decimal;">
 
+
<li><p>首先将USB转TTL模块插入Ubuntu电脑的USB接口,如果USB转TTL模块连接识别正常,在Ubuntu PC的'''/dev'''下就可以看到对应的设备节点名,记住这个节点名,后面设置串口软件时会用到</p>
</div>
+
<p>test@test:~$ '''ls /dev/ttyUSB*'''</p>
<ol start="8" style="list-style-type: decimal;">
+
<p>/dev/ttyUSB0</p></li>
<li><p>The method of using balenaEtcher to burn u-boot to the SPI Flash of the development board is as follows:</p>
+
<li><p>然后使用下面的命令在Ubuntu PC上安装下putty</p>
 +
<p>test@test:~$ '''sudo apt-get update'''</p>
 +
<p>test@test:~$ '''sudo apt-get install -y putty'''</p></li>
 +
<li><p>然后运行putty,'''记得加sudo权限'''</p>
 +
<p>test@test:~$ '''sudo putty'''</p></li>
 +
<li><p>执行putty命令后会弹出下面的界面</p>
 +
<p>[[File:media/image160.png|367x321px]]</p></li>
 +
<li><p>首先选择串口的设置界面</p>
 +
<p>[[File:media/image161.png|359x352px]]</p></li>
 +
<li><p>然后设置串口的参数</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>设置Serial line to connect &gt; to为/dev/ttyUSB0(修改为对应的节点名,一般为/dev/ttyUSB0)</p></li>
 +
<li><p>设置Speed(baud)为'''1500000'''(串口的波特率)</p></li>
 +
<li><p>设置Flow control为None</p>
 +
<p>[[File:media/image162.png|316x312px]]</p></li></ol>
 +
</li>
 +
<li><p>在串口的设置界面设置完后,再回到Session界面</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>First click on '''Flash from file'''</li></ol>
+
<li><p>首先选择Connection type为Serial</p></li>
</li></ol>
+
<li><p>然后点击Open按钮连接串口</p>
 +
<p>[[File:media/image163.png|345x340px]]</p></li></ol>
 +
</li>
 +
<li><p>启动开发板后,就能从打开的串口终端中看到系统输出的Log信息了</p>
 +
<p>[[File:media/image164.png|468x340px]]</p></li></ol>
  
<div class="figure">
+
<span id="windows平台调试串口的使用方法"></span>
 +
=== Windows平台调试串口的使用方法 ===
  
[[File:pi3b-img91.png|406x205px|IMG_256]]
+
'''Windows下可以使用的串口调试软件有很多,如SecureCRT、MobaXterm等,下面演示MobaXterm的使用方法,这款软件有免费版本,无需购买序列号即可使用。'''
  
</div>
+
<ol style="list-style-type: decimal;">
<ol start="2" style="list-style-type: lower-alpha;">
+
<li><p>下载MobaXterm</p>
<li>Then enter the '''/usr/lib/Linux-u-boot-legacy-orangepi3b_1.x.x_arm64''' directory, select '''rkspi_loader.img''', and click '''Open''' to open</li></ol>
+
<ol style="list-style-type: lower-alpha;">
 +
<li><p>下载MobaXterm网址如下</p>
 +
<p>[https://mobaxterm.mobatek.net/ '''https://mobaxterm.mobatek.net''']</p></li>
 +
<li><p>进入MobaXterm下载网页后点击'''GET XOBATERM NOW!'''</p>
 +
<p>[[File:media/image165.png|576x334px]]</p></li>
 +
<li><p>然后选择下载Home版本</p>
 +
<p>[[File:media/image166.png|353x231px]]</p></li>
 +
<li><p>然后选择Portable便携式版本,下载完后无需安装,直接打开就可以使用</p>
 +
<p>[[File:media/image167.png|575x259px]]</p></li></ol>
 +
</li>
 +
<li><p>下载完后使用解压缩软件解压下载的压缩包,即可得到MobaXterm的可执软件,然后双击打开</p>
 +
<p>[[File:media/image168.png|576x81px]]</p></li>
 +
<li><p>打开软件后,设置串口连接的步骤如下</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>打开会话的设置界面</p></li>
 +
<li><p>选择串口类型</p></li>
 +
<li><p>选择串口的端口号(根据实际的情况选择对应的端口号),如果看不到端口号,请使用[http://weishi.360.cn/qudongdashi/ '''360驱动大师''']扫描安装USB转TTL串口芯片的驱动</p></li>
 +
<li><p>选择串口的波特率为'''1500000'''</p></li>
 +
<li><p>最后点击”'''OK'''”按钮完成设置</p></li></ol>
 +
</li></ol>
  
<div class="figure">
+
[[File:media/image169.png|575x438px]]
  
[[File:pi3b-img92.png|563x110px|IMG_256]]
+
<ol start="4" style="list-style-type: decimal;">
 +
<li><p>点击”'''OK'''”按钮后会进入下面的界面,此时启动开发板就能看到串口的输出信息了</p>
 +
<p>[[File:media/image170.png|575x291px]]</p></li></ol>
  
</div>
+
== 使用开发板40pin接口中的5v引脚供电说明 ==
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The interface after opening '''rkspi_loader.img''' is as follows:</li></ol>
 
  
[[File:pi3b-img93.png|379x181px]]
+
'''我们推荐的开发板的供电方式是使用5V/3A或者5V/4A的Type C接口的电源线插到开发板的Type-C电源接口来供电的。如果需要使用40pin接口中的5V引脚来给开发板供电,请确保使用的电源线和电源适配器能满足开发板的供电需求。如果有使用不稳定的情况,请换回Type-C电源供电。'''
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Then click '''Select target'''</li></ol>
 
  
 +
<ol style="list-style-type: decimal;">
 +
<li><p>首先需要准备一根下图所示的电源线</p>
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img94.png|379x171px|IMG_256]]
+
[[File:media/image171.jpeg|216x154px|4ff86e49b6624616f9498fe44c366f29]]
  
 
</div>
 
</div>
<ol start="5" style="list-style-type: lower-alpha;">
+
<p>'''上图所示的电源线在淘宝可以买到,请自行搜索购买。'''</p></li>
<li>Then click '''Show 2 hidden''' to open more options for storage devices</li></ol>
+
<li><p>使用40pin接口中的5V引脚来给开发板供电,电源线的接法如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>上图所示的电源线USB &gt; A口需要插到5V/3A或者5V4A的电源适配器接头上('''请不要插到电脑的USB接口来供电''')</p></li>
 +
<li><p>红色的杜邦线需要插到开发板40pin的5V引脚上</p></li>
 +
<li><p>黑色的杜邦线需要插到40pin接口的GND引脚上</p></li>
 +
<li><p>40pin接口5V引脚和GND引脚在开发板中的位置如下图所示,'''切记不要接反了'''</p>
 +
<p>[[File:media/image172.png|366x71px]]</p></li></ol>
 +
</li></ol>
 +
 
 +
<span id="ubuntudebian-server和xfce桌面系统使用说明"></span>
 +
= Ubuntu/Debian Server和Xfce桌面系统使用说明 =
  
<div class="figure">
+
'''本章内容是基于Linux服务器版本的镜像和xfce桌面版本镜像编写的。'''
  
[[File:pi3b-img95.png|385x155px|IMG_256]]
+
<span id="已支持的linux镜像类型和内核版本"></span>
 +
== 已支持的Linux镜像类型和内核版本 ==
  
</div>
+
{| class="wikitable"
<ol start="6" style="list-style-type: lower-alpha;">
+
|-
<li>Then select the device name of SPI Flash '''/dev/mtdblock0''', and click '''Select'''</li></ol>
+
| style="text-align: left;"| '''Linux镜像类型'''
 +
| style="text-align: left;"| '''内核版本'''
 +
| style="text-align: left;"| '''服务器版'''
 +
| style="text-align: left;"| '''桌面版'''
 +
|-
 +
| style="text-align: left;"| '''Debian 11 - Bullseye'''
 +
| style="text-align: left;"| '''Linux5.10'''
 +
| style="text-align: left;"| '''支持'''
 +
| style="text-align: left;"| '''支持'''
 +
|-
 +
| style="text-align: left;"| '''Ubuntu 20.04 - Focal'''
 +
| style="text-align: left;"| '''Linux5.10'''
 +
| style="text-align: left;"| '''支持'''
 +
| style="text-align: left;"| '''支持'''
 +
|-
 +
| style="text-align: left;"| '''Ubuntu 22.04 - Jammy'''
 +
| style="text-align: left;"| '''Linux5.10'''
 +
| style="text-align: left;"| '''支持'''
 +
| style="text-align: left;"| '''支持'''
 +
|-
 +
| style="text-align: left;"| '''Debian12'''
 +
| style="text-align: left;"|
 +
| style="text-align: left;"|
 +
| style="text-align: left;"|
 +
|}
  
<div class="figure">
+
<span id="linux系统适配情况"></span>
 +
== Linux系统适配情况 ==
  
[[File:pi3b-img96.png|389x264px|IMG_256]]
+
{| class="wikitable"
 
+
|-
</div>
+
| style="text-align: left;"| '''功能'''
<ol start="7" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''Debian11'''
<li>Then click '''Flash'''</li></ol>
+
| style="text-align: left;"| '''Ubuntu20.04'''
 
+
| style="text-align: left;"| '''Ubuntu22.04'''
<div class="figure">
+
|-
 
+
| style="text-align: left;"| '''USB2.0x3'''
[[File:pi3b-img97.png|394x268px|IMG_256]]
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
| style="text-align: left;"| '''OK'''
<ol start="8" style="list-style-type: lower-alpha;">
+
|-
<li>Then click '''Yes, I'm sure'''</li></ol>
+
| style="text-align: left;"| '''USB3.0x1'''
 
+
| style="text-align: left;"| '''OK'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img98.png|396x269px|IMG_256]]
+
|-
 
+
| style="text-align: left;"| '''M.2 NVMe SSD启动'''
</div>
+
| style="text-align: left;"| '''OK'''
<ol style="list-style-type: lower-roman;">
+
| style="text-align: left;"| '''OK'''
<li>Then enter the password '''orangepi''' of the development board Linux system, and it will start burning the u-boot image into the SPI Flash</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
|-
<div class="figure">
+
| style="text-align: left;"| '''WIFI'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img99.png|393x269px|IMG_256]]
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
|-
<ol start="10" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''蓝牙'''
<li>The display of the burning process is as follows:</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 
+
|-
[[File:pi3b-img100.png|397x272px|IMG_256]]
+
| style="text-align: left;"| '''GPIO(40pin)'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
| style="text-align: left;"| '''OK'''
<ol start="11" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''OK'''
<li>The display after burning is as follows:</li></ol>
+
|-
 
+
| style="text-align: left;"| '''UART(40pin)'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img101.png|395x225px|IMG_256]]
+
| style="text-align: left;"| '''OK'''
 
+
|-
</div>
+
| style="text-align: left;"| '''SPI(40pin)'''
<ol start="9" style="list-style-type: decimal;">
+
| style="text-align: left;"| '''OK'''
<li><p>The method of burning the Linux system in the TF card to the NVMe SSD (this method is equivalent to cloning the system in the TF card to the NVMe SSD)</p>
+
| style="text-align: left;"| '''OK'''
<ol style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''OK'''
<li>First click '''Clone drive'''</li></ol>
+
|-
</li></ol>
+
| style="text-align: left;"| '''I2C(40pin)'''
 
+
| style="text-align: left;"| '''OK'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img102.png|386x204px|IMG_256]]
+
|-
 
+
| style="text-align: left;"| '''PWM(40pin)'''
</div>
+
| style="text-align: left;"| '''OK'''
<ol start="2" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''OK'''
<li>Then select the device name of the TF card '''/dev/mmcblk1'''</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
|-
<div class="figure">
+
| style="text-align: left;"| '''PWM风扇接口'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img103.png|379x256px|IMG_256]]
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
|-
<ol start="3" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''3pin调试串口'''
<li>The interface after opening the TF card is as follows:</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 
+
|-
[[File:pi3b-img104.png|381x191px|IMG_256]]
+
| style="text-align: left;"| '''EMMC'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
| style="text-align: left;"| '''OK'''
<ol start="4" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''OK'''
<li>Then click '''Select target'''</li></ol>
+
|-
 
+
| style="text-align: left;"| '''TF卡启动'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img94.png|379x171px|IMG_256]]
+
| style="text-align: left;"| '''OK'''
 
+
|-
</div>
+
| style="text-align: left;"| '''HDMI 视频'''
<ol start="5" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''OK'''
<li>Then click '''Show 2 hidden''' to open more options for storage devices</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
<div class="figure">
+
|-
 
+
| style="text-align: left;"| '''HDMI 音频'''
[[File:pi3b-img95.png|385x155px|IMG_256]]
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
| style="text-align: left;"| '''OK'''
<ol start="6" style="list-style-type: lower-alpha;">
+
|-
<li>Then select the device name of the NVMe SSD '''/dev/nvme0n1''', and click '''Select'''</li></ol>
+
| style="text-align: left;"| '''Camera'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img105.png|386x264px]]
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
<ol start="7" style="list-style-type: lower-alpha;">
+
|-
<li>Then click '''Flash'''</li></ol>
+
| style="text-align: left;"| '''LCD'''
 
+
| style="text-align: left;"| '''OK'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img106.png|389x264px|IMG_256]]
+
|-
 
+
| style="text-align: left;"| '''eDP显示'''
</div>
+
| style="text-align: left;"| '''OK'''
<ol start="8" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''OK'''
<li>Then click '''Yes, I'm sure'''</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
|-
<div class="figure">
+
| style="text-align: left;"| '''千兆网口'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img107.png|392x268px|IMG_256]]
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
|-
<ol style="list-style-type: lower-roman;">
+
| style="text-align: left;"| '''网口状态灯'''
<li>Then enter the password orangepi of the Linux system on the development board, and it will start burning the Linux image to the SSD</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 
+
|-
[[File:pi3b-img108.png|390x267px|IMG_256]]
+
| style="text-align: left;"| '''耳机播放'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
| style="text-align: left;"| '''OK'''
<ol start="10" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''OK'''
<li>The display of the burning process is as follows:</li></ol>
+
|-
 
+
| style="text-align: left;"| '''耳机录音'''
[[File:pi3b-img109.png|393x212px]]
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 
+
|-
[[File:pi3b-img110.png|395x205px|IMG_256]]
+
| style="text-align: left;"| '''LED灯'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
| style="text-align: left;"| '''OK'''
<ol start="11" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''OK'''
<li>The display after burning is as follows:</li></ol>
+
|-
 
+
| style="text-align: left;"| '''RTC'''
[[File:pi3b-img111.png|398x227px]]
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
<ol start="12" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''OK'''
<li><p>Then you need to expand the capacity of the rootfs partition in the NVMe SSD. The steps are as follows:</p>
+
|-
<ol style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''GPU'''
<li><p>Open '''GParted''' first, if the system does not have Gparted pre-installed, please use the apt command to install it</p>
+
| style="text-align: left;"| '''OK'''
<p>orangepi@orangepi:~$ '''sudo apt-get install -y gparted'''</p></li></ol>
+
| style="text-align: left;"| '''OK'''
</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
|-
<div class="figure">
+
| style="text-align: left;"| '''NPU'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img112.png|576x215px|IMG_256]]
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
</div>
+
|-
<ol start="2" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''VPU'''
<li>Then enter the password orangepi of the Linux system, and click '''Authenticate'''</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img113.png|356x173px]]
+
| style="text-align: left;"| '''OK'''
 
+
|-
<ol start="3" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''看门狗测试'''
<li>Then click '''Fix'''</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img114.png|355x261px]]
+
| style="text-align: left;"| '''OK'''
 
+
|-
<ol start="4" style="list-style-type: lower-alpha;">
+
| style="text-align: left;"| '''Chromium硬解视频'''
<li>Then select NVMe SSD</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
| style="text-align: left;"| '''OK'''
<div class="figure">
+
| style="text-align: left;"| '''OK'''
 +
|}
  
[[File:pi3b-img115.png|452x187px|IMG_256]]
+
<span id="本手册linux命令格式说明"></span>
 +
== 本手册Linux命令格式说明 ==
  
</div>
+
<ol style="list-style-type: decimal;">
<ol start="5" style="list-style-type: lower-alpha;">
+
<li><p>本手册中所有需要在Linux系统中输入的命令都会使用下面的方框框起来</p>
<li>The display interface after selecting NVMe SSD is as follows:</li></ol>
+
<p>如下所示,黄色方框里内容表示需要特别注意的内容,这里面的命令除外。</p></li>
 +
<li><p>命令前面的提示符类型说明</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>命令前面提示符指的是下面方框内红色部分的内容,这部分内容不是Linux命令的一部分,所以在Linux系统中输入命令时,请不要把红色字体部分的内容也输入进去。</p>
 +
<p>'''orangepi@orangepi:~$ sudo apt update'''</p>
 +
<p>'''root@orangepi:~#''' '''vim /boot/boot.cmd'''</p>
 +
<p>'''test@test:~$ ssh [mailto:root@192.168.1.36 root@192.168.1.]xxx'''</p>
 +
<p>'''root@test:~# ls'''</p></li>
 +
<li><p>'''root@orangepi:~$''' &gt; 提示符表示这个命令是在'''开发板的Linux系统'''中输入的, &gt; 提示符最后的 '''$''' &gt; 表示系统当前用户为普通用户,当执行特权命令时,需要加上'''sudo'''</p></li>
 +
<li><p>'''root@orangepi:~#''' &gt; 提示符表示这个命令是在'''开发板的Linux系统'''中输入的, &gt; 提示符最后的 '''#''' &gt; 表示系统当前用户为root用户,可以执行任何想要执行的命令</p></li>
 +
<li><p>'''test@test:~$''' 提示符表示这个命令是在Ubuntu &gt; PC或者Ubuntu虚拟机中输入的,而不是开发板的Linux系统中。提示符最后的 &gt; '''$''' &gt; 表示系统当前用户为普通用户,当执行特权命令时,需要加上'''sudo'''</p></li>
 +
<li><p>'''root@test:~#''' 提示符表示这个命令是在Ubuntu &gt; PC或者Ubuntu虚拟机中输入的,而不是开发板的Linux系统中。提示符最后的 &gt; '''#''' 表示系统当前用户为root用户,可以执行任何想要执行的命令</p></li></ol>
 +
</li>
 +
<li><p>哪些是需要输入的命令?</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>如下所示,'''黑色加粗部分'''是需要输入的命令,命令下面的是输出的内容(有些命令有输出,有些可能没有输出),这部分内容是不需要输入的</p>
 +
<p>root@orangepi:~# '''cat /boot/orangepiEnv.txt'''</p>
 +
<p>'''verbosity=7'''</p>
 +
<p>bootlogo=false</p>
 +
<p>'''console=serial'''</p></li>
 +
<li><p>如下所示,有些命令一行写不下会放到下一行,只要黑色加粗的部分就都是需要输入的命令。当这些命令输入到一行的时候,每行最后的”'''\'''”是需要去掉的,这个不是命令的一部分。另外命令的不同部分都是有空格的,请别漏了</p>
 +
<p>orangepi@orangepi:~$ '''echo \'''</p>
 +
<p>'''&quot;deb [arch=$(dpkg --print-architecture) \'''</p>
 +
<p>'''signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \'''</p>
 +
<p>'''https://download.docker.com/linux/debian \'''</p>
 +
<p>'''$(lsb_release -cs) stable&quot; | sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null'''</p></li></ol>
 +
</li></ol>
  
<div class="figure">
+
<span id="linux系统登录说明"></span>
 +
== Linux系统登录说明 ==
  
[[File:pi3b-img116.png|451x187px|IMG_256]]
+
<span id="linux系统默认登录账号和密码"></span>
 +
=== Linux系统默认登录账号和密码 ===
  
</div>
+
{| class="wikitable"
<ol start="6" style="list-style-type: lower-alpha;">
+
|-
<li>Then select the '''/dev/nvme0n1p2''' partition, click the right button again, and then select '''Resize/Move'''</li></ol>
+
| style="text-align: left;"| '''账号'''
 +
| style="text-align: left;"| '''密码'''
 +
|-
 +
| style="text-align: left;"| '''root'''
 +
| style="text-align: left;"| '''orangepi'''
 +
|-
 +
| style="text-align: left;"| '''orangepi'''
 +
| style="text-align: left;"| '''orangepi'''
 +
|}
  
<div class="figure">
+
'''注意,输入密码的时候,屏幕上是不会显示输入的密码的具体内容的,请不要以为是有什么故障,输入完后直接回车即可。'''
  
[[File:pi3b-img117.png|448x345px|IMG_256]]
+
'''当输入密码提示错误,或者ssh连接有问题,请注意,只要使用的是Orange Pi提供的Linux镜像,就请不要怀疑上面的密码不对,而是要找其它的原因。'''
  
</div>
+
<span id="设置linux系统终端自动登录的方法"></span>
<ol start="7" style="list-style-type: lower-alpha;">
+
=== 设置Linux系统终端自动登录的方法 ===
<li>Then drag the capacity to the maximum at the position shown in the figure below</li></ol>
 
  
[[File:pi3b-img118.png|339x210px]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>Linux系统默认就是自动登录终端的,默认登录的用户名是'''orangepi'''</p>
 +
<p>[[File:media/image173.png|351x198px]]</p></li>
 +
<li><p>使用下面的命令可以设置root用户自动登录终端</p>
 +
<p>orangepi@orangepi:~$ '''sudo auto_login_cli.sh root'''</p></li>
 +
<li><p>使用下面的命令可以禁止自动登录终端</p>
 +
<p>orangepi@orangepi:~$ '''sudo auto_login_cli.sh -d'''</p></li>
 +
<li><p>使用下面的命令可以再次设置orangepi用户自动登录终端</p>
 +
<p>orangepi@orangepi:~$ '''sudo auto_login_cli.sh orangepi'''</p></li></ol>
  
<ol start="8" style="list-style-type: lower-alpha;">
+
<span id="linux桌面版系统自动登录说明"></span>
<li>Then click '''Resize/Move'''</li></ol>
+
=== Linux桌面版系统自动登录说明 ===
  
[[File:pi3b-img119.png|339x212px]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>桌面版系统启动后会自动登录进入桌面,无需输入密码</p>
 +
<div class="figure">
  
<ol style="list-style-type: lower-roman;">
+
[[File:media/image174.png|576x324px|1]]
<li>Then click the green '''√''' in the position below</li></ol>
 
  
[[File:pi3b-img120.png|425x166px]]
+
</div></li>
 +
<li><p>运行下面的命令可以禁止桌面版系统自动登录桌面</p>
 +
<p>orangepi@orangepi:~$ '''sudo disable_desktop_autologin.sh'''</p></li>
 +
<li><p>然后重启系统就会出现登录对话框,此时需要输入[[\l|'''密码''']]才能进入系统</p>
 +
<div class="figure">
  
<ol start="10" style="list-style-type: lower-alpha;">
+
[[File:media/image175.png|569x320px|IMG_256]]
<li>Then click '''Apply'''</li></ol>
 
  
[[File:pi3b-img121.png|378x276px]]
+
</div></li></ol>
  
<ol start="11" style="list-style-type: lower-alpha;">
+
<span id="linux桌面版系统root用户自动登录的设置方法"></span>
<li>Then click '''Close''' to close</li></ol>
+
=== Linux桌面版系统root用户自动登录的设置方法 ===
  
[[File:pi3b-img122.png|383x234px]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>执行下面的命令可以设置桌面版系统使用root用户自动登录</p>
 +
<p>orangepi@orangepi:~$ '''sudo desktop_login.sh root'''</p></li>
 +
<li><p>然后重启系统,就会自动使用root用户登录桌面了</p>
 +
<p>[[File:media/image176.png|448x187px]]</p>
 +
<p>'''注意,如果使用root用户登录桌面系统,是无法使用右上角的pulseaudio来管理音频设备的。'''</p>
 +
<p>'''另外请注意这并不是一个bug,因为pulseaudio本来就不允许在root用户下运行。'''</p></li>
 +
<li><p>执行下面的命令可以再次设置桌面版系统使用orangepi用户自动登录</p>
 +
<p>orangepi@orangepi:~$ '''sudo desktop_login.sh orangepi'''</p></li></ol>
  
<ol start="13" style="list-style-type: lower-alpha;">
+
<span id="linux桌面版系统禁用桌面的方法"></span>
<li>At this point, you can use the '''sudo poweroff''' command to shut down. Then please pull out the TF card, and then short press the power button to turn on, then the Linux system in SPIFlash+NVMe SSD will be started.</li></ol>
+
=== Linux桌面版系统禁用桌面的方法 ===
  
<!-- -->
+
<ol style="list-style-type: decimal;">
<ol start="10" style="list-style-type: decimal;">
+
<li><p>首先在命令行中输入下面的命令,'''请记得加sudo权限'''</p>
<li><p>Step '''9)''' is to clone the system in the TF card to the NMVe SSD. We can also directly burn the Linux image file to the NVMe SSD. Here are the steps:</p>
+
<p>orangepi@orangepi:~$ '''sudo systemctl disable lightdm.service'''</p></li>
 +
<li><p>然后重启Linux系统就会发现不会显示桌面了</p>
 +
<p>orangepi@orangepi:~$ '''sudo reboot'''</p></li>
 +
<li><p>重新打开桌面的步骤如下所示:</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li><p>Upload the Linux image file to the Linux system of the development board</p></li>
+
<li><p>首先在命令行中输入下面的命令,'''请记得加sudo权限'''</p>
<li><p>Then use balenaEtcher to burn</p></li></ol>
+
<p>orangepi@orangepi:~$ '''sudo systemctl start lightdm.service'''</p></li>
 +
<li><p>命令执行完成后就会显示桌面了</p></li></ol>
 
</li></ol>
 
</li></ol>
  
<div class="figure">
+
<span id="板载led灯测试说明"></span>
 +
== 板载LED灯测试说明 ==
  
[[File:pi3b-img123.png|529x333px|图片1]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>开发板上有三个LED灯,一个绿灯,一个红灯,一个PCIe指示灯,所在位置如下图所示:</p>
 +
<p>[[File:media/image177.png|425x126px]]</p></li>
 +
<li><p>'''只要开发板打开了电源,红色的LED灯就会常亮,这是由硬件控制的,软件无法关闭。'''</p></li>
 +
<li><p>绿色的LED灯在内核启动后会一直闪烁,这是由软件控制的。</p></li>
 +
<li><p>PCIe指示灯在PCIe接口有数据传输时会闪烁。</p></li>
 +
<li><p>设置绿灯亮灭和闪烁的方法如下所示</p>
 +
<p>'''注意,下面的操作请在root用户下进行。'''</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先进入绿灯的设置目录</p>
 +
<p>root@orangepi:~# '''cd /sys/class/leds/status'''</p></li>
 +
<li><p>设置绿灯停止闪烁的命令如下</p>
 +
<p>root@orangepi:/sys/class/leds/work# '''echo none &gt; trigger'''</p></li>
 +
<li><p>设置绿灯常亮的命令如下</p>
 +
<p>root@orangepi:/sys/class/leds/work# '''echo default-on &gt; trigger'''</p></li>
 +
<li><p>设置绿灯闪烁的命令如下</p>
 +
<p>root@orangepi:/sys/class/leds/work# '''echo heartbeat &gt; trigger'''</p></li></ol>
 +
</li></ol>
  
</div>
+
== 网络连接测试 ==
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>'''After using this method to burn the image, there is no need to manually expand the capacity, and it will automatically expand the capacity at the first startup.'''</li></ol>
 
  
<span id="how-to-burn-android-image-to-tf-card"></span>
+
=== 以太网口测试 ===
== How to burn Android image to TF card ==
 
  
<span id="method-of-burning-android-image-to-tf-card-through-usb2.0-burning-port"></span>
+
<ol style="list-style-type: decimal;">
=== Method of burning Android image to TF card through USB2.0 burning port ===
+
<li><p>首先将网线的一端插入开发板的以太网接口,网线的另一端接入路由器,并确保网络是畅通的</p></li>
 +
<li><p>系统启动后会通过'''DHCP'''自动给以太网卡分配IP地址,'''不需要其他任何配置'''</p></li>
 +
<li><p>在开发板的Linux系统中查看IP地址的命令如下所示</p>
 +
<p>orangepi@orangepi:~$ '''ip addr show eth0'''</p>
 +
<p>2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc mq state UP group default qlen 1000</p>
 +
<p>link/ether 4a:fe:2b:3d:17:1c brd ff:ff:ff:ff:ff:ff</p>
 +
<p>inet '''192.168.1.150'''/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0</p>
 +
<p>valid_lft 43150sec preferred_lft 43150sec</p>
 +
<p>inet6 fe80::9a04:3703:faed:23be/64 scope link noprefixroute</p>
 +
<p>valid_lft forever preferred_lft forever</p>
 +
<p>'''当使用ifconfig查看IP地址时,如果提示下面的信息,是因为没有加sudo导致的,正确的命令是:sudo ifconfig'''</p>
 +
<p>orangepi@orangepi:~$ '''ifconfig'''</p>
 +
<p>Command 'ifconfig' is available in the following places</p>
 +
<p>* /sbin/ifconfig</p>
 +
<p>* /usr/sbin/ifconfig</p>
 +
<p>The command could not be located because '/sbin:/usr/sbin' is not included in the PATH environment variable.</p>
 +
<p>This is most likely caused by the lack of administrative privileges associated with your user account.</p>
 +
<p>ifconfig: command not found</p></li></ol>
  
# First prepare a TF card with 8GB or larger capacity. The transmission speed of the TF card must be class10 or above. It is recommended to use a TF card of SanDisk and other brands
+
'''开发板启动后查看IP地址有三种方法:'''
# You also need to prepare a good quality USB2.0 male-to-male data cable
 
  
<div class="figure">
+
# '''接HDMI显示器,然后登录系统使用ip addr show eth0命令查看IP地址'''
 +
# '''在调试串口终端输入ip addr show eth0命令来查看IP地址'''
 +
# '''如果没有调试串口,也没有HDMI显示器,还可以通过路由器的管理界面来查看开发板网口的IP地址。不过这种方法经常有人会无法正常看到开发板的IP地址。如果看不到,调试方法如下所示:'''
  
[[File:pi3b-img16.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
+
<!-- -->
 +
<ol style="list-style-type: upper-alpha;">
 +
<li><p>'''首先检查Linux系统是否已经正常启动,如果开发板的绿灯在闪烁了,一般是正常启动了,如果只亮红灯,说明系统都没正常启动;'''</p></li>
 +
<li><p>'''检查网线有没有插紧,或者换根网线试下;'''</p></li>
 +
<li><p>'''换个路由器试下(路由器的问题有遇到过很多,比如路由器无法正常分配IP地址,或者已正常分配IP地址但在路由器中看不到);'''</p></li>
 +
<li><p>'''如果没有路由器可换就只能连接HDMI显示器或者使用调试串口来查看IP地址。'''</p>
 +
<p>'''另外需要注意的是开发板DHCP自动分配IP地址是不需要任何设置的。'''</p></li></ol>
  
</div>
+
<!-- -->
<ol start="3" style="list-style-type: decimal;">
+
<ol start="4" style="list-style-type: decimal;">
<li><p>Then download Rockchip driver '''DriverAssitant_v5.12.zip''' and burning tool '''RKDevTool_Release_v3.15.zip''' from [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi's data download page''']</p></li>
+
<li><p>测试网络连通性的命令如下,'''ping'''命令可以通过'''Ctrl+C'''快捷键来中断运行</p>
<li><p>Then download the Android image from [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi's download page'''].</p>
+
<p>orangepi@orangepi:~$ '''ping www.baidu.com -I eth0'''</p>
 +
<p>PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 56(84) bytes of data.</p>
 +
<p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=56 time=6.74 ms</p>
 +
<p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=56 time=6.80 ms</p>
 +
<p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=56 time=6.26 ms</p>
 +
<p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=56 time=7.27 ms</p>
 +
<p>^C</p>
 +
<p>--- www.a.shifen.com ping statistics ---</p>
 +
<p>4 packets transmitted, 4 received, 0% packet loss, time 3002ms</p>
 +
<p>rtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms</p></li></ol>
 +
 
 +
<span id="wifi连接测试"></span>
 +
=== WIFI连接测试 ===
 +
 
 +
'''请不要通过修改/etc/network/interfaces配置文件的方式来连接WIFI,通过这种方式连接WIFI网络使用会有问题。'''
 +
 
 +
<span id="服务器版镜像通过命令连接wifi"></span>
 +
==== 服务器版镜像通过命令连接WIFI ====
 +
 
 +
'''当开发板没有连接以太网,没有连接HDMI显示器,只连接了串口时,推荐使用此小节演示的命令来连接WIFI网络。因为nmtui在某些串口软件(如minicom)中只能显示字符,无法正常显示图形界面。当然,如果开发板连接了以太网或者HDMI显示屏,也可以使用此小节演示的命令来连接WIFI网络的。'''
 +
 
 +
<ol style="list-style-type: decimal;">
 +
<li><p>先登录Linux系统,有下面三种方式</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li>如果开发板连接了网线,可以通过[[\l|'''ssh远程登录Linux系统''']]</li></ol>
 +
 
 +
<!-- -->
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>After opening the download link of the Android image, you can see the following two types of Android images, please select the image in the '''TF card and eMMC startup image''' folder to download</li></ol>
+
<li><p>如果开发板连接好了调试串口,可以使用串口终端登录Linux系统</p></li>
 +
<li><p>如果连接了开发板到HDMI显示器,可以通过HDMI显示的终端登录到Linux系统</p></li></ol>
 
</li></ol>
 
</li></ol>
  
 +
<!-- -->
 +
<ol style="list-style-type: decimal;">
 +
<li><p>首先使用'''nmcli dev wifi'''命令扫描周围的WIFI热点</p>
 +
<p>orangepi@orangepi:~$ '''nmcli dev wifi'''</p>
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img124.png|340x108px|e6986fc9c8fc078e8cb6a9c39b76fb8]]
+
[[File:media/image178.png|575x250px|选区_011]]
  
</div>
+
</div></li>
<ol start="2" style="list-style-type: lower-alpha;">
+
<li><p>然后使用'''nmcli''' 命令连接扫描到的WIFI热点,其中:</p>
<li><p>After entering the '''TF card and eMMC startup image''' folder, you can see the following two images, the difference between them is:</p>
 
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li><p>The first image is dedicated to HDMI display and supports 4K display. If you don’t use LCD screen, please download the image without lcd</p></li>
+
<li><p>'''wifi_name'''需要换成想连接的WIFI热点的名字</p></li>
<li><p>If you want to use lcd screen, please choose image with lcd</p></li></ol>
+
<li><p>'''wifi_passwd'''需要换成想连接的WIFI热点的密码</p>
</li></ol>
+
<p>orangepi@orangepi:~$ '''nmcli dev wifi connect wifi_name password wifi_passwd'''</p>
 +
<p>Device 'wlan0' successfully activated with 'cf937f88-ca1e-4411-bb50-61f402eef293'.</p></li></ol>
 +
</li>
 +
<li><p>通过'''ip addr show wlan0'''命令可以查看wifi的IP地址</p>
 +
<p>orangepi@orangepi:~$ '''ip addr show wlan0'''</p>
 +
<p>11: wlan0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</p>
 +
<p>link/ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff</p>
 +
<p>inet '''192.168.1.11'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0</p>
 +
<p>valid_lft 259192sec preferred_lft 259192sec</p>
 +
<p>inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute</p>
 +
<p>valid_lft 259192sec preferred_lft 172792sec</p>
 +
<p>inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute</p>
 +
<p>valid_lft forever preferred_lft forever</p></li>
 +
<li><p>使用'''ping'''命令可以测试wifi网络的连通性,'''ping'''命令可以通过'''Ctrl+C'''快捷键来中断运行</p>
 +
<p>orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0'''</p>
 +
<p>PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data.</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms</p>
 +
<p>^C</p>
 +
<p>--- www.orangepi.org ping statistics ---</p>
 +
<p>5 packets transmitted, 5 received, 0% packet loss, time 4006ms</p>
 +
<p>rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms</p></li></ol>
  
[[File:pi3b-img125.png|264x58px]]
+
<span id="服务器版镜像通过图形化方式连接wifi"></span>
 +
==== 服务器版镜像通过图形化方式连接WIFI ====
  
<ol start="5" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li><p>Then use the decompression software to decompress the compressed package of the downloaded Android image. Among the decompressed files, the file ending with &quot;.img&quot; is the Android image file, and the size is more than 1GB</p></li>
+
<li><p>先登录Linux系统,有下面三种方式</p>
<li><p>Then use the decompression software to decompress '''DriverAssitant_v5.12.zip''', and then find the '''DriverInstall.exe''' executable file in the decompressed folder and open it</p></li></ol>
+
<ol style="list-style-type: lower-alpha;">
 +
<li><p>如果开发板连接了网线,可以通过[[\l|'''ssh远程登录Linux系统''']]</p></li>
 +
<li><p>如果开发板连接好了调试串口,可以使用串口终端登录Linux系统(串口软件请使用MobaXterm,使用minicom无法显示图形界面)</p></li>
 +
<li><p>如果连接了开发板到HDMI显示器,可以通过HDMI显示的终端登录到Linux系统</p></li></ol>
 +
</li>
 +
<li><p>然后在命令行中输入nmtui命令打开wifi连接的界面</p>
 +
<p>orangepi@orangepi:~$ '''nmtui'''</p></li>
 +
<li><p>输入nmtui命令打开的界面如下所示</p>
 +
<p>[[File:media/image179.png|345x215px]]</p></li>
 +
<li><p>选择'''Activate a connect'''后回车</p>
 +
<p>[[File:media/image180.png|349x216px]]</p></li>
 +
<li><p>然后就能看到所有搜索到的WIFI热点</p>
 +
<p>[[File:media/image181.png|360x229px]]</p></li>
 +
<li><p>选择想要连接的WIFI热点后再使用Tab键将光标定位到'''Activate'''后回车</p>
 +
<p>[[File:media/image182.png|366x230px]]</p></li>
 +
<li><p>然后会弹出输入密码的对话框,在'''Password'''内输入对应的密码然后回车就会开始连接WIFI</p>
 +
<p>[[File:media/image183.png|352x225px]]</p></li>
 +
<li><p>WIFI连接成功后会在已连接的WIFI名称前显示一个”*”</p>
 +
<p>[[File:media/image184.png|349x223px]]</p></li>
 +
<li><p>通过'''ip addr show wlan0'''命令可以查看wifi的IP地址</p>
 +
<p>orangepi@orangepi:~$ '''ip addr show wlan0'''</p>
 +
<p>11: wlan0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</p>
 +
<p>link/ether 24:8c:d3:aa:76:bb brd ff:ff:ff:ff:ff:ff</p>
 +
<p>inet '''192.168.1.11'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0</p>
 +
<p>valid_lft 259069sec preferred_lft 259069sec</p>
 +
<p>inet6 240e:3b7:3240:c4a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute</p>
 +
<p>valid_lft 259071sec preferred_lft 172671sec</p>
 +
<p>inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute</p>
 +
<p>valid_lft forever preferred_lft forever</p></li>
 +
<li><p>使用'''ping'''命令可以测试wifi网络的连通性,'''ping'''命令可以通过'''Ctrl+C'''快捷键来中断运行</p>
 +
<p>orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0'''</p>
 +
<p>PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data.</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms</p>
 +
<p>64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms</p>
 +
<p>^C</p>
 +
<p>--- www.orangepi.org ping statistics ---</p>
 +
<p>5 packets transmitted, 5 received, 0% packet loss, time 4006ms</p>
 +
<p>rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms</p></li></ol>
  
[[File:pi3b-img31.png|575x169px]]
+
==== 桌面版镜像的测试方法 ====
  
<ol start="7" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li><p>After opening '''DriverInstall.exe''', the steps to install the Rockchip driver are as follows</p>
+
<li><p>点击桌面右上角的网络配置图标(测试WIFI时请不要连接网线)</p>
<ol style="list-style-type: lower-alpha;">
+
<p>[[File:media/image185.png|377x166px]]</p></li>
<li>Click the &quot;'''Driver Installation'''&quot; button</li></ol>
+
<li><p>在弹出的下拉框中点击'''More networks'''可以看到所有扫描到的WIFI热点,然后选择想要连接的WIFI热点</p>
</li></ol>
+
<p>[[File:media/image186.png|576x353px]]</p></li>
 +
<li><p>然后输入WIFI热点的密码,再点击'''Connect'''就会开始连接WIFI</p>
 +
<p>[[File:media/image187.png|320x163px]]</p></li>
 +
<li><p>连接好WIFI后,可以打开浏览器查看是否能上网,浏览器的入口如下图所示</p>
 +
<p>[[File:media/image188.png|576x308px]]</p></li>
 +
<li><p>打开浏览器后如果能打开其他网页说明WIFI连接正常</p>
 +
<div class="figure">
  
[[File:pi3b-img32.png|300x157px]]
+
[[File:media/image189.png|576x273px|5]]
  
<ol start="2" style="list-style-type: lower-alpha;">
+
</div></li></ol>
<li>After waiting for a period of time, a pop-up window will prompt &quot;'''The driver is installed successfully'''&quot;, and then click the &quot;'''OK'''&quot; button.</li></ol>
 
  
[[File:pi3b-img33.png|315x164px]]
+
<span id="设置静态ip地址的方法"></span>
 +
=== 设置静态IP地址的方法 ===
  
<ol start="8" style="list-style-type: decimal;">
+
'''请不要通过修改/etc/network/interfaces配置文件的方式来设置静态IP地址。'''
<li>Then decompress '''RKDevTool_Release_v3.15.zip''', this software does not need to be installed, just find '''RKDevTool''' in the decompressed folder and open it</li></ol>
 
  
[[File:pi3b-img34.png|454x134px]]
+
<span id="使用nmtui命令来设置静态ip地址"></span>
 +
==== 使用nmtui命令来设置静态IP地址 ====
  
<ol start="9" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li>After opening the '''RKDevTool''' burning tool, because the computer has not connected to the development board through the USB2.0 male-to-male data cable at this time, the lower left corner will prompt &quot;'''No device found'''&quot;</li></ol>
+
<li><p>首先运行'''nmtui'''命令</p>
 +
<p>orangepi@orangepi:~$ '''nmtui'''</p></li>
 +
<li><p>然后选择'''Edit a connection'''并按下回车键</p>
 +
<p>[[File:media/image190.png|227x247px]]</p></li>
 +
<li><p>然后选择需要设置静态IP地址的网络接口,比如设置'''Ethernet'''接口的静态IP地址选择'''Wired connection 1'''就可以了</p>
 +
<p>[[File:media/image191.png|310x149px]]</p></li>
 +
<li><p>然后通过'''Tab'''键选择'''Edit'''并按下回车键</p>
 +
<p>[[File:media/image192.png|316x144px]]</p></li>
 +
<li><p>然后通过Tab键将光标移动到下图所示的'''&lt;Automatic&gt;'''位置进行IPv4的配置</p>
 +
<p>[[File:media/image193.png|575x240px]]</p></li>
 +
<li><p>然后回车,通过上下方向键选择'''Manual''',然后回车确定</p>
 +
<p>[[File:media/image194.png|576x237px]]</p></li>
 +
<li><p>选择完后的显示如下图所示</p>
 +
<p>[[File:media/image195.png|575x240px]]</p></li>
 +
<li><p>然后通过Tab键将光标移动到'''&lt;Show&gt;'''</p>
 +
<p>[[File:media/image196.png|576x241px]]</p></li>
 +
<li><p>然后回车,回车后会弹出下面的设置界面</p>
 +
<p>[[File:media/image197.png|575x450px]]</p></li>
 +
<li><p>然后就可以在下图所示的位置设置IP地址(Addresses)、网关(Gateway)和DNS服务器的地址(里面还有很多其他设置选项,请自行探索),'''请根据自己的具体需求来设置,下图中设置的值只是一个示例'''</p>
 +
<p>[[File:media/image198.png|576x233px]]</p></li>
 +
<li><p>设置完后将光标移动到右下角的'''&lt;OK&gt;''',然后回车确认</p>
 +
<p>[[File:media/image199.png|576x116px]]</p></li>
 +
<li><p>然后点击'''&lt;Back&gt;'''回退到上一级选择界面</p>
 +
<p>[[File:media/image200.png|330x325px]]</p></li>
 +
<li><p>然后选择'''Activate a connection''',再将光标移动到'''&lt;OK&gt;''',最后点击回车</p>
 +
<p>[[File:media/image201.png|331x248px]]</p></li>
 +
<li><p>然后选择需要设置的网络接口,比如'''Wired connection 1''',然后将光标移动到'''&lt;Deactivate&gt;''',再按下回车键禁用'''Wired connection 1'''</p>
 +
<p>[[File:media/image202.png|576x224px]]</p></li>
 +
<li><p>然后请不要移动光标,再按下回车键重新使能'''Wired connection 1''',这样前面设置的静态IP地址就会生效了</p>
 +
<p>[[File:media/image203.png|576x224px]]</p></li>
 +
<li><p>然后通过'''&lt;Back&gt;'''和'''Quit'''按钮就可以退出nmtui</p>
 +
<p>[[File:media/image204.png|300x253px]] [[File:media/image205.png|227x252px]]</p></li>
 +
<li><p>然后通过'''ip addr show eth0'''就能看到网口的IP地址已经变成前面设置的静态IP地址了</p>
 +
<p>orangepi@orangepi:~$ '''ip addr show eth0'''</p>
 +
<p>3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</p>
 +
<p>link/ether 5e:ac:14:a5:92:b3 brd ff:ff:ff:ff:ff:ff</p>
 +
<p>inet '''192.168.1.177'''/24 brd 192.168.1.255 scope global noprefixroute eth0</p>
 +
<p>valid_lft forever preferred_lft forever</p>
 +
<p>inet6 241e:3b8:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute</p>
 +
<p>valid_lft 259149sec preferred_lft 172749sec</p>
 +
<p>inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute</p>
 +
<p>valid_lft forever preferred_lft forever</p></li>
 +
<li><p>然后就可以测试网络的连通性来检查IP地址是否配置OK了,'''ping'''命令可以通过'''Ctrl+C'''快捷键来中断运行</p>
 +
<p>orangepi@orangepi:~$ '''ping 192.168.1.47 -I eth0'''</p>
 +
<p>PING 192.168.1.47 (192.168.1.47) from 192.168.1.188 eth0: 56(84) bytes of data.</p>
 +
<p>64 bytes from 192.168.1.47: icmp_seq=1 ttl=64 time=0.233 ms</p>
 +
<p>64 bytes from 192.168.1.47: icmp_seq=2 ttl=64 time=0.263 ms</p>
 +
<p>64 bytes from 192.168.1.47: icmp_seq=3 ttl=64 time=0.273 ms</p>
 +
<p>64 bytes from 192.168.1.47: icmp_seq=4 ttl=64 time=0.269 ms</p>
 +
<p>64 bytes from 192.168.1.47: icmp_seq=5 ttl=64 time=0.275 ms</p>
 +
<p>^C</p>
 +
<p>--- 192.168.1.47 ping statistics ---</p>
 +
<p>5 packets transmitted, 5 received, 0% packet loss, time 4042ms</p>
 +
<p>rtt min/avg/max/mdev = 0.233/0.262/0.275/0.015 ms</p></li></ol>
  
[[File:pi3b-img35.png|442x208px]]
+
<span id="使用nmcli命令来设置静态ip地址"></span>
 +
==== 使用nmcli命令来设置静态IP地址 ====
  
<ol start="10" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li><p>Then start burning the Android image to the TF card</p>
+
<li><p>如果要设置网口的静态IP地址,请先将网线插入开发板,'''如果需要设置WIFI的静态IP地址,请先连接好WIFI''',然后再开始设置静态IP地址</p></li>
 +
<li><p>然后通过'''nmcli con show'''命令可以查看网络设备的名字,如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''orangepi'''为WIFI网络接口的名字(名字不一定相同)</p></li>
 +
<li><p>'''Wired connection 1'''为以太网接口的名字</p>
 +
<p>orangepi@orangepi:~$ '''nmcli con show'''</p>
 +
<p>NAME UUID TYPE DEVICE</p>
 +
<p>'''orangepi''' cfc4f922-ae48-46f1-84e1-2f19e9ec5e2a wifi wlan0</p>
 +
<p>'''Wired connection 1''' 9db058b7-7701-37b8-9411-efc2ae8bfa30 ethernet eth0</p></li></ol>
 +
</li>
 +
<li><p>然后输入下面的命令,其中</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>First, connect the development board to the Windows computer through the USB2.0 male-to-male data cable. The position of the USB2.0 programming interface of the development board is shown in the figure below</li></ol>
+
<li><p>'''&quot;Wired connection 1&quot;''' &gt; 表示设置以太网口的静态IP地址,如果需要设置WIFI的静态IP地址,请修改为WIFI网络接口对应的名字(通过'''nmcli &gt; con show'''命令可以获取到)</p></li>
</li></ol>
+
<li><p>'''ipv4.addresses'''后面是要设置的静态IP地址,可以修改为自己想要设置的值</p></li>
 +
<li><p>'''ipv4.gateway''' 表示网关的地址</p>
 +
<p>orangepi@orangepi:~$ '''nmcli con mod &quot;Wired connection 1&quot; \'''</p>
 +
<p>'''ipv4.addresses &quot;192.168.1.110&quot; \'''</p>
 +
<p>'''ipv4.gateway &quot;192.168.1.1&quot; \'''</p>
 +
<p>'''ipv4.dns &quot;8.8.8.8&quot; \'''</p>
 +
<p>'''ipv4.method &quot;manual&quot;'''</p></li></ol>
 +
</li>
 +
<li><p>然后重启Linux系统</p>
 +
<p>orangepi@orangepi:~$ '''sudo reboot'''</p></li>
 +
<li><p>然后重新进入Linux系统使用'''ip addr show eth0'''命令就可以看到IP地址已经设置为想要的值了</p>
 +
<p>orangepi@orangepi:~$ '''ip addr show eth0'''</p>
 +
<p>3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</p>
 +
<p>link/ether 5e:ae:14:a5:91:b3 brd ff:ff:ff:ff:ff:ff</p>
 +
<p>inet '''192.168.1.110'''/32 brd 192.168.1.110 scope global noprefixroute eth0</p>
 +
<p>valid_lft forever preferred_lft forever</p>
 +
<p>inet6 240e:3b7:3240:c3a0:97de:1d01:b290:fe3a/64 scope global dynamic noprefixroute</p>
 +
<p>valid_lft 259183sec preferred_lft 172783sec</p>
 +
<p>inet6 fe80::3312:861a:a589:d3c/64 scope link noprefixroute</p>
 +
<p>valid_lft forever preferred_lft forever</p></li></ol>
  
<div class="figure">
+
<span id="ssh远程登录开发板"></span>
 +
== SSH远程登录开发板 ==
  
[[File:pi3b-img36.png|275x116px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\1691131157154(1).jpg1691131157154(1)]]
+
'''Linux系统默认都开启了ssh远程登录,并且允许root用户登录系统。ssh登录前首先需要确保以太网或者wifi网络已连接,然后使用ip addr命令或者通过查看路由器的方式获取开发板的IP地址。'''
  
</div>
+
<span id="ubuntu下ssh远程登录开发板"></span>
<ol start="2" style="list-style-type: lower-alpha;">
+
=== Ubuntu下SSH远程登录开发板 ===
<li><p>Then make sure that the development board is not inserted into the TF card and not connected to the power supply</p></li>
 
<li><p>Then press and hold the MaskROM button on the development board, the position of the MaskROM button on the development board is shown in the figure below:</p></li></ol>
 
  
[[File:pi3b-img37.png|289x100px]]
+
# 获取开发板的IP地址
 +
# 然后就可以通过ssh命令远程登录Linux系统
  
<ol start="4" style="list-style-type: lower-alpha;">
+
test@test:~$ '''ssh [mailto:root@192.168.1.36 root@192.168.1.]xxx''' (需要替换为开发板的IP地址)
<li>Then connect the power supply of the Type-C interface to the development board, and power on</li></ol>
 
  
[[File:pi3b-img38.png|305x94px]]
+
root@192.168.1.xx's password: (在这里输入密码,默认密码为orangepi)
  
<ol start="5" style="list-style-type: lower-alpha;">
+
'''注意,输入密码的时候,屏幕上是不会显示输入的密码的具体内容的,请不要以为是有什么故障,输入完后直接回车即可。'''
<li>If the previous steps are successful, the development board will enter the '''MASKROM''' mode at this time, and the interface of the burning tool will prompt &quot;'''found a MASKROM device'''&quot;</li></ol>
 
  
[[File:pi3b-img39.png|457x215px]]
+
'''如果提示拒绝连接,只要使用的是Orange Pi提供的镜像,就请不要怀疑orangepi这个密码是不是不对,而是要找其他原因。'''
 
 
<ol start="6" style="list-style-type: lower-alpha;">
 
<li><p>Then insert the TF card into the development board</p></li>
 
<li><p>Then please select '''advanced features'''</p>
 
<p>[[File:pi3b-img126.png|458x138px]]</p></li>
 
<li><p>Then click the position shown in the figure below</p>
 
<p>[[File:pi3b-img127.png|459x216px]]</p></li>
 
<li><p>Then select '''rk3566_MiniLoaderAll.bin''' in the '''MiniLoader''' folder downloaded earlier, and click to open</p></li></ol>
 
  
 +
<ol start="3" style="list-style-type: decimal;">
 +
<li><p>成功登录系统后的显示如下图所示</p>
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img68.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
+
[[File:media/image206.png|405x207px|L467QDF65C(YR79U]TH[TND]]
  
 
</div>
 
</div>
<ol start="10" style="list-style-type: lower-alpha;">
+
<p>'''如果ssh无法正常登陆Linux系统,首先请检查下开发板的IP地址是否能ping通,如果ping通没问题的话,可以通过串口或者HDMI显示器登录Linux系统然后在开发板上输入下面的命令后再尝试是否能连接:'''</p></li></ol>
<li><p>Then click '''download'''</p>
+
 
<p>[[File:pi3b-img128.png|472x222px]]</p></li>
+
root@orangepi:~# '''reset_ssh.sh'''
<li><p>The display after downloading '''rk3566_MiniLoaderAll.bin''' is shown in the figure below</p>
+
 
<p>[[File:pi3b-img129.png|474x227px]]</p></li>
+
'''如果还不行,请重烧系统试下。'''
<li><p>Then select the storage device as '''SD''', and then click '''Switch Storage'''</p>
 
<div class="figure">
 
  
[[File:pi3b-img130.png|477x222px|D~T2CO%X~K2@ELR98)BVP~2]]
+
<span id="windows下ssh远程登录开发板"></span>
 +
=== Windows下SSH远程登录开发板 ===
  
</div></li>
+
<ol style="list-style-type: decimal;">
<li><p>The display of successful switching is shown in the figure below</p></li></ol>
+
<li><p>首先获取开发板的IP地址</p></li>
 +
<li><p>在windows下可以使用MobaXterm远程登录开发板,首先新建一个ssh会话</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>打开'''Session'''</p></li>
 +
<li><p>然后在'''Session Setting'''中选择'''SSH'''</p></li>
 +
<li><p>然后在'''Remote host'''中输入开发板的IP地址</p></li>
 +
<li><p>然后在'''Specify &gt; username'''中输入Linux系统的用户名'''root'''或'''orangepi'''</p></li>
 +
<li><p>最后点击'''OK'''即可</p>
 +
<p>[[File:media/image207.png|576x292px]]</p></li></ol>
 +
</li>
 +
<li><p>然后会提示输入密码,默认root和orangepi用户的密码都为orangepi</p>
 +
<p>'''注意,输入密码的时候,屏幕上是不会显示输入的密码的具体内容的,请不要以为是有什么故障,输入完后直接回车即可。'''</p></li></ol>
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img131.png|474x223px|QFVLTK~19N32OK2UGH{D{AK]]
+
[[File:media/image208.png|578x150px|IMG_256]]
  
 
</div>
 
</div>
<ol start="14" style="list-style-type: lower-alpha;">
+
<ol start="4" style="list-style-type: decimal;">
<li>Then click the &quot;'''Upgrade Firmware'''&quot; column of the burning tool</li></ol>
+
<li>成功登录系统后的显示如下图所示</li></ol>
  
[[File:pi3b-img132.png|477x224px]]
+
[[File:media/image209.png|576x334px]]
  
<ol start="15" style="list-style-type: lower-alpha;">
+
<span id="上传文件到开发板linux系统中的方法"></span>
<li>Then click the &quot;'''Firmware'''&quot; button to select the path of the Android image that needs to be burned</li></ol>
+
== 上传文件到开发板Linux系统中的方法 ==
  
[[File:pi3b-img133.png|444x209px]]
+
<span id="在ubuntu-pc中上传文件到开发板linux系统中的方法"></span>
 +
=== 在Ubuntu PC中上传文件到开发板Linux系统中的方法 ===
  
<ol start="16" style="list-style-type: lower-alpha;">
+
==== 使用scp命令上传文件的方法 ====
<li>Finally, click the &quot;'''Upgrade'''&quot; button to start burning, and the log during the burning process is shown in the figure below. After burning is completed, the Android system will start automatically.</li></ol>
 
  
<div class="figure">
+
<ol style="list-style-type: decimal;">
 +
<li><p>使用scp命令可以在Ubuntu PC中上传文件到开发板的Linux系统中,具体命令如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''file_path:'''需要替换为要上传文件的路径</p></li>
 +
<li><p>'''orangepi:'''为开发板Linux系统的用户名,也可以替换成其它的,比如root</p></li>
 +
<li><p>'''192.168.xx.xx:''' 为开发板的IP地址,请根据实际情况进行修改</p></li>
 +
<li><p>'''/home/orangepi:''' &gt; 开发板Linux系统中的路径,也可以修改为其它的路径</p>
 +
<p>test@test:~$ '''scp file_path orangepi@192.168.xx.xx:/home/orangepi/'''</p></li></ol>
 +
</li>
 +
<li><p>如果要上传文件夹,需要加上-r参数</p>
 +
<p>test@test:~$ '''scp -r dir_path orangepi@192.168.xx.xx:/home/orangepi/'''</p></li>
 +
<li><p>scp还有更多的用法,请使用下面的命令查看man手册</p></li></ol>
  
[[File:pi3b-img134.png|455x214px|GO~ZSPN`B]JCQM`@_9UU8[R]]
+
test@test:~$ '''man scp'''
  
</div>
+
==== 使用filezilla上传文件的方法 ====
<span id="how-to-use-sddisktool-to-burn-android-image-to-tf-card"></span>
 
=== How to use SDDiskTool to burn Android image to TF card ===
 
  
 
<ol style="list-style-type: decimal;">
 
<ol style="list-style-type: decimal;">
<li><p>First prepare a TF card with 8GB or larger capacity. The transmission speed of the TF card must be class10 or above. It is recommended to use a TF card of SanDisk and other brands</p></li>
+
<li><p>首先在Ubuntu PC中安装filezilla</p>
<li><p>Then use the card reader to insert the TF card into the computer</p></li>
+
<p>test@test:~$ '''sudo apt install -y filezilla'''</p></li>
<li><p>Then download the SDDiskTool programming tool from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page'''], '''please make sure that the version of the SDDiskTool tool is the latest v1.72.'''</p></li>
+
<li><p>然后使用下面的命令打开filezilla</p>
<li><p>Then download '''the Android11 image from the Orange Pi download''' '''page'''</p>
+
<p>test@test:~$ '''filezilla'''</p></li>
<ol style="list-style-type: lower-alpha;">
+
<li><p>filezilla打开后的界面如下所示,此时右边远程站点下面显示的是空的</p>
<li>After opening the download link of the Android image, you can see the following two types of Android images, please select the image in the '''TF card and eMMC startup image''' folder to download</li></ol>
+
<div class="figure">
</li></ol>
 
  
<blockquote><div class="figure">
+
[[File:media/image210.png|576x453px|截图 2022-12-03 19-04-40]]
  
[[File:pi3b-img124.png|340x108px|e6986fc9c8fc078e8cb6a9c39b76fb8]]
+
</div></li>
 +
<li><p>连接开发板的方法如下图所示</p></li></ol>
  
</div></blockquote>
+
<div class="figure">
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>After entering the '''TF card and eMMC boot image''' folder, you can see the following two images, the difference between them is:</li></ol>
 
  
<!-- -->
+
[[File:media/image211.png|577x128px|IMG_256]]
<ol style="list-style-type: lower-alpha;">
 
<li><p>The image without lcd is specially used for HDMI display and supports 4K display. If you do not use the LCD screen, please download the image without lcd</p></li>
 
<li><p>If you want to use LCD screen, please choose image with lcd</p></li></ol>
 
  
[[File:pi3b-img125.png|281x62px]]
+
</div>
 +
<ol start="5" style="list-style-type: decimal;">
 +
<li><p>然后选择'''保存密码''',再点击'''确定'''</p>
 +
<p>[[File:media/image212.png|249x181px]]</p></li>
 +
<li><p>然后选择'''总是信任该主机''',再点击'''确定'''</p></li></ol>
  
<ol start="5" style="list-style-type: decimal;">
+
<div class="figure">
<li><p>Then use decompression software to decompress the compressed package of the downloaded Android image. Among the decompressed files, the file ending with &quot;.img&quot; is the Android image file, and the size is more than 1GB</p></li>
 
<li><p>Then use decompression software to decompress '''SDDiskTool_v1.72.zip''', this software does not need to be installed, just find '''SD_Firmware_Tool.exe''' in the decompressed folder and open it</p></li></ol>
 
  
[[File:pi3b-img135.png|415x99px]]
+
[[File:media/image213.png|278x150px|IMG_256]]
  
 +
</div>
 
<ol start="7" style="list-style-type: decimal;">
 
<ol start="7" style="list-style-type: decimal;">
<li>After opening '''SDDiskTool''', if the TF card is recognized normally, the inserted disk device will be displayed in the &quot;'''Select Removable Disk Device'''&quot; column. P'''lease make sure that the displayed disk device is consistent with the drive letter of the TF card you want to burn''', if there is no display, you can try to unplug the TF card</li></ol>
+
<li>连接成功后在filezilla软件的右边就可以看到开发板Linux文件系统的目录结构了</li></ol>
 +
 
 +
<div class="figure">
  
[[File:pi3b-img136.png|267x228px]]
+
[[File:media/image214.png|533x330px|IMG_256]]
  
 +
</div>
 
<ol start="8" style="list-style-type: decimal;">
 
<ol start="8" style="list-style-type: decimal;">
<li>After confirming the drive letter, you can format the TF card first, click the '''restore disk button''' in '''SDDiskTool,''' or use the '''SD Card Formatter''' mentioned above to format the TF card</li></ol>
+
<li>然后在filezilla软件的右边选择要上传到开发板中的路径,再在filezilla软件的左边选中Ubuntu PC中要上传的文件,再点击鼠标右键,再点击上传选项就会开始上传文件到开发板中了。</li></ol>
  
[[File:pi3b-img137.png|264x226px]]
+
<div class="figure">
  
 +
[[File:media/image215.png|529x414px|IMG_256]]
 +
 +
</div>
 
<ol start="9" style="list-style-type: decimal;">
 
<ol start="9" style="list-style-type: decimal;">
<li><p>Then start to write the Android image to the TF card</p>
+
<li><p>上传完成后就可以去开发板Linux系统中的对应路径中查看上传的文件了</p></li>
<ol style="list-style-type: lower-alpha;">
+
<li><p>上传文件夹的方法和上传文件的方法是一样的,这里就不再赘述了</p></li></ol>
<li><p>First check &quot;SD Boot&quot; in &quot;Select Function Mode&quot;</p></li>
+
 
<li><p>Then select the path of the Android image in the &quot;Select to upgrade firmware&quot; column</p></li>
+
<span id="在windows-pc中上传文件到开发板linux系统中的方法"></span>
<li><p>Finally click the &quot;Start Create&quot; button to start burning the Android image to the TF card</p></li></ol>
+
=== 在Windows PC中上传文件到开发板Linux系统中的方法 ===
</li></ol>
+
 
 +
<span id="使用filezilla上传文件的方法-1"></span>
 +
==== 使用filezilla上传文件的方法 ====
  
[[File:pi3b-img138.png|286x242px]]
+
# 首先下载filezilla软件Windows版本的安装文件,下载链接如下所示
  
<ol start="10" style="list-style-type: decimal;">
+
[https://filezilla-project.org/download.php?type=client '''https://filezilla-project.org/download.php?type=client'''][[File:media/image216.png|472x171px|IMG_256]]
<li>After burning, you can exit the SDDiskTool software, and then you can pull out the TF card from the computer and insert it into the development board to start</li></ol>
 
  
[[File:pi3b-img139.png|288x244px]]
+
[[File:media/image217.png|384x276px]]
  
<span id="how-to-burn-android-image-to-emmc"></span>
+
<ol start="2" style="list-style-type: decimal;">
== How to burn Android image to eMMC ==
+
<li><p>下载的安装包如下所示,然后双击直接安装即可</p>
 +
<p>'''FileZilla_Server_1.5.1_win64-setup.exe'''</p></li></ol>
  
'''Note, after burning the image into eMMC, if the test finds that it cannot be started, please clear the SPIFlash and try again. For the method of clearing SPIFlash, please refer to''' [[\l|the method of using RKDevTool to clear SPIFlash]]'''.'''
+
安装过程中,下面的安装界面请选择'''Decline''',然后再选择'''Next&gt;'''
  
<span id="method-of-burning-android-image-into-emmc-through-usb2.0-burning-port"></span>
+
<div class="figure">
=== Method of burning Android image into eMMC through USB2.0 burning port ===
 
  
'''Note that all the following operations are performed on a Windows computer.'''
+
[[File:media/image218.png|319x251px|IMG_256]]
  
<ol style="list-style-type: decimal;">
+
</div>
<li><p>The development board reserves an eMMC expansion interface. Before programming the system to eMMC, you first need to purchase an eMMC module that matches the eMMC interface of the development board. Then install the eMMC module to the development board.</p>
+
<ol start="3" style="list-style-type: decimal;">
<p>The eMMC module and the method of plugging into the development board are as follows:</p></li></ol>
+
<li>filezilla打开后的界面如下所示,此时右边远程站点下面显示的是空的</li></ol>
  
[[File:pi3b-img61.png|115x84px]] [[File:pi3b-img62.png|120x87px]]
+
<div class="figure">
  
[[File:pi3b-img63.png|286x133px]]
+
[[File:media/image219.png|451x357px|IMG_256]]
  
<ol start="2" style="list-style-type: decimal;">
+
</div>
<li>You also need to prepare a good quality USB2.0 male-to-male data cable</li></ol>
+
<ol start="4" style="list-style-type: decimal;">
 +
<li>连接开发板的方法如下图所示:</li></ol>
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img16.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
+
[[File:media/image220.png|522x108px|IMG_256]]
  
 
</div>
 
</div>
<ol start="3" style="list-style-type: decimal;">
+
<ol start="5" style="list-style-type: decimal;">
<li><p>Then download Rockchip driver '''DriverAssitant_v5.12.zip''' and burning tool '''RKDevTool_Release_v3.15.zip''' from [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi's data download page''']</p></li>
+
<li>然后选择'''保存密码''',再点击'''确定'''</li></ol>
<li><p>Then download the Android image from '''[http://www.orangepi.org/html/serviceAndSupport/index.html Orange Pi's download page].'''</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>After opening the download link of the Android image, you can see the following two types of Android images, please select the image in the '''TF card and eMMC startup image folder''' to download</li></ol>
 
</li></ol>
 
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img124.png|340x108px|e6986fc9c8fc078e8cb6a9c39b76fb8]]
+
[[File:media/image221.png|207x146px|IMG_256]]
  
 
</div>
 
</div>
<ol start="2" style="list-style-type: lower-alpha;">
+
<ol start="6" style="list-style-type: decimal;">
<li><p>After entering the '''TF card and eMMC startup image folder''', you can see the following two images, the difference between them is</p>
+
<li>然后选择'''总是信任该主机''',再点击'''确定'''</li></ol>
<ol style="list-style-type: lower-alpha;">
 
<li><p>The first image is dedicated to HDMI display and supports 4K display. If you don’t use LCD screen, please download the image without lcd</p></li>
 
<li><p>If you want to use lcd screen, please choose image with lcd</p></li></ol>
 
</li></ol>
 
  
[[File:pi3b-img125.png|264x58px]]
+
<div class="figure">
  
<ol start="5" style="list-style-type: decimal;">
+
[[File:media/image222.png|221x109px|IMG_256]]
<li><p>Then use decompression software to decompress the compressed package of the downloaded Android image. Among the decompressed files, the file ending with &quot;.img&quot; is the Android image file, and the size is more than 1GB</p></li>
 
<li><p>Then use decompression software to decompress '''DriverAssitant_v5.12.zip''', and then find the '''DriverInstall.exe''' executable file in the decompressed folder and open it</p></li></ol>
 
 
 
[[File:pi3b-img31.png|575x169px]]
 
  
 +
</div>
 
<ol start="7" style="list-style-type: decimal;">
 
<ol start="7" style="list-style-type: decimal;">
<li><p>After opening '''DriverInstall.exe''', the steps to install the Rockchip driver are as follows</p>
+
<li>连接成功后在filezilla软件的右边就可以看到开发板Linux文件系统的目录结构了</li></ol>
<ol style="list-style-type: lower-alpha;">
 
<li>Click the &quot;'''Driver Installation'''&quot; button</li></ol>
 
</li></ol>
 
  
[[File:pi3b-img32.png|300x157px]]
+
<div class="figure">
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>After waiting for a period of time, a pop-up window will prompt &quot;'''driver installed successfully'''&quot;, and then click the &quot;'''OK'''&quot; button.</li></ol>
 
  
[[File:pi3b-img33.png|315x164px]]
+
[[File:media/image223.png|537x397px|IMG_256]]
  
 +
</div>
 
<ol start="8" style="list-style-type: decimal;">
 
<ol start="8" style="list-style-type: decimal;">
<li>Then decompress '''RKDevTool_Release_v3.15.zip''', this software does not need to be installed, just find '''RKDevTool''' in the decompressed folder and open it</li></ol>
+
<li>然后在filezilla软件的右边选择要上传到开发板中的路径,再在filezilla软件的左边选中Windows PC中要上传的文件,再点击鼠标右键,再点击上传选项就会开始上传文件到开发板中了</li></ol>
  
[[File:pi3b-img34.png|454x134px]]
+
<div class="figure">
  
 +
[[File:media/image224.png|535x394px|IMG_256]]
 +
 +
</div>
 
<ol start="9" style="list-style-type: decimal;">
 
<ol start="9" style="list-style-type: decimal;">
<li>After opening the '''RKDevTool''' burning tool, because the computer is not connected to the development board through the USB2.0 male-to-male data cable at this time, the lower left corner will prompt &quot;'''No device found'''&quot;</li></ol>
+
<li><p>上传完成后就可以去开发板Linux系统中的对应路径中查看上传的文件了</p></li>
 +
<li><p>上传文件夹的方法和上传文件的方法是一样的,这里就不再赘述了</p></li></ol>
  
[[File:pi3b-img35.png|442x208px]]
+
<span id="hdmi测试"></span>
 +
== HDMI测试 ==
  
<ol start="10" style="list-style-type: decimal;">
+
<span id="hdmi显示测试"></span>
<li><p>Then start burning the Android image into eMMC</p>
+
=== HDMI显示测试 ===
<ol style="list-style-type: lower-alpha;">
 
<li>First, connect the development board to the Windows computer through the USB2.0 male-to-male data cable. The position of the USB2.0 programming interface of the development board is shown in the figure below</li></ol>
 
</li></ol>
 
  
<div class="figure">
+
<ol style="list-style-type: decimal;">
 +
<li><p>使用HDMI转HDMI线连接Orange Pi开发板和HDMI显示器</p>
 +
<p>[[File:media/image11.png|199x129px]]</p></li>
 +
<li><p>启动Linux系统后如果HDMI显示器有图像输出说明HDMI接口使用正常</p></li></ol>
  
[[File:pi3b-img36.png|275x116px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\1691131157154(1).jpg1691131157154(1)]]
+
'''注意,很多笔记本电脑虽然带有HDMI接口,但是笔记本的HDMI接口一般只有输出功能,并没有HDMI in的功能,也就是说并不能将其他设备的HDMI输出显示到笔记本的屏幕上。'''
  
</div>
+
'''当想把开发板的HDMI接到笔记本电脑HDMI接口时,请先确认清楚您的笔记本是支持HDMI in的功能。'''
<ol start="2" style="list-style-type: lower-alpha;">
 
<li><p>Then make sure that the development board is not inserted into the TF card and not connected to the power supply</p></li>
 
<li><p>Then press and hold the MaskROM button on the development board, the position of the MaskROM button on the development board is shown in the figure below:</p></li></ol>
 
  
[[File:pi3b-img37.png|289x100px]]
+
'''当HDMI没有显示的时候,请先检查下HDMI线有没有插紧,确认接线没问题后,可以换一个不同的屏幕试下有没有显示。'''
  
<ol start="4" style="list-style-type: lower-alpha;">
+
<span id="hdmi转vga显示测试"></span>
<li>Then connect the power supply of the Type-C interface to the development board</li></ol>
+
=== HDMI转VGA显示测试 ===
  
[[File:pi3b-img38.png|305x94px]]
+
<ol style="list-style-type: decimal;">
 
+
<li><p>首先需要准备下面的配件</p>
<ol start="5" style="list-style-type: lower-alpha;">
 
<li><p>If the previous steps are successful, the development board will enter the '''MASKROM''' mode at this time, and the interface of the burning tool will prompt &quot;'''found a MASKROM device'''&quot;[[File:pi3b-img39.png|457x215px]]</p></li>
 
<li><p>Then please select '''Advanced Features'''</p>
 
<p>[[File:pi3b-img126.png|458x138px]]</p></li>
 
<li><p>Then click the position shown in the figure below</p>
 
<p>[[File:pi3b-img127.png|459x216px]]</p></li></ol>
 
 
 
<!-- -->
 
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>Select '''rk3566_MiniLoaderAll.bin''' in the MiniLoader folder downloaded earlier, and click to open.</li></ol>
+
<li><p>HDMI转VGA转换器</p>
 +
<p>[[File:media/image225.png|155x104px]]</p></li>
 +
<li><p>一根VGA线</p>
 +
<p>[[File:media/image226.png|148x133px]]</p></li>
 +
<li><p>一个支持VGA接口的显示器或者电视</p></li></ol>
 +
</li>
 +
<li><p>HDMI转VGA显示测试如下所示</p>
 +
<p>[[File:media/image227.png|576x339px]]</p>
 +
<p>'''使用HDMI转VGA显示时,开发板以及开发板的Linux系统是不需要做任何设置的,只需要开发板HDMI接口能正常显示就可以了。所以如果测试有问题,请检查HDMI转VGA转换器、VGA线以及显示器是否有问题。'''</p></li></ol>
  
<div class="figure">
+
<span id="hdmi分辨率设置方法"></span>
 +
=== HDMI分辨率设置方法 ===
  
[[File:pi3b-img68.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>首先在'''Settings'''中打开'''Display'''</p>
 +
<p>[[File:media/image228.png|576x370px]]</p></li>
 +
<li><p>然后就能看到系统当前的分辨率</p>
 +
<p>[[File:media/image229.png|382x254px]]</p></li>
 +
<li><p>点击Resolution(分辨率)的下拉框,就可以看到显示器当前支持的所有分辨率</p>
 +
<p>[[File:media/image230.png|415x274px]]</p></li>
 +
<li><p>然后选择想要设置的分辨率,再点击Apply</p>
 +
<p>[[File:media/image231.png|415x277px]]</p></li>
 +
<li><p>等新的分辨率设置完后再选择'''Keep the configuration'''即可</p>
 +
<p>[[File:media/image232.png|447x243px]]</p></li></ol>
  
</div>
+
== 蓝牙使用方法 ==
<ol start="2" style="list-style-type: lower-alpha;">
 
<li><p>Then click '''Download'''</p>
 
<p>[[File:pi3b-img128.png|472x222px]]</p></li>
 
<li><p>The display after downloading '''MiniLoaderAll.bin''' is shown in the figure below</p>
 
<p>[[File:pi3b-img140.png|474x223px]]</p></li>
 
<li><p>Then select the storage device as '''EMMC''', and then click Switch '''Storage'''</p>
 
<p>[[File:pi3b-img141.png|468x225px]]</p></li>
 
<li><p>The display of successful switching is shown in the figure below</p></li></ol>
 
  
[[File:pi3b-img142.png|472x227px]]
+
<span id="桌面版镜像的测试方法-1"></span>
 +
=== 桌面版镜像的测试方法 ===
  
<ol start="8" style="list-style-type: lower-alpha;">
+
<ol style="list-style-type: decimal;">
<li>Then click the &quot;'''Upgrade Firmware'''&quot; column of the burning tool</li></ol>
+
<li><p>点击桌面右上角的蓝牙图标</p>
 +
<p>[[File:media/image233.png|330x128px]]</p></li>
 +
<li><p>然后选择适配器</p>
 +
<p>[[File:media/image234.png|375x165px]]</p></li>
 +
<li><p>如果有提示下面的界面,请选择'''Yes'''</p>
 +
<p>[[File:media/image235.png|248x85px]]</p></li>
 +
<li><p>然后在蓝牙的适配器设置界面中设置'''Visibility Setting'''为'''Always visible''',然后关闭即可</p>
 +
<p>[[File:media/image236.png|243x229px]]</p></li>
 +
<li><p>然后打开蓝牙设备的配置界面</p>
 +
<p>[[File:media/image237.png|438x179px]]</p></li>
 +
<li><p>点击'''Search'''即可开始扫描周围的蓝牙设备</p>
 +
<p>[[File:media/image238.png|322x217px]]</p></li>
 +
<li><p>然后选择想要连接的蓝牙设备,再点击鼠标右键就会弹出对此蓝牙设备的操作界面,选择'''Pair'''即可开始配对,这里演示的是和Android手机配对</p>
 +
<p>[[File:media/image239.png|338x263px]]</p></li>
 +
<li><p>配对时,桌面的右上角会弹出配对确认框,选择'''Confirm'''确认即可,此时手机上也同样需要进行确认</p>
 +
<p>[[File:media/image240.png|417x152px]]</p></li>
 +
<li><p>和手机配对完后,可以选择已配对的蓝牙设备,然后右键选择'''Send a File'''即可开始给手机发送一张图片</p>
 +
<p>[[File:media/image241.png|439x259px]]</p></li>
 +
<li><p>发送图片的界面如下所示</p>
 +
<p>[[File:media/image242.png|437x253px]]</p></li></ol>
  
[[File:pi3b-img132.png|442x208px]]
+
<span id="usb接口测试"></span>
 +
== USB接口测试 ==
  
<ol style="list-style-type: lower-roman;">
+
'''USB接口是可以接USB hub来扩展USB接口的数量的。'''
<li>Then click the &quot;'''Firmware'''&quot; button to select the path of the Android image that needs to be burned</li></ol>
 
  
[[File:pi3b-img133.png|444x209px]]
+
<span id="连接usb鼠标或键盘测试"></span>
 +
=== 连接USB鼠标或键盘测试 ===
  
<ol start="10" style="list-style-type: lower-alpha;">
+
# 将USB接口的键盘插入Orange Pi开发板的USB接口中
<li>Finally, click the &quot;'''Upgrade'''&quot; button to start burning, and the log during the burning process is shown in the figure below. After burning is completed, the Android system will start automatically.</li></ol>
+
# 连接Orange Pi开发板到HDMI显示器
 +
# 如果鼠标或键盘能正常操作系统说明USB接口使用正常(鼠标只有在桌面版的系统中才能使用)
  
<div class="figure">
+
<span id="连接usb存储设备测试"></span>
 +
=== 连接USB存储设备测试 ===
  
[[File:pi3b-img134.png|455x214px|GO~ZSPN`B]JCQM`@_9UU8[R]]
+
# 首先将U盘或者USB移动硬盘插入Orange Pi开发板的USB接口中
 +
# 执行下面的命令如果能看到sdX的输出说明U盘识别成功
  
</div>
+
orangepi@orangepi:~$ '''cat /proc/partitions | grep &quot;sd*&quot;'''
<span id="how-to-burn-android11-image-into-emmc-via-tf-card"></span>
 
=== How to burn Android11 image into eMMC via TF card ===
 
  
'''Note that all the following operations are performed on a Windows computer.'''
+
major minor #blocks name
  
# The development board reserves an eMMC expansion interface. Before programming the system to eMMC, you first need to purchase an eMMC module that matches the eMMC interface of the development board. Then install the eMMC module to the development board. The eMMC module and the method of plugging into the development board are as follows:
+
8 0 30044160 '''sda'''
  
[[File:pi3b-img61.png|115x84px]] [[File:pi3b-img62.png|120x87px]]
+
8 1 30043119 '''sda1'''
  
[[File:pi3b-img63.png|286x133px]]
+
<ol start="3" style="list-style-type: decimal;">
 +
<li>使用mount命令可以将U盘挂载到'''/mnt'''中,然后就能查看U盘中的文件了</li></ol>
  
<ol start="2" style="list-style-type: decimal;">
+
orangepi@orangepi:~$ '''sudo mount /dev/sda1 /mnt/'''
<li><p>You also need to prepare a TF card with 8GB or larger capacity. The transmission speed of the TF card must be class10 or above. It is recommended to use a TF card of SanDisk and other brands</p></li>
 
<li><p>Then use the card reader to insert the TF card into the computer</p></li>
 
<li><p>Then download the SDDiskTool programming tool from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page'''], '''please make sure that the version of the SDDiskTool tool is the latest v1.72'''</p></li>
 
<li><p>Then download the Android image from [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi's download page''']</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>After opening the download link of the Android image, you can see the following two types of Android images, please select the image in '''the TF card and eMMC startup image folder''' to download</li></ol>
 
</li></ol>
 
  
<div class="figure">
+
orangepi@orangepi:~$ '''ls /mnt/'''
  
[[File:pi3b-img124.png|340x108px|e6986fc9c8fc078e8cb6a9c39b76fb8]]
+
test.txt
  
</div>
+
<ol start="4" style="list-style-type: decimal;">
<ol start="2" style="list-style-type: lower-alpha;">
+
<li>挂载完后通过'''df -h'''命令就能查看U盘的容量使用情况和挂载点</li></ol>
<li><p>After entering '''the TF card and eMMC boot image folder''', you can see the following tow images, the difference between them is:</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>The first image is dedicated to HDMI display and supports 4K display. If you don’t use LCD screen, please download the image without lcd</p></li>
 
<li><p>If you want to use lcd screen, please choose image with lcd</p></li></ol>
 
</li></ol>
 
  
[[File:pi3b-img125.png|283x62px]]
+
orangepi@orangepi:~$ '''df -h | grep &quot;sd&quot;'''
  
<ol start="6" style="list-style-type: decimal;">
+
/dev/sda1 29G 208K 29G 1% /mnt
<li><p>Then use the decompression software to decompress the compressed package of the downloaded Android image. Among the decompressed files, the file ending with &quot;.img&quot; is the Android image file, and the size is more than 1GB</p></li>
 
<li><p>Then use decompression software to decompress '''SDDiskTool_v1.72.zip''', this software does not need to be installed, just find '''SD_Firmware_Tool.exe''' in the decompressed folder and open it</p></li></ol>
 
  
[[File:pi3b-img135.png|429x103px]]
+
<span id="usb无线网卡测试"></span>
 +
=== USB无线网卡测试 ===
  
<ol start="8" style="list-style-type: decimal;">
+
目前'''测试过的'''能用的USB无线网卡如下所示,其他型号的USB无线网卡请自行测试,如果无法使用就需要移植对应的USB无线网卡驱动
<li>After opening '''SDDiskTool''', if the TF card is recognized normally, the inserted disk device will be displayed in the &quot;'''Select Removable Disk Device'''&quot; column. '''Please make sure that the displayed disk device is consistent with the drive letter of the TF card you want to burn''', if there is no display, you can try to unplug the TF card.</li></ol>
 
  
[[File:pi3b-img136.png|267x228px]]
+
{| class="wikitable"
 +
|-
 +
| 序号
 +
| 型号
 +
|
 +
|-
 +
| 1
 +
| RTL8723BU
  
<ol start="9" style="list-style-type: decimal;">
+
支持2.4G WIFI+BT4.0
<li>After confirming the drive letter, you can format the TF card first, click the '''restore disk button''' in SDDiskTool, or use the '''SD Card Formatter''' mentioned above to format the TF card</li></ol>
 
  
[[File:pi3b-img137.png|247x212px]]
+
| [[File:media/image2%2043.png]]
 +
|-
 +
| 2
 +
| RTL8811
  
<ol start="10" style="list-style-type: decimal;">
+
支持2.4G +5G WIFI
<li><p>Then start to write the Android image into the TF card</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>First confirm that the displayed drive letter is the drive letter corresponding to the TF card under &quot;'''Select Removable Disk Device'''&quot;</p></li>
 
<li><p>Then select &quot;'''Firmware Upgrade'''&quot; in &quot;'''Select Function Mode'''&quot;</p></li>
 
<li><p>Then select the path of the Android firmware in the &quot;'''Select Upgrade Firmware'''&quot; column</p></li>
 
<li><p>Finally click the &quot;'''Start Create'''&quot; button to start burning</p></li></ol>
 
</li></ol>
 
  
[[File:pi3b-img143.png|290x246px]]
+
| [[File:media/image2%2044.png]]
 +
|-
 +
| 3
 +
| RTL8821CU
  
<ol start="11" style="list-style-type: decimal;">
+
支持2.4G +5G WIFI
<li>After the burning is completed, the display is as shown in the figure below, and then you can exit SDDiskTool</li></ol>
 
  
[[File:pi3b-img144.png|285x243px]]
+
支持BT 4.2
  
<ol start="12" style="list-style-type: decimal;">
+
| <div class="figure">
<li><p>Then pull out the TF card from the computer and insert it into the development board. After the development board is powered on, it will automatically start burning the Android image in the TF card to the eMMC of the development board.</p></li>
 
<li><p>If the development board is connected to an HDMI display, you can also see the progress bar of burning the Android image to eMMC from the HDMI display</p></li></ol>
 
  
[[File:pi3b-img145.png|430x247px]]
+
[[File:media/image24%205.jpeg|tb_imag e_share_1670833201 123]]
  
<ol start="14" style="list-style-type: decimal;">
+
</div>
<li>When the HDMI monitor displays the following information, it means that the burning of the Android image into the eMMC has been completed. At this time, the TF card can be pulled out, and then the Android system in the eMMC will start.</li></ol>
+
|}
  
[[File:pi3b-img146.png|576x389px]]
+
<span id="rtl8723bu测试"></span>
 +
==== RTL8723BU测试 ====
  
<span id="how-to-burn-android-image-to-spiflashnvme-ssd"></span>
+
<ol style="list-style-type: decimal;">
== How to burn Android image to SPIFlash+NVMe SSD ==
+
<li><p>首先将RTL8723BU无线网卡模块插入开发板的USB接口中</p></li>
 +
<li><p>然后Linux系统会自动加载RTL8723BU蓝牙和WIFI相关的内核模块,通过lsmod命令可以看到下面内核模块已自动加载</p>
 +
<p>orangepi@orangepi:~$ '''lsmod'''</p>
 +
<p>Module Size Used by</p>
 +
<p>rfcomm 57344 16</p>
 +
<p>rtl8xxxu 106496 0</p>
 +
<p>rtk_btusb 61440 0</p></li>
 +
<li><p>通过dmesg命令可以看到RTL8723BU模块的加载信息</p>
 +
<p>orangepi@orangepi:~$ '''dmesg'''</p>
 +
<p>......</p>
 +
<p>[ 83.438901] usb 2-1: new high-speed USB device number 2 using ehci-platform</p>
 +
<p>[ 83.588375] usb 2-1: New USB device found, idVendor=0bda, idProduct=b720, bcdDevice= 2.00</p>
 +
<p>[ 83.588403] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3</p>
 +
<p>[ 83.588422] usb 2-1: Product: 802.11n WLAN Adapter</p>
 +
<p>[ 83.588443] usb 2-1: Manufacturer: Realtek</p>
 +
<p>[ 83.588460] usb 2-1: SerialNumber: 00e04c000001</p>
 +
<p>[ 83.601974] Bluetooth: hci0: RTL: examining hci_ver=06 hci_rev=000b lmp_ver=06 lmp_subver=8723</p>
 +
<p>[ 83.603894] Bluetooth: hci0: RTL: rom_version status=0 version=1</p>
 +
<p>[ 83.603920] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723b_fw.bin</p>
 +
<p>[ 83.610108] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723b_config.bin</p>
 +
<p>[ 83.611274] Bluetooth: hci0: RTL: cfg_sz 68, total sz 22564</p>
 +
<p>[ 83.658494] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.6d45ddf.20220519-142432</p>
 +
<p>[ 83.658651] usbcore: registered new interface driver rtk_btusb</p>
 +
<p>[ 83.667124] usb 2-1: This Realtek USB WiFi dongle (0x0bda:0xb720) is untested!</p>
 +
<p>[ 83.667137] usb 2-1: Please report results to Jes.Sorensen@gmail.com</p>
 +
<p>[ 83.890140] usb 2-1: Vendor: Realtek</p>
 +
<p>[ 83.890153] usb 2-1: Product: 802.11n WLAN Adapter</p>
 +
<p>[ 83.890159] usb 2-1: rtl8723bu_parse_efuse: dumping efuse (0x200 bytes):</p>
 +
<p>......</p>
 +
<p>[ 83.890412] usb 2-1: RTL8723BU rev E (SMIC) 1T1R, TX queues 3, WiFi=1, BT=1, GPS=0, HI PA=0</p>
 +
<p>[ 83.890417] usb 2-1: RTL8723BU MAC: 00:13:ef:f4:58:ae</p>
 +
<p>[ 83.890421] usb 2-1: rtl8xxxu: Loading firmware rtlwifi/rtl8723bu_nic.bin</p>
 +
<p>[ 83.895289] usb 2-1: Firmware revision 35.0 (signature 0x5301)</p>
 +
<p>[ 84.050893] Bluetooth: hci0: RTL: fw version 0x0e2f9f73</p>
 +
<p>[ 84.266905] Bluetooth: RFCOMM TTY layer initialized</p>
 +
<p>[ 84.266949] Bluetooth: RFCOMM socket layer initialized</p>
 +
<p>[ 84.266999] Bluetooth: RFCOMM ver 1.11</p>
 +
<p>[ 84.884270] usbcore: registered new interface driver rtl8xxxu</p>
 +
<p>[ 84.912046] rtl8xxxu 2-1:1.2 wlx0013eff458ae: renamed from wlan0</p></li>
 +
<li><p>然后通过'''sudo ifconfig'''命令可以看到RTL8723BU WIFI的设备节点,WIFI的连接和测试方法请参看[[\l|'''WIFI连接测试''']]一节,这里不再赘述</p>
 +
<p>orangepi@orangepi:~$ '''sudo ifconfig wlx0013eff458ae'''</p>
 +
<p>wlx0013eff458ae: flags=4099&lt;UP,BROADCAST,MULTICAST&gt; mtu 1500</p>
 +
<p>ether 00:13:ef:f4:58:ae txqueuelen 1000 (Ethernet)</p>
 +
<p>RX packets 0 bytes 0 (0.0 B)</p>
 +
<p>RX errors 0 dropped 0 overruns 0 frame 0</p>
 +
<p>TX packets 0 bytes 0 (0.0 B)</p>
 +
<p>TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</p></li>
 +
<li><p>然后通过'''hciconfig'''命令可以看到USB的蓝牙设备</p>
 +
<p>orangepi@orangepi:~$ '''sudo apt update &amp;&amp; sudo apt install bluez'''</p>
 +
<p>orangepi@orangepi:~$ '''hciconfig'''</p>
 +
<p>hci0: Type: Primary Bus: '''USB'''</p>
 +
<p>BD Address: 00:13:EF:F4:58:AE ACL MTU: 820:8 SCO MTU: 255:16</p>
 +
<p>DOWN</p>
 +
<p>RX bytes:1252 acl:0 sco:0 events:125 errors:0</p>
 +
<p>TX bytes:23307 acl:0 sco:0 commands:125 errors:0</p></li>
 +
<li><p>在桌面中也可以看到出现了蓝牙图标,此时蓝牙还未打开,所以会显示一个红色的'''x'''</p>
 +
<p>[[File:media/image246.png|576x157px]]</p></li>
 +
<li><p>点击'''Turn Bluetooth On'''可以打开蓝牙</p>
 +
<p>[[File:media/image247.png|576x262px]]</p></li>
 +
<li><p>打开蓝牙后的显示如下所示</p>
 +
<p>[[File:media/image248.png|576x164px]]</p></li>
 +
<li><p>蓝牙的测试方法请参看[[\l|'''蓝牙使用方法''']]一节,这里不再赘述</p></li></ol>
  
'''Note that all the following operations are performed on a Windows computer.'''
+
<span id="rtl8811测试"></span>
 +
==== RTL8811测试 ====
  
 
<ol style="list-style-type: decimal;">
 
<ol style="list-style-type: decimal;">
<li><p>First, you need to prepare an NVMe SSD solid state drive</p>
+
<li><p>首先将RTL8811无线网卡模块插入开发板的USB接口中</p></li>
<ol style="list-style-type: lower-alpha;">
+
<li><p>然后Linux系统会自动加载RTL8811 WIFI相关的内核模块,通过lsmod命令可以看到下面内核模块已自动加载</p>
<li>The M.2 2230 SSD is as follows</li></ol>
+
<p>orangepi@orangepi:~$ '''lsmod'''</p>
</li></ol>
+
<p>Module Size Used by</p>
 +
<p>8821cu 1839104 0</p></li>
 +
<li><p>通过dmesg命令可以看到RTL8811模块的加载信息</p>
 +
<p>orangepi@orangepi:~$ '''dmesg'''</p>
 +
<p>[ 118.618194] usb 2-1: new high-speed USB device number 2 using ehci-platform</p>
 +
<p>[ 118.767152] usb 2-1: New USB device found, idVendor=0bda, idProduct=c811, bcdDevice= 2.00</p>
 +
<p>[ 118.767181] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3</p>
 +
<p>[ 118.767199] usb 2-1: Product: 802.11ac NIC</p>
 +
<p>[ 118.767219] usb 2-1: Manufacturer: Realtek</p>
 +
<p>[ 118.767235] usb 2-1: SerialNumber: 123456</p>
 +
<p>[ 119.500530] usbcore: registered new interface driver rtl8821cu</p>
 +
<p>[ 119.525498] rtl8821cu 2-1:1.0 wlx1cbfced9d260: renamed from wlan0</p></li>
 +
<li><p>然后通过'''sudo ifconfig'''命令可以看到WIFI的设备节点,WIFI的连接和测试方法请参看[[\l|'''WIFI连接测试''']]一节,这里不再赘述</p>
 +
<p>orangepi@orangepi:~$ '''sudo ifconfig wlx1cbfced9d260'''</p>
 +
<p>wlx1cbfced9d260: flags=4099&lt;UP,BROADCAST,MULTICAST&gt; mtu 1500</p>
 +
<p>ether 1c:bf:ce:d9:d2:60 txqueuelen 1000 (Ethernet)</p>
 +
<p>RX packets 0 bytes 0 (0.0 B)</p>
 +
<p>RX errors 0 dropped 0 overruns 0 frame 0</p>
 +
<p>TX packets 0 bytes 0 (0.0 B)</p>
 +
<p>TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</p></li></ol>
 +
 
 +
<span id="rtl8821cu测试"></span>
 +
==== RTL8821CU测试 ====
  
[[File:pi3b-img73.png|147x106px]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>首先将rtl8821cu 无线网卡模块插入开发板的usb 接口中</p></li>
 +
<li><p>然后使用'''lsusb'''命令就可以看到rtl8821cu usb wifi模块的设备信息,请确保USB模块没有处于Driver CDROM Mode</p>
 +
<p>orangepi@orangepi:~$ '''lsusb | grep &quot;Realtek&quot;'''</p>
 +
<p>Bus 002 Device 003: ID 0bda:c820 Realtek Semiconductor Corp. 802.11ac NIC</p></li></ol>
  
<ol start="2" style="list-style-type: lower-alpha;">
+
orangepi@orangepi:~$ '''lsusb | grep &quot;Realtek&quot;'''
<li>The M.2 2242 SSD is as follows</li></ol>
 
  
[[File:pi3b-img74.png|216x119px]]
+
Bus 002 Device 002: ID 0bda:1a2b Realtek Semiconductor Corp. RTL8188GU 802.11n WLAN Adapter ('''Driver CDROM Mode''')
  
<ol start="2" style="list-style-type: decimal;">
+
'''如果lsusb命令看到的USB WIFI模块处于Driver CDROM Mode,请重新拔插下USB WIFI模块。如果还不行,请手动执行下面的命令切换下模式:'''
<li>Then insert the NVMe SSD into the M.2 PCIe interface of the development board and fix it</li></ol>
 
  
[[File:pi3b-img75.png|283x63px]]
+
orangepi@orangepi:~$ '''sudo usb_modeswitch -KW -v 0bda -p 1a2b'''
  
 
<ol start="3" style="list-style-type: decimal;">
 
<ol start="3" style="list-style-type: decimal;">
<li>The position of the SPI Flash on the development board is shown in the figure below, no other settings are required before starting the programming</li></ol>
+
<li><p>Linux系统会自动加载rtl8821cu蓝牙和wifi相关的内核模块,通过lsmod命令可以看到下面内核模块已自动加载</p>
 +
<p>orangepi@orangepi:~$ '''lsmod'''</p>
 +
<p>Module Size Used by</p>
 +
<p>8821cu 1839104 0</p>
 +
<p>rtk_btusb 61440 0</p></li>
 +
<li><p>通过dmesg命令可以看到rtl8821cu模块的加载信息</p>
 +
<p>orangepi@orangepi:~$ '''dmesg'''</p>
 +
<p>......</p>
 +
<p>[ 57.083693] usb 2-1: new high-speed USB device number 2 using ehci-platform</p>
 +
<p>[ 57.231888] usb 2-1: New USB device found, idVendor=0bda, idProduct=1a2b, bcdDevice= 2.00</p>
 +
<p>[ 57.231916] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0</p>
 +
<p>[ 57.231937] usb 2-1: Product: DISK</p>
 +
<p>[ 57.231956] usb 2-1: Manufacturer: Realtek</p>
 +
<p>[ 57.242594] usb-storage 2-1:1.0: USB Mass Storage device detected</p>
 +
<p>[ 57.245674] scsi host0: usb-storage 2-1:1.0</p>
 +
<p>[ 58.069172] usb 2-1: USB disconnect, device number 2</p>
 +
<p>[ 58.440025] usb 2-1: new high-speed USB device number 3 using ehci-platform</p>
 +
<p>[ 58.587819] usb 2-1: New USB device found, idVendor=0bda, idProduct=c820, bcdDevice= 2.00</p>
 +
<p>[ 58.587827] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3</p>
 +
<p>[ 58.587833] usb 2-1: Product: 802.11ac NIC</p>
 +
<p>[ 58.587838] usb 2-1: Manufacturer: Realtek</p>
 +
<p>[ 58.587844] usb 2-1: SerialNumber: 123456</p>
 +
<p>[ 58.610463] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.6d45ddf.20220519-142432</p>
 +
<p>[ 58.610656] usbcore: registered new interface driver rtk_btusb</p>
 +
<p>[ 58.634631] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8821</p>
 +
<p>[ 58.636729] Bluetooth: hci0: RTL: rom_version status=0 version=1</p>
 +
<p>[ 58.636740] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin</p>
 +
<p>[ 58.664190] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin</p>
 +
<p>[ 58.664746] Bluetooth: hci0: RTL: cfg_sz 10, total sz 31990</p>
 +
<p>[ 59.122471] Bluetooth: hci0: RTL: fw version 0x829a7644</p>
 +
<p>[ 59.265513] usbcore: registered new interface driver rtl8821cu</p>
 +
<p>[ 59.280119] rtl8821cu 2-1:1.2 wlx90de80521825: renamed from wlan0</p></li>
 +
<li><p>然后通过'''sudo ifconfig'''命令可以看到rtl8821cu wifi的设备节点,wifi的连接和测试方法请参看[[\l|'''WIFI连接测试''']]一节,这里不再赘述</p>
 +
<p>orangepi@orangepi:~$ '''sudo ifconfig wlx90de80521825'''</p>
 +
<p>wlx90de80521825: flags=4099&lt;UP,BROADCAST,MULTICAST&gt; mtu 1500</p>
 +
<p>ether 00:13:ef:f4:58:ae txqueuelen 1000 (Ethernet)</p>
 +
<p>RX packets 0 bytes 0 (0.0 B)</p>
 +
<p>RX errors 0 dropped 0 overruns 0 frame 0</p>
 +
<p>TX packets 0 bytes 0 (0.0 B)</p>
 +
<p>TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</p></li>
 +
<li><p>然后通过'''hciconfig'''命令可以看到USB的蓝牙设备</p>
 +
<p>orangepi@orangepi:~$ '''sudo apt-get update &amp;&amp; sudo apt-get install -y bluez'''</p>
 +
<p>orangepi@orangepi:~$ '''hciconfig'''</p>
 +
<p>hci0: Type: Primary Bus: '''USB'''</p>
 +
<p>BD Address: 00:13:EF:F4:58:AE ACL MTU: 820:8 SCO MTU: 255:16</p>
 +
<p>DOWN</p>
 +
<p>RX bytes:1252 acl:0 sco:0 events:125 errors:0</p>
 +
<p>TX bytes:23307 acl:0 sco:0 commands:125 errors:0</p></li>
 +
<li><p>在桌面中也可以看到出现了蓝牙图标,此时蓝牙还未打开,所以会显示一个红色的'''x'''</p>
 +
<p>[[File:media/image246.png|576x157px]]</p></li>
 +
<li><p>点击'''Turn Bluetooth On'''可以打开蓝牙</p>
 +
<p>[[File:media/image247.png|576x262px]]</p></li>
 +
<li><p>打开蓝牙后的显示如下所示</p>
 +
<p>[[File:media/image248.png|576x164px]]</p></li>
 +
<li><p>蓝牙的测试方法请参看[[\l|'''蓝牙使用方法''']]一节,这里不再赘述</p></li></ol>
  
[[File:pi3b-img76.png|266x211px]]
+
<span id="usb摄像头测试"></span>
 +
=== USB摄像头测试 ===
  
<ol start="4" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li>You also need to prepare a good quality USB2.0 male-to-male data cable</li></ol>
+
<li><p>首先需要准备一个下图所示的或者类似的支持UVC协议的USB摄像头,然后将USB摄像头插入到Orange Pi开发板的USB接口中</p>
 +
<p>[[File:media/image14.png|259x150px]]</p></li>
 +
<li><p>通过v4l2-ctl命令可以看到USB摄像头的设备节点信息为/dev/video0</p>
 +
<p>orangepi@orangepi:~$ '''v4l2-ctl --list-devices'''</p>
 +
<p>Q8 HD Webcam: Q8 HD Webcam ('''usb'''-fc880000.usb-1):</p>
 +
<p>'''/dev/video0'''</p>
 +
<p>/dev/video1</p>
 +
<p>/dev/media0</p>
 +
<p>'''注意v4l2中的l是小写字母l,不是数字1。'''</p>
 +
<p>'''另外video的序号不一定都是video0,请以实际看到的为准。'''</p></li>
 +
<li><p>在桌面系统中可以使用Cheese直接打开USB摄像头,Cheese打开方法如下图所示:</p>
 +
<p>[[File:media/image249.png|474x302px]]</p>
 +
<p>Cheese打开USB摄像头后的界面如下图所示:</p>
 +
<p>[[File:media/image250.png|473x277px]]</p></li>
 +
<li><p>使用fswebcam测试USB摄像头的方法</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>安装fswebcam</p>
 +
<p>orangepi@orangepi:~$ '''sudo''' '''apt update'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo apt-get install -y fswebcam'''</p></li>
 +
<li><p>安装完fswebcam后可以使用下面的命令来拍照</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>-d 选项用于指定USB摄像头的设备节点</p></li>
 +
<li><p>--no-banner用于去除照片的水印</p></li>
 +
<li><p>-r 选项用于指定照片的分辨率</p></li>
 +
<li><p>-S 选项用设置于跳过前面的帧数</p></li>
 +
<li><p>./image.jpg 用于设置生成的照片的名字和路径</p>
 +
<p>orangepi@orangepi:~$ '''sudo''' '''fswebcam -d /dev/video0 \'''</p>
 +
<p>'''--no-banner -r 1280x720 -S 5 ./image.jpg'''</p></li></ol>
 +
</li>
 +
<li><p>在服务器版的Linux系统中,拍完照后可以使用scp命令将拍好的图片传到Ubuntu &gt; PC上镜像观看</p>
 +
<p>orangepi@orangepi:~$ '''scp image.jpg [mailto:test@192.168.1.55:/home/test test@192.168.1.55:/home/test] (根据实际情况修改IP地址和路径)'''</p></li>
 +
<li><p>在桌面版的Linux系统中,可以通过HDMI显示器直接查看拍摄的图片</p></li></ol>
 +
</li></ol>
  
<div class="figure">
+
== 音频测试 ==
  
[[File:pi3b-img16.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
+
=== 在桌面系统中测试音频方法 ===
  
</div>
+
<ol style="list-style-type: decimal;">
<ol start="5" style="list-style-type: decimal;">
+
<li><p>首先打开文件管理器</p>
<li><p>Then download Rockchip driver '''DriverAssitant_v5.12.zip''' and burning tool '''RKDevTool_Release_v3.15.zip''' from '''Orange Pi's data download page'''</p></li>
+
<p>[[File:media/image251.png|357x176px]]</p></li>
<li><p>Then download the image of Android11</p>
+
<li><p>然后找到下面这个文件(如果系统中没有这个音频文件,可以自己上传一个音频文件到系统中)</p>
 +
<p>[[File:media/image252.png|283x225px]]</p></li>
 +
<li><p>然后选中audio.wav文件,右键选择使用vlc打开就可以开始播放</p>
 +
<p>[[File:media/image253.png|288x234px]]</p></li>
 +
<li><p>切换HDMI播放和耳机播放等不同音频设备的方法</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>After opening the download link of the Android image, you can see the following two types of Android images, please select the image in the S'''PIFlash-NVME SSD boot image folder''' to download</li></ol>
+
<li><p>首先打开音量控制界面</p>
 +
<p>[[File:media/image254.png|308x169px]]</p></li>
 +
<li><p>播放音频的时候,在'''Playback'''中会显示播放软件可以使用的音频设备选项,如下图所示,在这里可以设置需要播放到哪个音频设备</p>
 +
<p>[[File:media/image255.png|576x282px]]</p></li></ol>
 
</li></ol>
 
</li></ol>
  
<div class="figure">
+
=== 使用命令播放音频的方法 ===
  
[[File:pi3b-img124.png|340x108px|e6986fc9c8fc078e8cb6a9c39b76fb8]]
+
==== 耳机接口播放音频测试 ====
  
</div>
+
<ol style="list-style-type: decimal;">
<ol start="2" style="list-style-type: lower-alpha;">
+
<li><p>首先将耳机插入开发板的耳机孔中</p>
<li><p>After entering the '''SPIFlash-NVME SSD boot image folder''', you can see the following two images. Their differences are:</p>
+
<p>[[File:media/image256.png|395x112px]]</p></li>
<ol style="list-style-type: lower-alpha;">
+
<li><p>然后可以通过'''aplay -l'''命令可以查看下Linux系统支持的声卡设备,从下面的输出可知,'''card 0'''为rk809的声卡设备,也就是耳机的声卡设备</p>
<li><p>The image without lcd is specially used for HDMI display and supports 4K display. If you do not use the LCD screen, please download the image without lcd</p></li>
+
<p>orangepi@orangepi:~$ '''aplay -l'''</p>
<li><p>If you want to use LCD screen, please choose image with lcd</p></li></ol>
+
<p>**** List of PLAYBACK Hardware Devices ****</p>
</li></ol>
+
<p>'''card 0: rockchiprk809 [rockchip-rk809], device 0: dailink-multicodecs rk817-hifi-0 [dailink-multicodecs rk817-hifi-0]'''</p>
 +
<p>'''Subdevices: 0/1'''</p>
 +
<p>'''Subdevice #0: subdevice #0'''</p>
 +
<p>card 1: rockchiphdmi [rockchip,hdmi], device 0: fe400000.i2s-i2s-hifi i2s-hifi-0 [fe400000.i2s-i2s-hifi i2s-hifi-0]</p>
 +
<p>Subdevices: 0/1</p>
 +
<p>Subdevice #0: subdevice #0</p>
 +
<p>Subdevice #0: subdevice #0</p></li>
 +
<li><p>然后使用'''aplay'''命令播放下系统自带的音频文件,如果耳机能听到声音说明硬件能正常使用</p>
 +
<p>orangepi@orangepi:~$ '''aplay -D hw:0,0 /usr/share/sounds/alsa/audio.wav'''</p>
 +
<p>Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo</p></li></ol>
  
[[File:pi3b-img147.png|305x58px]]
+
<span id="hdmi音频播放测试"></span>
 +
==== HDMI音频播放测试 ====
  
<ol start="7" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li>Then use the decompression software to decompress '''DriverAssitant_v5.12.zip''', and then find the '''DriverInstall.exe''' executable file in the decompressed folder and open it</li></ol>
+
<li><p>首先使用HDMI 转HDMI线将Orange Pi开发板连接到电视机上(其他的HDMI显示器需要确保可以播放音频)</p></li>
 +
<li><p>然后查看下HDMI的声卡序号,从下面的输出可以知道HDMI的声卡为'''card 1'''</p>
 +
<p>orangepi@orangepi:~$ '''aplay -l'''</p>
 +
<p>**** List of PLAYBACK Hardware Devices ****</p>
 +
<p>card 0: rockchiprk809 [rockchip-rk809], device 0: dailink-multicodecs rk817-hifi-0 [dailink-multicodecs rk817-hifi-0]</p>
 +
<p>Subdevices: 0/1</p>
 +
<p>Subdevice #0: subdevice #0</p>
 +
<p>'''card 1: rockchiphdmi [rockchip,hdmi], device 0: fe400000.i2s-i2s-hifi i2s-hifi-0 [fe400000.i2s-i2s-hifi i2s-hifi-0]'''</p>
 +
<p>'''Subdevices: 0/1'''</p>
 +
<p>'''Subdevice #0: subdevice #0'''</p>
 +
<p>'''Subdevice #0: subdevice #0'''</p></li>
 +
<li><p>然后使用'''aplay'''命令播放下系统自带的音频文件,如果HDMI显示器或者电视能听到声音说明硬件能正常使用</p>
 +
<p>orangepi@orangepi:~$ '''aplay -D hw:1,0 /usr/share/sounds/alsa/audio.wav'''</p></li></ol>
  
[[File:pi3b-img31.png|407x120px]]
+
=== 使用命令测试录音的方法 ===
  
<ol start="8" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li><p>After opening '''DriverInstall.exe''', the steps to install the Rockchip driver are as follows</p>
+
<li><p>Orange Pi 3B开发板没有板载MIC,只能通过带MIC功能的耳机来录制音频。将带MIC功能的耳机插入开发板后,运行下面的命令会通过耳机录制一段音频</p>
<ol style="list-style-type: lower-alpha;">
+
<p>orangepi@orangepi:~$ '''amixer -c 0 cset name='Capture MIC Path' 'Main Mic''''</p>
<li>Click the &quot;'''Driver Installation'''&quot; button</li></ol>
+
<p>orangepi@orangepi:~$ '''arecord -D hw:0,0 -d 5 -f cd -t wav /tmp/test.wav'''</p></li></ol>
</li></ol>
 
  
[[File:pi3b-img32.png|286x150px]]
+
== 温度传感器 ==
  
<ol start="2" style="list-style-type: lower-alpha;">
+
# 查看系统温度传感器的命令为:
<li>After waiting for a period of time, a pop-up window will prompt &quot;'''driver installed successfully'''&quot;, and then click the &quot;'''OK'''&quot; button.</li></ol>
 
  
[[File:pi3b-img33.png|296x154px]]
+
orangepi@orangepi:~$ '''sensors'''
  
<ol start="9" style="list-style-type: decimal;">
+
soc_thermal-virtual-0
<li>Then decompress '''RKDevTool_Release_v3.15.zip''', this software does not need to be installed, just find '''RKDevTool''' in the decompressed folder and open it</li></ol>
 
  
[[File:pi3b-img34.png|413x122px]]
+
Adapter: Virtual device
  
<ol start="10" style="list-style-type: decimal;">
+
temp1: +41.9°C (crit = +115.0°C)
<li>After opening the '''RKDevTool''' burning tool, because the computer is not connected to the development board through the USB2.0 male-to-male data cable at this time, the lower left corner will prompt &quot;'''No device found'''&quot;</li></ol>
 
  
[[File:pi3b-img35.png|402x189px]]
+
gpu_thermal-virtual-0
  
<ol start="11" style="list-style-type: decimal;">
+
Adapter: Virtual device
<li><p>Then start burning the Android image to SPIFlash+NVMe SSD</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First, connect the development board to the Windows computer through the USB2.0 male-to-male data cable. The position of the USB2.0 programming port of the development board is shown in the figure below</li></ol>
 
</li></ol>
 
  
<div class="figure">
+
temp1: +43.8°C
  
[[File:pi3b-img36.png|275x116px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\1691131157154(1).jpg1691131157154(1)]]
+
<ol start="2" style="list-style-type: decimal;">
 +
<li><p>查看nvme ssd固态硬盘当前温度的命令为:</p>
 +
<p>orangepi@orangepi:~$ '''sudo smartctl -a /dev/nvme0 | grep &quot;Temperature:&quot;'''</p>
 +
<p>Temperature: '''40 Celsius'''</p></li></ol>
  
</div>
+
<span id="pin接口引脚说明"></span>
<ol start="2" style="list-style-type: lower-alpha;">
+
== 40 Pin接口引脚说明 ==
<li><p>Make sure that the development board is not inserted into the TF card and not connected to the power supply</p></li>
 
<li><p>Then press and hold the MaskROM button on the development board, the position of the MaskROM button on the development board is shown in the figure below:</p></li></ol>
 
  
[[File:pi3b-img37.png|289x100px]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>Orange Pi 3B开发板40 pin接口引脚的顺序请参考下图</p>
 +
<p>[[File:media/image257.png|400x124px]]</p></li>
 +
<li><p>Orange Pi 3B开发板40 pin接口引脚的功能如下表所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>下面是40pin完整的引脚图</p>
 +
<p>[[File:media/image258.png|575x160px]]</p></li>
 +
<li><p>下面的表格是上面完整表格左半边部分的图,能看得清楚点</p>
 +
<p>[[File:media/image259.png|478x267px]]</p></li>
 +
<li><p>下面的表格是上面完整表格右半边部分的图,能看得清楚点</p>
 +
<p>[[File:media/image260.png|479x266px]]</p></li></ol>
 +
</li>
 +
<li><p>40pin接口中总共有'''28'''个GPIO口,所有GPIO口的电压都是'''3.3v'''</p></li></ol>
  
<ol start="4" style="list-style-type: lower-alpha;">
+
<span id="安装wiringop的方法"></span>
<li>Then connect the power supply of the Type-C interface to the development board, and power on, and then release the MaskROM button</li></ol>
+
== 安装wiringOP的方法 ==
  
[[File:pi3b-img38.png|305x94px]]
+
'''注意,Orange Pi发布的Linux镜像中已经预装了wiringOP,除非wiringOP的代码有更新,否则无需重新下载编译安装,直接使用即可。'''
  
<ol start="5" style="list-style-type: lower-alpha;">
+
'''编译好的wiringOP的deb包在orangepi-build中的存放路径为:'''
<li>If the previous steps are successful, the development board will enter the '''MASKROM''' mode at this time, and the interface of the burning tool will prompt &quot;'''found a MASKROM device'''&quot;</li></ol>
 
  
[[File:pi3b-img39.png|443x208px]]
+
'''orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb'''
  
<ol start="6" style="list-style-type: lower-alpha;">
+
'''进入系统后可以运行下gpio readall命令,如果能看到下面的输出,说明wiringOP已经预装并且能正常使用。'''
<li>Then click the &quot;'''Upgrade Firmware'''&quot; column of the burning tool</li></ol>
 
  
[[File:pi3b-img132.png|442x208px]]
+
<div class="figure">
  
<ol start="7" style="list-style-type: lower-alpha;">
+
[[File:media/image261.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]
<li>Then click the &quot;'''Firmware'''&quot; button to select the Android image to be burned</li></ol>
 
  
[[File:pi3b-img133.png|444x209px]]
+
</div>
 +
'''wiringOP目前主要适配了设置GPIO口输入输出,设置GPIO口输出高低电平以及设置上下拉电阻的功能,像硬件PWM这样的功能是用不了的。'''
  
<ol start="8" style="list-style-type: lower-alpha;">
+
<ol style="list-style-type: decimal;">
<li>Finally, click the &quot;Upgrade&quot; button to start burning. The burning process is shown in the figure below. You can see that the firmware will be burned to SPIFlash first, and then burned to PCIE. After burning is completed, the Android system will start automatically.</li></ol>
+
<li><p>下载wiringOP的代码</p>
 +
<p>orangepi@orangepi:~$ '''sudo apt update'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo apt install -y git'''</p>
 +
<p>orangepi@orangepi:~$ '''git clone https://github.com/orangepi-xunlong/wiringOP.git -b next'''</p>
 +
<p>'''注意,Orange Pi 3B需要下载wiringOP next分支的代码,请别漏了-b next这个参数。'''</p>
 +
<p>'''如果从GitHub下载代码有问题,可以直接使用Linux镜像中自带的wiringOP源码,存放位置为:/usr/src/wiringOP。'''</p></li>
 +
<li><p>编译安装wiringOP</p>
 +
<p>orangepi@orangepi:~$ '''cd wiringOP'''</p>
 +
<p>orangepi@orangepi:~/wiringOP$ '''sudo ./build clean'''</p>
 +
<p>orangepi@orangepi:~/wiringOP$ '''sudo ./build'''</p></li>
 +
<li><p>测试gpio readall命令的输出如下</p>
 +
<div class="figure">
  
[[File:pi3b-img148.png|453x212px]]
+
[[File:media/image261.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]
  
<span id="using-rkdevtool-to-clear-spiflash"></span>
+
</div></li></ol>
== Using RKDevTool to clear SPIFlash ==
 
  
# The position of SPI Flash on the development board is shown in the figure below
+
<span id="pin接口gpioi2cuartspi和pwm测试"></span>
 +
== 40pin接口GPIO、I2C、UART、SPI和PWM测试 ==
  
[[File:pi3b-img76.png|263x193px]]
+
'''注意,如果需要设置overlays同时打开多个配置,请像下面这样使用空格隔开写在一行即可。'''
  
<ol start="2" style="list-style-type: decimal;">
+
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
<li>First, you need to prepare a good quality USB2.0 male-to-male data cable</li></ol>
 
  
<div class="figure">
+
'''overlays=spi3-m0-cs0-spidev i2c2-m1 i2c3-m0 uart7-m2 uart9-m2 pwm11-m1'''
  
[[File:pi3b-img16.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
+
<span id="pin-gpio口测试"></span>
 +
=== 40pin GPIO口测试 ===
  
</div>
+
'''Orange Pi发布的Linux系统中有预装一个blink_all_gpio程序,这个程序会设置40pin中的所有28个GPIO口不停的切换高低电平。'''
<ol start="3" style="list-style-type: decimal;">
 
<li><p>Then download the Rockchip driver '''DriverAssitant_v5.12.zip''' and MiniLoader and the burning tool '''RKDevTool_Release_v3.15.zip''' from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi data download page''']</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>On the download page of Orange Pi, first select the official tool, and then enter the following folder</li></ol>
 
</li></ol>
 
  
<div class="figure">
+
'''运行blink_all_gpio程序后,当用万用表去测量GPIO口的电平时,会发现GPIO引脚会在0和3.3v之间不停的切换。使用这个程序我们可以来测试GPIO口是否能正常工作。'''
  
[[File:pi3b-img149.png|342x56px|1691401357374]]
+
'''运行blink_all_gpio程序的方式如下所示:'''
  
</div>
+
orangepi@orangepi3b:~$ '''sudo blink_all_gpio''' #记得加sudo权限
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then download all the files below</li></ol>
 
  
<div class="figure">
+
[sudo] password for orangepi: #在这里需要输入密码
  
[[File:pi3b-img150.png|347x139px|1691401520573]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>开发板40pin中总共有'''28'''个GPIO口可以使用,下面以7号引脚——对应GPIO为GPIO4_A4 ——对应wPi序号为2——为例演示如何设置GPIO口的高低电平</p>
 +
<p>[[File:media/image262.png|576x120px]]</p></li>
 +
<li><p>首先设置GPIO口为输出模式,其中第三个参数需要输入引脚对应的wPi的序号</p>
 +
<p>root@orangepi:~/wiringOP# '''gpio mode 2 out'''</p></li>
 +
<li><p>然后设置GPIO口输出低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功</p>
 +
<p>root@orangepi:~/wiringOP# '''gpio write 2 0'''</p>
 +
<p>使用gpio readall可以看到7号引脚的值(V)变为了0</p>
 +
<p>[[File:media/image263.png|576x120px]]</p></li>
 +
<li><p>然后设置GPIO口输出高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为3.3v,说明设置高电平成功</p>
 +
<p>root@orangepi:~/wiringOP# '''gpio write 2 1'''</p>
 +
<p>使用gpio readall可以看到7号引脚的值(V)变为了1</p>
 +
<p>[[File:media/image264.png|576x118px]]</p></li>
 +
<li><p>其他引脚的设置方法类似,只需修改wPi的序号为引脚对应的序号即可</p></li></ol>
  
</div>
+
<span id="pin-gpio口上下拉电阻的设置方法"></span>
'''Note that the &quot;MiniLoader-things needed to burn the Linux image&quot; folder is hereinafter referred to as the MiniLoader folder.'''
+
=== 40pin GPIO口上下拉电阻的设置方法 ===
  
<ol start="4" style="list-style-type: decimal;">
+
'''注意,Orange Pi 3B下面4个GPIO引脚因为外部有3.3V上拉,所以设置下拉是无效的,其它的引脚可以正常设置上下拉电阻功能'''
<li>Then use decompression software to decompress '''DriverAssitant_v5.12.zip''', and then find the '''DriverInstall.exe''' executable file in the decompressed folder and open it</li></ol>
 
  
[[File:pi3b-img31.png|472x139px]]
+
[[File:media/image265.png|575x353px]]
  
<ol start="5" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li><p>After opening DriverInstall.exe, the steps to install the Rockchip driver are as follows</p>
+
<li><p>下面以11号引脚——对应GPIO为GPIO3_C6 ——对应wPi序号为5——为例演示如何设置GPIO口的上下拉电阻</p>
<ol style="list-style-type: lower-alpha;">
+
<p>[[File:media/image266.png|576x147px]]</p></li>
<li>Click the &quot;'''Driver Installation'''&quot; button</li></ol>
+
<li><p>首先需要设置GPIO口为输入模式,其中第三个参数需要输入引脚对应的wPi的序号</p>
</li></ol>
+
<p>root@orangepi:~/wiringOP# '''gpio mode 5 in'''</p></li>
 +
<li><p>设置为输入模式后,执行下面的命令可以设置GPIO口为上拉模式</p>
 +
<p>root@orangepi:~/wiringOP# '''gpio mode 5 up'''</p></li>
 +
<li><p>然后输入下面的命令读取GPIO口的电平,如果电平为1,说明上拉模式设置成功</p>
 +
<p>root@orangepi:~/wiringOP# '''gpio read 5'''</p>
 +
<p>'''1'''</p></li>
 +
<li><p>然后执行下面的命令可以设置GPIO口为下拉模式</p>
 +
<p>root@orangepi:~/wiringOP# '''gpio mode 5 down'''</p></li>
 +
<li><p>然后输入下面的命令读取GPIO口的电平,如果电平为0,说明下拉模式设置成功</p>
 +
<p>root@orangepi:~/wiringOP# '''gpio read 5'''</p>
 +
<p>'''0'''</p></li></ol>
  
[[File:pi3b-img32.png|276x145px]]
+
<span id="pin-spi测试"></span>
 +
=== 40pin SPI测试 ===
  
<ol start="2" style="list-style-type: lower-alpha;">
+
<ol style="list-style-type: decimal;">
<li>After waiting for a period of time, a pop-up window will prompt &quot;'''driver installed successfully'''&quot;, and then click the &quot;'''OK'''&quot; button.</li></ol>
+
<li><p>由40pin接口的原理图可知,Orange Pi 3B可用的spi为spi3</p>
 +
<p>[[File:media/image267.png|577x193px]]</p>
 +
<p>'''在Linux系统中,40pin中的spi3默认是关闭的,需要手动打开才能使用。'''</p>
 +
<p>'''在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以打开spi3。'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p>
 +
<p>'''overlays=spi3-m0-cs0-spidev'''</p></li>
 +
<li><p>先查看下Linux系统中是否存在'''spidev3.0'''的设备节点,如果存在,说明SPI3已经设置好了,可以直接使用</p>
 +
<p>orangepi@orangepi:~$ '''ls /dev/spidev3.0'''</p>
 +
<p>/dev/spidev3.0</p></li>
 +
<li><p>先不短接SPI3的mosi和miso两个引脚,运行spidev_test的输出结果如下所示,可以看到TX和RX的数据不一致</p>
 +
<p>orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev3.0'''</p>
 +
<p>spi mode: 0x0</p>
 +
<p>bits per word: 8</p>
 +
<p>max speed: 500000 Hz (500 KHz)</p>
 +
<p>TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p>
 +
<p>RX | FF FF FF FF FF FF '''FF FF FF FF FF FF''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF | ............................….</p></li>
 +
<li><p>然后短接SPI3的mosi(40pin接口中的第19号引脚)和miso(40pin接口中的第21号引脚)两个引脚再运行spidev_test的输出如下,可以看到发送和接收的数据一样</p>
 +
<p>[[File:media/image268.png|577x83px]]</p>
 +
<p>orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev3.0'''</p>
 +
<p>spi mode: 0x0</p>
 +
<p>bits per word: 8</p>
 +
<p>max speed: 500000 Hz (500 KHz)</p>
 +
<p>TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p>
 +
<p>RX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p></li></ol>
  
[[File:pi3b-img33.png|292x151px]]
+
<span id="pin-i2c测试"></span>
 +
=== 40pin I2C测试 ===
  
<ol start="6" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li>Then decompress '''RKDevTool_Release_v3.15.zip''', this software does not need to be installed, just find '''RKDevTool''' in the decompressed folder and open it</li></ol>
+
<li><p>由下表可知,Orange Pi 3B可用的i2c为i2c2、i2c3和i2c4共三组 i2c总线</p>
 +
<p>[[File:media/image269.png|576x160px]]</p>
 +
<p>'''从上表中可以看到,i2c4_m0和spi3_m0是引脚复用的,两者不能同时打开,i2c3_m0和uart3_m0也是引脚复用的,两者不能同时打开'''</p>
 +
<p>'''在Linux系统中,40pin中的i2c默认都是关闭的,需要手动打开才能使用。'''</p>
 +
<p>'''在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以同时打开i2c2、i2c3和i2c4,如果只需要打开一个,那么就填写一个即可。'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p>
 +
<p>'''overlays=i2c2-m1 i2c3-m0 i2c4-m0'''</p></li>
 +
<li><p>启动Linux系统后,先确认下/dev下存在i2c的设备节点</p>
 +
<p>orangepi@orangepi:~# '''ls /dev/i2c-*'''</p>
 +
<p>/dev/i2c-0 '''/dev/i2c-2''' '''/dev/i2c-3''' '''/dev/i2c-4''' /dev/i2c-6</p></li>
 +
<li><p>然后在40pin接头的i2c引脚上接一个i2c设备</p></li></ol>
  
[[File:pi3b-img34.png|467x138px]]
+
{| class="wikitable"
 +
|-
 +
|
 +
| style="text-align: left;"| i2c2-m1
 +
| style="text-align: left;"| i2c3-m0
 +
| style="text-align: left;"| i2c4-m0
 +
|-
 +
| sda引脚
 +
| style="text-align: left;"| 对应3号引脚
 +
| style="text-align: left;"| 对应27号引脚
 +
| style="text-align: left;"| 对应19号引脚
 +
|-
 +
| sck引脚
 +
| style="text-align: left;"| 对应5号引脚
 +
| style="text-align: left;"| 对应28号引脚
 +
| style="text-align: left;"| 对应23号引脚
 +
|-
 +
| vcc引脚
 +
| style="text-align: left;"| 对应1号引脚
 +
| style="text-align: left;"| 对应1号引脚
 +
| style="text-align: left;"| 对应1号引脚
 +
|-
 +
| gnd引脚
 +
| style="text-align: left;"| 对应6号引脚
 +
| style="text-align: left;"| 对应6号引脚
 +
| style="text-align: left;"| 对应6号引脚
 +
|}
  
<ol start="7" style="list-style-type: decimal;">
+
<ol start="4" style="list-style-type: decimal;">
<li>After opening the '''RKDevTool''' burning tool, because the computer has not connected to the development board through the USB2.0 male-to-male data cable at this time, the lower left corner will prompt &quot;'''No device found'''&quot;</li></ol>
+
<li><p>然后使用'''i2cdetect -y'''命令如果能检测到连接的i2c设备的地址,就说明i2c能正常使用</p>
 
+
<p>orangepi@orangepi:~$ sudo i2cdetect -y 2 #i2c2的命令</p>
[[File:pi3b-img35.png|402x189px]]
+
<p>orangepi@orangepi:~$ sudo i2cdetect -y 3 #i2c3的命令</p>
 
+
<p>orangepi@orangepi:~$ sudo i2cdetect -y 4 #i2c4的命令</p></li></ol>
<ol start="8" style="list-style-type: decimal;">
 
<li><p>Then you can start to clear the content in SPI FLASH</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First, connect the development board to the Windows computer through the USB2.0 male-to-male data cable. The position of the USB2.0 programming port of the development board is shown in the figure below</li></ol>
 
</li></ol>
 
  
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img36.png|275x116px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\1691131157154(1).jpg1691131157154(1)]]
+
[[File:media/image270.png|476x179px|UN}~]Q}T_70O%Z%RNO8R@YE]]
  
 
</div>
 
</div>
<ol start="2" style="list-style-type: lower-alpha;">
+
<span id="pin的uart测试"></span>
<li><p>Make sure that the development board is not inserted into the TF card and not connected to the power supply</p></li>
+
=== 40pin的UART测试 ===
<li><p>Then press and hold the MaskROM button on the development board, the position of the MaskROM button on the development board is shown in the figure below:</p></li></ol>
 
  
[[File:pi3b-img37.png|289x100px]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>由下表可知,Orange Pi 3B可用的uart为uart3、uart7和uart9共三组uart总线</p>
 +
<p>[[File:media/image271.png|575x160px]]</p>
 +
<p>'''从上表中可以看到,i2c3_m0和uart3_m0是引脚复用的,两者不能同时打开'''</p>
 +
<p>'''在Linux系统中,40pin中的uart默认都是关闭的,需要手动打开才能使用。'''</p>
 +
<p>'''在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以同时打开uart3、uart7、和uart9,如果只需要打开一个,那么就填写一个即可。'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p>
 +
<p>'''overlays=uart3-m0 uart7-m2 uart9-m2'''</p></li>
 +
<li><p>进入Linux系统后,先确认下/dev下是否存在对应uart的设备节点</p>
 +
<p>orangepi@orangepi:~# '''ls /dev/ttyS*'''</p>
 +
<p>/dev/ttyS1 '''/dev'''/'''ttyS3 /dev/ttyS7 /dev/ttyS9'''</p></li>
 +
<li><p>然后开始测试uart接口,先使用杜邦线短接要测试的uart接口的rx和tx</p></li></ol>
  
<ol start="4" style="list-style-type: lower-alpha;">
+
{| class="wikitable"
<li>Then connect the power supply of the Type-C interface to the development board, and power on, and then release the MaskROM button</li></ol>
+
|-
 +
|
 +
| style="text-align: left;"| uart3
 +
| style="text-align: left;"| uart7
 +
| style="text-align: left;"| uart9
 +
|-
 +
| tx引脚
 +
| style="text-align: left;"| 对应28号引脚
 +
| style="text-align: left;"| 对应16号引脚
 +
| style="text-align: left;"| 对应29号引脚
 +
|-
 +
| rx引脚
 +
| style="text-align: left;"| 对应27号引脚
 +
| style="text-align: left;"| 对应15号引脚
 +
| style="text-align: left;"| 对应7号引脚
 +
|}
  
[[File:pi3b-img38.png|305x94px]]
+
[[File:media/image272.png|545x134px]]
  
<ol start="5" style="list-style-type: lower-alpha;">
+
<ol start="4" style="list-style-type: decimal;">
<li>If the previous steps are successful, the development board will enter the '''MASKROM''' mode at this time, and the interface of the burning tool will prompt &quot;'''found a MASKROM device'''&quot;</li></ol>
+
<li><p>使用'''gpio serial'''命令测试串口的回环功能如下所示,如果能看到下面的打印,说明串口通信正常</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>测试UART3</p>
 +
<p>orangepi@orangepi:~$ '''sudo gpio serial /dev/ttyS3'''</p>
 +
<p>[sudo] password for orangepi: #在这里输入密码</p>
 +
<p>Out: 0: -&gt; 0</p>
 +
<p>Out: 1: -&gt; 1</p>
 +
<p>Out: 2: -&gt; 2</p>
 +
<p>Out: 3: -&gt; 3</p>
 +
<p>Out: 4: -&gt; 4</p>
 +
<p>Out: 5: -&gt; 5^C</p></li>
 +
<li><p>测试UART7</p>
 +
<p>orangepi@orangepi:~$ '''sudo gpio serial /dev/ttyS7'''</p>
 +
<p>[sudo] password for orangepi: #在这里输入密码</p>
 +
<p>Out: 0: -&gt; 0</p>
 +
<p>Out: 1: -&gt; 1</p>
 +
<p>Out: 2: -&gt; 2</p>
 +
<p>Out: 3: -&gt; 3</p>
 +
<p>Out: 4: -&gt; 4</p>
 +
<p>Out: 5: -&gt; 5^C</p></li>
 +
<li><p>测试UART9</p>
 +
<p>orangepi@orangepi:~$ '''sudo gpio serial /dev/ttyS9'''</p>
 +
<p>[sudo] password for orangepi: #在这里输入密码</p>
 +
<p>Out: 0: -&gt; 0</p>
 +
<p>Out: 1: -&gt; 1</p>
 +
<p>Out: 2: -&gt; 2</p>
 +
<p>Out: 3: -&gt; 3</p>
 +
<p>Out: 4: -&gt; 4</p>
 +
<p>Out: 5: -&gt; 5^C</p></li></ol>
 +
</li></ol>
  
[[File:pi3b-img39.png|457x215px]]
+
<span id="pwm的测试方法"></span>
 
+
=== PWM的测试方法 ===
<ol start="6" style="list-style-type: lower-alpha;">
 
<li><p>Then please select '''Advanced Features'''</p>
 
<p>[[File:pi3b-img126.png|458x138px]]</p></li>
 
<li><p>Then click the position shown in the figure below</p>
 
<p>[[File:pi3b-img127.png|459x216px]]</p></li>
 
<li><p>Select '''rk3566_MiniLoaderAll.bin''' in the '''MiniLoader''' folder you downloaded earlier, and click Open</p></li></ol>
 
  
 +
<ol style="list-style-type: decimal;">
 +
<li><p>由下表可知,Orange Pi 3B可用的pwm11</p>
 +
<p>[[File:media/image273.png|575x160px]]</p>
 +
<p>'''在Linux系统中,40pin中的pwm默认都是关闭的,需要手动打开才能使用。'''</p>
 +
<p>'''在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以打开pwm11。'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p>
 +
<p>'''overlays=pwm11-m1'''</p></li>
 +
<li><p>当打开一个pwm后,在'''/sys/class/pwm/'''中就会多出一个pwmchipX(X为具体的的数字)</p>
 +
<p>orangepi@orangepi:~$ '''ls /sys/class/pwm/'''</p>
 +
<p>pwmchip0 pwmchip1</p></li>
 +
<li><p>上面哪个pwmchip对应pwm11呢,我们先查看下 '''ls /sys/class/pwm/ -l'''命令的输出,如下所示:</p>
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img68.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]
+
[[File:media/image274.png|576x46px|RCUS$_~VYM{4ZS]_L}DNZQR]]
  
</div>
+
</div></li>
<ol style="list-style-type: lower-roman;">
+
<li></li>
<li><p>Then click '''Download'''</p>
+
<li><p>pwm11寄存器的基地址为fe6f0030,再看 '''ls /sys/class/pwm/ -l'''命令的输出,可以看到pwmchip1中链接到了fe6f0030.pwm,所以pwm11对应pwmchip为pwmchip1</p></li>
<p>[[File:pi3b-img128.png|472x222px]]</p></li></ol>
+
<li><p>然后使用下面的命令可以让pwm11输出一个50Hz的方波(请先切换到root用户,再执行下面的命令)</p></li></ol>
  
<ol start="10" style="list-style-type: lower-alpha;">
+
root@orangepi:~# '''echo 0 &gt; /sys/class/pwm/pwmchip1/export'''
<li><p>The display after downloading '''rk3566_MiniLoaderAll.bin''' is shown in the figure below</p>
 
<p>[[File:pi3b-img140.png|474x223px]]</p></li>
 
<li><p>Then select the storage device as '''SPINOR'''</p>
 
<p>[[File:pi3b-img151.png|467x220px]]</p></li>
 
<li><p>Then click Switch '''Storage'''</p>
 
<p>[[File:pi3b-img152.png|464x218px]]</p></li>
 
<li><p>Then click '''Erase All''' to start erasing SPIFlash</p>
 
<p>[[File:pi3b-img153.png|467x220px]]</p></li>
 
<li><p>The display log after erasing SPIFlash is shown in the figure below</p>
 
<p>[[File:pi3b-img154.png|460x216px]]</p></li></ol>
 
  
<span id="start-the-orange-pi-development-board"></span>
+
root@orangepi:~# '''echo 20000000 &gt; /sys/class/pwm/pwmchip1/pwm0/period'''
== Start the Orange Pi development board ==
 
  
# Insert the TF card with the burned image into the TF card slot of the Orange Pi development board. If the image of SPIFlash+NVMe SSD has been burnt, then there is no need to insert a TF card, just make sure that the NVMe SSD is inserted into the development board normally.
+
root@orangepi:~# '''echo 1000000 &gt; /sys/class/pwm/pwmchip1/pwm0/duty_cycle'''
# The development board has an HDMI interface, and the development board can be connected to a TV or HDMI display through an HDMI-to-HDMI cable. If you have purchased an LCD screen, you can also use the LCD screen to display the system interface of the development board. If there is a Type-C to HDMI cable, the system interface of the development board can also be displayed through the Type-C interface.
 
# Connect a USB mouse and keyboard to control the Orange Pi development board.
 
# The development board has an Ethernet port, which can be plugged into a network cable for Internet access.
 
# Connect a high-quality power adapter with a 5V/3A or 5V/4A USB Type-C interface.
 
  
'''Remember not to plug in a power adapter with a voltage output greater than 5V, as this will burn out the development board.'''
+
root@orangepi:~# '''echo 1 &gt; /sys/class/pwm/pwmchip1/pwm0/enable'''
 
 
'''Many unstable phenomena during the power-on and start-up process of the system are basically caused by power supply problems, so a reliable power adapter is very important. If you find that there is a phenomenon of continuous restart during the startup process, please replace the power supply or the Type-C data cable and try again.'''
 
 
 
'''The Type-C power port does not support PD negotiation.'''
 
  
'''In addition, please do not connect the USB interface of the computer to power the development board.'''
+
[[File:media/image275.png|575x346px]]
  
6) Then turn on the switch of the power adapter. If everything is normal, you can see the startup screen of the system on the HDMI monitor or LCD screen.
+
<span id="wiringop-python的安装使用方法"></span>
 +
== wiringOP-Python的安装使用方法 ==
  
7) If you want to view the output information of the system through the debugging serial port, please use the serial cable to connect the development board to the computer. For the connection method of the serial port, please refer to '''[[\l|the section on how to use the debugging serial port]].'''
+
'''wiringOP-Python是wiringOP的Python语言版本的库,用于在Python程序中操作开发板的GPIO、I2C、SPI和UART等硬件资源。'''
  
<span id="how-to-use-the-debugging-serial-port"></span>
+
'''另外请注意下面所有的命令都是在root用户下操作的。'''
== How to use the debugging serial port ==
 
  
<span id="connection-instruction-of-debugging-serial-port"></span>
+
<span id="wiringop-python的安装方法"></span>
=== Connection instruction of debugging serial port ===
+
=== wiringOP-Python的安装方法 ===
  
 
<ol style="list-style-type: decimal;">
 
<ol style="list-style-type: decimal;">
<li><p>First, you need to prepare a 3.3V USB-to-TTL module, and then insert the USB interface end of the USB-to-TTL module into the USB interface of the computer.</p>
+
<li><p>首先安装依赖包</p>
<p>'''For better compatibility, it is recommended to use CH340 USB to TTL module, please do not use CP2102, PL2303 USB to TTL module.'''</p>
+
<p>root@orangepi:~# '''sudo apt-get update'''</p>
<p>'''Before purchasing a USB to TTL module, please confirm that the module supports a baud rate of 1500000.'''</p></li></ol>
+
<p>root@orangepi:~# '''sudo apt-get -y install git swig python3-dev python3-setuptools'''</p></li>
 +
<li><p>然后使用下面的命令下载wiringOP-Python的源码</p></li></ol>
  
<div class="figure">
+
'''注意,下面的git clone--recursive命令会自动下载wiringOP的源码,因为wiringOP-Python是依赖wiringOP的。请确保下载过程没有因为网络问题而报错。'''
  
[[File:pi3b-img155.png|576x115px|07]]
+
'''如果从GitHub下载代码有问题,可以直接使用Linux镜像中自带的wiringOP-Python源码,存放位置为:/usr/src/wiringOP-Python'''。
  
</div>
+
root@orangepi:~# '''git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python -b next'''
<ol start="2" style="list-style-type: decimal;">
 
<li>The corresponding relationship between GND, RXD and TXD pins of the debugging serial port of the development board is shown in the figure below</li></ol>
 
  
[[File:pi3b-img156.png|428x110px]]
+
root@orangepi:~# '''cd wiringOP-Python'''
 +
 
 +
root@orangepi:~/wiringOP-Python# '''git submodule update --init --remote'''
  
 
<ol start="3" style="list-style-type: decimal;">
 
<ol start="3" style="list-style-type: decimal;">
<li>The GND, TXD and RXD pins of the USB to TTL module need to be connected to the debugging serial port of the development board through a DuPont line</li></ol>
+
<li><p>然后使用下面的命令编译wiringOP-Python并将其安装到开发板的Linux系统中</p>
 +
<p>root@orangepi:~# '''cd wiringOP-Python'''</p>
 +
<p>root@orangepi:~/wiringOP-Python# '''python3 generate-bindings.py &gt; bindings.i'''</p>
 +
<p>root@orangepi:~/wiringOP-Python# '''sudo python3 setup.py install'''</p></li>
 +
<li><p>然后输入下面的命令,如果有帮助信息输出,说明wiringOP-Python安装成功,按下'''q'''键可以退出帮助信息的界面</p></li></ol>
  
<blockquote>a. Connect the GND of the USB to TTL module to the GND of the development board
+
root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; help(wiringpi)&quot;'''
  
b. The '''RX of the USB to TTL module is connected to the TX''' of the development board
+
Help on module wiringpi:
  
c. The '''TX of the USB to TTL module is connected to the TX''' of the development board
+
NAME
</blockquote>
 
<ol start="4" style="list-style-type: decimal;">
 
<li>The schematic diagram of connecting the USB to TTL module to the computer and the Orange Pi development board is as follows</li></ol>
 
  
<div class="figure">
+
wiringpi
  
[[File:pi3b-img157.png|524x189px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\USB-to-TTL-module-to-the-computer.jpgUSB-to-TTL-module-to-the-computer]]
+
DESCRIPTION
  
</div>
+
# This file was automatically generated by SWIG (http://www.swig.org).
'''The TX and RX of the serial port need to be cross-connected. If you don’t want to carefully distinguish the order of TX and RX, you can connect the TX and RX of the serial port casually first. If there is no output in the test, then exchange the order of TX and RX, so there is always a the order is right'''
 
  
<span id="how-to-use-the-debugging-serial-port-on-the-ubuntu-platform"></span>
+
# Version 4.0.2
=== How to use the debugging serial port on the Ubuntu platform ===
 
  
'''There are many serial port debugging software that can be used under Linux, such as putty, minicom, etc. The following demonstrates how to use putty.'''
+
#
  
# First, insert the USB-to-TTL module into the USB interface of the Ubuntu computer. If the connection and recognition of the USB-to-TTL module is normal, you can see the corresponding device node name under '''/dev''' on the Ubuntu PC. Remember this node name, and then set the serial port software will be used
+
# Do not make changes to this file unless you know what you are doing--modify
  
test@test:~$ '''ls /dev/ttyUSB*'''
+
# the SWIG interface file instead.
  
/dev/ttyUSB0
+
<ol start="5" style="list-style-type: decimal;">
 +
<li><p>在python命令行下测试wiringOP-Python是否安装成功的步骤如下所示:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li>首先使用python3命令进入python3的命令行模式</li></ol>
 +
</li></ol>
  
<ol start="2" style="list-style-type: decimal;">
+
root@orangepi:~# '''python3'''
<li>Then use the following command to install putty on Ubuntu PC</li></ol>
 
  
test@test:~$ '''sudo apt-get update'''
+
<ol start="2" style="list-style-type: lower-alpha;">
 +
<li>然后导入wiringpi的python模块</li></ol>
  
test@test:~$ '''sudo apt-get install -y putty'''
+
&gt;&gt;&gt; '''import wiringpi;'''
  
<ol start="3" style="list-style-type: decimal;">
+
<ol start="3" style="list-style-type: lower-alpha;">
<li>Then run putty, '''remember to add sudo permission'''</li></ol>
+
<li>最后输入下面的命令可以查看下wiringOP-Python的帮助信息,按下'''q'''键可以退出帮助信息的界面</li></ol>
  
test@test:~$ '''sudo putty'''
+
&gt;&gt;&gt; '''help(wiringpi)'''
  
<ol start="4" style="list-style-type: decimal;">
+
Help on module wiringpi:
<li>After executing the putty command, the following interface will pop up</li></ol>
 
  
[[File:pi3b-img158.png|367x321px]]
+
NAME
  
<ol start="5" style="list-style-type: decimal;">
+
wiringpi
<li>First select the setting interface of the serial port</li></ol>
 
  
[[File:pi3b-img159.png|359x352px]]
+
DESCRIPTION
  
<ol start="6" style="list-style-type: decimal;">
+
# This file was automatically generated by SWIG (http://www.swig.org).
<li><p>Then set the parameters of the serial port</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>Set Serial line to connect toas /dev/ttyUSB0((Modified to the corresponding node name, generally /dev/ttyUSB0)</p></li>
 
<li><p>Set Speed(baud) as '''1500000'''(Serial port baud rate)</p></li>
 
<li><p>Set Flow control as None</p></li></ol>
 
</li></ol>
 
  
<div class="figure">
+
# Version 4.0.2
  
[[File:pi3b-img160.png|317x312px|09]]
+
#
  
</div>
+
# Do not make changes to this file unless you know what you are doing--modify
<ol start="7" style="list-style-type: decimal;">
+
 
<li><p>After setting the setting interface of the serial port, return to the Session interface</p>
+
# the SWIG interface file instead.
<ol style="list-style-type: lower-alpha;">
 
<li><p>First select the Connection type as Serial</p></li>
 
<li><p>Then click the Open button to connect to the serial port</p></li></ol>
 
</li></ol>
 
  
<div class="figure">
+
CLASSES
  
[[File:pi3b-img161.png|345x340px|10]]
+
builtins.object
  
</div>
+
GPIO
<ol start="8" style="list-style-type: decimal;">
 
<li>After starting the development board, you can see the Log information output by the system from the opened serial port terminal</li></ol>
 
  
[[File:pi3b-img162.png|468x340px]]
+
I2C
  
<span id="how-to-use-the-debugging-serial-port-on-windows-platform"></span>
+
Serial
=== How to use the debugging serial port on Windows platform ===
 
  
'''There are many serial port debugging software that can be used under Windows, such as SecureCRT, MobaXterm, etc. The following demonstrates how to use MobaXterm. This software has a free version and can be used without buying a serial number.'''
+
nes
  
<ol style="list-style-type: decimal;">
+
class GPIO(builtins.object)
<li><p>Download MobaXterm</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Download MobaXterm website as follows</li></ol>
 
</li></ol>
 
  
[https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net]
+
| GPIO(pinmode=0)
  
<ol start="2" style="list-style-type: lower-alpha;">
+
|
<li>After entering the MobaXterm download page, click '''GET XOBATERM NOW!'''</li></ol>
 
  
[[File:pi3b-img163.png|576x334px]]
+
&gt;&gt;&gt;
  
<ol start="3" style="list-style-type: lower-alpha;">
+
<span id="pin-gpio口测试-1"></span>
<li>Then choose to download the Home version</li></ol>
+
=== 40pin GPIO口测试 ===
  
[[File:pi3b-img164.png|353x231px]]
+
'''wiringOP-Python跟wiringOP一样,也是可以通过指定wPi号来确定操作哪一个GPIO引脚,因为wiringOP-Python中没有查看wPi号的命令,所以只能通过wiringOP中的gpio命令来查看板子wPi号与物理引脚的对应关系。'''
  
<ol start="4" style="list-style-type: lower-alpha;">
+
<div class="figure">
<li>Then select the Portable version. After downloading, you don’t need to install it, just open it and use it</li></ol>
 
  
[[File:pi3b-img165.png|575x259px]]
+
[[File:media/image261.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]
  
<ol start="2" style="list-style-type: decimal;">
+
</div>
<li>After downloading, use decompression software to decompress the downloaded compressed package, you can get the executable software of MobaXterm, and then double-click to open</li></ol>
+
<ol style="list-style-type: decimal;">
 +
<li><p>下面以7号引脚——对应GPIO为GPIO4_A4 ——对应wPi序号为2——为例演示如何设置GPIO口的高低电平</p>
 +
<p>[[File:media/image262.png|576x120px]]</p></li>
 +
<li><p>直接用命令测试的步骤如下所示:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先设置GPIO口为输出模式,其中'''pinMode'''函数的第一个参数是引脚对应的wPi的序号,第二个参数是GPIO的模式</p>
 +
<p>root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \'''</p>
 +
<p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \'''</p>
 +
<p>'''wiringpi.pinMode(2, GPIO.OUTPUT) ; &quot;'''</p></li>
 +
<li><p>然后设置GPIO口输出低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功</p>
 +
<p>root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \'''</p>
 +
<p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''</p>
 +
<p>'''wiringpi.digitalWrite(2, GPIO.LOW)&quot;'''</p></li>
 +
<li><p>然后设置GPIO口输出高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为3.3v,说明设置高电平成功</p>
 +
<p>root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \'''</p>
 +
<p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''</p>
 +
<p>'''wiringpi.digitalWrite(2, GPIO.HIGH)&quot;'''</p></li></ol>
 +
</li>
 +
<li><p>在python3的命令行中测试的步骤如下所示:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先使用python3命令进入python3的命令行模式</p>
 +
<p>root@orangepi:~# '''python3'''</p></li>
 +
<li><p>然后导入wiringpi的python模块</p>
 +
<p>&gt;&gt;&gt; '''import wiringpi'''</p>
 +
<p>&gt;&gt;&gt; '''from wiringpi import GPIO'''</p></li>
 +
<li><p>然后设置GPIO口为输出模式,其中'''pinMode'''函数的第一个参数是引脚对应的wPi的序号,第二个参数是GPIO的模式</p>
 +
<p>&gt;&gt;&gt; '''wiringpi.wiringPiSetup()'''</p>
 +
<p>0</p>
 +
<p>&gt;&gt;&gt; '''wiringpi.pinMode(2, GPIO.OUTPUT)'''</p></li>
 +
<li><p>然后设置GPIO口输出低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功</p>
 +
<p>&gt;&gt;&gt; '''wiringpi.digitalWrite(2, GPIO.LOW)'''</p></li>
 +
<li><p>然后设置GPIO口输出高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为3.3v,说明设置高电平成功</p>
 +
<p>&gt;&gt;&gt; '''wiringpi.digitalWrite(2, GPIO.HIGH)'''</p></li></ol>
 +
</li>
 +
<li><p>wiringOP-Python在python代码中设置GPIO高低电平的方法可以参考下examples中的'''blink.py'''测试程序,'''blink.py'''测试程序会设置开发板40 pin中所有的GPIO口的电压不断的高低变化</p>
 +
<p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p>
 +
<p>root@orangepi:~/wiringOP-Python/examples# '''ls blink.py'''</p>
 +
<p>'''blink.py'''</p>
 +
<p>root@orangepi:~/wiringOP-Python/examples'''# python3 blink.py'''</p></li></ol>
  
[[File:pi3b-img166.png|576x81px]]
+
<span id="pin-spi测试-1"></span>
 +
=== 40pin SPI测试 ===
  
<ol start="3" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li><p>After opening the software, the steps to set up the serial port connection are as follows</p>
+
<li><p>由40pin接口的原理图可知,Orange Pi 3B可用的spi为spi3</p>
 +
<p>[[File:media/image267.png|577x193px]]</p>
 +
<p>'''在Linux系统中,40pin中的spi3默认是关闭的,需要手动打开才能使用。'''</p>
 +
<p>'''在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以打开spi4。'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p>
 +
<p>'''overlays=spi3-m0-cs0-spidev'''</p></li>
 +
<li><p>先查看下Linux系统中是否存在'''spidev3.0'''的设备节点,如果存在,说明SPI3已经设置好了,可以直接使用</p>
 +
<p>orangepi@orangepi:~$ '''ls /dev/spidev3.0'''</p>
 +
<p>/dev/spidev3.0</p></li>
 +
<li><p>然后可以使用examples中的'''spidev_test.py'''程序测试下SPI的回环功能,'''spidev_test.py'''程序需要指定下面的两个参数:</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li><p>Open the session settings interface</p></li>
+
<li><p>'''--channel''':指定SPI的通道号</p></li>
<li><p>Select the serial port type</p></li>
+
<li><p>'''--port''':指定SPI的端口号</p></li></ol>
<li><p>Select the port number of the serial port (select the corresponding port number according to the actual situation), if you can’t see the port number, please use '''Driver Master''' to scan and install the driver for the USB to TTL serial port chip</p></li>
+
</li>
<li><p>Select the baud rate of the serial port as '''1500000'''</p></li>
+
<li><p>先不短接 SPI3 的 mosi 和 miso 两个引脚,运行 spidev_test.py 的输出结果如下所示,可以看到 TX 和 RX 的数据不一致</p>
<li><p>Finally click the &quot;'''OK'''&quot; button to complete the setting</p></li></ol>
+
<p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p></li></ol>
</li></ol>
 
  
<div class="figure">
+
root@orangepi:~/wiringOP-Python/examples# '''python3 spidev_test.py \'''
  
[[File:pi3b-img167.png|575x438px|11]]
+
'''--channel 3 --port 0'''
  
</div>
+
spi mode: 0x0
<ol start="4" style="list-style-type: decimal;">
+
 
<li>After clicking the &quot;'''OK'''&quot; button, you will enter the following interface. At this time, start the development board and you can see the output information of the serial port</li></ol>
+
max speed: 500000 Hz (500 KHz)
  
<div class="figure">
+
Opening device /dev/spidev3.0
  
[[File:pi3b-img168.png|575x291px|12]]
+
TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|
  
</div>
+
RX | FF FF FF FF FF FF '''FF FF FF FF FF FF''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |.............….|
<span id="instructions-for-using-the-5v-pin-in-the-40pin-interface-of-the-development-board-to-supply-power"></span>
 
== Instructions for using the 5v pin in the 40pin interface of the development board to supply power ==
 
  
'''The power supply method we recommend for the development board is to use the 5V/3A or 5V/4A Type C interface power cord to plug into the Type-C power interface of the development board for power supply. If you need to use the 5V pin in the 40pin interface to power the development board, please make sure that the power cord and power adapter used can meet the power supply requirements of the development board. If the use is unstable, please switch back to the Type-C power supply.'''
+
<ol start="5" style="list-style-type: decimal;">
 +
<li><p>然后使用杜邦线短接SPI3的txd(40pin接口中的第19号引脚)和rxd(40pin接口中的第21号引脚)两个引脚再运行spidev_test.py的输出如下,可以看到发送和接收的数据一样,说明SPI3回环测试正常</p>
 +
<p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p></li></ol>
  
# First, you need to prepare a power cord as shown in the figure below
+
root@orangepi:~/wiringOP-Python/examples# '''python3 spidev_test.py \'''
  
<div class="figure">
+
'''--channel 3 --port 0'''
  
[[File:pi3b-img169.png|151x108px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题-7.jpg未标题-7]]
+
spi mode: 0x0
  
</div>
+
max speed: 500000 Hz (500 KHz)
'''Please purchase the power cord shown in the picture above by yourself'''
 
  
<ol start="2" style="list-style-type: decimal;">
+
Opening device /dev/spidev3.0
<li><p>Use the 5V pin in the 40pin interface to supply power to the development board. The connection method of the power line is as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>The USB A port of the power cord shown in the above picture needs to be plugged into the 5V/3A or 5V4A power adapter connector ('''please do not plug into the computer’s USB port for power supply''')</p></li>
 
<li><p>The red DuPont line needs to be plugged into the 5V pin of the development board 40pin</p></li>
 
<li><p>The black Dupont wire needs to be inserted into the GND pin of the 40pin interface</p></li>
 
<li><p>The position of the 5V pin and GND pin of the 40pin interface on the development board is shown in the figure below, remember not to reverse the connection</p></li></ol>
 
</li></ol>
 
  
[[File:pi3b-img170.png|365x71px]]
+
TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......|
  
<span id="instructions-for-use-of-ubuntudebian-server-and-xfce-desktop-system"></span>
+
RX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|
= Instructions for use of Ubuntu/Debian Server and Xfce desktop system =
 
  
'''The content of this chapter is written based on the images of the Linux server version and the xfce desktop version.'''
+
<span id="pin-i2c测试-1"></span>
 +
=== 40pin I2C测试 ===
  
<span id="supported-linux-image-types-and-kernel-versions"></span>
+
<ol start="5" style="list-style-type: decimal;">
== Supported Linux image types and kernel versions ==
+
<li><p>由下表可知,Orange Pi 3B可用的i2c为i2c2、i2c3和i2c4共三组 i2c总线</p>
 +
<p>[[File:media/image269.png|576x160px]]</p>
 +
<p>'''从上表中可以看到,i2c4_m0和spi3_m0是引脚复用的,两者不能同时打开,i2c3_m0和uart3_m0也是引脚复用的,两者不能同时打开'''</p>
 +
<p>'''在Linux系统中,40pin中的i2c默认都是关闭的,需要手动打开才能使用。'''</p>
 +
<p>'''在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以同时打开i2c2、i2c3和i2c4,如果只需要打开一个,那么就填写一个即可。'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p>
 +
<p>'''overlays=i2c2-m1 i2c3-m0 i2c4-m0'''</p></li>
 +
<li><p>启动Linux系统后,先确认下/dev下存在i2c的设备节点</p>
 +
<p>orangepi@orangepi:~# '''ls /dev/i2c-*'''</p>
 +
<p>/dev/i2c-0 '''/dev/i2c-2''' '''/dev/i2c-3''' '''/dev/i2c-4''' /dev/i2c-6</p></li>
 +
<li><p>然后在40pin接头的i2c引脚上接一个i2c设备,这里以ds1307 RTC模块为例</p></li></ol>
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
| style="text-align: left;"| '''Linux image type'''
+
|
| style="text-align: left;"| '''kernel version'''
+
| style="text-align: left;"| i2c2-m1
| style="text-align: left;"| '''server version'''
+
| style="text-align: left;"| i2c3-m0
| style="text-align: left;"| '''desktop version'''
+
| style="text-align: left;"| i2c4-m0
 +
|-
 +
| sda引脚
 +
| style="text-align: left;"| 对应3号引脚
 +
| style="text-align: left;"| 对应27号引脚
 +
| style="text-align: left;"| 对应19号引脚
 
|-
 
|-
| style="text-align: left;"| '''Debian 11 - Bullseye'''
+
| sck引脚
| style="text-align: left;"| '''Linux5.10'''
+
| style="text-align: left;"| 对应5号引脚
| style="text-align: left;"| '''support'''
+
| style="text-align: left;"| 对应28号引脚
| style="text-align: left;"| '''support'''
+
| style="text-align: left;"| 对应23号引脚
 
|-
 
|-
| style="text-align: left;"| '''Ubuntu 20.04 - Focal'''
+
| vcc引脚
| style="text-align: left;"| '''Linux5.10'''
+
| style="text-align: left;"| 对应1号引脚
| style="text-align: left;"| '''support'''
+
| style="text-align: left;"| 对应1号引脚
| style="text-align: left;"| '''support'''
+
| style="text-align: left;"| 对应1号引脚
 
|-
 
|-
| style="text-align: left;"| '''Ubuntu 22.04 - Jammy'''
+
| gnd引脚
| style="text-align: left;"| '''Linux5.10'''
+
| style="text-align: left;"| 对应6号引脚
| style="text-align: left;"| '''support'''
+
| style="text-align: left;"| 对应6号引脚
| style="text-align: left;"| '''support'''
+
| style="text-align: left;"| 对应6号引脚
 
|}
 
|}
  
<span id="linux-system-adaptation"></span>
+
[[File:media/image276.png|180x153px]]
== Linux System adaptation ==
 
  
{| class="wikitable"
+
<ol start="8" style="list-style-type: decimal;">
|-
+
<li><p>然后使用'''i2cdetect -y'''命令如果能检测到连接的i2c设备的地址,就说明i2c能正常使用</p>
| style="text-align: left;"| '''Function'''
+
<p>orangepi@orangepi:~$ sudo i2cdetect -y 2 #i2c2的命令</p>
| style="text-align: left;"| '''Debian11'''
+
<p>orangepi@orangepi:~$ sudo i2cdetect -y 3 #i2c3的命令</p>
| style="text-align: left;"| '''Ubuntu20.04'''
+
<p>orangepi@orangepi:~$ sudo i2cdetect -y 4 #i2c4的命令</p>
| style="text-align: left;"| '''Ubuntu22.04'''
+
<div class="figure">
 +
 
 +
[[File:media/image277.png|464x174px|V@(61L~0})Q`8VLBCAYEP[2]]
 +
 
 +
</div></li>
 +
<li><p>然后可以运行'''examples'''中的'''ds1307.py'''测试程序读取RTC的时间</p>
 +
<p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p>
 +
<p>root@orangepi:~/wiringOP-Python/examples# '''python3 ds1307.py --device \'''</p>
 +
<p>'''&quot;/dev/i2c-4&quot;'''</p>
 +
<p>Thu 2023-01-05 14:57:55</p>
 +
<p>Thu 2023-01-05 14:57:56</p>
 +
<p>Thu 2023-01-05 14:57:57</p>
 +
<p>^C</p>
 +
<p>exit</p></li></ol>
 +
 
 +
<span id="pin的uart测试-1"></span>
 +
=== 40pin的UART测试 ===
 +
 
 +
<ol style="list-style-type: decimal;">
 +
<li><p>由下表可知,Orange Pi 3B可用的uart为uart3、uart7和uart9共三组uart总线</p>
 +
<p>[[File:media/image271.png|575x160px]]</p>
 +
<p>'''从上表中可以看到,i2c3_m0和uart3_m0是引脚复用的,两者不能同时打开'''</p>
 +
<p>'''在Linux系统中,40pin中的uart默认都是关闭的,需要手动打开才能使用。'''</p>
 +
<p>'''在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以同时打开uart3、uart7、和uart9,如果只需要打开一个,那么就填写一个即可。'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p>
 +
<p>'''overlays=uart3-m0 uart7-m2 uart9-m2'''</p></li>
 +
<li><p>进入Linux系统后,先确认下/dev下是否存在对应uart的设备节点</p>
 +
<p>orangepi@orangepi:~# '''ls /dev/ttyS*'''</p>
 +
<p>/dev/ttyS1 '''/dev'''/'''ttyS3 /dev/ttyS7 /dev/ttyS9'''</p></li>
 +
<li><p>然后开始测试uart接口,先使用杜邦线短接要测试的uart接口的rx和tx</p></li></ol>
 +
 
 +
{| class="wikitable"
 
|-
 
|-
| style="text-align: left;"| '''USB2.0x3'''
+
|
| style="text-align: left;"| '''OK'''
+
| style="text-align: left;"| uart3
| style="text-align: left;"| '''OK'''
+
| style="text-align: left;"| uart7
| style="text-align: left;"| '''OK'''
+
| style="text-align: left;"| uart9
|-
 
| style="text-align: left;"| '''USB3.0x1'''
 
| style="text-align: left;"| '''OK'''
 
| style="text-align: left;"| '''OK'''
 
| style="text-align: left;"| '''OK'''
 
 
|-
 
|-
| style="text-align: left;"| '''M.2 NVMe SSD Start'''
+
| tx引脚
| style="text-align: left;"| '''OK'''
+
| style="text-align: left;"| 对应28号引脚
| style="text-align: left;"| '''OK'''
+
| style="text-align: left;"| 对应16号引脚
| style="text-align: left;"| '''OK'''
+
| style="text-align: left;"| 对应29号引脚
 
|-
 
|-
| style="text-align: left;"| '''WIFI'''
+
| rx引脚
| style="text-align: left;"| '''OK'''
+
| style="text-align: left;"| 对应27号引脚
| style="text-align: left;"| '''OK'''
+
| style="text-align: left;"| 对应15号引脚
| style="text-align: left;"| '''OK'''
+
| style="text-align: left;"| 对应7号引脚
|-
+
|}
| style="text-align: left;"| '''Bluetooth'''
+
 
| style="text-align: left;"| '''OK'''
+
<ol start="4" style="list-style-type: decimal;">
| style="text-align: left;"| '''OK'''
+
<li><p>使用examples中的'''serialTest.py'''程序测试串口的回环功能如下所示,如果能看到下面的打印,说明串口通信正常</p>
| style="text-align: left;"| '''OK'''
+
<ol style="list-style-type: lower-alpha;">
|-
+
<li><p>测试UART3</p>
| style="text-align: left;"| '''GPIO(40pin)'''
+
<p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''</p>
| style="text-align: left;"| '''OK'''
+
<p>'''&quot;/dev/ttyS3&quot;'''</p>
| style="text-align: left;"| '''OK'''
+
<p>Out: 0: -&gt; 0</p>
| style="text-align: left;"| '''OK'''
+
<p>Out: 1: -&gt; 1</p>
|-
+
<p>Out: 2: -&gt; 2</p>
| style="text-align: left;"| '''UART(40pin)'''
+
<p>Out: 3: -&gt; 3</p>
| style="text-align: left;"| '''OK'''
+
<p>Out: 4:^C</p>
| style="text-align: left;"| '''OK'''
+
<p>exit</p></li>
| style="text-align: left;"| '''OK'''
+
<li><p>测试UART7</p>
|-
+
<p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''</p>
| style="text-align: left;"| '''SPI(40pin)'''
+
<p>'''&quot;/dev/ttyS7&quot;'''</p>
| style="text-align: left;"| '''OK'''
+
<p>Out: 0: -&gt; 0</p>
| style="text-align: left;"| '''OK'''
+
<p>Out: 1: -&gt; 1</p>
| style="text-align: left;"| '''OK'''
+
<p>Out: 2: -&gt; 2</p>
|-
+
<p>Out: 3: -&gt; 3</p>
| style="text-align: left;"| '''I2C(40pin)'''
+
<p>Out: 4:^C</p>
| style="text-align: left;"| '''OK'''
+
<p>exit</p></li>
| style="text-align: left;"| '''OK'''
+
<li><p>测试UART9</p>
| style="text-align: left;"| '''OK'''
+
<p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''</p>
|-
+
<p>'''&quot;/dev/ttyS9&quot;'''</p>
| style="text-align: left;"| '''PWM(40pin)'''
+
<p>Out: 0: -&gt; 0</p>
| style="text-align: left;"| '''OK'''
+
<p>Out: 1: -&gt; 1</p>
| style="text-align: left;"| '''OK'''
+
<p>Out: 2: -&gt; 2</p>
| style="text-align: left;"| '''OK'''
+
<p>Out: 3: -&gt; 3</p>
|-
+
<p>Out: 4:^C</p>
| style="text-align: left;"| '''PWM fan interface'''
+
<p>exit</p></li></ol>
| style="text-align: left;"| '''OK'''
+
</li></ol>
| style="text-align: left;"| '''OK'''
+
 
| style="text-align: left;"| '''OK'''
+
== 硬件看门狗测试 ==
|-
+
 
| style="text-align: left;"| '''3pin Debug serial port'''
+
Orange Pi发布的Linux系统中预装了watchdog_test程序,可以直接测试。
| style="text-align: left;"| '''OK'''
+
 
| style="text-align: left;"| '''OK'''
+
运行watchdog_test程序的方法如下所示:
| style="text-align: left;"| '''OK'''
+
 
|-
+
<ol style="list-style-type: lower-alpha;">
| style="text-align: left;"| '''EMMC'''
+
<li><p>第二个参数10表示看门狗的计数时间,如果这个时间内没有喂狗,系统会重启</p></li>
| style="text-align: left;"| '''OK'''
+
<li><p>我们可以通过按下键盘上的任意键(ESC除外)来喂狗,喂狗后,程序会打印一行keep alive表示喂狗成功</p>
| style="text-align: left;"| '''OK'''
+
<p>orangepi@orangepi:~$ '''sudo watchdog_test 10'''</p>
| style="text-align: left;"| '''OK'''
+
<p>open success</p>
|-
+
<p>options is 33152,identity is sunxi-wdt</p>
| style="text-align: left;"| '''TF card start'''
+
<p>put_usr return,if 0,success:0</p>
| style="text-align: left;"| '''OK'''
+
<p>The old reset time is: 16</p>
| style="text-align: left;"| '''OK'''
+
<p>return ENOTTY,if -1,success:0</p>
| style="text-align: left;"| '''OK'''
+
<p>return ENOTTY,if -1,success:0</p>
|-
+
<p>put_user return,if 0,success:0</p>
| style="text-align: left;"| '''HDMI Video'''
+
<p>put_usr return,if 0,success:0</p>
| style="text-align: left;"| '''OK'''
+
<p>keep alive</p>
| style="text-align: left;"| '''OK'''
+
<p>keep alive</p>
| style="text-align: left;"| '''OK'''
+
<p>keep alive</p></li></ol>
|-
+
 
| style="text-align: left;"| '''HDMI Audio'''
+
<span id="查看rk3566芯片的序列号"></span>
| style="text-align: left;"| '''OK'''
+
== 查看RK3566芯片的序列号 ==
| style="text-align: left;"| '''OK'''
+
 
| style="text-align: left;"| '''OK'''
+
查看RK3566芯片序列号的命令如下所示,每个芯片的序列号都是不同的,所以可以使用序列号来区分多个开发板。
|-
+
 
| style="text-align: left;"| '''Camera'''
+
orangepi@orangepi:~$ '''cat_serial.sh'''
| style="text-align: left;"| '''OK'''
+
 
| style="text-align: left;"| '''OK'''
+
Serial : '''8fa18eaf489041f0'''
| style="text-align: left;"| '''OK'''
+
 
|-
+
<span id="下载安装arm64版本balenaetcher的方法"></span>
| style="text-align: left;"| '''LCD'''
+
== 下载安装arm64版本balenaEtcher的方法 ==
| style="text-align: left;"| '''OK'''
+
 
| style="text-align: left;"| '''OK'''
+
<ol style="list-style-type: decimal;">
| style="text-align: left;"| '''OK'''
+
<li><p>balenaEtcher arm64版本的下载地址为:</p>
|-
+
<ol style="list-style-type: lower-alpha;">
| style="text-align: left;"| '''Edp Display'''
+
<li><p>deb安装包的下载地址如下所示,需要安装才能使用</p>
| style="text-align: left;"| '''OK'''
+
<p>[https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balena-etcher-electron_1.7.9+5945ab1f_arm64.deb '''https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balena-etcher-electron_1.7.9+5945ab1f_arm64.deb''']</p></li>
| style="text-align: left;"| '''OK'''
+
<li><p>无需安装的AppImage版本的下载地址如下所示:</p>
| style="text-align: left;"| '''OK'''
+
<p>[https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balenaEtcher-1.7.9+5945ab1f-arm64.AppImage '''https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balenaEtcher-1.7.9+5945ab1f-arm64.AppImage''']</p></li></ol>
|-
+
</li></ol>
| style="text-align: left;"| '''Gigabit Ethernet port'''
+
 
| style="text-align: left;"| '''OK'''
+
<div class="figure">
| style="text-align: left;"| '''OK'''
+
 
| style="text-align: left;"| '''OK'''
+
[[File:media/image278.png|527x211px|IMG_256]]
|-
+
 
| style="text-align: left;"| '''Network port status light'''
+
</div>
| style="text-align: left;"| '''OK'''
+
<ol start="2" style="list-style-type: decimal;">
| style="text-align: left;"| '''OK'''
+
<li><p>deb版本balenaEtcher的安装使用方法:</p>
| style="text-align: left;"| '''OK'''
+
<ol style="list-style-type: lower-alpha;">
|-
+
<li><p>deb版本的balenaEtcher安装命令如下所示:</p>
| style="text-align: left;"| '''headphone playback'''
+
<p>orangepi@orangepi:~$ '''sudo apt install -y \'''</p>
| style="text-align: left;"| '''OK'''
+
<p>'''--fix-broken ./balena-etcher-electron_1.7.9+5945ab1f_arm64.deb'''</p></li>
| style="text-align: left;"| '''OK'''
+
<li><p>deb版本的balenaEtcher安装完成后,在Application中就可以打开了</p>
| style="text-align: left;"| '''OK'''
+
<div class="figure">
|-
+
 
| style="text-align: left;"| '''headphone recording'''
+
[[File:media/image92.png|507x249px|IMG_256]]
| style="text-align: left;"| '''OK'''
+
 
| style="text-align: left;"| '''OK'''
+
</div></li>
| style="text-align: left;"| '''OK'''
+
<li><p>balenaEtcher打开后的界面如下所示:</p></li></ol>
|-
+
</li></ol>
| style="text-align: left;"| '''LED Light'''
+
 
| style="text-align: left;"| '''OK'''
+
<div class="figure">
| style="text-align: left;"| '''OK'''
+
 
| style="text-align: left;"| '''OK'''
+
[[File:media/image279.png|429x263px|IMG_256]]
|-
+
 
| style="text-align: left;"| '''RTC'''
+
</div>
| style="text-align: left;"| '''OK'''
+
<ol start="3" style="list-style-type: decimal;">
| style="text-align: left;"| '''OK'''
+
<li><p>AppImage版本的balenaEtcher的使用方法:</p>
| style="text-align: left;"| '''OK'''
+
<ol style="list-style-type: lower-alpha;">
|-
+
<li><p>首先给balenaEtcher添加权限</p>
| style="text-align: left;"| '''GPU'''
+
<p>orangepi@orangepi:~/Desktop$ '''chmod +x balenaEtcher-1.7.9+5945ab1f-arm64.AppImage'''</p></li>
| style="text-align: left;"| '''OK'''
+
<li><p>然后选中AppImage版本balenaEtcher,再点击鼠标右键,再点击Execute就可以打开balenaEtcher了</p>
| style="text-align: left;"| '''OK'''
+
<p>[[File:media/image280.png|145x118px]]</p></li></ol>
| style="text-align: left;"| '''OK'''
+
</li></ol>
|-
+
 
| style="text-align: left;"| '''NPU'''
+
<span id="宝塔linux面板的安装方法"></span>
| style="text-align: left;"| '''OK'''
+
== 宝塔Linux面板的安装方法 ==
| style="text-align: left;"| '''OK'''
+
 
| style="text-align: left;"| '''OK'''
+
'''宝塔Linux面板是提升运维效率的服务器管理软件,支持一键LAMP/LNMP/集群/监控/网站/FTP/数据库/JAVA等100多项服务器管理功能(摘抄自[https://www.bt.cn/ 宝塔官网])'''
|-
+
 
| style="text-align: left;"| '''VPU'''
+
<ol style="list-style-type: decimal;">
| style="text-align: left;"| '''OK'''
+
<li><p>首先需要扩展下'''/tmp'''空间的大小,设置完后需要'''重启下开发板的linux系统''',命令如下所示:</p>
| style="text-align: left;"| '''OK'''
+
<p>orangepi@orangepi:~$ '''sudo sed -i 's/nosuid/&amp;,size=2G/' /etc/fstab'''</p>
| style="text-align: left;"| '''OK'''
+
<p>orangepi@orangepi:~$ '''sudo reboot'''</p></li>
|-
+
<li><p>重启后,可以看到'''/tmp'''空间的大小变为2G了</p>
| style="text-align: left;"| '''watchdog test'''
+
<p>orangepi@orangepi:~$ '''df -h | grep &quot;/tmp&quot;'''</p>
| style="text-align: left;"| '''OK'''
+
<p>tmpfs 2.0G 12K '''2.0G''' 1% /tmp</p></li>
| style="text-align: left;"| '''OK'''
+
<li><p>然后在Linux系统中输入下面的命令就可以开始宝塔的安装</p>
| style="text-align: left;"| '''OK'''
+
<p>orangepi@orangepi:~$ '''sudo install_bt_panel.sh'''</p></li>
|-
+
<li><p>然后宝塔安装程序会提醒是否安装'''Bt-Panel''''''/www'''文件夹,此时输入'''y'''即可</p>
| style="text-align: left;"| '''Chromium Hard solution video'''
+
<p>+----------------------------------------------------------------------</p>
| style="text-align: left;"| '''OK'''
+
<p>| Bt-WebPanel FOR CentOS/Ubuntu/Debian</p>
| style="text-align: left;"| '''OK'''
+
<p>+----------------------------------------------------------------------</p>
| style="text-align: left;"| '''OK'''
+
<p>| Copyright © 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved.</p>
|}
+
<p>+----------------------------------------------------------------------</p>
 +
<p>| The WebPanel URL will be http://SERVER_IP:8888 when installed.</p>
 +
<p>+----------------------------------------------------------------------</p>
 +
<p>Do you want to install Bt-Panel to the /www directory now?(y/n): '''y'''</p></li>
 +
<li><p>然后要做的就是耐心等待,当看到终端输出下面的打印信息时,说明宝塔已经安装完成,整个安装过程大约耗时34分钟,根据网络速度的不同可能会有一些差别</p>
 +
<p>[[File:media/image281.png|576x233px]]</p></li>
 +
<li><p>此时在浏览器中输入上面显示的'''面板地址'''就可以打开宝塔Linux面板的登录界面,然后在对应的位置输入上图显示的'''username''''''password'''就可以登录进宝塔<br />
 +
[[File:media/image282.png|575x281px]]</p></li>
 +
<li><p>成功登录宝塔后的会弹出下面的欢迎界面,首先请将中间的用户须知阅读完拖到最下面,然后就可以选择”我已同意并阅读《用户协议》“,接着点击”进入面板”就可以进入宝塔了</p>
 +
<p>[[File:media/image283.png|575x317px]]</p></li>
 +
<li><p>进入宝塔后首先会提示需要绑定宝塔官网的账号,如果没有账号可以去宝塔的官网('''https://www.bt.cn''')注册一个</p>
 +
<p>[[File:media/image284.png|576x300px]]</p></li>
 +
<li><p>最终显示的界面如下图所示,可以很直观的看到开发板Linux系统的一些状态信息,比如负载状态、CPU的使用率、内存使用率和存储空间的使用情况等</p>
 +
<p>[[File:media/image285.png|575x306px]]</p></li>
 +
<li><p>宝塔的更多功能可以参考下面资料自行探索</p>
 +
<p>使用手册:[http://docs.bt.cn '''http://docs.bt.cn''']</p>
 +
<p>论坛地址:[https://www.bt.cn/bbs '''https://www.bt.cn/bbs''']</p>
 +
<p>GitHub链接:'''https://github.com/aaPanel/BaoTa'''</p></li></ol>
 +
 
 +
== 设置中文环境以及安装中文输入法 ==
 +
 
 +
'''注意,安装中文输入法前请确保开发板使用的Linux系统为桌面版系统。'''
 +
 
 +
<span id="debian系统的安装方法"></span>
 +
=== Debian系统的安装方法 ===
 +
 
 +
<ol style="list-style-type: decimal;">
 +
<li><p>首先设置默认'''locale'''为中文</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>输入下面的命令可以开始配置'''locale'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''</p></li>
 +
<li><p>然后在弹出的界面中选择'''zh_CN.UTF-8 &gt; UTF-8'''(通过键盘上的上下方向按键来上下移动,通过空格键来选择,最后通过Tab键可以将光标移动到'''&lt;OK&gt;''',然后回车即可)</p>
 +
<p>[[File:media/image286.png|575x296px]]</p></li>
 +
<li><p>然后设置默认'''locale''''''zh_CN.UTF-8'''</p>
 +
<p>[[File:media/image287.png|575x160px]]</p></li>
 +
<li><p>退出界面后就会开始'''locale'''的设置,命令行显示的输出如下所示</p>
 +
<p>orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''</p>
 +
<p>Generating locales (this might take a while)...</p>
 +
<p>en_US.UTF-8... done</p>
 +
<p>zh_CN.UTF-8... done</p>
 +
<p>Generation complete.</p></li></ol>
 +
</li>
 +
<li><p>然后打开'''Input Method'''</p>
 +
<p>[[File:media/image288.png|575x361px]]</p></li>
 +
<li><p>然后选择'''OK'''</p>
 +
<p>[[File:media/image289.png|295x212px]]</p></li>
 +
<li><p>然后选择'''Yes'''</p>
 +
<p>[[File:media/image290.png|303x192px]]</p></li>
 +
<li><p>然后选择'''fcitx'''</p>
 +
<p>[[File:media/image291.png|307x220px]]</p></li>
 +
<li><p>然后选择'''OK'''</p>
 +
<p>[[File:media/image292.png|305x216px]]</p></li>
 +
<li><p>'''然后重启Linux系统才能使配置生效'''</p></li>
 +
<li><p>然后打开'''Fcitx configuration'''</p>
 +
<p>[[File:media/image293.png|575x376px]]</p></li>
 +
<li><p>然后点击下图所示位置的'''+'''号</p>
 +
<p>[[File:media/image294.png|280x187px]]</p></li>
 +
<li><p>然后搜索'''Google Pinyin'''再点击'''OK'''</p>
 +
<p>[[File:media/image295.png|291x196px]]</p></li>
 +
<li><p>然后将'''Google Pinyin'''放到最前面</p>
 +
<p>[[File:media/image296.png|299x202px]]</p>
 +
<p>[[File:media/image297.png|300x202px]]</p></li>
 +
<li><p>然后打开'''Geany'''这个编辑器测试下中文输入法</p>
 +
<p>[[File:media/image298.png|349x212px]]</p></li>
 +
<li><p>中文输入法测试如下所示</p>
 +
<p>[[File:media/image299.png|575x325px]]</p></li>
 +
<li><p>通过'''Ctrl+Space'''快捷键可以切换中英文输入法</p></li>
 +
<li><p>如果需要整个系统都显示为中文,可以将'''/etc/default/locale'''中的变量都设置为'''zh_CN.UTF-8'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo vim /etc/default/locale'''</p>
 +
<p># File generated by update-locale</p>
 +
<p>LC_MESSAGES='''zh_CN.UTF-8'''</p>
 +
<p>LANG='''zh_CN.UTF-8'''</p>
 +
<p>LANGUAGE='''zh_CN.UTF-8'''</p></li>
 +
<li><p>然后'''重启系统'''就能看到系统显示为中文了</p>
 +
<p>[[File:media/image300.png|576x356px]]</p></li></ol>
 +
 
 +
<span id="ubuntu-20.04系统的安装方法"></span>
 +
=== Ubuntu 20.04系统的安装方法 ===
 +
 
 +
<ol style="list-style-type: decimal;">
 +
<li><p>首先打开'''Language Support'''</p>
 +
<p>[[File:media/image301.png|575x351px]]</p></li>
 +
<li><p>然后找到'''汉语(中国)'''选项</p>
 +
<p>[[File:media/image302.png|318x311px]]</p></li>
 +
<li><p>然后请使用鼠标左键选中'''汉语(中国)'''并按住不动,然后往上将其拖到最开始的位置,拖完后的显示如下图所示:</p>
 +
<p>[[File:media/image303.png|324x320px]]</p></li></ol>
 +
 
 +
'''注意,这一步不是很好拖动的,请耐心多试几次。'''
 +
 
 +
<ol start="4" style="list-style-type: decimal;">
 +
<li><p>然后选择'''Apply System-Wide'''将中文设置应用到整个系统</p>
 +
<p>[[File:media/image304.png|321x316px]]</p></li>
 +
<li><p>然后设置'''Keyboard input method system'''为'''fcitx'''</p>
 +
<p>[[File:media/image305.png|327x320px]]</p></li>
 +
<li><p>'''然后重启Linux系统使配置生效'''</p></li>
 +
<li><p>重新进入系统后,在下面的界面请选择'''不要再次询问我''',然后请根据自己的喜好决定标准文件夹是否也要更新为中文</p>
 +
<p>[[File:media/image306.png|303x247px]]</p></li>
 +
<li><p>然后可以看到桌面都显示为中文了</p>
 +
<p>[[File:media/image307.png|575x383px]]</p></li>
 +
<li><p>然后我们可以打开'''Geany'''测试下中文输入法,打开方式如下图所示</p>
 +
<p>[[File:media/image308.png|576x292px]]</p></li>
 +
<li><p>打开'''Geany'''后,默认还是英文输入法,我们可以通过'''Ctrl+Space'''快捷键来切换成中文输入法,然后就能输入中文了</p>
 +
<p>[[File:media/image309.png|575x308px]]</p></li></ol>
 +
 
 +
<span id="ubuntu-22.04系统的安装方法"></span>
 +
=== Ubuntu 22.04系统的安装方法 ===
 +
 
 +
<ol style="list-style-type: decimal;">
 +
<li><p>首先打开'''Language Support'''</p>
 +
<p>[[File:media/image301.png|575x351px]]</p></li>
 +
<li><p>然后找到'''汉语(中国)'''选项</p>
 +
<p>[[File:media/image310.png|335x326px]]</p></li>
 +
<li><p>然后请使用鼠标左键选中'''汉语(中国)'''并按住不动,然后往上将其拖到最开始的位置,拖完后的显示如下图所示:</p>
 +
<p>[[File:media/image311.png|337x331px]]</p></li></ol>
 +
 
 +
'''注意,这一步不是很好拖动的,请耐心多试几次。'''
 +
 
 +
<ol start="4" style="list-style-type: decimal;">
 +
<li><p>然后选择'''Apply System-Wide'''将中文设置应用到整个系统</p>
 +
<p>[[File:media/image312.png|336x330px]]</p></li>
 +
<li><p>'''然后重启Linux系统使配置生效'''</p></li>
 +
<li><p>重新进入系统后,在下面的界面请选择'''不要再次询问我''',然后请根据自己的喜好决定标准文件夹是否也要更新为中文</p>
 +
<p>[[File:media/image306.png|303x247px]]</p></li>
 +
<li><p>然后可以看到桌面都显示为中文了</p>
 +
<p>[[File:media/image307.png|575x383px]]</p></li>
 +
<li><p>然后打开Fcitx5配置程序</p>
 +
<p>[[File:media/image313.png|575x349px]]</p></li>
 +
<li><p>然后选择使用拼音输入法</p>
 +
<p>[[File:media/image314.png|366x289px]]</p></li>
 +
<li><p>选择后的界面如下所示,再点击确定即可</p>
 +
<p>[[File:media/image315.png|366x290px]]</p></li>
 +
<li><p>然后我们可以打开'''Geany'''测试下中文输入法,打开方式如下图所示</p>
 +
<p>[[File:media/image308.png|576x292px]]</p></li>
 +
<li><p>打开'''Geany'''后,默认还是英文输入法,我们可以通过'''Ctrl+Space'''快捷键来切换成中文输入法,然后就能输入中文了</p>
 +
<p>[[File:media/image316.png|576x408px]]</p></li></ol>
 +
 
 +
<span id="远程登录linux系统桌面的方法"></span>
 +
== 远程登录Linux系统桌面的方法 ==
 +
 
 +
'''Ubuntu Gnome Wayland镜像不支持使用此处介绍的Nomachine和VNC来远程登录桌面。'''
 +
 
 +
<span id="使用nomachine远程登录"></span>
 +
=== 使用NoMachine远程登录 ===
 +
 
 +
'''请确保开发板安装的Ubuntu或者Debian系统为桌面版本的系统。另外NoMachine也提供了详细的使用文档,强烈建议通读此文档来熟悉NoMachine的使用,文档链接如下所示:'''
 +
 
 +
'''https://knowledgebase.nomachine.com/DT10R00166'''
 +
 
 +
'''NoMachine支持Windows、Mac、Linux、iOS和安卓平台,所以我们可以在多种设备上通过NoMachine来远程登录控制Orange Pi开发板。下面演示下在Windows中通过NoMachine来远程登录Orange Pi开发板的Linux系统桌面。其他平台的安装方法请参考下NoMachine的官方文档。'''
 +
 
 +
'''操作前请先确保Windwos电脑和开发板在同一局域网内,并且能正常ssh登录开发板的Ubuntu或者Debian系统。'''
 +
 
 +
<ol style="list-style-type: decimal;">
 +
<li><p>首先下载NoMachine软件Linux '''arm64''' deb版本的安装包,然后安装到开发板的Linux系统中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li>由于RK3566是ARMv8架构的SOC,我们使用的系统为Ubuntu或者Debian,所以这里需要下载'''NoMachine &gt; for ARM ARMv8 DEB'''安装包,下载链接如下所示:</li></ol>
 +
</li></ol>
 +
 
 +
'''注意,这个下载链接可能会变,请认准Armv8/Arm64版本的deb包。'''
 +
 
 +
[https://www.nomachine.com/download/download&id=112&s=ARM '''https://downloads.nomachine.com/download/?id=118&amp;distro=ARM''']
 +
 
 +
[[File:media/image317.png|575x227px]]
 +
 
 +
<ol start="2" style="list-style-type: lower-alpha;">
 +
<li><p>另外在'''官方工具'''中也可以下载到'''NoMachine'''的安装包</p>
 +
<p>[[File:media/image318.png|86x106px]]</p>
 +
<p>先进入'''远程登录软件-NoMachine'''文件夹</p>
 +
<p>[[File:media/image319.png|256x46px]]</p>
 +
<p>然后下载arm64版本的deb安装包</p>
 +
<p>[[File:media/image320.png|180x109px]]</p></li>
 +
<li><p>然后将下载的'''nomachine_x.x.x_x_arm64.deb'''上传到开发板的Linux系统中</p></li>
 +
<li><p>然后使用下面的命令在开发板的Linux系统中安装'''NoMachine'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo dpkg -i nomachine_x.x.x_x_arm64_arm64.deb'''</p></li></ol>
 +
 
 +
<!-- -->
 +
<ol start="2" style="list-style-type: decimal;">
 +
<li>然后下载NoMachine软件Windows版本的安装包,下载地址如下所示</li></ol>
 +
 
 +
'''注意,这个下载链接可能会变。'''
 +
 
 +
'''https://downloads.nomachine.com/download/?id=9'''
 +
 
 +
[[File:media/image321.png|575x163px]]
 +
 
 +
<ol start="3" style="list-style-type: decimal;">
 +
<li><p>然后在Windows中安装NoMachine,'''安装完后请重启下电脑'''</p></li>
 +
<li><p>然后在Window中打开'''NoMachine'''</p>
 +
<p>[[File:media/image322.png|76x66px]]</p></li>
 +
<li><p>NoMachine启动后会自动扫描局域网内其他安装有NoMachine的设备,进入NoMachine的主界面后就可以看到开发板已经在可连接的设备列表里了,然后点击下图红色方框所示的位置即可开始登录开发板的Linux系统桌面</p>
 +
<p>[[File:media/image323.png|321x92px]]</p></li>
 +
<li><p>然后点击'''OK'''</p>
 +
<p>[[File:media/image324.png|402x275px]]</p></li>
 +
<li><p>然后在下图对应的位置输入开发板Linux系统的用户名和密码,再点击'''OK'''开始登陆</p>
 +
<p>[[File:media/image325.png|406x274px]]</p></li>
 +
<li><p>然后在接下来的界面中都点击OK</p></li>
 +
<li><p>最后就能看到开发板Linux系统的桌面了</p>
 +
<p>[[File:media/image326.png|411x246px]]</p></li></ol>
  
<span id="the-format-of-linux-commands-in-this-manual"></span>
+
<span id="使用vnc远程登录"></span>
== The format of Linux commands in this manual ==
+
=== 使用VNC远程登录 ===
  
# In this manual, all commands that need to be entered in the Linux system will be marked with the following box
+
'''操作前请先确保Windwos电脑和开发板在同一局域网内,并且能正常ssh登录开发板的Ubuntu或者Debian系统。'''
  
As shown below, the content in the yellow box indicates the content that needs special attention, except for the commands in it.
+
'''Ubuntu20.04测试VNC很多问题,请不要使用这种方法。'''
  
<ol start="2" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li><p>Description of the prompt type in front of the command</p>
+
<li><p>首先运行'''set_vnc.sh'''脚本设置下vnc,'''记得加sudo权限'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo set_vnc.sh'''</p>
 +
<p>You will require a password to access your desktops.</p>
 +
<p>Password: '''#在这里设置vnc的密码,8位字符'''</p>
 +
<p>Verify: '''#在这里设置vnc的密码,8位字符'''</p>
 +
<p>Would you like to enter a view-only password (y/n)? '''n'''</p>
 +
<p>xauth: file /root/.Xauthority does not exist</p>
 +
<p>New 'X' desktop is orangepi3b:1</p>
 +
<p>Creating default startup script /root/.vnc/xstartup</p>
 +
<p>Starting applications specified in /root/.vnc/xstartup</p>
 +
<p>Log file is /root/.vnc/orangepi3b:1.log</p>
 +
<p>Killing Xtightvnc process ID 3047</p>
 +
<p>New 'X' desktop is orangepi3b:1</p>
 +
<p>Starting applications specified in /root/.vnc/xstartup</p>
 +
<p>Log file is /root/.vnc/orangepi3b:1.log</p></li>
 +
<li><p>使用MobaXterm软件连接开发板Linux系统桌面的步骤如下所示:</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>The prompt in front of the command refers to the content of the red part in the box below, which is not part of the Linux command, so when entering the command in the Linux system, please do not enter the content of the red font part</li></ol>
+
<li>首先点击Session,然后选择VNC,再填写开发板的IP地址和端口,最后点击OK确认</li></ol>
 
</li></ol>
 
</li></ol>
  
'''orangepi@orangepi:~$ sudo apt update'''
+
[[File:media/image327.png|576x410px]]
  
'''root@orangepi:~#''' '''vim /boot/boot.cmd'''
+
<ol start="2" style="list-style-type: lower-alpha;">
 +
<li><p>然后输入前面设置的VNC的密码</p>
 +
<p>[[File:media/image328.png|274x131px]]</p></li>
 +
<li><p>登录成功后的界面显示如下图所示,然后就可以远程操作开发板Linux系统的桌面了</p>
 +
<p>[[File:media/image329.png|405x293px]]</p></li></ol>
 +
 
 +
<span id="linux系统支持的部分编程语言测试"></span>
 +
== Linux系统支持的部分编程语言测试 ==
 +
 
 +
<span id="debian-bullseye系统"></span>
 +
=== Debian Bullseye系统 ===
 +
 
 +
<ol style="list-style-type: decimal;">
 +
<li><p>Debian Bullseye默认安装有gcc编译工具链,可以直接在开发板的Linux系统中编译C语言的程序</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>gcc的版本如下所示</p>
 +
<p>orangepi@orangepi:~$ '''gcc --version'''</p>
 +
<p>gcc (Debian 10.2.1-6) 10.2.1 20210110</p>
 +
<p>Copyright (C) 2020 Free Software Foundation, Inc.</p>
 +
<p>This is free software; see the source for copying conditions. There is NO</p>
 +
<p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p></li>
 +
<li><p>编写C语言的'''hello_world.c'''程序</p>
 +
<p>orangepi@orangepi:~$ '''vim hello_world.c'''</p>
 +
<p>#include &lt;stdio.h&gt;</p>
 +
<p>int main(void)</p>
 +
<p>{</p>
 +
<p>printf(&quot;Hello World!\n&quot;);</p>
 +
<p>return 0;</p>
 +
<p>}</p></li>
 +
<li><p>然后编译运行'''hello_world.c'''</p>
 +
<p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p>
 +
<p>orangepi@orangepi:~$ '''./hello_world'''</p>
 +
<p>Hello World!</p></li></ol>
 +
</li>
 +
<li><p>Debian Bullseye默认安装有Python3</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>Python具体版本如下所示</p>
 +
<p>orangepi@orangepi:~$ '''python3'''</p>
 +
<p>'''Python 3.9.2''' (default, Feb 28 2021, 17:03:44)</p>
 +
<p>[GCC 10.2.1 20210110] on linux</p>
 +
<p>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</p>
 +
<p>&gt;&gt;&gt;</p></li>
 +
<li><p>编写Python语言的'''hello_world.py'''程序</p>
 +
<p>orangepi@orangepi:~$ '''vim hello_world.py'''</p>
 +
<p>print('Hello World!')</p></li>
 +
<li><p>运行'''hello_world.py'''的结果如下所示</p>
 +
<p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p>
 +
<p>Hello World!</p></li></ol>
 +
</li>
 +
<li><p>Debian Bullseye默认没有安装Java的编译工具和运行环境</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>可以使用下面的命令安装openjdk,Debian &gt; Bullseye中最新版本为openjdk-17</p>
 +
<p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p></li>
 +
<li><p>安装完后可以查看下Java的版本</p>
 +
<p>orangepi@orangepi:~$ '''java --version'''</p></li>
 +
<li><p>编写Java版本的'''hello_world.java'''</p>
 +
<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p>
 +
<p>public class hello_world</p>
 +
<p>{</p>
 +
<p>public static void main(String[] args)</p>
 +
<p>{</p>
 +
<p>System.out.println(&quot;Hello World!&quot;);</p>
 +
<p>}</p>
 +
<p>}</p></li>
 +
<li><p>然后编译运行'''hello_world.java'''</p>
 +
<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p>
 +
<p>orangepi@orangepi:~$ '''java hello_world'''</p>
 +
<p>Hello World!</p></li></ol>
 +
</li></ol>
  
'''test@test:~$ ssh [mailto:root@192.168.1.36 root@192.168.1.]xxx'''
+
<span id="ubuntu-focal系统"></span>
 +
=== Ubuntu Focal系统 ===
  
'''root@test:~# ls'''
+
<ol style="list-style-type: decimal;">
 +
<li><p>Ubuntu Focal默认安装有gcc编译工具链,可以直接在开发板的Linux系统中编译C语言的程序</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>gcc的版本如下所示</p>
 +
<p>orangepi@orangepi:~$ '''gcc --version'''</p>
 +
<p>gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0</p>
 +
<p>Copyright (C) 2019 Free Software Foundation, Inc.</p>
 +
<p>This is free software; see the source for copying conditions. There is NO</p>
 +
<p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p></li>
 +
<li><p>编写C语言的'''hello_world.c'''程序</p>
 +
<p>orangepi@orangepi:~$ '''vim hello_world.c'''</p>
 +
<p>#include &lt;stdio.h&gt;</p>
 +
<p>int main(void)</p>
 +
<p>{</p>
 +
<p>printf(&quot;Hello World!\n&quot;);</p>
 +
<p>return 0;</p>
 +
<p>}</p></li>
 +
<li><p>然后编译运行'''hello_world.c'''</p>
 +
<p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p>
 +
<p>orangepi@orangepi:~$ '''./hello_world'''</p>
 +
<p>Hello World!</p></li></ol>
 +
</li>
 +
<li><p>Ubuntu Focal默认安装有Python3</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>Python3具体版本如下所示</p>
 +
<p>orangepi@orangepi:~$ '''python3'''</p>
 +
<p>Python 3.8.10 (default, Nov 14 2022, 12:59:47)</p>
 +
<p>[GCC 9.4.0] on linux</p>
 +
<p>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</p>
 +
<p>&gt;&gt;&gt;</p></li>
 +
<li><p>编写Python语言的'''hello_world.py'''程序</p>
 +
<p>orangepi@orangepi:~$ '''vim hello_world.py'''</p>
 +
<p>print('Hello World!')</p></li>
 +
<li><p>运行'''hello_world.py'''的结果如下所示</p>
 +
<p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p>
 +
<p>Hello World!</p></li></ol>
 +
</li>
 +
<li><p>Ubuntu Focal默认没有安装Java的编译工具和运行环境</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>可以使用下面的命令安装openjdk-17</p>
 +
<p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p></li>
 +
<li><p>安装完后可以查看下Java的版本</p>
 +
<p>orangepi@orangepi:~$ '''java --version'''</p>
 +
<p>openjdk 17.0.2 2022-01-18</p>
 +
<p>OpenJDK Runtime Environment (build 17.0.2+8-Ubuntu-120.04)</p>
 +
<p>OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)</p></li>
 +
<li><p>编写Java版本的'''hello_world.java'''</p>
 +
<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p>
 +
<p>public class hello_world</p>
 +
<p>{</p>
 +
<p>public static void main(String[] args)</p>
 +
<p>{</p>
 +
<p>System.out.println(&quot;Hello World!&quot;);</p>
 +
<p>}</p>
 +
<p>}</p></li>
 +
<li><p>然后编译运行'''hello_world.java'''</p>
 +
<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p>
 +
<p>orangepi@orangepi:~$ '''java hello_world'''</p>
 +
<p>Hello World!</p></li></ol>
 +
</li></ol>
  
<ol start="2" style="list-style-type: lower-alpha;">
+
<span id="ubuntu-jammy系统"></span>
<li><p>'''root@orangepi:~$''' The prompt indicates that this command is entered in '''the Linux system of the development board'''. The $ at the end of the prompt indicates that the current user of the system is a normal user. When executing a privileged command, you need to add '''sudo'''</p></li>
+
=== Ubuntu Jammy系统 ===
<li><p>'''root@orangepi:~#''' The prompt indicates that this command is entered in the Linux system of the development board, and the # at the end of the prompt indicates that the current user of the system is the root user, who can execute any desired command</p></li>
 
<li><p>'''test@test:~$''' The prompt indicates that this command is entered in the Ubuntu PC or Ubuntu virtual machine, not in the Linux system of the development board. The $ at the end of the prompt indicates that the current user of the system is an ordinary user. When executing privileged commands, sudo needs to be added '''sudo'''</p></li>
 
<li><p>'''root@test:~#''' The prompt indicates that this command is entered in the Ubuntu PC or Ubuntu virtual machine, not in the Linux system of the development board. The # at the end of the prompt indicates that the current user of the system is the root user and can execute any command you want</p></li></ol>
 
  
<!-- -->
+
<ol style="list-style-type: decimal;">
<ol start="3" style="list-style-type: decimal;">
+
<li><p>Ubuntu Jammy默认安装有gcc编译工具链,可以直接在开发板的Linux系统中编译C语言的程序</p>
<li><p>What are the commands that need to be entered?</p>
+
<ol style="list-style-type: lower-alpha;">
 +
<li><p>gcc的版本如下所示</p>
 +
<p>orangepi@orangepi:~$ '''gcc --version'''</p>
 +
<p>gcc (Ubuntu 11.2.0-19ubuntu1) '''11.2.0'''</p>
 +
<p>Copyright (C) 2021 Free Software Foundation, Inc.</p>
 +
<p>This is free software; see the source for copying conditions. There is NO</p>
 +
<p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p></li>
 +
<li><p>编写C语言的'''hello_world.c'''程序</p>
 +
<p>orangepi@orangepi:~$ '''vim hello_world.c'''</p>
 +
<p>#include &lt;stdio.h&gt;</p>
 +
<p>int main(void)</p>
 +
<p>{</p>
 +
<p>printf(&quot;Hello World!\n&quot;);</p>
 +
<p>return 0;</p>
 +
<p>}</p></li>
 +
<li><p>然后编译运行'''hello_world.c'''</p>
 +
<p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p>
 +
<p>orangepi@orangepi:~$ '''./hello_world'''</p>
 +
<p>Hello World!</p></li></ol>
 +
</li>
 +
<li><p>Ubuntu Jammy默认安装有Python3</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>Python3具体版本如下所示</p>
 +
<p>orangepi@orangepi:~$ '''python3'''</p>
 +
<p>Python '''3.10.4''' (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] on linux</p>
 +
<p>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</p>
 +
<p>&gt;&gt;&gt;</p></li>
 +
<li><p>编写Python语言的'''hello_world.py'''程序</p>
 +
<p>orangepi@orangepi:~$ '''vim hello_world.py'''</p>
 +
<p>print('Hello World!')</p></li>
 +
<li><p>运行'''hello_world.py'''的结果如下所示</p>
 +
<p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p>
 +
<p>Hello World!</p></li></ol>
 +
</li>
 +
<li><p>Ubuntu Jammy默认没有安装Java的编译工具和运行环境</p>
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li>As shown below, '''the black bold part''' is the command that needs to be input, and the content below the command is the output content (some commands have output, some may not), and this part of the content does not need to be input</li></ol>
+
<li><p>可以使用下面的命令安装openjdk-18</p>
 +
<p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-18-jdk'''</p></li>
 +
<li><p>安装完后可以查看下Java的版本</p>
 +
<p>orangepi@orangepi:~$ '''java --version'''</p>
 +
<p>openjdk 18-ea 2022-03-22</p>
 +
<p>OpenJDK Runtime Environment (build 18-ea+36-Ubuntu-1)</p>
 +
<p>OpenJDK 64-Bit Server VM (build 18-ea+36-Ubuntu-1, mixed mode, sharing)</p></li>
 +
<li><p>编写Java版本的'''hello_world.java'''</p>
 +
<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p>
 +
<p>public class hello_world</p>
 +
<p>{</p>
 +
<p>public static void main(String[] args)</p>
 +
<p>{</p>
 +
<p>System.out.println(&quot;Hello World!&quot;);</p>
 +
<p>}</p>
 +
<p>}</p></li>
 +
<li><p>然后编译运行'''hello_world.java'''</p>
 +
<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p>
 +
<p>orangepi@orangepi:~$ '''java hello_world'''</p>
 +
<p>Hello World!</p></li></ol>
 
</li></ol>
 
</li></ol>
  
root@orangepi:~# '''cat /boot/orangepiEnv.txt'''
+
<span id="qt的安装方法"></span>
 +
== QT的安装方法 ==
  
'''verbosity=7'''
+
<ol style="list-style-type: decimal;">
 +
<li><p>使用下面的脚本可以安装QT5和QT Creator</p>
 +
<p>orangepi@orangepi:~$ '''install_qt.sh'''</p></li>
 +
<li><p>安装完后会自动打印QT的版本号</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>Ubuntu20.04自带的qt版本为'''5.12.8'''</p>
 +
<p>orangepi@orangepi:~$ '''install_qt.sh'''</p>
 +
<p>......</p>
 +
<p>QMake version 3.1</p>
 +
<p>Using Qt version '''5.12.8''' in /usr/lib/aarch64-linux-gnu</p></li>
 +
<li><p>Ubuntu22.04自带的QT版本为'''5.15.3'''</p>
 +
<p>orangepi@orangepi:~$ '''install_qt.sh'''</p>
 +
<p>......</p>
 +
<p>QMake version 3.1</p>
 +
<p>Using Qt version '''5.15.3''' in /usr/lib/aarch64-linux-gnu</p></li>
 +
<li><p>Debian11自带的QT版本为'''5.15.2'''</p>
 +
<p>orangepi@orangepi:~$ '''install_qt.sh'''</p>
 +
<p>......</p>
 +
<p>QMake version 3.1</p>
 +
<p>Using Qt version '''5.15.2''' in /usr/lib/aarch64-linux-gnu</p></li>
 +
<li><p>Debian12自带的QT版本为'''5.15.8'''</p>
 +
<p>orangepi@orangepi:~$ '''install_qt.sh'''</p>
 +
<p>......</p>
 +
<p>QMake version 3.1</p>
 +
<p>Using Qt version '''5.15.8''' in /usr/lib/aarch64-linux-gnu</p></li></ol>
 +
</li>
 +
<li><p>然后在'''Applications'''中就可以看到QT Creator的启动图标</p>
 +
<p>[[File:media/image330.png|576x270px]]</p>
 +
<p>也可以使用下面的命令打开QT Creator</p>
 +
<p>orangepi@orangepi:~$ '''qtcreator'''</p>
 +
<p>'''在QT和QT应用的启动过程中,如果提示下面的错误,请直接忽略,此错误对应用的运行不会有影响。'''</p>
 +
<p>'''libGL error: failed to create dri screen'''</p>
 +
<p>'''libGL error: failed to load driver: rockchip'''</p>
 +
<p>'''libGL error: failed to create dri screen'''</p>
 +
<p>'''libGL error: failed to load driver: rockchip'''</p></li>
 +
<li><p>QT Creator打开后的界面如下所示</p>
 +
<p>[[File:media/image331.png|418x222px]]</p></li>
 +
<li><p>QT Creator的版本如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>QT Creator在'''Ubuntu20.04'''中的默认版本如下所示</p>
 +
<p>[[File:media/image332.png|419x224px]]</p></li>
 +
<li><p>QT Creator在'''Ubuntu22.04'''中的默认版本如下所示</p>
 +
<p>[[File:media/image333.png|443x237px]]</p></li>
 +
<li><p>QT Creator在'''Debian11'''中的默认版本如下所示</p>
 +
<p>[[File:media/image334.png|444x238px]]</p></li>
 +
<li><p>QT Creator在'''Debian12'''中的默认版本如下所示</p>
 +
<p>[[File:media/image335.png|449x277px]]</p></li></ol>
 +
</li>
 +
<li><p>然后设置下QT</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先打开'''Help'''-&gt;'''About Plugins...'''</p>
 +
<p>[[File:media/image336.png|573x164px]]</p></li>
 +
<li><p>然后去掉'''ClangCodeModel'''的那个勾</p>
 +
<p>[[File:media/image337.png|408x254px]]</p></li>
 +
<li><p>'''设置完后需要重启下QT Creator'''</p></li>
 +
<li><p>然后确保QT Creator使用的GCC编译器,如果默认为Clang,请修改为GCC</p>
 +
<p>'''Debian12请跳过这步。'''</p>
 +
<p>[[File:media/image338.png|576x315px]]</p>
 +
<p>[[File:media/image339.png|575x307px]]</p></li></ol>
 +
</li>
 +
<li><p>然后就可以打开一个示例代码</p>
 +
<p>[[File:media/image340.png|575x312px]]</p></li>
 +
<li><p>点击示例代码后会自动打开对应的说明文档,可以仔细看下其中的使用说明</p>
 +
<p>[[File:media/image341.png|576x218px]]</p></li>
 +
<li><p>然后点击下'''Configure Project'''</p>
 +
<p>[[File:media/image342.png|575x304px]]</p></li>
 +
<li><p>然后点击左下角的绿色三角形编译运行下示例代码</p>
 +
<p>[[File:media/image343.png|575x312px]]</p></li>
 +
<li><p>等待一段时间后,会弹出下图所示的界面,此时就说明QT能正常编译运行</p>
 +
<p>[[File:media/image344.png|576x308px]]</p></li>
 +
<li><p>参考资料</p>
 +
<p>[https://wiki.qt.io/Install_Qt_5_on_Ubuntu '''https://wiki.qt.io/Install_Qt_5_on_Ubuntu''']</p>
 +
<p>[https://download.qt.io/archive/qtcreator '''https://download.qt.io/archive/qtcreator''']</p>
 +
<p>[https://download.qt.io/archive/qt '''https://download.qt.io/archive/qt''']</p></li></ol>
  
bootlogo=false
+
<span id="ros安装方法"></span>
 +
== ROS安装方法 ==
  
'''console=serial'''
+
<span id="ubuntu20.04安装ros-1-noetic的方法"></span>
 +
=== Ubuntu20.04安装ROS 1 Noetic的方法 ===
  
<ol start="2" style="list-style-type: lower-alpha;">
+
# ROS 1当前活跃的版本如下所示,推荐版本为'''Noetic Ninjemys'''
<li>As shown below, some commands cannot be written in one line and will be placed on the next line. As long as the black and bold parts are all commands that need to be input. When these commands are entered into one line, the last &quot;\&quot; of each line needs to be removed, this is not part of the command. In addition, there are spaces in different parts of the command, please don’t miss it</li></ol>
 
  
orangepi@orangepi:~$ '''echo \'''
+
[[File:media/image345.png|345x235px]]
  
'''&quot;deb [arch=$(dpkg --print-architecture) \'''
+
[[File:media/image346.png|576x210px]]
  
'''signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \'''
+
[http://docs.ros.org/ '''http://docs.ros.org''']
  
'''https://download.docker.com/Linux/debian \'''
+
'''https://wiki.ros.org/Distributions'''
  
'''$(lsb_release -cs) stable&quot; | sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null'''
+
<ol start="2" style="list-style-type: decimal;">
 +
<li><p>ROS 1 '''Noetic Ninjemys'''官方安装文档链接如下所示:</p>
 +
<p>[http://wiki.ros.org/noetic/Installation/Ubuntu '''http://wiki.ros.org/noetic/Installation/Ubuntu''']</p></li>
 +
<li><p>ROS '''Noetic Ninjemys'''官方安装文档中Ubuntu推荐使用Ubuntu20.04,所以请确保开发板使用的系统为'''Ubuntu20.04桌面版系统'''</p>
 +
<p>[http://wiki.ros.org/noetic/Installation '''http://wiki.ros.org/noetic/Installation''']</p>
 +
<p>[[File:media/image347.png|312x176px]]</p></li>
 +
<li><p>然后使用下面的脚本安装ros1</p>
 +
<p>orangepi@orangepi3b:~$ '''install_ros.sh ros1'''</p></li>
 +
<li><p>使用ROS工具前,首先需要初始化下rosdep,然后编译源码时就能快速的安装一些系统依赖和一些ROS中的核心组件</p></li></ol>
  
<span id="linux-system-login-instructions"></span>
+
'''注意,运行下面的命令需要确保开发板能正常访问github,否则会由于网络问题而报错。'''
== Linux system login instructions ==
 
  
<span id="linux-system-default-login-account-and-password"></span>
+
'''install_ros.sh脚本会尝试修改/etc/hosts并自动运行下面的命令。但是这种方法无法保证每次都能正常访问github,如果install_ros.sh安装完ros1后有提示下面的错误,请自己想其它办法让开发板的Linux系统能正常访问github,然后再手动运行下面的命令。'''
=== Linux system default login account and password ===
 
  
{| class="wikitable"
+
'''https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml'''
|-
 
| style="text-align: left;"| '''Account'''
 
| style="text-align: left;"| '''Passport'''
 
|-
 
| style="text-align: left;"| '''root'''
 
| style="text-align: left;"| '''orangepi'''
 
|-
 
| style="text-align: left;"| '''orangepi'''
 
| style="text-align: left;"| '''orangepi'''
 
|}
 
  
'''Note that when entering the password, the specific content of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputting.'''
+
'''Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml'''
  
'''When the wrong password is prompted, or there is a problem with the ssh connection, please note that as long as you are using the Linux image provided by Orange Pi, please do not suspect that the above password is wrong, but look for other reasons.'''
+
'''ERROR: error loading sources list:'''
  
<span id="how-to-set-automatic-terminal-login-in-linux-system"></span>
+
'''The read operation timed out'''
=== How to set automatic terminal login in Linux system ===
 
  
# The Linux system automatically logs in to the terminal by default, and the default login user name is orangepi '''orangepi'''
+
orangepi@orangepi:~$ '''source /opt/ros/noetic/setup.bash'''
  
[[File:pi3b-img171.png|351x198px]]
+
orangepi@orangepi:~$ '''sudo rosdep init'''
  
<ol start="2" style="list-style-type: decimal;">
+
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
<li>Use the following command to set the root user to automatically log in to the terminal</li></ol>
 
  
orangepi@orangepi:~$ '''sudo auto_login_cli.sh root'''
+
Recommended: please run
  
<ol start="3" style="list-style-type: decimal;">
+
rosdep update
<li>Use the following command to disable automatic login terminal</li></ol>
 
  
orangepi@orangepi:~$ '''sudo auto_login_cli.sh -d'''
+
orangepi@orangepi:~$ '''rosdep update'''
  
<ol start="4" style="list-style-type: decimal;">
+
reading in sources list data from /etc/ros/rosdep/sources.list.d
<li>Use the following command to set the orangepi user to automatically log in to the terminal again</li></ol>
 
  
orangepi@orangepi:~$ '''sudo auto_login_cli.sh orangepi'''
+
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
  
<span id="instructions-for-automatic-login-of-linux-desktop-version-system"></span>
+
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
=== Instructions for automatic login of Linux desktop version system ===
 
  
# After the desktop system starts, it will automatically log in to the desktop without entering a password
+
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
  
<div class="figure">
+
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
  
[[File:pi3b-img172.png|576x324px|1]]
+
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
  
</div>
+
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
<ol start="2" style="list-style-type: decimal;">
 
<li>Run the following command to prohibit the desktop system from automatically logging into the desktop</li></ol>
 
  
orangepi@orangepi:~$ '''sudo disable_desktop_autologin.sh'''
+
Skip end-of-life distro &quot;ardent&quot;
  
<ol start="3" style="list-style-type: decimal;">
+
Skip end-of-life distro &quot;bouncy&quot;
<li><p>Then restart the system and a login dialog box will appear, at which point a [[\l|password]] is required to enter the system</p>
 
<div class="figure">
 
  
[[File:pi3b-img173.png|569x320px|IMG_256]]
+
Skip end-of-life distro &quot;crystal&quot;
  
</div></li></ol>
+
Skip end-of-life distro &quot;dashing&quot;
  
<span id="the-setting-method-of-root-user-automatic-login-in-linux-desktop-version-system"></span>
+
Skip end-of-life distro &quot;eloquent&quot;
=== The setting method of root user automatic login in Linux desktop version system ===
 
  
# Execute the following command to set the desktop system to automatically log in as the root user
+
Add distro &quot;foxy&quot;
  
orangepi@orangepi:~$ '''sudo desktop_login.sh root'''
+
Add distro &quot;galactic&quot;
  
<ol start="2" style="list-style-type: decimal;">
+
Skip end-of-life distro &quot;groovy&quot;
<li>Then restart the system, and the root user will automatically log in to the desktop</li></ol>
 
  
[[File:pi3b-img174.png|448x187px]]
+
Add distro &quot;humble&quot;
  
'''Note that if you log in to the desktop system as the root user, you cannot use pulseaudio in the upper right corner to manage audio devices.'''
+
Skip end-of-life distro &quot;hydro&quot;
  
'''Also note that this is not a bug, since pulseaudio is not allowed to run as root.'''
+
Skip end-of-life distro &quot;indigo&quot;
  
<ol start="3" style="list-style-type: decimal;">
+
Skip end-of-life distro &quot;jade&quot;
<li>Execute the following command to set the desktop system to log in automatically with the orangepi user again</li></ol>
 
  
orangepi@orangepi:~$ '''sudo desktop_login.sh orangepi'''
+
Skip end-of-life distro &quot;kinetic&quot;
  
<span id="the-method-of-disabling-the-desktop-in-the-linux-desktop-version-system"></span>
+
Skip end-of-life distro &quot;lunar&quot;
=== The method of disabling the desktop in the Linux desktop version system ===
 
  
# First enter the following command on the command line,'''Please remember to add sudo permission'''
+
Add distro &quot;melodic&quot;
  
orangepi@orangepi:~$ '''sudo systemctl disable lightdm.service'''
+
Add distro &quot;noetic&quot;
  
<ol start="2" style="list-style-type: decimal;">
+
Add distro &quot;rolling&quot;
<li>Then restart the Linux system and you will find that the desktop will not be displayed</li></ol>
 
  
orangepi@orangepi:~$ '''sudo reboot'''
+
updated cache in /home/orangepi/.ros/rosdep/sources.cache
  
<ol start="3" style="list-style-type: decimal;">
+
<ol start="6" style="list-style-type: decimal;">
<li><p>The steps to reopen the desktop are as follows:</p>
+
<li><p>然后在'''桌面'''中打开一个命令行终端窗口,再使用'''test_ros.sh'''脚本可以启动一个小海龟的例程来测试下ROS是否能正常使用</p>
<ol style="list-style-type: lower-alpha;">
+
<p>orangepi@orangepi:~$ '''test_ros.sh'''</p></li>
<li>First enter the following command on the command line,'''Please remember to add sudo permission'''</li></ol>
+
<li><p>运行完'''test_ros.sh'''脚本后,会弹出下图所示的一个小海龟</p>
</li></ol>
+
<p>[[File:media/image348.png|576x276px]]</p></li>
 +
<li><p>然后请保持刚才打开终端窗口在最上面</p></li></ol>
  
orangepi@orangepi:~$ '''sudo systemctl start lightdm.service'''
+
[[File:media/image349.png|576x275px]]
  
<ol start="2" style="list-style-type: lower-alpha;">
+
<ol start="9" style="list-style-type: decimal;">
<li>After the command is executed, the desktop will be displayed</li></ol>
+
<li><p>此时按下键盘上的方向按键就可以控制小海龟上下左右移动了</p>
 +
<p>[[File:media/image350.png|575x296px]]</p></li></ol>
  
<span id="onboard-led-light-test-instructions"></span>
+
<span id="ubuntu20.04安装ros-2-galactic的方法"></span>
== Onboard LED Light Test Instructions ==
+
=== Ubuntu20.04安装ROS 2 Galactic的方法 ===
 
 
# There are three LED lights on the development board, one green light, one red light, and one PCIe light. The location is shown in the figure below:
 
  
 +
<ol style="list-style-type: decimal;">
 +
<li><p>ROS 2当前活跃的版本如下所示,推荐版本为'''Galactic Geochelone'''</p>
 +
<p>[[File:media/image351.png|576x271px]]</p>
 +
<p>[[File:media/image352.png|575x265px]]</p>
 +
<p>[http://docs.ros.org/ '''http://docs.ros.org''']</p>
 +
<p>'''http://docs.ros.org/en/galactic/Releases.html'''</p></li>
 +
<li><p>ROS 2 '''Galactic Geochelone'''官方安装文档链接如下所示:</p>
 +
<p>'''docs.ros.org/en/galactic/Installation.html'''</p>
 +
<p>'''http://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html'''</p></li>
 +
<li><p>ROS 2 '''Galactic Geochelone'''官方安装文档中Ubuntu Linux推荐使用Ubuntu20.04,所以请确保开发板使用的系统为'''Ubuntu20.04桌面版系统'''。安装ROS 2有几种方法,下面演示下通过'''Debian packages'''的方式来安装ROS 2 '''Galactic Geochelone'''</p></li>
 +
<li><p>使用'''install_ros.sh'''脚本可以安装ros2</p>
 +
<p>orangepi@orangepi:~$ '''install_ros.sh ros2'''</p></li>
 +
<li><p>'''install_ros.sh'''脚本安装完ros2后会自动运行下'''ros2 -h'''命令,如果能看到下面的打印,说明ros2安装完成</p>
 +
<p>usage: ros2 [-h] Call `ros2 &lt;command&gt; -h` for more detailed usage. ...</p>
 +
<p>ros2 is an extensible command-line tool for ROS 2.</p>
 +
<p>optional arguments:</p>
 +
<p>-h, --help show this help message and exit</p>
 +
<p>Commands:</p>
 +
<p>action Various action related sub-commands</p>
 +
<p>bag Various rosbag related sub-commands</p>
 +
<p>component Various component related sub-commands</p>
 +
<p>daemon Various daemon related sub-commands</p>
 +
<p>doctor Check ROS setup and other potential issues</p>
 +
<p>interface Show information about ROS interfaces</p>
 +
<p>launch Run a launch file</p>
 +
<p>lifecycle Various lifecycle related sub-commands</p>
 +
<p>multicast Various multicast related sub-commands</p>
 +
<p>node Various node related sub-commands</p>
 +
<p>param Various param related sub-commands</p>
 +
<p>pkg Various package related sub-commands</p>
 +
<p>run Run a package specific executable</p>
 +
<p>security Various security related sub-commands</p>
 +
<p>service Various service related sub-commands</p>
 +
<p>topic Various topic related sub-commands</p>
 +
<p>wtf Use `wtf` as alias to `doctor`</p>
 +
<p>Call `ros2 &lt;command&gt; -h` for more detailed usage.</p></li>
 +
<li><p>然后可以使用 '''test_ros.sh'''脚本测试下ROS 2是否安装成功,如果能看到下面的打印,说明ROS 2能正常运行</p>
 +
<p>orangepi@orangepi3b:~$ '''test_ros.sh'''</p>
 +
<p>[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'</p>
 +
<p>[INFO] [1671174101.235661048] [listener]: I heard: [Hello World: 1]</p>
 +
<p>[INFO] [1671174102.199572327] [talker]: Publishing: 'Hello World: 2'</p>
 +
<p>[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]</p>
 +
<p>[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'</p>
 +
<p>[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]</p></li>
 +
<li><p>运行下面的命令可以打开rviz2</p>
 +
<p>orangepi@orangepi:~$ '''source /opt/ros/galactic/setup.bash'''</p>
 +
<p>orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''</p>
 
<div class="figure">
 
<div class="figure">
  
[[File:pi3b-img175.png|425x115px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\3.5.Onboard-LED-Light-Test-Instructions(1).jpg3.5.Onboard-LED-Light-Test-Instructions(1)]]
+
[[File:media/image353.png|576x324px|1]]
  
</div>
+
</div></li>
<ol start="2" style="list-style-type: decimal;">
+
<li><p>ROS的使用方法请参考下ROS 2的文档</p>
<li><p>'''As long as the development board is powered on, the red LED light will always be on, which is controlled by the hardware and cannot be turned off by the software'''</p></li>
+
<p>[http://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/galactic/Tutorials.html''']</p></li></ol>
<li><p>The green LED light will keep blinking after the kernel is started, which is controlled by software.</p></li>
 
<li><p>The PCIe indicator will flash when there is data transmission on the PCIe interface.</p></li>
 
<li><p>The method of setting the green light on and off and flashing is as follows</p></li></ol>
 
  
'''Note that the following operations should be performed under the root user.'''
+
<span id="ubuntu22.04安装ros-2-humble的方法"></span>
 +
=== Ubuntu22.04安装ROS 2 Humble的方法 ===
  
<ol style="list-style-type: lower-alpha;">
+
<ol style="list-style-type: decimal;">
<li>First enter the setting directory of the green light</li></ol>
+
<li><p>使用'''install_ros.sh'''脚本可以安装ros2</p>
 +
<p>orangepi@orangepi:~$ '''install_ros.sh ros2'''</p></li>
 +
<li><p>'''install_ros.sh'''脚本安装完ros2后会自动运行下'''ros2 -h'''命令,如果能看到下面的打印,说明ros2安装完成</p>
 +
<p>usage: ros2 [-h] Call `ros2 &lt;command&gt; -h` for more detailed usage. ...</p>
 +
<p>ros2 is an extensible command-line tool for ROS 2.</p>
 +
<p>optional arguments:</p>
 +
<p>-h, --help show this help message and exit</p>
 +
<p>Commands:</p>
 +
<p>action Various action related sub-commands</p>
 +
<p>bag Various rosbag related sub-commands</p>
 +
<p>component Various component related sub-commands</p>
 +
<p>daemon Various daemon related sub-commands</p>
 +
<p>doctor Check ROS setup and other potential issues</p>
 +
<p>interface Show information about ROS interfaces</p>
 +
<p>launch Run a launch file</p>
 +
<p>lifecycle Various lifecycle related sub-commands</p>
 +
<p>multicast Various multicast related sub-commands</p>
 +
<p>node Various node related sub-commands</p>
 +
<p>param Various param related sub-commands</p>
 +
<p>pkg Various package related sub-commands</p>
 +
<p>run Run a package specific executable</p>
 +
<p>security Various security related sub-commands</p>
 +
<p>service Various service related sub-commands</p>
 +
<p>topic Various topic related sub-commands</p>
 +
<p>wtf Use `wtf` as alias to `doctor`</p>
 +
<p>Call `ros2 &lt;command&gt; -h` for more detailed usage.</p></li>
 +
<li><p>然后可以使用 '''test_ros.sh'''脚本测试下ROS 2是否安装成功,如果能看到下面的打印,说明ROS 2能正常运行</p>
 +
<p>orangepi@orangepi3b:~$ '''test_ros.sh'''</p>
 +
<p>[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'</p>
 +
<p>[INFO] [1671174101.235661048] [listener]: I heard: [Hello World: 1]</p>
 +
<p>[INFO] [1671174102.199572327] [talker]: Publishing: 'Hello World: 2'</p>
 +
<p>[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]</p>
 +
<p>[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'</p>
 +
<p>[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]</p></li>
 +
<li><p>运行下面的命令可以打开rviz2</p>
 +
<p>orangepi@orangepi:~$ '''source /opt/ros/humble/setup.bash'''</p>
 +
<p>orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''</p>
 +
<div class="figure">
  
root@orangepi:~# '''cd /sys/class/leds/status'''
+
[[File:media/image354.png|576x324px|1]]
  
<ol start="2" style="list-style-type: lower-alpha;">
+
</div></li>
<li>The command to set the green light to stop flashing is as follows</li></ol>
+
<li><p>参考文档</p>
 +
<p>'''http://docs.ros.org/en/humble/index.html'''</p>
 +
<p>[http://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html''']</p></li></ol>
  
root@orangepi:/sys/class/leds/work# '''echo none &gt; trigger'''
+
== 安装内核头文件的方法 ==
  
<ol start="3" style="list-style-type: lower-alpha;">
+
<ol style="list-style-type: decimal;">
<li>The command to set the green light to be on is as follows</li></ol>
+
<li><p>OPi发布的Linux镜像默认自带了内核头文件的deb包,存放的位置为'''/opt/'''</p>
 +
<p>orangepi@orangepi:~$ '''ls /opt/linux-headers*'''</p>
 +
<p>/opt/linux-headers-legacy-rockchip-rk356x_x.x.x_arm64.deb</p></li>
 +
<li><p>使用下面的命令可以安装内核头文件的deb包</p>
 +
<p>'''内核头文件deb包的名字需要替换为实际的名字,请不要照抄。'''</p>
 +
<p>orangepi@orangepi:~$ '''sudo dpkg -i /opt/linux-headers-legacy-rockchip-rk356x_1.x.x_arm64.deb'''</p></li>
 +
<li><p>安装完后在'''/usr/src'''下就能看到内核头文件所在的文件夹</p>
 +
<p>orangepi@orangepi:~$ '''ls /usr/src'''</p>
 +
<p>linux-headers-5.10.160-rockchip-rk356x</p></li>
 +
<li><p>然后可以编写一个hello内核模块测试下内核头文件</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先编写hello内核模块的代码,如下所示:</p>
 +
<p>orangepi@orangepi:~$ '''vim hello.c'''</p>
 +
<p>#include &lt;linux/init.h&gt;</p>
 +
<p>#include &lt;linux/module.h&gt;</p>
 +
<p>static int hello_init(void)</p>
 +
<p>{</p>
 +
<p>printk(&quot;Hello Orange Pi -- init\n&quot;);</p>
 +
<p>return 0;</p>
 +
<p>}</p>
 +
<p>static void hello_exit(void)</p>
 +
<p>{</p>
 +
<p>printk(&quot;Hello Orange Pi -- exit\n&quot;);</p>
 +
<p>return;</p>
 +
<p>}</p>
 +
<p>module_init(hello_init);</p>
 +
<p>module_exit(hello_exit);</p>
 +
<p>MODULE_LICENSE(&quot;GPL&quot;);</p></li>
 +
<li><p>然后编写编译hello内核模块的Makefile文件,如下所示:</p>
 +
<p>orangepi@orangepi:~$ '''vim Makefile'''</p>
 +
<p>ifneq ($(KERNELRELEASE),)</p>
 +
<p>obj-m:=hello.o</p>
 +
<p>else</p>
 +
<p>KDIR :=/lib/modules/$(shell uname -r)/build</p>
 +
<p>PWD :=$(shell pwd)</p>
 +
<p>all:</p>
 +
<p>make -C $(KDIR) M=$(PWD) modules</p>
 +
<p>clean:</p>
 +
<p>rm -f *.ko *.o *.mod.o *.mod *.symvers *.cmd *.mod.c *.order</p>
 +
<p>endif</p></li>
 +
<li><p>然后使用make命令编译hello内核模块,编译过程的输出如下所示:</p>
 +
<p>'''如果自己复制的代码这里编译如果有问题,请去[http://www.orangepi.cn/html/serviceAndSupport/index.html 官方工具]中下载源码然后上传到开发板的Linux系统中测试。'''</p>
 +
<p>[[File:media/image355.png|253x41px]]</p>
 +
<p>orangepi@orangepi:~$ '''make'''</p>
 +
<p>make -C /lib/modules/5.10.160-rockchip-35xx/build M=/home/orangepi modules</p>
 +
<p>make[1]: Entering directory '/usr/src/linux-headers-5.10.160-rockchip-rk35xx'</p>
 +
<p>CC [M] /home/orangepi/hello.o</p>
 +
<p>MODPOST /home/orangepi/Module.symvers</p>
 +
<p>CC [M] /home/orangepi/hello.mod.o</p>
 +
<p>LD [M] /home/orangepi/hello.ko</p>
 +
<p>make[1]: Leaving directory '/usr/src/linux-headers-5.10.160-rockchip-rk35xx'</p></li>
 +
<li><p>编译完后会生成'''hello.ko'''内核模块</p>
 +
<p>orangepi@orangepi:~$ '''ls *.ko'''</p>
 +
<p>hello.ko</p></li>
 +
<li><p>使用'''insmod'''命令可以将'''hello.ko'''内核模块插入内核中</p>
 +
<p>orangepi@orangepi:~$ '''sudo insmod hello.ko'''</p></li>
 +
<li><p>然后使用'''demsg'''命令可以查看下'''hello.ko'''内核模块的输出,如果能看到下面的输出说明'''hello.ko'''内核模块加载正确</p>
 +
<p>orangepi@orangepi:~$ '''dmesg | grep &quot;Hello&quot;'''</p>
 +
<p>[ 2871.893988] '''Hello Orange Pi -- init'''</p></li>
 +
<li><p>使用'''rmmod'''命令可以卸载'''hello.ko'''内核模块</p>
 +
<p>orangepi@orangepi:~$ '''sudo rmmod hello'''</p>
 +
<p>orangepi@orangepi:~$ '''dmesg | grep &quot;Hello&quot;'''</p>
 +
<p>[ 2871.893988] Hello Orange Pi -- init</p>
 +
<p>[ 3173.800892] '''Hello Orange Pi -- exit'''</p></li></ol>
 +
</li></ol>
  
root@orangepi:/sys/class/leds/work# '''echo default-on &gt; trigger'''
+
== 树莓派5寸屏幕的使用 ==
  
<ol start="4" style="list-style-type: lower-alpha;">
+
=== 树莓派5寸屏幕的组装方法 ===
<li>The command to set the green light to flash is as follows</li></ol>
 
  
root@orangepi:/sys/class/leds/work# '''echo heartbeat &gt; trigger'''
+
<ol style="list-style-type: decimal;">
 +
<li><p>首先准备需要的配件</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>树莓派5寸MIPI LCD显示屏+触摸屏</p>
 +
<p>[[File:media/image356.png|306x219px]]</p></li>
 +
<li><p>15pin MIPI排线</p>
 +
<p>[[File:media/image357.png|276x111px]]</p></li></ol>
 +
</li>
 +
<li><p>然后将15pin MIPI排线按照下图所示的方式连接到树莓派5寸屏幕上(注意绝缘面的朝向)</p>
 +
<p>[[File:media/image358.png|294x160px]]</p></li>
 +
<li><p>最后连接到Orange Pi 3B开发板的LCD接口上</p>
 +
<p>[[File:media/image359.png|333x199px]]</p></li></ol>
  
<span id="network-connection-test"></span>
+
=== 打开树莓派5寸屏幕配置的方法 ===
== Network connection test ==
 
  
<span id="ethernet-port-test"></span>
+
<ol style="list-style-type: decimal;">
=== Ethernet port test ===
+
<li><p>Linux镜像默认是没有打开树莓派5寸屏幕的配置的,如果需要使用树莓派5寸屏幕,需要手动打开才行。</p></li>
 +
<li><p>打开mipi lcd配置的步骤如下所示:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>首先运行下'''orangepi-config''',普通用户记得加'''sudo'''权限</p>
 +
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
 +
<li><p>然后选择'''System'''</p>
 +
<p>[[File:media/image360.png|575x272px]]</p></li>
 +
<li><p>然后选择'''Hardware'''</p>
 +
<p>[[File:media/image361.png|576x266px]]</p></li>
 +
<li><p>然后使用键盘的方向键定位到raspi-7inch-touchscreen,再使用'''空格'''选中</p>
 +
<p>[[File:media/image362.png|408x310px]]</p></li>
 +
<li><p>然后选择'''&lt;Save&gt;'''保存</p>
 +
<p>[[File:media/image363.png|404x133px]]</p></li>
 +
<li><p>然后选择'''&lt;Back&gt;'''</p>
 +
<p>[[File:media/image364.png|397x151px]]</p></li>
 +
<li><p>然后选择'''&lt;Reboot&gt;'''重启系统使配置生效</p>
 +
<p>[[File:media/image365.png|331x154px]]</p>
 +
<p>'''上面的设置最终会在/boot/orangepiEnv.txt中加入overlays=raspi-7inch-touchscreen这句配置。设置完后可以先检查下。如果不存在这句配置,那么设置就是有问题。'''</p>
 +
<p>'''如果觉得使用orangepi-config比较麻烦,也可以使用vim编辑器打开/boot/orangepiEnv.txt,然后加入overlays=raspi-7inch-touchscreen 这句配置也是可以。'''</p>
 +
<p>orangepi@orangepi:~$ '''cat /boot/orangepiEnv.txt | grep “raspi”'''</p>
 +
<p>'''overlays=raspi-7inch-touchscreen #示例配置'''</p></li></ol>
 +
</li>
 +
<li><p>启动后可以看到lcd屏幕的显示如下所示:</p></li></ol>
  
# First, insert one end of the network cable into the Ethernet interface of the development board, and connect the other end of the network cable to the router, and ensure that the network is unblocked
+
[[File:media/image366.png|381x262px]]
# After the system starts, it will automatically assign an IP address to the Ethernet card through DHCP, '''No other configuration is required'''
 
# The command to view the IP address in the Linux system of the development board is as follows
 
  
orangepi@orangepi:~$ '''ip addr show eth0'''
+
=== 服务器版镜像旋转显示方向的方法 ===
  
2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc mq state UP group default qlen 1000
+
<ol style="list-style-type: decimal;">
 +
<li><p>在'''/boot/orangepiEnv.txt'''中加入'''extraargs=fbcon=rotate:要旋转的方向'''这行配置就可以设置服务器版本的Linux系统显示的方向,其中'''fbcon=rotate:'''后面的数字可以设置为:</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>0: 正常屏(默认为横屏)</p></li>
 +
<li><p>1: 顺时钟转90度</p></li>
 +
<li><p>2: 翻转180度</p></li>
 +
<li><p>3: 顺时钟转270度</p>
 +
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p>
 +
<p>overlays=lcd1</p>
 +
<p>'''extraargs=cma=64M fbcon=rotate:3'''</p>
 +
<p>'''注意,/boot/orangepiEnv.txt中如果默认有extraargs=cma=64M这行配置,fbcon=rotate:3这个配置添加到extraargs=cma=64M的后面即可(需要用空格隔开)。'''</p></li></ol>
 +
</li>
 +
<li><p>然后'''重启'''Linux系统就能看到lcd屏幕显示的方向已经旋转了</p></li></ol>
  
link/ether 4a:fe:2b:3d:17:1c brd ff:ff:ff:ff:ff:ff
+
=== 桌面版镜像旋转显示和触摸方向的方法 ===
  
inet '''192.168.1.150'''/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
+
<ol style="list-style-type: decimal;">
 +
<li><p>首先在Linux系统中打开'''Display'''设置</p>
 +
<p>[[File:media/image367.png|298x206px]]</p></li>
 +
<li><p>然后在'''Rotation'''中选择想要旋转的方向</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''None''': 不旋转</p></li>
 +
<li><p>'''Left''': 向左旋转90度</p></li>
 +
<li><p>'''Inverted''': 上下翻转,相当于旋转180度</p></li>
 +
<li><p>'''Right''': 向右旋转90度</p>
 +
<p>[[File:media/image368.png|286x180px]]</p></li></ol>
 +
</li>
 +
<li><p>然后点击'''Apply'''</p>
 +
<p>[[File:media/image369.png|330x207px]]</p></li>
 +
<li><p>然后选择'''Keep this configuration'''</p>
 +
<p>[[File:media/image370.png|374x210px]]</p></li>
 +
<li><p>此时屏幕显示就已旋转完成,然后关闭掉'''Display'''程序即可</p></li>
 +
<li><p>上面的步骤只会选择显示方向,并不会旋转触摸的方向,使用'''set_lcd_rotate.sh'''脚本可以旋转下触摸的方向,此脚本设置完后会自动重启,然后就可以测试触摸是否已经能正常使用了</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''None''': 不旋转</p>
 +
<p>orangepi@orangepi:~$ '''set_lcd_rotate.sh none'''</p></li>
 +
<li><p>'''Left''': 向左旋转90度</p>
 +
<p>orangepi@orangepi:~$ '''set_lcd_rotate.sh left'''</p></li>
 +
<li><p>'''Inverted''': 上下翻转,相当于旋转180度</p>
 +
<p>orangepi@orangepi:~$ '''set_lcd_rotate.sh inverted'''</p></li>
 +
<li><p>'''Right''': 向右旋转90度</p>
 +
<p>orangepi@orangepi:~$ '''set_lcd_rotate.sh right'''</p>
 +
<p>'''set_lcd_rotate.sh脚本主要做四件事:'''</p></li></ol>
 +
</li></ol>
  
valid_lft 43150sec preferred_lft 43150sec
+
<!-- -->
 +
<ol style="list-style-type: decimal;">
 +
<li><p>'''旋转framebuffer显示的方向'''</p></li>
 +
<li><p>'''旋转触摸的方向'''</p></li>
 +
<li><p>'''关闭开机logo'''</p></li>
 +
<li><p>'''重启系统'''</p>
 +
<p>'''旋转触摸的方向是通过在/usr/share/X11/xorg.conf.d/40-libinput.conf中加入Option &quot;TransformationMatrix&quot; &quot;x x x x x x x x x&quot;这行配置来实现的。其中&quot;x x x x x x x x x&quot;不同的方向配置不同。'''</p></li></ol>
  
inet6 fe80::9a04:3703:faed:23be/64 scope link noprefixroute
+
<!-- -->
 +
<ol start="7" style="list-style-type: decimal;">
 +
<li><p>触摸旋转参考资料</p>
 +
<p>[https://wiki.ubuntu.com/X/InputCoordinateTransformation '''https://wiki.ubuntu.com/X/InputCoordinateTransformation''']</p></li></ol>
  
valid_lft forever preferred_lft forever
+
== 开关机logo使用说明 ==
  
'''When using ifconfig to view the IP address, if the following information is displayed, it is because sudo is not added. The correct command is: sudo ifconfig'''
+
<ol style="list-style-type: decimal;">
 +
<li><p>开关机logo默认只在桌面版的系统中才会显示</p></li>
 +
<li><p>在'''/boot/orangepiEnv.txt'''中设置'''bootlogo'''变量为'''false'''可以关闭开关机logo</p>
 +
<p>orangepi@orangepi:~$ '''vim /boot/orangepiEnv.txt'''</p>
 +
<p>verbosity=1</p>
 +
<p>'''bootlogo=false'''</p></li>
 +
<li><p>在'''/boot/orangepiEnv.txt'''中设置'''bootlogo'''变量为'''true'''可以开启开关机logo</p>
 +
<p>orangepi@orangepi:~$ '''vim /boot/orangepiEnv.txt'''</p>
 +
<p>verbosity=1</p>
 +
<p>'''bootlogo=true'''</p></li>
 +
<li><p>开机logo图片在Linux系统中的位置为</p>
 +
<p>'''/usr/share/plymouth/themes/orangepi/watermark.png'''</p></li>
 +
<li><p>替换开机logo图片后需要运行下命令才能生效</p>
 +
<p>orangepi@orangepi:~$ '''sudo update-initramfs -u'''</p></li></ol>
  
orangepi@orangepi:~$ '''ifconfig'''
+
<span id="zfs文件系统的使用方法"></span>
 +
== ZFS文件系统的使用方法 ==
  
Command 'ifconfig' is available in the following places
+
'''最新版本的Ubuntu20.04、Ubuntu22.04、Debian11和Debian12桌面版系统中已经预装了zfs,直接使用即可。'''
  
* /sbin/ifconfig
+
'''在Ubuntu20.04、Ubuntu22.04桌面版系统中预装的zfs版本是2.1.6。'''
  
* /usr/sbin/ifconfig
+
'''在Debian11和Debian12桌面版系统中预装的zfs版本是2.1.11。'''
  
The command could not be located because '/sbin:/usr/sbin' is not included in the PATH environment variable.
+
'''系统启动后,首先请确认下zfs的内核模块有没有被加载,如果使用lsmod命令可以看到zfs相关的内容,就说明系统已经预装了zfs。'''
  
This is most likely caused by the lack of administrative privileges associated with your user account.
+
orangepi@orangepi:~$ '''lsmod | grep &quot;zfs&quot;'''
  
ifconfig: command not found
+
zfs 2801664 0
  
'''There are three ways to check the IP address after the development board starts:'''
+
zunicode 327680 1 zfs
  
# '''Connect the HDMI display, then log in to the system and use the ip addr show eth0 command to view the IP address'''
+
zzstd 471040 1 zfs
# '''Enter the ip addr show eth0 command in the debugging serial terminal to view the IP address'''
 
# '''If there is no debugging serial port and no HDMI display, you can also check the IP address of the development board’s network port through the router’s management interface. However, in this method, some people often cannot see the IP address of the development board normally. If you can't see it, the debug method looks like this:'''
 
  
<!-- -->
+
zlua 139264 1 zfs
<ol style="list-style-type: upper-alpha;">
 
<li><p>'''First check whether the Linux system has started normally. If the green light of the development board is blinking, it is generally started normally. If only the red light is on, it means that the system has not started normally;'''</p></li>
 
<li><p>'''Check whether the network cable is plugged in tightly, or try another network cable;'''</p></li>
 
<li><p>'''Try another router (I have encountered many problems with the router, such as the router cannot assign the IP address normally, or the IP address has been assigned normally but cannot be seen in the router);'''</p></li>
 
<li><p>'''If there is no router to replace, you can only connect to an HDMI display or use the debugging serial port to view the IP address'''</p></li></ol>
 
  
'''In addition, it should be noted that the development board DHCP automatically assigns an IP address without any settings.'''
+
zcommon 69632 1 zfs
  
<ol start="4" style="list-style-type: decimal;">
+
znvpair 61440 2 zfs,zcommon
<li>The command to test the network connectivity is as follows, the '''ping''' command can be interrupted through the shortcut key of '''Ctrl+C'''</li></ol>
 
  
orangepi@orangepi:~$ '''ping www.baidu.com -I eth0'''
+
zavl 16384 1 zfs
  
PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 56(84) bytes of data.
+
icp 221184 1 zfs
  
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=56 time=6.74 ms
+
spl 77824 6 zfs,icp,zzstd,znvpair,zcommon,zavl
  
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=56 time=6.80 ms
+
<span id="安装zfs的方法"></span>
 +
=== 安装ZFS的方法 ===
  
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=56 time=6.26 ms
+
'''安装zfs前,请先确保使用的Linux镜像为最新版本。另外,如果系统中已经安装了zfs,就无需重复安装了。'''
  
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=56 time=7.27 ms
+
安装zfs前首先需要安装内核头文件,安装内核头文件的方法请参考[[\l|'''安装内核头文件的方法''']]小节的说明。
  
^C
+
在Ubuntu20.04、Ubuntu22.04和Debian11系统中,zfs是无法通过apt直接安装的,这是因为默认的apt源中zfs版本低于2.1.6,存在和rk Linux5.10内核不兼容的问题,这个问题在zfs的2.1.6及以后的版本中得到了修复。
  
--- www.a.shifen.com ping statistics ---
+
为了解决这个问题,我们提供了能正常安装的zfs的deb包,可以从开发板的[http://www.orangepi.cn/html/serviceAndSupport/index.html '''官方工具''']中下载到。打开'''官方工具''',然后进入'''Ubuntu和Debian系统使用的zfs相关的deb包'''文件夹后,可以看到Ubuntu20.04、Ubuntu22.04和Debian11三种类型的deb包,请下载需要的版本。
  
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
+
[[File:media/image371.png|232x136px]]
  
rtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms
+
下载完对应版本的zfs deb包后,请将它们上传到开发板的Linux系统中。上传方法请参考[[\l|'''上传文件到开发板Linux系统中的方法''']]小节的说明。
  
<span id="wifi-connection-test"></span>
+
上传完成后,再在开发板Linux系统的命令行中使用'''cd'''命令进入deb包的目录,然后使用下面的命令就可以安装zfs的deb包。
=== WIFI connection test ===
 
  
'''Please do not connect to WIFI by modifying the /etc/network/interfaces configuration file. There will be problems connecting to the WIFI network in this way.'''
+
orangepi@orangepi:~$ '''sudo apt install ./*.deb'''
  
<span id="wifi-the-server-image-connects-to-wifi-through-commands"></span>
+
安装完成后,使用下面的命令可以看到zfs相关的内核模块:
==== WIFI The server image connects to WIFI through commands ====
 
  
'''When the development board is not connected to Ethernet, not connected to HDMI display, but only connected to the serial port, it is recommended to use the commands demonstrated in this section to connect to the WIFI network. Because nmtui can only display characters in some serial port software (such as minicom), and cannot display the graphical interface normally. Of course, if the development board is connected to an Ethernet or HDMI display, you can also use the commands demonstrated in this section to connect to the WIFI network.'''
+
orangepi@orangepi:~$ '''ls /lib/modules/5.10.160-rockchip-rk356x/updates/dkms/'''
  
<ol style="list-style-type: decimal;">
+
'''icp.ko spl.ko zavl.ko zcommon.ko zfs.ko zlua.ko znvpair.ko zunicode.ko zzstd.ko'''
<li><p>First log in to the Linux system, there are the following three ways</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>If the development board is connected with a network cable, you can remotely log in to the Linux system through ssh</p></li>
 
<li><p>If the development board is connected to the debugging serial port, you can use the serial port terminal to log in to the Linux system</p></li>
 
<li><p>If the development board is connected to the HDMI display, you can log in to the Linux system through the terminal displayed on the HDMI</p></li></ol>
 
</li>
 
<li><p>First use the nmcli dev wifi command to scan the surrounding WIFI hotspots</p></li></ol>
 
  
orangepi@orangepi:~$ '''nmcli dev wifi'''
+
然后重启下Linux系统就能看到zfs内核模块会自动加载了:
  
<div class="figure">
+
orangepi@orangepi:~$ '''lsmod | grep &quot;zfs&quot;'''
  
[[File:pi3b-img176.png|575x250px|选区_011]]
+
zfs 2801664 0
  
</div>
+
zunicode 327680 1 zfs
<ol start="3" style="list-style-type: decimal;">
 
<li>Then use the nmcli command to connect to the scanned WIFI hotspot, where:</li></ol>
 
  
a. '''wifi_name''' needs to be replaced with the name of the WIFI hotspot you want to connect to
+
zzstd 471040 1 zfs
  
b. '''wifi_passwd''' needs to be replaced with the password of the WIFI hotspot you want to connect to
+
zlua 139264 1 zfs
  
orangepi@orangepi:~$ '''nmcli dev wifi connect wifi_name password wifi_passwd'''
+
zcommon 69632 1 zfs
  
Device 'wlan0' successfully activated with 'cf937f88-ca1e-4411-bb50-61f402eef293'.
+
znvpair 61440 2 zfs,zcommon
  
<ol start="4" style="list-style-type: decimal;">
+
zavl 16384 1 zfs
<li>You can view the IP address of wifi through the '''ip addr show wlan0''' command</li></ol>
+
 
 +
icp 221184 1 zfs
  
orangepi@orangepi:~$ '''ip addr show wlan0'''
+
spl 77824 6 zfs,icp,zzstd,znvpair,zcommon,zavl
  
11: wlan0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
+
在Debian12中,zfs的默认版本为2.1.11,所以我们可以通过下面的命令直接安装zfs,再次提醒下,安装前需要确保系统已安装内核头文件的deb包。
  
link/ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff
+
orangepi@orangepi:~$ '''sudo apt install -y zfsutils-linux zfs-dkms'''
  
inet '''192.168.1.11'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
+
<span id="创建zfs池的方法"></span>
 +
=== 创建ZFS池的方法 ===
  
valid_lft 259192sec preferred_lft 259192sec
+
'''ZFS是基于存储池的,我们可以将多个物理存储设备添加到池中,然后从这个池中分配存储空间。'''
  
inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute
+
'''下面的内容是基于开发板接了一个NVMe SSD和一个U盘来演示的。'''
  
valid_lft 259192sec preferred_lft 172792sec
+
<ol style="list-style-type: decimal;">
 +
<li><p>首先我们可以通过'''lsblk'''命令查看下开发板所有的存储设备,当前开发板接了一个NVMe SSD以及一个U盘,输出如下所示:</p>
 +
<p>[[File:media/image372.png|379x227px]]</p></li>
 +
<li><p>然后输入下面的命令可以创建一个ZFS池,包含NVMe SSD和U盘两个存储设备</p>
 +
<p>orangepi@orangepi:~$ '''sudo zpool create -f pool1 /dev/nvme0n1 /dev/sda'''</p></li>
 +
<li><p>然后使用'''zpool list'''命令可以看到系统已经创建了一个名为'''pool1'''的ZFS池,并且ZFS池pool1的大小是NVME SSD的大小加上U盘的大小</p>
 +
<p>[[File:media/image373.png|576x37px]]</p></li>
 +
<li><p>然后执行'''df -h'''可以看到'''pool1'''被挂载到了'''/pool1'''目录</p>
 +
<p>orangepi@orangepi:~$ '''df -h'''</p>
 +
<p>Filesystem Size Used Avail Use% Mounted on</p>
 +
<p>tmpfs 1.6G 18M 1.6G 2% /run</p>
 +
<p>/dev/mmcblk0p2 29G 6.0G 22G 22% /</p>
 +
<p>tmpfs 7.7G 46M 7.7G 1% /dev/shm</p>
 +
<p>tmpfs 5.0M 4.0K 5.0M 1% /run/lock</p>
 +
<p>tmpfs 7.7G 944K 7.7G 1% /tmp</p>
 +
<p>/dev/mmcblk0p1 1022M 115M 908M 12% /boot</p>
 +
<p>/dev/zram1 188M 4.5M 169M 3% /var/log</p>
 +
<p>tmpfs 1.6G 80K 1.6G 1% /run/user/1000</p>
 +
<p>'''pool1 489G 9.3M 489G 1% /pool1'''</p></li>
 +
<li><p>使用下面的命令可以看到pool1的文件系统类型为zfs</p>
 +
<p>orangepi@orangepi:~$ '''mount | grep pool1'''</p>
 +
<p>pool1 on /pool1 type '''zfs''' (rw,xattr,noacl)</p></li>
 +
<li><p>然后我们可以测试下拷贝一个文件到ZFS池中</p>
 +
<p>orangepi@orangepi:~$ '''sudo cp -v /usr/local/test.mp4 /pool1/'''</p>
 +
<p>'/usr/local/test.mp4' -&gt; '/pool1/test.mp4'</p></li></ol>
  
inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute
+
<span id="测试zfs的数据去重功能"></span>
 +
=== 测试ZFS的数据去重功能 ===
  
valid_lft forever preferred_lft forever
+
<ol style="list-style-type: decimal;">
 +
<li><p>ZFS的数据去重功能默认是关闭的,我们需要执行下面的命令打开</p>
 +
<p>orangepi@orangepi:~$ '''sudo zfs set dedup=on pool1'''</p></li>
 +
<li><p>然后做一个简单的测试,首先进入pool1中,再执行下面的命令生成1个1G大小的随机文件</p>
 +
<p>orangepi@orangepi:~$ '''cd /pool1/'''</p>
 +
<p>root@orangepi:/pool1$ '''sudo dd if=/dev/urandom of=test.1g bs=1M count=1024'''</p>
 +
<p>1024+0 records in</p>
 +
<p>1024+0 records out</p>
 +
<p>1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.04367 s, 213 MB/s</p></li>
 +
<li><p>然后使用下面的命令将1G大小的随机文件拷贝1000份</p></li></ol>
  
5) Use the '''ping''' command to test the connectivity of the wifi network, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''
+
root@orangepi:/pool1$ '''for ((i=0; i&lt;1000; i++)); do sudo cp test.1g $i.test.1g; done'''
  
orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0'''
+
<ol start="4" style="list-style-type: decimal;">
 +
<li>然后用'''du -lh'''可以看到目前池中总共有1002G的数据,但实际上ZFS池的大小只有'''504GB'''(SSD+U盘的总容量),是装不下那么大的数据的</li></ol>
  
PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data.
+
root@orangepi:/pool1$ '''du -lh'''
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms
+
1002G
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms
+
<ol start="5" style="list-style-type: decimal;">
 +
<li><p>然后用'''zpool list'''命令可以看到实际只占用了1.01G,因为这1001个文件都是重复的,说明数据去重功能有效。</p>
 +
<p>[[File:media/image374.png|576x36px]]</p></li></ol>
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms
+
<span id="测试zfs的数据压缩功能"></span>
 +
=== 测试ZFS的数据压缩功能 ===
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms
+
# 因为存储的数据不同,压缩节省的磁盘空间也会有所不同,所以我们选择压缩比较大的纯文本文件来进行压缩测试,执行下面的命令将'''/var/log/'''和'''/etc/'''目录打包成tar包
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms
+
orangepi@orangepi:~$ '''cd /pool1/'''
  
^C
+
root@orangepi:/pool1$ '''sudo tar -cf text.tar /var/log/ /etc/'''
  
--- www.orangepi.org ping statistics ---
+
<ol start="2" style="list-style-type: decimal;">
 +
<li><p>然后通过'''ls -lh'''命令可以看到的文件大小以及在ZFS池中占用的空间都是'''27M'''</p>
 +
<p>[[File:media/image375.png|576x90px]]</p></li>
 +
<li><p>然后我们在ZFS池pool1中启用压缩功能</p>
 +
<p>root@orangepi:/pool1$ '''sudo zfs set compression=lz4 pool1'''</p></li>
 +
<li><p>然后再次执行下面的命令将'''/var/log/'''和'''/etc/'''目录打包成tar包</p></li></ol>
  
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
+
root@orangepi:/pool1$ '''sudo tar -cf text.tar /var/log/ /etc/'''
  
rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms
+
<ol start="5" style="list-style-type: decimal;">
 +
<li>这时可以看到'''text.tar'''文件大小还是27M,但是在ZFS池中只占用9.47M的空间,说明文件被压缩了</li></ol>
  
<span id="the-server-image-connects-to-wifi-in-a-graphical-way"></span>
+
[[File:media/image376.png|576x79px]]
==== The server image connects to WIFI in a graphical way ====
 
  
1) First log in to the Linux system, there are the following three ways
+
== 关机和重启开发板的方法 ==
  
<ol style="list-style-type: lower-alpha;">
+
<ol style="list-style-type: decimal;">
<li><p>If the development board is connected with a network cable, you can remotely log in to [[\l|the Linux system through ssh]]</p></li>
+
<li><p>在Linux系统运行的过程中,如果直接拔掉Type-C电源断电,可能会导致文件系统丢失某些数据或者损坏,所以在断电前请先使用'''poweroff'''命令关闭开发板的Linux系统,然后再拔掉电源。</p>
<li><p>If the development board is connected to the debugging serial port, you can use the serial port terminal to log in to the Linux system (please use MobaXterm for the serial port software, and the minicom cannot display the graphical interface)</p></li>
+
<p>orangepi@orangepi:~$ '''sudo poweroff'''</p></li>
<li><p>If the development board is connected to the HDMI display, you can log in to the Linux system through the HDMI display terminal</p></li></ol>
+
<li><p>另外开发板配有开关机按键,还可以'''短按'''开发板上的开关机按键来关机。</p>
 +
<p>[[File:media/image377.png|294x80px]]</p></li></ol>
  
<!-- -->
+
'''注意,Linux桌面版系统按下开关机按键后会弹出下图所示的确认框,需要点击Shut Down选项后才会关机。'''
#
 
# Then enter the nmtui command in the command line to open the wifi connection interface
 
  
orangepi@orangepi:~$ '''nmtui'''
+
[[File:media/image378.png|207x193px]]
  
 
<ol start="3" style="list-style-type: decimal;">
 
<ol start="3" style="list-style-type: decimal;">
<li>Enter the nmtui command to open the interface as shown below</li></ol>
+
<li><p>关机后短按开发板上的开关机按键即可开机。</p>
 +
<p>[[File:media/image377.png|294x80px]]</p></li>
 +
<li><p>重启Linux系统的命令为</p>
 +
<p>orangepi@orangepi:~$ '''sudo''' '''reboot'''</p></li></ol>
  
[[File:pi3b-img177.png|345x215px]]
+
<span id="linux-sdkorangepi-build使用说明"></span>
 +
= Linux SDK——orangepi-build使用说明 =
  
<ol start="4" style="list-style-type: decimal;">
+
== 编译系统需求 ==
<li>Select '''Activate a connect''' and press Enter</li></ol>
 
  
[[File:pi3b-img178.png|349x216px]]
+
'''我们可以在x64的电脑中交叉编译开发板的Linux镜像,也可以在开发板的Ubuntu22.04系统中来编译开发板的Linux镜像,请根据自己的喜好二选一。'''
  
<ol start="5" style="list-style-type: decimal;">
+
'''如果是在开发板的Ubuntu22.04系统中使用orangepi-build来编译Linux镜像,请做好散热(尤其是SSD启动时)。如果散热没做好,容易出现文件系统跑飞的错误。'''
<li>Then you can see all the searched WIFI hotspots</li></ol>
 
  
<div class="figure">
+
<span id="使用开发板的ubuntu22.04系统编译"></span>
 +
=== 使用开发板的Ubuntu22.04系统编译 ===
  
[[File:pi3b-img179.png|426x270px|16]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>Linux SDK,即'''orangepi-build''',支持在开发板的'''Ubuntu 22.04'''的上运行(其它系统没有测试过),所以下载orangepi-build前,请首先确保开发板已安装的Ubuntu版本是Ubuntu 22.04。查看开发板已安装的Ubuntu版本的命令如下所示,如果Release字段显示的不是'''22.04''',说明当前使用的Ubuntu版本不符合要求,请更换系统后再进行下面的操作。</p>
 +
<p>orangepi@orangepi:~$ '''lsb_release -a'''</p>
 +
<p>No LSB modules are available.</p>
 +
<p>Distributor ID: Ubuntu</p>
 +
<p>Description: Ubuntu 22.04.1 LTS</p>
 +
<p>Release: '''22.04'''</p>
 +
<p>Codename: jammy</p></li>
 +
<li><p>'''由于内核和U-boot等源码都是存放在GitHub上的,所以编译镜像的时候请确保开发板能正常从GitHub下载代码,这点是非常重要的。'''</p></li></ol>
  
</div>
+
<span id="使用x64的ubuntu22.04电脑编译"></span>
<ol start="6" style="list-style-type: decimal;">
+
=== 使用x64的Ubuntu22.04电脑编译 ===
<li>Select the WIFI hotspot you want to connect to, then use the Tab key to position the cursor on '''Activate''' and press Enter</li></ol>
 
  
<div class="figure">
+
<ol style="list-style-type: decimal;">
 +
<li><p>Linux SDK,即'''orangepi-build''',支持在安装有'''Ubuntu 22.04'''的电脑上运行,所以下载orangepi-build前,请首先确保自己电脑已安装的Ubuntu版本是Ubuntu 22.04。查看电脑已安装的Ubuntu版本的命令如下所示,如果Release字段显示的不是'''22.04''',说明当前使用的Ubuntu版本不符合要求,请更换系统后再进行下面的操作。</p>
 +
<p>test@test:~$ '''lsb_release -a'''</p>
 +
<p>No LSB modules are available.</p>
 +
<p>Distributor ID: Ubuntu</p>
 +
<p>Description: Ubuntu 22.04 LTS</p>
 +
<p>Release: '''22.04'''</p>
 +
<p>Codename: jammy</p></li>
 +
<li><p>如果电脑安装的是Windows系统,没有安装有Ubuntu 22.04的电脑,可以考虑使用'''VirtualBox'''或者'''VMware'''来在Windows系统中安装一个Ubuntu 22.04虚拟机。但是请注意,不要在WSL虚拟机上编译orangepi-build,因为orangepi-build没有在WSL虚拟机中测试过,所以无法确保能正常在WSL中使用orangepi-build。</p></li>
 +
<li><p>Ubuntu 22.04 '''amd64'''版本的安装镜像下载地址为:</p>
 +
<p>[https://repo.huaweicloud.com/ubuntu-releases/21.04/ubuntu-21.04-desktop-amd64.iso '''https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/22.04/ubuntu-22.04-desktop-amd64.iso''']</p>
 +
<p>或者</p>
 +
<p>'''https://repo.huaweicloud.com/ubuntu-releases/22.04/ubuntu-22.04.1-desktop-amd64.iso'''</p></li>
 +
<li><p>在电脑中或者虚拟机中安装完Ubuntu 22.04后,请先设置Ubuntu 22.04的软件源为清华源,不然后面安装软件的时候很容易由于网络原因而出错</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li>替换清华源的方法参考这个网页的说明即可</li></ol>
 +
</li></ol>
  
[[File:pi3b-img180.png|474x298px|17]]
+
[https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ '''https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/''']
  
</div>
+
<ol start="2" style="list-style-type: lower-alpha;">
<ol start="7" style="list-style-type: decimal;">
+
<li><p>注意Ubuntu版本需要切换到22.04</p>
<li>Then a dialog box for entering a password will pop up, enter the corresponding password in '''Password''' and press Enter to start connecting to WIFI</li></ol>
+
<p>[[File:media/image379.png|576x241px]]</p></li>
 +
<li><p>需要替换的'''/etc/apt/sources.list'''文件的内容为</p>
 +
<p>test@test:~$ '''sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak'''</p>
 +
<p>test@test:~$ '''sudo vim /etc/apt/sources.list'''</p>
 +
<p># 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释</p>
 +
<p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse</p>
 +
<p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse</p>
 +
<p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse</p>
 +
<p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse</p>
 +
<p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse</p>
 +
<p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse</p>
 +
<p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse</p>
 +
<p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse</p>
 +
<p># 预发布软件源,不建议启用</p>
 +
<p># deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse</p>
 +
<p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse</p></li>
 +
<li><p>替换完后需要更新下包信息,并确保没有报错</p>
 +
<p>test@test:~$ '''sudo apt update'''</p></li>
 +
<li><p>'''另外,由于内核和U-boot等源码都是存放在GitHub上的,所以编译镜像的时候请确保电脑能正常从GitHub下载代码,这点是非常重要的。'''</p></li></ol>
  
<div class="figure">
+
<span id="获取linux-sdk的源码"></span>
 +
== 获取Linux sdk的源码 ==
  
[[File:pi3b-img181.png|480x308px|18]]
+
=== 从github下载orangepi-build ===
  
</div>
+
# Linux sdk其实指的就是orangepi-build这套代码,orangepi-build是基于armbian build编译系统修改而来的,使用orangepi-build可以编译出多个版本的Linux镜像。首先下载orangepi-build的代码,命令如下所示:
<ol start="8" style="list-style-type: decimal;">
 
<li>After the WIFI connection is successful, a &quot;*&quot; will be displayed in front of the connected WIFI name</li></ol>
 
  
<div class="figure">
+
test@test:~$ '''sudo apt-get update'''
  
[[File:pi3b-img182.png|443x283px|C:\Users\orangepi\Desktop\用户手册插图\Zero3\未标题-9.jpg未标题-9]]
+
test@test:~$ '''sudo apt-get install -y git'''
  
</div>
+
test@test:~$ '''git clone https://github.com/orangepi-xunlong/orangepi-build.git -b next'''
<ol start="9" style="list-style-type: decimal;">
 
<li>You can view the IP address of wifi through the '''ip addr show wlan0''' command</li></ol>
 
  
orangepi@orangepi:~$ '''ip addr show wlan0'''
+
'''注意,Orange Pi 3B开发板是需要下载orangepi-build的next分支源码的,上面的git clone命令需要指定orangepi-build源码的分支为next。'''
  
11: wlan0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
+
[[File:media/image380.png|576x298px]]
  
link/ether 24:8c:d3:aa:76:bb brd ff:ff:ff:ff:ff:ff
+
'''通过git clone命令下载orangepi-build的代码是不需要输入github账号的用户名和密码的(下载本手册中的其他代码也是一样的),如果如输入git clone命令后Ubuntu PC提示需要输入github账号的用户名和密码,一般都是git clone后面的orangepi-build仓库的地址输入错误了,请仔细检查命令拼写是否有错误,而不是以为我们这里忘了提供github账号的用户名和密码。'''
  
inet '''192.168.1.11'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
+
<ol start="2" style="list-style-type: decimal;">
 +
<li>开发板当前使用的u-boot和Linux内核版本如下所示</li></ol>
  
valid_lft 259069sec preferred_lft 259069sec
+
{| class="wikitable"
 +
|-
 +
| style="text-align: left;"| '''分支'''
 +
| style="text-align: left;"| '''u-boot版本'''
 +
| style="text-align: left;"| '''Linux内核版本'''
 +
|-
 +
| style="text-align: left;"| '''legacy'''
 +
| style="text-align: left;"| '''u-boot 2017.09'''
 +
| style="text-align: left;"| '''Linux5.10'''
 +
|}
  
inet6 240e:3b7:3240:c4a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute
+
'''这里所说的分支和orangepi-build源代码的分支不是同一个东西,请不要搞混了。此分支主要是用来区分不同内核源码版本的。'''
  
valid_lft 259071sec preferred_lft 172671sec
+
'''目前RK提供的Linux5.10 bsp内核我们定义为legacy分支。如果以后支持主线内核了,就会添加一个current分支。'''
  
inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute
+
<ol start="3" style="list-style-type: decimal;">
 +
<li><p>orangepi-build下载完后会包含下面的文件和文件夹</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''build.sh''': 编译启动脚本</p></li>
 +
<li><p>'''external''': &gt; 包含编译镜像需要用的配置文件、特定的脚本以及部分程序的源码等</p></li>
 +
<li><p>'''LICENSE''': GPL 2许可证文件</p></li>
 +
<li><p>'''README.md''': orangepi-build说明文件</p></li>
 +
<li><p>'''scripts''': 编译Linux镜像的通用脚本</p>
 +
<p>test@test:~/orangepi-build$ '''ls'''</p>
 +
<p>'''build.sh external LICENSE README.md scripts'''</p>
 +
<p>'''如果是从github下载的orangepi-build的代码,下载完后你可能会发现orangepi-build中并没有包含u-boot和Linux内核的源码,也没有编译u-boot和Linux内核需要用到交叉编译工具链,这是正常的,因为这些东西都存放在其它单独的github仓库或者某些服务器上了(下文会详述其地址)。orangepi-build在脚本和配置文件中会指定u-boot、Linux内核和交叉编译工具链的地址,运行orangepi-build时,当其发现本地没有这些东西,会自动去相应的地方下载的。'''</p></li></ol>
 +
</li></ol>
  
valid_lft forever preferred_lft forever
+
=== 下载交叉编译工具链 ===
  
<ol start="10" style="list-style-type: decimal;">
+
'''只有在x64的电脑中使用orangepi-build编译镜像才会下载交叉编译工具链。在开发板的Ubuntu22.04中编译开发板的Linux镜像是不会下载交叉编译工具链的,此时orangepi-build/toolchains会是一个空文件夹。'''
<li>Use the '''ping''' command to test the connectivity of the wifi network, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''</li></ol>
 
  
orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0'''
+
<ol style="list-style-type: decimal;">
 +
<li><p>orangepi-build第一次运行的时候会自动下载交叉编译工具链放在'''toolchains'''文件夹中,每次运行orangepi-build的build.sh脚本后,都会检查'''toolchains'''中的交叉编译工具链是否都存在,如果不存在则会重新开始下载,如果存在则直接使用,不会重复下载。</p>
 +
<div class="figure">
  
PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data.
+
[[File:media/image381.png|575x278px|选区_396]]
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms
+
</div></li>
 +
<li><p>交叉编译工具链在中国境内的镜像网址为清华大学的开源软件镜像站</p>
 +
<p>[https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/ '''https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/''']</p></li>
 +
<li><p>'''toolchains'''下载完后会包含多个版本的交叉编译工具链,开发板只会使用其中的两个</p>
 +
<p>test@test:~/orangepi-build$ '''ls toolchains/'''</p>
 +
<p>gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu</p>
 +
<p>gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf</p>
 +
<p>gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu</p>
 +
<p>gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf</p>
 +
<p>gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi</p>
 +
<p>gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf</p>
 +
<p>gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu</p>
 +
<p>gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi</p>
 +
<p>gcc-linaro-aarch64-none-elf-4.8-2013.11_linux</p>
 +
<p>gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux</p>
 +
<p>gcc-linaro-arm-none-eabi-4.8-2014.04_linux</p></li>
 +
<li><p>编译Linux内核源码使用的交叉编译工具链为</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>Linux5.10</p>
 +
<p>'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''</p></li></ol>
 +
</li>
 +
<li><p>编译u-boot源码使用的交叉编译工具链为</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>v2017.09</p>
 +
<p>'''gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu'''</p></li></ol>
 +
</li></ol>
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms
+
=== orangepi-build完整目录结构说明 ===
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms
+
<ol style="list-style-type: decimal;">
 +
<li><p>orangepi-build仓库下载完后并不包含Linux内核、u-boot的源码以及交叉编译工具链,Linux内核和u-boot的源码存放在独立的git仓库中</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>Linux内核源码存放的git仓库如下所示:</p>
 +
<p>'''https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-5.10-rk35xx'''</p></li>
 +
<li><p>u-boot源码存放的git仓库如下所示:</p>
 +
<p>'''https://github.com/orangepi-xunlong/u-boot-orangepi/tree/v2017.09-rk3588'''</p></li></ol>
 +
</li>
 +
<li><p>orangepi-build第一次运行的时候会去下载交叉编译工具链、u-boot和Linux内核源码,成功编译完一次Linux镜像后在orangepi-build中可以看到的文件和文件夹有</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''build.sh''': 编译启动脚本</p></li>
 +
<li><p>'''external''': &gt; 包含编译镜像需要用的配置文件、特定功能的脚本以及部分程序的源码,编译镜像过程中缓存的rootfs压缩包也存放在external中</p></li>
 +
<li><p>'''kernel''': &gt; 存放Linux内核的源码,里面名为'''orange-pi-5.10-rk35xx'''的文件夹存放的就是RK3588/RK3588S/RK3566系列开发板legacy分支的内核源码,内核源码的文件夹的名字请不要手动修改,如果修改了,编译系统运行时会重新下载内核源码</p></li>
 +
<li><p>'''LICENSE''': GPL 2许可证文件</p></li>
 +
<li><p>'''README.md''': orangepi-build说明文件</p></li>
 +
<li><p>'''output''': &gt; 存放编译生成的u-boot、Linux等deb包、编译日志以及编译生成的镜像等文件</p></li>
 +
<li><p>'''scripts''': 编译Linux镜像的通用脚本</p></li>
 +
<li><p>'''toolchains''': 存放交叉编译工具链</p></li>
 +
<li><p>'''u-boot''': &gt; 存放u-boot的源码,里面名为'''v2017.09-rk3588'''的文件夹存放的就是RK3588/RK3588S/RK3566系列开发板legacy分支的u-boot源码,u-boot源码的文件夹的名字请不要手动修改,如果修改了,编译系统运行时会重新下载u-boot源码</p></li>
 +
<li><p>'''userpatches''': 存放编译脚本需要用到的配置文件</p>
 +
<p>test@test:~/orangepi-build$ '''ls'''</p>
 +
<p>'''build.sh external kernel LICENSE output README.md scripts toolchains u-boot userpatches'''</p></li></ol>
 +
</li></ol>
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms
+
== 编译u-boot ==
  
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms
+
<ol style="list-style-type: decimal;">
 +
<li><p>运行build.sh脚本,记得加sudo权限</p>
 +
<p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p></li>
 +
<li><p>选择'''U-boot package''',然后回车</p>
 +
<div class="figure">
  
^C
+
[[File:media/image382.png|576x132px|选区_238]]
  
--- www.orangepi.org ping statistics ---
+
</div></li>
 +
<li><p>接着选择开发板的型号</p>
 +
<div class="figure">
  
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
+
[[File:media/image383.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]
  
rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms
+
</div></li>
 
+
<li><p>然后就会开始编译u-boot,编译时提示的部分信息说明如下</p>
<span id="test-method-of-desktop-image"></span>
+
<ol style="list-style-type: lower-alpha;">
==== Test method of desktop image ====
+
<li><p>u-boot源码的版本</p>
 
+
<p>[ o.k. ] Compiling u-boot [ '''v2017.09''' ]</p></li>
# Click the network configuration icon in the upper right corner of the desktop (please do not connect the network cable when testing WIFI)
+
<li><p>交叉编译工具链的版本</p>
 
+
<p>[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 7.4.1''' ]</p></li>
[[File:pi3b-img183.png|377x166px]]
+
<li><p>编译生成的u-boot deb包的路径</p>
 
+
<p>[ o.k. ] Target directory [ '''orangepi-build/output/debs/u-boot''' ]</p></li>
<ol start="2" style="list-style-type: decimal;">
+
<li><p>编译生成的u-boot deb包的包名</p>
<li>Click '''More networks''' in the pop-up drop-down box to see all scanned WIFI hotspots, and then select the WIFI hotspot you want to connect to.</li></ol>
+
<p>[ o.k. ] File name [ '''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb''' ]</p></li>
 +
<li><p>编译使用的时间</p>
 +
<p>[ o.k. ] Runtime [ '''1 min''' ]</p></li>
 +
<li><p>重复编译u-boot的命令,使用下面的命令无需通过图形界面选择,可以直接开始编译u-boot</p>
 +
<p>[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=u-boot KERNEL_CONFIGURE=no''' ]</p></li></ol>
 +
</li>
 +
<li><p>查看编译生成的u-boot deb包</p>
 +
<p>test@test:~/orangepi-build$ '''ls output/debs/u-boot/'''</p>
 +
<p>linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb</p></li>
 +
<li><p>生成的u-boot的deb包包含的文件如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>使用下面的命令可以解压deb包</p>
 +
<p>test@test:~/orangepi-build$ '''cd output/debs/u-boot'''</p>
 +
<p>test@test:~/orangepi_build/output/debs/u-boot$ $ '''dpkg -x''' \</p>
 +
<p>'''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb . (注意命令最后有个”.”)'''</p>
 +
<p>test@test:~/orangepi_build/output/debs/u-boot$ '''ls'''</p>
 +
<p>linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb '''usr'''</p></li>
 +
<li><p>解压后的文件如下所示</p>
 +
<p>test@test:~/orangepi-build/output/debs/u-boot$ '''tree usr'''</p>
 +
<p>usr</p>
 +
<p>└── lib</p>
 +
<p>├── linux-u-boot-legacy-orangepi3b_1.0.0_arm64</p>
 +
<p>│   ├── idbloader.img</p>
 +
<p>│   ├── rkspi_loader.img</p>
 +
<p>│   └── u-boot.itb</p>
 +
<p>└── u-boot</p>
 +
<p>├── LICENSE</p>
 +
<p>├── orangepi-3b-rk3566_defconfig</p>
 +
<p>└── platform_install.sh</p>
 +
<p>3 directories, 6 files</p></li></ol>
 +
</li>
 +
<li><p>orangepi-bulid编译系统编译u-boot源码时首先会将u-boot的源码和github服务器的u-boot源码进行同步,所以如果想修改u-boot的源码,首先需要关闭源码的下载更新功能('''需要完整编译过一次u-boot后才能关闭这个功能,否则会提示找不到u-boot的源码,如果是从百度云盘下载的源码压缩包,则没有这个问题,因为u-boot的源码都已缓存好了'''),否则所作的修改都会被还原,方法如下:</p>
 +
<p>设置userpatches/config-default.conf中的IGNORE_UPDATES变量为”yes”</p>
 +
<p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p>
 +
<p>IGNORE_UPDATES=&quot;'''yes'''&quot;</p></li>
 +
<li><p>调试u-boot代码时,可以使用下面的方法来更新Linux镜像中的u-boot进行测试</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>将编译好的u-boot的deb包上传到开发板的Linux系统中</p>
 +
<p>test@test:~/orangepi-build$ '''cd output/debs/u-boot'''</p>
 +
<p>test@test:~/orangepi_build/output/debs/u-boot$ '''scp \'''</p>
 +
<p>'''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb [mailto:root@192.168.1.xxx:/root root@192.168.1.xxx:/root]'''</p></li>
 +
<li><p>然后登录到开发板,卸载已安装的u-boot的deb包</p>
 +
<p>root@orangepi:~# '''apt purge -y linux-u-boot-orangepi3b-legacy'''</p></li>
 +
<li><p>再安装刚才上传的新的u-boot的deb包</p>
 +
<p>root@orangepi:~# '''dpkg -i''' '''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb'''</p></li>
 +
<li><p>然后运行 nand-sata-install脚本</p>
 +
<p>root@orangepi:~# '''nand-sata-install'''</p></li>
 +
<li><p>然后选择'''5 Install/Update the bootloader on SD/eMM'''来更新TF卡中的u-boot或者'''7 Install/Update the bootloader on SPI Flash'''来更新SPI Flash中的u-boot</p>
 +
<p>[[File:media/image384.png|312x152px]]</p></li>
 +
<li><p>按下回车键后首先会弹出一个Warring</p>
 +
<p>[[File:media/image385.png|309x168px]]</p></li>
 +
<li><p>再按下回车键就会开始更新u-boot,更新完后会显示下面的信息</p>
 +
<p>[[File:media/image386.png|244x137px]]</p></li>
 +
<li><p>然后就可以重启开发板来测试u-boot的修改是否生效了</p></li></ol>
 +
</li>
 +
<li><p>其它有用的信息</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>u-boot 2017.09源码中,开发板使用的defconfig配置文件为</p>
 +
<p>[https://github.com/orangepi-xunlong/u-boot-orangepi/blob/v2017.09-rk3588/configs/orangepi_5_defconfig '''orangepi-build/u-boot/v2017.09-rk3588/configs/orangepi-3b-rk3566_defconfig''']</p></li>
 +
<li><p>u-boot 2017.09源码中,开发板使用dts文件为</p></li></ol>
 +
</li></ol>
  
[[File:pi3b-img184.png|576x353px]]
+
<span id="orangepi-buildu-bootv2017.09-rk3588archarmdtsrk3566-orangepi-3b.dts编译linux内核"></span>
 +
== [https://github.com/orangepi-xunlong/u-boot-orangepi/blob/v2017.09-rk3588/arch/arm/dts/rk3588s-orangepi-5.dts '''orangepi-build/u-boot/v2017.09-rk3588/arch/arm/dts/rk3566-orangepi-3b.dts'''<span id="_Toc12646" class="anchor"></span>]编译Linux内核 ==
  
<ol start="3" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li>Then enter the password of the WIFI hotspot, and then click '''Connect''' to start connecting to WIFI</li></ol>
+
<li><p>运行build.sh脚本,记得加sudo权限</p>
 +
<p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p></li>
 +
<li><p>选择'''Kernel package''',然后回车</p>
 +
<div class="figure">
  
[[File:pi3b-img185.png|320x163px]]
+
[[File:media/image387.png|575x116px|选区_240]]
  
<ol start="4" style="list-style-type: decimal;">
+
</div></li>
<li>After connecting to WIFI, you can open the browser to check whether you can access the Internet. The entrance of the browser is shown in the figure below</li></ol>
+
<li><p>接着选择开发板的型号</p>
 +
<div class="figure">
  
[[File:pi3b-img186.png|576x308px]]
+
[[File:media/image383.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]
  
<ol start="5" style="list-style-type: decimal;">
+
</div></li>
<li>If you can open other web pages after opening the browser, it means that the WIFI connection is normal</li></ol>
+
<li><p>然后会提示是否需要显示内核配置界面,如果不需要修改内核配置,则选择第一个即可,如果需要修改内核配置,则选择第二个</p>
 +
<p>[[File:media/image388.png|576x87px]]</p></li>
 +
<li><p>如果第4) 步选择了需要显示内核配置菜单(第二个选项),则会弹出通过'''make menuconfig'''打开的内核配置的界面,此时可以直接修改内核的配置,修改完后再保存退出即可,退出后会开始编译内核源码</p>
 +
<p>[[File:media/image389.png|575x400px]]</p></li></ol>
  
[[File:pi3b-img187.png|576x222px]]
+
<!-- -->
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>如果不需要修改内核的配置选项,在运行build.sh脚本时,传入'''KERNEL_CONFIGURE=no'''就可临时屏蔽弹出内核的配置界面了</p>
 +
<p>test@test:~/orangepi-build$ '''sudo ./build.sh KERNEL_CONFIGURE=no'''</p></li>
 +
<li><p>也可以设置'''orangepi-build/userpatches/config-default.conf'''配置文件中的'''KERNEL_CONFIGURE=no''',这样可以永久禁用这个功能</p></li>
 +
<li><p>编译内核的时候如果提示下面的错误,这是由于Ubuntu &gt; PC的终端界面太小,导致'''make &gt; menuconfig'''的界面无法显示,请把Ubuntu &gt; PC的终端调到最大,然后重新运行build.sh脚本</p>
 +
<p>[[File:media/image390.png|574x234px]]</p></li></ol>
  
<span id="how-to-set-a-static-ip-address"></span>
+
<!-- -->
=== How to set a static IP address ===
+
<ol start="6" style="list-style-type: decimal;">
 +
<li><p>编译内核源码时提示的部分信息说明如下</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>Linux内核源码的版本</p>
 +
<p>[ o.k. ] Compiling current kernel [ '''5.10.160''' ]</p></li>
 +
<li><p>使用的交叉编译工具链的版本</p>
 +
<p>[ o.k. ] Compiler version [ '''aarch64-none-linux-gnu-gcc 11.2.1''' ]</p></li>
 +
<li><p>内核默认使用的配置文件以及它存放的路径</p>
 +
<p>[ o.k. ] Using kernel config file [ '''config/kernel/linux-rockchip-rk356x-legacy.config''' ]</p></li>
 +
<li><p>编译生成的内核相关的deb包的路径</p>
 +
<p>[ o.k. ] Target directory [ '''orangepi-build/output/debs/''' ]</p></li>
 +
<li><p>编译生成的内核镜像deb包的包名</p>
 +
<p>[ o.k. ] File name [ '''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb''' ]</p></li>
 +
<li><p>编译使用的时间</p>
 +
<p>[ o.k. ] Runtime [ '''5 min''' ]</p></li>
 +
<li><p>最后会显示重复编译上一次选择的内核的编译命令,使用下面的命令无需通过图形界面选择,可以直接开始编译内核源码</p>
 +
<p>[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=kernel KERNEL_CONFIGURE=no''' ]</p></li></ol>
 +
</li>
 +
<li><p>查看编译生成的内核相关的deb包</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''linux-dtb-legacy-rockchip-rk356x_1.0.0_arm64.deb'''包含内核使用的dtb文件</p></li>
 +
<li><p>'''linux-headers-legacy-rockchip-rk356x_1.0.0_arm64.deb'''包含内核头文件</p></li>
 +
<li><p>'''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb'''包含内核镜像和内核模块</p>
 +
<p>test@test:~/orangepi-build$ '''ls output/debs/linux-*'''</p>
 +
<p>output/debs/linux-dtb-legacy-rockchip-rk356x_1.0.0_arm64.deb output/debs/linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb</p>
 +
<p>output/debs/linux-headers-legacy-rockchip-rk356x_1.0.0_arm64.deb</p></li></ol>
 +
</li>
 +
<li><p>生成的linux-image的deb包包含的文件如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>使用下面的命令可以解压deb包</p>
 +
<p>test@test:~/orangepi-build$ '''cd output/debs'''</p></li></ol>
 +
</li></ol>
  
'''Please do not set a static IP address by modifying the /etc/network/interfaces configuration file.'''
+
test@test:~/orangepi_build/output/debs$ '''mkdir test'''
  
<span id="use-the-nmtui-command-to-set-a-static-ip-address"></span>
+
test@test:~/orangepi_build/output/debs$ '''cp \'''
==== Use the nmtui command to set a static IP address ====
 
  
# First run the '''nmtui''' command
+
'''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb test/'''
  
orangepi@orangepi:~$ '''nmtui'''
+
test@test:~/orangepi_build/output/debs$ '''cd test'''
  
<ol start="2" style="list-style-type: decimal;">
+
test@test:~/orangepi_build/output/debs/test$ '''dpkg -x \'''
<li>Then select '''Edit a connection''' and press Enter</li></ol>
 
  
[[File:pi3b-img188.png|227x247px]]
+
'''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb .'''
  
<ol start="3" style="list-style-type: decimal;">
+
test@test:~/orangepi_build/output/debs/test$ '''ls'''
<li>Then select the network interface that needs to set a static IP address, for example, to set the static IP address of the '''Ethernet''' interface, select '''Wired connection 1'''.</li></ol>
 
  
[[File:pi3b-img189.png|310x149px]]
+
'''boot etc lib''' linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb '''usr'''
  
<ol start="4" style="list-style-type: decimal;">
+
<ol start="2" style="list-style-type: lower-alpha;">
<li>Then select '''Edit''' with the '''Tab''' key and press the Enter key</li></ol>
+
<li><p>解压后的文件如下所示</p>
 +
<p>test@test:~/orangepi-build/output/debs/test$ '''tree -L 2'''</p>
 +
<p>.</p>
 +
<p>├── boot</p>
 +
<p>│   ├── config-5.10.160-rockchip-rk356x</p>
 +
<p>│   ├── System.map-5.10.160-rockchip-rk356x</p>
 +
<p>│   └── vmlinuz-5.10.160-rockchip-rk356x</p>
 +
<p>├── etc</p>
 +
<p>│   └── kernel</p>
 +
<p>├── lib</p>
 +
<p>│   └── modules</p>
 +
<p>├── linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb</p>
 +
<p>└── usr</p>
 +
<p>├── lib</p>
 +
<p>└── share</p></li></ol>
  
[[File:pi3b-img190.png|316x144px]]
+
<!-- -->
 
+
<ol start="9" style="list-style-type: decimal;">
<ol start="5" style="list-style-type: decimal;">
+
<li><p>orangepi-bulid编译系统编译Linux内核源码时首先会将Linux内核源码和github服务器的Linux内核源码进行同步,所以如果想修改Linux内核的源码,首先需要关闭源码的更新功能('''需要完整编译过一次Linux内核源码后才能关闭这个功能,否则会提示找不到Linux内核的源码,如果是从百度云盘下载的源码压缩包,则没有这个问题,因为Linux的源码都已缓存好了'''),否则所作的修改都会被还原,方法如下:</p>
<li>Then use the Tab key to move the cursor to the '''&lt;Automatic&gt;''' position shown in the figure below to configure IPv4</li></ol>
+
<p>设置'''userpatches/config-default.conf'''中的IGNORE_UPDATES变量为”yes”</p>
 +
<p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p>
 +
<p>IGNORE_UPDATES=&quot;'''yes'''&quot;</p></li>
 +
<li><p>如果对内核做了修改,可以使用下面的方法来更新开发板Linux系统的内核和内核模块</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>将编译好的Linux内核的deb包上传到开发板的Linux系统中</p>
 +
<p>test@test:~/orangepi-build$ '''cd output/debs'''</p>
 +
<p>test@test:~/orangepi-build/output/debs$ '''scp \'''</p>
 +
<p>'''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb root@192.168.1.xxx:/root'''</p></li>
 +
<li><p>然后登录到开发板,卸载已安装的Linux内核的deb包</p>
 +
<p>root@orangepi:~# '''apt purge -y linux-image-legacy-rockchip-rk356x'''</p></li>
 +
<li><p>再安装刚才上传的新的Linux内核的deb包</p>
 +
<p>root@orangepi:~# '''dpkg -i linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb'''</p></li>
 +
<li><p>然后重启开发板,再查看内核相关的修改是否已生效</p>
 +
<p>root@orangepi:~# '''reboot'''</p></li></ol>
 +
</li>
 +
<li><p>其它有用的信息</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>内核配置文件存放位置如下所示,请不要到内核源码中去找开发板所使用的内核配置文件</p></li>
 +
<li><p>[https://github.com/orangepi-xunlong/orangepi-build/blob/next/external/config/kernel/linux-rockchip-rk3588-legacy.config '''orangepi-build/external/config/kernel/linux-rockchip-rk356x-legacy.config''']开发板使用的dts文件所在的位置为</p></li></ol>
 +
</li></ol>
  
[[File:pi3b-img191.png|575x240px]]
+
[https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-5.10-rk3588/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts '''orangepi-build/kernel/orange-pi-5.10-rk35xx/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dts''']
  
<ol start="6" style="list-style-type: decimal;">
+
== 编译rootfs ==
<li>Then press Enter, select '''Manual''' with the up and down arrow keys, and press Enter to confirm</li></ol>
 
  
[[File:pi3b-img192.png|576x237px]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>运行build.sh脚本,记得加sudo权限</p>
 +
<p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p></li>
 +
<li><p>选择'''Rootfs and all deb packages''',然后回车</p></li></ol>
  
<ol start="7" style="list-style-type: decimal;">
+
<div class="figure">
<li>The display after selection is shown in the figure below</li></ol>
 
  
[[File:pi3b-img193.png|575x240px]]
+
[[File:media/image391.png|576x119px|选区_241]]
  
<ol start="8" style="list-style-type: decimal;">
+
</div>
<li>Then move the cursor to the '''&lt;Show&gt;'''</li></ol>
+
<ol start="3" style="list-style-type: decimal;">
 +
<li><p>接着选择开发板的型号</p>
 +
<div class="figure">
  
[[File:pi3b-img194.png|576x241px]]
+
[[File:media/image383.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]
  
<ol start="9" style="list-style-type: decimal;">
+
</div></li>
<li>Then press Enter, the following setting interface will pop up after entering</li></ol>
+
<li><p>然后选择rootfs的类型</p>
 +
<p>[[File:media/image392.png|575x86px]]</p></li>
 +
<li><p>然后选择镜像的类型</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''Image with console interface &gt; (server)'''表示服务器版的镜像,体积比较小</p></li>
 +
<li><p>'''Image with desktop environment'''表示带桌面的镜像,体积比较大</p>
 +
<div class="figure">
  
[[File:pi3b-img195.png|575x450px]]
+
[[File:media/image393.png|576x75px|选区_245]]
  
<ol start="10" style="list-style-type: decimal;">
+
</div></li></ol>
<li>Then you can set the IP address (Addresses), gateway (Gateway) and DNS server address in the position shown in the figure below (there are many other setting options in it, please explore by yourself),'''Please set it according to your specific needs, the value set in the figure below is just an example'''</li></ol>
+
</li>
 +
<li><p>如果是编译服务器版的镜像,还可以选择编译Standard版本或者Minimal版本,Minimal版本预装的软件会比Standard版本少很多('''没特殊需求请不要选择Minimal版本,因为很多东西默认没有预装,部分功能可能用不了'''</p>
 +
<div class="figure">
  
[[File:pi3b-img196.png|576x233px]]
+
[[File:media/image394.png|576x78px|选区_397]]
  
<ol start="11" style="list-style-type: decimal;">
+
</div></li>
<li>After setting, move the cursor to'''&lt;OK&gt;''' in the lower right corner, and press Enter to confirm</li></ol>
+
<li><p>如果是编译桌面版本的镜像还需要选择桌面环境的类型,目前Ubuntu Jammy主要维护XFCE和Gnome两种桌面,Ubuntu Focal只维护XFCE桌面,Debian Bullseye主要维护XFCE和KDE桌面</p>
 +
<div class="figure">
  
[[File:pi3b-img197.png|576x116px]]
+
[[File:media/image395.png|575x99px|Selection_001]]
  
<ol start="12" style="list-style-type: decimal;">
+
</div>
<li>Then click'''&lt;Back&gt;''' to return to the previous selection interface</li></ol>
+
<p>[[File:media/image396.png|576x74px]]</p>
 +
<p>然后可以选择需要安装的额外的软件包。这里请按下回车键直接跳过。</p>
 +
<p>[[File:media/image397.png|575x264px]]</p></li>
 +
<li><p>然后就会开始编译rootfs,编译时提示的部分信息说明如下所示</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>rootfs的类型</p>
 +
<p>[ o.k. ] local not found [ Creating new rootfs cache for '''jammy''']</p></li>
 +
<li><p>编译生成的rootfs压缩包的存放路径</p>
 +
<p>[ o.k. ] Target directory [ '''external/cache/rootfs''' ]</p></li>
 +
<li><p>编译生成的rootfs压缩包的名字</p>
 +
<p>[ o.k. ] File name [ '''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4''' ]</p></li>
 +
<li><p>编译使用的时间</p>
 +
<p>[ o.k. ] Runtime [ '''13 min''' ]</p></li></ol>
 +
</li>
 +
<li><p>查看编译生成的rootfs压缩包</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4'''是rootfs的压缩包,名字各字段的含义为</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''jammy'''表示rootfs的Linux发行版的类型</p></li>
 +
<li><p>'''xfce'''表示rootfs为桌面版的类型,如果为'''cli'''则表示服务器版类型</p></li>
 +
<li><p>'''arm64'''表示rootfs的架构类型</p></li>
 +
<li><p>'''f930ff6ebbac1a72108a2e100762b18f'''是由rootfs安装的所有软件包的包名生成的MD5哈希值,只要没有修改rootfs安装的软件包的列表,那么这个值就不会变,编译脚本会通过这个MD5哈希值来判断是否需要重新编译rootfs</p></li></ol>
 +
</li>
 +
<li><p>'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list'''列出了rootfs安装的所有软件包的包名</p>
 +
<p>test@test:~/orangepi-build$ '''ls external/cache/rootfs/'''</p>
 +
<p>'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4'''</p>
 +
<p>jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.current</p>
 +
<p>jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list</p></li></ol>
 +
</li>
 +
<li><p>如果需要的rootfs在'''external/cache/rootfs'''下已经存在,那么再次编译rootfs就会直接跳过编译过程,不会重新开始编译,编译镜像的时候也会去'''external/cache/rootfs'''下查找是否已经有缓存可用的rootfs,如果有就直接使用,这样可以节省大量的下载编译时间。</p></li></ol>
  
[[File:pi3b-img198.png|330x325px]]
+
<span id="编译linux镜像"></span>
 +
== 编译Linux镜像 ==
  
<ol start="13" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li>Then select '''Activate a connection''', then move the cursor to'''&lt;OK&gt;''', and finally click Enter</li></ol>
+
<li><p>运行build.sh脚本,记得加sudo权限</p>
 +
<p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p></li>
 +
<li><p>选择'''Full OS image for flashing''',然后回车</p></li></ol>
  
[[File:pi3b-img199.png|331x248px]]
+
<div class="figure">
  
<ol start="14" style="list-style-type: decimal;">
+
[[File:media/image398.png|576x128px|选区_242]]
<li>Then select the network interface that needs to be set, such as '''Wired connection 1''', then move the cursor to'''&lt;Deactivate&gt;''', and press Enter to disable '''Wired connection 1'''</li></ol>
 
  
[[File:pi3b-img200.png|576x224px]]
+
</div>
 +
<ol start="3" style="list-style-type: decimal;">
 +
<li><p>然后选择开发板的型号</p>
 +
<div class="figure">
  
<ol start="15" style="list-style-type: decimal;">
+
[[File:media/image383.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]
<li>Then please do not move the cursor, and then press the Enter key to re-enable '''Wired connection 1''', so that the static IP address set earlier will take effect</li></ol>
 
  
[[File:pi3b-img201.png|576x224px]]
+
</div></li>
 +
<li><p>然后选择rootfs的类型</p>
 +
<p>[[File:media/image392.png|575x86px]]</p></li>
 +
<li><p>然后选择镜像的类型</p>
 +
<ol style="list-style-type: lower-alpha;">
 +
<li><p>'''Image with console interface &gt; (server)'''表示服务器版的镜像,体积比较小</p></li>
 +
<li><p>'''Image with desktop environment'''表示带桌面的镜像,体积比较大</p>
 +
<div class="figure">
  
<ol start="16" style="list-style-type: decimal;">
+
[[File:media/image393.png|576x75px|选区_245]]
<li>Then you can exit nmtui through the'''&lt;Back&gt;''' and '''Quit''' buttons</li></ol>
 
  
[[File:pi3b-img202.png|300x253px]] [[File:pi3b-img203.png|227x252px]]
+
</div></li></ol>
 
+
</li>
<ol start="17" style="list-style-type: decimal;">
+
<li><p>如果是编译服务器版的镜像,还可以选择编译Standard版本或者Minimal版本,Minimal版本预装的软件会比Standard版本少很多('''没特殊需求请不要选择Minimal版本,因为很多东西默认没有预装,部分功能可能用不了'''</p>
<li>Then through '''ip addr show eth0''', you can see that the IP address of the network port has changed to the static IP address set earlier</li></ol>
+
<div class="figure">
  
orangepi@orangepi:~$ '''ip addr show eth0'''
+
[[File:media/image394.png|569x77px|选区_397]]
  
3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
+
</div></li>
 +
<li><p>如果是编译桌面版本的镜像还需要选择桌面环境的类型,目前Ubuntu Jammy主要维护XFCE和Gnome两种桌面,Ubuntu Focal只维护XFCE桌面,Debian Bullseye主要维护XFCE和KDE桌面</p>
 +
<div class="figure">
  
link/ether 5e:ac:14:a5:92:b3 brd ff:ff:ff:ff:ff:ff
+
[[File:media/image395.png|575x99px|Selection_001]]
  
inet '''192.168.1.177'''/24 brd 192.168.1.255 scope global noprefixroute eth0
+
</div>
 
+
<p>[[File:media/image396.png|576x74px]]</p>
valid_lft forever preferred_lft forever
+
<p>然后可以选择需要安装的额外的软件包。这里请按下回车键直接跳过。</p>
 
+
<p>[[File:media/image397.png|575x264px]]</p></li>
inet6 241e:3b8:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute
+
<li><p>然后就会开始编译Linux镜像,编译的大致流程如下</p>
 
+
<ol style="list-style-type: lower-alpha;">
valid_lft 259149sec preferred_lft 172749sec
+
<li><p>初始化Ubuntu PC的编译环境,安装编译过程需要的软件包</p></li>
 
+
<li><p>下载u-boot和Linux内核的源码(如果已经缓存,则只更新代码)</p></li>
inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute
+
<li><p>编译u-boot源码,生成u-boot的deb包</p></li>
 
+
<li><p>编译Linux源码,生成Linux相关的deb包</p></li>
valid_lft forever preferred_lft forever
+
<li><p>制作Linux firmware的deb包</p></li>
 
+
<li><p>制作orangepi-config工具的deb包</p></li>
<ol start="18" style="list-style-type: decimal;">
+
<li><p>制作板级支持的deb包</p></li>
<li>Then you can test the connectivity of the network to check whether the IP address is configured OK, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''</li></ol>
+
<li><p>如果是编译desktop版镜像,还会制作desktop相关的deb包</p></li>
 
+
<li><p>检查rootfs是否已经缓存,如果没有缓存,则重新制作rootfs,如果已经缓存,则直接解压使用</p></li>
orangepi@orangepi:~$ '''ping 192.168.1.47 -I eth0'''
+
<li><p>安装前面生成的deb包到rootfs中</p></li>
 
+
<li><p>对不同的开发板和不同类型镜像做一些特定的设置,如预装额外的软件包,修改系统配置等</p></li>
PING 192.168.1.47 (192.168.1.47) from 192.168.1.188 eth0: 56(84) bytes of data.
+
<li><p>然后制作镜像文件,并格式化分区,默认类型为ext4</p></li>
 
+
<li><p>再将配置好的rootfs拷贝到镜像的分区中</p></li>
64 bytes from 192.168.1.47: icmp_seq=1 ttl=64 time=0.233 ms
+
<li><p>然后更新initramfs</p></li>
 
+
<li><p>最后将u-boot的bin文件通过dd命令写入到镜像中</p></li></ol>
64 bytes from 192.168.1.47: icmp_seq=2 ttl=64 time=0.263 ms
+
</li>
 
+
<li><p>编译完镜像后会提示下面的信息</p>
64 bytes from 192.168.1.47: icmp_seq=3 ttl=64 time=0.273 ms
 
 
 
64 bytes from 192.168.1.47: icmp_seq=4 ttl=64 time=0.269 ms
 
 
 
64 bytes from 192.168.1.47: icmp_seq=5 ttl=64 time=0.275 ms
 
 
 
^C
 
 
 
--- 192.168.1.47 ping statistics ---
 
 
 
5 packets transmitted, 5 received, 0% packet loss, time 4042ms
 
 
 
rtt min/avg/max/mdev = 0.233/0.262/0.275/0.015 ms
 
 
 
<span id="use-the-nmcli-command-to-set-a-static-ip-address"></span>
 
==== Use the nmcli command to set a static IP address ====
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>If you want to set the static IP address of the network port, please insert the network cable into the development board first. '''If you need to set the static IP address of WIFI, please connect the WIFI first, and then start to set the static IP address'''</p></li>
 
<li><p>Then use the '''nmcli con show''' command to view the name of the network device, as shown below</p>
 
 
<ol style="list-style-type: lower-alpha;">
 
<ol style="list-style-type: lower-alpha;">
<li><p>'''orangepi''' is the name of the WIFI network interface (the names are not necessarily the same)</p></li>
+
<li><p>编译生成的镜像的存放路径</p>
<li><p>'''Wired connection 1''' is the name of the Ethernet interface</p></li></ol>
+
<p>[ o.k. ] Done building [ '''output/images/Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160/Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.img''' ]</p></li>
 +
<li><p>编译使用的时间</p></li></ol>
 
</li></ol>
 
</li></ol>
  
orangepi@orangepi:~$ '''nmcli con show'''
+
'''[ o.k. ] Runtime [ 19 min ]'''
  
NAME UUID TYPE DEVICE
+
<ol style="list-style-type: lower-alpha;">
 +
<li><p>重复编译镜像的命令,使用下面的命令无需通过图形界面选择,可以直接开始编译镜像</p>
 +
<p>[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=image RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=yes''' ]</p></li></ol>
  
'''orangepi''' cfc4f922-ae48-46f1-84e1-2f19e9ec5e2a wifi wlan0
+
<span id="android-11系统的使用说明"></span>
 +
= Android 11系统的使用说明 =
  
'''Wired connection 1''' 9db058b7-7701-37b8-9411-efc2ae8bfa30 ethernet eth0
+
<span id="已支持的android版本"></span>
 +
== 已支持的Android版本 ==
  
<ol start="3" style="list-style-type: decimal;">
+
{| class="wikitable"
<li>Then enter the following command, where</li></ol>
+
|-
 +
| style="text-align: left;"| '''Android版本'''
 +
| style="text-align: left;"| '''内核版本'''
 +
|-
 +
| style="text-align: left;"| '''Android 11'''
 +
| style="text-align: left;"| '''Linux4.19'''
 +
|}
  
<blockquote>a. '''&quot;Wired connection 1&quot;''' means to set the static IP address of the Ethernet port. If you need to set the static IP address of the WIFI, please change it to the corresponding name of the WIFI network interface (you can get it through the '''nmcli con show''' command)
+
<span id="android-功能适配情况"></span>
 +
== Android 功能适配情况 ==
  
b. After '''ipv4.addresse''' is the static IP address to be set, which can be modified to the value you want to set
+
{| class="wikitable"
 
+
|-
c. '''ipv4.gateway''' indicates the address of the gateway
+
| style="text-align: left;"| '''功能'''
</blockquote>
+
| style="text-align: left;"| '''Android 11'''
orangepi@orangepi:~$ '''nmcli con mod &quot;Wired connection 1&quot; \'''
+
|-
 
+
| style="text-align: left;"| '''USB2.0x3'''
'''ipv4.addresses &quot;192.168.1.110&quot; \'''
+
| style="text-align: left;"| '''OK'''
 
+
|-
'''ipv4.gateway &quot;192.168.1.1&quot; \'''
+
| style="text-align: left;"| '''USB3.0x1'''
 
+
| style="text-align: left;"| '''OK'''
'''ipv4.dns &quot;8.8.8.8&quot; \'''
+
|-
 
+
| style="text-align: left;"| '''M.2 NVMe SSD启动'''
'''ipv4.method &quot;manual&quot;'''
+
| style="text-align: left;"| '''OK'''
 
+
|-
<ol start="4" style="list-style-type: decimal;">
+
| style="text-align: left;"| '''WIFI'''
<li>Then restart the Linux system</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
|-
orangepi@orangepi:~$ '''sudo reboot'''
+
| style="text-align: left;"| '''蓝牙'''
 
+
| style="text-align: left;"| '''OK'''
<ol start="5" style="list-style-type: decimal;">
+
|-
<li>Then re-enter the Linux system and use the '''ip addr show eth0'''command to see that the IP address has been set to the desired value</li></ol>
+
| style="text-align: left;"| '''GPIO(40pin)'''
 
+
| style="text-align: left;"| '''OK'''
orangepi@orangepi:~$ '''ip addr show eth0'''
+
|-
 
+
| style="text-align: left;"| '''UART(40pin)'''
3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
+
| style="text-align: left;"| '''OK'''
 
+
|-
link/ether 5e:ae:14:a5:91:b3 brd ff:ff:ff:ff:ff:ff
+
| style="text-align: left;"| '''SPI(40pin)'''
 
+
| style="text-align: left;"| '''OK'''
inet '''192.168.1.110'''/32 brd 192.168.1.110 scope global noprefixroute eth0
+
|-
 
+
| style="text-align: left;"| '''I2C(40pin)'''
valid_lft forever preferred_lft forever
+
| style="text-align: left;"| '''OK'''
 
+
|-
inet6 240e:3b7:3240:c3a0:97de:1d01:b290:fe3a/64 scope global dynamic noprefixroute
+
| style="text-align: left;"| '''PWM(40pin)'''
 
+
| style="text-align: left;"| '''OK'''
valid_lft 259183sec preferred_lft 172783sec
+
|-
 
+
| style="text-align: left;"| '''PWM风扇接口'''
inet6 fe80::3312:861a:a589:d3c/64 scope link noprefixroute
+
| style="text-align: left;"| '''OK'''
 
+
|-
valid_lft forever preferred_lft forever
+
| style="text-align: left;"| '''3pin调试串口'''
 
+
| style="text-align: left;"| '''OK'''
<span id="ssh-remote-login-development-board"></span>
+
|-
== SSH remote login development board; ==
+
| style="text-align: left;"| '''EMMC'''
 
+
| style="text-align: left;"| '''OK'''
'''Linux systems enable ssh remote login by default and allow the root user to log in to the system. Before logging in with ssh, you first need to ensure that the Ethernet or wifi network is connected, and then use the ip addr command or check the router to obtain the IP address of the development board.'''
+
|-
 
+
| style="text-align: left;"| '''TF卡启动'''
<span id="ssh-remote-login-development-board-under-ubuntu"></span>
+
| style="text-align: left;"| '''OK'''
=== SSH remote login development board under Ubuntu ===
+
|-
 
+
| style="text-align: left;"| '''HDMI 视频'''
# Obtain the IP address of the development board
+
| style="text-align: left;"| '''OK'''
# Then you can remotely log in to the Linux system through the ssh command
+
|-
 
+
| style="text-align: left;"| '''HDMI 音频'''
test@test:~$ '''ssh [mailto:root@192.168.1.36 root@192.168.1.]xxx''' (Need to be replaced with the IP address of the development board)
+
| style="text-align: left;"| '''OK'''
 
+
|-
root@192.168.1.xx's password: (Enter the password here, the default password is orangepi)
+
| style="text-align: left;"| '''LCD'''
 
+
| style="text-align: left;"| '''OK'''
'''Note that when entering the password, the specific content of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputting.'''
+
|-
 
+
| style="text-align: left;"| '''eDP显示'''
'''If you are prompted to refuse the connection, as long as you are using the image provided by Orange Pi, please do not suspect that the password orangepi is wrong, but look for other reasons.'''
+
| style="text-align: left;"| '''OK'''
 
+
|-
<ol start="3" style="list-style-type: decimal;">
+
| style="text-align: left;"| '''千兆网口'''
<li>After successfully logging in to the system, the display is as shown in the figure below</li></ol>
+
| style="text-align: left;"| '''OK'''
 
+
|-
<div class="figure">
+
| style="text-align: left;"| '''网口状态灯'''
 
+
| style="text-align: left;"| '''OK'''
[[File:pi3b-img204.png|405x207px|L467QDF65C(YR79U]TH[TND]]
+
|-
 
+
| style="text-align: left;"| '''耳机播放'''
</div>
+
| style="text-align: left;"| '''OK'''
'''If ssh cannot log in to the Linux system normally, please first check whether the IP address of the development board can be pinged. If the ping is ok, you can log in to the Linux system through the serial port or HDMI display and then enter the following command on the development board and try again. Is it possible to connect:'''
+
|-
 
+
| style="text-align: left;"| '''耳机录音'''
root@orangepi:~# '''reset_ssh.sh'''
+
| style="text-align: left;"| '''OK'''
 
+
|-
'''If it still doesn't work, try to reset the system.'''
+
| style="text-align: left;"| '''LED灯'''
 
+
| style="text-align: left;"| '''OK'''
<span id="ssh-remote-login-development-board-under-windows"></span>
+
|-
=== SSH remote login development board under Windows ===
+
| style="text-align: left;"| '''GPU'''
 
+
| style="text-align: left;"| '''OK'''
# First obtain the IP address of the development board
+
|-
 
+
| style="text-align: left;"| '''NPU'''
2) Under Windows, you can use MobaXterm to remotely log in to the development board, first create a new ssh session
+
| style="text-align: left;"| '''OK'''
 
+
|-
a. Open '''Session'''
+
| style="text-align: left;"| '''VPU'''
 
+
| style="text-align: left;"| '''OK'''
b. Then select '''SSH''' in '''Session Setting'''
+
|-
 
+
| style="text-align: left;"| '''RTC'''
c. Then enter the IP address of the development board in the '''Remote host'''
+
| style="text-align: left;"| '''OK'''
 +
|}
  
d. Then enter the user name '''root''' or '''orangepi''' of the Linux system in '''Specify username'''
+
<span id="wifi的连接测试方法"></span>
 +
== WIFI的连接测试方法 ==
  
e. Finally click '''OK'''
+
# 首先点击进入'''Setting'''
  
<div class="figure">
+
[[File:media/image399.png|549x228px]]
  
[[File:pi3b-img205.png|553x280px|14]]
 
 
</div>
 
 
<ol start="2" style="list-style-type: decimal;">
 
<ol start="2" style="list-style-type: decimal;">
<li></li>
+
<li>然后选择'''Network &amp; internet'''</li></ol>
<li>Then you will be prompted to enter a password. The default passwords for root and orangepi users are orangepi</li></ol>
 
  
'''Note that when entering the password, the specific content of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputting.'''
+
[[File:media/image400.png|565x120px]]
  
<div class="figure">
+
<ol start="3" style="list-style-type: decimal;">
 +
<li>然后选择'''Wi-Fi'''</li></ol>
  
[[File:pi3b-img206.png|578x150px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\just press Enter after inputting..jpgjust press Enter after inputting.]]
+
[[File:media/image401.png|561x99px]]
  
</div>
 
 
<ol start="4" style="list-style-type: decimal;">
 
<ol start="4" style="list-style-type: decimal;">
<li>After successfully logging in to the system, the display is as shown in the figure below</li></ol>
+
<li>然后打开'''Wi-Fi'''开关</li></ol>
  
[[File:pi3b-img207.png|576x334px]]
+
[[File:media/image402.png|560x167px]]
  
<span id="the-method-of-uploading-files-to-the-linux-system-of-the-development-board"></span>
+
<ol start="5" style="list-style-type: decimal;">
== The method of uploading files to the Linux system of the development board ==
+
<li><p>打开'''Wi-Fi'''后如果一切正常,就可以扫描到附近的Wi-Fi热点了</p>
 +
<p>[[File:media/image403.png|561x166px]]</p></li>
 +
<li><p>然后选择想连接的Wi-Fi后会弹出下图所示的密码输入界面</p>
 +
<p>[[File:media/image404.png|553x237px]]</p></li>
 +
<li><p>然后使用键盘输入Wi-Fi对应的密码,再使用鼠标点击虚拟键盘中的回车按钮就会开始连接Wi-Fi了</p>
 +
<p>[[File:media/image405.png|553x232px]]</p></li>
 +
<li><p>Wi-Fi连接成功后的显示如下图所示:</p>
 +
<p>[[File:media/image406.png|558x102px]]</p></li></ol>
  
<span id="how-to-upload-files-to-the-development-board-linux-system-in-ubuntu-pc"></span>
+
<span id="wi-fi-hotspot的使用方法"></span>
=== How to upload files to the development board Linux system in Ubuntu PC ===
+
== Wi-Fi hotspot的使用方法 ==
  
<span id="how-to-upload-files-using-the-scp-command"></span>
+
<ol style="list-style-type: decimal;">
==== How to upload files using the scp command ====
+
<li><p>首先请确保以太网口已连接网线,并且能正常上网</p></li>
 +
<li><p>然后选择'''Settings'''</p>
 +
<p>[[File:media/image399.png|549x228px]]</p></li>
 +
<li><p>然后选择'''Network &amp; internet'''</p>
 +
<p>[[File:media/image400.png|565x120px]]</p></li>
 +
<li><p>然后选择'''Hotspot &amp; tethering'''</p>
 +
<p>[[File:media/image407.png|549x173px]]</p></li>
 +
<li><p>然后选择'''Wi-Fi hotspot'''</p>
 +
<p>[[File:media/image408.png|548x104px]]</p></li>
 +
<li><p>然后打开'''Wi-Fi hotspot''',下图中还可以看到生成的热点的名字和密码,记住它们,在连接热点的时候要用到(如果需要修改热点的名字和密码,需要先关闭'''Wi-Fi hotspot''',然后才能修改)</p>
 +
<p>[[File:media/image409.png|551x158px]]</p></li>
 +
<li><p>此时可以拿出你的手机,如果一切正常,在手机搜索到的WI-FI列表中就能找到上图'''Hotspot name'''下面显示的同名('''这里为 AndroidAP_6953''')的WIFI热点了。然后可以点击'''AndroidAP_6953'''连接热点,密码在上图的'''Hotspot password''' 下面可以看到</p></li></ol>
  
# Use the scp command to upload files from the Ubuntu PC to the Linux system of the development board. The specific commands are as follows
+
[[File:media/image410.png|313x238px]]
  
<blockquote>a. '''file_path''': need to be replaced with the path of the file to be uploaded
+
<ol start="8" style="list-style-type: decimal;">
 +
<li>连接成功后显示如下图所示(不同手机界面会有区别,具体界面以你手机显示的为准)。此时就可以在手机上打开一个网页看下能否上网了,如果能正常打开网页, 说明开发板的'''WI-FI Hotspot''' 能正常使用</li></ol>
  
b. '''orangepi''': It is the user name of the Linux system of the development board, and it can also be replaced with other ones, such as root
+
[[File:media/image411.png|327x165px]]
  
c. '''192.168.xx.xx''': It is the IP address of the development board, please modify it according to the actual situation
+
== 蓝牙的测试方法 ==
  
d. '''/home/orangepi''': The path in the Linux system of the development board, which can also be modified to other paths
+
<ol style="list-style-type: decimal;">
</blockquote>
+
<li><p>首先点击进入'''Setting'''</p>
test@test:~$ '''scp file_path orangepi@192.168.xx.xx:/home/orangepi/'''
+
<p>[[File:media/image399.png|549x228px]]</p></li>
 +
<li><p>然后选择'''Connected devices'''</p>
 +
<p>[[File:media/image412.png|547x115px]]</p></li>
 +
<li><p>然后点击'''Pair new device'''打开蓝牙并开始扫描周围的蓝牙设备</p>
 +
<p>[[File:media/image413.png|547x126px]]</p></li>
 +
<li><p>搜索到的蓝牙设备会在'''Available devices'''下面显示出来</p>
 +
<p>[[File:media/image414.png|559x279px]]</p></li>
 +
<li><p>然后点击想要连接的蓝牙设备就可以开始配对了,当弹出下面的界面时,请使用鼠标选择'''Pair'''选项</p>
 +
<p>[[File:media/image415.png|522x212px]]</p></li>
 +
<li><p>这里测试的是开发板和安卓手机蓝牙的配置过程,此时在手机上会弹出下面的确认界面,在手机上也点击配对按钮后就会开始配对过程</p>
 +
<p>[[File:media/image416.png|236x273px]]</p></li>
 +
<li><p>配对完成后,可以看到如下图所示的已配对的蓝牙设备</p>
 +
<p>[[File:media/image417.png|545x178px]]</p></li>
 +
<li><p>此时可以使用手机蓝牙给开发板发送一张图片,发送后,在开发板的安卓系统中可以看到下面的确认界面,然后点击'''Accept'''就可以开始接收手机发过来的图片了</p>
 +
<p>[[File:media/image418.png|559x238px]]</p></li>
 +
<li><p>开发板Android系统蓝牙接收到的图片可以在文件管理器中打开'''Download'''目录查看</p>
 +
<p>[[File:media/image419.png|573x97px]]</p></li></ol>
  
<ol start="2" style="list-style-type: decimal;">
+
== 树莓派5寸屏幕的使用方法 ==
<li>If you want to upload a folder, you need to add the -r parameter</li></ol>
 
  
test@test:~$ '''scp -r dir_path orangepi@192.168.xx.xx:/home/orangepi/'''
+
'''请确保使用的镜像为下面的两个版本的镜像:'''
  
<ol start="3" style="list-style-type: decimal;">
+
'''OrangePi3B_RK3566_Android11_lcd_v1.x.x.img'''
<li>There are more usages of scp, please use the following command to view the man manual</li></ol>
 
  
test@test:~$ '''man scp'''
+
'''OrangePi3B_RK3566_Android11_spi-nvme_lcd_v1.x.x.img'''
  
<span id="how-to-upload-files-using-filezilla"></span>
+
<ol style="list-style-type: decimal;">
==== How to upload files using filezilla ====
+
<li><p>首先需要组装好屏幕,请参考[[\l|'''树莓派5寸屏幕的组装方法''']]</p></li>
 +
<li><p>给板子接通Type-C电源,并上电,系统启动后,就可以看到屏幕显示如下图所示</p>
 +
<p>[[File:media/image420.png|516x332px]]</p></li></ol>
  
# First install filezilla in Ubuntu PC
+
<span id="pin-接口-gpiouartspi-和-pwm-测试"></span>
 +
== 40pin 接口 GPIO、UART、SPI 和 PWM 测试 ==
  
test@test:~$ '''sudo apt install -y filezilla'''
+
<span id="pin-gpio-口测试"></span>
 +
=== 40pin GPIO 口测试 ===
  
<ol start="2" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li>Then use the following command to open filezilla</li></ol>
+
<li><p>首先点击wiringOP图标打开wiringOP APP</p>
 +
<p>[[File:media/image421.png|576x210px]]</p></li>
 +
<li><p>wiringOP APP的主界面显示如下图所示,然后点击'''GPIO_TEST'''按钮打开GPIO测试界面</p>
 +
<p>[[File:media/image422.png|575x148px]]</p></li>
 +
<li><p>GPIO测试界面如下图所示,左边的两排'''CheckBox'''按钮跟40pin引脚是一一对应的关系。当勾选'''CheckBox'''按钮时,对应的GPIO引脚会被设置为'''OUT'''模式,引脚电平设置为高电平;当取消勾选时,GPIO引脚电平设置为低电平;当点击右边的'''GPIO READALL'''按钮时,可以获取到wPi号、GPIO模式、引脚电平等信息;当点击'''BLINK ALL GPIO'''按钮时,程序会控制28个GPIO口不停的切换高低电平</p>
 +
<p>[[File:media/image423.png|576x303px]]</p></li>
 +
<li><p>然后点击'''GPIO READALL'''按钮,输出信息如下图所示:</p>
 +
<p>[[File:media/image424.png|575x323px]]</p></li>
 +
<li><p>开发板40pin中总共有28个GPIO口可以使用,下面以7号引脚——对应GPIO为GPIO4_A4 ——对应wPi序号为2——为例演示如何设置GPIO口的高低电平。首先点击7号引脚对应的'''CheckBox'''按钮,当按钮为选中状态时,7号引脚会设置为高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为'''3.3v''',说明设置高电平成功</p>
 +
<p>[[File:media/image425.png|258x349px]]</p></li>
 +
<li><p>然后点击'''GPIO READALL'''按钮,可以看到当前的7号引脚模式为'''OUT''',引脚电平为高电平</p>
 +
<p>[[File:media/image426.png|574x301px]]</p></li>
 +
<li><p>再次点击下图的'''CheckBox'''按钮取消勾选状态,7号引脚会设置为低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为'''0v''',说明设置低电平成功</p>
 +
<p>[[File:media/image427.png|250x345px]]</p></li>
 +
<li><p>然后点击'''GPIO READALL'''按钮,可以看到当前的7号引脚模式为OUT,引脚电平为低电平</p>
 +
<p>[[File:media/image428.png|576x300px]]</p></li></ol>
  
test@test:~$ '''filezilla'''
+
<span id="pin的uart测试-2"></span>
 +
=== 40pin的UART测试 ===
  
<ol start="3" style="list-style-type: decimal;">
+
<ol style="list-style-type: decimal;">
<li>The interface after filezilla is opened is as follows, and the display under the remote site on the right is empty</li></ol>
+
<li><p>Android中默认打开了UART7和UART9,在40pin的位置如下图所示,对应的设备节点分别是'''/dev/ttyS7'''和'''/dev/ttyS9'''</p>
 
+
<p>[[File:media/image272.png|376x92px]]</p></li>
<div class="figure">
+
<li><p>首先点击wiringOP图标打开wiringOP APP</p>
 
+
<p>[[File:media/image421.png|576x210px]]</p></li>
[[File:pi3b-img208.png|576x453px|截图 2022-12-03 19-04-40]]
+
<li><p>wiringOP APP的主界面显示如下图所示,然后点击'''UART_TEST'''按钮打开UART测试界面</p>
 
+
<p>[[File:media/image429.png|575x156px]]</p></li>
</div>
+
<li><p>APP的串口测试界面如下图所示</p></li></ol>
<ol start="4" style="list-style-type: decimal;">
 
<li>The method of connecting the development board is shown in the figure below</li></ol>
 
 
 
<div class="figure">
 
  
[[File:pi3b-img209.png|575x128px|图片565]]
+
[[File:media/image430.png|576x324px]]
  
</div>
 
 
<ol start="5" style="list-style-type: decimal;">
 
<ol start="5" style="list-style-type: decimal;">
<li>Then choose to '''save the password''', and then click '''OK'''</li></ol>
+
<li>下面以测试'''UART7'''为例,在选择框中选择'''/dev/ttyS7'''节点,在编辑框中输入想要设置的波特率,然后点击'''OPEN'''按钮打开'''/dev/ttyS7'''节点,打开成功后,'''OPEN'''按钮变为不可选中状态,'''CLOSE'''按钮和'''SEND'''按钮变为可选中状态</li></ol>
  
[[File:pi3b-img210.png|249x181px]]
+
[[File:media/image431.png|574x166px]]
  
 
<ol start="6" style="list-style-type: decimal;">
 
<ol start="6" style="list-style-type: decimal;">
<li>Then choose to always '''trust this host''', and then click '''OK'''</li></ol>
+
<li><p>然后使用杜邦线短接uart7的RXD和TXD引脚</p>
 +
<p>[[File:media/image432.png|418x103px]]</p></li>
 +
<li><p>然后可以在下面的发送编辑框中输入一段字符,点击'''SEND'''按钮开始发送</p></li></ol>
  
<div class="figure">
+
[[File:media/image433.png|575x161px]]
  
[[File:pi3b-img211.png|278x150px|IMG_256]]
+
<ol start="8" style="list-style-type: decimal;">
 +
<li>如果一切正常,接收框内会显示已接收到的字符串</li></ol>
  
</div>
+
[[File:media/image434.png|574x164px]]
<ol start="7" style="list-style-type: decimal;">
 
<li>After the connection is successful, you can see the directory structure of the development board Linux file system on the right side of the filezilla software</li></ol>
 
  
<div class="figure">
+
<span id="pin的spi测试"></span>
 +
=== 40pin的SPI测试 ===
  
[[File:pi3b-img212.png|533x330px|IMG_256]]
+
<ol style="list-style-type: decimal;">
 +
<li><p>由 40pin 接口的原理图可知,Orange Pi 3B可用的 spi 为 spi3</p>
 +
<p>[[File:media/image267.png|577x193px]]</p></li>
 +
<li><p>这里通过w25q64模块来测试SPI接口,首先在SPI3接口接入w25q64设备</p>
 +
<p>[[File:media/image435.png|373x215px]]</p></li>
 +
<li><p>然后点击wiringOP图标打开wiringOP APP</p>
 +
<p>[[File:media/image421.png|576x210px]]</p></li>
 +
<li><p>wiringOP APP的主界面显示如下图所示,点击SPI_TEST按钮打开SPI的测试界面</p>
 +
<p>[[File:media/image436.png|574x149px]]</p></li>
 +
<li><p>然后点击'''OPEN'''按钮初始化SPI</p></li></ol>
  
</div>
+
[[File:media/image437.png|576x241px]]
<ol start="8" style="list-style-type: decimal;">
 
<li>Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Ubuntu PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board bingo.</li></ol>
 
  
<div class="figure">
+
<ol start="6" style="list-style-type: decimal;">
 +
<li><p>然后填充需要发送的字节,比如读取w25q64的ID信息,在data[0]中填入地址0x9f,然后点击'''TRANSFER'''按钮</p>
 +
<p>[[File:media/image438.png|572x216px]]</p></li>
 +
<li><p>最后APP会显示读取到的ID信息</p></li></ol>
  
[[File:pi3b-img213.png|485x380px|IMG_256]]
+
[[File:media/image439.png|575x296px]]
  
</div>
+
<ol start="8" style="list-style-type: decimal;">
9) After the upload is complete, you can go to the corresponding path in the Linux system of the development board to view the uploaded file
+
<li><p>w25q64模块的MANUFACTURER ID为EFh,Device ID为4017h,跟上面读取到的值是对应的(h代表是16进制)</p>
 +
<p>[[File:media/image440.png|374x126px]]</p></li></ol>
  
10) The method of uploading a folder is the same as that of uploading a file, so I won’t go into details here
+
<span id="pin的pwm测试"></span>
 +
=== 40pin的PWM测试 ===
  
<span id="the-method-of-uploading-files-from-windows-pc-to-the-linux-system-of-the-development-board"></span>
+
<ol style="list-style-type: decimal;">
=== The method of uploading files from Windows PC to the Linux system of the development board ===
+
<li><p>Android默认开启了'''PWM11''',对应的引脚在40pin的所在位置如下图所示</p>
 +
<p>[[File:media/image441.png|334x107px]]</p></li>
 +
<li><p>首先点击wiringOP图标打开wiringOP APP</p>
 +
<p>[[File:media/image421.png|576x210px]]</p></li>
 +
<li><p>然后在wiringOP的主界面点击'''PWM_TEST'''按钮进入PWM的测试界面</p>
 +
<p>[[File:media/image442.png|575x150px]]</p></li>
 +
<li><p>PWM11对应的基地址是'''fe6f0030''',这里pwmchip0右边显示是'''fdd70020.pwm''', 这时需要点击下拉选项选择其它的pwmchip,直到右边显示'''febf0030.pwm'''为止</p>
 +
<p>[[File:media/image443.png|576x178px]]</p></li>
 +
<li><p>当下拉选项选择'''pwmchip3'''时,右边对应的就是PWM11对应的基地址'''fe6f0030'''</p>
 +
<p>[[File:media/image444.png|574x161px]]</p></li>
 +
<li><p>然后确认PWM的通道,默认是0通道,并确认PWM的周期,默认的配置是'''50000ns''',转换为PWM频率是'''20KHz''',可自行修改,点击'''EXPORT'''按钮导出'''PWM11'''</p>
 +
<p>[[File:media/image445.png|575x160px]]</p></li>
 +
<li><p>然后拖动下面的拖动条,就可以改变PWM的占空比,然后勾选Enable就可以输出PWM波形了</p></li></ol>
  
<span id="how-to-upload-files-using-filezilla-1"></span>
+
[[File:media/image446.png|575x167px]]
==== How to upload files using filezilla ====
 
  
# First download the installation file of the Windows version of the filezilla software, the download link is as follows
+
<ol start="8" style="list-style-type: decimal;">
 +
<li>然后使用示波器测量开发板40pin中的第32号引脚就可以看到下面的波形了</li></ol>
  
https://filezilla-project.org/download.php?type=client
+
[[File:media/image447.png|460x276px]]
  
<div class="figure">
+
<span id="adb的使用方法"></span>
 +
== ADB的使用方法 ==
  
[[File:pi3b-img214.png|472x171px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题-15.jpg未标题-15]]
+
=== 使用网络连接adb调试 ===
  
</div>
+
'''使用网络adb无需数据线来连接电脑和开发板,而是通过网络来通信,所以首先请确保开发板的有线或者无线网络已经连接好了,然后获取开发板的IP地址,后面要用到。'''
<div class="figure">
 
  
[[File:pi3b-img215.png|393x283px|图片5552]]
+
<ol style="list-style-type: decimal;">
 
+
<li><p>确保Android系统的'''service.adb.tcp.port'''设置为5555端口号</p>
</div>
+
<p>console:/ # '''getprop | grep &quot;adb.tcp&quot;'''</p>
<ol start="2" style="list-style-type: decimal;">
+
<p>[service.adb.tcp.port]: ['''5555''']</p></li>
<li>The downloaded installation package is as follows, and then double-click to install directly</li></ol>
+
<li><p>如果'''service.adb.tcp.port'''没有设置,可以使用下面的命令设置网络adb的端口号</p></li></ol>
 
 
'''FileZilla_Server_1.5.1_win64-setup.exe'''
 
 
 
During the installation process, please select '''Decline''' on the following installation interface, and then select '''Next&gt;'''
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img216.png|319x251px|IMG_256]]
 
 
 
</div>
 
<ol start="3" style="list-style-type: decimal;">
 
<li>The interface after filezilla is opened is as follows, and the display under the remote site on the right is empty</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img217.png|451x357px|IMG_256]]
 
 
 
</div>
 
<ol start="4" style="list-style-type: decimal;">
 
<li>The method of connecting the development board is shown in the figure below:</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img209.png|575x128px|图片565]]
 
 
 
</div>
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then choose to '''save the password''', and then click '''OK'''</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img218.png|207x146px|IMG_256]]
 
 
 
</div>
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then choose to always '''trust this host''', and then click '''OK'''</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img219.png|221x109px|IMG_256]]
 
 
 
</div>
 
<ol start="7" style="list-style-type: decimal;">
 
<li>After the connection is successful, you can see the directory structure of the development board Linux file system on the right side of the filezilla software</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img220.png|446x329px|图片3]]
 
 
 
</div>
 
<ol start="8" style="list-style-type: decimal;">
 
<li>Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Windows PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board bingo</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img221.png|501x369px|IMG_256]]
 
 
 
</div>
 
<ol start="9" style="list-style-type: decimal;">
 
<li><p>After the upload is complete, you can go to the corresponding path in the Linux system of the development board to view the uploaded file</p></li>
 
<li><p>The method of uploading a folder is the same as that of uploading a file</p></li></ol>
 
 
 
<span id="hdmi-test"></span>
 
== HDMI test ==
 
 
 
<span id="hdmi-display-test"></span>
 
=== HDMI display test ===
 
 
 
# Use HDMI to HDMI cable to connect Orange Pi development board and HDMI monitor
 
 
 
[[File:pi3b-img10.png|199x129px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>After starting the Linux system, if the HDMI monitor has image output, it means that the HDMI interface is in normal use</li></ol>
 
 
 
'''Note that although many notebook computers have an HDMI interface, the HDMI interface of the notebook generally only has the output function, and does not have the function of HDMI in, that is to say, the HDMI output of other devices cannot be displayed on the notebook screen.'''
 
 
 
'''When you want to connect the HDMI of the development board to the HDMI port of the laptop, please make sure that your laptop supports the HDMI in function.'''
 
 
 
'''When the HDMI is not displayed, please check whether the HDMI cable is plugged in tightly. After confirming that there is no problem with the connection, you can change a different screen and try to see if it is displayed.'''
 
 
 
<span id="hdmi-to-vga-display-test"></span>
 
=== HDMI to VGA display test ===
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>First, you need to prepare the following accessories</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>HDMI to VGA converter</li></ol>
 
</li></ol>
 
 
 
[[File:pi3b-img222.png|155x104px]]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>A VGA cable</li></ol>
 
 
 
[[File:pi3b-img223.png|148x133px]]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>A monitor or TV that supports VGA interface</li></ol>
 
 
 
<!-- -->
 
<ol start="2" style="list-style-type: decimal;">
 
<li>HDMI to VGA display test as shown below</li></ol>
 
 
 
[[File:pi3b-img224.png|576x339px]]
 
 
 
'''When using HDMI to VGA display, the development board and the Linux system of the development board do not need to make any settings, only the HDMI interface of the development board can display normally. So if there is a problem with the test, please check whether there is a problem with the HDMI to VGA converter, VGA cable and monitor.'''
 
 
 
<span id="hdmi-resolution-setting-method"></span>
 
=== HDMI resolution setting method ===
 
 
 
# First open '''Display''' in '''Settings'''
 
 
 
[[File:pi3b-img225.png|576x370px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then you can see the current resolution of the system</li></ol>
 
 
 
[[File:pi3b-img226.png|382x254px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Click the drop-down box of Resolution to see all resolutions currently supported by the monitor</li></ol>
 
 
 
[[File:pi3b-img227.png|415x274px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then select the resolution you want to set, and click Apply</li></ol>
 
 
 
[[File:pi3b-img228.png|415x277px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>After the new resolution is set, select '''Keep the configuration'''</li></ol>
 
 
 
[[File:pi3b-img229.png|447x243px]]
 
 
 
<span id="how-to-use-bluetooth"></span>
 
== How to use Bluetooth ==
 
 
 
<span id="test-method-of-desktop-image-1"></span>
 
=== Test method of desktop image ===
 
 
 
# Click the Bluetooth icon in the upper right corner of the desktop.
 
 
 
[[File:pi3b-img230.png|330x128px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then select the adapter</li></ol>
 
 
 
[[File:pi3b-img231.png|375x165px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>If there is a prompt below, select '''Yes'''</li></ol>
 
 
 
[[File:pi3b-img232.png|248x85px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then set '''Visibility Setting''' as '''Always visible''' in the Bluetooth adapter settings interface, and then close it</li></ol>
 
 
 
[[File:pi3b-img233.png|243x229px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then open the configuration interface of the Bluetooth device</li></ol>
 
 
 
[[File:pi3b-img234.png|438x179px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Click '''Search''' to start scanning the surrounding Bluetooth device</li></ol>
 
 
 
[[File:pi3b-img235.png|322x217px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Then select the Bluetooth device you want to connect. If you right -click the mouse, you will pop up the operating interface of this Bluetooth device. Select '''Pair''' to start pairing. Here, it is demonstrated with the Android phone</li></ol>
 
 
 
[[File:pi3b-img236.png|338x263px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>When pairing, the pairing confirmation box will pop up in the upper right corner of the desktop. Select '''Confirm''' to confirm. At this time, the mobile phone also needs to be confirmed</li></ol>
 
 
 
[[File:pi3b-img237.png|417x152px]]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>After pairing with the mobile phone, you can choose the paired Bluetooth device, then right -click and select '''Send a File''' to start sending a picture to the phone</li></ol>
 
 
 
[[File:pi3b-img238.png|439x259px]]
 
 
 
<ol start="10" style="list-style-type: decimal;">
 
<li>The interface of the sending picture is shown below</li></ol>
 
 
 
[[File:pi3b-img239.png|437x253px]]
 
 
 
<span id="usb-interface-test"></span>
 
== USB interface test ==
 
 
 
'''The USB interface can connect USB Hub to expand the number of USB interfaces.'''
 
 
 
<span id="connect-the-usb-mouse-or-keyboard-test"></span>
 
=== Connect the USB mouse or keyboard test ===
 
 
 
# Insert the keyboard of the USB interface into the USB interface of Orange PI development board
 
# Connect Orange PI development board to HDMI display
 
# If the mouse or keyboard can normal operating systems, the USB interface is used normally (the mouse can only be used in the system of the desktop version)
 
 
 
<span id="connect-the-usb-storage-device-test"></span>
 
=== Connect the USB storage device test ===
 
 
 
# First insert the U disk or USB mobile hard disk into the USB interface of Orange PI development board
 
# Execute the following command. If you can see the output of sdX, the U disk recognition is successful
 
 
 
orangepi@orangepi:~$ '''cat /proc/partitions | grep &quot;sd*&quot;'''
 
 
 
major minor #blocks name
 
 
 
8 0 30044160 '''sda'''
 
 
 
8 1 30043119 '''sda1'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Use the mount command to mount the U disk into '''/mnt''', and then you can view the file in the U disk</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo mount /dev/sda1 /mnt/'''
 
 
 
orangepi@orangepi:~$ '''ls /mnt/'''
 
 
 
test.txt
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>After the mounting, you can view the capacity of the U disk through the '''df -h''' command and the mounting point</li></ol>
 
 
 
orangepi@orangepi:~$ '''df -h | grep &quot;sd&quot;'''
 
 
 
/dev/sda1 29G 208K 29G 1% /mnt
 
 
 
<span id="usb-wireless-network-card-test"></span>
 
=== USB wireless network card test ===
 
 
 
The currently '''tested''' USB wireless network cards are shown below. Please test it by yourself for other models of USB wireless network cards. If you cannot use it, you need to transplant the corresponding USB wireless network card driver
 
 
 
{| class="wikitable"
 
|-
 
| No.
 
| Model
 
|
 
|-
 
| 1
 
| RTL8723BU
 
 
 
Support 2.4G WIFI+BT4.0
 
 
 
| [[File:pi3b-img240.png]]
 
|-
 
| 2
 
| RTL8811
 
 
 
Support 2.4G +5G WIFI
 
 
 
| [[File:pi3b-img241.png]]
 
|-
 
| 3
 
| RTL8821CU
 
 
 
Support 2.4G +5G WIFI
 
 
 
Support BT 4.2
 
 
 
| <div class="figure">
 
 
 
[[File:pi3b-img242.png|tb_imag e_share_1670833201 123]]
 
 
 
</div>
 
|}
 
 
 
<span id="rtl8723bu-test"></span>
 
==== RTL8723BU test ====
 
 
 
# First insert the RTL8723BU wireless network card module into the USB interface of the development board
 
# Then the Linux system will automatically load the RTL8723BU Bluetooth and WiFi -related kernel modules. You can see that the kernel module below is automatically loaded through the lsmod command
 
 
 
orangepi@orangepi:~$ '''lsmod'''
 
 
 
Module Size Used by
 
 
 
rfcomm 57344 16
 
 
 
rtl8xxxu 106496 0
 
 
 
rtk_btusb 61440 0
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>You can see the loading information of the RTL8723BU module through the dmesg command</li></ol>
 
 
 
orangepi@orangepi:~$ '''dmesg'''
 
 
 
......
 
 
 
[ 83.438901] usb 2-1: new high-speed USB device number 2 using ehci-platform
 
 
 
[ 83.588375] usb 2-1: New USB device found, idVendor=0bda, idProduct=b720, bcdDevice= 2.00
 
 
 
[ 83.588403] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 
 
 
[ 83.588422] usb 2-1: Product: 802.11n WLAN Adapter
 
 
 
[ 83.588443] usb 2-1: Manufacturer: Realtek
 
 
 
[ 83.588460] usb 2-1: SerialNumber: 00e04c000001
 
 
 
[ 83.601974] Bluetooth: hci0: RTL: examining hci_ver=06 hci_rev=000b lmp_ver=06 lmp_subver=8723
 
 
 
[ 83.603894] Bluetooth: hci0: RTL: rom_version status=0 version=1
 
 
 
[ 83.603920] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723b_fw.bin
 
 
 
[ 83.610108] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723b_config.bin
 
 
 
[ 83.611274] Bluetooth: hci0: RTL: cfg_sz 68, total sz 22564
 
 
 
[ 83.658494] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.6d45ddf.20220519-142432
 
 
 
[ 83.658651] usbcore: registered new interface driver rtk_btusb
 
 
 
[ 83.667124] usb 2-1: This Realtek USB WiFi dongle (0x0bda:0xb720) is untested!
 
 
 
[ 83.667137] usb 2-1: Please report results to Jes.Sorensen@gmail.com
 
 
 
[ 83.890140] usb 2-1: Vendor: Realtek
 
 
 
[ 83.890153] usb 2-1: Product: 802.11n WLAN Adapter
 
 
 
[ 83.890159] usb 2-1: rtl8723bu_parse_efuse: dumping efuse (0x200 bytes):
 
 
 
......
 
 
 
[ 83.890412] usb 2-1: RTL8723BU rev E (SMIC) 1T1R, TX queues 3, WiFi=1, BT=1, GPS=0, HI PA=0
 
 
 
[ 83.890417] usb 2-1: RTL8723BU MAC: 00:13:ef:f4:58:ae
 
 
 
[ 83.890421] usb 2-1: rtl8xxxu: Loading firmware rtlwifi/rtl8723bu_nic.bin
 
 
 
[ 83.895289] usb 2-1: Firmware revision 35.0 (signature 0x5301)
 
 
 
[ 84.050893] Bluetooth: hci0: RTL: fw version 0x0e2f9f73
 
 
 
[ 84.266905] Bluetooth: RFCOMM TTY layer initialized
 
 
 
[ 84.266949] Bluetooth: RFCOMM socket layer initialized
 
 
 
[ 84.266999] Bluetooth: RFCOMM ver 1.11
 
 
 
[ 84.884270] usbcore: registered new interface driver rtl8xxxu
 
 
 
[ 84.912046] rtl8xxxu 2-1:1.2 wlx0013eff458ae: renamed from wlan0
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then you can see the RTL8723BU WIFI device node through the '''sudo ifconfig''' command. Please refer to the WIFI connection test a [[\l|'''section for WIFI connection''']] and testing methods</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo ifconfig wlx0013eff458ae'''
 
 
 
wlx0013eff458ae: flags=4099&lt;UP,BROADCAST,MULTICAST&gt; mtu 1500
 
 
 
ether 00:13:ef:f4:58:ae txqueuelen 1000 (Ethernet)
 
 
 
RX packets 0 bytes 0 (0.0 B)
 
 
 
RX errors 0 dropped 0 overruns 0 frame 0
 
 
 
TX packets 0 bytes 0 (0.0 B)
 
 
 
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then you can see the USB Bluetooth device through the '''hciconfig''' command</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo apt update &amp;&amp; sudo apt install bluez'''
 
 
 
orangepi@orangepi:~$ '''hciconfig'''
 
 
 
hci0: Type: Primary Bus: '''USB'''
 
 
 
BD Address: 00:13:EF:F4:58:AE ACL MTU: 820:8 SCO MTU: 255:16
 
 
 
DOWN
 
 
 
RX bytes:1252 acl:0 sco:0 events:125 errors:0
 
 
 
TX bytes:23307 acl:0 sco:0 commands:125 errors:0
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>You can also see the Bluetooth icon on the desktop. At this time, Bluetooth has not been opened, so a red '''x''' will be displayed</li></ol>
 
 
 
[[File:pi3b-img243.png|576x157px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Click '''Turn Bluetooth On''' to open Bluetooth</li></ol>
 
 
 
[[File:pi3b-img244.png|576x262px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>The display after opening Bluetooth is shown below</li></ol>
 
 
 
[[File:pi3b-img245.png|576x164px]]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>Please refer to the [[\l|'''Bluetooth use method''']] for Bluetooth test method, so I won't go into details here.</li></ol>
 
 
 
<span id="rtl8811-test"></span>
 
==== RTL8811 test ====
 
 
 
# First insert the RTL8811 wireless network card module into the USB interface of the development board.
 
# Then the Linux system will automatically load the RTL8811 WIFI -related kernel modules. You can see that the kernel module below is automatically loaded through the lsmod command
 
 
 
orangepi@orangepi:~$ '''lsmod'''
 
 
 
Module Size Used by
 
 
 
8821cu 1839104 0
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>You can see the loading information of the RTL8811 module through the dmesg command</li></ol>
 
 
 
orangepi@orangepi:~$ '''dmesg'''
 
 
 
[ 118.618194] usb 2-1: new high-speed USB device number 2 using ehci-platform
 
 
 
[ 118.767152] usb 2-1: New USB device found, idVendor=0bda, idProduct=c811, bcdDevice= 2.00
 
 
 
[ 118.767181] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 
 
 
[ 118.767199] usb 2-1: Product: 802.11ac NIC
 
 
 
[ 118.767219] usb 2-1: Manufacturer: Realtek
 
 
 
[ 118.767235] usb 2-1: SerialNumber: 123456
 
 
 
[ 119.500530] usbcore: registered new interface driver rtl8821cu
 
 
 
[ 119.525498] rtl8821cu 2-1:1.0 wlx1cbfced9d260: renamed from wlan0
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then you can see the WiFi device node through the '''sudo ifconfig''' command. Please refer to the [[\l|'''WiFi connection test a section''']] for WIFI connection and testing methods. I won't go into details her</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo ifconfig wlx1cbfced9d260'''
 
 
 
wlx1cbfced9d260: flags=4099&lt;UP,BROADCAST,MULTICAST&gt; mtu 1500
 
 
 
ether 1c:bf:ce:d9:d2:60 txqueuelen 1000 (Ethernet)
 
 
 
RX packets 0 bytes 0 (0.0 B)
 
 
 
RX errors 0 dropped 0 overruns 0 frame 0
 
 
 
TX packets 0 bytes 0 (0.0 B)
 
 
 
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
 
 
 
<span id="rtl8821cu-test"></span>
 
==== RTL8821CU test ====
 
 
 
# First insert the rtl8821cu wireless network card module into the USB interface of the development board
 
# Then use the '''lsusb''' command to see the device information of the rtl8821cu usb wifi module. Make sure the USB module is not in the Driver CDROM Mode
 
 
 
orangepi@orangepi:~$ '''lsusb | grep &quot;Realtek&quot;'''
 
 
 
Bus 002 Device 003: ID 0bda:c820 Realtek Semiconductor Corp. 802.11ac NIC
 
 
 
orangepi@orangepi:~$ '''lsusb | grep &quot;Realtek&quot;'''
 
 
 
Bus 002 Device 002: ID 0bda:1a2b Realtek Semiconductor Corp. RTL8188GU 802.11n WLAN Adapter ('''Driver CDROM Mode''')
 
 
 
'''If the USB WIFI module seen by the lsusb command is in Driver CDROM Mode, re -insert the USB WiFi module. If not, please manually execute the following command to switch the mode: '''
 
 
 
orangepi@orangepi:~$ '''sudo usb_modeswitch -KW -v 0bda -p 1a2b'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>The Linux system will automatically load the RTL8821CU Bluetooth and WIFI -related kernel modules. You can see that the kernel module below is automatically loaded through the lsmod command</li></ol>
 
 
 
orangepi@orangepi:~$ '''lsmod'''
 
 
 
Module Size Used by
 
 
 
8821cu 1839104 0
 
 
 
rtk_btusb 61440 0
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>You can see the loading information of the rtl8821cu module through the dmesg command</li></ol>
 
 
 
orangepi@orangepi:~$ '''dmesg'''
 
 
 
......
 
 
 
[ 57.083693] usb 2-1: new high-speed USB device number 2 using ehci-platform
 
 
 
[ 57.231888] usb 2-1: New USB device found, idVendor=0bda, idProduct=1a2b, bcdDevice= 2.00
 
 
 
[ 57.231916] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 
 
 
[ 57.231937] usb 2-1: Product: DISK
 
 
 
[ 57.231956] usb 2-1: Manufacturer: Realtek
 
 
 
[ 57.242594] usb-storage 2-1:1.0: USB Mass Storage device detected
 
 
 
[ 57.245674] scsi host0: usb-storage 2-1:1.0
 
 
 
[ 58.069172] usb 2-1: USB disconnect, device number 2
 
 
 
[ 58.440025] usb 2-1: new high-speed USB device number 3 using ehci-platform
 
 
 
[ 58.587819] usb 2-1: New USB device found, idVendor=0bda, idProduct=c820, bcdDevice= 2.00
 
 
 
[ 58.587827] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 
 
 
[ 58.587833] usb 2-1: Product: 802.11ac NIC
 
 
 
[ 58.587838] usb 2-1: Manufacturer: Realtek
 
 
 
[ 58.587844] usb 2-1: SerialNumber: 123456
 
 
 
[ 58.610463] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.6d45ddf.20220519-142432
 
 
 
[ 58.610656] usbcore: registered new interface driver rtk_btusb
 
 
 
[ 58.634631] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8821
 
 
 
[ 58.636729] Bluetooth: hci0: RTL: rom_version status=0 version=1
 
 
 
[ 58.636740] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin
 
 
 
[ 58.664190] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin
 
 
 
[ 58.664746] Bluetooth: hci0: RTL: cfg_sz 10, total sz 31990
 
 
 
[ 59.122471] Bluetooth: hci0: RTL: fw version 0x829a7644
 
 
 
[ 59.265513] usbcore: registered new interface driver rtl8821cu
 
 
 
[ 59.280119] rtl8821cu 2-1:1.2 wlx90de80521825: renamed from wlan0
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then you can see the RTL8821CU WiFi device node through the '''sudo ifconfig''' command. Please refer to the [[\l|'''WiFi connection test''']] a section for WIFI connection and testing methods.</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo ifconfig wlx90de80521825'''
 
 
 
wlx90de80521825: flags=4099&lt;UP,BROADCAST,MULTICAST&gt; mtu 1500
 
 
 
ether 00:13:ef:f4:58:ae txqueuelen 1000 (Ethernet)
 
 
 
RX packets 0 bytes 0 (0.0 B)
 
 
 
RX errors 0 dropped 0 overruns 0 frame 0
 
 
 
TX packets 0 bytes 0 (0.0 B)
 
 
 
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then you can see the USB Bluetooth device through the '''hciconfig''' command</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo apt-get update &amp;&amp; sudo apt-get install -y bluez'''
 
 
 
orangepi@orangepi:~$ '''hciconfig'''
 
 
 
hci0: Type: Primary Bus: '''USB'''
 
 
 
BD Address: 00:13:EF:F4:58:AE ACL MTU: 820:8 SCO MTU: 255:16
 
 
 
DOWN
 
 
 
RX bytes:1252 acl:0 sco:0 events:125 errors:0
 
 
 
TX bytes:23307 acl:0 sco:0 commands:125 errors:0
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Bluetooth icons can also be seen on the desktop. At this time, Bluetooth has not been opened, so a red '''x''' will be displayed</li></ol>
 
 
 
[[File:pi3b-img243.png|576x157px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>Click '''Turn Bluetooth On''' to open Bluetooth</li></ol>
 
 
 
[[File:pi3b-img244.png|576x262px]]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>The display after opening Bluetooth is shown below</li></ol>
 
 
 
[[File:pi3b-img245.png|576x164px]]
 
 
 
<ol start="10" style="list-style-type: decimal;">
 
<li>Please refer to the [[\l|'''Bluetooth use chapter''']] for the Bluetooth test method. I won't go into details her</li></ol>
 
 
 
<span id="usb-camera-test"></span>
 
=== USB Camera Test ===
 
 
 
# First, you need to prepare a USB camera that supports the UVC protocol in the figure below, and then insert the USB camera into the USB interface of the Orange PI development board
 
 
 
[[File:pi3b-img13.png|259x150px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>You can see that the USB camera's device node information is/dev/video0 through the v4l2-ctl command</li></ol>
 
 
 
orangepi@orangepi:~$ '''v4l2-ctl --list-devices'''
 
 
 
Q8 HD Webcam: Q8 HD Webcam ('''usb'''-fc880000.usb-1):
 
 
 
'''/dev/video0'''
 
 
 
/dev/video1
 
 
 
/dev/media0
 
 
 
'''Note that l in v4l2 is a lowercase letter l, not numbers 1.'''
 
 
 
'''In addition, Video's serial number is not necessarily Video0, please refer to what you see.'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>In the desktop system, you can use Cheese to directly turn on the USB camera. The cheese opening method is shown in the figure below: </li></ol>
 
 
 
[[File:pi3b-img246.png|474x302px]]
 
 
 
The interface after cheese opens the USB camera is shown in the figure below:
 
 
 
[[File:pi3b-img247.png|473x277px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>How to test the USB camera using fswebcam</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Install fswebcam</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo''' '''apt update'''
 
 
 
orangepi@orangepi:~$ '''sudo apt-get install -y fswebcam'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li><p>After installing fswebcam, you can use the following command to take pictures</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>-d The option is used to specify the device node of the USB camera</p></li>
 
<li><p>--no-banner Used to remove the watermark of photos</p></li>
 
<li><p>-r The option is used to specify the resolution of the photo</p></li>
 
<li><p>-S The option is set to the number of frames before skipping</p></li>
 
<li><p>./image.jpg The name and path for setting the generated photos</p></li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo''' '''fswebcam -d /dev/video0 \'''
 
 
 
'''--no-banner -r 1280x720 -S 5 ./image.jpg'''
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>In the service version of the Linux system, you can use the scp command to pass the picture to the Ubuntu PC to watch after taking the photo</li></ol>
 
 
 
orangepi@orangepi:~$ '''scp image.jpg''' [mailto:test@192.168.1.55:/home/test test@192.168.1.55:/home/test] '''(Modify the IP address and path according to the actual situation)'''
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>In the desktop version of the Linux system, you can directly view the shot pictures through the HDMI display</li></ol>
 
 
 
<span id="audio-test"></span>
 
== Audio Test ==
 
 
 
<span id="test-audio-methods-in-the-desktop-system"></span>
 
=== Test audio methods in the desktop system ===
 
 
 
# First open the file manager
 
 
 
[[File:pi3b-img248.png|357x176px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then find the following file (if there is no audio file in the system, you can upload a audio file to the system by yourself)</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img249.png|236x186px|图片10]]
 
 
 
</div>
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then select the audio.wav file, right -click and select VLC to open it to start playing</li></ol>
 
 
 
[[File:pi3b-img250.png|288x234px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>Methods to switch different audio equipment such as HDMI playback and headset playback</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First open the volume control interface</li></ol>
 
</li></ol>
 
 
 
[[File:pi3b-img251.png|308x169px]]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>When playing audio, the audio equipment options that play software can be used will be displayed in '''Playback'''. As shown in the figure below, which audio equipment you need to play here can be set.</li></ol>
 
 
 
[[File:pi3b-img252.png|576x282px]]
 
 
 
<span id="how-to-play-audio-with-commands"></span>
 
=== How to play audio with commands ===
 
 
 
<span id="headphone-interface-play-audio-test"></span>
 
==== Headphone interface play audio test ====
 
 
 
# First insert the headset into the headphone jack of the development board
 
 
 
[[File:pi3b-img253.png|395x112px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then you can check the sound card device supported by the Linux system through the '''aplay -l''' command. From the output below, it can be seen that '''card 0''' is the sound card device with RK809, which is the sound card device of the headset</li></ol>
 
 
 
orangepi@orangepi:~$ '''aplay -l'''
 
 
 
**** List of PLAYBACK Hardware Devices ****
 
 
 
'''card 0: rockchiprk809 [rockchip-rk809], device 0: dailink-multicodecs rk817-hifi-0 [dailink-multicodecs rk817-hifi-0]'''
 
 
 
'''Subdevices: 0/1'''
 
 
 
'''Subdevice #0: subdevice #0'''
 
 
 
card 1: rockchiphdmi [rockchip,hdmi], device 0: fe400000.i2s-i2s-hifi i2s-hifi-0 [fe400000.i2s-i2s-hifi i2s-hifi-0]
 
 
 
Subdevices: 0/1
 
 
 
Subdevice #0: subdevice #0
 
 
 
Subdevice #0: subdevice #0
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then use the '''aplay''' command to play the audio file that comes with the system. If the headset can hear the sound, it means that the hardware can be used normally</li></ol>
 
 
 
orangepi@orangepi:~$ '''aplay -D hw:0,0 /usr/share/sounds/alsa/audio.wav'''
 
 
 
Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
 
 
 
<span id="hdmi-audio-play-test"></span>
 
==== HDMI Audio Play Test ====
 
 
 
# First use the HDMI to HDMI cable to connect the Orange PI development board to the TV (other HDMI displays need to ensure that the audio can be played)
 
# Then check the sound card serial number of HDMI. From the output below, you can know that the HDMI sound card is '''card 1'''
 
 
 
orangepi@orangepi:~$ '''aplay -l'''
 
 
 
**** List of PLAYBACK Hardware Devices ****
 
 
 
card 0: rockchiprk809 [rockchip-rk809], device 0: dailink-multicodecs rk817-hifi-0 [dailink-multicodecs rk817-hifi-0]
 
 
 
Subdevices: 0/1
 
 
 
Subdevice #0: subdevice #0
 
 
 
'''card 1: rockchiphdmi [rockchip,hdmi], device 0: fe400000.i2s-i2s-hifi i2s-hifi-0 [fe400000.i2s-i2s-hifi i2s-hifi-0]'''
 
 
 
'''Subdevices: 0/1'''
 
 
 
'''Subdevice #0: subdevice #0'''
 
 
 
'''Subdevice #0: subdevice #0'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then use the '''aplay''' command to play the audio file that comes with the system. If the HDMI display or television can hear the sound indicates that the hardware can be used normally</li></ol>
 
 
 
orangepi@orangepi:~$ '''aplay -D hw:1,0 /usr/share/sounds/alsa/audio.wav'''
 
 
 
<span id="use-the-command-to-test-the-recording-method"></span>
 
=== Use the command to test the recording method ===
 
 
 
# Orange Pi 3B development board does not have MICs, and can only record audio through headphones with MIC function. After inserting the headset with the MIC function into the development board, the command below will record a piece of audio through the headset
 
 
 
orangepi@orangepi:~$ '''amixer -c 0 cset name='Capture MIC Path' 'Main Mic''''
 
 
 
orangepi@orangepi:~$ '''arecord -D hw:0,0 -d 5 -f cd -t wav /tmp/test.wav'''
 
 
 
<span id="temperature-sensor"></span>
 
== Temperature Sensor ==
 
 
 
# The command of the system temperature sensor is:
 
 
 
orangepi@orangepi:~$ '''sensors'''
 
 
 
soc_thermal-virtual-0
 
 
 
Adapter: Virtual device
 
 
 
temp1: +41.9°C (crit = +115.0°C)
 
 
 
gpu_thermal-virtual-0
 
 
 
Adapter: Virtual device
 
 
 
temp1: +43.8°C
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>The command of the current temperature of the NVMe SSD solid -state hard disk is: </p>
 
<p>orangepi@orangepi:~$ '''sudo smartctl -a /dev/nvme0 | grep &quot;Temperature:&quot;'''</p>
 
<p>Temperature: '''40 Celsius'''</p></li></ol>
 
 
 
<span id="pin-interface-pin-explanation"></span>
 
== 40 Pin interface pin explanation ==
 
 
 
# Orange Pi 3B Development board 40 Pin interface pins, please refer to the figure below
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img254.png|400x124px|C:\Users\orangepi\Desktop\用户手册插图\pi 3b\Orange-Pi-3B-Development-board-40-Pin(1).jpgOrange-Pi-3B-Development-board-40-Pin(1)]]
 
 
 
</div>
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>The function of the Orange Pi 3B development board 40 PIN interface pins is shown in the table below.</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Below is a complete pins of 40pin</li></ol>
 
</li></ol>
 
 
 
[[File:pi3b-img255.png|575x160px]]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The following form is a picture on the left half of the full table above, which can be seen clearly</li></ol>
 
 
 
[[File:pi3b-img256.png|478x267px]]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The following form is a picture on the right half of the top table above, which can be seen clearly</li></ol>
 
 
 
[[File:pi3b-img257.png|479x266px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>There are a total of '''28''' GPIO ports in the 40pin interface. The voltage of all GPIO ports is '''3.3v'''</li></ol>
 
 
 
<span id="how-to-install-wiringop"></span>
 
== How to install Wiringop ==
 
 
 
'''Note that Wiringop has been pre -installed in the Linux image released by Orange Pi. Unless Wiringop's code is updated, it is not necessary to re -download and install. Just use it directly.'''
 
 
 
'''The storage path of the compiled Wiringop's Deb is wrapped in Orangepi-Build: '''
 
 
 
'''orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb'''
 
 
 
'''After entering the system, you can run the gpio readall command. If you can see the output below, it means that wiringOP is pre -installed and can be used normally.'''
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img258.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]
 
 
 
</div>
 
'''wiringOP is currently adapted to set the GPIO port input output, set the GPIO port output high and low level, and set the function of pulling and down resistance. It is impossible to use functions like hardware PWM.'''
 
 
 
# Download the code of Wiringop
 
 
 
orangepi@orangepi:~$ '''sudo apt update'''
 
 
 
orangepi@orangepi:~$ '''sudo apt install -y git'''
 
 
 
orangepi@orangepi:~$ '''git clone https://github.com/orangepi-xunlong/wiringOP.git -b next'''
 
 
 
'''Note that Orange Pi 3B needs to download the code of the wiringOP next branch, please don't miss the parameter of -b next.'''
 
 
 
'''If there is a problem with the download code from GitHub, you can use the wiringOP source code that comes with the Linux image directly, and the storage location is:/usr/src/wiringOP'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Compile and install wiringOP</li></ol>
 
 
 
orangepi@orangepi:~$ '''cd wiringOP'''
 
 
 
orangepi@orangepi:~/wiringOP$ '''sudo ./build clean'''
 
 
 
orangepi@orangepi:~/wiringOP$ '''sudo ./build'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Test the output of the GPIO Readall command as follows</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img258.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]
 
 
 
</div>
 
<span id="pin-interface-gpio-i2c-uart-spi-and-pwm-test"></span>
 
== 40Pin interface GPIO, I2C, UART, SPI, and PWM test ==
 
 
 
'''Note that if you need to set overlays to open multiple configurations at the same time, please use a space to write in one line like the following space.'''
 
 
 
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
 
 
 
'''overlays=spi3-m0-cs0-spidev i2c2-m1 i2c3-m0 uart7-m2 uart9-m2 pwm11-m1'''
 
 
 
<span id="pin-gpio-port-test"></span>
 
=== 40pin GPIO port test ===
 
 
 
'''The Linux system released by Orange Pi has a pre -installed blink_all_gpio program. This program will set up all 28 GPIO ports in 40pin to switch high and low levels.'''
 
 
 
'''After running the blink_all_gpio program, when using a multimeter to measure the level of the GPIO port, you will find that the GPIO pin will be switched between 0 and 3.3v. Use this program to test whether the GPIO port can work normally'''
 
 
 
'''The method of running blink_all_gpio program is shown below: '''
 
 
 
orangepi@orangepi3b:~$ '''sudo blink_all_gpio''' #Remember to add Sudo permissions
 
 
 
[sudo] password for orangepi: #You need to enter a password here
 
 
 
# A total of 28 GPIO ports can be used in the development board 40pin. Below is No. 7 pins -corresponding GPIO as GPIO4_A4 -corresponding WPI serial number 2 -as an example how to set the height of the GPIO port
 
 
 
[[File:pi3b-img259.png|576x120px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>First set the GPIO port as the output mode, the third parameter needs to enter the serial number of the wPi corresponding to the pins</li></ol>
 
 
 
root@orangepi:~/wiringOP# '''gpio mode 2 out'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then set the GPIO port to output the low level. After setting, you can use the value of the voltage of the pins with a multimeter. If it is 0v, it means that the low -electric flat is successful</li></ol>
 
 
 
root@orangepi:~/wiringOP# '''gpio write 2 0'''
 
 
 
Using GPIO Readall, you can see the value of the No. 7 pin (v) to 0
 
 
 
[[File:pi3b-img260.png|576x120px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then set the GPIO port output high level. After setting, you can use the voltage of the voltage of the permanent meter to measure the voltage. If it is 3.3V, it means that the high-electricity level is successful</li></ol>
 
 
 
root@orangepi:~/wiringOP# '''gpio write 2 1'''
 
 
 
Using GPIO Readall, you can see the value of No. 7 pin (v) into 1
 
 
 
[[File:pi3b-img261.png|576x118px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>The setting method of other pins is similar. Just modify the serial number of the wPi sequence number as the corresponding serial number corresponding to the pin</li></ol>
 
 
 
<span id="pin-gpio-port--down-and-downward-pull--down-resistance-setting-method"></span>
 
=== 40Pin GPIO Port -down and downward pull -down resistance setting method ===
 
 
 
'''Note that the 4 GPIO pins below Orange Pi 3B are invalid because there are 3.3V on the outside, so setting drop -down is invalid. Other pins can be set normally'''
 
 
 
[[File:pi3b-img262.png|575x353px]]
 
 
 
# Below the No. 11 pin—corresponding to GPIO 3_C6-corresponding WPI serial number 5—to demonstrate how to set up and down pull-down resistance of the GPIO port
 
 
 
[[File:pi3b-img263.png|576x147px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>First of all, you need to set the GPIO port as the input mode. The third parameter needs to enter the serial number of the wpi corresponding to the pins</li></ol>
 
 
 
root@orangepi:~/wiringOP# '''gpio mode 5 in'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>After the setting is set to input mode, execute the following command to set the GPIO port as the pull -down mode</li></ol>
 
 
 
root@orangepi:~/wiringOP# '''gpio mode 5 up'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then enter the following command to read the level of the GPIO port. If the level is 1, it means that the drawing mode is successful</li></ol>
 
 
 
root@orangepi:~/wiringOP# '''gpio read 5'''
 
 
 
'''1'''
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then execute the following command to set the GPIO port as the drop-down mode</li></ol>
 
 
 
root@orangepi:~/wiringOP# '''gpio mode 5 down'''
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then enter the following command to read the level of the GPIO port. If the level is 0, it means that the drop -down mode is set successfully</li></ol>
 
 
 
root@orangepi:~/wiringOP# '''gpio read 5'''
 
 
 
'''0'''
 
 
 
<span id="pin-spi-test"></span>
 
=== 40pin SPI Test ===
 
 
 
# From the schematic diagram of the 40PIN interface, the SPI available for Orange Pi 3B is spi3
 
 
 
[[File:pi3b-img264.png|577x193px]]
 
 
 
'''In the Linux system, the SPI3 in 40pin is closed by default, and it needs to be opened manually to use.'''
 
 
 
'''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the spi3.'''
 
 
 
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
 
 
 
'''overlays=spi3-m0-cs0-spidev'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>First check whether there is a '''spidev3.0''' device node in the Linux system. If it exists, it means that the SPI3 has been set. You can use it directly</li></ol>
 
 
 
orangepi@orangepi:~$ '''ls /dev/spidev3.0'''
 
 
 
/dev/spidev3.0
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Do not shorten the two pins of the SPI3 MOSI and MISO, and run the output result of the spidev_test as shown below. You can see that the data of TX and RX is inconsistent</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev3.0'''
 
 
 
spi mode: 0x0
 
 
 
bits per word: 8
 
 
 
max speed: 500000 Hz (500 KHz)
 
 
 
TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.
 
 
 
RX | FF FF FF FF FF FF '''FF FF FF FF FF FF''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF | ............................….
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then the two pins of the SPI3 MOSI (No. 19 pins in the 40pin interface) and MISO (No. 21 in the 40PIN interface) run the output of SPIDEV_TEST as follows.You can see that sending and receiving data is the same.</li></ol>
 
 
 
[[File:pi3b-img265.png|577x83px]]
 
 
 
orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev3.0'''
 
 
 
spi mode: 0x0
 
 
 
bits per word: 8
 
 
 
max speed: 500000 Hz (500 KHz)
 
 
 
TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.
 
 
 
RX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.
 
 
 
<span id="pin-i2c-test"></span>
 
=== 40pin I2C Test ===
 
 
 
# From the table below, the I2C available for Orange Pi 3B is I2C2, I2C3, and I2C4 a total of three groups of I2C bus.
 
 
 
[[File:pi3b-img266.png|576x160px]]
 
 
 
'''It can be seen from the above table that i2c4_m0 and spi3_m0 are pins. The two cannot be opened at the same time. i2c3_m0 and uart3_m0 are also reused. The two cannot be opened at the same time'''
 
 
 
'''In the Linux system, the i2c in 40Pin is closed by default, and it needs to be opened manually to use.'''
 
 
 
'''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the i2c2, i2c3, and i2c4 at the same time. If you only need to open one, then fill in one.'''
 
 
 
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
 
 
 
'''overlays=i2c2-m1 i2c3-m0 i2c4-m0'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>After starting the Linux system, first confirm that the i2c device node exists under/dev</li></ol>
 
 
 
orangepi@orangepi:~# '''ls /dev/i2c-*'''
 
 
 
/dev/i2c-0 '''/dev/i2c-2''' '''/dev/i2c-3''' '''/dev/i2c-4''' /dev/i2c-6
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then connect a i2c device on the i2c pin of the 40Pin connector</li></ol>
 
 
 
{| class="wikitable"
 
|-
 
|
 
| style="text-align: left;"| i2c2-m1
 
| style="text-align: left;"| i2c3-m0
 
| style="text-align: left;"| i2c4-m0
 
|-
 
| Sda Pin
 
| style="text-align: left;"| Corresponding to No. 3 pin
 
| style="text-align: left;"| Corresponding to No. 27 pin
 
| style="text-align: left;"| Corresponding to No. 19 pin
 
|-
 
| Sck Pin
 
| style="text-align: left;"| Corresponding to No. 5 pin
 
| style="text-align: left;"| Corresponding to No. 28 pin
 
| style="text-align: left;"| Corresponding to No. 23 pin
 
|-
 
| Vcc Pin
 
| style="text-align: left;"| Corresponding to No. 1 pin
 
| style="text-align: left;"| Corresponding to No. 1 pin
 
| style="text-align: left;"| Corresponding to No. 1 pin
 
|-
 
| Gnd Pin
 
| style="text-align: left;"| Corresponding to No. 6 pin
 
| style="text-align: left;"| Corresponding to No. 6 pin
 
| style="text-align: left;"| Corresponding to No. 6 pin
 
|}
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then use the '''i2cdetect -y''' command if the address of the connected I2C device can be detected, it means that the I2C can be used normally</li></ol>
 
 
 
orangepi@orangepi:~$ sudo i2cdetect -y 2 #i2c2 command
 
 
 
orangepi@orangepi:~$ sudo i2cdetect -y 3 #i2c3 command
 
 
 
orangepi@orangepi:~$ sudo i2cdetect -y 4 #i2c4 command
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img267.png|476x179px|UN}~]Q}T_70O%Z%RNO8R@YE]]
 
 
 
</div>
 
<span id="pin-uart-test"></span>
 
=== 40pin UART test ===
 
 
 
# As can be seen from the table below, the uart available for Orange Pi 3B is uart3, uart7, and uart9. There are three sets of uart bus
 
 
 
[[File:pi3b-img268.png|575x160px]]
 
 
 
'''As can be seen from the above table, i2c3_m0 and uart3_m0 are reused by pins, and the two cannot be opened at the same time'''
 
 
 
'''In the Linux system, the uart in 40pin is closed by default, and it needs to be opened manually to use.'''
 
 
 
'''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the uart3, uart7, and uart9 at the same time. If you only need to open one, you can fill in one..'''
 
 
 
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
 
 
 
'''overlays=uart3-m0 uart7-m2 uart9-m2'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>After entering the Linux system, first confirm whether there is a device node corresponding to uart under/dev</li></ol>
 
 
 
orangepi@orangepi:~# '''ls /dev/ttyS*'''
 
 
 
/dev/ttyS1 '''/dev'''/'''ttyS3 /dev/ttyS7 /dev/ttyS9'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then start testing the uart interface, first use the rx and tx of the uart interface to be tested by DuPont</li></ol>
 
 
 
{| class="wikitable"
 
|-
 
|
 
| style="text-align: left;"| uart3
 
| style="text-align: left;"| uart7
 
| style="text-align: left;"| uart9
 
|-
 
| Tx pin
 
| style="text-align: left;"| Corresponding to the 28 pin
 
| style="text-align: left;"| Corresponding to the 16 pin
 
| style="text-align: left;"| Corresponding to the 29 pin
 
|-
 
| Rx Pin
 
| style="text-align: left;"| Corresponding to the 27 pin
 
| style="text-align: left;"| Corresponding to the 15 pin
 
| style="text-align: left;"| Corresponding to the 7 pin
 
|}
 
 
 
[[File:pi3b-img269.png|545x134px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>Use the '''gpio serial''' command to test the loop function of the serial port as shown below. If you can see the following printing, it means that the serial communication is normal</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Test UART3</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo gpio serial /dev/ttyS3'''
 
 
 
[sudo] password for orangepi: #Enter the password here.
 
 
 
Out: 0: -&gt; 0
 
 
 
Out: 1: -&gt; 1
 
 
 
Out: 2: -&gt; 2
 
 
 
Out: 3: -&gt; 3
 
 
 
Out: 4: -&gt; 4
 
 
 
Out: 5: -&gt; 5^C
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Test UART7</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo gpio serial /dev/ttyS7'''
 
 
 
[sudo] password for orangepi: #Enter the password here.
 
 
 
Out: 0: -&gt; 0
 
 
 
Out: 1: -&gt; 1
 
 
 
Out: 2: -&gt; 2
 
 
 
Out: 3: -&gt; 3
 
 
 
Out: 4: -&gt; 4
 
 
 
Out: 5: -&gt; 5^C
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Test UART9</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo gpio serial /dev/ttyS9'''
 
 
 
[sudo] password for orangepi: #Enter the password here.
 
 
 
Out: 0: -&gt; 0
 
 
 
Out: 1: -&gt; 1
 
 
 
Out: 2: -&gt; 2
 
 
 
Out: 3: -&gt; 3
 
 
 
Out: 4: -&gt; 4
 
 
 
Out: 5: -&gt; 5^C
 
 
 
<span id="pwm-test-method"></span>
 
=== PWM test method ===
 
 
 
# From the table below, the pwm11 available for Orange Pi 3B
 
 
 
[[File:pi3b-img270.png|575x160px]]
 
 
 
'''In the Linux system, the pwm in 40pin is closed by default, and it needs to be opened manually to use..'''
 
 
 
'''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the pwm11.'''
 
 
 
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
 
 
 
'''overlays=pwm11-m1'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>After opening a pwm, a pwmchipX (X is a specific number) will be available in'''/sys/class/pwm/'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''ls /sys/class/pwm/'''
 
 
 
pwmchip0 pwmchip1
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>Which pwmchip corresponds to pwm11 above? Let's first check out the output of '''ls /sys/class/pwm/ -l''' command, as shown below: </p></li>
 
<li><p>The base address of the pwm11 register is Fe6F0030. Then see the output of '''ls /sys/class/pwm/ -l''' command, you can see that the fe6f0030.pwm is connected to the pwmchip1, so the PWM11 corresponding pwmchip is pwmchip1</p></li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img271.png|576x46px|RCUS$_~VYM{4ZS]_L}DNZQR]]
 
 
 
</div>
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then use the following command to allow pwm11 to output a 50Hz square wave (please switch to the root user first, and then execute the following command)</li></ol>
 
 
 
root@orangepi:~# '''echo 0 &gt; /sys/class/pwm/pwmchip1/export'''
 
 
 
root@orangepi:~# '''echo 20000000 &gt; /sys/class/pwm/pwmchip1/pwm0/period'''
 
 
 
root@orangepi:~# '''echo 1000000 &gt; /sys/class/pwm/pwmchip1/pwm0/duty_cycle'''
 
 
 
root@orangepi:~# '''echo 1 &gt; /sys/class/pwm/pwmchip1/pwm0/enable'''
 
 
 
[[File:pi3b-img272.png|575x346px]]
 
 
 
<span id="how-to-install-and-use-wiringop-python"></span>
 
== How to install and use Wiringop-Python ==
 
 
 
'''Wiringop-Python is the library of the Python language version of Wiringop. It is used to operate the development board's GPIO, I2C, SPI and UART hardware resources such as the development board in the Python program.'''
 
 
 
'''Please note that all the following command below is operated under the root user.'''
 
 
 
<span id="wiringop-python-installation-method"></span>
 
=== Wiringop-Python installation method ===
 
 
 
# First install the dependency package
 
 
 
root@orangepi:~# '''sudo apt-get update'''
 
 
 
root@orangepi:~# '''sudo apt-get -y install git swig python3-dev python3-setuptools'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then use the following command to download the source code of wiringOP-Python</li></ol>
 
 
 
'''Note that the following git clone--recursivee command will automatically download the source code of Wiringop, because Wiringop-Python depends on Wiringop. Please make sure that the download process does not report an error due to network problems.'''
 
 
 
'''If there is a problem with the download code from GitHub, you can use the Wiringop-Python source code that comes with the Linux image directly, and the storage location is:/usr/src/wiringOP-Python'''
 
 
 
root@orangepi:~# '''git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python -b next'''
 
 
 
root@orangepi:~# '''cd wiringOP-Python'''
 
 
 
root@orangepi:~/wiringOP-Python# '''git submodule update --init --remote'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then use the following command to compile wiringOP-Python and install it into the Linux system of the development board</li></ol>
 
 
 
root@orangepi:~# '''cd wiringOP-Python'''
 
 
 
root@orangepi:~/wiringOP-Python# '''python3 generate-bindings.py &gt; bindings.i'''
 
 
 
root@orangepi:~/wiringOP-Python# '''sudo python3 setup.py install'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then enter the following command. If there is a help information output, it means that Wiringop-Python is successfully installed. Press the '''q''' key to exit the interface of the help information</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; help(wiringpi)&quot;'''
 
 
 
Help on module wiringpi:
 
 
 
NAME
 
 
 
wiringpi
 
 
 
DESCRIPTION
 
 
 
# This file was automatically generated by SWIG (http://www.swig.org).
 
 
 
# Version 4.0.2
 
 
 
#
 
 
 
# Do not make changes to this file unless you know what you are doing--modify
 
 
 
# the SWIG interface file instead.
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li><p>Test whether the Wiringop-Python is installed successfully under the Python command line is shown below: </p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First use the Python3 command to enter the command line mode of Python3</li></ol>
 
</li></ol>
 
 
 
root@orangepi:~# '''python3'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then import the Python module of WiringPi</li></ol>
 
 
 
&gt;&gt;&gt; '''import wiringpi;'''
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Enter the following command to view the help information of Wiringop-Python, and press the '''q''' key to exit the interface of the help information</li></ol>
 
 
 
&gt;&gt;&gt; '''help(wiringpi)'''
 
 
 
Help on module wiringpi:
 
 
 
NAME
 
 
 
wiringpi
 
 
 
DESCRIPTION
 
 
 
# This file was automatically generated by SWIG (http://www.swig.org).
 
 
 
# Version 4.0.2
 
 
 
#
 
 
 
# Do not make changes to this file unless you know what you are doing--modify
 
 
 
# the SWIG interface file instead.
 
 
 
CLASSES
 
 
 
builtins.object
 
 
 
GPIO
 
 
 
I2C
 
 
 
Serial
 
 
 
nes
 
 
 
class GPIO(builtins.object)
 
 
 
| GPIO(pinmode=0)
 
 
 
|
 
 
 
&gt;&gt;&gt;
 
 
 
<span id="pin-gpio-port-test-1"></span>
 
=== 40pin GPIO port test ===
 
 
 
'''Wiringop-Python is the same as Wiringop. You can also determine which GPIO pink can be determined by specifying the WPI number. Because there is no command to check the WPI number in Wiringop-Python, you can only check the board WPI number and physical physical physics through the GPIO command in Wiringop. The corresponding relationship of the pin.'''
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img258.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]
 
 
 
</div>
 
# Below the No. 7 pin — corresponding to GPIO4_a4 -corresponding WPI serial number 2 -to demonstrate how to set the height of the GPIO port
 
 
 
[[File:pi3b-img259.png|576x120px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>The steps of the command test are shown below directly: </p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First set the GPIO port to the output mode. The first parameter of the '''pinMode''' function is the serial number of the wpi corresponding to the pin, and the second parameter is the GPIO mode</li></ol>
 
</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \'''
 
 
 
'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \'''
 
 
 
'''wiringpi.pinMode(2, GPIO.OUTPUT) ; &quot;'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then set the GPIO port output low level. After setting, you can use the voltage of the voltage of the universal meter to measure the pins. If it is 0V, it means that the low -power flat is successful</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \'''
 
 
 
'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''
 
 
 
'''wiringpi.digitalWrite(2, GPIO.LOW)&quot;'''
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Then set the GPIO port output high level. After setting, you can use the value of the voltage of the pins with a multimeter. If it is 3.3V, it means that the high -power flat is successful.</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \'''
 
 
 
'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''
 
 
 
'''wiringpi.digitalWrite(2, GPIO.HIGH)&quot;'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>The steps of testing in the command line of Python3 are shown below: </p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First use the Python3 command to enter the command line mode of Python3</li></ol>
 
</li></ol>
 
 
 
root@orangepi:~# '''python3'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then import the Python module of WiringPi</li></ol>
 
 
 
&gt;&gt;&gt; '''import wiringpi'''
 
 
 
&gt;&gt;&gt; '''from wiringpi import GPIO'''
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Then set the GPIO port as the output mode. The first parameter of the '''pinMode''' function is the serial number of the wpi corresponding to the pin, and the second parameter is the GPIO mode.</li></ol>
 
 
 
&gt;&gt;&gt; '''wiringpi.wiringPiSetup()'''
 
 
 
0
 
 
 
&gt;&gt;&gt; '''wiringpi.pinMode(2, GPIO.OUTPUT)'''
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Then set the GPIO port output low level. After setting, you can use the value of the voltage of the pins with a multimeter. If it is 0V, it means that the low -power flat is set.</li></ol>
 
 
 
&gt;&gt;&gt; '''wiringpi.digitalWrite(2, GPIO.LOW)'''
 
 
 
<ol start="5" style="list-style-type: lower-alpha;">
 
<li>Then set the GPIO port output high level. After setting, you can use the value of the voltage of the pins with a multimeter. If it is 3.3V, it means that the high -power flat is successful</li></ol>
 
 
 
&gt;&gt;&gt; '''wiringpi.digitalWrite(2, GPIO.HIGH)'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Wiringop-Python Sets GPIO high and low levels in the Python code. For reference to the '''blink.py''' test program in Examples, the voltage of the '''blink.py''' test program will set up the voltage of all GPIO ports in the development board 40 PIN</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python# '''cd examples'''
 
 
 
root@orangepi:~/wiringOP-Python/examples# '''ls blink.py'''
 
 
 
'''blink.py'''
 
 
 
root@orangepi:~/wiringOP-Python/examples'''# python3 blink.py'''
 
 
 
<span id="pin-spi-test-1"></span>
 
=== 40pin SPI test ===
 
 
 
# From the schematic diagram of the 40pin interface, the SPI available for Orange Pi 3B is spi3
 
 
 
[[File:pi3b-img264.png|577x193px]]
 
 
 
'''In the Linux system, the spi3 in 40pin is closed by default, and it needs to be opened manually to use.'''
 
 
 
'''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the spi4.'''
 
 
 
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
 
 
 
'''overlays=spi3-m0-cs0-spidev'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>First check whether there is a '''spidev3.0''' device node in the Linux system. If it exists, it means that the SPI3 has been set and can be used directly</li></ol>
 
 
 
orangepi@orangepi:~$ '''ls /dev/spidev3.0'''
 
 
 
/dev/spidev3.0
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>You can then use the spi back function under the '''spidev_test.py''' program in Examples. The '''spidev_test.py''' program needs to specify the following two parameters: </p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>'''--channel''': Specify the channel number of SPI</p></li>
 
<li><p>'''--port''': Specify the port number of SPI</p></li></ol>
 
</li>
 
<li><p>Do not pick up the two pins of the SPI3 MOSI and MISO in short, and run the output result of the spidev_test.py as shown below. You can see that the data of TX and RX are inconsistent</p></li></ol>
 
 
 
root@orangepi:~/wiringOP-Python# '''cd examples'''
 
 
 
root@orangepi:~/wiringOP-Python/examples# '''python3 spidev_test.py \'''
 
 
 
'''--channel 3 --port 0'''
 
 
 
spi mode: 0x0
 
 
 
max speed: 500000 Hz (500 KHz)
 
 
 
Opening device /dev/spidev3.0
 
 
 
TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|
 
 
 
RX | FF FF FF FF FF FF '''FF FF FF FF FF FF''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |.............….|
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then use the TXD (No. 19 pins in the 40Pin interface) and RXD (No. 21 pins in the 40pin interface) of the DuPont line short connection SPI3. Like sending and receiving data, it means that the SPI3 loop test is normal</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python# '''cd examples'''
 
 
 
root@orangepi:~/wiringOP-Python/examples# '''python3 spidev_test.py \'''
 
 
 
'''--channel 3 --port 0'''
 
 
 
spi mode: 0x0
 
 
 
max speed: 500000 Hz (500 KHz)
 
 
 
Opening device /dev/spidev3.0
 
 
 
TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|
 
 
 
RX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|
 
 
 
<span id="pin-i2c-test-1"></span>
 
=== 40pin I2C test ===
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>As can be seen from the table below, the I2C available for Orange Pi 3B is I2C2, I2C3, and I2C4 a total of three groups of I2C bus</li></ol>
 
 
 
[[File:pi3b-img266.png|576x160px]]
 
 
 
'''It can be seen from the above table that I2C4_M0 and SPI3_M0 are pins. The two cannot be opened at the same time. I2C3_M0 and UART3_M0 are also reused. The two cannot be opened at the same time'''
 
 
 
'''In the Linux system, the I2C in 40Pin is closed by default, and it needs to be opened manually to use.'''
 
 
 
'''Add the configuration of the red font part below to the/boot/orangepiEnv.txt, and then restart the Linux system to open the I2C2, i2C3, and I2C4 at the same time. If you only need to open one, then fill in one.'''
 
 
 
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
 
 
 
'''overlays=i2c2-m1 i2c3-m0 i2c4-m0'''
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>After starting the Linux system, first confirm the I2C device node under/dev.</li></ol>
 
 
 
orangepi@orangepi:~# '''ls /dev/i2c-*'''
 
 
 
/dev/i2c-0 '''/dev/i2c-2''' '''/dev/i2c-3''' '''/dev/i2c-4''' /dev/i2c-6
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Then connect a I2C device on the I2C pin of the 40PIN connector. Here is an example of the DS1307 RTC module.</li></ol>
 
 
 
{| class="wikitable"
 
|-
 
|
 
| style="text-align: left;"| i2c2-m1
 
| style="text-align: left;"| i2c3-m0
 
| style="text-align: left;"| i2c4-m0
 
|-
 
| Sda Pin
 
| style="text-align: left;"| Corresponding to No. 3 pin
 
| style="text-align: left;"| Corresponding to No. 27 pin
 
| style="text-align: left;"| Corresponding to No. 19 pin
 
|-
 
| Sck Pin
 
| style="text-align: left;"| Corresponding to No. 5 pin
 
| style="text-align: left;"| Corresponding to No. 28 pin
 
| style="text-align: left;"| Corresponding to No. 23 pin
 
|-
 
| Vcc Pin
 
| style="text-align: left;"| Corresponding to No. 1 pin
 
| style="text-align: left;"| Corresponding to No. 1 pin
 
| style="text-align: left;"| Corresponding to No. 1 pin
 
|-
 
| Gnd Pin
 
| style="text-align: left;"| Corresponding to No. 6 pin
 
| style="text-align: left;"| Corresponding to No. 6 pin
 
| style="text-align: left;"| Corresponding to No. 6 pin
 
|}
 
 
 
[[File:pi3b-img273.png|180x153px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>Then use the '''i2cdetect -y''' command If the address of the connected I2C device can be detected, it means that the I2C can be used normally</li></ol>
 
 
 
orangepi@orangepi:~$ sudo i2cdetect -y 2 #i2c2 command
 
 
 
orangepi@orangepi:~$ sudo i2cdetect -y 3 #i2c3 command
 
 
 
orangepi@orangepi:~$ sudo i2cdetect -y 4 #i2c4 command
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img274.png|464x174px|V@(61L~0})Q`8VLBCAYEP[2]]
 
 
 
</div>
 
<ol start="9" style="list-style-type: decimal;">
 
<li>You can then run the time of the ds '''ds1307.py''' test program in '''examples''' to read the RTC time</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python# '''cd examples'''
 
 
 
root@orangepi:~/wiringOP-Python/examples# '''python3 ds1307.py --device \'''
 
 
 
'''&quot;/dev/i2c-4&quot;'''
 
 
 
Thu 2023-01-05 14:57:55
 
 
 
Thu 2023-01-05 14:57:56
 
 
 
Thu 2023-01-05 14:57:57
 
 
 
^C
 
 
 
exit
 
 
 
<span id="pins-uart-test."></span>
 
=== 40pin's UART test. ===
 
 
 
# As can be seen from the table below, the UART available for Orange Pi 3B is UART3, UART7 and UART9. There are three sets of UART bus
 
 
 
[[File:pi3b-img268.png|575x160px]]
 
 
 
'''As can be seen from the above table, I2C3_M0 and UART3_M0 are reused by pins, and the two cannot be opened at the same time'''
 
 
 
'''In the Linux system, the UART in 40pin is closed by default, and it needs to be opened manually to use.'''
 
 
 
'''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the UART3, UART7, and UART9 at the same time. If you only need to open one, you can fill in one'''
 
 
 
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
 
 
 
'''overlays=uart3-m0 uart7-m2 uart9-m2'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>After entering the Linux system, first confirm whether there is a device node corresponding to UART under/dev</li></ol>
 
 
 
orangepi@orangepi:~# '''ls /dev/ttyS*'''
 
 
 
/dev/ttyS1 '''/dev'''/'''ttyS3 /dev/ttyS7 /dev/ttyS9'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then start testing the UART interface, and first use the RX and TX of the UART interface to be tested by DuPont</li></ol>
 
 
 
{| class="wikitable"
 
|-
 
|
 
| style="text-align: left;"| uart3
 
| style="text-align: left;"| uart7
 
| style="text-align: left;"| uart9
 
|-
 
| Tx Pin
 
| style="text-align: left;"| Corresponding to the 28 pin
 
| style="text-align: left;"| Corresponding to the 16 pin
 
| style="text-align: left;"| Corresponding to the 29 pin
 
|-
 
| Rx Pin
 
| style="text-align: left;"| Corresponding to the 27 pin
 
| style="text-align: left;"| Corresponding to the 15 pin
 
| style="text-align: left;"| Corresponding to the 7 pin
 
|}
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>Use the '''serialTest.py''' program in Examples to test the loop function of the serial port. If you can see the printing below, it means that the serial communication is normal</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Test UART3</li></ol>
 
</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''
 
 
 
'''&quot;/dev/ttyS3&quot;'''
 
 
 
Out: 0: -&gt; 0
 
 
 
Out: 1: -&gt; 1
 
 
 
Out: 2: -&gt; 2
 
 
 
Out: 3: -&gt; 3
 
 
 
Out: 4:^C
 
 
 
exit
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Test UART7</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''
 
 
 
'''&quot;/dev/ttyS7&quot;'''
 
 
 
Out: 0: -&gt; 0
 
 
 
Out: 1: -&gt; 1
 
 
 
Out: 2: -&gt; 2
 
 
 
Out: 3: -&gt; 3
 
 
 
Out: 4:^C
 
 
 
exit
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Test UART9</li></ol>
 
 
 
root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''
 
 
 
'''&quot;/dev/ttyS9&quot;'''
 
 
 
Out: 0: -&gt; 0
 
 
 
Out: 1: -&gt; 1
 
 
 
Out: 2: -&gt; 2
 
 
 
Out: 3: -&gt; 3
 
 
 
Out: 4:^C
 
 
 
exit
 
 
 
<span id="hardware-watch-the-door-dog-test"></span>
 
== Hardware watch the door dog test ==
 
 
 
The WatchDog_test program is pre -installed in the Linux system released by Orange PI, which can be tested directly.
 
 
 
The method of running the WatchDog_test program is shown below:
 
 
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>The second parameter 10 indicates the counting time of the door. If there is no dog feeding in this time, the system will restart.</p></li>
 
<li><p>We can feed the dog by pressing any keys on the keyboard (except ESC). After the dog is fed, the program will print a line of Keep Alive to indicate that the dog is successful</p></li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo watchdog_test 10'''
 
 
 
open success
 
 
 
options is 33152,identity is sunxi-wdt
 
 
 
put_usr return,if 0,success:0
 
 
 
The old reset time is: 16
 
 
 
return ENOTTY,if -1,success:0
 
 
 
return ENOTTY,if -1,success:0
 
 
 
put_user return,if 0,success:0
 
 
 
put_usr return,if 0,success:0
 
 
 
keep alive
 
 
 
keep alive
 
 
 
keep alive
 
 
 
<span id="check-the-serial-number-of-the-rk3566-chip"></span>
 
== Check the serial number of the RK3566 chip ==
 
 
 
The commands of the RK3566 chip serial number are shown below. The serial number of each chip is different, so you can use the serial number to distinguish multiple development boards.
 
 
 
orangepi@orangepi:~$ '''cat_serial.sh'''
 
 
 
Serial : '''8fa18eaf489041f0'''
 
 
 
<span id="the-method-of-downloading-and-installing-the-balenaetcher-version-of-arm64"></span>
 
== The method of downloading and installing the balenaEtcher version of arm64 ==
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>The download address of Balenaetcher ARM64 version is: </p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The download address of the Deb installation package is shown below, and it needs to be installed to use</li></ol>
 
</li></ol>
 
 
 
https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balena-etcher-electron_1.7.9+5945ab1f_arm64.deb
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The download address of the Appimage version that does not need to be installed is shown below: </li></ol>
 
 
 
https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balenaEtcher-1.7.9+5945ab1f-arm64.AppImage
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img275.png|527x211px|IMG_256]]
 
 
 
</div>
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>How to install and use the deb version of Balenaetcher: </p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>deb version of Balenaetcher installation commands as shown below: </li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo apt install -y \'''
 
 
 
'''--fix-broken ./balena-etcher-electron_1.7.9+5945ab1f_arm64.deb'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>After the deb version of Balenaetcher is installed, it can be opened in the Application</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img89.png|507x249px|IMG_256]]
 
 
 
</div>
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The interface after Balenaetcher is opened is shown below: </li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img276.png|429x263px|IMG_256]]
 
 
 
</div>
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>How to use the AppImage version of balenaEtcher: </p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First add permissions to Balenaetcher</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~/Desktop$ '''chmod +x balenaEtcher-1.7.9+5945ab1f-arm64.AppImage'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then select the AppImage version balenaEtcher right -click the mouse, and then click Execute to open balenaEtcher</li></ol>
 
 
 
[[File:pi3b-img277.png|145x118px]]
 
 
 
<span id="the-installation-method-of-the-bt-panel-linux-panel"></span>
 
== The installation method of the Bt-Panel Linux panel ==
 
 
 
'''Bt-Panel Linux panel is a server management software that improves operation and maintenance efficiency. It supports more than 100 server management functions such as one -click LAMP/LNMP/cluster/monitoring/website/FTP/database/Java (excerpted from the [https://www.bt.cn/new/index.html official website of the Bt-Panel])'''
 
 
 
# First of all, the size of the'''/tmp''' space is needed. After setting, you need to '''restart the Linux system of the development board''', and the command is shown below:
 
 
 
orangepi@orangepi:~$ '''sudo sed -i 's/nosuid/&amp;,size=2G/' /etc/fstab'''
 
 
 
orangepi@orangepi:~$ '''sudo reboot'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>After restarting, you can see that the size of the'''/tmp''' space has become 2G.</li></ol>
 
 
 
orangepi@orangepi:~$ '''df -h | grep &quot;/tmp&quot;'''
 
 
 
tmpfs 2.0G 12K '''2.0G''' 1% /tmp
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then enter the following command in the Linux system to start the installation of the Bt-Panel</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo install_bt_panel.sh'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then the pagoda installation program reminds whether to install the '''Bt-Panel''' to the'''/www''' folder, and enter y at this time</li></ol>
 
 
 
+----------------------------------------------------------------------
 
 
 
| Bt-WebPanel FOR CentOS/Ubuntu/Debian
 
 
 
+----------------------------------------------------------------------
 
 
 
| Copyright © 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved.
 
 
 
+----------------------------------------------------------------------
 
 
 
| The WebPanel URL will be http://SERVER_IP:8888 when installed.
 
 
 
+----------------------------------------------------------------------
 
 
 
Do you want to install Bt-Panel to the /www directory now?(y/n): '''y'''
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then you have to wait patiently. When you see the printing information below the terminal output, it means that the pagoda has been installed. The entire installation process takes about 34 minutes. There may be some differences according to the difference in network speed</li></ol>
 
 
 
[[File:pi3b-img278.png|576x233px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li><p>At this time, enter the '''panel address''' displayed above in the browser to open the login interface of the pagoda Linux panel, and then enter the '''username''' and '''password''' displayed in the corresponding position to log in to the Bt-Panel<br />
 
[[File:pi3b-img279.png|575x281px]]</p></li>
 
<li><p>After successfully logging in to the pagoda, the following welcome interface will pop up. First, please take the intermediate user notice to read to the bottom, and then you can choose &quot;I have agreed and read&quot; User Agreement &quot;, and then click&quot; Enter the panel &quot; You can enter the Bt-Panel</p></li></ol>
 
 
 
[[File:pi3b-img280.png|575x317px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>After entering the Bt-Panel, you will first prompt that you need to bind the account of the Bt-Panel official website. If you do n’t have an account, you can go to the pagoda's official website ('''https://www.bt.cn''') to register one.</li></ol>
 
 
 
[[File:pi3b-img281.png|576x300px]]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>The final display interface is shown in the figure below. You can intuitively see some status information of the development board Linux system, such as load state, CPU usage, memory usage and storage space usage</li></ol>
 
 
 
[[File:pi3b-img282.png|575x306px]]
 
 
 
<ol start="10" style="list-style-type: decimal;">
 
<li>More functions of the Bt-Panel can refer to the following information to explore by yourself</li></ol>
 
 
 
Manual: [http://docs.bt.cn '''http://docs.bt.cn''']
 
 
 
Forum address: [https://www.bt.cn/bbs '''https://www.bt.cn/bbs''']
 
 
 
GitHub Link: '''https://github.com/aaPanel/BaoTa'''
 
 
 
<span id="set-the-chinese-environment-and-install-chinese-input-method"></span>
 
== Set the Chinese environment and install Chinese input method ==
 
 
 
'''Note that before installing the Chinese input method, please make sure that the Linux system used in the development board is the desktop version system.'''
 
 
 
<span id="debian-system-installation-method"></span>
 
=== Debian system installation method ===
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>First set the default '''locale''' as Chinese</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Enter the command below to start configured '''locale'''</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then select '''zh_CN.UTF-8 UTF-8''' in the pop-up interface (to move up and down through the upper and lower direction buttons on the keyboard, select it through the space key, and finally move the cursor to '''&lt;OK&gt;''' through the TAB key, then press the ENTER key )</li></ol>
 
 
 
[[File:pi3b-img283.png|575x296px]]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Then set the default '''locale''' as '''zh_CN.UTF-8'''</li></ol>
 
 
 
[[File:pi3b-img284.png|575x160px]]
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>After exiting the interface, the '''locale''' settings will be started. The output displayed by the command line is shown below</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''
 
 
 
Generating locales (this might take a while)...
 
 
 
en_US.UTF-8... done
 
 
 
zh_CN.UTF-8... done
 
 
 
Generation complete.
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then open '''Input Method'''</li></ol>
 
 
 
[[File:pi3b-img285.png|575x361px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then select '''OK'''</li></ol>
 
 
 
[[File:pi3b-img286.png|295x212px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then select '''Yes'''</li></ol>
 
 
 
[[File:pi3b-img287.png|303x192px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then select '''fcitx'''</li></ol>
 
 
 
[[File:pi3b-img288.png|307x220px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then select '''OK'''</li></ol>
 
 
 
[[File:pi3b-img289.png|305x216px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li><p>'''Then restart the Linux system to make the configuration effective'''</p></li>
 
<li><p>Then open '''Fcitx configuration'''</p></li></ol>
 
 
 
[[File:pi3b-img290.png|575x376px]]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>Then click the + of the position shown in the figure below</li></ol>
 
 
 
[[File:pi3b-img291.png|280x187px]]
 
 
 
<ol start="10" style="list-style-type: decimal;">
 
<li>Then search '''Google Pinyin''' and click '''OK'''</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img292.png|291x196px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题-10.jpg未标题-10]]
 
 
 
</div>
 
<ol start="11" style="list-style-type: decimal;">
 
<li>Then put '''Google Pinyin''' to the front</li></ol>
 
 
 
[[File:pi3b-img293.png|299x202px]]
 
 
 
[[File:pi3b-img294.png|300x202px]]
 
 
 
<ol start="12" style="list-style-type: decimal;">
 
<li>Then open the '''Geany''' editor to test the Chinese input method</li></ol>
 
 
 
[[File:pi3b-img295.png|349x212px]]
 
 
 
<ol start="13" style="list-style-type: decimal;">
 
<li>The Chinese input method test is shown below</li></ol>
 
 
 
[[File:pi3b-img296.png|575x325px]]
 
 
 
<ol start="14" style="list-style-type: decimal;">
 
<li><p>You can switch the Chinese and English input method through the '''Ctrl+Space''' shortcut</p></li>
 
<li><p>If the entire system is required as Chinese, the variables in '''/etc/default/locale''' can be set to '''zh_CN.UTF-8'''</p></li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo vim /etc/default/locale'''
 
 
 
# File generated by update-locale
 
 
 
LC_MESSAGES='''zh_CN.UTF-8'''
 
 
 
LANG='''zh_CN.UTF-8'''
 
 
 
LANGUAGE='''zh_CN.UTF-8'''
 
 
 
<ol start="16" style="list-style-type: decimal;">
 
<li>Then '''restart the system''' to see the system displayed as Chinese</li></ol>
 
 
 
[[File:pi3b-img297.png|576x356px]]
 
 
 
<span id="the-installation-method-of-ubuntu-20.04-system"></span>
 
=== The installation method of Ubuntu 20.04 system ===
 
 
 
# First open '''Language Support'''
 
 
 
[[File:pi3b-img298.png|575x351px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then find '''Chinese (China)''' option</li></ol>
 
 
 
[[File:pi3b-img299.png|318x311px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then use the left mouse button to select '''Chinese (China)''' and hold it down, and then drag it up to the beginning. The display is shown below: </li></ol>
 
 
 
[[File:pi3b-img300.png|324x320px]]
 
 
 
'''Note that this step is not easy to drag, please try more patiently.'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then select the '''Apply System-Wide''' to apply the Chinese settings to the entire system</li></ol>
 
 
 
[[File:pi3b-img301.png|321x316px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then set the '''Keyboard input method system''' to '''fcitx'''</li></ol>
 
 
 
[[File:pi3b-img302.png|327x320px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li><p>'''hen restart the Linux system to make the configuration effective'''</p></li>
 
<li><p>After re -entering the system, please do '''not ask me again''' at the interface below, and then determine whether the standard folder should be updated as Chinese based on your preference.</p></li></ol>
 
 
 
[[File:pi3b-img303.png|303x247px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>Then you can see that the desktop is displayed as Chinese</li></ol>
 
 
 
[[File:pi3b-img304.png|575x383px]]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>Then we can open the '''Geany''' to test Chinese input method , and the way to open is shown in the figure below</li></ol>
 
 
 
[[File:pi3b-img305.png|576x292px]]
 
 
 
<ol start="10" style="list-style-type: decimal;">
 
<li>After opening '''Geany''', the default is an English input method. We can switch into Chinese input method through the '''Ctrl+Space''' shortcut keys, and then we can enter Chinese</li></ol>
 
 
 
[[File:pi3b-img306.png|575x308px]]
 
 
 
<span id="the-installation-method-of-ubuntu-22.04-system"></span>
 
=== The installation method of ubuntu 22.04 system ===
 
 
 
# First open '''Language Support'''
 
 
 
[[File:pi3b-img298.png|575x351px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then find '''Chinese (China)''' option</li></ol>
 
 
 
[[File:pi3b-img307.png|335x326px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then use the left mouse button to select '''Chinese (China)''' and hold it down, and then drag it up to the beginning. The display after dragging is shown in the figure below: </li></ol>
 
 
 
[[File:pi3b-img308.png|337x331px]]
 
 
 
'''Note that this step is not easy to drag, please try more patiently.'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then select the '''Apply System-Wide''' to apply the Chinese settings to the entire system</li></ol>
 
 
 
[[File:pi3b-img309.png|336x330px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li><p>'''Then restart the Linux system to make the configuration effective'''</p></li>
 
<li><p>After re -entering the system, please '''do not ask me again''' at the interface below, and then determine whether the standard folder should be updated as Chinese based on your preference</p></li></ol>
 
 
 
[[File:pi3b-img303.png|303x247px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Then you can see that the desktop is displayed as Chinese</li></ol>
 
 
 
[[File:pi3b-img304.png|575x383px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>Then open the Fcitx5 configuration program</li></ol>
 
 
 
[[File:pi3b-img310.png|575x349px]]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>Then choose to use Pinyin input method</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img311.png|338x267px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题-11.jpg未标题-11]]
 
 
 
</div>
 
<ol start="10" style="list-style-type: decimal;">
 
<li>The interface after the selection is shown below, then click OK</li></ol>
 
 
 
[[File:pi3b-img312.png|366x290px]]
 
 
 
<ol start="11" style="list-style-type: decimal;">
 
<li>Then we can open the '''Geany''' to test Chinese input method, and the way to open is shown in the figure below</li></ol>
 
 
 
[[File:pi3b-img305.png|576x292px]]
 
 
 
<ol start="12" style="list-style-type: decimal;">
 
<li>After opening '''Geany''', it is still an English input method by default. We can switch into Chinese input methods through the '''Ctrl+Space''' shortcut keys, and then we can enter Chinese</li></ol>
 
 
 
[[File:pi3b-img313.png|576x408px]]
 
 
 
<span id="how-to-remotely-log-in-to-the-linux-system-desktop-method"></span>
 
== How to remotely log in to the Linux system desktop method ==
 
 
 
'''Ubuntu Gnome Wayland image does not support Nomachine and VNCs introduced here to remotely log in to the desktop.'''
 
 
 
<span id="use-nomachine-remote-login"></span>
 
=== Use nomachine remote login ===
 
 
 
'''Make sure the Ubuntu or Debian system installed on the development board is a desktop version. In addition, nomachine also provides detailed documents. It is strongly recommended to read this document to be familiar with the use of nomachine. The document links are shown below: '''
 
 
 
'''https://knowledgebase.nomachine.com/DT10R00166'''
 
 
 
'''Nomachine supports Windows, Mac, Linux, iOS, and Android platforms, so we can remotely log in to control Orange PI development boards through Nomachine on multiple devices. The following demonstrates the Linux system desktop of the Orange PI development board through Nomachine in Windows. For installation methods for other platforms, please refer to the official documentation of Nomachine.'''
 
 
 
'''Before operation, please ensure that the Windwos computer and the development board are in the same local area network, and can log in to the Ubuntu or Debian system that can log in to the development board normally.'''
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>First download the nomachine software Linux '''ARM64''' DEB version of the installation package, and then install it in the Linux system of the development board</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Since RK3566 is a SOC of the ARMV8 architecture, the system we use is Ubuntu or Debian, so you need to download '''NoMachine for ARM ARMv8 DEB''' installation package here. The download link is shown below: </li></ol>
 
</li></ol>
 
 
 
'''Note that this download link may change, please recognize the DEB package of the ARMV8/ARM64 version.'''
 
 
 
[https://www.nomachine.com/download/download&id=112&s=ARM '''https://downloads.nomachine.com/download/?id=118&amp;distro=ARM''']
 
 
 
[[File:pi3b-img314.png|575x227px]]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>In addition, you can also download the installation package to '''NoMachine''' in the '''official tools'''.</li></ol>
 
 
 
[[File:pi3b-img315.png|66x102px]]
 
 
 
<blockquote>First enter the '''remote login software-Nomachine''' folder
 
</blockquote>
 
[[File:pi3b-img316.png|271x43px]]
 
 
 
<blockquote>Then download the ARM64 version of the DEB installation package
 
</blockquote>
 
[[File:pi3b-img317.png|180x109px]]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li><p>Then upload the downloaded '''nomachine_x.x.x_x_arm64.deb''' to the Linux system of the development board.</p></li>
 
<li><p>Then use the following command to install '''NoMachine''' in the Linux system of the development board</p></li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo dpkg -i nomachine_x.x.x_x_arm64_arm64.deb'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then download the nomachine software Windows version of the installation package, the download address is shown below</li></ol>
 
 
 
'''Note that this download link may change.'''
 
 
 
'''https://downloads.nomachine.com/download/?id=9'''
 
 
 
[[File:pi3b-img318.png|575x163px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>Then install nomachine in Windows. '''Please restart the computer after installation'''</p></li>
 
<li><p>Then open '''NoMachine''' in Window</p></li></ol>
 
 
 
[[File:pi3b-img319.png|76x66px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>After Nomachine starts, it will automatically scan other devices installed in the local area network. After entering the main interface of Nomachine, you can see that the development board is already in the connected device list, and then click the location shown in the red box below in the figure below. Start log in to the Linux system desktop of the development board</li></ol>
 
 
 
[[File:pi3b-img320.png|321x92px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then click '''OK'''</li></ol>
 
 
 
[[File:pi3b-img321.png|402x275px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Then enter the username and password of the Linux system in the corresponding position in the figure below, and then click '''OK''' to start logging in</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img322.png|303x204px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题-12.jpg未标题-12]]
 
 
 
</div>
 
<ol start="8" style="list-style-type: decimal;">
 
<li><p>Then click OK in the next interface</p></li>
 
<li><p>Finally, you can see the desktop of the development board Linux system</p>
 
<p>[[File:pi3b-img323.png|411x246px]]</p></li></ol>
 
 
 
<span id="use-vnc-remote-login"></span>
 
=== Use VNC remote login ===
 
 
 
'''Before operation, please ensure that the Windwos computer and the development board are in the same local area network, and you can log in to the Ubuntu or Debian system of the development board normally.'''
 
 
 
'''Ubuntu 20.04 tests many problems with VNC, please do not use this method.'''
 
 
 
# First run the '''set_vnc.sh''' script settings, and '''remember to add Sudo permissions'''
 
 
 
orangepi@orangepi:~$ '''sudo set_vnc.sh'''
 
 
 
You will require a password to access your desktops.
 
 
 
Password: '''#Set the VNC password here, 8 -bit characters'''
 
 
 
Verify: '''#Set the VNC password here, 8 -bit characters'''
 
 
 
Would you like to enter a view-only password (y/n)? '''n'''
 
 
 
xauth: file /root/.Xauthority does not exist
 
 
 
New 'X' desktop is orangepi3b:1
 
 
 
Creating default startup script /root/.vnc/xstartup
 
 
 
Starting applications specified in /root/.vnc/xstartup
 
 
 
Log file is /root/.vnc/orangepi3b:1.log
 
 
 
Killing Xtightvnc process ID 3047
 
 
 
New 'X' desktop is orangepi3b:1
 
 
 
Starting applications specified in /root/.vnc/xstartup
 
 
 
Log file is /root/.vnc/orangepi3b:1.log
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>The steps of using MobaxTerm software to connect the development board Linux system desktop are shown below: </p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First click Session, then select VNC, then fill in the IP address and port of the development board, and finally click OK to confirm</li></ol>
 
</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img324.png|490x349px|图片1208]]
 
 
 
</div>
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then enter the password of the previously set VNC</li></ol>
 
 
 
[[File:pi3b-img325.png|274x131px]]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li><p>The interface after the login is shown as shown in the figure below, and then the desktop of the Linux system can be remotely operated</p>
 
<p>[[File:pi3b-img326.png|405x293px]]</p></li></ol>
 
 
 
<span id="some-programming-language-tests-supported-by-linux-system"></span>
 
== Some programming language tests supported by Linux system ==
 
 
 
<span id="debian-bullseye-system"></span>
 
=== Debian Bullseye system ===
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>Debian Bullseye is equipped with a gcc compilation tool chain by default, which can directly compile the C language program in the Linux system of the development board</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The version of the gcc is shown below</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''gcc --version'''
 
 
 
gcc (Debian 10.2.1-6) 10.2.1 20210110
 
 
 
Copyright (C) 2020 Free Software Foundation, Inc.
 
 
 
This is free software; see the source for copying conditions. There is NO
 
 
 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Write C language of '''Hello_world.c''' program</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello_world.c'''
 
 
 
#include &lt;stdio.h&gt;
 
 
 
int main(void)
 
 
 
{
 
 
 
printf(&quot;Hello World!\n&quot;);
 
 
 
return 0;
 
 
 
}
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Then compile and run '''hello_world.c'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''
 
 
 
orangepi@orangepi:~$ '''./hello_world'''
 
 
 
Hello World!
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>Debian BullSeye Default with Python3</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The specific version of Python is shown below</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''python3'''
 
 
 
'''Python 3.9.2''' (default, Feb 28 2021, 17:03:44)
 
 
 
[GCC 10.2.1 20210110] on linux
 
 
 
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
 
 
 
&gt;&gt;&gt;
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>'''hello_world.py''' program in Python language</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello_world.py'''
 
 
 
print('Hello World!')
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The results of running '''hello_world.py''' are shown below</li></ol>
 
 
 
orangepi@orangepi:~$ '''python3 hello_world.py'''
 
 
 
Hello World!
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>Debian Bullseye's compilation tool and operating environment that is not installed in Java by default</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>You can use the following command to install OpenJDK. The latest version in Debian Bullseye is openjdk-17</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>After installation, you can check the version of Java</li></ol>
 
 
 
orangepi@orangepi:~$ '''java --version'''
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Edit the '''hello_world.java''' of the Jave version</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello_world.java'''
 
 
 
public class hello_world
 
 
 
{
 
 
 
public static void main(String[] args)
 
 
 
{
 
 
 
System.out.println(&quot;Hello World!&quot;);
 
 
 
}
 
 
 
}
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Then compile and run '''hello_world.java'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''javac hello_world.java'''
 
 
 
orangepi@orangepi:~$ '''java hello_world'''
 
 
 
Hello World!
 
 
 
<span id="ubuntu-focal-system"></span>
 
=== Ubuntu Focal system ===
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>Ubuntu Focal has the GCC compilation tool chain by default, which can compile the C language program directly in the Linux system of the development board.</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The version of the gcc is shown below</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''gcc --version'''
 
 
 
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
 
 
 
Copyright (C) 2019 Free Software Foundation, Inc.
 
 
 
This is free software; see the source for copying conditions. There is NO
 
 
 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>'''hello_world.c''' program to write C language</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello_world.c'''
 
 
 
#include &lt;stdio.h&gt;
 
 
 
int main(void)
 
 
 
{
 
 
 
printf(&quot;Hello World!\n&quot;);
 
 
 
return 0;
 
 
 
}
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Then compile and run '''hello_world.c'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''
 
 
 
orangepi@orangepi:~$ '''./hello_world'''
 
 
 
Hello World!
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>Ubuntu Focal defaults to install Python3</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Python3 specific version is shown below</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''python3'''
 
 
 
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
 
 
 
[GCC 9.4.0] on linux
 
 
 
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
 
 
 
&gt;&gt;&gt;
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>'''hello_world.py''' program in Python language</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello_world.py'''
 
 
 
print('Hello World!')
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The results of running '''hello_world.py''' are shown below</li></ol>
 
 
 
orangepi@orangepi:~$ '''python3 hello_world.py'''
 
 
 
Hello World!
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>Ubuntu Focal's compilation tool and operating environment without the installation of Java default</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>You can use the following command to install '''openjdk-17'''</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>After installation, you can check the version of Java</li></ol>
 
 
 
orangepi@orangepi:~$ '''java --version'''
 
 
 
openjdk 17.0.2 2022-01-18
 
 
 
OpenJDK Runtime Environment (build 17.0.2+8-Ubuntu-120.04)
 
 
 
OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Edit the '''hello_world.java''' of Jave version</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello_world.java'''
 
 
 
public class hello_world
 
 
 
{
 
 
 
public static void main(String[] args)
 
 
 
{
 
 
 
System.out.println(&quot;Hello World!&quot;);
 
 
 
}
 
 
 
}
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Then compile and run '''hello_world.java'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''javac hello_world.java'''
 
 
 
orangepi@orangepi:~$ '''java hello_world'''
 
 
 
Hello World!
 
 
 
<span id="ubuntu-jammy-system"></span>
 
=== Ubuntu jammy system ===
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>Ubuntu Jammy is installed with the GCC compilation tool chain by default, which can directly compile the C language program in the Linux system of the development board</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The version of the gcc is shown below</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''gcc --version'''
 
 
 
gcc (Ubuntu 11.2.0-19ubuntu1) '''11.2.0'''
 
 
 
Copyright (C) 2021 Free Software Foundation, Inc.
 
 
 
This is free software; see the source for copying conditions. There is NO
 
 
 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Write the '''hello_world.c''' program of c language</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello_world.c'''
 
 
 
#include &lt;stdio.h&gt;
 
 
 
int main(void)
 
 
 
{
 
 
 
printf(&quot;Hello World!\n&quot;);
 
 
 
return 0;
 
 
 
}
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Then compile and run '''hello_world.c'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''
 
 
 
orangepi@orangepi:~$ '''./hello_world'''
 
 
 
Hello World!
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>Ubuntu jammy is installed with Python3 by default</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Python3 specific version is shown below</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''python3'''
 
 
 
Python '''3.10.4''' (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] on linux
 
 
 
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
 
 
 
&gt;&gt;&gt;
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Edit '''hello_world.py''' program in Python language</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello_world.py'''
 
 
 
print('Hello World!')
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The results of running '''hello_world.py''' are shown below</li></ol>
 
 
 
orangepi@orangepi:~$ '''python3 hello_world.py'''
 
 
 
Hello World!
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>Ubuntu jammy defaults to compile tools and operating environments that are not installed in Java</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>You can use the following command to install openjdk-18</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo apt install -y openjdk-18-jdk'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>After installation, you can check the version of Java</li></ol>
 
 
 
orangepi@orangepi:~$ '''java --version'''
 
 
 
openjdk 18-ea 2022-03-22
 
 
 
OpenJDK Runtime Environment (build 18-ea+36-Ubuntu-1)
 
 
 
OpenJDK 64-Bit Server VM (build 18-ea+36-Ubuntu-1, mixed mode, sharing)
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Edit the '''hello_world.java''' of the Jave version</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello_world.java'''
 
 
 
public class hello_world
 
 
 
{
 
 
 
public static void main(String[] args)
 
 
 
{
 
 
 
System.out.println(&quot;Hello World!&quot;);
 
 
 
}
 
 
 
}
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Then compile and run '''hello_world.java'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''javac hello_world.java'''
 
 
 
orangepi@orangepi:~$ '''java hello_world'''
 
 
 
Hello World!
 
 
 
<span id="qt-installation-method"></span>
 
== QT installation method ==
 
 
 
# Use the following script to install QT5 and QT Creator
 
 
 
orangepi@orangepi:~$ '''install_qt.sh'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>The QT version number will be automatically printed after installation</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Ubuntu20.04 comes with QT version '''5.12.8'''</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''install_qt.sh'''
 
 
 
......
 
 
 
QMake version 3.1
 
 
 
Using Qt version '''5.12.8''' in /usr/lib/aarch64-linux-gnu
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Ubuntu22.04 comes with QT version '''5.15.3'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''install_qt.sh'''
 
 
 
......
 
 
 
QMake version 3.1
 
 
 
Using Qt version '''5.15.3''' in /usr/lib/aarch64-linux-gnu
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Debian11 comes with QT version '''5.15.2'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''install_qt.sh'''
 
 
 
......
 
 
 
QMake version 3.1
 
 
 
Using Qt version '''5.15.2''' in /usr/lib/aarch64-linux-gnu
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Debian12 comes with QT version '''5.15.8'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''install_qt.sh'''
 
 
 
......
 
 
 
QMake version 3.1
 
 
 
Using Qt version '''5.15.8''' in /usr/lib/aarch64-linux-gnu
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then you can see the QT Creator launch icon in '''Applications'''</li></ol>
 
 
 
[[File:pi3b-img327.png|576x270px]]
 
 
 
QT Creator can also be opened using the following command
 
 
 
orangepi@orangepi:~$ '''qtcreator'''
 
 
 
'''During the startup of QT and QT applications, if the following error is displayed, ignore it. This error has no impact on application running.'''
 
 
 
'''libGL error: failed to create dri screen'''
 
 
 
'''libGL error: failed to load driver: rockchip'''
 
 
 
'''libGL error: failed to create dri screen'''
 
 
 
'''libGL error: failed to load driver: rockchip'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>The interface after QT Creator is opened is as follows</li></ol>
 
 
 
[[File:pi3b-img328.png|418x222px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li><p>The QT Creator version is shown below</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The default version of QT Creator in '''Ubuntu20.04''' is as follows</li></ol>
 
</li></ol>
 
 
 
[[File:pi3b-img329.png|419x224px]]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The default version of QT Creator in '''Ubuntu22.04''' is as follows</li></ol>
 
 
 
[[File:pi3b-img330.png|443x237px]]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The default version of QT Creator in '''Debian11''' is as follows</li></ol>
 
 
 
[[File:pi3b-img331.png|444x238px]]
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>The default version of QT Creator in '''Debian12''' is as follows</li></ol>
 
 
 
[[File:pi3b-img332.png|449x277px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li><p>Then set QT</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First open '''Help'''-&gt;'''About Plugins...'''</li></ol>
 
</li></ol>
 
 
 
[[File:pi3b-img333.png|573x164px]]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then remove the check box for '''ClangCodeModel'''</li></ol>
 
 
 
[[File:pi3b-img334.png|408x254px]]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li><p>'''Restart QT Creator after the Settings are complete'''</p></li>
 
<li><p>Then make sure that QT Creator uses the GCC compiler, if the default is Clang, change it to GCC</p></li></ol>
 
 
 
'''Debian12 Please skip this step.'''
 
 
 
[[File:pi3b-img335.png|576x315px]]
 
 
 
[[File:pi3b-img336.png|575x307px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>You can then open a sample code</li></ol>
 
 
 
[[File:pi3b-img337.png|575x312px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>Clicking on the example code will automatically open the corresponding instruction document, you can carefully read the instructions</li></ol>
 
 
 
[[File:pi3b-img338.png|576x218px]]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>Then click '''Configure Project'''</li></ol>
 
 
 
[[File:pi3b-img339.png|575x304px]]
 
 
 
<ol start="10" style="list-style-type: decimal;">
 
<li>Then click the green triangle in the lower left corner to compile and run the sample code</li></ol>
 
 
 
[[File:pi3b-img340.png|575x312px]]
 
 
 
<ol start="11" style="list-style-type: decimal;">
 
<li>After waiting for a period of time, the interface shown in the following figure will pop up, which indicates that QT can compile and run normally</li></ol>
 
 
 
[[File:pi3b-img341.png|576x308px]]
 
 
 
<ol start="12" style="list-style-type: decimal;">
 
<li>Reference documents</li></ol>
 
 
 
https://wiki.qt.io/Install_Qt_5_on_Ubuntu
 
 
 
https://download.qt.io/archive/qtcreator
 
 
 
https://download.qt.io/archive/qt
 
 
 
<span id="ros-installation-method"></span>
 
== ROS Installation Method ==
 
 
 
<span id="how-to-install-ros-1-noetic-on-ubuntu-20.04"></span>
 
=== How to install ROS 1 Noetic on Ubuntu 20.04 ===
 
 
 
# The current active version of ROS 1 is as follows, the recommended version is '''Noetic Ninjemys'''
 
 
 
[[File:pi3b-img342.png|345x235px]]
 
 
 
[[File:pi3b-img343.png|576x210px]]
 
 
 
[http://docs.ros.org/ http://docs.ros.org]
 
 
 
'''https://wiki.ros.org/Distributions'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>The official installation document link of ROS 1 '''Noetic Ninjemys''' is as follows:</li></ol>
 
 
 
[http://wiki.ros.org/noetic/Installation/Ubuntu '''http://wiki.ros.org/noetic/Installation/Ubuntu''']
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>In the official installation document of ROS '''Noetic Ninjemys''', Ubuntu recommends using Ubuntu20.04, so please make sure that the system used by the development board is '''Ubuntu20.04 desktop system'''</li></ol>
 
 
 
http://wiki.ros.org/noetic/Installation
 
 
 
[[File:pi3b-img344.png|312x176px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then use the script below to install ros1</li></ol>
 
 
 
orangepi@orangepi3b:~$ '''install_ros.sh ros1'''
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Before using the ROS tool, you first need to initialize rosdep, and then you can quickly install some system dependencies and some core components in ROS when compiling the source code</li></ol>
 
 
 
'''Note that running the following command needs to ensure that the development board can access github normally, otherwise an error will be reported due to network problems.'''
 
 
 
'''The install_ros.sh script will try to modify /etc/hosts and automatically run the following commands. However, this method cannot guarantee normal access to github every time. If the following error is displayed after installing ros1 in install_ros.sh, please find other ways to allow the Linux system of the development board to access github normally, and then manually run the following Order.'''
 
 
 
'''https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml'''
 
 
 
'''Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml'''
 
 
 
'''ERROR: error loading sources list:'''
 
 
 
'''The read operation timed out'''
 
 
 
orangepi@orangepi:~$ '''source /opt/ros/noetic/setup.bash'''
 
 
 
orangepi@orangepi:~$ '''sudo rosdep init'''
 
 
 
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
 
 
 
Recommended: please run
 
 
 
rosdep update
 
 
 
orangepi@orangepi:~$ '''rosdep update'''
 
 
 
reading in sources list data from /etc/ros/rosdep/sources.list.d
 
 
 
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
 
 
 
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
 
 
 
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
 
 
 
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
 
 
 
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
 
 
 
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
 
 
 
Skip end-of-life distro &quot;ardent&quot;
 
 
 
Skip end-of-life distro &quot;bouncy&quot;
 
 
 
Skip end-of-life distro &quot;crystal&quot;
 
 
 
Skip end-of-life distro &quot;dashing&quot;
 
 
 
Skip end-of-life distro &quot;eloquent&quot;
 
 
 
Add distro &quot;foxy&quot;
 
 
 
Add distro &quot;galactic&quot;
 
 
 
Skip end-of-life distro &quot;groovy&quot;
 
 
 
Add distro &quot;humble&quot;
 
 
 
Skip end-of-life distro &quot;hydro&quot;
 
 
 
Skip end-of-life distro &quot;indigo&quot;
 
 
 
Skip end-of-life distro &quot;jade&quot;
 
 
 
Skip end-of-life distro &quot;kinetic&quot;
 
 
 
Skip end-of-life distro &quot;lunar&quot;
 
 
 
Add distro &quot;melodic&quot;
 
 
 
Add distro &quot;noetic&quot;
 
 
 
Add distro &quot;rolling&quot;
 
 
 
updated cache in /home/orangepi/.ros/rosdep/sources.cache
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li><p>Then open a command line terminal window on the desktop, and then use the test_ros.sh script to start a small turtle routine to test whether ROS can be used normallyorangepi@orangepi:~$ '''test_ros.sh'''</p></li>
 
<li><p>After running the '''test_ros.sh''' script, a little turtle as shown in the figure below will pop up</p></li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img345.png|575x275px|图片4]]
 
 
 
</div>
 
<ol start="8" style="list-style-type: decimal;">
 
<li>Then please keep the terminal window just opened at the top</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img346.png|576x275px|图片5]]
 
 
 
</div>
 
<ol start="9" style="list-style-type: decimal;">
 
<li>At this time, press the direction keys on the keyboard to control the little turtle to move up, down, left, and right</li></ol>
 
 
 
[[File:pi3b-img347.png|575x296px]]
 
 
 
<span id="how-to-install-ros-2-galactic-on-ubuntu-20.04"></span>
 
=== How to install ROS 2 Galactic on Ubuntu 20.04 ===
 
 
 
# The current active version of ROS 2 is as follows, the recommended version is '''Galactic Geochelone'''
 
 
 
[[File:pi3b-img348.png|576x271px]]
 
 
 
[[File:pi3b-img349.png|575x265px]]
 
 
 
[http://docs.ros.org/ http://docs.ros.org]
 
 
 
'''http://docs.ros.org/en/galactic/Releases.html'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>The link to the official ROS 2 '''Galactic Geochelone''' installation documentation is as follows:</li></ol>
 
 
 
'''docs.ros.org/en/galactic/Installation.html'''
 
 
 
'''http://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>It is recommended to use Ubuntu20.04 in the official installation document of ROS 2 '''Galactic Geochelone''', so please ensure that the system used by the development board is '''Ubuntu20.04 desktop version'''. There are several ways to install ROS 2. The following shows how to install ROS 2 '''Galactic Geochelone''' using '''Debian packages'''</p></li>
 
<li><p>Use the '''install_ros.sh''' script to install ros2</p></li></ol>
 
 
 
orangepi@orangepi:~$ '''install_ros.sh ros2'''
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>The '''install_ros.sh''' script will automatically run the '''ros2 -h''' command after installing ros2. If you can see the following print, it means that the ros2 installation is complete</li></ol>
 
 
 
usage: ros2 [-h] Call `ros2 &lt;command&gt; -h` for more detailed usage. ...
 
 
 
ros2 is an extensible command-line tool for ROS 2.
 
 
 
optional arguments:
 
 
 
-h, --help show this help message and exit
 
 
 
Commands:
 
 
 
action Various action related sub-commands
 
 
 
bag Various rosbag related sub-commands
 
 
 
component Various component related sub-commands
 
 
 
daemon Various daemon related sub-commands
 
 
 
doctor Check ROS setup and other potential issues
 
 
 
interface Show information about ROS interfaces
 
 
 
launch Run a launch file
 
 
 
lifecycle Various lifecycle related sub-commands
 
 
 
multicast Various multicast related sub-commands
 
 
 
node Various node related sub-commands
 
 
 
param Various param related sub-commands
 
 
 
pkg Various package related sub-commands
 
 
 
run Run a package specific executable
 
 
 
security Various security related sub-commands
 
 
 
service Various service related sub-commands
 
 
 
topic Various topic related sub-commands
 
 
 
wtf Use `wtf` as alias to `doctor`
 
 
 
Call `ros2 &lt;command&gt; -h` for more detailed usage.
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then you can use the '''test_ros.sh''' script to test whether ROS 2 is installed successfully. If you can see the following print, it means that ROS 2 can run normally</li></ol>
 
 
 
orangepi@orangepi3b:~$ '''test_ros.sh'''
 
 
 
[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'
 
 
 
[INFO] [1671174101.235661048] [listener]: I heard: [Hello World: 1]
 
 
 
[INFO] [1671174102.199572327] [talker]: Publishing: 'Hello World: 2'
 
 
 
[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]
 
 
 
[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'
 
 
 
[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Run the following command to open rviz2</li></ol>
 
 
 
orangepi@orangepi:~$ '''source /opt/ros/galactic/setup.bash'''
 
 
 
orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img350.png|576x324px|1]]
 
 
 
</div>
 
<ol start="8" style="list-style-type: decimal;">
 
<li>For the usage of ROS, please refer to the documentation of ROS 2</li></ol>
 
 
 
http://docs.ros.org/en/galactic/Tutorials.html
 
 
 
<span id="how-to-install-ros-2-humble-on-ubuntu-22.04"></span>
 
=== How to install ROS 2 Humble on Ubuntu 22.04 ===
 
 
 
# Use the '''install_ros.sh''' script to install ros2
 
 
 
orangepi@orangepi:~$ '''install_ros.sh ros2'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>The '''install_ros.sh''' script will automatically run the '''ros2 -h''' command after installing ros2. If you can see the following print, it means that the ros2 installation is complete</li></ol>
 
 
 
usage: ros2 [-h] Call `ros2 &lt;command&gt; -h` for more detailed usage. ...
 
 
 
ros2 is an extensible command-line tool for ROS 2.
 
 
 
optional arguments:
 
 
 
-h, --help show this help message and exit
 
 
 
Commands:
 
 
 
action Various action related sub-commands
 
 
 
bag Various rosbag related sub-commands
 
 
 
component Various component related sub-commands
 
 
 
daemon Various daemon related sub-commands
 
 
 
doctor Check ROS setup and other potential issues
 
 
 
interface Show information about ROS interfaces
 
 
 
launch Run a launch file
 
 
 
lifecycle Various lifecycle related sub-commands
 
 
 
multicast Various multicast related sub-commands
 
 
 
node Various node related sub-commands
 
 
 
param Various param related sub-commands
 
 
 
pkg Various package related sub-commands
 
 
 
run Run a package specific executable
 
 
 
security Various security related sub-commands
 
 
 
service Various service related sub-commands
 
 
 
topic Various topic related sub-commands
 
 
 
wtf Use `wtf` as alias to `doctor`
 
 
 
Call `ros2 &lt;command&gt; -h` for more detailed usage.
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then you can use the '''test_ros.sh''' script to test whether ROS 2 is installed successfully. If you can see the following print, it means that ROS 2 can run normally</li></ol>
 
 
 
orangepi@orangepi3b:~$ '''test_ros.sh'''
 
 
 
[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'
 
 
 
[INFO] [1671174101.235661048] [listener]: I heard: [Hello World: 1]
 
 
 
[INFO] [1671174102.199572327] [talker]: Publishing: 'Hello World: 2'
 
 
 
[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]
 
 
 
[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'
 
 
 
[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Run the following command to open rviz2</li></ol>
 
 
 
orangepi@orangepi:~$ '''source /opt/ros/humble/setup.bash'''
 
 
 
orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img351.png|576x324px|1]]
 
 
 
</div>
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Reference documents</li></ol>
 
 
 
'''http://docs.ros.org/en/humble/index.html'''
 
 
 
[http://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html''']
 
 
 
<span id="how-to-install-kernel-header-files"></span>
 
== How to install kernel header files ==
 
 
 
# The Linux image released by OPi comes with the deb package of the kernel header file by default, and the storage location is '''/opt/'''
 
 
 
orangepi@orangepi:~$ '''ls /opt/linux-headers*'''
 
 
 
/opt/linux-headers-legacy-rockchip-rk356x_x.x.x_arm64.deb
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Use the following command to install the deb package of the kernel header file</li></ol>
 
 
 
'''The name of the kernel header file deb package needs to be replaced with the actual name, please do not copy it.'''
 
 
 
orangepi@orangepi:~$ '''sudo dpkg -i /opt/linux-headers-legacy-rockchip-rk356x_1.x.x_arm64.deb'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>After installation, you can see the folder where the kernel header files are located under '''/usr/src'''</li></ol>
 
 
 
orangepi@orangepi:~$ '''ls /usr/src'''
 
 
 
linux-headers-5.10.160-rockchip-rk356x
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>Then you can write a hello kernel module to test the kernel header file</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First write the code of the hello kernel module, as follows:</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim hello.c'''
 
 
 
#include &lt;linux/init.h&gt;
 
 
 
#include &lt;linux/module.h&gt;
 
 
 
static int hello_init(void)
 
 
 
{
 
 
 
printk(&quot;Hello Orange Pi -- init\n&quot;);
 
 
 
return 0;
 
 
 
}
 
 
 
static void hello_exit(void)
 
 
 
{
 
 
 
printk(&quot;Hello Orange Pi -- exit\n&quot;);
 
 
 
return;
 
 
 
}
 
 
 
module_init(hello_init);
 
 
 
module_exit(hello_exit);
 
 
 
MODULE_LICENSE(&quot;GPL&quot;);
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then write the Makefile for compiling the hello kernel module, as follows:</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim Makefile'''
 
 
 
ifneq ($(KERNELRELEASE),)
 
 
 
obj-m:=hello.o
 
 
 
else
 
 
 
KDIR :=/lib/modules/$(shell uname -r)/build
 
 
 
PWD :=$(shell pwd)
 
 
 
all:
 
 
 
make -C $(KDIR) M=$(PWD) modules
 
 
 
clean:
 
 
 
rm -f *.ko *.o *.mod.o *.mod *.symvers *.cmd *.mod.c *.order
 
 
 
endif
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Then use the make command to compile the hello kernel module. The output of the compilation process is as follows:</li></ol>
 
 
 
'''If there is a problem with compiling the code you copied here, please go to the official tool to download the source code and upload it to the Linux system of the development board for testing.'''
 
 
 
[[File:pi3b-img352.png|337x52px]]
 
 
 
orangepi@orangepi:~$ '''make'''
 
 
 
make -C /lib/modules/5.10.160-rockchip-35xx/build M=/home/orangepi modules
 
 
 
make[1]: Entering directory '/usr/src/linux-headers-5.10.160-rockchip-rk35xx'
 
 
 
CC [M] /home/orangepi/hello.o
 
 
 
MODPOST /home/orangepi/Module.symvers
 
 
 
CC [M] /home/orangepi/hello.mod.o
 
 
 
LD [M] /home/orangepi/hello.ko
 
 
 
make[1]: Leaving directory '/usr/src/linux-headers-5.10.160-rockchip-rk35xx'
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>After compiling, the '''hello.ko''' kernel module will be generated</li></ol>
 
 
 
orangepi@orangepi:~$ '''ls *.ko'''
 
 
 
hello.ko
 
 
 
<ol start="5" style="list-style-type: lower-alpha;">
 
<li>Use the '''insmod''' command to insert the '''hello.ko''' kernel module into the kernel</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo insmod hello.ko'''
 
 
 
<ol start="6" style="list-style-type: lower-alpha;">
 
<li>Then use the '''demsg''' command to view the output of the '''hello.ko''' kernel module. If you can see the output below, it means that the '''hello.ko''' kernel module is loaded correctly.</li></ol>
 
 
 
orangepi@orangepi:~$ '''dmesg | grep &quot;Hello&quot;'''
 
 
 
[ 2871.893988] '''Hello Orange Pi -- init'''
 
 
 
<ol start="7" style="list-style-type: lower-alpha;">
 
<li>Use the '''rmmod''' command to uninstall the '''hello.ko''' kernel module</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo rmmod hello'''
 
 
 
orangepi@orangepi:~$ '''dmesg | grep &quot;Hello&quot;'''
 
 
 
[ 2871.893988] Hello Orange Pi -- init
 
 
 
[ 3173.800892] '''Hello Orange Pi -- exit'''
 
 
 
<span id="use-of-the-raspberry-pis-5-inch-screen"></span>
 
== Use of the Raspberry PI's 5-inch screen ==
 
 
 
<span id="assembly-method-of-raspberry-pi-5-inch-screen"></span>
 
=== Assembly method of Raspberry PI 5-inch screen ===
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>First prepare the required accessories</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Raspberry PI 5-inch MIPI LCD display + touch screen</li></ol>
 
</li></ol>
 
 
 
<blockquote>[[File:pi3b-img353.png|306x219px]]
 
</blockquote>
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>15pin MIPI cable</li></ol>
 
 
 
<blockquote>[[File:pi3b-img354.png|276x111px]]
 
</blockquote>
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then connect the 15pin MIPI cable to the Raspberry PI 5-inch screen in the way shown below (note the orientation of the insulation surface)</li></ol>
 
 
 
[[File:pi3b-img355.png|294x160px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Finally connect to the LCD interface of the Orange Pi 3B development board</li></ol>
 
 
 
[[File:pi3b-img356.png|333x199px]]
 
 
 
<span id="open-the-raspberry-pi-5-inch-screen-configuration-method"></span>
 
=== Open the Raspberry PI 5-inch screen configuration method ===
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>The Linux image does not open the 5-inch screen of the Raspberry PI by default. If you need to use the 5-inch screen of the Raspberry PI, you need to open it manually.</p></li>
 
<li><p>The steps to open the mipi lcd configuration are as follows:</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>First run '''orangepi-config''', ordinary users remember to add '''sudo''' permission</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo orangepi-config'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then select '''System'''</li></ol>
 
 
 
[[File:pi3b-img357.png|575x272px]]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Then select '''Hardware'''</li></ol>
 
 
 
[[File:pi3b-img358.png|576x266px]]
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Then use the arrow keys on the keyboard to locate the Rasp-7inch-touchscreen, and then use the space button to check</li></ol>
 
 
 
[[File:pi3b-img359.png|408x310px]]
 
 
 
<ol start="5" style="list-style-type: lower-alpha;">
 
<li>Then select '''&lt;Save&gt;''' to save</li></ol>
 
 
 
[[File:pi3b-img360.png|404x133px]]
 
 
 
<ol start="6" style="list-style-type: lower-alpha;">
 
<li>Then select '''&lt;Back&gt;'''</li></ol>
 
 
 
[[File:pi3b-img361.png|397x151px]]
 
 
 
<ol start="7" style="list-style-type: lower-alpha;">
 
<li>Then select '''&lt;Reboot&gt;''' to restart the system for the configuration to take effect</li></ol>
 
 
 
[[File:pi3b-img362.png|331x154px]]
 
 
 
'''The above settings will eventually add the configuration of overlays=raspi-7inch-touchscreen to /boot/orangepiEnv.txt. After setting, you can check it first. If this configuration does not exist, then there is a problem with the settings.'''
 
 
 
'''If you find it troublesome to use orangepi-config, you can also use the vim editor to open /boot/orangepiEnv.txt, and then add the configuration of overlays=raspi-7inch-touchscreen is also possible.'''
 
 
 
orangepi@orangepi:~$ '''cat /boot/orangepiEnv.txt | grep "raspi"'''
 
 
 
'''overlays=raspi-7inch-touchscreen #Sample configuration'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>After startup, you can see the lcd screen display as follows:</li></ol>
 
 
 
[[File:pi3b-img363.png|381x262px]]
 
 
 
<span id="the-method-of-server-version-image-rotation-display-direction"></span>
 
=== The method of server version image rotation display direction ===
 
 
 
# Add '''extraargs=fbcon=rotate:the direction to rotate''' in '''/boot/orangepiEnv.txt''' This line configuration can set the direction displayed by the server version of the Linux system, where the number after '''fbcon=rotate:''' can be set as:
 
 
 
<!-- -->
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>0: normal screen (default is landscape)</p></li>
 
<li><p>1: Turn clockwise 90 degrees</p></li>
 
<li><p>2: Flip 180 degrees</p></li>
 
<li><p>3: Turn clockwise 270 degrees</p></li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
 
 
 
overlays=lcd1
 
 
 
'''extraargs=cma=64M fbcon=rotate:3'''
 
 
 
'''Note that if there is the line extraargs=cma=64M in /boot/orangepiEnv.txt by default, the configuration fbcon=rotate:3 can be added after extraargs=cma=64M (separated by spaces).'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then '''restart''' the Linux system and you can see that the direction displayed on the LCD screen has been rotated</li></ol>
 
 
 
<span id="method-of-rotating-display-and-touch-direction-of-desktop-version-image"></span>
 
=== Method of rotating display and touch direction of desktop version image ===
 
 
 
# First open '''Display''' Settings in Linux
 
 
 
[[File:pi3b-img364.png|298x206px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>Then select the direction you want to rotate in '''Rotation'''</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>'''None''': no rotation</p></li>
 
<li><p>'''Left''': rotate left 90 degrees</p></li>
 
<li><p>'''Inverted''': Flip up and down, which is equivalent to rotating 180 degrees</p></li>
 
<li><p>'''Right''': rotate right 90 degrees</p></li></ol>
 
</li></ol>
 
 
 
[[File:pi3b-img365.png|286x180px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then click '''Apply'''</li></ol>
 
 
 
[[File:pi3b-img366.png|330x207px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then select '''Keep this configuration'''</li></ol>
 
 
 
[[File:pi3b-img367.png|374x210px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li><p>At this point, the screen display has been rotated, and then close the '''Display''' program</p></li>
 
<li><p>The above steps will only select the display direction, and will not rotate the direction of the touch. Use the '''set_lcd_rotate.sh''' script to rotate the direction of the touch. After the script is set, it will automatically restart, and then you can test whether the touch has been used normally.</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>'''None''': no rotation</li></ol>
 
</li></ol>
 
 
 
orangepi@orangepi:~$ '''set_lcd_rotate.sh none'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>'''Left''': rotate left 90 degrees</li></ol>
 
 
 
orangepi@orangepi:~$ '''set_lcd_rotate.sh left'''
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>'''Inverted''': Flip up and down, which is equivalent to rotating 180 degrees</li></ol>
 
 
 
orangepi@orangepi:~$ '''set_lcd_rotate.sh inverted'''
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>'''Right''': rotate right 90 degrees</li></ol>
 
 
 
orangepi@orangepi:~$ '''set_lcd_rotate.sh right'''
 
 
 
'''The set_lcd_rotate.sh script mainly does four things:'''
 
 
 
'''1. Rotate the direction displayed by the framebuffer'''
 
 
 
'''2. Rotate the direction of the touch'''
 
 
 
'''3. Turn off the boot logo'''
 
 
 
'''4. Restart the system'''
 
 
 
'''Rotating the touch direction is achieved by adding the line Option &quot;TransformationMatrix&quot; &quot;x x x x x x x x x&quot; to /usr/share/X11/xorg.conf.d/40-libinput.conf Where &quot;x x x x x x x x x&quot; is configured differently for different directions.'''
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Touch rotation reference</li></ol>
 
 
 
https://wiki.ubuntu.com/X/InputCoordinateTransformation
 
 
 
<span id="instructions-for-using-the-switch-logo"></span>
 
== Instructions for using the switch logo ==
 
 
 
# By default, the switch logo will only be displayed in the desktop version of the system
 
# Set the '''bootlogo''' variable to '''false''' in '''/boot/orangepiEnv.txt''' to turn off the switch logo
 
 
 
orangepi@orangepi:~$ '''vim /boot/orangepiEnv.txt'''
 
 
 
verbosity=1
 
 
 
'''bootlogo=false'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Set the '''bootlogo''' variable to '''true''' in '''/boot/orangepiEnv.txt''' to enable the switch logo</li></ol>
 
 
 
orangepi@orangepi:~$ '''vim /boot/orangepiEnv.txt'''
 
 
 
verbosity=1
 
 
 
'''bootlogo=true'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>The location of the boot logo image in the Linux system is</li></ol>
 
 
 
'''/usr/share/plymouth/themes/orangepi/watermark.png'''
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>After replacing the boot logo picture, you need to run the following command to take effect</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo update-initramfs -u'''
 
 
 
<span id="how-to-use-the-zfs-file-system"></span>
 
== How to use the ZFS file system ==
 
 
 
'''The latest version of Ubuntu20.04, Ubuntu22.04, Debian11 and Debian12 desktop version systems have pre-installed zfs, you can use it directly.'''
 
 
 
'''The pre-installed zfs version in Ubuntu20.04 and Ubuntu22.04 desktop systems is 2.1.6.'''
 
 
 
'''The pre-installed zfs version in Debian11 and Debian12 desktop systems is 2.1.11.'''
 
 
 
'''After the system starts, please first confirm whether the zfs kernel module has been loaded. If you can see zfs-related content using the lsmod command, it means that the system has pre-installed zfs.'''
 
 
 
orangepi@orangepi:~$ '''lsmod | grep &quot;zfs&quot;'''
 
 
 
zfs 2801664 0
 
 
 
zunicode 327680 1 zfs
 
 
 
zzstd 471040 1 zfs
 
 
 
zlua 139264 1 zfs
 
 
 
zcommon 69632 1 zfs
 
 
 
znvpair 61440 2 zfs,zcommon
 
 
 
zavl 16384 1 zfs
 
 
 
icp 221184 1 zfs
 
 
 
spl 77824 6 zfs,icp,zzstd,znvpair,zcommon,zavl
 
 
 
<span id="how-to-install-zfs"></span>
 
=== How to install ZFS ===
 
 
 
'''Before installing zfs, please make sure that the Linux image used is the latest version. In addition, if zfs is already installed in the system, it needs to be installed again.'''
 
 
 
Before installing zfs, you need to install the kernel header file first. For the method of installing the kernel header file, please refer to the instructions in the [[\l|'''section on the method of installing the kernel header file''']].
 
 
 
In Ubuntu20.04, Ubuntu22.04 and Debian11 systems, zfs cannot be installed directly through apt, because the default apt source zfs version is lower than 2.1.6, and there is a problem of incompatibility with rk Linux5.10 kernel. This problem is fixed in zfs version 2.1.6 and later.
 
 
 
To solve this problem, we provide a zfs deb package that can be installed normally, which can be downloaded from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''official tool'''] of the development board. Open the '''<span class="mark">official tool</span>''', and enter the '''<span class="mark">zfs-related deb package folders used by Ubuntu and Debian systems</span>'''. You can see three types of deb packages: Ubuntu20.04, Ubuntu22.04 and Debian11. Please download the required version.
 
 
 
[[File:pi3b-img368.png|230x93px]]
 
 
 
After downloading the zfs deb packages of the corresponding version, please upload them to the Linux system of the development board. For the upload method, please refer to '''[[\l|the description in the section of the method of uploading files to the Linux system of the development board]].'''
 
 
 
After the upload is complete, use the '''cd''' command in the command line of the development board Linux system to enter the directory of the deb package, and then use the following command to install the deb package of zfs.
 
 
 
orangepi@orangepi:~$ '''sudo apt install ./*.deb'''
 
 
 
After the installation is complete, use the following command to see the zfs-related kernel modules:
 
 
 
orangepi@orangepi:~$ '''ls /lib/modules/5.10.160-rockchip-rk356x/updates/dkms/'''
 
 
 
'''icp.ko spl.ko zavl.ko zcommon.ko zfs.ko zlua.ko znvpair.ko zunicode.ko zzstd.ko'''
 
 
 
Then restart the Linux system to see that the zfs kernel module will be automatically loaded:
 
 
 
orangepi@orangepi:~$ '''lsmod | grep &quot;zfs&quot;'''
 
 
 
zfs 2801664 0
 
 
 
zunicode 327680 1 zfs
 
 
 
zzstd 471040 1 zfs
 
 
 
zlua 139264 1 zfs
 
 
 
zcommon 69632 1 zfs
 
 
 
znvpair 61440 2 zfs,zcommon
 
 
 
zavl 16384 1 zfs
 
 
 
icp 221184 1 zfs
 
 
 
spl 77824 6 zfs,icp,zzstd,znvpair,zcommon,zavl
 
 
 
In Debian12, the default version of zfs is 2.1.11, so we can install zfs directly through the following command. Again, please make sure that the system has installed the deb package of the kernel header file before installation.
 
 
 
orangepi@orangepi:~$ '''sudo apt install -y zfsutils-linux zfs-dkms'''
 
 
 
<span id="methods-of-creating-zfs-pools"></span>
 
=== Methods of creating ZFS pools ===
 
 
 
'''ZFS is based on storage pools, we can add multiple physical storage devices to the pool, and then allocate storage space from this pool.'''
 
 
 
'''The following content is demonstrated based on the development board connected to an NVMe SSD and a USB flash drive.'''
 
 
 
# First, we can use the '''lsblk''' command to view all storage devices on the development board. The current development board is connected to an NVMe SSD and a U disk. The output is as follows:
 
 
 
[[File:pi3b-img369.png|379x227px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then enter the following command to create a ZFS pool, including two storage devices, NVMe SSD and U disk</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo zpool create -f pool1 /dev/nvme0n1 /dev/sda'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then use the '''zpool list''' command to see that the system has created a ZFS pool named '''pool1''', and the size of the ZFS pool pool1 is the size of the NVME SSD plus the size of the U disk</li></ol>
 
 
 
[[File:pi3b-img370.png|576x37px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then execute '''df -h''' to see that '''pool1''' is mounted to the '''/pool1''' directory</li></ol>
 
 
 
orangepi@orangepi:~$ '''df -h'''
 
 
 
Filesystem Size Used Avail Use% Mounted on
 
 
 
tmpfs 1.6G 18M 1.6G 2% /run
 
 
 
/dev/mmcblk0p2 29G 6.0G 22G 22% /
 
 
 
tmpfs 7.7G 46M 7.7G 1% /dev/shm
 
 
 
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
 
 
 
tmpfs 7.7G 944K 7.7G 1% /tmp
 
 
 
/dev/mmcblk0p1 1022M 115M 908M 12% /boot
 
 
 
/dev/zram1 188M 4.5M 169M 3% /var/log
 
 
 
tmpfs 1.6G 80K 1.6G 1% /run/user/1000
 
 
 
'''pool1 489G 9.3M 489G 1% /pool1'''
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Use the following command to see that the file system type of pool1 is zfs</li></ol>
 
 
 
orangepi@orangepi:~$ '''mount | grep pool1'''
 
 
 
pool1 on /pool1 type '''zfs''' (rw,xattr,noacl)
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then we can test copying a file to the ZFS pool</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo cp -v /usr/local/test.mp4 /pool1/'''
 
 
 
'/usr/local/test.mp4' -&gt; '/pool1/test.mp4'
 
 
 
<span id="test-the-data-deduplication-function-of-zfs"></span>
 
=== Test the data deduplication function of ZFS ===
 
 
 
# The data deduplication function of ZFS is disabled by default, we need to execute the following command to enable it
 
 
 
orangepi@orangepi:~$ '''sudo zfs set dedup=on pool1'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then do a simple test, first enter pool1, and then execute the following command to generate a random file with a size of 1G</li></ol>
 
 
 
orangepi@orangepi:~$ '''cd /pool1/'''
 
 
 
root@orangepi:/pool1$ '''sudo dd if=/dev/urandom of=test.1g bs=1M count=1024'''
 
 
 
1024+0 records in
 
 
 
1024+0 records out
 
 
 
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.04367 s, 213 MB/s
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then use the following command to copy 1000 random files of size 1G</li></ol>
 
 
 
root@orangepi:/pool1$ '''for ((i=0; i&lt;1000; i++)); do sudo cp test.1g $i.test.1g; done'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then use '''du -lh''' to see that there are currently 1002G of data in the pool, but in fact the size of the ZFS pool is only '''504GB''' (the total capacity of SSD+U disk), which cannot hold such a large amount of data</li></ol>
 
 
 
root@orangepi:/pool1$ '''du -lh'''
 
 
 
1002G
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then use the '''zpool list''' command to see that only 1.01G is actually occupied, because these 1001 files are all duplicates, indicating that the data deduplication function is effective.</li></ol>
 
 
 
[[File:pi3b-img371.png|576x36px]]
 
 
 
<span id="test-the-data-compression-function-of-zfs"></span>
 
=== Test the data compression function of ZFS ===
 
 
 
# Because the stored data is different, the disk space saved by compression will also be different, so we choose to compress relatively large plain text files for compression testing, and execute the following commands to pack the '''/var/log/''' and '''/etc/''' directories into a tarball
 
 
 
orangepi@orangepi:~$ '''cd /pool1/'''
 
 
 
root@orangepi:/pool1$ '''sudo tar -cf text.tar /var/log/ /etc/'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then the file size that can be seen through the '''ls -lh''' command and the space occupied in the ZFS pool are both '''27M'''</li></ol>
 
 
 
[[File:pi3b-img372.png|576x90px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then we enable compression in the ZFS pool pool1</li></ol>
 
 
 
root@orangepi:/pool1$ '''sudo zfs set compression=lz4 pool1'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then execute the following command again to package the '''/var/log/''' and '''/etc/''' directories into a tar package</li></ol>
 
 
 
root@orangepi:/pool1$ '''sudo tar -cf text.tar /var/log/ /etc/'''
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>At this time, you can see that the size of the '''text.tar''' file is still 27M, but it only occupies 9.47M in the ZFS pool, indicating that the file is compressed</li></ol>
 
 
 
[[File:pi3b-img373.png|576x79px]]
 
 
 
<span id="how-to-shut-down-and-restart-the-development-board"></span>
 
== How to shut down and restart the development board ==
 
 
 
# During the running of the Linux system, if the Type-C power supply is directly unplugged, some data may be lost or damaged in the file system, so please use the '''poweroff''' command to shut down the Linux system of the development board before powering off. Then unplug the power again.
 
 
 
orangepi@orangepi:~$ '''sudo poweroff'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>In addition, the development board is equipped with a switch button, and you can also '''short press''' the switch button on the development board to shut down.</li></ol>
 
 
 
[[File:pi3b-img374.png|294x80px]]
 
 
 
'''Note that the Linux desktop version system will pop up a confirmation box as shown in the figure below after pressing the switch button, and the system will shut down only after clicking the Shut Down option.'''
 
 
 
[[File:pi3b-img375.png|207x193px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Short press the switch button on the development board after shutting down to start up.</li></ol>
 
 
 
[[File:pi3b-img374.png|294x80px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>The command to restart the Linux system is</li></ol>
 
 
 
orangepi@orangepi:~$ '''sudo''' '''reboot'''
 
 
 
<span id="linux-sdkorangepi-build-instructions"></span>
 
= Linux SDK——orangepi-build instructions =
 
 
 
<span id="compilation-system-requirements"></span>
 
== Compilation system requirements ==
 
 
 
'''We can cross-compile the Linux image of the development board on the x64 computer, or compile the Linux image of the development board on the Ubuntu22.04 system of the development board, please choose one according to your preference.'''
 
 
 
'''If you use orangepi-build to compile the Linux image in the Ubuntu22.04 system of the development board, please do a good job of cooling (especially when the SSD starts). If the heat dissipation is not done well, it is prone to the error of file system runaway.'''
 
 
 
<span id="compile-with-the-ubuntu22.04-system-of-the-development-board"></span>
 
=== Compile with the Ubuntu22.04 system of the development board ===
 
 
 
# The Linux SDK, namely '''orangepi-build''', supports running on the '''Ubuntu 22.04''' of the development board (other systems have not been tested), so before downloading orangepi-build, please first ensure that the Ubuntu version installed on the development board is Ubuntu 22.04. The command to check the Ubuntu version installed on the development board is as follows. If the Release field does not display '''22.04''', it means that the current Ubuntu version does not meet the requirements. Please replace the system before performing the following operations.
 
 
 
orangepi@orangepi:~$ '''lsb_release -a'''
 
 
 
No LSB modules are available.
 
 
 
Distributor ID: Ubuntu
 
 
 
Description: Ubuntu 22.04.1 LTS
 
 
 
Release: '''22.04'''
 
 
 
Codename: jammy
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>'''Since the source codes such as the kernel and U-boot are stored on GitHub, it is very important to ensure that the development board can download codes from GitHub normally when compiling the image.'''</li></ol>
 
 
 
<span id="compile-with-x64-ubuntu22.04-computer"></span>
 
=== Compile with x64 Ubuntu22.04 computer ===
 
 
 
# The Linux SDK, '''orangepi-build''', supports running on computers with '''Ubuntu 22.04''' installed, so before downloading orangepi-build, please make sure that the Ubuntu version installed on your computer is Ubuntu 22.04. The command to check the Ubuntu version installed on the computer is as follows. If the Release field does not display '''22.04''', it means that the current Ubuntu version does not meet the requirements. Please replace the system before performing the following operations.
 
 
 
test@test:~$ '''lsb_release -a'''
 
 
 
No LSB modules are available.
 
 
 
Distributor ID: Ubuntu
 
 
 
Description: Ubuntu 22.04 LTS
 
 
 
Release: '''22.04'''
 
 
 
Codename: jammy
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>If the computer is installed with Windows system and there is no computer with Ubuntu 22.04 installed, you can consider using '''VirtualBox''' or '''VMware''' to install an Ubuntu 22.04 virtual machine in the Windows system. But please be careful not to compile orangepi-build on the WSL virtual machine, because orangepi-build has not been tested in the WSL virtual machine, so it cannot be guaranteed that orangepi-build can be used normally in WSL.</p></li>
 
<li><p>The download address of the installation image of Ubuntu 22.04 '''amd64''' version is:</p></li></ol>
 
 
 
[https://repo.huaweicloud.com/ubuntu-releases/21.04/ubuntu-21.04-desktop-amd64.iso '''https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/22.04/ubuntu-22.04-desktop-amd64.iso''']
 
 
 
Or
 
 
 
'''https://repo.huaweicloud.com/ubuntu-releases/22.04/ubuntu-22.04.1-desktop-amd64.iso'''
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>After installing Ubuntu 22.04 on the computer or virtual machine, please set the software source of Ubuntu 22.04 to Tsinghua source, otherwise it is easy to make mistakes due to network reasons when installing the software later</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>For the method of replacing Tsinghua source, please refer to the instructions on this web page</li></ol>
 
</li></ol>
 
 
 
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Note that the Ubuntu version needs to be switched to 22.04</li></ol>
 
 
 
[[File:pi3b-img376.png|576x241px]]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The content of the '''/etc/apt/sources.list''' file that needs to be replaced is</li></ol>
 
 
 
test@test:~$ '''sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak'''
 
 
 
test@test:~$ '''sudo vim /etc/apt/sources.list'''
 
 
 
# By default, the source image is commented to improve the speed of apt update, you can uncomment it yourself if necessary
 
 
 
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
 
 
 
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
 
 
 
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
 
 
 
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
 
 
 
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
 
 
 
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
 
 
 
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
 
 
 
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
 
 
 
# Pre-release software source, not recommended to enable
 
 
 
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
 
 
 
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>After the replacement, you need to update the package information and make sure there is no error</li></ol>
 
 
 
test@test:~$ '''sudo apt update'''
 
 
 
<ol start="5" style="list-style-type: lower-alpha;">
 
<li>'''In addition, since the source codes such as the kernel and U-boot are stored on GitHub, it is very important to ensure that the computer can download codes from GitHub normally when compiling the image.'''</li></ol>
 
 
 
<span id="get-the-source-code-of-linux-sdk"></span>
 
== Get the source code of Linux sdk ==
 
 
 
<span id="download-orangepi-build-from-github"></span>
 
=== Download orangepi-build from github ===
 
 
 
# The Linux sdk actually refers to the code of orangepi-build. orangepi-build is modified based on the armbian build system. Using orangepi-build, multiple versions of Linux images can be compiled. First download the code of orangepi-build, the command is as follows:
 
 
 
test@test:~$ '''sudo apt-get update'''
 
 
 
test@test:~$ '''sudo apt-get install -y git'''
 
 
 
test@test:~$ '''git clone https://github.com/orangepi-xunlong/orangepi-build.git -b next'''
 
 
 
'''Note that the Orange Pi 3B development board needs to download the source code of the next branch of orangepi-build. The above git clone command needs to specify the branch of the orangepi-build source code as next.'''
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img377.png|576x298px|图片6]]
 
 
 
</div>
 
'''Downloading the orangepi-build code through the git clone command does not require entering the user name and password of the github account (the same is true for downloading other codes in this manual), if the Ubuntu PC prompts the user to enter the github account after entering the git clone command The name and password are usually entered incorrectly in the address of the orangepi-build warehouse behind the git clone. Please check the spelling of the command carefully, instead of thinking that we forgot to provide the username and password of the github account.'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>The u-boot and Linux kernel versions currently used by the development board are as follows</li></ol>
 
 
 
{| class="wikitable"
 
|-
 
| style="text-align: left;"| '''branch'''
 
| style="text-align: left;"| '''u-boot version'''
 
| style="text-align: left;"| '''Linux Kernel version'''
 
|-
 
| style="text-align: left;"| '''legacy'''
 
| style="text-align: left;"| '''u-boot 2017.09'''
 
| style="text-align: left;"| '''Linux5.10'''
 
|}
 
 
 
'''The branch mentioned here is not the same thing as the branch of the orangepi-build source code, please do not confuse it. This branch is mainly used to distinguish different kernel source code versions.'''
 
 
 
'''Currently, the Linux5.10 bsp kernel provided by RK is defined as the legacy branch. If the mainline kernel is supported in the future, a current branch will be added.'''
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li><p>orangepi-build will contain the following files and folders after downloading</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>'''build.sh''': Compile the startup script</p></li>
 
<li><p>'''external''': Contains the configuration files needed to compile the image, specific scripts, and the source code of some programs, etc.</p></li>
 
<li><p>'''LICENSE''': GPL 2 license file</p></li>
 
<li><p>README.md: orangepi-build documentation</p></li>
 
<li><p>'''scripts''': General script for compiling Linux images</p></li></ol>
 
</li></ol>
 
 
 
test@test:~/orangepi-build$ '''ls'''
 
 
 
'''build.sh external LICENSE''' README.md '''scripts'''
 
 
 
'''If you downloaded the code of orangepi-build from github, after downloading, you may find that orangepi-build does not contain the source code of u-boot and Linux kernel, nor does u-boot and Linux kernel need to use cross-compilation tools Chain, this is normal, because these things are stored in other separate github warehouses or some servers (the addresses will be detailed below). orangepi-build will specify the address of u-boot, Linux kernel and cross-compilation toolchain in the script and configuration file. When running orangepi-build, when it finds that there are no such things locally, it will automatically go to the corresponding place to download them.'''
 
 
 
<span id="download-the-cross-compilation-toolchain"></span>
 
=== Download the cross-compilation toolchain ===
 
 
 
'''The cross-compilation toolchain will only be downloaded when the orangepi-build compilation image is used on an x64 computer. Compiling the Linux image of the development board in the Ubuntu22.04 of the development board will not download the cross-compilation toolchain. At this time, orangepi-build/toolchains will be an empty folder.'''
 
 
 
# When orangepi-build runs for the first time, it will automatically download the cross-compilation toolchain and put it in the '''toolchains''' folder. Every time after running the build.sh script of orangepi-build, it will check whether the cross-compilation toolchain in '''toolchains''' exists , if it does not exist, the download will be restarted, if it exists, it will be used directly, and the download will not be repeated.
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img378.png|575x278px|选区_396]]
 
 
 
</div>
 
<ol start="2" style="list-style-type: decimal;">
 
<li>The image URL of the cross-compilation toolchain in China is the open source software image site of Tsinghua University</li></ol>
 
 
 
https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>After '''toolchains''' is downloaded, it will contain multiple versions of cross-compilation toolchains, and the development board will only use two of them</li></ol>
 
 
 
test@test:~/orangepi-build$ '''ls toolchains/'''
 
 
 
gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu
 
 
 
gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf
 
 
 
gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
 
 
 
gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
 
 
 
gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi
 
 
 
gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf
 
 
 
gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu
 
 
 
gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi
 
 
 
gcc-linaro-aarch64-none-elf-4.8-2013.11_linux
 
 
 
gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux
 
 
 
gcc-linaro-arm-none-eabi-4.8-2014.04_linux
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>The cross-compilation toolchain used to compile the Linux kernel source code is</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Linux5.10</li></ol>
 
</li></ol>
 
 
 
'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li><p>The cross-compilation tool chain used to compile the u-boot source code is</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>v2017.09</li></ol>
 
</li></ol>
 
 
 
'''gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu'''
 
 
 
<span id="orangepi-build-complete-directory-structure-description"></span>
 
=== orangepi-build complete directory structure description ===
 
 
 
<ol style="list-style-type: decimal;">
 
<li><p>The orangepi-build repository does not contain the source code of the Linux kernel, u-boot, and cross-compilation toolchain after downloading. The source code of the Linux kernel and u-boot is stored in an independent git repository</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The git repository where the Linux kernel source code is stored is as follows:</li></ol>
 
</li></ol>
 
 
 
'''https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-5.10-rk35xx'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The git warehouse where the b.u-boot source code is stored is as follows:</li></ol>
 
 
 
'''https://github.com/orangepi-xunlong/u-boot-orangepi/tree/v2017.09-rk3588'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li><p>When orangepi-build runs for the first time, it will download the cross-compilation toolchain, u-boot and Linux kernel source code. After successfully compiling a Linux image, the files and folders that can be seen in orangepi-build are:</p>
 
<p>a. '''build.sh''': compile startup script</p>
 
<p>b. '''external''': Contains the configuration files needed to compile the image, scripts with specific functions, and the source code of some programs. The rootfs compressed package cached during the image compilation process is also stored in external</p>
 
<p>c. '''kernel''': stores the source code of the Linux kernel, and the folder named orange-pi-5.10-rk35xx stores the kernel source code of the legacy branch of the RK3588/RK3588S/RK3566 series development boards. Please do not manually name the folder name of the kernel source code Modify, if modified, the kernel source code will be re-downloaded when the compilation system is running</p>
 
<p>d. '''LICENSE''': GPL 2 license file</p>
 
<p>e. '''README'''.md: orangepi-build documentation</p>
 
<p>f. '''output''': Store compiled deb packages such as u-boot and Linux, compilation logs, and compiled images and other files</p>
 
<p>g. '''scripts''': general scripts for compiling Linux images</p>
 
<p>h. '''toolchains''': store cross-compilation toolchain</p>
 
<p>i. '''u-boot''': stores the source code of u-boot, the folder named v2017.09-rk3588 stores the u-boot source code of the legacy branch of the RK3588/RK3588S/RK3566 series development boards, the name of the folder of the u-boot source code Please do not modify it manually, if it is modified, the u-boot source code will be re-downloaded when the compiling system is running</p>
 
<p>j. '''userpatches''': Store configuration files needed to compile scripts</p></li></ol>
 
 
 
test@test:~/orangepi-build$ '''ls'''
 
 
 
'''build.sh external kernel LICENSE output''' README.md '''scripts toolchains u-boot userpatches'''
 
 
 
<span id="compile-u-boot"></span>
 
== Compile u-boot ==
 
 
 
# Run the build.sh script, remember to add sudo permission
 
 
 
test@test:~/orangepi-build$ '''sudo ./build.sh'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Select '''U-boot package''',then enter</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img379.png|576x132px|选区_238]]
 
 
 
</div>
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then select the model of the development board</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img380.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]
 
 
 
</div>
 
<ol start="4" style="list-style-type: decimal;">
 
<li><p>Then it will start to compile u-boot, and some information prompted during compilation is explained as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>u-boot source code version</li></ol>
 
</li></ol>
 
 
 
[ o.k. ] Compiling u-boot [ '''v2017.09''' ]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The version of the cross-compilation toolchain</li></ol>
 
 
 
[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 7.4.1''' ]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Path to the generated u-boot deb package</li></ol>
 
 
 
[ o.k. ] Target directory [ '''orangepi-build/output/debs/u-boot''' ]
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>The package name of the generated u-boot deb package</li></ol>
 
 
 
[ o.k. ] File name [ '''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb''' ]
 
 
 
<ol start="5" style="list-style-type: lower-alpha;">
 
<li>Compilation time</li></ol>
 
 
 
[ o.k. ] Runtime [ '''1 min''' ]
 
 
 
<ol start="6" style="list-style-type: lower-alpha;">
 
<li>Repeat the command to compile u-boot, use the following command to start compiling u-boot directly without selecting through the graphical interface</li></ol>
 
 
 
[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=u-boot KERNEL_CONFIGURE=no''' ]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>View the u-boot deb package generated by compilation</li></ol>
 
 
 
test@test:~/orangepi-build$ '''ls output/debs/u-boot/'''
 
 
 
linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li><p>The files contained in the generated u-boot deb package are as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Use the following command to decompress the deb package</li></ol>
 
</li></ol>
 
 
 
test@test:~/orangepi-build$ '''cd output/debs/u-boot'''
 
 
 
test@test:~/orangepi_build/output/debs/u-boot$ $ '''dpkg -x''' \
 
 
 
'''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb . (Note that there is a &quot;.&quot; at the end of the command)'''
 
 
 
test@test:~/orangepi_build/output/debs/u-boot$ '''ls'''
 
 
 
linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb '''usr'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The decompressed file is as follows</li></ol>
 
 
 
test@test:~/orangepi-build/output/debs/u-boot$ '''tree usr'''
 
 
 
usr
 
 
 
└── lib
 
 
 
├── linux-u-boot-legacy-orangepi3b_1.0.0_arm64
 
 
 
│   ├── idbloader.img
 
 
 
│   ├── rkspi_loader.img
 
 
 
│   └── u-boot.itb
 
 
 
└── u-boot
 
 
 
├── LICENSE
 
 
 
├── orangepi-3b-rk3566_defconfig
 
 
 
└── platform_install.sh
 
 
 
3 directories, 6 files
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>When the orangepi-bulid compilation system compiles the u-boot source code, it will first synchronize the u-boot source code with the u-boot source code of the github server, so if you want to modify the u-boot source code, you first need to turn off the download and update function of the source code '''(This function needs to be fully compiled once u-boot, otherwise it will prompt that the source code of u-boot cannot be found. If the source code compressed package is downloaded from Google cloud disk, there is no such problem, because the source code of u-boot have been cached)''', otherwise the changes made will be reverted, the method is as follows:</li></ol>
 
 
 
<blockquote>Set the IGNORE_UPDATES variable in userpatches/config-default.conf to &quot;yes&quot;
 
</blockquote>
 
test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''
 
 
 
IGNORE_UPDATES=&quot;'''yes'''&quot;
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li><p>When debugging u-boot code, you can use the following method to update u-boot in the Linux image for testing</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Upload the compiled u-boot deb package to the Linux system of the development board</li></ol>
 
</li></ol>
 
 
 
test@test:~/orangepi-build$ '''cd output/debs/u-boot'''
 
 
 
test@test:~/orangepi_build/output/debs/u-boot$ '''scp \'''
 
 
 
'''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb''' [mailto:root@192.168.1.xxx:/root root@192.168.1.xxx:/root]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then log in to the development board and uninstall the deb package of u-boot installed</li></ol>
 
 
 
root@orangepi:~# '''apt purge -y linux-u-boot-orangepi3b-legacy'''
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Install the new u-boot deb package just uploaded</li></ol>
 
 
 
root@orangepi:~# '''dpkg -i''' '''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb'''
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Then run the nand-sata-install script</li></ol>
 
 
 
root@orangepi:~# '''nand-sata-install'''
 
 
 
<ol start="5" style="list-style-type: lower-alpha;">
 
<li>Then select '''5 Install/Update the bootloader on SD/eMM''' to update the u-boot in the TF card or '''7 Install/Update the bootloader on SPI Flash''' to update the u-boot in the SPI Flash</li></ol>
 
 
 
[[File:pi3b-img381.png|312x152px]]
 
 
 
<ol start="6" style="list-style-type: lower-alpha;">
 
<li>After pressing the Enter key, a Warning will pop up first</li></ol>
 
 
 
[[File:pi3b-img382.png|309x168px]]
 
 
 
<ol start="7" style="list-style-type: lower-alpha;">
 
<li>Press the Enter key again to start updating u-boot, and the following information will be displayed after the update is completed</li></ol>
 
 
 
[[File:pi3b-img383.png|244x137px]]
 
 
 
<ol start="8" style="list-style-type: lower-alpha;">
 
<li>Then you can restart the development board to test whether the modification of u-boot takes effect</li></ol>
 
 
 
<!-- -->
 
<ol start="9" style="list-style-type: decimal;">
 
<li><p>Other useful information</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>In the u-boot 2017.09 source code, the defconfig configuration file used by the development board is</li></ol>
 
</li></ol>
 
 
 
[https://github.com/orangepi-xunlong/u-boot-orangepi/blob/v2017.09-rk3588/configs/orangepi_5_defconfig '''orangepi-build/u-boot/v2017.09-rk3588/configs/orangepi-3b-rk3566_defconfig''']
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>In the u-boot 2017.09 source code, the dts file used by the development board is</li></ol>
 
 
 
[https://github.com/orangepi-xunlong/u-boot-orangepi/blob/v2017.09-rk3588/arch/arm/dts/rk3588s-orangepi-5.dts orangepi-build/u-boot/v2017.09-rk3588/arch/arm/dts/rk3566-orangepi-3b.dts]
 
 
 
<span id="compile-the-linux-kernel"></span>
 
== Compile the Linux kernel ==
 
 
 
# Run the build.sh script, remember to add sudo permission
 
 
 
test@test:~/orangepi-build$ '''sudo ./build.sh'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Select '''Kernel package''',then enter</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img384.png|575x116px|选区_240]]
 
 
 
</div>
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then select the model of the development board</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img380.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]
 
 
 
</div>
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then it will prompt whether to display the kernel configuration interface. If you do not need to modify the kernel configuration, select the first one. If you need to modify the kernel configuration, select the second one.</li></ol>
 
 
 
[[File:pi3b-img385.png|576x87px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>If you choose to display the kernel configuration menu (the second option) in step 4), the kernel configuration interface opened by '''make menuconfig''' will pop up. At this time, you can directly modify the kernel configuration, save and exit after modification. Yes, after exiting, the kernel source code will be compiled</li></ol>
 
 
 
[[File:pi3b-img386.png|462x322px]]
 
 
 
<ol style="list-style-type: lower-alpha;">
 
<li>If you do not need to modify the configuration options of the kernel, when running the build.sh script, pass in '''KERNEL_CONFIGURE=no''' to temporarily block the pop-up kernel configuration interface</li></ol>
 
 
 
test@test:~/orangepi-build$ '''sudo ./build.sh KERNEL_CONFIGURE=no'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li><p>You can also set '''KERNEL_CONFIGURE=no''' in the '''orangepi-build/userpatches/config-default.conf''' configuration file, which can permanently disable this function</p></li>
 
<li><p>If the following error is displayed when compiling the kernel, it is because the terminal interface of the Ubuntu PC is too small to display the '''make menuconfig''' interface. Please maximize the terminal of the Ubuntu PC and run the build.sh script again</p></li></ol>
 
 
 
[[File:pi3b-img387.png|574x234px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li><p>Part of the information prompted when compiling the kernel source code is as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The version of the Linux kernel source code</li></ol>
 
</li></ol>
 
 
 
[ o.k. ] Compiling current kernel [ '''5.10.160''' ]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The version of the cross-compilation toolchain used</li></ol>
 
 
 
[ o.k. ] Compiler version [ '''aarch64-none-linux-gnu-gcc 11.2.1''' ]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The configuration file used by the kernel by default and the path where it is stored</li></ol>
 
 
 
[ o.k. ] Using kernel config file [ '''config/kernel/linux-rockchip-rk356x-legacy.config''' ]
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>The path of the deb package related to the kernel generated by compiling</li></ol>
 
 
 
[ o.k. ] Target directory [ '''orangepi-build/output/debs/''' ]
 
 
 
<ol start="5" style="list-style-type: lower-alpha;">
 
<li>The package name of the compiled kernel image deb package</li></ol>
 
 
 
[ o.k. ] File name [ '''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb''' ]
 
 
 
<ol start="6" style="list-style-type: lower-alpha;">
 
<li>The time used for compilation</li></ol>
 
 
 
[ o.k. ] Runtime [ '''5 min''' ]
 
 
 
<ol start="7" style="list-style-type: lower-alpha;">
 
<li>Finally, the compilation command to repeatedly compile the kernel selected last time will be displayed. Use the following command to start compiling the kernel source code directly without selecting through the graphical interface</li></ol>
 
 
 
[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=kernel KERNEL_CONFIGURE=no''' ]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li><p>View the deb package related to the kernel generated by compilation</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>'''linux-dtb-legacy-rockchip-rk356x_1.0.0_arm64.deb''' Contains dtb files used by the kernel</p></li>
 
<li><p>'''linux-headers-legacy-rockchip-rk356x_1.0.0_arm64.deb''' Include kernel header files</p></li>
 
<li><p>'''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb''' Contains kernel images and kernel modules</p></li></ol>
 
</li></ol>
 
 
 
test@test:~/orangepi-build$ '''ls output/debs/linux-*'''
 
 
 
output/debs/linux-dtb-legacy-rockchip-rk356x_1.0.0_arm64.deb output/debs/linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb
 
 
 
output/debs/linux-headers-legacy-rockchip-rk356x_1.0.0_arm64.deb
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li><p>The files contained in the generated Linux-image deb package are as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Use the following command to decompress the deb package</li></ol>
 
</li></ol>
 
 
 
test@test:~/orangepi-build$ '''cd output/debs'''
 
 
 
test@test:~/orangepi_build/output/debs$ '''mkdir test'''
 
 
 
test@test:~/orangepi_build/output/debs$ '''cp \'''
 
 
 
'''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb test/'''
 
 
 
test@test:~/orangepi_build/output/debs$ '''cd test'''
 
 
 
test@test:~/orangepi_build/output/debs/test$ '''dpkg -x \'''
 
 
 
'''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb .'''
 
 
 
test@test:~/orangepi_build/output/debs/test$ '''ls'''
 
 
 
'''boot etc lib''' linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb '''usr'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The decompressed file is as follows</li></ol>
 
 
 
test@test:~/orangepi-build/output/debs/test$ '''tree -L 2'''
 
 
 
.
 
 
 
├── boot
 
 
 
│   ├── config-5.10.160-rockchip-rk356x
 
 
 
│   ├── System.map-5.10.160-rockchip-rk356x
 
 
 
│   └── vmlinuz-5.10.160-rockchip-rk356x
 
 
 
├── etc
 
 
 
│   └── kernel
 
 
 
├── lib
 
 
 
│   └── modules
 
 
 
├── linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb
 
 
 
└── usr
 
 
 
├── lib
 
 
 
└── share
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>The orangepi-bulid compilation system will first synchronize the Linux kernel source code with the Linux kernel source code of the github server when compiling the Linux kernel source code, so if you want to modify the Linux kernel source code, you first need to turn off the update function of the source code '''(you need to compile it once This function can only be turned off after the Linux kernel source code, otherwise it will prompt that the source code of the Linux kernel cannot be found. If the source code compressed package downloaded from Google cloud disk, there is no such problem, because the source code of Linux has been cached)''', otherwise the The changes made will be reverted as follows:</li></ol>
 
 
 
<blockquote>Set the IGNORE_UPDATES variable in '''userpatches/config-default.conf''' to &quot;yes&quot;
 
</blockquote>
 
test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''
 
 
 
IGNORE_UPDATES=&quot;'''yes'''&quot;
 
 
 
<ol start="10" style="list-style-type: decimal;">
 
<li><p>If the kernel has been modified, the following method can be used to update the kernel and kernel modules of the development board Linux system</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>Upload the deb package of the compiled Linux kernel to the Linux system of the development board</li></ol>
 
</li></ol>
 
 
 
test@test:~/orangepi-build$ '''cd output/debs'''
 
 
 
test@test:~/orangepi-build/output/debs$ '''scp \'''
 
 
 
'''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb root@192.168.1.xxx:/root'''
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Then log in to the development board and uninstall the deb package of the installed Linux kernel</li></ol>
 
 
 
root@orangepi:~# '''apt purge -y linux-image-legacy-rockchip-rk356x'''
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>Install the deb package of the new Linux kernel just uploaded</li></ol>
 
 
 
root@orangepi:~# '''dpkg -i linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb'''
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>Then restart the development board, and then check whether the kernel-related modifications have taken effect</li></ol>
 
 
 
root@orangepi:~# '''reboot'''
 
 
 
<ol start="11" style="list-style-type: decimal;">
 
<li><p>Other useful information</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The storage location of the kernel configuration file is as follows, please do not go to the kernel source code to find the kernel configuration file used by the development board</li></ol>
 
</li></ol>
 
 
 
[https://github.com/orangepi-xunlong/orangepi-build/blob/next/external/config/kernel/linux-rockchip-rk3588-legacy.config orangepi-build/external/config/kernel/linux-rockchip-rk356x-legacy.config]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The location of the dts file used by the development board is</li></ol>
 
 
 
[https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-5.10-rk3588/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts orangepi-build/kernel/orange-pi-5.10-rk35xx/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dts]
 
 
 
<span id="compile-rootfs"></span>
 
== Compile rootfs ==
 
 
 
# Run the build.sh script, remember to add sudo permission
 
 
 
test@test:~/orangepi-build$ '''sudo ./build.sh'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Select '''Rootfs and all deb packages''',then enter</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img388.png|576x119px|选区_241]]
 
 
 
</div>
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then select the model of the development board</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img380.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]
 
 
 
</div>
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then select the type of rootfs</li></ol>
 
 
 
[[File:pi3b-img389.png|575x86px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li><p>Then select the type of image</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>'''Image with console interface (server)''' Indicates the image of the server version, which is relatively small</p></li>
 
<li><p>'''Image with desktop environment''' Indicates a image with a desktop, which is relatively large</p></li></ol>
 
</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img390.png|576x75px|选区_245]]
 
 
 
</div>
 
<ol start="6" style="list-style-type: decimal;">
 
<li>If you are compiling the image of the server version, you can also choose to compile the Standard version or the Minimal version. The pre-installed software of the Minimal version will be much less than that of the Standard version '''(please do not choose the Minimal version if there is no special requirement, because many things are not pre-installed by default. Some functions may not be available)'''</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img391.png|576x78px|选区_397]]
 
 
 
</div>
 
<ol start="7" style="list-style-type: decimal;">
 
<li>If you are compiling the image of the desktop version, you also need to select the type of desktop environment. Currently, Ubuntu Jammy mainly maintains XFCE and Gnome desktops, Ubuntu Focal only maintains XFCE desktops, and Debian Bullseye mainly maintains XFCE and KDE desktops</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img392.png|575x99px|Selection_001]]
 
 
 
</div>
 
[[File:pi3b-img393.png|576x74px]]
 
 
 
You can then select additional packages that need to be installed. Please press the Enter key to skip directly here.
 
 
 
[[File:pi3b-img394.png|575x264px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li><p>Then it will start to compile rootfs, and some of the information prompted during compilation are as follows</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The type of rootfs</li></ol>
 
</li></ol>
 
 
 
[ o.k. ] local not found [ Creating new rootfs cache for '''jammy''']
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>The storage path of the compiled rootfs compressed package</li></ol>
 
 
 
[ o.k. ] Target directory [ '''external/cache/rootfs''' ]
 
 
 
<ol start="3" style="list-style-type: lower-alpha;">
 
<li>The name of the rootfs compressed package generated by compilation</li></ol>
 
 
 
[ o.k. ] File name [ '''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4''' ]
 
 
 
<ol start="4" style="list-style-type: lower-alpha;">
 
<li>The time used for compilation</li></ol>
 
 
 
[ o.k. ] Runtime [ '''13 min''' ]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li><p>View the rootfs compressed package generated by compilation</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4''' is the rootfs compressed package, the meaning of each field of the name is</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>'''jammy''' indicates the type of Linux distribution of rootfs</p></li>
 
<li><p>'''xfce''' means rootfs is the type of desktop version, if it is '''cli''', it means the type of server version</p></li>
 
<li><p>'''arm64''' represents the architecture type of rootfs</p></li>
 
<li><p>'''f930ff6ebbac1a72108a2e100762b18f''' is the MD5 hash value generated by the package names of all software packages installed by rootfs. As long as the list of software packages installed by rootfs is not modified, this value will not change. The compilation script will use this MD5 hash value to generate Determine whether rootfs needs to be recompiled</p></li></ol>
 
</li>
 
<li><p>'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list''' lists the package names of all packages installed by rootfs</p></li></ol>
 
</li></ol>
 
 
 
test@test:~/orangepi-build$ '''ls external/cache/rootfs/'''
 
 
 
'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4'''
 
 
 
jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.current
 
 
 
jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list
 
 
 
<ol start="10" style="list-style-type: decimal;">
 
<li>If the required rootfs already exists under '''external/cache/rootfs''', then compiling rootfs again will directly skip the compilation process and will not restart the compilation. When compiling the image, it will also go to '''external/cache/rootfs''' to find out whether it has If there is rootfs available in the cache, use it directly, which can save a lot of download and compilation time.</li></ol>
 
 
 
<span id="compile-linux-image"></span>
 
== Compile Linux image ==
 
 
 
# Run the build.sh script, remember to add sudo permission
 
 
 
test@test:~/orangepi-build$ '''sudo ./build.sh'''
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Select '''Full OS image for flashing''',then enter</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img395.png|576x128px|选区_242]]
 
 
 
</div>
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then select the model of the development board</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img380.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]
 
 
 
</div>
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then select the type of rootfs</li></ol>
 
 
 
[[File:pi3b-img389.png|575x86px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li><p>Then select the type of image</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li><p>'''Image with console interface (server)''' Indicates the image of the server version, which is relatively small</p></li>
 
<li><p>'''Image with desktop environment''' Indicates a image with a desktop, which is relatively large</p></li></ol>
 
</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img390.png|576x75px|选区_245]]
 
 
 
</div>
 
<ol start="6" style="list-style-type: decimal;">
 
<li>If you are compiling the image of the server version, you can also choose to compile the Standard version or the Minimal version. The pre-installed software of the Minimal version will be much less than that of the Standard version '''(please do not choose the Minimal version if there is no special requirement, because many things are not pre-installed by default. Some functions may not be available)'''</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img391.png|569x77px|选区_397]]
 
 
 
</div>
 
<ol start="7" style="list-style-type: decimal;">
 
<li>If you are compiling the image of the desktop version, you also need to select the type of desktop environment. Currently, Ubuntu Jammy mainly maintains XFCE and Gnome desktops, Ubuntu Focal only maintains XFCE desktops, and Debian Bullseye mainly maintains XFCE and KDE desktops</li></ol>
 
 
 
<div class="figure">
 
 
 
[[File:pi3b-img392.png|575x99px|Selection_001]]
 
 
 
</div>
 
[[File:pi3b-img393.png|576x74px]]
 
 
 
You can then select additional packages that need to be installed. Please press the Enter key to skip directly here.
 
 
 
[[File:pi3b-img394.png|575x264px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li><p>Then it will start to compile the Linux image. The general process of compilation is as follows</p>
 
<p>a. Initialize the compilation environment of Ubuntu PC and install the software packages required for the compilation process</p>
 
<p>b. Download the source code of u-boot and Linux kernel (if cached, only update the code)</p>
 
<p>c. Compile u-boot source code and generate u-boot deb package</p>
 
<p>d. Compile the Linux source code and generate Linux-related deb packages</p>
 
<p>e. Make the deb package of Linux firmware</p>
 
<p>f. Make the deb package of the orangepi-config tool</p>
 
<p>g. Create a deb package supported by the board</p>
 
<p>h. If you are compiling the desktop image, you will also create desktop-related deb packages</p>
 
<p>i. Check whether the rootfs has been cached, if not, recreate the rootfs, if it has been cached, directly decompress and use</p>
 
<p>j. Install the previously generated deb package into rootfs</p>
 
<p>k. Make some specific settings for different development boards and different types of images, such as pre-installing additional software packages, modifying system configuration, etc.</p>
 
<p>l. Then make an image file and format the partition, the default type is ext4</p>
 
<p>m. Then copy the configured rootfs to the mirrored partition</p>
 
<p>n. Then update initramfs</p>
 
<p>o. Finally, write the bin file of u-boot into the image through the dd command</p></li>
 
<li><p>After compiling the image, the following information will be prompted</p>
 
<ol style="list-style-type: lower-alpha;">
 
<li>The storage path of the compiled image</li></ol>
 
</li></ol>
 
 
 
[ o.k. ] Done building [ '''output/images/Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160/Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.img''' ]
 
 
 
<ol start="2" style="list-style-type: lower-alpha;">
 
<li>Compilation time</li></ol>
 
 
 
'''[ o.k. ] Runtime [ 19 min ]'''
 
 
 
<ol style="list-style-type: lower-alpha;">
 
<li>Repeat the command to compile the image, and use the following command to start compiling the image directly without selecting through the graphical interface</li></ol>
 
 
 
[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=image RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=yes''' ]
 
 
 
<span id="android-11-operating-system-instructions"></span>
 
= Android 11 operating system instructions =
 
 
 
<span id="supported-android-versions"></span>
 
== Supported Android versions ==
 
 
 
{| class="wikitable"
 
|-
 
| style="text-align: left;"| '''Android version'''
 
| style="text-align: left;"| '''Kernel version'''
 
|-
 
| style="text-align: left;"| '''Android 11'''
 
| style="text-align: left;"| '''Linux4.19'''
 
|}
 
 
 
<span id="android-function-adaptation"></span>
 
== Android Function Adaptation ==
 
 
 
{| class="wikitable"
 
|-
 
| style="text-align: left;"| '''Functions'''
 
| style="text-align: left;"| '''Android 11'''
 
|-
 
| style="text-align: left;"| '''USB2.0x3'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''USB3.0x1'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''M.2 NVMe SSD boot'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''WIFI'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''Bluetooth'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''GPIO(40pin)'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''UART(40pin)'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''SPI(40pin)'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''I2C(40pin)'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''PWM(40pin)'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''PWM fan interface'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''3pin Debugging serial port'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''EMMC'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''TF card boot'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''HDMI video'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''HDMI Audio'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''LCD'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''eDP display'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''Gigabit network port'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''Network port status indicator'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''Headphone playback'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''Headphone recording'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''LED Light'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''GPU'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''NPU'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''VPU'''
 
| style="text-align: left;"| '''OK'''
 
|-
 
| style="text-align: left;"| '''RTC'''
 
| style="text-align: left;"| '''OK'''
 
|}
 
 
 
<span id="wifi-connection-test-method"></span>
 
== WIFI connection test method ==
 
 
 
# First click enter '''Setting'''
 
 
 
[[File:pi3b-img396.png|549x228px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then select '''Network &amp; internet'''</li></ol>
 
 
 
[[File:pi3b-img397.png|565x120px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then select '''Wi-Fi'''</li></ol>
 
 
 
[[File:pi3b-img398.png|561x99px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then turn on the '''Wi-Fi''' switch</li></ol>
 
 
 
[[File:pi3b-img399.png|560x167px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>After turning on '''Wi-Fi''', if everything is normal, you can scan for nearby Wi-Fi hotspots</li></ol>
 
 
 
[[File:pi3b-img400.png|561x166px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then select the Wi-Fi you want to connect to, and the password input interface shown in the figure below will pop up</li></ol>
 
 
 
[[File:pi3b-img401.png|553x237px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Then use the keyboard to enter the password corresponding to Wi-Fi, and then use the mouse to click the Enter button in the virtual keyboard to start connecting to Wi-Fi</li></ol>
 
 
 
[[File:pi3b-img402.png|553x232px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>After the Wi-Fi connection is successful, the display is as shown in the figure below:</li></ol>
 
 
 
[[File:pi3b-img403.png|558x102px]]
 
 
 
<span id="how-to-use-wi-fi-hotspot"></span>
 
== How to use Wi-Fi hotspot ==
 
 
 
# First, please make sure that the Ethernet port is connected to the network cable and can access the Internet normally
 
# Then select '''Settings'''
 
 
 
[[File:pi3b-img396.png|549x228px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then select '''Network &amp; internet'''</li></ol>
 
 
 
[[File:pi3b-img397.png|565x120px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then select '''Hotspot &amp; tethering'''</li></ol>
 
 
 
[[File:pi3b-img404.png|549x173px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then select '''Wi-Fi hotspot'''</li></ol>
 
 
 
[[File:pi3b-img405.png|548x104px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then turn on the '''Wi-Fi hotspot''', you can also see the name and password of the generated hotspot in the figure below, remember them, and use them when connecting to the hotspot (if you need to modify the name and password of the hotspot, you need to turn off the Wi-Fi first -Fi hotspot before modification)</li></ol>
 
 
 
[[File:pi3b-img406.png|551x158px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>At this time, you can take out your mobile phone. If everything is normal, you can find the WIFI hotspot with the same name ('''here AndroidAP_6953''') displayed under the '''Hotspot name''' in the above picture in the WI-FI list searched by the mobile phone. Then you can click '''AndroidAP_6953''' to connect to the hotspot, and the password can be seen under the '''Hotspot password''' in the above picture</li></ol>
 
 
 
[[File:pi3b-img407.png|313x238px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>After the connection is successful, it will be displayed as shown in the figure below (the interface of different mobile phones will be different, the specific interface is subject to the display of your mobile phone). At this point, you can open a webpage on your mobile phone to see if you can access the Internet. If you can open the webpage normally, it means that the '''WI-FI Hotspot''' of the development board can be used normally.</li></ol>
 
 
 
[[File:pi3b-img408.png|327x165px]]
 
 
 
<span id="bluetooth-test-method"></span>
 
== Bluetooth test method ==
 
 
 
# First click enter '''Setting'''
 
 
 
[[File:pi3b-img396.png|549x228px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Then select '''Connected devices'''</li></ol>
 
 
 
[[File:pi3b-img409.png|547x115px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then click '''Pair new device''' to turn on Bluetooth and start scanning the surrounding Bluetooth devices</li></ol>
 
 
 
[[File:pi3b-img410.png|547x126px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>The searched Bluetooth devices will be displayed under '''Available devices'''</li></ol>
 
 
 
[[File:pi3b-img411.png|559x279px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then click the Bluetooth device you want to connect to start pairing. When the following interface pops up, please use the mouse to select the '''Pair''' option</li></ol>
 
 
 
[[File:pi3b-img412.png|522x212px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>The test here is the configuration process of the development board and the Bluetooth of the Android mobile phone. At this time, the following confirmation interface will pop up on the mobile phone. After clicking the pairing button on the mobile phone, the pairing process will start</li></ol>
 
 
 
[[File:pi3b-img413.png|236x273px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>After the pairing is completed, you can see the paired Bluetooth device as shown in the figure below</li></ol>
 
 
 
[[File:pi3b-img414.png|545x178px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>At this time, you can use the Bluetooth of your mobile phone to send a picture to the development board. After sending, you can see the following confirmation interface in the Android system of the development board, and then click '''Accept''' to start receiving the picture sent by the mobile phone.</li></ol>
 
 
 
[[File:pi3b-img415.png|559x238px]]
 
 
 
<ol start="9" style="list-style-type: decimal;">
 
<li>You can open the '''Download''' directory in the file manager to view the pictures received by the Android system Bluetooth of the development board</li></ol>
 
 
 
[[File:pi3b-img416.png|573x97px]]
 
 
 
<span id="how-to-use-raspberry-pi-5-inch-screen"></span>
 
== How to use Raspberry Pi 5-inch screen ==
 
 
 
'''Please make sure that the image used is the following two versions of the image:'''
 
 
 
'''OrangePi3B_RK3566_Android11_lcd_v1.x.x.img'''
 
 
 
'''OrangePi3B_RK3566_Android11_spi-nvme_lcd_v1.x.x.img'''
 
 
 
# The screen needs to be assembled first, please refer to [[\l|'''the assembly method of the Raspberry Pi 5-inch screen''']]
 
# Connect the Type-C power supply to the board and power it on. After the system starts, you can see the screen display as shown in the figure below
 
 
 
[[File:pi3b-img417.png|516x332px]]
 
 
 
<span id="pin-interface-gpio-uart-spi-and-pwm-test"></span>
 
== 40pin interface GPIO, UART, SPI and PWM test ==
 
 
 
<span id="pin-gpio-port-test-2"></span>
 
=== 40pin GPIO port test ===
 
 
 
# First click on the wiringOP icon to open the wiringOP APP
 
 
 
[[File:pi3b-img418.png|576x210px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>The main interface of wiringOP APP is displayed as shown in the figure below, and then click the '''GPIO_TEST''' button to open the GPIO test interface</li></ol>
 
 
 
[[File:pi3b-img419.png|575x148px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>The GPIO test interface is shown in the figure below. The two rows of '''CheckBox''' buttons on the left are in one-to-one correspondence with the 40pin pins. When the '''CheckBox''' button is checked, the corresponding GPIO pin will be set to '''OUT''' mode, and the pin level will be set to high level; when the checkbox is unchecked, the GPIO pin level will be set to low level; When the '''GPIO READALL''' button is pressed, information such as wPi number, GPIO mode, and pin level can be obtained; when the '''BLINK ALL GPIO''' button is clicked, the program will control the 28 GPIO ports to continuously switch between high and low levels</li></ol>
 
 
 
[[File:pi3b-img420.png|576x303px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>Then click the '''GPIO READALL''' button, the output information is as shown in the figure below:</li></ol>
 
 
 
[[File:pi3b-img421.png|575x323px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>There are a total of 28 GPIO ports in the 40pins of the development board that can be used. The following uses pin 7—the corresponding GPIO is GPIO4_A4—the corresponding wPi serial number is 2—as an example to demonstrate how to set the high and low levels of the GPIO port. First click the '''CheckBox''' button corresponding to pin 7. When the button is selected, pin 7 will be set to high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means setting high level success</li></ol>
 
 
 
[[File:pi3b-img422.png|241x326px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then click the '''GPIO READALL''' button, you can see that the current pin 7 mode is '''OUT''', and the pin level is high</li></ol>
 
 
 
[[File:pi3b-img423.png|574x301px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Click the '''CheckBox''' button in the figure below again to cancel the check status. Pin 7 will be set to low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is '''0v''', it means that the low level is set successfully.</li></ol>
 
 
 
[[File:pi3b-img424.png|250x345px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>Then click the '''GPIO READALL''' button, you can see that the current pin 7 mode is OUT, and the pin level is low</li></ol>
 
 
 
[[File:pi3b-img425.png|576x300px]]
 
 
 
<span id="pin-uart-test-1"></span>
 
=== 40pin UART test ===
 
 
 
# UART7 and UART9 are enabled by default in Android. The position of the 40pin is shown in the figure below, and the corresponding device nodes are '''/dev/ttyS7''' and '''/dev/ttyS9''' respectively
 
 
 
[[File:pi3b-img269.png|376x92px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>First click on the wiringOP icon to open the wiringOP APP</li></ol>
 
 
 
[[File:pi3b-img418.png|576x210px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>The main interface of wiringOP APP is displayed as shown in the figure below, and then click the '''UART_TEST''' button to open the UART test interface</li></ol>
 
 
 
[[File:pi3b-img426.png|575x156px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>The serial port test interface of the APP is shown in the figure below</li></ol>
 
 
 
[[File:pi3b-img427.png|576x324px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Take the test of '''UART7''' as an example below, select the '''/dev/ttyS7''' node in the selection box, enter the baud rate you want to set in the edit box, and then click the '''OPEN''' button to open the /dev/ttyS7 node. After the opening is successful, the '''OPEN''' button becomes unselectable, and the '''CLOSE''' button and '''SEND''' button become selectable</li></ol>
 
 
 
[[File:pi3b-img428.png|574x166px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then use Dupont wire to short the RXD and TXD pins of uart7</li></ol>
 
 
 
[[File:pi3b-img429.png|418x103px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Then you can enter a character in the send edit box below, and click the '''SEND''' button to start sending</li></ol>
 
 
 
[[File:pi3b-img430.png|575x161px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>If everything is normal, the received string will be displayed in the receiving box</li></ol>
 
 
 
[[File:pi3b-img431.png|574x164px]]
 
 
 
<span id="pin-spi-test-2"></span>
 
=== 40pin SPI test ===
 
 
 
# According to the schematic diagram of the 40pin interface, the spi available for Orange Pi 3B is spi3
 
 
 
[[File:pi3b-img264.png|577x193px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>Here, the SPI interface is tested through the w25q64 module. First, the w25q64 device is connected to the SPI3 interface</li></ol>
 
 
 
[[File:pi3b-img432.png|373x215px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then click the wiringOP icon to open the wiringOP APP</li></ol>
 
 
 
[[File:pi3b-img418.png|576x210px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>The main interface of wiringOP APP is displayed as shown in the figure below, click the SPI_TEST button to open the SPI test interface</li></ol>
 
 
 
[[File:pi3b-img433.png|574x149px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then click the '''OPEN''' button to initialize the SPI</li></ol>
 
 
 
[[File:pi3b-img434.png|576x241px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then fill in the bytes that need to be sent, such as reading the ID information of w25q64, fill in the address 0x9f in data[0], and then click the '''TRANSFER''' button</li></ol>
 
 
 
[[File:pi3b-img435.png|572x216px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Finally, the APP will display the read ID information</li></ol>
 
 
 
[[File:pi3b-img436.png|575x296px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>The MANUFACTURER ID of the w25q64 module is EFh, and the Device ID is 4017h, corresponding to the value read above (h stands for hexadecimal)</li></ol>
 
 
 
[[File:pi3b-img437.png|374x126px]]
 
 
 
<span id="pin-pwm-test"></span>
 
=== 40pin PWM test ===
 
 
 
# Android enables '''PWM11''' by default, and the corresponding pin is located at 40pin as shown in the figure below
 
 
 
[[File:pi3b-img438.png|334x107px]]
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>First click on the wiringOP icon to open the wiringOP APP</li></ol>
 
 
 
[[File:pi3b-img418.png|576x210px]]
 
 
 
<ol start="3" style="list-style-type: decimal;">
 
<li>Then click the '''PWM_TEST''' button on the main interface of wiringOP to enter the PWM test interface</li></ol>
 
 
 
[[File:pi3b-img439.png|575x150px]]
 
 
 
<ol start="4" style="list-style-type: decimal;">
 
<li>The base address corresponding to PWM11 is '''fe6f0030''', here pwmchip0 shows '''fdd70020.pwm''' on the right, then you need to click the drop-down option to select other pwmchips until '''febf0030.pwm''' is displayed on the right</li></ol>
 
 
 
[[File:pi3b-img440.png|576x178px]]
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>When the drop-down option selects '''pwmchip3''', the corresponding base address of PWM11 is '''fe6f0030''' on the right</li></ol>
 
 
 
[[File:pi3b-img441.png|574x161px]]
 
 
 
<ol start="6" style="list-style-type: decimal;">
 
<li>Then confirm the PWM channel, the default is channel 0, and confirm the PWM cycle, the default configuration is '''50000ns''', converted to PWM frequency is '''20KHz''', you can modify it yourself, click the '''EXPORT''' button to export '''PWM11'''</li></ol>
 
 
 
[[File:pi3b-img442.png|575x160px]]
 
 
 
<ol start="7" style="list-style-type: decimal;">
 
<li>Then drag the drag bar below to change the PWM duty cycle, and then check Enable to output the PWM waveform</li></ol>
 
 
 
[[File:pi3b-img443.png|575x167px]]
 
 
 
<ol start="8" style="list-style-type: decimal;">
 
<li>Then use an oscilloscope to measure the No. 32 pin in the 40pin of the development board, and you can see the following waveform</li></ol>
 
 
 
[[File:pi3b-img444.png|460x276px]]
 
 
 
<span id="how-to-use-adb"></span>
 
== How to use ADB ==
 
 
 
<span id="use-network-connection-adb-debugging"></span>
 
=== Use network connection adb debugging ===
 
 
 
'''Using the network adb does not require a data cable to connect the computer and the development board, but to communicate through the network, so first make sure that the wired or wireless network of the development board is connected, and then obtain the IP address of the development board, which will be used later.'''
 
 
 
# Make sure that the '''service.adb.tcp.port''' of the Android system is set to port number 5555
 
 
 
console:/ # '''getprop | grep &quot;adb.tcp&quot;'''
 
 
 
[service.adb.tcp.port]: ['''5555''']
 
 
 
<ol start="2" style="list-style-type: decimal;">
 
<li>If '''service.adb.tcp.port''' is not set, you can use the following command to set the port number of network adb</li></ol>
 
  
 
console:/ # '''setprop service.adb.tcp.port 5555'''
 
console:/ # '''setprop service.adb.tcp.port 5555'''
Line 8,498: Line 5,906:
  
 
<ol start="3" style="list-style-type: decimal;">
 
<ol start="3" style="list-style-type: decimal;">
<li>Install adb tool on Ubuntu PC</li></ol>
+
<li><p>在Ubuntu PC上安装adb工具</p>
 
+
<p>test@test:~$ '''sudo apt update'''</p>
test@test:~$ '''sudo apt update'''
+
<p>test@test:~$ '''sudo apt install -y adb'''</p></li>
 
+
<li><p>然后在Ubuntu PC上连接网络adb</p>
test@test:~$ '''sudo apt install -y adb'''
+
<p>test@test:~$ '''adb connect 192.168.1.xxx''' '''(IP地址需要修改为开发板的IP地址)'''</p>
 
+
<p>* daemon not running; starting now at tcp:5037</p>
<ol start="4" style="list-style-type: decimal;">
+
<p>* daemon started successfully</p>
<li>Then connect network adb on Ubuntu PC</li></ol>
+
<p>connected to 192.168.1.xxx:5555</p>
 
+
<p>test@test:~$ '''adb devices'''</p>
test@test:~$ '''adb connect 192.168.1.xxx''' '''(The IP address needs to be changed to the IP address of the development board)'''
+
<p>List of devices attached</p>
 
+
<p>192.168.1.xxx:5555 device</p></li>
* daemon not running; starting now at tcp:5037
+
<li><p>然后在Ubuntu PC上通过adb shell就可以登录到android系统</p></li></ol>
 
 
* daemon started successfully
 
 
 
connected to 192.168.1.xxx:5555
 
 
 
test@test:~$ '''adb devices'''
 
 
 
List of devices attached
 
 
 
192.168.1.xxx:5555 device
 
 
 
<ol start="5" style="list-style-type: decimal;">
 
<li>Then you can log in to the android system through the adb shell on the Ubuntu PC</li></ol>
 
  
 
test@test:~$ '''adb shell'''
 
test@test:~$ '''adb shell'''
Line 8,528: Line 5,923:
 
console:/ #
 
console:/ #
  
<span id="appendix"></span>
+
= 附录 =
= Appendix =
 
  
<span id="user-manual-update-history"></span>
+
== 用户手册更新历史 ==
== User Manual Update History ==
 
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
| style="text-align: left;"| '''Version'''
+
| style="text-align: left;"| '''版本'''
| style="text-align: left;"| '''Date'''
+
| style="text-align: left;"| '''日期'''
| style="text-align: left;"| '''Update Notes'''
+
| style="text-align: left;"| '''更新说明'''
 
|-
 
|-
 
| style="text-align: left;"| v0.1
 
| style="text-align: left;"| v0.1
 
| style="text-align: left;"| 2023-07-19
 
| style="text-align: left;"| 2023-07-19
| style="text-align: left;"| initial version
+
| style="text-align: left;"| 初始版本
 
|}
 
|}
  
<span id="image-update-history"></span>
+
== 镜像更新历史 ==
== Image Update History ==
 
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
| '''Date'''
+
| '''日期'''
| '''Update Notes'''
+
| '''更新说明'''
 
|-
 
|-
 
| 2023-07-19
 
| 2023-07-19
Line 8,568: Line 5,960:
 
O rangePi3B_RK3566_Android11_lcd_spi-nvme_v1.0.0.tar.gz
 
O rangePi3B_RK3566_Android11_lcd_spi-nvme_v1.0.0.tar.gz
  
* initial version
+
* 初始版本
  
 
|}
 
|}

Revision as of 09:49, 10 August 2023

Orange Pi 3B

用户手册

目录

1. Orange Pi 3B的基本特性 [7](#orange-pi-3b的基本特性)

1.1. 什么是 Orange Pi 3B [7](#什么是-orange-pi-3b)

1.2. Orange Pi 3B的用途 [7](#orange-pi-3b的用途)

1.3. Orange Pi 3B的硬件特性 [8](#orange-pi-3b的硬件特性)

1.4. Orange Pi 3B的顶层视图和底层视图 [10](#orange-pi-3b的顶层视图和底层视图)

1.5. Orange Pi 3B的接口详情图 [11](#orange-pi-3b的接口详情图)

2. 开发板使用介绍 [13](#开发板使用介绍)

2.1. 准备需要的配件 [13](#准备需要的配件)

2.2. 下载开发板的镜像和相关的资料 [16](#下载开发板的镜像和相关的资料)

2.3. 基于Windows PC将Linux镜像烧写到TF卡的方法 [18](#基于windows-pc将linux镜像烧写到tf卡的方法)

2.3.1. 使用balenaEtcher烧录Linux镜像的方法 [18](#使用balenaetcher烧录linux镜像的方法)

2.3.2. 使用RKDevTool烧录Linux镜像到TF卡中的方法 [21](#使用rkdevtool烧录linux镜像到tf卡中的方法)

2.3.3. 使用Win32Diskimager烧录Linux镜像的方法 [29](#使用win32diskimager烧录linux镜像的方法)

2.4. 基于Ubuntu PC将Linux镜像烧写到TF卡的方法 [31](#基于ubuntu-pc将linux镜像烧写到tf卡的方法)

2.5. 烧录Linux镜像到eMMC中的方法 [35](#_Toc32616)

2.5.1. 使用RKDevTool烧录Linux镜像到eMMC中的方法 [35](#使用rkdevtool烧录linux镜像到emmc中的方法)

2.5.2. 使用dd命令烧录Linux镜像到eMMC中的方法 [43](#使用dd命令烧录linux镜像到emmc中的方法)

2.6. 烧写Linux镜像到SPIFlash+NVMe SSD中的方法 [45](#烧写linux镜像到spiflashnvme-ssd中的方法)

2.6.1. 使用RKDevTool烧录的方法 [45](#使用rkdevtool烧录的方法)

2.6.2. 使用dd命令烧录的方法 [54](#使用dd命令烧录的方法)

2.6.3. 使用balenaEtcher软件烧录的方法 [59](#使用balenaetcher软件烧录的方法)

2.7. 烧录Android镜像到TF卡中的方法 [74](#烧录android镜像到tf卡中的方法)

2.7.1. 通过USB2.0烧录口将Android 镜像烧录到TF卡中的方法 [74](#通过usb2.0烧录口将android-镜像烧录到tf卡中的方法)

2.7.2. 使用SDDiskTool工具将Android镜像烧到TF卡的方法 [80](#使用sddisktool工具将android镜像烧到tf卡的方法)

2.8. 烧录Android镜像到eMMC中的方法 [83](#烧录android镜像到emmc中的方法)

2.8.1. 通过USB2.0烧录口将Android 镜像烧录到eMMC中的方法 [83](#通过usb2.0烧录口将android-镜像烧录到emmc中的方法)

2.8.2. 通过TF卡将Android11镜像烧录到eMMC中的方法 [90](#通过tf卡将android11镜像烧录到emmc中的方法)

2.9. 烧录Android镜像到SPIFlash+NVMe SSD中的方法 [95](#烧录android镜像到spiflashnvme-ssd中的方法)

2.10. 使用RKDevTool清空SPIFlash的方法 [100](#使用rkdevtool清空spiflash的方法)

2.11. 启动香橙派开发板 [107](#启动香橙派开发板)

2.12. 调试串口的使用方法 [108](#调试串口的使用方法)

2.12.1. 调试串口的连接说明 [108](#调试串口的连接说明)

2.12.2. Ubuntu平台调试串口的使用方法 [109](#ubuntu平台调试串口的使用方法)

2.12.3. Windows平台调试串口的使用方法 [112](#windows平台调试串口的使用方法)

2.13. 使用开发板40pin接口中的5v引脚供电说明 [116](#使用开发板40pin接口中的5v引脚供电说明)

3. Ubuntu/Debian Server和Xfce桌面系统使用说明 [117](#_Toc7393)

3.1. 已支持的Linux镜像类型和内核版本 [117](#已支持的linux镜像类型和内核版本)

3.2. Linux系统适配情况 [117](#_Toc10533)

3.3. 本手册Linux命令格式说明 [118](#本手册linux命令格式说明)

3.4. Linux系统登录说明 [119](#_Toc19677)

3.4.1. Linux系统默认登录账号和密码 [119](#_Toc4893)

3.4.2. 设置Linux系统终端自动登录的方法 [120](#设置linux系统终端自动登录的方法)

3.4.3. Linux桌面版系统自动登录说明 [120](#_Toc15422)

3.4.4. Linux桌面版系统root用户自动登录的设置方法 [121](#linux桌面版系统root用户自动登录的设置方法)

3.4.5. Linux桌面版系统禁用桌面的方法 [122](#linux桌面版系统禁用桌面的方法)

3.5. 板载LED灯测试说明 [123](#板载led灯测试说明)

3.6. 网络连接测试 [124](#_Toc3023)

3.6.1. 以太网口测试 [124](#以太网口测试)

3.6.2. WIFI连接测试 [125](#_Toc8082)

3.6.3. 设置静态IP地址的方法 [132](#设置静态ip地址的方法)

3.7. SSH远程登录开发板 [140](#_Toc23407)

3.7.1. Ubuntu下SSH远程登录开发板 [140](#ubuntu下ssh远程登录开发板)

3.7.2. Windows下SSH远程登录开发板 [141](#windows下ssh远程登录开发板)

3.8. 上传文件到开发板Linux系统中的方法 [143](#上传文件到开发板linux系统中的方法)

3.8.1. 在Ubuntu PC中上传文件到开发板Linux系统中的方法 [143](#在ubuntu-pc中上传文件到开发板linux系统中的方法)

3.8.2. 在Windows PC中上传文件到开发板Linux系统中的方法 [147](#在windows-pc中上传文件到开发板linux系统中的方法)

3.9. HDMI测试 [150](#hdmi测试)

3.9.1. HDMI显示测试 [150](#hdmi显示测试)

3.9.2. HDMI转VGA显示测试 [151](#hdmi转vga显示测试)

3.9.3. HDMI分辨率设置方法 [152](#hdmi分辨率设置方法)

3.10. 蓝牙使用方法 [155](#蓝牙使用方法)

3.10.1. 桌面版镜像的测试方法 [155](#桌面版镜像的测试方法-1)

3.11. USB接口测试 [158](#usb接口测试)

3.11.1. 连接USB鼠标或键盘测试 [158](#连接usb鼠标或键盘测试)

3.11.2. 连接USB存储设备测试 [159](#连接usb存储设备测试)

3.11.3. USB无线网卡测试 [159](#usb无线网卡测试)

3.11.4. USB摄像头测试 [167](#usb摄像头测试)

3.12. 音频测试 [169](#音频测试)

3.12.1. 在桌面系统中测试音频方法 [169](#在桌面系统中测试音频方法)

3.12.2. 使用命令播放音频的方法 [171](#使用命令播放音频的方法)

3.12.3. 使用命令测试录音的方法 [172](#使用命令测试录音的方法)

3.13. 温度传感器 [173](#温度传感器)

3.14. 40 Pin接口引脚说明 [173](#pin接口引脚说明)

3.15. 安装wiringOP的方法 [175](#安装wiringop的方法)

3.16. 40pin接口GPIO、I2C、UART、SPI和PWM测试 [176](#pin接口gpioi2cuartspi和pwm测试)

3.16.1. 40pin GPIO口测试 [177](#pin-gpio口测试)

3.16.2. 40pin GPIO口上下拉电阻的设置方法 [178](#pin-gpio口上下拉电阻的设置方法)

3.16.3. 40pin SPI测试 [179](#pin-spi测试)

3.16.4. 40pin I2C测试 [181](#pin-i2c测试)

3.16.5. 40pin的UART测试 [182](#pin的uart测试)

3.16.6. PWM的测试方法 [184](#pwm的测试方法)

3.17. wiringOP-Python的安装使用方法 [186](#wiringop-python的安装使用方法)

3.17.1. wiringOP-Python的安装方法 [186](#wiringop-python的安装方法)

3.17.2. 40pin GPIO口测试 [188](#pin-gpio口测试-1)

3.17.3. 40pin SPI测试 [190](#pin-spi测试-1)

3.17.4. 40pin I2C测试 [192](#pin-i2c测试-1)

3.17.5. 40pin的UART测试 [194](#pin的uart测试-1)

3.18. 硬件看门狗测试 [196](#硬件看门狗测试)

3.19. 查看RK3566芯片的序列号 [197](#查看rk3566芯片的序列号)

3.20. 下载安装arm64版本balenaEtcher的方法 [197](#下载安装arm64版本balenaetcher的方法)

3.21. 宝塔Linux面板的安装方法 [199](#宝塔linux面板的安装方法)

3.22. 设置中文环境以及安装中文输入法 [202](#设置中文环境以及安装中文输入法)

3.22.1. Debian系统的安装方法 [202](#debian系统的安装方法)

3.22.2. Ubuntu 20.04系统的安装方法 [209](#ubuntu-20.04系统的安装方法)

3.22.3. Ubuntu 22.04系统的安装方法 [213](#ubuntu-22.04系统的安装方法)

3.23. 远程登录Linux系统桌面的方法 [219](#远程登录linux系统桌面的方法)

3.23.1. 使用NoMachine远程登录 [219](#使用nomachine远程登录)

3.23.2. 使用VNC远程登录 [223](#使用vnc远程登录)

3.24. Linux系统支持的部分编程语言测试 [225](#linux系统支持的部分编程语言测试)

3.24.1. Debian Bullseye系统 [225](#debian-bullseye系统)

3.24.2. Ubuntu Focal系统 [227](#ubuntu-focal系统)

3.24.3. Ubuntu Jammy系统 [228](#ubuntu-jammy系统)

3.25. QT的安装方法 [230](#qt的安装方法)

3.26. ROS安装方法 [238](#ros安装方法)

3.26.1. Ubuntu20.04安装ROS 1 Noetic的方法 [238](#ubuntu20.04安装ros-1-noetic的方法)

3.26.2. Ubuntu20.04安装ROS 2 Galactic的方法 [242](#ubuntu20.04安装ros-2-galactic的方法)

3.26.3. Ubuntu22.04安装ROS 2 Humble的方法 [245](#ubuntu22.04安装ros-2-humble的方法)

3.27. 安装内核头文件的方法 [247](#安装内核头文件的方法)

3.28. 树莓派5寸屏幕的使用 [250](#树莓派5寸屏幕的使用)

3.28.1. 树莓派5寸屏幕的组装方法 [250](#树莓派5寸屏幕的组装方法)

3.28.2. 打开树莓派5寸屏幕配置的方法 [251](#打开树莓派5寸屏幕配置的方法)

3.28.3. 服务器版镜像旋转显示方向的方法 [254](#服务器版镜像旋转显示方向的方法)

3.28.4. 桌面版镜像旋转显示和触摸方向的方法 [254](#桌面版镜像旋转显示和触摸方向的方法)

3.29. 开关机logo使用说明 [257](#开关机logo使用说明)

3.30. ZFS文件系统的使用方法 [257](#zfs文件系统的使用方法)

3.30.1. 安装ZFS的方法 [258](#安装zfs的方法)

3.30.2. 创建ZFS池的方法 [259](#创建zfs池的方法)

3.30.3. 测试ZFS的数据去重功能 [261](#测试zfs的数据去重功能)

3.30.4. 测试ZFS的数据压缩功能 [261](#测试zfs的数据压缩功能)

3.31. 关机和重启开发板的方法 [262](#关机和重启开发板的方法)

4. Linux SDK——orangepi-build使用说明 [264](#_Toc10484)

4.1. 编译系统需求 [264](#编译系统需求)

4.1.1. 使用开发板的Ubuntu22.04系统编译 [264](#使用开发板的ubuntu22.04系统编译)

4.1.2. 使用x64的Ubuntu22.04电脑编译 [264](#使用x64的ubuntu22.04电脑编译)

4.2. 获取Linux sdk的源码 [266](#获取linux-sdk的源码)

4.2.1. 从github下载orangepi-build [266](#从github下载orangepi-build)

4.2.2. 下载交叉编译工具链 [268](#下载交叉编译工具链)

4.2.3. orangepi-build完整目录结构说明 [269](#orangepi-build完整目录结构说明)

4.3. 编译u-boot [270](#编译u-boot)

4.4. 编译Linux内核 [274](#_Toc12646)

4.5. 编译rootfs [278](#编译rootfs)

4.6. 编译Linux镜像 [281](#编译linux镜像)

5. Android 11系统的使用说明 [285](#_Toc17425)

5.1. 已支持的Android版本 [285](#已支持的android版本)

5.2. Android 功能适配情况 [285](#android-功能适配情况)

5.3. WIFI的连接测试方法 [286](#wifi的连接测试方法)

5.4. Wi-Fi hotspot的使用方法 [288](#wi-fi-hotspot的使用方法)

5.5. 蓝牙的测试方法 [290](#蓝牙的测试方法)

5.6. 树莓派5寸屏幕的使用方法 [294](#树莓派5寸屏幕的使用方法)

5.7. 40pin 接口 GPIO、UART、SPI 和 PWM 测试 [295](#_Toc17235)

5.7.1. 40pin GPIO 口测试 [295](#pin-gpio-口测试)

5.7.2. 40pin的UART测试 [298](#pin的uart测试-2)

5.7.3. 40pin的SPI测试 [301](#pin的spi测试)

5.7.4. 40pin的PWM测试 [304](#pin的pwm测试)

5.8. ADB的使用方法 [307](#adb的使用方法)

5.8.1. 使用网络连接adb调试 [307](#使用网络连接adb调试)

6. 附录 [309](#附录)

6.1. 用户手册更新历史 [309](#用户手册更新历史)

6.2. 镜像更新历史 [309](#镜像更新历史)

Contents

Orange Pi 3B的基本特性

什么是 Orange Pi 3B

Orange Pi 3B采用了瑞芯微RK3566四核64位Cortex-A55处理器,采用的22nm工艺,主频最高可达1.8GHz,集成ARM Mali-G52 GPU,内嵌高性能2D图像加速模块,内置0.8Tops算力的AI加速器NPU,可选2GB、4GB或者8GB内存,具有高达4K显示处理能力。

Orange Pi 3B引出了相当丰富的接口,包括HDMI输出、M.2 PCIe2.0x1、千兆网口、USB2.0、USB3.0接口和40pin扩展排针等。可广泛适用于高端平板、边缘计算、人工智能、云计算、AR/VR、智能安防、智能家居等领域,覆盖 AIoT各个行业。

Orange Pi 3B支持Android11、Ubuntu22.04、Ubuntu20.04、Debian11、Debian12、开源鸿蒙4.0 Beta1、Orange Pi OS(Arch)、基于开源鸿蒙的Orange Pi OS(OH)等操作系统。

Orange Pi 3B的用途

我们可以用它实现:

  • 一台Linux桌面计算机
  • 一台Linux网络服务器
  • Android平板
  • Android游戏机等

当然还有其他更多的功能,依托强大的生态系统以及各式各样的扩展配件,Orange Pi可以帮助用户轻松实现从创意到原型再到批量生产的交付,是创客、梦想家、业余爱好者的理想创意平台。

Orange Pi 3B的硬件特性




硬件规格参数
主控芯片 Rockchip RK3566
CPU 四核 64 位 Cortex-A55 处理器,22nm 先进工艺,主频最高 1.8GHz
GPU ·ARM Mali G52 2EE图形处理器

·支持OpenGL ES 1.1/2.0/3.2,OpenCL 2.0,Vulkan 1.1

·内嵌高性能2D加速硬件

NPU ·集成 RKNN NPU AI 加速器,0.8Tops@INT8 性能

·支持 C affe/TensorFlow/TFLite/ONNX/PyTorch/Keras/Darknet 架构模型一键转换

VPU ·4K@60fps H.265/H.264/VP9 视频解码

·1080P@100fps H.265 视频编码

·1080P@60fpsH.264 视频编码

PMU Rockchip RK809-5
内存 2GB/4GB/8GB (LPDDR4/4x)
存储 ·支持eMMC模块:16GB/32GB/64GB/128GB

·SPI Flash: 16MB/32MB

·M.2 M-KEY插槽:SATA3 或者 PCIe2.0 NVME SSD

·TF卡槽

Wi-Fi+蓝牙 Wi-Fi 5+BT 5.0,BLE(20U5622)
以太网收发器 10/100/1000Mbps以太网(板载PHY芯片:YT8531C)
显示 ·1x HDMI TX 2.0,最大支持4K@60FPS

·1xMIPI DSI 2 Lane

·eDP1.3

摄像头 1xMIPI CSI 2 Lane摄像头接口
USB ·1xUSB 2.0 支持Device或HOST模式

·1xUSB 3.0 HOST

·2xUSB 2.0 HOST

音频 3.5mm耳机孔音频输入/输出
按键 1x MaskROM键,1xRESET键,1 xPOWER键
FAN 2Pin 1.25mm规格的5V风扇接口
RTC 2Pin 1.25mm规格的备用电池接口
40Pin 40Pin功能扩展接口,支持以下接口类型:

GPIO、UART、I2C、SPI、PWM

电源 Type-C 5V3A
支持的操作系统 Android11、Ubuntu22 .04、Ubuntu20.04、Debian11、Debian12、开源鸿蒙4.0 Beta1、Orange Pi OS(Arch)、基于开源鸿蒙的Orange Pi OS(OH)等操作系统。
外观规格介绍
PCB尺寸 85mm x 56mm x 17mm
重量 49g
[] (media/image3.pn g){width=“0.2694 7944006999125in” height=“0.3153 127734033246in”}

rangePi™是 深圳市迅龙软件有 限公司的注册商标

Orange Pi 3B的顶层视图和底层视图

顶层视图:

底层视图:

Orange Pi 3B的接口详情图

575x277px

四个定位孔的直径都是3.0mm,M.2 PICE设备固定孔直径为3.5mm。

开发板使用介绍

准备需要的配件

  1. TF卡,最小16GB容量(推荐32GB或以上)的class10级或以上的高速闪迪卡

    124x96px

  2. TF卡读卡器,用于将镜像烧录到TF卡中

    139x106px

  3. HDMI接口的显示器

    256x195px

  4. HDMI转HDMI连接线,用于将开发板连接到HDMI显示器或者电视进行显示

    199x129px

    注意,如果想接4K显示器,请确保HDMI线支持4K视频输出。

  5. 电源适配器,Orange Pi 3B建议使用5V/3A或者5V/4A的Type-C电源供电

    188x133px

  6. USB接口的鼠标和键盘,只要是标准USB接口的鼠标和键盘都可以,鼠标和键盘可以用来控制Orange Pi开发板

    206x170px

  7. USB摄像头

    255x148px

  8. 5V的散热风扇。如下图所示,开发板上有用于接散热风扇的接口,接口规格为2pin 1.25mm间距

    开发板上的风扇可以通过PWM来调节转速和开关。

    353x231px

  9. 百兆或者千兆网线,用于将开发板连接到因特网

    143x112px

  10. USB2.0公对公数据线,用于烧录镜像到eMMC、NVMe SSD等功能

  11. 3.3V的USB转TTL模块和杜邦线,使用串口调试功能时,需要USB转TTL模块和杜邦线来连接开发板和电脑

    G7U7JZX(V`L$`A6864]38$P 305x110px

  12. 安装有Ubuntu和Windows操作系统的个人电脑

1 Ubuntu22.04 PC 可选,用于编译Linux源码
2 Windows PC 用于烧录Android和Linux镜像

下载开发板的镜像和相关的资料

  1. 中文版资料的下载网址为:

http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html

576x455px

  1. 英文版资料的下载网址为:

    http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html

    575x481px

  2. 资料主要包含

    1. Android源码:保存在百度云盘和谷歌网盘上

    2. Linux源码:保存在Github上

    3. 用户手册和原理图:保存在百度云盘和谷歌网盘上

    4. 官方工具:主要包括开发板使用过程中需要用到的软件

    5. Android镜像:保存在百度云盘和谷歌网盘上

    6. Ubuntu镜像:保存在百度云盘和谷歌网盘上

    7. Debian镜像:保存在百度云盘和谷歌网盘上

    8. Orange Pi OS镜像:保存在百度云盘和谷歌网盘上

    9. OpenHarmony镜像:保存在百度云盘和谷歌网盘上

基于Windows PC将Linux镜像烧写到TF卡的方法

注意,这里说的Linux镜像具体指的是从Orange Pi资料下载页面下载的Debian、Ubuntu这样的Linux发行版镜像。

使用balenaEtcher烧录Linux镜像的方法

  1. 首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为class10级或class10级以上,建议使用闪迪等品牌的TF卡
  2. 然后使用读卡器把TF卡插入电脑
  3. Orange Pi的资料下载页面下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”.img”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上。
  4. 然后下载Linux镜像的烧录软件——balenaEtcher,下载地址为:

https://www.balena.io/etcher/

  1. 进入balenaEtcher下载页面后,点击绿色的下载按钮会跳到软件下载的地方

    359x172px

  2. 然后可以选择下载balenaEtcher的Portable版本的软件,Portable版本无需安装,双击打开就可以使用

    382x141px

  3. 如果下载的是需要安装版本的balenaEtcher,请先安装再使用。如果下载的Portable版本balenaEtcher,直接双击打开即可,打开后的balenaEtcher界面如下图所示:

    369x233px

打开balenaEtcher时如果提示下面的错误:

209x164px

请选择balenaEtcher后点击右键,然后选择以管理员身份运行。

273x37px

  1. 使用balenaEtcher烧录Linux镜像的具体步骤如下所示

    1. 首先选择要烧录的Linux镜像文件的路径

    2. 然后选择TF卡的盘符

    3. 最后点击Flash就会开始烧录Linux镜像到TF卡中

      423x237px

  2. balenaEtcher烧录Linux镜像的过程显示的界面如下图所示,另外进度条显示紫色表示正在烧录Linux镜像到TF卡中

    428x268px

  3. Linux镜像烧录完后,balenaEtcher默认还会对烧录到TF卡中的镜像进行校验,确保烧录过程没有出问题。如下图所示,显示绿色的进度条就表示镜像已经烧录完成,balenaEtcher正在对烧录完成的镜像进行校验

    427x267px

  4. 成功烧录完成后balenaEtcher的显示界面如下图所示,如果显示绿色的指示图标说明镜像烧录成功,此时就可以退出balenaEtcher,然后拔出TF卡插入到开发板的TF卡槽中使用了

    430x266px

使用RKDevTool烧录Linux镜像到TF卡中的方法

  1. 首先需要准备一根品质良好的USB2.0公对公数据线

  2. 还需要准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为class10级或class10级以上,建议使用闪迪等品牌的TF卡

  3. 然后从Orange Pi的资料下载页面下载瑞芯微驱动DriverAssitant_v5.12.zipMiniLoader以及烧录工具RKDevTool_Release_v3.15.zip

    1. Orange > Pi的资料下载页面首先选择官方工具,然后进入下面的文件夹中

      267x56px

    2. 然后下载下面的所有文件

      246x97px

      注意,“MiniLoader-烧录Linux镜像才需要用到的东西”文件夹下文简称为MiniLoader文件夹。

  4. 然后从Orange Pi的资料下载页面下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”.img”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上

  5. 然后用解压软件解压DriverAssitant_v5.12.zip,再在解压后的文件夹中找到DriverInstall.exe可执行文件并打开即可

    464x136px

  6. 打开DriverInstall.exe后安装瑞芯微驱动的步骤如下所示

    1. 点击”驱动安装”按钮

      245x129px

    2. 等待一段时间后,会弹出窗口提示”安装驱动成功”,然后点击“确定”按钮即可

      254x132px

  7. 然后解压RKDevTool_Release_v3.15.zip,此软件无需安装,在解压后的文件夹中找到 RKDevTool打开即可

    448x132px

  8. 打开RKDevTool 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”没有发现设备

    402x189px

  9. 然后开始烧录Linux镜像到TF卡中

    1. 首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录口的位置如下图所示

      271x117px

    2. 确保TF卡插槽没有插入TF卡

    3. 然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:

      289x100px

    4. 然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了

      305x94px

    5. 如果前面的步骤顺利,此时开发板会进入MASKROM模式,在烧录工具的界面上会提示”发现一个MASKROM设备

      454x213px

    6. 此时请在TF卡插槽中插入TF卡

    7. 然后将鼠标光标放在下面的这片区域中

      452x212px

    8. 然后点击鼠标右键会弹出下图所示的选择界面

      453x213px

    9. 然后选择导入配置选项

      458x215px

    10. 然后选择前面下载的MiniLoader文件夹中的rk3588_linux_tfcard.cfg配置文件,再点击打开

      457x215px

    11. 然后点击确定

      483x227px

    12. 然后点击下图所示的位置

      486x228px

    13. 再选择前面下载的MiniLoader文件夹中rk3566_MiniLoaderAll.bin,再点击打开

    14. 然后点击下图所示的位置

      493x232px

    15. 然后选择想要烧录的Linux镜像的路径,再点击打开

      在烧录镜像前,建议将要烧录的Linux镜像重命名为orangepi.img或者其它比较短的名字,这样在烧录镜像的时候就能看到烧录进度的百分比数值。

      499x234px

    16. 然后请勾选上强制按地址写选项

      497x234px

    17. 再点击执行按钮就会开始烧录Linux镜像到开发板的tf卡中

      497x233px

    18. Linux镜像烧录完后的显示log如下图所示

    19. 烧录完Linux镜像到tf卡中后,Linux系统会自动启动。

使用Win32Diskimager烧录Linux镜像的方法

  1. 首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为class10级或class10级以上,建议使用闪迪等品牌的TF卡

  2. 然后使用读卡器把TF卡插入电脑

  3. 接着格式化TF卡

    1. 可以使用SD Card Formatter这个软件格式化TF卡,其下载地址为

https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip

  1. 下载完后直接解压安装即可,然后打开软件

  2. 如果电脑只插入了TF卡,则”Select card”一栏中会显示TF卡的盘符,如果电脑插入了多个USB存储设备,可以通过下拉框选择TF卡对应的盘符

  3. 然后点击”Format”,格式化前会弹出一个警告框,选择”是(Y)”后就会开始格式化

304x147px

  1. 格式化完TF卡后会弹出下图所示的信息,点击确定即可

    186x149px

  1. Orange Pi的资料下载页面下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”.img”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上

  2. 使用Win32Diskimager烧录Linux镜像到TF卡

    1. Win32Diskimager的下载页面为

http://sourceforge.net/projects/win32diskimager/files/Archive/

  1. 下载完后直接安装即可,Win32Diskimager界面如下所示

    1. 首先选择镜像文件的路径

    2. 然后确认下TF卡的盘符和”设备”一栏中显示的一致

    3. 最后点击”写入”即可开始烧录

      297x206px

  2. 镜像写入完成后,点击”退出”按钮退出即可,然后就可以拔出TF卡插到开发板中启动

基于Ubuntu PC将Linux镜像烧写到TF卡的方法

注意,这里说的Linux镜像具体指的是从Orange Pi资料下载页面下载的Debian、Ubuntu这样的Linux发行版镜像,Ubuntu PC指的是安装了Ubuntu系统的个人电脑。

  1. 首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为class10级或class10级以上,建议使用闪迪等品牌的TF卡
  2. 然后使用读卡器把TF卡插入电脑
  3. 下载balenaEtcher软件,下载地址为

https://www.balena.io/etcher/

  1. 进入balenaEtcher下载页面后,点击绿色的下载按钮会跳到软件下载的地方

    434x208px

  2. 然后选择下载Linux版本的软件即可

    430x163px

  3. Orange Pi的资料下载页面下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”.img”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上

    7z结尾的压缩包的解压命令如下所示

    test@test:~$ 7z x Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.7z

    test@test:~$ ls Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.*

    Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.7z Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.sha #校验和文件

    Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.img #镜像文件

  4. 解压镜像后可以先用sha256sum -c *.sha命令计算下校验和是否正确,如果提示成功说明下载的镜像没有错,可以放心的烧录到TF卡,如果提示校验和不匹配说明下载的镜像有问题,请尝试重新下载

    test@test:~$ sha256sum -c *.sha

    Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.img: OK

  5. 然后在Ubuntu PC的图形界面双击balenaEtcher-1.5.109-x64.AppImage即可打开balenaEtcher(无需安装),balenaEtcher打开后的界面显示如下图所示

    423x251px

  6. 使用balenaEtcher烧录Linux镜像的具体步骤如下所示

    1. 首先选择要烧录的Linux镜像文件的路径

    2. 然后选择TF卡的盘符

    3. 最后点击Flash就会开始烧录Linux镜像到TF卡中

      431x278px

  7. balenaEtcher烧录Linux镜像的过程显示的界面如下图所示,另外进度条显示紫色表示正在烧录Linux镜像到TF卡中

    429x184px

  8. Linux镜像烧录完后,balenaEtcher默认还会对烧录到TF卡中的镜像进行校验,确保烧录过程没有出问题。如下图所示,显示绿色的进度条就表示镜像已经烧录完成,balenaEtcher正在对烧录完成的镜像进行校验

    436x190px

  1. 成功烧录完成后balenaEtcher的显示界面如下图所示,如果显示绿色的指示图标说明镜像烧录成功,此时就可以退出balenaEtcher,然后拔出TF卡插入到开发板的TF卡槽中使用了

    435x257px

烧录Linux镜像到eMMC中的方法

使用RKDevTool烧录Linux镜像到eMMC中的方法

注意,下面所有的操作都是在Windows电脑中进行的。

注意,这里说的Linux镜像具体指的是从Orange Pi资料下载页面下载的Debian、Ubuntu这样的Linux发行版镜像。

  1. 开发板预留了eMMC模块的扩展接口,烧录系统到eMMC前,首先需要购买一个与开发板eMMC接口相匹配的eMMC模块。然后将eMMC模块安装到开发板上。eMMC模块和插入开发板的方法如下所示:

    115x84px 120x87px

    277x129px

  2. 还需要准备一根品质良好的USB2.0公对公数据线

  3. 然后从Orange Pi的资料下载页面下载瑞芯微驱动DriverAssitant_v5.12.zipMiniLoader以及烧录工具RKDevTool_Release_v3.15.zip

    1. Orange > Pi的资料下载页面首先选择官方工具,然后进入下面的文件夹中

      366x77px

    2. 然后下载下面的所有文件

      315x125px

      注意,“MiniLoader-烧录Linux镜像才需要用到的东西”文件夹下文简称为MiniLoader文件夹。

  4. 然后从Orange Pi的资料下载页面下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”.img”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上

  5. 然后用解压软件解压DriverAssitant_v5.12.zip,再在解压后的文件夹中找到DriverInstall.exe可执行文件并打开即可

    496x146px

  6. 打开DriverInstall.exe后安装瑞芯微驱动的步骤如下所示

    1. 点击”驱动安装”按钮

      284x149px

    2. 等待一段时间后,会弹出窗口提示”安装驱动成功”,然后点击“确定”按钮即可

      296x154px

  7. 然后解压RKDevTool_Release_v3.15.zip,此软件无需安装,在解压后的文件夹中找到 RKDevTool打开即可

    484x143px

  8. 打开RKDevTool 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”没有发现设备

    442x208px

  9. 然后开始烧录Linux镜像到eMMC中

    1. 首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录口的位置如下图所示

      275x118px

    2. 确保开发板没有插入TF卡,没有连接电源

    3. 然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:

      289x100px

    4. 然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了

      305x94px

    5. 如果前面的步骤顺利,此时开发板会进入MASKROM模式,在烧录工具的界面上会提示”发现一个MASKROM设备

      457x215px

    6. 然后将鼠标光标放在下面的这片区域中

      458x215px

    7. 然后点击鼠标右键会弹出下图所示的选择界面

      460x216px

    8. 然后选择导入配置选项

      458x215px

    9. 然后选择前面下载的MiniLoader文件夹中的rk3588_linux_emmc.cfg配置文件,再点击打开

      466x219px

    10. 然后点击确定

      468x220px

    11. 然后点击下图所示的位置

      462x217px

    12. 再选择前面下载的MiniLoader文件夹中rk3566_MiniLoaderAll.bin,再点击打开

    13. 然后点击下图所示的位置

      459x216px

    14. 然后选择想要烧录的Linux镜像的路径,再点击打开

      在烧录镜像前,建议将要烧录的Linux镜像重命名为orangepi.img或者其它比较短的名字,这样在烧录镜像的时候就能看到烧录进度的百分比数值。

      499x234px

    15. 然后请勾选上强制按地址写选项

      501x235px

    16. 再点击执行按钮就会开始烧录Linux镜像到开发板的eMMC中

      502x236px

    17. Linux镜像烧录完后的显示log如下图所示

      500x235px

    18. 烧录完Linux镜像到eMMC中后,Linux系统会自动启动。

      注意,烧录镜像到eMMC中后如果测试发现启动不了,请清空下SPIFlash后再启动试下。清空SPIFlash的方法请参考使用RKDevTool清空SPIFlash的方法小节的内容。

使用dd命令烧录Linux镜像到eMMC中的方法

注意,这里说的Linux镜像具体指的是从Orange Pi资料下载页面下载的Debian、Ubuntu或者OPi OS Arch这样的Linux发行版镜像。

  1. 开发板预留了eMMC模块的扩展接口,烧录系统到eMMC前,首先需要购买一个与开发板eMMC接口相匹配的eMMC模块。然后将eMMC模块安装到开发板上。eMMC模块和插入开发板的方法如下所示:

    115x84px 120x87px

    286x133px

  2. 使用dd命令烧录Linux镜像到eMMC中需要借助TF卡来完成,所以首先需要将Linux镜像烧录到TF卡上,然后使用TF卡启动开发板进入Linux系统。烧录Linux镜像到TF卡的方法请见基于Windows PC将Linux镜像烧录到TF卡的方法基于Ubuntu PC将Linux镜像烧录到TF卡的方法两小节的说明。

  3. 使用TF卡启动Linux系统后,我们首先将解压后的Linux镜像文件(从官网下载的Debian、Ubuntu镜像或者OPi OS(Arch)镜像)上传到TF卡中。上传Linux镜像文件到开发板中的方法请参考上传文件到开发板Linux系统中的方法小节的说明。

  4. 上传完镜像到开发板的Linux系统中后,我们再在开发板Linux系统的命令行中进入镜像文件的存放路径,比如,我将开发板的Linux镜像存放在/home/orangepi/Desktop目录下了,然后进入/home/orangepi/Desktop目录就能看到上传的镜像文件了。

    orangepi@orangepi:~$ cd /home/orangepi/Desktop

    orangepi@orangepi:~/Desktop$ ls

    Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img

    怎么进入开发板Linux系统的命令行?

  1. 使用串口登录终端的方法请参考调试串口的使用方法一小节的说明。
  2. 使用ssh远程登录Linux系统请参考SSH远程登录开发板一小节的说明。
  3. 如果接了HDMI、LCD等显示屏幕,可以在桌面中打开一个命令行终端。
  1. 接下来,我们先使用下面的命令确认下eMMC的设备节点

    orangepi@orangepi:~/Desktop$ ls /dev/mmcblk*boot0 | cut -c1-12

    /dev/mmcblk0

  2. 然后我们可以使用dd命令清空下eMMC,注意of=参数后面请填入上面命令输出的结果

    orangepi@orangepi:~/Desktop$ sudo dd bs=1M if=/dev/zero of=/dev/mmcblk0 count=1000 status=progress

    orangepi@orangepi:~/Desktop$ sudo sync

  3. 然后就可以使用dd命令烧录开发板的Linux镜像到eMMC中

    1. 下面的命令中 if= > 参数后面是要填写Linux镜像存放的完整路径+Linux镜像的名字(比如/home/orangepi/Desktop/Linux镜像的名字)。因为上面我们已经进入Linux镜像的路径下了,所以只需要填写Linux镜像的名字的即可。

    2. 下面命令中的Linux镜像名请不要照抄,要替换为实际的镜像名(因为镜像的版本号可能会更新)。

      sudo dd bs=1M if=Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img of=/dev/mmcblk0 status=progress

      sudo sync

      注意,如果上传的是 .7z或者.xz 结尾Linux镜像压缩文件,使用dd命令烧录前请记得先解压。

      dd命令的所有参数的详细说明和更多用法可以在Linux系统中执行man dd命令来查看。

  4. 当成功烧录开发板的Linux镜像到eMMC后,此时就可以使用poweroff命令关机了。然后请拔出TF卡,再短按电源按键开机,此时就会启动eMMC中的Linux系统了。

    注意,烧录镜像到eMMC中后如果测试发现启动不了,请清空下SPIFlash后再启动试下。清空SPIFlash的方法请参考使用RKDevTool清空SPIFlash的方法小节的内容。

烧写Linux镜像到SPIFlash+NVMe SSD中的方法

注意,这里说的Linux镜像具体指的是从Orange Pi资料下载页面下载的Debian、Ubuntu这样的Linux发行版镜像。

注意,下面所有的操作都是在Windows电脑中进行的。

使用RKDevTool烧录的方法

  1. 首先需要准备一个NVMe SSD固态硬盘,开发板M.2插槽支持的PCIe为PCIe2.0x1,理论最高速度为500MB/s。PCIe3.0和PCIe4.0的NVMe SSD也是可以用的,只是速度最高只有PCIe2.0x1的速度。

    1. M.2 2230规格的SSD如下所示

      157x128px

    2. M.2 2242规格的SSD如下所示

      174x105px

  2. 然后把NVMe SSD插入开发板的M.2 PCIe接口,并固定好

    283x63px

  3. SPI Flash在开发板上的位置如下图所示,开始烧录前无需其他设置

    266x211px

  4. 然后需要准备一根品质良好的USB2.0公对公数据线

  5. 然后从Orange Pi的资料下载页面下载瑞芯微驱动DriverAssitant_v5.12.zipMiniLoader以及烧录工具RKDevTool_Release_v3.15.zip

    1. Orange > Pi的资料下载页面首先选择官方工具,然后进入下面的文件夹中

      294x61px

    2. 然后下载下面的所有文件

      244x97px

      注意,“MiniLoader-烧录Linux镜像才需要用到的东西”文件夹下文简称为MiniLoader文件夹。

  6. 然后从Orange Pi的资料下载页面下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”.img”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上

  7. 然后用解压软件解压DriverAssitant_v5.12.zip,再在解压后的文件夹中找到DriverInstall.exe可执行文件并打开即可

    446x131px

  8. 打开DriverInstall.exe后安装瑞芯微驱动的步骤如下所示

    1. 点击”驱动安装”按钮

      253x133px

    2. 等待一段时间后,会弹出窗口提示”安装驱动成功”,然后点击“确定”按钮即可

      269x140px

  9. 然后解压RKDevTool_Release_v3.15.zip,此软件无需安装,在解压后的文件夹中找到 RKDevTool打开即可

    402x119px

  10. 打开RKDevTool 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”没有发现设备

    402x189px

  11. 然后开始烧录Linux镜像到SSD中

    1. 首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录接口的位置如下图所示

      275x118px

    2. 确保开发板没有连接电源和插入TF卡以及eMMC

    3. 然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:

      289x100px

    4. 然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了

      305x94px

    5. 如果前面的步骤顺利,此时开发板会进入MASKROM模式,在烧录工具的界面上会提示”发现一个MASKROM设备

      457x215px

    6. 然后将鼠标光标放在下面的这片区域中

      459x216px

    7. 然后点击鼠标右键会弹出下图所示的选择界面

      453x213px

    8. 然后选择导入配置选项

      458x215px

    9. 然后进入前面下载的MiniLoader文件夹中,然后选择rk3588_linux_pcie.cfg配置文件,再点击打开

      462x217px

    10. 然后点击确定

      468x220px

    11. 然后点击下图所示的位置

      475x223px

    12. 再选择前面下载的MiniLoader文件夹中rk3566_MiniLoaderAll.bin,再点击打开

    13. 然后点击下图所示的位置

      486x228px

    14. 然后进入前面下载的MiniLoader文件夹中,再选择rk3566_rkspi_loader.img,再点击打开

    15. 然后点击下图所示的位置

      493x231px

    16. 然后选择想要烧录的Linux镜像的路径,再点击打开

      在烧录镜像前,建议将要烧录的Linux镜像重命名为orangepi.img或者其它比较短的名字,这样在烧录镜像的时候就能看到烧录进度的百分比数值。

      499x234px

    17. 然后请勾选上强制按地址写选项

      498x234px

    18. 再点击执行按钮就会开始烧录Linux镜像到SSD中

      500x235px

    19. Linux镜像烧录完后的显示log如下图所示

      504x240px

      如果烧录有问题,请先清空下SPIFlash然后再烧录试下。清空SPIFlash的方法请参考下使用RKDevTool清空SPIFlash的方法一小节的说明。

    20. 镜像烧录完后会自动启动SPIFlash+PCIe > SSD中的Linux系统,如果没有正常启动,请重新上电试下。

使用dd命令烧录的方法

  1. 首先需要准备一个NVMe SSD固态硬盘,开发板M.2插槽支持的PCIe为PCIe2.0x1,理论最高速度为500MB/s。PCIe3.0和PCIe4.0的NVMe SSD也是可以用的,只是速度最高只有PCIe2.0x1的速度。

    1. M.2 2230规格的SSD如下所示

      158x129px

    2. M.2 2242规格的SSD如下所示

      192x116px

  2. 然后把NVMe SSD插入开发板的M.2 PCIe接口,并固定好

    283x63px

  3. SPI Flash在开发板上的位置如下图所示,开始烧录前无需其他设置

    261x198px

  4. 烧录Linux镜像到SPIFlash+NVMe SSD中需要借助TF卡来完成,所以首先需要将Linux镜像烧录到TF卡上,然后使用TF卡启动开发板进入Linux系统。烧录Linux镜像到TF卡的方法请见基于Windows PC将Linux镜像烧写到TF卡的方法基于Ubuntu PC将Linux镜像烧写到TF卡的方法两小节的说明。

  5. 使用TF卡启动Linux系统后,我们首先烧录u-boot镜像到SPI Flash中

    1. 先运行下nand-sata-install普通用户记得加sudo权限

      orangepi@orangepi:~$ sudo nand-sata-install

    2. 然后选择7 Install/Update ther bootloader on SPI Flash

  1. 然后选择<Yes>
  1. 然后请耐心等待烧录完成,烧录完成后显示如下所示(左下角会显示一个Done):
  1. 然后将Linux镜像文件(从官网下载的Debian或者Ubuntu镜像)上传到TF卡中。上传Linux镜像文件到开发板中的方法请参考上传文件到开发板Linux系统中的方法小节的说明。

  2. 上传完镜像到开发板的Linux系统中后,我们再在开发板Linux系统的命令行中进入镜像文件的存放路径,比如,我将开发板的Linux镜像存放在/home/orangepi/Desktop目录下了,然后进入/home/orangepi/Desktop目录就能看到上传的镜像文件了。

    orangepi@orangepi:~$ cd /home/orangepi/Desktop

    orangepi@orangepi:~/Desktop$ ls

    Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img

    怎么进入开发板Linux系统的命令行?

  1. 使用串口登录终端的方法请参考调试串口的使用方法一小节的说明。
  2. 使用ssh远程登录Linux系统请参考SSH远程登录开发板一小节的说明。
  3. 如果接了HDMI、LCD等显示屏幕,可以在桌面中打开一个命令行终端。
  1. 接下来,我们先确认下NVMe SSD已经被开发板的Linux正常识别了。如果NVMe SSD正常识别了的话,使用sudo fdisk -l命令就能看到nvme相关的信息

    orangepi@orangepi:~/Desktop$ sudo fdisk -l | grep "nvme0n1"

    Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors

    使用lspci命令可以看到一个NVMe相关的PCI设备

    orangepi@orangepi:~/Desktop$ lspci

    00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)

    01:00.0 Non-Volatile memory controller: Realtek Semiconductor Co., Ltd. Device 5765 (rev 01)

  2. 然后我们可以使用dd命令清空下NVMe SSD(可选)

    orangepi@orangepi3b:~/Desktop$ sudo dd bs=1M if=/dev/zero of=/dev/nvme0n1 count=2000 status=progress

    orangepi@orangepi3b:~/Desktop$ sudo sync

  3. 然后就可以使用dd命令烧录开发板的Linux镜像到NVMe SSD中

    1. 下面的命令中 if= > 参数后面是要填写Linux镜像存放的完整路径+Linux镜像的名字(比如/home/orangepi/Desktop/Linux镜像的名字)。因为上面我们已经进入Linux镜像的路径下了,所以只需要填写Linux镜像的名字的即可。

    2. 下面命令中的Linux镜像名请不要照抄,要替换为实际的镜像名(因为镜像的版本号可能会更新)。

      sudo dd bs=1M if=Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img of=/dev/nvme0n1 status=progress

      sudo sync

      注意,如果上传的是 .7z或者.xz 或者.gz结尾Linux镜像压缩文件,使用dd命令烧录前请记得先解压。

      dd命令的所有参数的详细说明和更多用法可以在Linux系统中执行man dd命令来查看。

  4. 当成功烧录开发板的Linux镜像到NVMe SSD后,此时就可以使用poweroff命令关机了。然后请拔出TF卡,再短按电源按键开机,此时就会启动SPIFlash+NVMe SSD中的Linux系统了。

  5. 启动NVMe SSD中的系统后,使用df -h命令可以看到实际的硬盘容量

    1. 128GB NVMe SSD

      orangepi@orangepi:~$ df -h

      Filesystem Size Used Avail Use% Mounted on

      udev 3.8G 8.0K 3.8G 1% /dev

      tmpfs 769M 1.4M 768M 1% /run

      /dev/nvme0n1p2 118G 5.8G 111G 5% /

      tmpfs 3.8G 0 3.8G 0% /dev/shm

      tmpfs 5.0M 4.0K 5.0M 1% /run/lock

      tmpfs 3.8G 16K 3.8G 1% /tmp

      /dev/nvme0n1p1 256M 90M 166M 36% /boot

      /dev/zram1 194M 9.9M 170M 6% /var/log

      tmpfs 769M 60K 769M 1% /run/user/1000

      tmpfs 769M 48K 769M 1% /run/user/0

    2. 2TB NVMe SSD

      orangepi@orangepi:~$ df -h

      Filesystem Size Used Avail Use% Mounted on

      udev 3.8G 8.0K 3.8G 1% /dev

      tmpfs 769M 1.4M 768M 1% /run

      /dev/nvme0n1p2 1.9T 4.1G 1.8T 1% /

      tmpfs 3.8G 0 3.8G 0% /dev/shm

      tmpfs 5.0M 4.0K 5.0M 1% /run/lock

      /dev/zram2 3.7G 76K 3.5G 1% /tmp

      /dev/nvme0n1p1 256M 90M 166M 36% /boot

      /dev/zram1 194M 15M 165M 9% /var/log

      tmpfs 769M 60K 769M 1% /run/user/1000

      tmpfs 769M 48K 769M 1% /run/user/0

  6. 当TF卡和NVMe SSD中烧录了一模一样的系统,如果TF卡和NVMe SSD都插在了开发板中,此时上电启动开发板,u-boot会优先启动TF卡中的系统。但由于TF卡和NVMe SSD中的系统一模一样,所以两个存储设备中的/boot分区和rootfs分区的UUID也一样,这样会导致TF卡启动的时候有可能会加载了NVMe SSD中的分区。运行下面的脚本可以解决这个问题。

    orangepi@orangepi:~$ sudo fix_mmc_ssd.sh

    一模一样的系统是指镜像名一字不差的意思。就算都是Debian11系统,版本不同也是不同的。

使用balenaEtcher软件烧录的方法

  1. 首先需要准备一个NVMe SSD固态硬盘,开发板M.2插槽支持的PCIe为PCIe2.0x1,理论最高速度为500MB/s。PCIe3.0和PCIe4.0的NVMe SSD也是可以用的,只是速度最高只有PCIe2.0x1的速度。

    1. M.2 2230规格的SSD如下所示

      189x153px

    2. M.2 2242规格的SSD如下所示

      238x144px

  2. 然后把NVMe SSD插入开发板的M.2 PCIe接口,并固定好

    283x63px

  3. SPI Flash在开发板上的位置如下图所示,开始烧录前无需其他设置

    261x198px

  4. 烧录Linux镜像到SPIFlash+NVMe SSD中需要借助TF卡来完成,所以首先需要将Linux镜像烧录到TF卡上,然后使用TF卡启动开发板进入Linux系统。烧录Linux镜像到TF卡的方法请见基于Windows PC将Linux镜像烧写到TF卡的方法基于Ubuntu PC将Linux镜像烧写到TF卡的方法两小节的说明。

  5. 启动进入TF卡中的Linux系统后,请先确认下NVMe SSD已经被开发板的Linux正常识别了。如果NVMe SSD正常识别了的话,使用sudo fdisk -l命令就能看到nvme相关的信息

    orangepi@orangepi:~/Desktop$ sudo fdisk -l | grep "nvme0n1"

    Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors

    使用lspci命令可以看到一个NVMe相关的PCI设备

    orangepi@orangepi:~/Desktop$ lspci

    00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)

    01:00.0 Non-Volatile memory controller: Realtek Semiconductor Co., Ltd. Device 5765 (rev 01)

  6. Linux镜像中已经预装了balenaEtcher,打开方法如下所示:

如果没有预装,balenaEtcher arm64版本的下载安装方法请参考下载安装arm64版本balenaEtcher的方法小节的说明。

  1. balenaEtcher打开后的界面如下所示:
  1. 使用balenaEtcher烧录u-boot到开发板SPI Flash中的方法如下所示:

    1. 首先点击Flash from file
  1. 然后进入/usr/lib/linux-u-boot-legacy-orangepi3b_1.x.x_arm64目录,再选择rkspi_loader.img,再点击Open打开
  1. 打开rkspi_loader.img后的界面如下所示:

    379x181px

  2. 然后点击Select target

  1. 然后点击Show 2 hidden打开更多存储设备的选项
  1. 然后选择SPI Flash的设备名/dev/mtdblock0,然后点击Select
  1. 然后点击Flash
  1. 然后点击Yes, I’m sure
  1. 然后输入开发板Linux系统的密码orangepi,就会开始烧录u-boot镜像到SPI > Flash中
  1. 烧录过程的显示如下所示:
  1. 烧录完成后的显示如下所示:
  1. 烧录TF卡中的Linux系统到NVMe SSD中的方法(此方法相当于将TF卡中的系统克隆到NVMe SSD)

    1. 首先点击Clone drive
  1. 然后选择TF卡的设备名/dev/mmcblk1
  1. 打开TF卡后的界面如下所示:
  1. 然后点击Select target
  1. 然后点击Show 2 hidden打开更多存储设备的选项
  1. 然后选择NVMe SSD的设备名/dev/nvme0n1,然后点击Select

386x264px

  1. 然后点击Flash
  1. 然后点击Yes, I’m sure
  1. 然后输入开发板Linux系统的密码orangepi,就会开始烧录Linux镜像到SSD中
  1. 烧录过程的显示如下所示:

393x212px

  1. 烧录完成后的显示如下所示:

398x227px

  1. 然后需要扩容下NVMe SSD中rootfs分区的容量,步骤如下所示:

    1. 首先打开GParted,如果系统没有预装Gparted,请使用apt命令安装下

      orangepi@orangepi:~$ sudo apt-get install -y gparted

  1. 然后输入Linux系统的密码orangepi,再点击Authenticate

356x173px

  1. 然后点击Fix

    355x261px

  2. 然后选择NVMe SSD

  1. 选择NVMe SSD后的显示界面如下所所示:
  1. 然后选择/dev/nvme0n1p2分区,再击点击右键,再选择Resize/Move
  1. 然后在下图所示的位置将容量拖动到最大

    339x210px

  2. 然后点击Resize/Move

    339x212px

  3. 然后点击下图位置绿色的

    425x166px

  4. 再点击Apply

    378x276px

  5. 然后点击Close关闭即可

    383x234px

  1. 此时就可以使用sudo > poweroff命令关机了。然后请拔出TF卡,再短按电源按键开机,此时就会启动SPIFlash+NVMe > SSD中的Linux系统了。
  1. 9) 步是克隆TF卡中的系统到NMVe SSD中,我们还可以直接烧录Linux镜像文件到NVMe SSD中,这里大概说下步骤:

    1. 上传Linux镜像文件到开发板的Linux系统中

    2. 然后使用balenaEtcher烧录即可

      463x291px

    3. 使用这种方法烧录镜像后无需手动扩容,第一次启动会自动扩容。

烧录Android镜像到TF卡中的方法

通过USB2.0烧录口将Android 镜像烧录到TF卡中的方法

  1. 首先准备一张8GB或更大容量的TF卡,TF卡的传输速度必须为class10或以上,建议使用闪迪等品牌的TF卡

  2. 还需要准备一根品质良好的USB2.0公对公数据线

  3. 然后从Orange Pi的资料下载页面下载瑞芯微驱动DriverAssitant_v5.12.zip和烧录工具RKDevTool_Release_v3.15.zip

  4. 然后从Orange Pi的资料下载页面下载Android的镜像。

    1. 打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择TF卡和eMMC启动镜像文件夹中的镜像进行下载

      224x82px

    2. 进入TF卡和eMMC启动镜像文件夹后可以看到下面两个镜像,它们的区别是:

      1. 第一个镜像专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像

      2. 如果要使用lcd屏幕,请选择带lcd的镜像

        264x58px

  5. 然后使用解压软件解压下载的Android镜像的压缩包,解压后的文件中,以”.img” 结尾的文件就是Android镜像文件,大小在1GB以上

  6. 然后用解压软件解压DriverAssitant_v5.12.zip,再在解压后的文件夹中找到DriverInstall.exe可执行文件并打开即可

    575x169px

  7. 打开DriverInstall.exe后安装瑞芯微驱动的步骤如下所示

    1. 点击”驱动安装”按钮

      300x157px

    2. 等待一段时间后,会弹出窗口提示”安装驱动成功”,然后点击“确定”按钮即可

      315x164px

  8. 然后解压RKDevTool_Release_v3.15.zip,此软件无需安装,在解压后的文件夹中找到 RKDevTool打开即可

    454x134px

  9. 打开RKDevTool 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”没有发现设备

    442x208px

  10. 然后开始烧录Android镜像到TF卡中

    1. 首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录接口的位置如下图所示

      275x118px

    2. 然后确保开发板没有插入TF卡,没有连接电源

    3. 然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:

      289x100px

    4. 然后给开发板接上Type-C接口的电源,并上电

      305x94px

    5. 如果前面的步骤顺利,此时开发板会进入MASKROM模式,在烧录工具的界面上会提示”发现一个MASKROM设备

      457x215px

    6. 然后再插入TF卡到开发板

    7. 然后请选择高级功能

      458x138px

    8. 然后点击下图所示的位置

      459x216px

    9. 再选择前面下载的MiniLoader文件夹中的rk3566_MiniLoaderAll.bin,再点击打开

    10. 然后点击下载

      472x222px

    11. 下载完rk3566_MiniLoaderAll.bin后的显示如下图所示

      474x227px

    12. 然后选择存储设备为SD,再点击切换存储

    13. 切换成功的显示如下图所示

    14. 然后点击烧录工具的”升级固件”一栏

      477x224px

    15. 接着点击”固件”按钮选择需要烧录的Android镜像的路径

      444x209px

    16. 最后点击”升级”按钮就会开始烧录,烧录过程中的log如下图所示。烧录完成后Android系统会自动启动。

使用SDDiskTool工具将Android镜像烧到TF卡的方法

  1. 首先准备一张8GB或更大容量的TF卡,TF卡的传输速度必须为class10或以上,建议使用闪迪等品牌的TF卡

  2. 然后使用读卡器把TF卡插入电脑

  3. 然后从Orange Pi的资料下载页面下载SDDiskTool烧写工具,请确保SDDiskTool工具的版本为最新的v1.72

  4. 然后从Orange Pi的资料下载页面下载Android11的镜像

    1. 打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择TF卡和eMMC启动镜像文件夹中的镜像进行下载

      224x82px

    2. 进入TF卡和eMMC启动镜像文件夹后可以看到下面两个镜像,它们的区别是:

      1. 不带lcd的镜像是专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像

      2. 如果要使用LCD屏幕,请选择带lcd的镜像

        281x62px

  5. 然后使用解压软件解压下载的Android镜像的压缩包,解压后的文件中,以”.img” 结尾的文件就是Android镜像文件,大小在1GB以上

  6. 然后使用解压软件解压SDDiskTool_v1.72.zip,此软件无需安装,在解压后的文件夹中找到SD_Firmware_Tool.exe打开即可

    415x99px

  7. 打开SDDiskTool后,如果TF卡识别正常,会在”选择可移动磁盘设备”一栏中显示插入的磁盘设备,请务必确认显示的磁盘设备和你想烧录的TF卡的盘符是一致的,如果没有显示可以尝试拔插下TF卡

    267x228px

  8. 确认完盘符后,可以先格式化下TF卡,点击SDDiskTool中的恢复磁盘按钮即可,也可使用前面提到的SD Card Formatter进行TF卡的格式化

    264x226px

  9. 然后开始将Android镜像写入TF卡

    1. 首先在”选择功能模式”中勾选”SD启动

    2. 然后在”选择升级固件”一栏中选择Android镜像的路径

    3. 最后点击”开始创建”按钮就会开始烧录Android镜像到TF卡中

      286x242px

  10. 烧录完后即可退出SDDiskTool软件,然后就可以把TF卡从电脑中拔出来插到开发板中启动了

    288x244px

烧录Android镜像到eMMC中的方法

注意,烧录镜像到eMMC中后如果测试发现启动不了,请清空下SPIFlash后再启动试下。清空SPIFlash的方法请参考使用RKDevTool清空SPIFlash的方法小节的内容。

通过USB2.0烧录口将Android 镜像烧录到eMMC中的方法

注意,下面所有的操作都是在Windows电脑中进行的。

  1. 开发板预留了eMMC的扩展接口,烧录系统到eMMC前,首先需要购买一个与开发板eMMC接口相匹配的eMMC模块。然后将eMMC模块安装到开发板上。

    eMMC模块和插入开发板的方法如下所示:

    115x84px 120x87px

    286x133px

  2. 还需要准备一根品质良好的USB2.0公对公数据线

  3. 然后从Orange Pi的资料下载页面下载瑞芯微驱动DriverAssitant_v5.12.zip和烧录工具RKDevTool_Release_v3.15.zip

  4. 然后从Orange Pi的资料下载页面下载Android的镜像。

    1. 打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择TF卡和eMMC启动镜像文件夹中的镜像进行下载

      224x82px

    2. 进入TF卡和eMMC启动镜像文件夹后可以看到下面两个镜像,它们的区别是:

      1. 第一个镜像专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像

      2. 如果要使用lcd屏幕,请选择带lcd的镜像

        264x58px

  5. 然后使用解压软件解压下载的Android镜像的压缩包,解压后的文件中,以”.img” 结尾的文件就是Android镜像文件,大小在1GB以上

  6. 然后用解压软件解压DriverAssitant_v5.12.zip,再在解压后的文件夹中找到DriverInstall.exe可执行文件并打开即可

    575x169px

  7. 打开DriverInstall.exe后安装瑞芯微驱动的步骤如下所示

    1. 点击”驱动安装”按钮

      300x157px

    2. 等待一段时间后,会弹出窗口提示”安装驱动成功”,然后点击“确定”按钮即可

      315x164px

  8. 然后解压RKDevTool_Release_v3.15.zip,此软件无需安装,在解压后的文件夹中找到 RKDevTool打开即可

    454x134px

  9. 打开RKDevTool 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”没有发现设备

    442x208px

  10. 然后开始烧录Android镜像到eMMC中

    1. 首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录接口的位置如下图所示

      275x118px

    2. 然后确保开发板没有插入TF卡,没有连接电源

    3. 然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:

      289x100px

    4. 然后给开发板接上Type-C接口的电源,并上电

      305x94px

    5. 如果前面的步骤顺利,此时开发板会进入MASKROM模式,在烧录工具的界面上会提示”发现一个MASKROM设备

      457x215px

    6. 然后请选择高级功能

      458x138px

    7. 然后点击下图所示的位置

      459x216px

    8. 再选择前面下载的MiniLoader文件夹中的rk3566_MiniLoaderAll.bin,再点击打开

    9. 然后点击下载

      472x222px

    10. 下载完MiniLoaderAll.bin后的显示如下图所示

      474x223px

    11. 然后选择存储设备为EMMC,再点击切换存储

      468x225px

    12. 切换成功的显示如下图所示

      472x227px

    13. 然后点击烧录工具的”升级固件”一栏

      442x208px

    14. 接着点击”固件”按钮选择需要烧录的Android镜像的路径

      444x209px

    15. 最后点击”升级”按钮就会开始烧录,烧录过程中的log如下图所示。烧录完成后Android系统会自动启动。

通过TF卡将Android11镜像烧录到eMMC中的方法

注意,下面所有的操作都是在Windows电脑中进行的。

  1. 开发板预留了eMMC的扩展接口,烧录系统到eMMC前,首先需要购买一个与开发板eMMC接口相匹配的eMMC模块。然后将eMMC模块安装到开发板上。eMMC模块和插入开发板的方法如下所示:

    115x84px 120x87px

    286x133px

  2. 还需要准备一张8GB或更大容量的TF卡,TF卡的传输速度必须为class10或以上,建议使用闪迪等品牌的TF卡

  3. 然后使用读卡器把TF卡插入电脑

  4. 然后从Orange Pi的资料下载页面下载SDDiskTool烧写工具,请确保SDDiskTool工具的版本为最新的v1.72

  5. 然后从Orange Pi的资料下载页面下载Android的镜像

    1. 打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择TF卡和eMMC启动镜像文件夹中的镜像进行下载

      224x82px

    2. 进入TF卡和eMMC启动镜像文件夹后可以看到下面两个镜像,它们的区别是:

      1. 第一个镜像专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像

      2. 如果要使用lcd屏幕,请选择带lcd的镜像

        283x62px

  6. 然后使用解压软件解压下载的Android镜像的压缩包,解压后的文件中,以”.img” 结尾的文件就是Android镜像文件,大小在1GB以上

  7. 然后使用解压软件解压SDDiskTool_v1.72.zip,此软件无需安装,在解压后的文件夹中找到SD_Firmware_Tool.exe打开即可

    429x103px

  8. 打开SDDiskTool后,如果TF卡识别正常,会在”选择可移动磁盘设备”一栏中显示插入的磁盘设备,请务必确认显示的磁盘设备和你想烧录的TF卡的盘符是一致的,如果没有显示可以尝试拔插下TF卡

    267x228px

  9. 确认完盘符后,可以先格式化下TF卡,点击SDDiskTool中的恢复磁盘按钮即可,也可使用前面提到的SD Card Formatter进行TF卡的格式化

    247x212px

  10. 然后开始将Android镜像写入TF卡

    1. 首先在“选择可移动磁盘设备”下面确认显示的盘符为TF卡对应的盘符

    2. 然后在”选择功能模式”中选择“固件升级”

    3. 然后在”选择升级固件”一栏中选择Android固件的路径

    4. 最后点击”开始创建”按钮就会开始烧录

      290x246px

  11. 烧录完成后的显示如下图所示,然后就可以退出SDDiskTool

    285x243px

  12. 然后把TF卡从电脑中拔出来插到开发板中,开发板上电启动后就会自动开始将TF卡中的Android镜像烧录到开发板的eMMC中

  13. 如果开发板连接了HDMI显示器,还可以从HDMI显示器中看到烧录Android镜像到eMMC中的进度条

    430x247px

  14. 当HDMI显示器显示如下信息时,说明烧录Android镜像到eMMC中已完成,此时就可以拔出TF卡,然后eMMC中的安卓系统就会开始启动。

    576x389px

烧录Android镜像到SPIFlash+NVMe SSD中的方法

注意,下面所有的操作都是在Windows电脑中进行的。

  1. 首先需要准备一个NVMe SSD固态硬盘

    1. M.2 2230规格的SSD如下所示

      147x120px

    2. M.2 2242规格的SSD如下所示

      216x131px

  2. 然后把NVMe SSD插入开发板的M.2 PCIe接口,并固定好

    283x63px

  3. SPI Flash在开发板上的位置如下图所示,开始烧录前无需其他设置

    266x211px

  4. 还需要准备一根品质良好的USB2.0公对公数据线

  5. 然后从Orange Pi的资料下载页面下载瑞芯微驱动DriverAssitant_v5.12.zip和烧录工具RKDevTool_Release_v3.15.zip

  6. 然后下载Android11的镜像

    1. 打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择SPIFlash-NVME > SSD启动镜像文件夹中的镜像进行下载

      195x65px

    2. 进入SPIFlash-NVME > SSD启动镜像文件夹后可以看到下面两个镜像,它们的区别是:

      1. 不带lcd的镜像是专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像

      2. 如果要使用LCD屏幕,请选择带lcd的镜像

        305x58px

  7. 然后用解压软件解压DriverAssitant_v5.12.zip,再在解压后的文件夹中找到DriverInstall.exe可执行文件并打开即可

    407x120px

  8. 打开DriverInstall.exe后安装瑞芯微驱动的步骤如下所示

    1. 点击”驱动安装”按钮

      286x150px

    2. 等待一段时间后,会弹出窗口提示”安装驱动成功”,然后点击“确定”按钮即可

      296x154px

  9. 然后解压RKDevTool_Release_v3.15.zip,此软件无需安装,在解压后的文件夹中找到 RKDevTool打开即可

    413x122px

  10. 打开RKDevTool 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”没有发现设备

    402x189px

  11. 然后开始烧录Android镜像到SPIFlash+NVMe SSD中

    1. 首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录口的位置如下图所示

      275x118px

    2. 确保开发板没有插入TF卡,没有连接电源

    3. 然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:

      289x100px

    4. 然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了

      305x94px

    5. 如果前面的步骤顺利,此时开发板会进入MASKROM模式,在烧录工具的界面上会提示”发现一个MASKROM设备

      443x208px

    6. 然后点击烧录工具的”升级固件”一栏

      442x208px

    7. 接着点击”固件”按钮选择需要烧录的Android镜像

      444x209px

    8. 最后点击”升级”按钮就会开始烧录,烧录的过程如下图所示,可以看到,首先会烧录固件到SPIFlash中,然后烧录固件到PCIE中。烧录完成后Android系统会自动启动。

      453x212px

使用RKDevTool清空SPIFlash的方法

  1. SPI Flash在开发板上的位置如下图所示

    263x193px

  2. 首先需要准备一根品质良好的USB2.0公对公数据线

  3. 然后从Orange Pi的资料下载页面下载瑞芯微驱动DriverAssitant_v5.12.zipMiniLoader以及烧录工具RKDevTool_Release_v3.15.zip

    1. Orange > Pi的资料下载页面首先选择官方工具,然后进入下面的文件夹中

      366x77px

    2. 然后下载下面的所有文件

      315x125px

      注意,“MiniLoader-烧录Linux镜像才需要用到的东西”文件夹下文简称为MiniLoader文件夹。

  4. 然后用解压软件解压DriverAssitant_v5.12.zip,再在解压后的文件夹中找到DriverInstall.exe可执行文件并打开即可

    472x139px

  5. 打开DriverInstall.exe后安装瑞芯微驱动的步骤如下所示

    1. 点击”驱动安装”按钮

      276x145px

    2. 等待一段时间后,会弹出窗口提示”安装驱动成功”,然后点击“确定”按钮即可

      292x151px

  6. 然后解压RKDevTool_Release_v3.15.zip,此软件无需安装,在解压后的文件夹中找到 RKDevTool打开即可

    467x138px

  7. 打开RKDevTool 烧录工具后,因为电脑此时还没有通过USB2.0公对公数据线连接上开发板,所以左下角会提示”没有发现设备

    402x189px

  8. 然后就可以开始清空SPI FLASH中的内容

    1. 首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录口的位置如下图所示

      275x118px

    2. 确保开发板没有插入TF卡,没有连接电源

    3. 然后按住开发板的MaskROM按键不放,MaskROM按键在开发板的位置如下图所示:

      289x100px

    4. 然后给开发板接上Type-C接口的电源,并上电,然后就可以松开MaskROM按键了

      305x94px

    5. 如果前面的步骤顺利,此时开发板会进入MASKROM模式,在烧录工具的界面上会提示”发现一个MASKROM设备

      457x215px

    6. 然后请选择高级功能

      458x138px

    7. 然后点击下图所示的位置

      459x216px

    8. 再选择前面下载的MiniLoader文件夹中的rk3566_MiniLoaderAll.bin,再点击打开

    9. 然后点击下载

      472x222px

    10. 下载完rk3566_MiniLoaderAll.bin后的显示如下图所示

      474x223px

    11. 然后选择存储设备为SPINOR

      467x220px

    12. 然后点击切换存储

      464x218px

    13. 然后点击擦除所有就会开始擦除SPIFlash了

      467x220px

    14. 擦除SPIFlash后的显示log如下图所示

      460x216px

启动香橙派开发板

  1. 将烧录好镜像的TF卡插入香橙派开发板的TF卡插槽中。如果SPIFlash+NVMe SSD已经烧录好镜像了,那么就不需要插入TF卡了,只需确保NVMe SSD正常插入到开发板中即可。
  2. 开发板有HDMI接口,可以通过HDMI转HDMI连接线把开发板连接到电视或者HDMI显示器。如果有购买LCD屏幕,也可以使用LCD屏幕来显示开发板的系统界面。如果有Type-C转HDMI的线,也可以通过Type-C接口来显示开发板的系统界面。
  3. 接上USB鼠标和键盘,用于控制香橙派开发板。
  4. 开发板有以太网口,可以插入网线用来上网。
  5. 连接一个5V/3A或者5V/4A的USB Type-C接口的高品质的电源适配。

切记不要插入电压输出大于5V的电源适配器,会烧坏开发板。

系统上电启动过程中很多不稳定的现象基本都是供电有问题导致的,所以一个靠谱的电源适配器很重要。如果启动过程中发现有不断重启的现象,请更换下电源或者Type-C数据线再试下。

Type-C电源接口是不支持PD协商的。

另外请不要接到电脑的USB接口来给开发板供电。

  1. 然后打开电源适配器的开关,如果一切正常,此时HDMI显示器或者LCD屏幕就能看到系统的启动画面了。

  2. 如果想通过调试串口查看系统的输出信息,请使用串口线将开发板连接到电脑,串口的连接方法请参看调试串口的使用方法一节。

调试串口的使用方法

调试串口的连接说明

  1. 首先需要准备一个3.3V的USB转TTL模块,然后将USB转TTL模块的USB接口一端插入到电脑的USB接口中。

为了更好的兼容性,推荐使用CH340 USB转TTL模块,请不要使用CP2102、PL2303类型的USB转TTL模块。

购买USB转TTL模块前,请确认模块支持1500000速率的波特率。

569x114px

  1. 开发板的调试串口GND、RXD和TXD引脚的对应关系如下图所示

    428x110px

  2. USB转TTL模块GND、TXD和RXD引脚需要通过杜邦线连接到开发板的调试串口上

    1. USB转TTL模块的GND接到开发板的GND上

    2. USB转TTL模块的RX接到开发板的TX上

    3. USB转TTL模块的TX接到开发板的RX上

  3. USB转TTL模块连接电脑和Orange Pi开发板的示意图如下所示

    串口的TX和RX是需要交叉连接的,如果不想仔细区分TX和RX的顺序,可以把串口的TX和RX先随便接上,如果测试没有输出再交换下TX和RX的顺序,这样就总有一种顺序是对的

Ubuntu平台调试串口的使用方法

Linux下可以使用的串口调试软件有很多,如putty、minicom等,下面演示putty的使用方法。

  1. 首先将USB转TTL模块插入Ubuntu电脑的USB接口,如果USB转TTL模块连接识别正常,在Ubuntu PC的/dev下就可以看到对应的设备节点名,记住这个节点名,后面设置串口软件时会用到

    test@test:~$ ls /dev/ttyUSB*

    /dev/ttyUSB0

  2. 然后使用下面的命令在Ubuntu PC上安装下putty

    test@test:~$ sudo apt-get update

    test@test:~$ sudo apt-get install -y putty

  3. 然后运行putty,记得加sudo权限

    test@test:~$ sudo putty

  4. 执行putty命令后会弹出下面的界面

    367x321px

  5. 首先选择串口的设置界面

    359x352px

  6. 然后设置串口的参数

    1. 设置Serial line to connect > to为/dev/ttyUSB0(修改为对应的节点名,一般为/dev/ttyUSB0)

    2. 设置Speed(baud)为1500000(串口的波特率)

    3. 设置Flow control为None

      316x312px

  7. 在串口的设置界面设置完后,再回到Session界面

    1. 首先选择Connection type为Serial

    2. 然后点击Open按钮连接串口

      345x340px

  8. 启动开发板后,就能从打开的串口终端中看到系统输出的Log信息了

    468x340px

Windows平台调试串口的使用方法

Windows下可以使用的串口调试软件有很多,如SecureCRT、MobaXterm等,下面演示MobaXterm的使用方法,这款软件有免费版本,无需购买序列号即可使用。

  1. 下载MobaXterm

    1. 下载MobaXterm网址如下

      https://mobaxterm.mobatek.net

    2. 进入MobaXterm下载网页后点击GET XOBATERM NOW!

      576x334px

    3. 然后选择下载Home版本

      353x231px

    4. 然后选择Portable便携式版本,下载完后无需安装,直接打开就可以使用

      575x259px

  2. 下载完后使用解压缩软件解压下载的压缩包,即可得到MobaXterm的可执软件,然后双击打开

    576x81px

  3. 打开软件后,设置串口连接的步骤如下

    1. 打开会话的设置界面

    2. 选择串口类型

    3. 选择串口的端口号(根据实际的情况选择对应的端口号),如果看不到端口号,请使用360驱动大师扫描安装USB转TTL串口芯片的驱动

    4. 选择串口的波特率为1500000

    5. 最后点击”OK”按钮完成设置

575x438px

  1. 点击”OK”按钮后会进入下面的界面,此时启动开发板就能看到串口的输出信息了

    575x291px

使用开发板40pin接口中的5v引脚供电说明

我们推荐的开发板的供电方式是使用5V/3A或者5V/4A的Type C接口的电源线插到开发板的Type-C电源接口来供电的。如果需要使用40pin接口中的5V引脚来给开发板供电,请确保使用的电源线和电源适配器能满足开发板的供电需求。如果有使用不稳定的情况,请换回Type-C电源供电。

  1. 首先需要准备一根下图所示的电源线

    上图所示的电源线在淘宝可以买到,请自行搜索购买。

  2. 使用40pin接口中的5V引脚来给开发板供电,电源线的接法如下所示

    1. 上图所示的电源线USB > A口需要插到5V/3A或者5V4A的电源适配器接头上(请不要插到电脑的USB接口来供电

    2. 红色的杜邦线需要插到开发板40pin的5V引脚上

    3. 黑色的杜邦线需要插到40pin接口的GND引脚上

    4. 40pin接口5V引脚和GND引脚在开发板中的位置如下图所示,切记不要接反了

      366x71px

Ubuntu/Debian Server和Xfce桌面系统使用说明

本章内容是基于Linux服务器版本的镜像和xfce桌面版本镜像编写的。

已支持的Linux镜像类型和内核版本

Linux镜像类型 内核版本 服务器版 桌面版
Debian 11 - Bullseye Linux5.10 支持 支持
Ubuntu 20.04 - Focal Linux5.10 支持 支持
Ubuntu 22.04 - Jammy Linux5.10 支持 支持
Debian12

Linux系统适配情况

功能 Debian11 Ubuntu20.04 Ubuntu22.04
USB2.0x3 OK OK OK
USB3.0x1 OK OK OK
M.2 NVMe SSD启动 OK OK OK
WIFI OK OK OK
蓝牙 OK OK OK
GPIO(40pin) OK OK OK
UART(40pin) OK OK OK
SPI(40pin) OK OK OK
I2C(40pin) OK OK OK
PWM(40pin) OK OK OK
PWM风扇接口 OK OK OK
3pin调试串口 OK OK OK
EMMC OK OK OK
TF卡启动 OK OK OK
HDMI 视频 OK OK OK
HDMI 音频 OK OK OK
Camera OK OK OK
LCD OK OK OK
eDP显示 OK OK OK
千兆网口 OK OK OK
网口状态灯 OK OK OK
耳机播放 OK OK OK
耳机录音 OK OK OK
LED灯 OK OK OK
RTC OK OK OK
GPU OK OK OK
NPU OK OK OK
VPU OK OK OK
看门狗测试 OK OK OK
Chromium硬解视频 OK OK OK

本手册Linux命令格式说明

  1. 本手册中所有需要在Linux系统中输入的命令都会使用下面的方框框起来

    如下所示,黄色方框里内容表示需要特别注意的内容,这里面的命令除外。

  2. 命令前面的提示符类型说明

    1. 命令前面提示符指的是下面方框内红色部分的内容,这部分内容不是Linux命令的一部分,所以在Linux系统中输入命令时,请不要把红色字体部分的内容也输入进去。

      orangepi@orangepi:~$ sudo apt update

      root@orangepi:~# vim /boot/boot.cmd

      test@test:~$ ssh root@192.168.1.xxx

      root@test:~# ls

    2. root@orangepi:~$ > 提示符表示这个命令是在开发板的Linux系统中输入的, > 提示符最后的 $ > 表示系统当前用户为普通用户,当执行特权命令时,需要加上sudo

    3. root@orangepi:~# > 提示符表示这个命令是在开发板的Linux系统中输入的, > 提示符最后的 # > 表示系统当前用户为root用户,可以执行任何想要执行的命令

    4. test@test:~$ 提示符表示这个命令是在Ubuntu > PC或者Ubuntu虚拟机中输入的,而不是开发板的Linux系统中。提示符最后的 > $ > 表示系统当前用户为普通用户,当执行特权命令时,需要加上sudo

    5. root@test:~# 提示符表示这个命令是在Ubuntu > PC或者Ubuntu虚拟机中输入的,而不是开发板的Linux系统中。提示符最后的 > # 表示系统当前用户为root用户,可以执行任何想要执行的命令

  3. 哪些是需要输入的命令?

    1. 如下所示,黑色加粗部分是需要输入的命令,命令下面的是输出的内容(有些命令有输出,有些可能没有输出),这部分内容是不需要输入的

      root@orangepi:~# cat /boot/orangepiEnv.txt

      verbosity=7

      bootlogo=false

      console=serial

    2. 如下所示,有些命令一行写不下会放到下一行,只要黑色加粗的部分就都是需要输入的命令。当这些命令输入到一行的时候,每行最后的”\”是需要去掉的,这个不是命令的一部分。另外命令的不同部分都是有空格的,请别漏了

      orangepi@orangepi:~$ echo \

      "deb [arch=$(dpkg --print-architecture) \

      signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \

      https://download.docker.com/linux/debian \

      $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Linux系统登录说明

Linux系统默认登录账号和密码

账号 密码
root orangepi
orangepi orangepi

注意,输入密码的时候,屏幕上是不会显示输入的密码的具体内容的,请不要以为是有什么故障,输入完后直接回车即可。

当输入密码提示错误,或者ssh连接有问题,请注意,只要使用的是Orange Pi提供的Linux镜像,就请不要怀疑上面的密码不对,而是要找其它的原因。

设置Linux系统终端自动登录的方法

  1. Linux系统默认就是自动登录终端的,默认登录的用户名是orangepi

    351x198px

  2. 使用下面的命令可以设置root用户自动登录终端

    orangepi@orangepi:~$ sudo auto_login_cli.sh root

  3. 使用下面的命令可以禁止自动登录终端

    orangepi@orangepi:~$ sudo auto_login_cli.sh -d

  4. 使用下面的命令可以再次设置orangepi用户自动登录终端

    orangepi@orangepi:~$ sudo auto_login_cli.sh orangepi

Linux桌面版系统自动登录说明

  1. 桌面版系统启动后会自动登录进入桌面,无需输入密码

    1

  2. 运行下面的命令可以禁止桌面版系统自动登录桌面

    orangepi@orangepi:~$ sudo disable_desktop_autologin.sh

  3. 然后重启系统就会出现登录对话框,此时需要输入密码才能进入系统

Linux桌面版系统root用户自动登录的设置方法

  1. 执行下面的命令可以设置桌面版系统使用root用户自动登录

    orangepi@orangepi:~$ sudo desktop_login.sh root

  2. 然后重启系统,就会自动使用root用户登录桌面了

    448x187px

    注意,如果使用root用户登录桌面系统,是无法使用右上角的pulseaudio来管理音频设备的。

    另外请注意这并不是一个bug,因为pulseaudio本来就不允许在root用户下运行。

  3. 执行下面的命令可以再次设置桌面版系统使用orangepi用户自动登录

    orangepi@orangepi:~$ sudo desktop_login.sh orangepi

Linux桌面版系统禁用桌面的方法

  1. 首先在命令行中输入下面的命令,请记得加sudo权限

    orangepi@orangepi:~$ sudo systemctl disable lightdm.service

  2. 然后重启Linux系统就会发现不会显示桌面了

    orangepi@orangepi:~$ sudo reboot

  3. 重新打开桌面的步骤如下所示:

    1. 首先在命令行中输入下面的命令,请记得加sudo权限

      orangepi@orangepi:~$ sudo systemctl start lightdm.service

    2. 命令执行完成后就会显示桌面了

板载LED灯测试说明

  1. 开发板上有三个LED灯,一个绿灯,一个红灯,一个PCIe指示灯,所在位置如下图所示:

    425x126px

  2. 只要开发板打开了电源,红色的LED灯就会常亮,这是由硬件控制的,软件无法关闭。

  3. 绿色的LED灯在内核启动后会一直闪烁,这是由软件控制的。

  4. PCIe指示灯在PCIe接口有数据传输时会闪烁。

  5. 设置绿灯亮灭和闪烁的方法如下所示

    注意,下面的操作请在root用户下进行。

    1. 首先进入绿灯的设置目录

      root@orangepi:~# cd /sys/class/leds/status

    2. 设置绿灯停止闪烁的命令如下

      root@orangepi:/sys/class/leds/work# echo none > trigger

    3. 设置绿灯常亮的命令如下

      root@orangepi:/sys/class/leds/work# echo default-on > trigger

    4. 设置绿灯闪烁的命令如下

      root@orangepi:/sys/class/leds/work# echo heartbeat > trigger

网络连接测试

以太网口测试

  1. 首先将网线的一端插入开发板的以太网接口,网线的另一端接入路由器,并确保网络是畅通的

  2. 系统启动后会通过DHCP自动给以太网卡分配IP地址,不需要其他任何配置

  3. 在开发板的Linux系统中查看IP地址的命令如下所示

    orangepi@orangepi:~$ ip addr show eth0

    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000

    link/ether 4a:fe:2b:3d:17:1c brd ff:ff:ff:ff:ff:ff

    inet 192.168.1.150/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0

    valid_lft 43150sec preferred_lft 43150sec

    inet6 fe80::9a04:3703:faed:23be/64 scope link noprefixroute

    valid_lft forever preferred_lft forever

    当使用ifconfig查看IP地址时,如果提示下面的信息,是因为没有加sudo导致的,正确的命令是:sudo ifconfig

    orangepi@orangepi:~$ ifconfig

    Command 'ifconfig' is available in the following places

    * /sbin/ifconfig

    * /usr/sbin/ifconfig

    The command could not be located because '/sbin:/usr/sbin' is not included in the PATH environment variable.

    This is most likely caused by the lack of administrative privileges associated with your user account.

    ifconfig: command not found

开发板启动后查看IP地址有三种方法:

  1. 接HDMI显示器,然后登录系统使用ip addr show eth0命令查看IP地址
  2. 在调试串口终端输入ip addr show eth0命令来查看IP地址
  3. 如果没有调试串口,也没有HDMI显示器,还可以通过路由器的管理界面来查看开发板网口的IP地址。不过这种方法经常有人会无法正常看到开发板的IP地址。如果看不到,调试方法如下所示:
  1. 首先检查Linux系统是否已经正常启动,如果开发板的绿灯在闪烁了,一般是正常启动了,如果只亮红灯,说明系统都没正常启动;

  2. 检查网线有没有插紧,或者换根网线试下;

  3. 换个路由器试下(路由器的问题有遇到过很多,比如路由器无法正常分配IP地址,或者已正常分配IP地址但在路由器中看不到);

  4. 如果没有路由器可换就只能连接HDMI显示器或者使用调试串口来查看IP地址。

    另外需要注意的是开发板DHCP自动分配IP地址是不需要任何设置的。

  1. 测试网络连通性的命令如下,ping命令可以通过Ctrl+C快捷键来中断运行

    orangepi@orangepi:~$ ping www.baidu.com -I eth0

    PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 56(84) bytes of data.

    64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=56 time=6.74 ms

    64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=56 time=6.80 ms

    64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=56 time=6.26 ms

    64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=56 time=7.27 ms

    ^C

    --- www.a.shifen.com ping statistics ---

    4 packets transmitted, 4 received, 0% packet loss, time 3002ms

    rtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms

WIFI连接测试

请不要通过修改/etc/network/interfaces配置文件的方式来连接WIFI,通过这种方式连接WIFI网络使用会有问题。

服务器版镜像通过命令连接WIFI

当开发板没有连接以太网,没有连接HDMI显示器,只连接了串口时,推荐使用此小节演示的命令来连接WIFI网络。因为nmtui在某些串口软件(如minicom)中只能显示字符,无法正常显示图形界面。当然,如果开发板连接了以太网或者HDMI显示屏,也可以使用此小节演示的命令来连接WIFI网络的。

  1. 先登录Linux系统,有下面三种方式

    1. 如果开发板连接了网线,可以通过ssh远程登录Linux系统
    1. 如果开发板连接好了调试串口,可以使用串口终端登录Linux系统

    2. 如果连接了开发板到HDMI显示器,可以通过HDMI显示的终端登录到Linux系统

  1. 首先使用nmcli dev wifi命令扫描周围的WIFI热点

    orangepi@orangepi:~$ nmcli dev wifi

  2. 然后使用nmcli 命令连接扫描到的WIFI热点,其中:

    1. wifi_name需要换成想连接的WIFI热点的名字

    2. wifi_passwd需要换成想连接的WIFI热点的密码

      orangepi@orangepi:~$ nmcli dev wifi connect wifi_name password wifi_passwd

      Device 'wlan0' successfully activated with 'cf937f88-ca1e-4411-bb50-61f402eef293'.

  3. 通过ip addr show wlan0命令可以查看wifi的IP地址

    orangepi@orangepi:~$ ip addr show wlan0

    11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff

    inet 192.168.1.11/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0

    valid_lft 259192sec preferred_lft 259192sec

    inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute

    valid_lft 259192sec preferred_lft 172792sec

    inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute

    valid_lft forever preferred_lft forever

  4. 使用ping命令可以测试wifi网络的连通性,ping命令可以通过Ctrl+C快捷键来中断运行

    orangepi@orangepi:~$ ping www.orangepi.org -I wlan0

    PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data.

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms

    ^C

    --- www.orangepi.org ping statistics ---

    5 packets transmitted, 5 received, 0% packet loss, time 4006ms

    rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms

服务器版镜像通过图形化方式连接WIFI

  1. 先登录Linux系统,有下面三种方式

    1. 如果开发板连接了网线,可以通过ssh远程登录Linux系统

    2. 如果开发板连接好了调试串口,可以使用串口终端登录Linux系统(串口软件请使用MobaXterm,使用minicom无法显示图形界面)

    3. 如果连接了开发板到HDMI显示器,可以通过HDMI显示的终端登录到Linux系统

  2. 然后在命令行中输入nmtui命令打开wifi连接的界面

    orangepi@orangepi:~$ nmtui

  3. 输入nmtui命令打开的界面如下所示

    345x215px

  4. 选择Activate a connect后回车

    349x216px

  5. 然后就能看到所有搜索到的WIFI热点

    360x229px

  6. 选择想要连接的WIFI热点后再使用Tab键将光标定位到Activate后回车

    366x230px

  7. 然后会弹出输入密码的对话框,在Password内输入对应的密码然后回车就会开始连接WIFI

    352x225px

  8. WIFI连接成功后会在已连接的WIFI名称前显示一个”*”

    349x223px

  9. 通过ip addr show wlan0命令可以查看wifi的IP地址

    orangepi@orangepi:~$ ip addr show wlan0

    11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 24:8c:d3:aa:76:bb brd ff:ff:ff:ff:ff:ff

    inet 192.168.1.11/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0

    valid_lft 259069sec preferred_lft 259069sec

    inet6 240e:3b7:3240:c4a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute

    valid_lft 259071sec preferred_lft 172671sec

    inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute

    valid_lft forever preferred_lft forever

  10. 使用ping命令可以测试wifi网络的连通性,ping命令可以通过Ctrl+C快捷键来中断运行

    orangepi@orangepi:~$ ping www.orangepi.org -I wlan0

    PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data.

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms

    64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms

    ^C

    --- www.orangepi.org ping statistics ---

    5 packets transmitted, 5 received, 0% packet loss, time 4006ms

    rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms

桌面版镜像的测试方法

  1. 点击桌面右上角的网络配置图标(测试WIFI时请不要连接网线)

    377x166px

  2. 在弹出的下拉框中点击More networks可以看到所有扫描到的WIFI热点,然后选择想要连接的WIFI热点

    576x353px

  3. 然后输入WIFI热点的密码,再点击Connect就会开始连接WIFI

    320x163px

  4. 连接好WIFI后,可以打开浏览器查看是否能上网,浏览器的入口如下图所示

    576x308px

  5. 打开浏览器后如果能打开其他网页说明WIFI连接正常

    5

设置静态IP地址的方法

请不要通过修改/etc/network/interfaces配置文件的方式来设置静态IP地址。

使用nmtui命令来设置静态IP地址

  1. 首先运行nmtui命令

    orangepi@orangepi:~$ nmtui

  2. 然后选择Edit a connection并按下回车键

    227x247px

  3. 然后选择需要设置静态IP地址的网络接口,比如设置Ethernet接口的静态IP地址选择Wired connection 1就可以了

    310x149px

  4. 然后通过Tab键选择Edit并按下回车键

    316x144px

  5. 然后通过Tab键将光标移动到下图所示的<Automatic>位置进行IPv4的配置

    575x240px

  6. 然后回车,通过上下方向键选择Manual,然后回车确定

    576x237px

  7. 选择完后的显示如下图所示

    575x240px

  8. 然后通过Tab键将光标移动到<Show>

    576x241px

  9. 然后回车,回车后会弹出下面的设置界面

    575x450px

  10. 然后就可以在下图所示的位置设置IP地址(Addresses)、网关(Gateway)和DNS服务器的地址(里面还有很多其他设置选项,请自行探索),请根据自己的具体需求来设置,下图中设置的值只是一个示例

    576x233px

  11. 设置完后将光标移动到右下角的<OK>,然后回车确认

    576x116px

  12. 然后点击<Back>回退到上一级选择界面

    330x325px

  13. 然后选择Activate a connection,再将光标移动到<OK>,最后点击回车

    331x248px

  14. 然后选择需要设置的网络接口,比如Wired connection 1,然后将光标移动到<Deactivate>,再按下回车键禁用Wired connection 1

    576x224px

  15. 然后请不要移动光标,再按下回车键重新使能Wired connection 1,这样前面设置的静态IP地址就会生效了

    576x224px

  16. 然后通过<Back>Quit按钮就可以退出nmtui

    300x253px 227x252px

  17. 然后通过ip addr show eth0就能看到网口的IP地址已经变成前面设置的静态IP地址了

    orangepi@orangepi:~$ ip addr show eth0

    3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 5e:ac:14:a5:92:b3 brd ff:ff:ff:ff:ff:ff

    inet 192.168.1.177/24 brd 192.168.1.255 scope global noprefixroute eth0

    valid_lft forever preferred_lft forever

    inet6 241e:3b8:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute

    valid_lft 259149sec preferred_lft 172749sec

    inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute

    valid_lft forever preferred_lft forever

  18. 然后就可以测试网络的连通性来检查IP地址是否配置OK了,ping命令可以通过Ctrl+C快捷键来中断运行

    orangepi@orangepi:~$ ping 192.168.1.47 -I eth0

    PING 192.168.1.47 (192.168.1.47) from 192.168.1.188 eth0: 56(84) bytes of data.

    64 bytes from 192.168.1.47: icmp_seq=1 ttl=64 time=0.233 ms

    64 bytes from 192.168.1.47: icmp_seq=2 ttl=64 time=0.263 ms

    64 bytes from 192.168.1.47: icmp_seq=3 ttl=64 time=0.273 ms

    64 bytes from 192.168.1.47: icmp_seq=4 ttl=64 time=0.269 ms

    64 bytes from 192.168.1.47: icmp_seq=5 ttl=64 time=0.275 ms

    ^C

    --- 192.168.1.47 ping statistics ---

    5 packets transmitted, 5 received, 0% packet loss, time 4042ms

    rtt min/avg/max/mdev = 0.233/0.262/0.275/0.015 ms

使用nmcli命令来设置静态IP地址

  1. 如果要设置网口的静态IP地址,请先将网线插入开发板,如果需要设置WIFI的静态IP地址,请先连接好WIFI,然后再开始设置静态IP地址

  2. 然后通过nmcli con show命令可以查看网络设备的名字,如下所示

    1. orangepi为WIFI网络接口的名字(名字不一定相同)

    2. Wired connection 1为以太网接口的名字

      orangepi@orangepi:~$ nmcli con show

      NAME UUID TYPE DEVICE

      orangepi cfc4f922-ae48-46f1-84e1-2f19e9ec5e2a wifi wlan0

      Wired connection 1 9db058b7-7701-37b8-9411-efc2ae8bfa30 ethernet eth0

  3. 然后输入下面的命令,其中

    1. "Wired connection 1" > 表示设置以太网口的静态IP地址,如果需要设置WIFI的静态IP地址,请修改为WIFI网络接口对应的名字(通过nmcli > con show命令可以获取到)

    2. ipv4.addresses后面是要设置的静态IP地址,可以修改为自己想要设置的值

    3. ipv4.gateway 表示网关的地址

      orangepi@orangepi:~$ nmcli con mod "Wired connection 1" \

      ipv4.addresses "192.168.1.110" \

      ipv4.gateway "192.168.1.1" \

      ipv4.dns "8.8.8.8" \

      ipv4.method "manual"

  4. 然后重启Linux系统

    orangepi@orangepi:~$ sudo reboot

  5. 然后重新进入Linux系统使用ip addr show eth0命令就可以看到IP地址已经设置为想要的值了

    orangepi@orangepi:~$ ip addr show eth0

    3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 5e:ae:14:a5:91:b3 brd ff:ff:ff:ff:ff:ff

    inet 192.168.1.110/32 brd 192.168.1.110 scope global noprefixroute eth0

    valid_lft forever preferred_lft forever

    inet6 240e:3b7:3240:c3a0:97de:1d01:b290:fe3a/64 scope global dynamic noprefixroute

    valid_lft 259183sec preferred_lft 172783sec

    inet6 fe80::3312:861a:a589:d3c/64 scope link noprefixroute

    valid_lft forever preferred_lft forever

SSH远程登录开发板

Linux系统默认都开启了ssh远程登录,并且允许root用户登录系统。ssh登录前首先需要确保以太网或者wifi网络已连接,然后使用ip addr命令或者通过查看路由器的方式获取开发板的IP地址。

Ubuntu下SSH远程登录开发板

  1. 获取开发板的IP地址
  2. 然后就可以通过ssh命令远程登录Linux系统

test@test:~$ ssh root@192.168.1.xxx (需要替换为开发板的IP地址)

root@192.168.1.xx's password: (在这里输入密码,默认密码为orangepi)

注意,输入密码的时候,屏幕上是不会显示输入的密码的具体内容的,请不要以为是有什么故障,输入完后直接回车即可。

如果提示拒绝连接,只要使用的是Orange Pi提供的镜像,就请不要怀疑orangepi这个密码是不是不对,而是要找其他原因。

  1. 成功登录系统后的显示如下图所示

    如果ssh无法正常登陆Linux系统,首先请检查下开发板的IP地址是否能ping通,如果ping通没问题的话,可以通过串口或者HDMI显示器登录Linux系统然后在开发板上输入下面的命令后再尝试是否能连接:

root@orangepi:~# reset_ssh.sh

如果还不行,请重烧系统试下。

Windows下SSH远程登录开发板

  1. 首先获取开发板的IP地址

  2. 在windows下可以使用MobaXterm远程登录开发板,首先新建一个ssh会话

    1. 打开Session

    2. 然后在Session Setting中选择SSH

    3. 然后在Remote host中输入开发板的IP地址

    4. 然后在Specify > username中输入Linux系统的用户名rootorangepi

    5. 最后点击OK即可

      576x292px

  3. 然后会提示输入密码,默认root和orangepi用户的密码都为orangepi

    注意,输入密码的时候,屏幕上是不会显示输入的密码的具体内容的,请不要以为是有什么故障,输入完后直接回车即可。

  1. 成功登录系统后的显示如下图所示

576x334px

上传文件到开发板Linux系统中的方法

在Ubuntu PC中上传文件到开发板Linux系统中的方法

使用scp命令上传文件的方法

  1. 使用scp命令可以在Ubuntu PC中上传文件到开发板的Linux系统中,具体命令如下所示

    1. file_path:需要替换为要上传文件的路径

    2. orangepi:为开发板Linux系统的用户名,也可以替换成其它的,比如root

    3. 192.168.xx.xx: 为开发板的IP地址,请根据实际情况进行修改

    4. /home/orangepi: > 开发板Linux系统中的路径,也可以修改为其它的路径

      test@test:~$ scp file_path orangepi@192.168.xx.xx:/home/orangepi/

  2. 如果要上传文件夹,需要加上-r参数

    test@test:~$ scp -r dir_path orangepi@192.168.xx.xx:/home/orangepi/

  3. scp还有更多的用法,请使用下面的命令查看man手册

test@test:~$ man scp

使用filezilla上传文件的方法

  1. 首先在Ubuntu PC中安装filezilla

    test@test:~$ sudo apt install -y filezilla

  2. 然后使用下面的命令打开filezilla

    test@test:~$ filezilla

  3. filezilla打开后的界面如下所示,此时右边远程站点下面显示的是空的

  4. 连接开发板的方法如下图所示

  1. 然后选择保存密码,再点击确定

    249x181px

  2. 然后选择总是信任该主机,再点击确定

  1. 连接成功后在filezilla软件的右边就可以看到开发板Linux文件系统的目录结构了
  1. 然后在filezilla软件的右边选择要上传到开发板中的路径,再在filezilla软件的左边选中Ubuntu PC中要上传的文件,再点击鼠标右键,再点击上传选项就会开始上传文件到开发板中了。
  1. 上传完成后就可以去开发板Linux系统中的对应路径中查看上传的文件了

  2. 上传文件夹的方法和上传文件的方法是一样的,这里就不再赘述了

在Windows PC中上传文件到开发板Linux系统中的方法

使用filezilla上传文件的方法

  1. 首先下载filezilla软件Windows版本的安装文件,下载链接如下所示

https://filezilla-project.org/download.php?type=clientIMG_256

384x276px

  1. 下载的安装包如下所示,然后双击直接安装即可

    FileZilla_Server_1.5.1_win64-setup.exe

安装过程中,下面的安装界面请选择Decline,然后再选择Next>

  1. filezilla打开后的界面如下所示,此时右边远程站点下面显示的是空的
  1. 连接开发板的方法如下图所示:
  1. 然后选择保存密码,再点击确定
  1. 然后选择总是信任该主机,再点击确定
  1. 连接成功后在filezilla软件的右边就可以看到开发板Linux文件系统的目录结构了
  1. 然后在filezilla软件的右边选择要上传到开发板中的路径,再在filezilla软件的左边选中Windows PC中要上传的文件,再点击鼠标右键,再点击上传选项就会开始上传文件到开发板中了
  1. 上传完成后就可以去开发板Linux系统中的对应路径中查看上传的文件了

  2. 上传文件夹的方法和上传文件的方法是一样的,这里就不再赘述了

HDMI测试

HDMI显示测试

  1. 使用HDMI转HDMI线连接Orange Pi开发板和HDMI显示器

    199x129px

  2. 启动Linux系统后如果HDMI显示器有图像输出说明HDMI接口使用正常

注意,很多笔记本电脑虽然带有HDMI接口,但是笔记本的HDMI接口一般只有输出功能,并没有HDMI in的功能,也就是说并不能将其他设备的HDMI输出显示到笔记本的屏幕上。

当想把开发板的HDMI接到笔记本电脑HDMI接口时,请先确认清楚您的笔记本是支持HDMI in的功能。

当HDMI没有显示的时候,请先检查下HDMI线有没有插紧,确认接线没问题后,可以换一个不同的屏幕试下有没有显示。

HDMI转VGA显示测试

  1. 首先需要准备下面的配件

    1. HDMI转VGA转换器

      155x104px

    2. 一根VGA线

      148x133px

    3. 一个支持VGA接口的显示器或者电视

  2. HDMI转VGA显示测试如下所示

    576x339px

    使用HDMI转VGA显示时,开发板以及开发板的Linux系统是不需要做任何设置的,只需要开发板HDMI接口能正常显示就可以了。所以如果测试有问题,请检查HDMI转VGA转换器、VGA线以及显示器是否有问题。

HDMI分辨率设置方法

  1. 首先在Settings中打开Display

    576x370px

  2. 然后就能看到系统当前的分辨率

    382x254px

  3. 点击Resolution(分辨率)的下拉框,就可以看到显示器当前支持的所有分辨率

    415x274px

  4. 然后选择想要设置的分辨率,再点击Apply

    415x277px

  5. 等新的分辨率设置完后再选择Keep the configuration即可

    447x243px

蓝牙使用方法

桌面版镜像的测试方法

  1. 点击桌面右上角的蓝牙图标

    330x128px

  2. 然后选择适配器

    375x165px

  3. 如果有提示下面的界面,请选择Yes

    248x85px

  4. 然后在蓝牙的适配器设置界面中设置Visibility SettingAlways visible,然后关闭即可

    243x229px

  5. 然后打开蓝牙设备的配置界面

    438x179px

  6. 点击Search即可开始扫描周围的蓝牙设备

    322x217px

  7. 然后选择想要连接的蓝牙设备,再点击鼠标右键就会弹出对此蓝牙设备的操作界面,选择Pair即可开始配对,这里演示的是和Android手机配对

    338x263px

  8. 配对时,桌面的右上角会弹出配对确认框,选择Confirm确认即可,此时手机上也同样需要进行确认

    417x152px

  9. 和手机配对完后,可以选择已配对的蓝牙设备,然后右键选择Send a File即可开始给手机发送一张图片

    439x259px

  10. 发送图片的界面如下所示

    437x253px

USB接口测试

USB接口是可以接USB hub来扩展USB接口的数量的。

连接USB鼠标或键盘测试

  1. 将USB接口的键盘插入Orange Pi开发板的USB接口中
  2. 连接Orange Pi开发板到HDMI显示器
  3. 如果鼠标或键盘能正常操作系统说明USB接口使用正常(鼠标只有在桌面版的系统中才能使用)

连接USB存储设备测试

  1. 首先将U盘或者USB移动硬盘插入Orange Pi开发板的USB接口中
  2. 执行下面的命令如果能看到sdX的输出说明U盘识别成功

orangepi@orangepi:~$ cat /proc/partitions | grep "sd*"

major minor #blocks name

8 0 30044160 sda

8 1 30043119 sda1

  1. 使用mount命令可以将U盘挂载到/mnt中,然后就能查看U盘中的文件了

orangepi@orangepi:~$ sudo mount /dev/sda1 /mnt/

orangepi@orangepi:~$ ls /mnt/

test.txt

  1. 挂载完后通过df -h命令就能查看U盘的容量使用情况和挂载点

orangepi@orangepi:~$ df -h | grep "sd"

/dev/sda1 29G 208K 29G 1% /mnt

USB无线网卡测试

目前测试过的能用的USB无线网卡如下所示,其他型号的USB无线网卡请自行测试,如果无法使用就需要移植对应的USB无线网卡驱动

序号 型号
1 RTL8723BU

支持2.4G WIFI+BT4.0

File:Media/image2 43.png
2 RTL8811

支持2.4G +5G WIFI

File:Media/image2 44.png
3 RTL8821CU

支持2.4G +5G WIFI

支持BT 4.2

RTL8723BU测试

  1. 首先将RTL8723BU无线网卡模块插入开发板的USB接口中

  2. 然后Linux系统会自动加载RTL8723BU蓝牙和WIFI相关的内核模块,通过lsmod命令可以看到下面内核模块已自动加载

    orangepi@orangepi:~$ lsmod

    Module Size Used by

    rfcomm 57344 16

    rtl8xxxu 106496 0

    rtk_btusb 61440 0

  3. 通过dmesg命令可以看到RTL8723BU模块的加载信息

    orangepi@orangepi:~$ dmesg

    ......

    [ 83.438901] usb 2-1: new high-speed USB device number 2 using ehci-platform

    [ 83.588375] usb 2-1: New USB device found, idVendor=0bda, idProduct=b720, bcdDevice= 2.00

    [ 83.588403] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

    [ 83.588422] usb 2-1: Product: 802.11n WLAN Adapter

    [ 83.588443] usb 2-1: Manufacturer: Realtek

    [ 83.588460] usb 2-1: SerialNumber: 00e04c000001

    [ 83.601974] Bluetooth: hci0: RTL: examining hci_ver=06 hci_rev=000b lmp_ver=06 lmp_subver=8723

    [ 83.603894] Bluetooth: hci0: RTL: rom_version status=0 version=1

    [ 83.603920] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723b_fw.bin

    [ 83.610108] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723b_config.bin

    [ 83.611274] Bluetooth: hci0: RTL: cfg_sz 68, total sz 22564

    [ 83.658494] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.6d45ddf.20220519-142432

    [ 83.658651] usbcore: registered new interface driver rtk_btusb

    [ 83.667124] usb 2-1: This Realtek USB WiFi dongle (0x0bda:0xb720) is untested!

    [ 83.667137] usb 2-1: Please report results to Jes.Sorensen@gmail.com

    [ 83.890140] usb 2-1: Vendor: Realtek

    [ 83.890153] usb 2-1: Product: 802.11n WLAN Adapter

    [ 83.890159] usb 2-1: rtl8723bu_parse_efuse: dumping efuse (0x200 bytes):

    ......

    [ 83.890412] usb 2-1: RTL8723BU rev E (SMIC) 1T1R, TX queues 3, WiFi=1, BT=1, GPS=0, HI PA=0

    [ 83.890417] usb 2-1: RTL8723BU MAC: 00:13:ef:f4:58:ae

    [ 83.890421] usb 2-1: rtl8xxxu: Loading firmware rtlwifi/rtl8723bu_nic.bin

    [ 83.895289] usb 2-1: Firmware revision 35.0 (signature 0x5301)

    [ 84.050893] Bluetooth: hci0: RTL: fw version 0x0e2f9f73

    [ 84.266905] Bluetooth: RFCOMM TTY layer initialized

    [ 84.266949] Bluetooth: RFCOMM socket layer initialized

    [ 84.266999] Bluetooth: RFCOMM ver 1.11

    [ 84.884270] usbcore: registered new interface driver rtl8xxxu

    [ 84.912046] rtl8xxxu 2-1:1.2 wlx0013eff458ae: renamed from wlan0

  4. 然后通过sudo ifconfig命令可以看到RTL8723BU WIFI的设备节点,WIFI的连接和测试方法请参看WIFI连接测试一节,这里不再赘述

    orangepi@orangepi:~$ sudo ifconfig wlx0013eff458ae

    wlx0013eff458ae: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

    ether 00:13:ef:f4:58:ae txqueuelen 1000 (Ethernet)

    RX packets 0 bytes 0 (0.0 B)

    RX errors 0 dropped 0 overruns 0 frame 0

    TX packets 0 bytes 0 (0.0 B)

    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

  5. 然后通过hciconfig命令可以看到USB的蓝牙设备

    orangepi@orangepi:~$ sudo apt update && sudo apt install bluez

    orangepi@orangepi:~$ hciconfig

    hci0: Type: Primary Bus: USB

    BD Address: 00:13:EF:F4:58:AE ACL MTU: 820:8 SCO MTU: 255:16

    DOWN

    RX bytes:1252 acl:0 sco:0 events:125 errors:0

    TX bytes:23307 acl:0 sco:0 commands:125 errors:0

  6. 在桌面中也可以看到出现了蓝牙图标,此时蓝牙还未打开,所以会显示一个红色的x

    576x157px

  7. 点击Turn Bluetooth On可以打开蓝牙

    576x262px

  8. 打开蓝牙后的显示如下所示

    576x164px

  9. 蓝牙的测试方法请参看蓝牙使用方法一节,这里不再赘述

RTL8811测试

  1. 首先将RTL8811无线网卡模块插入开发板的USB接口中

  2. 然后Linux系统会自动加载RTL8811 WIFI相关的内核模块,通过lsmod命令可以看到下面内核模块已自动加载

    orangepi@orangepi:~$ lsmod

    Module Size Used by

    8821cu 1839104 0

  3. 通过dmesg命令可以看到RTL8811模块的加载信息

    orangepi@orangepi:~$ dmesg

    [ 118.618194] usb 2-1: new high-speed USB device number 2 using ehci-platform

    [ 118.767152] usb 2-1: New USB device found, idVendor=0bda, idProduct=c811, bcdDevice= 2.00

    [ 118.767181] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

    [ 118.767199] usb 2-1: Product: 802.11ac NIC

    [ 118.767219] usb 2-1: Manufacturer: Realtek

    [ 118.767235] usb 2-1: SerialNumber: 123456

    [ 119.500530] usbcore: registered new interface driver rtl8821cu

    [ 119.525498] rtl8821cu 2-1:1.0 wlx1cbfced9d260: renamed from wlan0

  4. 然后通过sudo ifconfig命令可以看到WIFI的设备节点,WIFI的连接和测试方法请参看WIFI连接测试一节,这里不再赘述

    orangepi@orangepi:~$ sudo ifconfig wlx1cbfced9d260

    wlx1cbfced9d260: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

    ether 1c:bf:ce:d9:d2:60 txqueuelen 1000 (Ethernet)

    RX packets 0 bytes 0 (0.0 B)

    RX errors 0 dropped 0 overruns 0 frame 0

    TX packets 0 bytes 0 (0.0 B)

    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

RTL8821CU测试

  1. 首先将rtl8821cu 无线网卡模块插入开发板的usb 接口中

  2. 然后使用lsusb命令就可以看到rtl8821cu usb wifi模块的设备信息,请确保USB模块没有处于Driver CDROM Mode

    orangepi@orangepi:~$ lsusb | grep "Realtek"

    Bus 002 Device 003: ID 0bda:c820 Realtek Semiconductor Corp. 802.11ac NIC

orangepi@orangepi:~$ lsusb | grep "Realtek"

Bus 002 Device 002: ID 0bda:1a2b Realtek Semiconductor Corp. RTL8188GU 802.11n WLAN Adapter (Driver CDROM Mode)

如果lsusb命令看到的USB WIFI模块处于Driver CDROM Mode,请重新拔插下USB WIFI模块。如果还不行,请手动执行下面的命令切换下模式:

orangepi@orangepi:~$ sudo usb_modeswitch -KW -v 0bda -p 1a2b

  1. Linux系统会自动加载rtl8821cu蓝牙和wifi相关的内核模块,通过lsmod命令可以看到下面内核模块已自动加载

    orangepi@orangepi:~$ lsmod

    Module Size Used by

    8821cu 1839104 0

    rtk_btusb 61440 0

  2. 通过dmesg命令可以看到rtl8821cu模块的加载信息

    orangepi@orangepi:~$ dmesg

    ......

    [ 57.083693] usb 2-1: new high-speed USB device number 2 using ehci-platform

    [ 57.231888] usb 2-1: New USB device found, idVendor=0bda, idProduct=1a2b, bcdDevice= 2.00

    [ 57.231916] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

    [ 57.231937] usb 2-1: Product: DISK

    [ 57.231956] usb 2-1: Manufacturer: Realtek

    [ 57.242594] usb-storage 2-1:1.0: USB Mass Storage device detected

    [ 57.245674] scsi host0: usb-storage 2-1:1.0

    [ 58.069172] usb 2-1: USB disconnect, device number 2

    [ 58.440025] usb 2-1: new high-speed USB device number 3 using ehci-platform

    [ 58.587819] usb 2-1: New USB device found, idVendor=0bda, idProduct=c820, bcdDevice= 2.00

    [ 58.587827] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

    [ 58.587833] usb 2-1: Product: 802.11ac NIC

    [ 58.587838] usb 2-1: Manufacturer: Realtek

    [ 58.587844] usb 2-1: SerialNumber: 123456

    [ 58.610463] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.6d45ddf.20220519-142432

    [ 58.610656] usbcore: registered new interface driver rtk_btusb

    [ 58.634631] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8821

    [ 58.636729] Bluetooth: hci0: RTL: rom_version status=0 version=1

    [ 58.636740] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin

    [ 58.664190] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin

    [ 58.664746] Bluetooth: hci0: RTL: cfg_sz 10, total sz 31990

    [ 59.122471] Bluetooth: hci0: RTL: fw version 0x829a7644

    [ 59.265513] usbcore: registered new interface driver rtl8821cu

    [ 59.280119] rtl8821cu 2-1:1.2 wlx90de80521825: renamed from wlan0

  3. 然后通过sudo ifconfig命令可以看到rtl8821cu wifi的设备节点,wifi的连接和测试方法请参看WIFI连接测试一节,这里不再赘述

    orangepi@orangepi:~$ sudo ifconfig wlx90de80521825

    wlx90de80521825: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

    ether 00:13:ef:f4:58:ae txqueuelen 1000 (Ethernet)

    RX packets 0 bytes 0 (0.0 B)

    RX errors 0 dropped 0 overruns 0 frame 0

    TX packets 0 bytes 0 (0.0 B)

    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

  4. 然后通过hciconfig命令可以看到USB的蓝牙设备

    orangepi@orangepi:~$ sudo apt-get update && sudo apt-get install -y bluez

    orangepi@orangepi:~$ hciconfig

    hci0: Type: Primary Bus: USB

    BD Address: 00:13:EF:F4:58:AE ACL MTU: 820:8 SCO MTU: 255:16

    DOWN

    RX bytes:1252 acl:0 sco:0 events:125 errors:0

    TX bytes:23307 acl:0 sco:0 commands:125 errors:0

  5. 在桌面中也可以看到出现了蓝牙图标,此时蓝牙还未打开,所以会显示一个红色的x

    576x157px

  6. 点击Turn Bluetooth On可以打开蓝牙

    576x262px

  7. 打开蓝牙后的显示如下所示

    576x164px

  8. 蓝牙的测试方法请参看蓝牙使用方法一节,这里不再赘述

USB摄像头测试

  1. 首先需要准备一个下图所示的或者类似的支持UVC协议的USB摄像头,然后将USB摄像头插入到Orange Pi开发板的USB接口中

    259x150px

  2. 通过v4l2-ctl命令可以看到USB摄像头的设备节点信息为/dev/video0

    orangepi@orangepi:~$ v4l2-ctl --list-devices

    Q8 HD Webcam: Q8 HD Webcam (usb-fc880000.usb-1):

    /dev/video0

    /dev/video1

    /dev/media0

    注意v4l2中的l是小写字母l,不是数字1。

    另外video的序号不一定都是video0,请以实际看到的为准。

  3. 在桌面系统中可以使用Cheese直接打开USB摄像头,Cheese打开方法如下图所示:

    474x302px

    Cheese打开USB摄像头后的界面如下图所示:

    473x277px

  4. 使用fswebcam测试USB摄像头的方法

    1. 安装fswebcam

      orangepi@orangepi:~$ sudo apt update

      orangepi@orangepi:~$ sudo apt-get install -y fswebcam

    2. 安装完fswebcam后可以使用下面的命令来拍照

      1. -d 选项用于指定USB摄像头的设备节点

      2. --no-banner用于去除照片的水印

      3. -r 选项用于指定照片的分辨率

      4. -S 选项用设置于跳过前面的帧数

      5. ./image.jpg 用于设置生成的照片的名字和路径

        orangepi@orangepi:~$ sudo fswebcam -d /dev/video0 \

        --no-banner -r 1280x720 -S 5 ./image.jpg

    3. 在服务器版的Linux系统中,拍完照后可以使用scp命令将拍好的图片传到Ubuntu > PC上镜像观看

      orangepi@orangepi:~$ scp image.jpg test@192.168.1.55:/home/test (根据实际情况修改IP地址和路径)

    4. 在桌面版的Linux系统中,可以通过HDMI显示器直接查看拍摄的图片

音频测试

在桌面系统中测试音频方法

  1. 首先打开文件管理器

    357x176px

  2. 然后找到下面这个文件(如果系统中没有这个音频文件,可以自己上传一个音频文件到系统中)

    283x225px

  3. 然后选中audio.wav文件,右键选择使用vlc打开就可以开始播放

    288x234px

  4. 切换HDMI播放和耳机播放等不同音频设备的方法

    1. 首先打开音量控制界面

      308x169px

    2. 播放音频的时候,在Playback中会显示播放软件可以使用的音频设备选项,如下图所示,在这里可以设置需要播放到哪个音频设备

      576x282px

使用命令播放音频的方法

耳机接口播放音频测试

  1. 首先将耳机插入开发板的耳机孔中

    395x112px

  2. 然后可以通过aplay -l命令可以查看下Linux系统支持的声卡设备,从下面的输出可知,card 0为rk809的声卡设备,也就是耳机的声卡设备

    orangepi@orangepi:~$ aplay -l

    **** List of PLAYBACK Hardware Devices ****

    card 0: rockchiprk809 [rockchip-rk809], device 0: dailink-multicodecs rk817-hifi-0 [dailink-multicodecs rk817-hifi-0]

    Subdevices: 0/1

    Subdevice #0: subdevice #0

    card 1: rockchiphdmi [rockchip,hdmi], device 0: fe400000.i2s-i2s-hifi i2s-hifi-0 [fe400000.i2s-i2s-hifi i2s-hifi-0]

    Subdevices: 0/1

    Subdevice #0: subdevice #0

    Subdevice #0: subdevice #0

  3. 然后使用aplay命令播放下系统自带的音频文件,如果耳机能听到声音说明硬件能正常使用

    orangepi@orangepi:~$ aplay -D hw:0,0 /usr/share/sounds/alsa/audio.wav

    Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

HDMI音频播放测试

  1. 首先使用HDMI 转HDMI线将Orange Pi开发板连接到电视机上(其他的HDMI显示器需要确保可以播放音频)

  2. 然后查看下HDMI的声卡序号,从下面的输出可以知道HDMI的声卡为card 1

    orangepi@orangepi:~$ aplay -l

    **** List of PLAYBACK Hardware Devices ****

    card 0: rockchiprk809 [rockchip-rk809], device 0: dailink-multicodecs rk817-hifi-0 [dailink-multicodecs rk817-hifi-0]

    Subdevices: 0/1

    Subdevice #0: subdevice #0

    card 1: rockchiphdmi [rockchip,hdmi], device 0: fe400000.i2s-i2s-hifi i2s-hifi-0 [fe400000.i2s-i2s-hifi i2s-hifi-0]

    Subdevices: 0/1

    Subdevice #0: subdevice #0

    Subdevice #0: subdevice #0

  3. 然后使用aplay命令播放下系统自带的音频文件,如果HDMI显示器或者电视能听到声音说明硬件能正常使用

    orangepi@orangepi:~$ aplay -D hw:1,0 /usr/share/sounds/alsa/audio.wav

使用命令测试录音的方法

  1. Orange Pi 3B开发板没有板载MIC,只能通过带MIC功能的耳机来录制音频。将带MIC功能的耳机插入开发板后,运行下面的命令会通过耳机录制一段音频

    orangepi@orangepi:~$ amixer -c 0 cset name='Capture MIC Path' 'Main Mic'

    orangepi@orangepi:~$ arecord -D hw:0,0 -d 5 -f cd -t wav /tmp/test.wav

温度传感器

  1. 查看系统温度传感器的命令为:

orangepi@orangepi:~$ sensors

soc_thermal-virtual-0

Adapter: Virtual device

temp1: +41.9°C (crit = +115.0°C)

gpu_thermal-virtual-0

Adapter: Virtual device

temp1: +43.8°C

  1. 查看nvme ssd固态硬盘当前温度的命令为:

    orangepi@orangepi:~$ sudo smartctl -a /dev/nvme0 | grep "Temperature:"

    Temperature: 40 Celsius

40 Pin接口引脚说明

  1. Orange Pi 3B开发板40 pin接口引脚的顺序请参考下图

    400x124px

  2. Orange Pi 3B开发板40 pin接口引脚的功能如下表所示

    1. 下面是40pin完整的引脚图

      575x160px

    2. 下面的表格是上面完整表格左半边部分的图,能看得清楚点

      478x267px

    3. 下面的表格是上面完整表格右半边部分的图,能看得清楚点

      479x266px

  3. 40pin接口中总共有28个GPIO口,所有GPIO口的电压都是3.3v

安装wiringOP的方法

注意,Orange Pi发布的Linux镜像中已经预装了wiringOP,除非wiringOP的代码有更新,否则无需重新下载编译安装,直接使用即可。

编译好的wiringOP的deb包在orangepi-build中的存放路径为:

orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb

进入系统后可以运行下gpio readall命令,如果能看到下面的输出,说明wiringOP已经预装并且能正常使用。

wiringOP目前主要适配了设置GPIO口输入输出,设置GPIO口输出高低电平以及设置上下拉电阻的功能,像硬件PWM这样的功能是用不了的。

  1. 下载wiringOP的代码

    orangepi@orangepi:~$ sudo apt update

    orangepi@orangepi:~$ sudo apt install -y git

    orangepi@orangepi:~$ git clone https://github.com/orangepi-xunlong/wiringOP.git -b next

    注意,Orange Pi 3B需要下载wiringOP next分支的代码,请别漏了-b next这个参数。

    如果从GitHub下载代码有问题,可以直接使用Linux镜像中自带的wiringOP源码,存放位置为:/usr/src/wiringOP。

  2. 编译安装wiringOP

    orangepi@orangepi:~$ cd wiringOP

    orangepi@orangepi:~/wiringOP$ sudo ./build clean

    orangepi@orangepi:~/wiringOP$ sudo ./build

  3. 测试gpio readall命令的输出如下

40pin接口GPIO、I2C、UART、SPI和PWM测试

注意,如果需要设置overlays同时打开多个配置,请像下面这样使用空格隔开写在一行即可。

orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt

overlays=spi3-m0-cs0-spidev i2c2-m1 i2c3-m0 uart7-m2 uart9-m2 pwm11-m1

40pin GPIO口测试

Orange Pi发布的Linux系统中有预装一个blink_all_gpio程序,这个程序会设置40pin中的所有28个GPIO口不停的切换高低电平。

运行blink_all_gpio程序后,当用万用表去测量GPIO口的电平时,会发现GPIO引脚会在0和3.3v之间不停的切换。使用这个程序我们可以来测试GPIO口是否能正常工作。

运行blink_all_gpio程序的方式如下所示:

orangepi@orangepi3b:~$ sudo blink_all_gpio #记得加sudo权限

[sudo] password for orangepi: #在这里需要输入密码

  1. 开发板40pin中总共有28个GPIO口可以使用,下面以7号引脚——对应GPIO为GPIO4_A4 ——对应wPi序号为2——为例演示如何设置GPIO口的高低电平

    576x120px

  2. 首先设置GPIO口为输出模式,其中第三个参数需要输入引脚对应的wPi的序号

    root@orangepi:~/wiringOP# gpio mode 2 out

  3. 然后设置GPIO口输出低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功

    root@orangepi:~/wiringOP# gpio write 2 0

    使用gpio readall可以看到7号引脚的值(V)变为了0

    576x120px

  4. 然后设置GPIO口输出高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为3.3v,说明设置高电平成功

    root@orangepi:~/wiringOP# gpio write 2 1

    使用gpio readall可以看到7号引脚的值(V)变为了1

    576x118px

  5. 其他引脚的设置方法类似,只需修改wPi的序号为引脚对应的序号即可

40pin GPIO口上下拉电阻的设置方法

注意,Orange Pi 3B下面4个GPIO引脚因为外部有3.3V上拉,所以设置下拉是无效的,其它的引脚可以正常设置上下拉电阻功能

575x353px

  1. 下面以11号引脚——对应GPIO为GPIO3_C6 ——对应wPi序号为5——为例演示如何设置GPIO口的上下拉电阻

    576x147px

  2. 首先需要设置GPIO口为输入模式,其中第三个参数需要输入引脚对应的wPi的序号

    root@orangepi:~/wiringOP# gpio mode 5 in

  3. 设置为输入模式后,执行下面的命令可以设置GPIO口为上拉模式

    root@orangepi:~/wiringOP# gpio mode 5 up

  4. 然后输入下面的命令读取GPIO口的电平,如果电平为1,说明上拉模式设置成功

    root@orangepi:~/wiringOP# gpio read 5

    1

  5. 然后执行下面的命令可以设置GPIO口为下拉模式

    root@orangepi:~/wiringOP# gpio mode 5 down

  6. 然后输入下面的命令读取GPIO口的电平,如果电平为0,说明下拉模式设置成功

    root@orangepi:~/wiringOP# gpio read 5

    0

40pin SPI测试

  1. 由40pin接口的原理图可知,Orange Pi 3B可用的spi为spi3

    577x193px

    在Linux系统中,40pin中的spi3默认是关闭的,需要手动打开才能使用。

    在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以打开spi3。

    orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt

    overlays=spi3-m0-cs0-spidev

  2. 先查看下Linux系统中是否存在spidev3.0的设备节点,如果存在,说明SPI3已经设置好了,可以直接使用

    orangepi@orangepi:~$ ls /dev/spidev3.0

    /dev/spidev3.0

  3. 先不短接SPI3的mosi和miso两个引脚,运行spidev_test的输出结果如下所示,可以看到TX和RX的数据不一致

    orangepi@orangepi:~$ sudo spidev_test -v -D /dev/spidev3.0

    spi mode: 0x0

    bits per word: 8

    max speed: 500000 Hz (500 KHz)

    TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.

    RX | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF | ............................….

  4. 然后短接SPI3的mosi(40pin接口中的第19号引脚)和miso(40pin接口中的第21号引脚)两个引脚再运行spidev_test的输出如下,可以看到发送和接收的数据一样

    577x83px

    orangepi@orangepi:~$ sudo spidev_test -v -D /dev/spidev3.0

    spi mode: 0x0

    bits per word: 8

    max speed: 500000 Hz (500 KHz)

    TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.

    RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.

40pin I2C测试

  1. 由下表可知,Orange Pi 3B可用的i2c为i2c2、i2c3和i2c4共三组 i2c总线

    576x160px

    从上表中可以看到,i2c4_m0和spi3_m0是引脚复用的,两者不能同时打开,i2c3_m0和uart3_m0也是引脚复用的,两者不能同时打开

    在Linux系统中,40pin中的i2c默认都是关闭的,需要手动打开才能使用。

    在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以同时打开i2c2、i2c3和i2c4,如果只需要打开一个,那么就填写一个即可。

    orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt

    overlays=i2c2-m1 i2c3-m0 i2c4-m0

  2. 启动Linux系统后,先确认下/dev下存在i2c的设备节点

    orangepi@orangepi:~# ls /dev/i2c-*

    /dev/i2c-0 /dev/i2c-2 /dev/i2c-3 /dev/i2c-4 /dev/i2c-6

  3. 然后在40pin接头的i2c引脚上接一个i2c设备

i2c2-m1 i2c3-m0 i2c4-m0
sda引脚 对应3号引脚 对应27号引脚 对应19号引脚
sck引脚 对应5号引脚 对应28号引脚 对应23号引脚
vcc引脚 对应1号引脚 对应1号引脚 对应1号引脚
gnd引脚 对应6号引脚 对应6号引脚 对应6号引脚
  1. 然后使用i2cdetect -y命令如果能检测到连接的i2c设备的地址,就说明i2c能正常使用

    orangepi@orangepi:~$ sudo i2cdetect -y 2 #i2c2的命令

    orangepi@orangepi:~$ sudo i2cdetect -y 3 #i2c3的命令

    orangepi@orangepi:~$ sudo i2cdetect -y 4 #i2c4的命令

40pin的UART测试

  1. 由下表可知,Orange Pi 3B可用的uart为uart3、uart7和uart9共三组uart总线

    575x160px

    从上表中可以看到,i2c3_m0和uart3_m0是引脚复用的,两者不能同时打开

    在Linux系统中,40pin中的uart默认都是关闭的,需要手动打开才能使用。

    在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以同时打开uart3、uart7、和uart9,如果只需要打开一个,那么就填写一个即可。

    orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt

    overlays=uart3-m0 uart7-m2 uart9-m2

  2. 进入Linux系统后,先确认下/dev下是否存在对应uart的设备节点

    orangepi@orangepi:~# ls /dev/ttyS*

    /dev/ttyS1 /dev/ttyS3 /dev/ttyS7 /dev/ttyS9

  3. 然后开始测试uart接口,先使用杜邦线短接要测试的uart接口的rx和tx

uart3 uart7 uart9
tx引脚 对应28号引脚 对应16号引脚 对应29号引脚
rx引脚 对应27号引脚 对应15号引脚 对应7号引脚

545x134px

  1. 使用gpio serial命令测试串口的回环功能如下所示,如果能看到下面的打印,说明串口通信正常

    1. 测试UART3

      orangepi@orangepi:~$ sudo gpio serial /dev/ttyS3

      [sudo] password for orangepi: #在这里输入密码

      Out: 0: -> 0

      Out: 1: -> 1

      Out: 2: -> 2

      Out: 3: -> 3

      Out: 4: -> 4

      Out: 5: -> 5^C

    2. 测试UART7

      orangepi@orangepi:~$ sudo gpio serial /dev/ttyS7

      [sudo] password for orangepi: #在这里输入密码

      Out: 0: -> 0

      Out: 1: -> 1

      Out: 2: -> 2

      Out: 3: -> 3

      Out: 4: -> 4

      Out: 5: -> 5^C

    3. 测试UART9

      orangepi@orangepi:~$ sudo gpio serial /dev/ttyS9

      [sudo] password for orangepi: #在这里输入密码

      Out: 0: -> 0

      Out: 1: -> 1

      Out: 2: -> 2

      Out: 3: -> 3

      Out: 4: -> 4

      Out: 5: -> 5^C

PWM的测试方法

  1. 由下表可知,Orange Pi 3B可用的pwm11

    575x160px

    在Linux系统中,40pin中的pwm默认都是关闭的,需要手动打开才能使用。

    在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以打开pwm11。

    orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt

    overlays=pwm11-m1

  2. 当打开一个pwm后,在/sys/class/pwm/中就会多出一个pwmchipX(X为具体的的数字)

    orangepi@orangepi:~$ ls /sys/class/pwm/

    pwmchip0 pwmchip1

  3. 上面哪个pwmchip对应pwm11呢,我们先查看下 ls /sys/class/pwm/ -l命令的输出,如下所示:

  4. pwm11寄存器的基地址为fe6f0030,再看 ls /sys/class/pwm/ -l命令的输出,可以看到pwmchip1中链接到了fe6f0030.pwm,所以pwm11对应pwmchip为pwmchip1

  5. 然后使用下面的命令可以让pwm11输出一个50Hz的方波(请先切换到root用户,再执行下面的命令)

root@orangepi:~# echo 0 > /sys/class/pwm/pwmchip1/export

root@orangepi:~# echo 20000000 > /sys/class/pwm/pwmchip1/pwm0/period

root@orangepi:~# echo 1000000 > /sys/class/pwm/pwmchip1/pwm0/duty_cycle

root@orangepi:~# echo 1 > /sys/class/pwm/pwmchip1/pwm0/enable

575x346px

wiringOP-Python的安装使用方法

wiringOP-Python是wiringOP的Python语言版本的库,用于在Python程序中操作开发板的GPIO、I2C、SPI和UART等硬件资源。

另外请注意下面所有的命令都是在root用户下操作的。

wiringOP-Python的安装方法

  1. 首先安装依赖包

    root@orangepi:~# sudo apt-get update

    root@orangepi:~# sudo apt-get -y install git swig python3-dev python3-setuptools

  2. 然后使用下面的命令下载wiringOP-Python的源码

注意,下面的git clone--recursive命令会自动下载wiringOP的源码,因为wiringOP-Python是依赖wiringOP的。请确保下载过程没有因为网络问题而报错。

如果从GitHub下载代码有问题,可以直接使用Linux镜像中自带的wiringOP-Python源码,存放位置为:/usr/src/wiringOP-Python

root@orangepi:~# git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python -b next

root@orangepi:~# cd wiringOP-Python

root@orangepi:~/wiringOP-Python# git submodule update --init --remote

  1. 然后使用下面的命令编译wiringOP-Python并将其安装到开发板的Linux系统中

    root@orangepi:~# cd wiringOP-Python

    root@orangepi:~/wiringOP-Python# python3 generate-bindings.py > bindings.i

    root@orangepi:~/wiringOP-Python# sudo python3 setup.py install

  2. 然后输入下面的命令,如果有帮助信息输出,说明wiringOP-Python安装成功,按下q键可以退出帮助信息的界面

root@orangepi:~/wiringOP-Python# python3 -c "import wiringpi; help(wiringpi)"

Help on module wiringpi:

NAME

wiringpi

DESCRIPTION

  1. This file was automatically generated by SWIG (http://www.swig.org).
  1. Version 4.0.2
  1. Do not make changes to this file unless you know what you are doing--modify
  1. the SWIG interface file instead.
  1. 在python命令行下测试wiringOP-Python是否安装成功的步骤如下所示:

    1. 首先使用python3命令进入python3的命令行模式

root@orangepi:~# python3

  1. 然后导入wiringpi的python模块

>>> import wiringpi;

  1. 最后输入下面的命令可以查看下wiringOP-Python的帮助信息,按下q键可以退出帮助信息的界面

>>> help(wiringpi)

Help on module wiringpi:

NAME

wiringpi

DESCRIPTION

  1. This file was automatically generated by SWIG (http://www.swig.org).
  1. Version 4.0.2
  1. Do not make changes to this file unless you know what you are doing--modify
  1. the SWIG interface file instead.

CLASSES

builtins.object

GPIO

I2C

Serial

nes

class GPIO(builtins.object)

| GPIO(pinmode=0)

|

>>>

40pin GPIO口测试

wiringOP-Python跟wiringOP一样,也是可以通过指定wPi号来确定操作哪一个GPIO引脚,因为wiringOP-Python中没有查看wPi号的命令,所以只能通过wiringOP中的gpio命令来查看板子wPi号与物理引脚的对应关系。

  1. 下面以7号引脚——对应GPIO为GPIO4_A4 ——对应wPi序号为2——为例演示如何设置GPIO口的高低电平

    576x120px

  2. 直接用命令测试的步骤如下所示:

    1. 首先设置GPIO口为输出模式,其中pinMode函数的第一个参数是引脚对应的wPi的序号,第二个参数是GPIO的模式

      root@orangepi:~/wiringOP-Python# python3 -c "import wiringpi; \

      from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \

      wiringpi.pinMode(2, GPIO.OUTPUT) ; "

    2. 然后设置GPIO口输出低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功

      root@orangepi:~/wiringOP-Python# python3 -c "import wiringpi; \

      from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\

      wiringpi.digitalWrite(2, GPIO.LOW)"

    3. 然后设置GPIO口输出高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为3.3v,说明设置高电平成功

      root@orangepi:~/wiringOP-Python# python3 -c "import wiringpi; \

      from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\

      wiringpi.digitalWrite(2, GPIO.HIGH)"

  3. 在python3的命令行中测试的步骤如下所示:

    1. 首先使用python3命令进入python3的命令行模式

      root@orangepi:~# python3

    2. 然后导入wiringpi的python模块

      >>> import wiringpi

      >>> from wiringpi import GPIO

    3. 然后设置GPIO口为输出模式,其中pinMode函数的第一个参数是引脚对应的wPi的序号,第二个参数是GPIO的模式

      >>> wiringpi.wiringPiSetup()

      0

      >>> wiringpi.pinMode(2, GPIO.OUTPUT)

    4. 然后设置GPIO口输出低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功

      >>> wiringpi.digitalWrite(2, GPIO.LOW)

    5. 然后设置GPIO口输出高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为3.3v,说明设置高电平成功

      >>> wiringpi.digitalWrite(2, GPIO.HIGH)

  4. wiringOP-Python在python代码中设置GPIO高低电平的方法可以参考下examples中的blink.py测试程序,blink.py测试程序会设置开发板40 pin中所有的GPIO口的电压不断的高低变化

    root@orangepi:~/wiringOP-Python# cd examples

    root@orangepi:~/wiringOP-Python/examples# ls blink.py

    blink.py

    root@orangepi:~/wiringOP-Python/examples# python3 blink.py

40pin SPI测试

  1. 由40pin接口的原理图可知,Orange Pi 3B可用的spi为spi3

    577x193px

    在Linux系统中,40pin中的spi3默认是关闭的,需要手动打开才能使用。

    在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以打开spi4。

    orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt

    overlays=spi3-m0-cs0-spidev

  2. 先查看下Linux系统中是否存在spidev3.0的设备节点,如果存在,说明SPI3已经设置好了,可以直接使用

    orangepi@orangepi:~$ ls /dev/spidev3.0

    /dev/spidev3.0

  3. 然后可以使用examples中的spidev_test.py程序测试下SPI的回环功能,spidev_test.py程序需要指定下面的两个参数:

    1. --channel:指定SPI的通道号

    2. --port:指定SPI的端口号

  4. 先不短接 SPI3 的 mosi 和 miso 两个引脚,运行 spidev_test.py 的输出结果如下所示,可以看到 TX 和 RX 的数据不一致

    root@orangepi:~/wiringOP-Python# cd examples

root@orangepi:~/wiringOP-Python/examples# python3 spidev_test.py \

--channel 3 --port 0

spi mode: 0x0

max speed: 500000 Hz (500 KHz)

Opening device /dev/spidev3.0

TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|

RX | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |.............….|

  1. 然后使用杜邦线短接SPI3的txd(40pin接口中的第19号引脚)和rxd(40pin接口中的第21号引脚)两个引脚再运行spidev_test.py的输出如下,可以看到发送和接收的数据一样,说明SPI3回环测试正常

    root@orangepi:~/wiringOP-Python# cd examples

root@orangepi:~/wiringOP-Python/examples# python3 spidev_test.py \

--channel 3 --port 0

spi mode: 0x0

max speed: 500000 Hz (500 KHz)

Opening device /dev/spidev3.0

TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|

RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|

40pin I2C测试

  1. 由下表可知,Orange Pi 3B可用的i2c为i2c2、i2c3和i2c4共三组 i2c总线

    576x160px

    从上表中可以看到,i2c4_m0和spi3_m0是引脚复用的,两者不能同时打开,i2c3_m0和uart3_m0也是引脚复用的,两者不能同时打开

    在Linux系统中,40pin中的i2c默认都是关闭的,需要手动打开才能使用。

    在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以同时打开i2c2、i2c3和i2c4,如果只需要打开一个,那么就填写一个即可。

    orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt

    overlays=i2c2-m1 i2c3-m0 i2c4-m0

  2. 启动Linux系统后,先确认下/dev下存在i2c的设备节点

    orangepi@orangepi:~# ls /dev/i2c-*

    /dev/i2c-0 /dev/i2c-2 /dev/i2c-3 /dev/i2c-4 /dev/i2c-6

  3. 然后在40pin接头的i2c引脚上接一个i2c设备,这里以ds1307 RTC模块为例

i2c2-m1 i2c3-m0 i2c4-m0
sda引脚 对应3号引脚 对应27号引脚 对应19号引脚
sck引脚 对应5号引脚 对应28号引脚 对应23号引脚
vcc引脚 对应1号引脚 对应1号引脚 对应1号引脚
gnd引脚 对应6号引脚 对应6号引脚 对应6号引脚

180x153px

  1. 然后使用i2cdetect -y命令如果能检测到连接的i2c设备的地址,就说明i2c能正常使用

    orangepi@orangepi:~$ sudo i2cdetect -y 2 #i2c2的命令

    orangepi@orangepi:~$ sudo i2cdetect -y 3 #i2c3的命令

    orangepi@orangepi:~$ sudo i2cdetect -y 4 #i2c4的命令

  2. 然后可以运行examples中的ds1307.py测试程序读取RTC的时间

    root@orangepi:~/wiringOP-Python# cd examples

    root@orangepi:~/wiringOP-Python/examples# python3 ds1307.py --device \

    "/dev/i2c-4"

    Thu 2023-01-05 14:57:55

    Thu 2023-01-05 14:57:56

    Thu 2023-01-05 14:57:57

    ^C

    exit

40pin的UART测试

  1. 由下表可知,Orange Pi 3B可用的uart为uart3、uart7和uart9共三组uart总线

    575x160px

    从上表中可以看到,i2c3_m0和uart3_m0是引脚复用的,两者不能同时打开

    在Linux系统中,40pin中的uart默认都是关闭的,需要手动打开才能使用。

    在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以同时打开uart3、uart7、和uart9,如果只需要打开一个,那么就填写一个即可。

    orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt

    overlays=uart3-m0 uart7-m2 uart9-m2

  2. 进入Linux系统后,先确认下/dev下是否存在对应uart的设备节点

    orangepi@orangepi:~# ls /dev/ttyS*

    /dev/ttyS1 /dev/ttyS3 /dev/ttyS7 /dev/ttyS9

  3. 然后开始测试uart接口,先使用杜邦线短接要测试的uart接口的rx和tx

uart3 uart7 uart9
tx引脚 对应28号引脚 对应16号引脚 对应29号引脚
rx引脚 对应27号引脚 对应15号引脚 对应7号引脚
  1. 使用examples中的serialTest.py程序测试串口的回环功能如下所示,如果能看到下面的打印,说明串口通信正常

    1. 测试UART3

      root@orangepi:~/wiringOP-Python/examples# python3 serialTest.py --device \

      "/dev/ttyS3"

      Out: 0: -> 0

      Out: 1: -> 1

      Out: 2: -> 2

      Out: 3: -> 3

      Out: 4:^C

      exit

    2. 测试UART7

      root@orangepi:~/wiringOP-Python/examples# python3 serialTest.py --device \

      "/dev/ttyS7"

      Out: 0: -> 0

      Out: 1: -> 1

      Out: 2: -> 2

      Out: 3: -> 3

      Out: 4:^C

      exit

    3. 测试UART9

      root@orangepi:~/wiringOP-Python/examples# python3 serialTest.py --device \

      "/dev/ttyS9"

      Out: 0: -> 0

      Out: 1: -> 1

      Out: 2: -> 2

      Out: 3: -> 3

      Out: 4:^C

      exit

硬件看门狗测试

Orange Pi发布的Linux系统中预装了watchdog_test程序,可以直接测试。

运行watchdog_test程序的方法如下所示:

  1. 第二个参数10表示看门狗的计数时间,如果这个时间内没有喂狗,系统会重启

  2. 我们可以通过按下键盘上的任意键(ESC除外)来喂狗,喂狗后,程序会打印一行keep alive表示喂狗成功

    orangepi@orangepi:~$ sudo watchdog_test 10

    open success

    options is 33152,identity is sunxi-wdt

    put_usr return,if 0,success:0

    The old reset time is: 16

    return ENOTTY,if -1,success:0

    return ENOTTY,if -1,success:0

    put_user return,if 0,success:0

    put_usr return,if 0,success:0

    keep alive

    keep alive

    keep alive

查看RK3566芯片的序列号

查看RK3566芯片序列号的命令如下所示,每个芯片的序列号都是不同的,所以可以使用序列号来区分多个开发板。

orangepi@orangepi:~$ cat_serial.sh

Serial : 8fa18eaf489041f0

下载安装arm64版本balenaEtcher的方法

  1. balenaEtcher arm64版本的下载地址为:

    1. deb安装包的下载地址如下所示,需要安装才能使用

      https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balena-etcher-electron_1.7.9+5945ab1f_arm64.deb

    2. 无需安装的AppImage版本的下载地址如下所示:

      https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balenaEtcher-1.7.9+5945ab1f-arm64.AppImage

  1. deb版本balenaEtcher的安装使用方法:

    1. deb版本的balenaEtcher安装命令如下所示:

      orangepi@orangepi:~$ sudo apt install -y \

      --fix-broken ./balena-etcher-electron_1.7.9+5945ab1f_arm64.deb

    2. deb版本的balenaEtcher安装完成后,在Application中就可以打开了

    3. balenaEtcher打开后的界面如下所示:

  1. AppImage版本的balenaEtcher的使用方法:

    1. 首先给balenaEtcher添加权限

      orangepi@orangepi:~/Desktop$ chmod +x balenaEtcher-1.7.9+5945ab1f-arm64.AppImage

    2. 然后选中AppImage版本balenaEtcher,再点击鼠标右键,再点击Execute就可以打开balenaEtcher了

      145x118px

宝塔Linux面板的安装方法

宝塔Linux面板是提升运维效率的服务器管理软件,支持一键LAMP/LNMP/集群/监控/网站/FTP/数据库/JAVA等100多项服务器管理功能(摘抄自宝塔官网

  1. 首先需要扩展下/tmp空间的大小,设置完后需要重启下开发板的linux系统,命令如下所示:

    orangepi@orangepi:~$ sudo sed -i 's/nosuid/&,size=2G/' /etc/fstab

    orangepi@orangepi:~$ sudo reboot

  2. 重启后,可以看到/tmp空间的大小变为2G了

    orangepi@orangepi:~$ df -h | grep "/tmp"

    tmpfs 2.0G 12K 2.0G 1% /tmp

  3. 然后在Linux系统中输入下面的命令就可以开始宝塔的安装

    orangepi@orangepi:~$ sudo install_bt_panel.sh

  4. 然后宝塔安装程序会提醒是否安装Bt-Panel/www文件夹,此时输入y即可

    +----------------------------------------------------------------------

    | Bt-WebPanel FOR CentOS/Ubuntu/Debian

    +----------------------------------------------------------------------

    | Copyright © 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved.

    +----------------------------------------------------------------------

    | The WebPanel URL will be http://SERVER_IP:8888 when installed.

    +----------------------------------------------------------------------

    Do you want to install Bt-Panel to the /www directory now?(y/n): y

  5. 然后要做的就是耐心等待,当看到终端输出下面的打印信息时,说明宝塔已经安装完成,整个安装过程大约耗时34分钟,根据网络速度的不同可能会有一些差别

    576x233px

  6. 此时在浏览器中输入上面显示的面板地址就可以打开宝塔Linux面板的登录界面,然后在对应的位置输入上图显示的usernamepassword就可以登录进宝塔
    575x281px

  7. 成功登录宝塔后的会弹出下面的欢迎界面,首先请将中间的用户须知阅读完拖到最下面,然后就可以选择”我已同意并阅读《用户协议》“,接着点击”进入面板”就可以进入宝塔了

    575x317px

  8. 进入宝塔后首先会提示需要绑定宝塔官网的账号,如果没有账号可以去宝塔的官网(https://www.bt.cn)注册一个

    576x300px

  9. 最终显示的界面如下图所示,可以很直观的看到开发板Linux系统的一些状态信息,比如负载状态、CPU的使用率、内存使用率和存储空间的使用情况等

    575x306px

  10. 宝塔的更多功能可以参考下面资料自行探索

    使用手册:http://docs.bt.cn

    论坛地址:https://www.bt.cn/bbs

    GitHub链接:https://github.com/aaPanel/BaoTa

设置中文环境以及安装中文输入法

注意,安装中文输入法前请确保开发板使用的Linux系统为桌面版系统。

Debian系统的安装方法

  1. 首先设置默认locale为中文

    1. 输入下面的命令可以开始配置locale

      orangepi@orangepi:~$ sudo dpkg-reconfigure locales

    2. 然后在弹出的界面中选择zh_CN.UTF-8 > UTF-8(通过键盘上的上下方向按键来上下移动,通过空格键来选择,最后通过Tab键可以将光标移动到<OK>,然后回车即可)

      575x296px

    3. 然后设置默认localezh_CN.UTF-8

      575x160px

    4. 退出界面后就会开始locale的设置,命令行显示的输出如下所示

      orangepi@orangepi:~$ sudo dpkg-reconfigure locales

      Generating locales (this might take a while)...

      en_US.UTF-8... done

      zh_CN.UTF-8... done

      Generation complete.

  2. 然后打开Input Method

    575x361px

  3. 然后选择OK

    295x212px

  4. 然后选择Yes

    303x192px

  5. 然后选择fcitx

    307x220px

  6. 然后选择OK

    305x216px

  7. 然后重启Linux系统才能使配置生效

  8. 然后打开Fcitx configuration

    575x376px

  9. 然后点击下图所示位置的+

    280x187px

  10. 然后搜索Google Pinyin再点击OK

    291x196px

  11. 然后将Google Pinyin放到最前面

    299x202px

    300x202px

  12. 然后打开Geany这个编辑器测试下中文输入法

    349x212px

  13. 中文输入法测试如下所示

    575x325px

  14. 通过Ctrl+Space快捷键可以切换中英文输入法

  15. 如果需要整个系统都显示为中文,可以将/etc/default/locale中的变量都设置为zh_CN.UTF-8

    orangepi@orangepi:~$ sudo vim /etc/default/locale

    # File generated by update-locale

    LC_MESSAGES=zh_CN.UTF-8

    LANG=zh_CN.UTF-8

    LANGUAGE=zh_CN.UTF-8

  16. 然后重启系统就能看到系统显示为中文了

    576x356px

Ubuntu 20.04系统的安装方法

  1. 首先打开Language Support

    575x351px

  2. 然后找到汉语(中国)选项

    318x311px

  3. 然后请使用鼠标左键选中汉语(中国)并按住不动,然后往上将其拖到最开始的位置,拖完后的显示如下图所示:

    324x320px

注意,这一步不是很好拖动的,请耐心多试几次。

  1. 然后选择Apply System-Wide将中文设置应用到整个系统

    321x316px

  2. 然后设置Keyboard input method systemfcitx

    327x320px

  3. 然后重启Linux系统使配置生效

  4. 重新进入系统后,在下面的界面请选择不要再次询问我,然后请根据自己的喜好决定标准文件夹是否也要更新为中文

    303x247px

  5. 然后可以看到桌面都显示为中文了

    575x383px

  6. 然后我们可以打开Geany测试下中文输入法,打开方式如下图所示

    576x292px

  7. 打开Geany后,默认还是英文输入法,我们可以通过Ctrl+Space快捷键来切换成中文输入法,然后就能输入中文了

    575x308px

Ubuntu 22.04系统的安装方法

  1. 首先打开Language Support

    575x351px

  2. 然后找到汉语(中国)选项

    335x326px

  3. 然后请使用鼠标左键选中汉语(中国)并按住不动,然后往上将其拖到最开始的位置,拖完后的显示如下图所示:

    337x331px

注意,这一步不是很好拖动的,请耐心多试几次。

  1. 然后选择Apply System-Wide将中文设置应用到整个系统

    336x330px

  2. 然后重启Linux系统使配置生效

  3. 重新进入系统后,在下面的界面请选择不要再次询问我,然后请根据自己的喜好决定标准文件夹是否也要更新为中文

    303x247px

  4. 然后可以看到桌面都显示为中文了

    575x383px

  5. 然后打开Fcitx5配置程序

    575x349px

  6. 然后选择使用拼音输入法

    366x289px

  7. 选择后的界面如下所示,再点击确定即可

    366x290px

  8. 然后我们可以打开Geany测试下中文输入法,打开方式如下图所示

    576x292px

  9. 打开Geany后,默认还是英文输入法,我们可以通过Ctrl+Space快捷键来切换成中文输入法,然后就能输入中文了

    576x408px

远程登录Linux系统桌面的方法

Ubuntu Gnome Wayland镜像不支持使用此处介绍的Nomachine和VNC来远程登录桌面。

使用NoMachine远程登录

请确保开发板安装的Ubuntu或者Debian系统为桌面版本的系统。另外NoMachine也提供了详细的使用文档,强烈建议通读此文档来熟悉NoMachine的使用,文档链接如下所示:

https://knowledgebase.nomachine.com/DT10R00166

NoMachine支持Windows、Mac、Linux、iOS和安卓平台,所以我们可以在多种设备上通过NoMachine来远程登录控制Orange Pi开发板。下面演示下在Windows中通过NoMachine来远程登录Orange Pi开发板的Linux系统桌面。其他平台的安装方法请参考下NoMachine的官方文档。

操作前请先确保Windwos电脑和开发板在同一局域网内,并且能正常ssh登录开发板的Ubuntu或者Debian系统。

  1. 首先下载NoMachine软件Linux arm64 deb版本的安装包,然后安装到开发板的Linux系统中

    1. 由于RK3566是ARMv8架构的SOC,我们使用的系统为Ubuntu或者Debian,所以这里需要下载NoMachine > for ARM ARMv8 DEB安装包,下载链接如下所示:

注意,这个下载链接可能会变,请认准Armv8/Arm64版本的deb包。

https://downloads.nomachine.com/download/?id=118&distro=ARM

575x227px

  1. 另外在官方工具中也可以下载到NoMachine的安装包

    86x106px

    先进入远程登录软件-NoMachine文件夹

    256x46px

    然后下载arm64版本的deb安装包

    180x109px

  2. 然后将下载的nomachine_x.x.x_x_arm64.deb上传到开发板的Linux系统中

  3. 然后使用下面的命令在开发板的Linux系统中安装NoMachine

    orangepi@orangepi:~$ sudo dpkg -i nomachine_x.x.x_x_arm64_arm64.deb

  1. 然后下载NoMachine软件Windows版本的安装包,下载地址如下所示

注意,这个下载链接可能会变。

https://downloads.nomachine.com/download/?id=9

575x163px

  1. 然后在Windows中安装NoMachine,安装完后请重启下电脑

  2. 然后在Window中打开NoMachine

    76x66px

  3. NoMachine启动后会自动扫描局域网内其他安装有NoMachine的设备,进入NoMachine的主界面后就可以看到开发板已经在可连接的设备列表里了,然后点击下图红色方框所示的位置即可开始登录开发板的Linux系统桌面

    321x92px

  4. 然后点击OK

    402x275px

  5. 然后在下图对应的位置输入开发板Linux系统的用户名和密码,再点击OK开始登陆

    406x274px

  6. 然后在接下来的界面中都点击OK

  7. 最后就能看到开发板Linux系统的桌面了

    411x246px

使用VNC远程登录

操作前请先确保Windwos电脑和开发板在同一局域网内,并且能正常ssh登录开发板的Ubuntu或者Debian系统。

Ubuntu20.04测试VNC很多问题,请不要使用这种方法。

  1. 首先运行set_vnc.sh脚本设置下vnc,记得加sudo权限

    orangepi@orangepi:~$ sudo set_vnc.sh

    You will require a password to access your desktops.

    Password: #在这里设置vnc的密码,8位字符

    Verify: #在这里设置vnc的密码,8位字符

    Would you like to enter a view-only password (y/n)? n

    xauth: file /root/.Xauthority does not exist

    New 'X' desktop is orangepi3b:1

    Creating default startup script /root/.vnc/xstartup

    Starting applications specified in /root/.vnc/xstartup

    Log file is /root/.vnc/orangepi3b:1.log

    Killing Xtightvnc process ID 3047

    New 'X' desktop is orangepi3b:1

    Starting applications specified in /root/.vnc/xstartup

    Log file is /root/.vnc/orangepi3b:1.log

  2. 使用MobaXterm软件连接开发板Linux系统桌面的步骤如下所示:

    1. 首先点击Session,然后选择VNC,再填写开发板的IP地址和端口,最后点击OK确认

576x410px

  1. 然后输入前面设置的VNC的密码

    274x131px

  2. 登录成功后的界面显示如下图所示,然后就可以远程操作开发板Linux系统的桌面了

    405x293px

Linux系统支持的部分编程语言测试

Debian Bullseye系统

  1. Debian Bullseye默认安装有gcc编译工具链,可以直接在开发板的Linux系统中编译C语言的程序

    1. gcc的版本如下所示

      orangepi@orangepi:~$ gcc --version

      gcc (Debian 10.2.1-6) 10.2.1 20210110

      Copyright (C) 2020 Free Software Foundation, Inc.

      This is free software; see the source for copying conditions. There is NO

      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    2. 编写C语言的hello_world.c程序

      orangepi@orangepi:~$ vim hello_world.c

      #include <stdio.h>

      int main(void)

      {

      printf("Hello World!\n");

      return 0;

      }

    3. 然后编译运行hello_world.c

      orangepi@orangepi:~$ gcc -o hello_world hello_world.c

      orangepi@orangepi:~$ ./hello_world

      Hello World!

  2. Debian Bullseye默认安装有Python3

    1. Python具体版本如下所示

      orangepi@orangepi:~$ python3

      Python 3.9.2 (default, Feb 28 2021, 17:03:44)

      [GCC 10.2.1 20210110] on linux

      Type "help", "copyright", "credits" or "license" for more information.

      >>>

    2. 编写Python语言的hello_world.py程序

      orangepi@orangepi:~$ vim hello_world.py

      print('Hello World!')

    3. 运行hello_world.py的结果如下所示

      orangepi@orangepi:~$ python3 hello_world.py

      Hello World!

  3. Debian Bullseye默认没有安装Java的编译工具和运行环境

    1. 可以使用下面的命令安装openjdk,Debian > Bullseye中最新版本为openjdk-17

      orangepi@orangepi:~$ sudo apt install -y openjdk-17-jdk

    2. 安装完后可以查看下Java的版本

      orangepi@orangepi:~$ java --version

    3. 编写Java版本的hello_world.java

      orangepi@orangepi:~$ vim hello_world.java

      public class hello_world

      {

      public static void main(String[] args)

      {

      System.out.println("Hello World!");

      }

      }

    4. 然后编译运行hello_world.java

      orangepi@orangepi:~$ javac hello_world.java

      orangepi@orangepi:~$ java hello_world

      Hello World!

Ubuntu Focal系统

  1. Ubuntu Focal默认安装有gcc编译工具链,可以直接在开发板的Linux系统中编译C语言的程序

    1. gcc的版本如下所示

      orangepi@orangepi:~$ gcc --version

      gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

      Copyright (C) 2019 Free Software Foundation, Inc.

      This is free software; see the source for copying conditions. There is NO

      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    2. 编写C语言的hello_world.c程序

      orangepi@orangepi:~$ vim hello_world.c

      #include <stdio.h>

      int main(void)

      {

      printf("Hello World!\n");

      return 0;

      }

    3. 然后编译运行hello_world.c

      orangepi@orangepi:~$ gcc -o hello_world hello_world.c

      orangepi@orangepi:~$ ./hello_world

      Hello World!

  2. Ubuntu Focal默认安装有Python3

    1. Python3具体版本如下所示

      orangepi@orangepi:~$ python3

      Python 3.8.10 (default, Nov 14 2022, 12:59:47)

      [GCC 9.4.0] on linux

      Type "help", "copyright", "credits" or "license" for more information.

      >>>

    2. 编写Python语言的hello_world.py程序

      orangepi@orangepi:~$ vim hello_world.py

      print('Hello World!')

    3. 运行hello_world.py的结果如下所示

      orangepi@orangepi:~$ python3 hello_world.py

      Hello World!

  3. Ubuntu Focal默认没有安装Java的编译工具和运行环境

    1. 可以使用下面的命令安装openjdk-17

      orangepi@orangepi:~$ sudo apt install -y openjdk-17-jdk

    2. 安装完后可以查看下Java的版本

      orangepi@orangepi:~$ java --version

      openjdk 17.0.2 2022-01-18

      OpenJDK Runtime Environment (build 17.0.2+8-Ubuntu-120.04)

      OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)

    3. 编写Java版本的hello_world.java

      orangepi@orangepi:~$ vim hello_world.java

      public class hello_world

      {

      public static void main(String[] args)

      {

      System.out.println("Hello World!");

      }

      }

    4. 然后编译运行hello_world.java

      orangepi@orangepi:~$ javac hello_world.java

      orangepi@orangepi:~$ java hello_world

      Hello World!

Ubuntu Jammy系统

  1. Ubuntu Jammy默认安装有gcc编译工具链,可以直接在开发板的Linux系统中编译C语言的程序

    1. gcc的版本如下所示

      orangepi@orangepi:~$ gcc --version

      gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0

      Copyright (C) 2021 Free Software Foundation, Inc.

      This is free software; see the source for copying conditions. There is NO

      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    2. 编写C语言的hello_world.c程序

      orangepi@orangepi:~$ vim hello_world.c

      #include <stdio.h>

      int main(void)

      {

      printf("Hello World!\n");

      return 0;

      }

    3. 然后编译运行hello_world.c

      orangepi@orangepi:~$ gcc -o hello_world hello_world.c

      orangepi@orangepi:~$ ./hello_world

      Hello World!

  2. Ubuntu Jammy默认安装有Python3

    1. Python3具体版本如下所示

      orangepi@orangepi:~$ python3

      Python 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] on linux

      Type "help", "copyright", "credits" or "license" for more information.

      >>>

    2. 编写Python语言的hello_world.py程序

      orangepi@orangepi:~$ vim hello_world.py

      print('Hello World!')

    3. 运行hello_world.py的结果如下所示

      orangepi@orangepi:~$ python3 hello_world.py

      Hello World!

  3. Ubuntu Jammy默认没有安装Java的编译工具和运行环境

    1. 可以使用下面的命令安装openjdk-18

      orangepi@orangepi:~$ sudo apt install -y openjdk-18-jdk

    2. 安装完后可以查看下Java的版本

      orangepi@orangepi:~$ java --version

      openjdk 18-ea 2022-03-22

      OpenJDK Runtime Environment (build 18-ea+36-Ubuntu-1)

      OpenJDK 64-Bit Server VM (build 18-ea+36-Ubuntu-1, mixed mode, sharing)

    3. 编写Java版本的hello_world.java

      orangepi@orangepi:~$ vim hello_world.java

      public class hello_world

      {

      public static void main(String[] args)

      {

      System.out.println("Hello World!");

      }

      }

    4. 然后编译运行hello_world.java

      orangepi@orangepi:~$ javac hello_world.java

      orangepi@orangepi:~$ java hello_world

      Hello World!

QT的安装方法

  1. 使用下面的脚本可以安装QT5和QT Creator

    orangepi@orangepi:~$ install_qt.sh

  2. 安装完后会自动打印QT的版本号

    1. Ubuntu20.04自带的qt版本为5.12.8

      orangepi@orangepi:~$ install_qt.sh

      ......

      QMake version 3.1

      Using Qt version 5.12.8 in /usr/lib/aarch64-linux-gnu

    2. Ubuntu22.04自带的QT版本为5.15.3

      orangepi@orangepi:~$ install_qt.sh

      ......

      QMake version 3.1

      Using Qt version 5.15.3 in /usr/lib/aarch64-linux-gnu

    3. Debian11自带的QT版本为5.15.2

      orangepi@orangepi:~$ install_qt.sh

      ......

      QMake version 3.1

      Using Qt version 5.15.2 in /usr/lib/aarch64-linux-gnu

    4. Debian12自带的QT版本为5.15.8

      orangepi@orangepi:~$ install_qt.sh

      ......

      QMake version 3.1

      Using Qt version 5.15.8 in /usr/lib/aarch64-linux-gnu

  3. 然后在Applications中就可以看到QT Creator的启动图标

    576x270px

    也可以使用下面的命令打开QT Creator

    orangepi@orangepi:~$ qtcreator

    在QT和QT应用的启动过程中,如果提示下面的错误,请直接忽略,此错误对应用的运行不会有影响。

    libGL error: failed to create dri screen

    libGL error: failed to load driver: rockchip

    libGL error: failed to create dri screen

    libGL error: failed to load driver: rockchip

  4. QT Creator打开后的界面如下所示

    418x222px

  5. QT Creator的版本如下所示

    1. QT Creator在Ubuntu20.04中的默认版本如下所示

      419x224px

    2. QT Creator在Ubuntu22.04中的默认版本如下所示

      443x237px

    3. QT Creator在Debian11中的默认版本如下所示

      444x238px

    4. QT Creator在Debian12中的默认版本如下所示

      449x277px

  6. 然后设置下QT

    1. 首先打开Help->About Plugins...

      573x164px

    2. 然后去掉ClangCodeModel的那个勾

      408x254px

    3. 设置完后需要重启下QT Creator

    4. 然后确保QT Creator使用的GCC编译器,如果默认为Clang,请修改为GCC

      Debian12请跳过这步。

      576x315px

      575x307px

  7. 然后就可以打开一个示例代码

    575x312px

  8. 点击示例代码后会自动打开对应的说明文档,可以仔细看下其中的使用说明

    576x218px

  9. 然后点击下Configure Project

    575x304px

  10. 然后点击左下角的绿色三角形编译运行下示例代码

    575x312px

  11. 等待一段时间后,会弹出下图所示的界面,此时就说明QT能正常编译运行

    576x308px

  12. 参考资料

    https://wiki.qt.io/Install_Qt_5_on_Ubuntu

    https://download.qt.io/archive/qtcreator

    https://download.qt.io/archive/qt

ROS安装方法

Ubuntu20.04安装ROS 1 Noetic的方法

  1. ROS 1当前活跃的版本如下所示,推荐版本为Noetic Ninjemys

345x235px

576x210px

http://docs.ros.org

https://wiki.ros.org/Distributions

  1. ROS 1 Noetic Ninjemys官方安装文档链接如下所示:

    http://wiki.ros.org/noetic/Installation/Ubuntu

  2. ROS Noetic Ninjemys官方安装文档中Ubuntu推荐使用Ubuntu20.04,所以请确保开发板使用的系统为Ubuntu20.04桌面版系统

    http://wiki.ros.org/noetic/Installation

    312x176px

  3. 然后使用下面的脚本安装ros1

    orangepi@orangepi3b:~$ install_ros.sh ros1

  4. 使用ROS工具前,首先需要初始化下rosdep,然后编译源码时就能快速的安装一些系统依赖和一些ROS中的核心组件

注意,运行下面的命令需要确保开发板能正常访问github,否则会由于网络问题而报错。

install_ros.sh脚本会尝试修改/etc/hosts并自动运行下面的命令。但是这种方法无法保证每次都能正常访问github,如果install_ros.sh安装完ros1后有提示下面的错误,请自己想其它办法让开发板的Linux系统能正常访问github,然后再手动运行下面的命令。

https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml

Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml

ERROR: error loading sources list:

The read operation timed out

orangepi@orangepi:~$ source /opt/ros/noetic/setup.bash

orangepi@orangepi:~$ sudo rosdep init

Wrote /etc/ros/rosdep/sources.list.d/20-default.list

Recommended: please run

rosdep update

orangepi@orangepi:~$ rosdep update

reading in sources list data from /etc/ros/rosdep/sources.list.d

Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml

Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml

Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml

Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml

Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml

Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml

Skip end-of-life distro "ardent"

Skip end-of-life distro "bouncy"

Skip end-of-life distro "crystal"

Skip end-of-life distro "dashing"

Skip end-of-life distro "eloquent"

Add distro "foxy"

Add distro "galactic"

Skip end-of-life distro "groovy"

Add distro "humble"

Skip end-of-life distro "hydro"

Skip end-of-life distro "indigo"

Skip end-of-life distro "jade"

Skip end-of-life distro "kinetic"

Skip end-of-life distro "lunar"

Add distro "melodic"

Add distro "noetic"

Add distro "rolling"

updated cache in /home/orangepi/.ros/rosdep/sources.cache

  1. 然后在桌面中打开一个命令行终端窗口,再使用test_ros.sh脚本可以启动一个小海龟的例程来测试下ROS是否能正常使用

    orangepi@orangepi:~$ test_ros.sh

  2. 运行完test_ros.sh脚本后,会弹出下图所示的一个小海龟

    576x276px

  3. 然后请保持刚才打开终端窗口在最上面

576x275px

  1. 此时按下键盘上的方向按键就可以控制小海龟上下左右移动了

    575x296px

Ubuntu20.04安装ROS 2 Galactic的方法

  1. ROS 2当前活跃的版本如下所示,推荐版本为Galactic Geochelone

    576x271px

    575x265px

    http://docs.ros.org

    http://docs.ros.org/en/galactic/Releases.html

  2. ROS 2 Galactic Geochelone官方安装文档链接如下所示:

    docs.ros.org/en/galactic/Installation.html

    http://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html

  3. ROS 2 Galactic Geochelone官方安装文档中Ubuntu Linux推荐使用Ubuntu20.04,所以请确保开发板使用的系统为Ubuntu20.04桌面版系统。安装ROS 2有几种方法,下面演示下通过Debian packages的方式来安装ROS 2 Galactic Geochelone

  4. 使用install_ros.sh脚本可以安装ros2

    orangepi@orangepi:~$ install_ros.sh ros2

  5. install_ros.sh脚本安装完ros2后会自动运行下ros2 -h命令,如果能看到下面的打印,说明ros2安装完成

    usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...

    ros2 is an extensible command-line tool for ROS 2.

    optional arguments:

    -h, --help show this help message and exit

    Commands:

    action Various action related sub-commands

    bag Various rosbag related sub-commands

    component Various component related sub-commands

    daemon Various daemon related sub-commands

    doctor Check ROS setup and other potential issues

    interface Show information about ROS interfaces

    launch Run a launch file

    lifecycle Various lifecycle related sub-commands

    multicast Various multicast related sub-commands

    node Various node related sub-commands

    param Various param related sub-commands

    pkg Various package related sub-commands

    run Run a package specific executable

    security Various security related sub-commands

    service Various service related sub-commands

    topic Various topic related sub-commands

    wtf Use `wtf` as alias to `doctor`

    Call `ros2 <command> -h` for more detailed usage.

  6. 然后可以使用 test_ros.sh脚本测试下ROS 2是否安装成功,如果能看到下面的打印,说明ROS 2能正常运行

    orangepi@orangepi3b:~$ test_ros.sh

    [INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'

    [INFO] [1671174101.235661048] [listener]: I heard: [Hello World: 1]

    [INFO] [1671174102.199572327] [talker]: Publishing: 'Hello World: 2'

    [INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]

    [INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'

    [INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]

  7. 运行下面的命令可以打开rviz2

    orangepi@orangepi:~$ source /opt/ros/galactic/setup.bash

    orangepi@orangepi:~$ ros2 run rviz2 rviz2

    1

  8. ROS的使用方法请参考下ROS 2的文档

    http://docs.ros.org/en/galactic/Tutorials.html

Ubuntu22.04安装ROS 2 Humble的方法

  1. 使用install_ros.sh脚本可以安装ros2

    orangepi@orangepi:~$ install_ros.sh ros2

  2. install_ros.sh脚本安装完ros2后会自动运行下ros2 -h命令,如果能看到下面的打印,说明ros2安装完成

    usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...

    ros2 is an extensible command-line tool for ROS 2.

    optional arguments:

    -h, --help show this help message and exit

    Commands:

    action Various action related sub-commands

    bag Various rosbag related sub-commands

    component Various component related sub-commands

    daemon Various daemon related sub-commands

    doctor Check ROS setup and other potential issues

    interface Show information about ROS interfaces

    launch Run a launch file

    lifecycle Various lifecycle related sub-commands

    multicast Various multicast related sub-commands

    node Various node related sub-commands

    param Various param related sub-commands

    pkg Various package related sub-commands

    run Run a package specific executable

    security Various security related sub-commands

    service Various service related sub-commands

    topic Various topic related sub-commands

    wtf Use `wtf` as alias to `doctor`

    Call `ros2 <command> -h` for more detailed usage.

  3. 然后可以使用 test_ros.sh脚本测试下ROS 2是否安装成功,如果能看到下面的打印,说明ROS 2能正常运行

    orangepi@orangepi3b:~$ test_ros.sh

    [INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'

    [INFO] [1671174101.235661048] [listener]: I heard: [Hello World: 1]

    [INFO] [1671174102.199572327] [talker]: Publishing: 'Hello World: 2'

    [INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]

    [INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'

    [INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]

  4. 运行下面的命令可以打开rviz2

    orangepi@orangepi:~$ source /opt/ros/humble/setup.bash

    orangepi@orangepi:~$ ros2 run rviz2 rviz2

    1

  5. 参考文档

    http://docs.ros.org/en/humble/index.html

    http://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html

安装内核头文件的方法

  1. OPi发布的Linux镜像默认自带了内核头文件的deb包,存放的位置为/opt/

    orangepi@orangepi:~$ ls /opt/linux-headers*

    /opt/linux-headers-legacy-rockchip-rk356x_x.x.x_arm64.deb

  2. 使用下面的命令可以安装内核头文件的deb包

    内核头文件deb包的名字需要替换为实际的名字,请不要照抄。

    orangepi@orangepi:~$ sudo dpkg -i /opt/linux-headers-legacy-rockchip-rk356x_1.x.x_arm64.deb

  3. 安装完后在/usr/src下就能看到内核头文件所在的文件夹

    orangepi@orangepi:~$ ls /usr/src

    linux-headers-5.10.160-rockchip-rk356x

  4. 然后可以编写一个hello内核模块测试下内核头文件

    1. 首先编写hello内核模块的代码,如下所示:

      orangepi@orangepi:~$ vim hello.c

      #include <linux/init.h>

      #include <linux/module.h>

      static int hello_init(void)

      {

      printk("Hello Orange Pi -- init\n");

      return 0;

      }

      static void hello_exit(void)

      {

      printk("Hello Orange Pi -- exit\n");

      return;

      }

      module_init(hello_init);

      module_exit(hello_exit);

      MODULE_LICENSE("GPL");

    2. 然后编写编译hello内核模块的Makefile文件,如下所示:

      orangepi@orangepi:~$ vim Makefile

      ifneq ($(KERNELRELEASE),)

      obj-m:=hello.o

      else

      KDIR :=/lib/modules/$(shell uname -r)/build

      PWD :=$(shell pwd)

      all:

      make -C $(KDIR) M=$(PWD) modules

      clean:

      rm -f *.ko *.o *.mod.o *.mod *.symvers *.cmd *.mod.c *.order

      endif

    3. 然后使用make命令编译hello内核模块,编译过程的输出如下所示:

      如果自己复制的代码这里编译如果有问题,请去官方工具中下载源码然后上传到开发板的Linux系统中测试。

      253x41px

      orangepi@orangepi:~$ make

      make -C /lib/modules/5.10.160-rockchip-35xx/build M=/home/orangepi modules

      make[1]: Entering directory '/usr/src/linux-headers-5.10.160-rockchip-rk35xx'

      CC [M] /home/orangepi/hello.o

      MODPOST /home/orangepi/Module.symvers

      CC [M] /home/orangepi/hello.mod.o

      LD [M] /home/orangepi/hello.ko

      make[1]: Leaving directory '/usr/src/linux-headers-5.10.160-rockchip-rk35xx'

    4. 编译完后会生成hello.ko内核模块

      orangepi@orangepi:~$ ls *.ko

      hello.ko

    5. 使用insmod命令可以将hello.ko内核模块插入内核中

      orangepi@orangepi:~$ sudo insmod hello.ko

    6. 然后使用demsg命令可以查看下hello.ko内核模块的输出,如果能看到下面的输出说明hello.ko内核模块加载正确

      orangepi@orangepi:~$ dmesg | grep "Hello"

      [ 2871.893988] Hello Orange Pi -- init

    7. 使用rmmod命令可以卸载hello.ko内核模块

      orangepi@orangepi:~$ sudo rmmod hello

      orangepi@orangepi:~$ dmesg | grep "Hello"

      [ 2871.893988] Hello Orange Pi -- init

      [ 3173.800892] Hello Orange Pi -- exit

树莓派5寸屏幕的使用

树莓派5寸屏幕的组装方法

  1. 首先准备需要的配件

    1. 树莓派5寸MIPI LCD显示屏+触摸屏

      306x219px

    2. 15pin MIPI排线

      276x111px

  2. 然后将15pin MIPI排线按照下图所示的方式连接到树莓派5寸屏幕上(注意绝缘面的朝向)

    294x160px

  3. 最后连接到Orange Pi 3B开发板的LCD接口上

    333x199px

打开树莓派5寸屏幕配置的方法

  1. Linux镜像默认是没有打开树莓派5寸屏幕的配置的,如果需要使用树莓派5寸屏幕,需要手动打开才行。

  2. 打开mipi lcd配置的步骤如下所示:

    1. 首先运行下orangepi-config,普通用户记得加sudo权限

      orangepi@orangepi:~$ sudo orangepi-config

    2. 然后选择System

      575x272px

    3. 然后选择Hardware

      576x266px

    4. 然后使用键盘的方向键定位到raspi-7inch-touchscreen,再使用空格选中

      408x310px

    5. 然后选择<Save>保存

      404x133px

    6. 然后选择<Back>

      397x151px

    7. 然后选择<Reboot>重启系统使配置生效

      331x154px

      上面的设置最终会在/boot/orangepiEnv.txt中加入overlays=raspi-7inch-touchscreen这句配置。设置完后可以先检查下。如果不存在这句配置,那么设置就是有问题。

      如果觉得使用orangepi-config比较麻烦,也可以使用vim编辑器打开/boot/orangepiEnv.txt,然后加入overlays=raspi-7inch-touchscreen 这句配置也是可以。

      orangepi@orangepi:~$ cat /boot/orangepiEnv.txt | grep “raspi”

      overlays=raspi-7inch-touchscreen #示例配置

  3. 启动后可以看到lcd屏幕的显示如下所示:

381x262px

服务器版镜像旋转显示方向的方法

  1. /boot/orangepiEnv.txt中加入extraargs=fbcon=rotate:要旋转的方向这行配置就可以设置服务器版本的Linux系统显示的方向,其中fbcon=rotate:后面的数字可以设置为:

    1. 0: 正常屏(默认为横屏)

    2. 1: 顺时钟转90度

    3. 2: 翻转180度

    4. 3: 顺时钟转270度

      orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt

      overlays=lcd1

      extraargs=cma=64M fbcon=rotate:3

      注意,/boot/orangepiEnv.txt中如果默认有extraargs=cma=64M这行配置,fbcon=rotate:3这个配置添加到extraargs=cma=64M的后面即可(需要用空格隔开)。

  2. 然后重启Linux系统就能看到lcd屏幕显示的方向已经旋转了

桌面版镜像旋转显示和触摸方向的方法

  1. 首先在Linux系统中打开Display设置

    298x206px

  2. 然后在Rotation中选择想要旋转的方向

    1. None: 不旋转

    2. Left: 向左旋转90度

    3. Inverted: 上下翻转,相当于旋转180度

    4. Right: 向右旋转90度

      286x180px

  3. 然后点击Apply

    330x207px

  4. 然后选择Keep this configuration

    374x210px

  5. 此时屏幕显示就已旋转完成,然后关闭掉Display程序即可

  6. 上面的步骤只会选择显示方向,并不会旋转触摸的方向,使用set_lcd_rotate.sh脚本可以旋转下触摸的方向,此脚本设置完后会自动重启,然后就可以测试触摸是否已经能正常使用了

    1. None: 不旋转

      orangepi@orangepi:~$ set_lcd_rotate.sh none

    2. Left: 向左旋转90度

      orangepi@orangepi:~$ set_lcd_rotate.sh left

    3. Inverted: 上下翻转,相当于旋转180度

      orangepi@orangepi:~$ set_lcd_rotate.sh inverted

    4. Right: 向右旋转90度

      orangepi@orangepi:~$ set_lcd_rotate.sh right

      set_lcd_rotate.sh脚本主要做四件事:

  1. 旋转framebuffer显示的方向

  2. 旋转触摸的方向

  3. 关闭开机logo

  4. 重启系统

    旋转触摸的方向是通过在/usr/share/X11/xorg.conf.d/40-libinput.conf中加入Option "TransformationMatrix" "x x x x x x x x x"这行配置来实现的。其中"x x x x x x x x x"不同的方向配置不同。

  1. 触摸旋转参考资料

    https://wiki.ubuntu.com/X/InputCoordinateTransformation

开关机logo使用说明

  1. 开关机logo默认只在桌面版的系统中才会显示

  2. /boot/orangepiEnv.txt中设置bootlogo变量为false可以关闭开关机logo

    orangepi@orangepi:~$ vim /boot/orangepiEnv.txt

    verbosity=1

    bootlogo=false

  3. /boot/orangepiEnv.txt中设置bootlogo变量为true可以开启开关机logo

    orangepi@orangepi:~$ vim /boot/orangepiEnv.txt

    verbosity=1

    bootlogo=true

  4. 开机logo图片在Linux系统中的位置为

    /usr/share/plymouth/themes/orangepi/watermark.png

  5. 替换开机logo图片后需要运行下命令才能生效

    orangepi@orangepi:~$ sudo update-initramfs -u

ZFS文件系统的使用方法

最新版本的Ubuntu20.04、Ubuntu22.04、Debian11和Debian12桌面版系统中已经预装了zfs,直接使用即可。

在Ubuntu20.04、Ubuntu22.04桌面版系统中预装的zfs版本是2.1.6。

在Debian11和Debian12桌面版系统中预装的zfs版本是2.1.11。

系统启动后,首先请确认下zfs的内核模块有没有被加载,如果使用lsmod命令可以看到zfs相关的内容,就说明系统已经预装了zfs。

orangepi@orangepi:~$ lsmod | grep "zfs"

zfs 2801664 0

zunicode 327680 1 zfs

zzstd 471040 1 zfs

zlua 139264 1 zfs

zcommon 69632 1 zfs

znvpair 61440 2 zfs,zcommon

zavl 16384 1 zfs

icp 221184 1 zfs

spl 77824 6 zfs,icp,zzstd,znvpair,zcommon,zavl

安装ZFS的方法

安装zfs前,请先确保使用的Linux镜像为最新版本。另外,如果系统中已经安装了zfs,就无需重复安装了。

安装zfs前首先需要安装内核头文件,安装内核头文件的方法请参考安装内核头文件的方法小节的说明。

在Ubuntu20.04、Ubuntu22.04和Debian11系统中,zfs是无法通过apt直接安装的,这是因为默认的apt源中zfs版本低于2.1.6,存在和rk Linux5.10内核不兼容的问题,这个问题在zfs的2.1.6及以后的版本中得到了修复。

为了解决这个问题,我们提供了能正常安装的zfs的deb包,可以从开发板的官方工具中下载到。打开官方工具,然后进入Ubuntu和Debian系统使用的zfs相关的deb包文件夹后,可以看到Ubuntu20.04、Ubuntu22.04和Debian11三种类型的deb包,请下载需要的版本。

232x136px

下载完对应版本的zfs deb包后,请将它们上传到开发板的Linux系统中。上传方法请参考上传文件到开发板Linux系统中的方法小节的说明。

上传完成后,再在开发板Linux系统的命令行中使用cd命令进入deb包的目录,然后使用下面的命令就可以安装zfs的deb包。

orangepi@orangepi:~$ sudo apt install ./*.deb

安装完成后,使用下面的命令可以看到zfs相关的内核模块:

orangepi@orangepi:~$ ls /lib/modules/5.10.160-rockchip-rk356x/updates/dkms/

icp.ko spl.ko zavl.ko zcommon.ko zfs.ko zlua.ko znvpair.ko zunicode.ko zzstd.ko

然后重启下Linux系统就能看到zfs内核模块会自动加载了:

orangepi@orangepi:~$ lsmod | grep "zfs"

zfs 2801664 0

zunicode 327680 1 zfs

zzstd 471040 1 zfs

zlua 139264 1 zfs

zcommon 69632 1 zfs

znvpair 61440 2 zfs,zcommon

zavl 16384 1 zfs

icp 221184 1 zfs

spl 77824 6 zfs,icp,zzstd,znvpair,zcommon,zavl

在Debian12中,zfs的默认版本为2.1.11,所以我们可以通过下面的命令直接安装zfs,再次提醒下,安装前需要确保系统已安装内核头文件的deb包。

orangepi@orangepi:~$ sudo apt install -y zfsutils-linux zfs-dkms

创建ZFS池的方法

ZFS是基于存储池的,我们可以将多个物理存储设备添加到池中,然后从这个池中分配存储空间。

下面的内容是基于开发板接了一个NVMe SSD和一个U盘来演示的。

  1. 首先我们可以通过lsblk命令查看下开发板所有的存储设备,当前开发板接了一个NVMe SSD以及一个U盘,输出如下所示:

    379x227px

  2. 然后输入下面的命令可以创建一个ZFS池,包含NVMe SSD和U盘两个存储设备

    orangepi@orangepi:~$ sudo zpool create -f pool1 /dev/nvme0n1 /dev/sda

  3. 然后使用zpool list命令可以看到系统已经创建了一个名为pool1的ZFS池,并且ZFS池pool1的大小是NVME SSD的大小加上U盘的大小

    576x37px

  4. 然后执行df -h可以看到pool1被挂载到了/pool1目录

    orangepi@orangepi:~$ df -h

    Filesystem Size Used Avail Use% Mounted on

    tmpfs 1.6G 18M 1.6G 2% /run

    /dev/mmcblk0p2 29G 6.0G 22G 22% /

    tmpfs 7.7G 46M 7.7G 1% /dev/shm

    tmpfs 5.0M 4.0K 5.0M 1% /run/lock

    tmpfs 7.7G 944K 7.7G 1% /tmp

    /dev/mmcblk0p1 1022M 115M 908M 12% /boot

    /dev/zram1 188M 4.5M 169M 3% /var/log

    tmpfs 1.6G 80K 1.6G 1% /run/user/1000

    pool1 489G 9.3M 489G 1% /pool1

  5. 使用下面的命令可以看到pool1的文件系统类型为zfs

    orangepi@orangepi:~$ mount | grep pool1

    pool1 on /pool1 type zfs (rw,xattr,noacl)

  6. 然后我们可以测试下拷贝一个文件到ZFS池中

    orangepi@orangepi:~$ sudo cp -v /usr/local/test.mp4 /pool1/

    '/usr/local/test.mp4' -> '/pool1/test.mp4'

测试ZFS的数据去重功能

  1. ZFS的数据去重功能默认是关闭的,我们需要执行下面的命令打开

    orangepi@orangepi:~$ sudo zfs set dedup=on pool1

  2. 然后做一个简单的测试,首先进入pool1中,再执行下面的命令生成1个1G大小的随机文件

    orangepi@orangepi:~$ cd /pool1/

    root@orangepi:/pool1$ sudo dd if=/dev/urandom of=test.1g bs=1M count=1024

    1024+0 records in

    1024+0 records out

    1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.04367 s, 213 MB/s

  3. 然后使用下面的命令将1G大小的随机文件拷贝1000份

root@orangepi:/pool1$ for ((i=0; i<1000; i++)); do sudo cp test.1g $i.test.1g; done

  1. 然后用du -lh可以看到目前池中总共有1002G的数据,但实际上ZFS池的大小只有504GB(SSD+U盘的总容量),是装不下那么大的数据的

root@orangepi:/pool1$ du -lh

1002G

  1. 然后用zpool list命令可以看到实际只占用了1.01G,因为这1001个文件都是重复的,说明数据去重功能有效。

    576x36px

测试ZFS的数据压缩功能

  1. 因为存储的数据不同,压缩节省的磁盘空间也会有所不同,所以我们选择压缩比较大的纯文本文件来进行压缩测试,执行下面的命令将/var/log//etc/目录打包成tar包

orangepi@orangepi:~$ cd /pool1/

root@orangepi:/pool1$ sudo tar -cf text.tar /var/log/ /etc/

  1. 然后通过ls -lh命令可以看到的文件大小以及在ZFS池中占用的空间都是27M

    576x90px

  2. 然后我们在ZFS池pool1中启用压缩功能

    root@orangepi:/pool1$ sudo zfs set compression=lz4 pool1

  3. 然后再次执行下面的命令将/var/log//etc/目录打包成tar包

root@orangepi:/pool1$ sudo tar -cf text.tar /var/log/ /etc/

  1. 这时可以看到text.tar文件大小还是27M,但是在ZFS池中只占用9.47M的空间,说明文件被压缩了

576x79px

关机和重启开发板的方法

  1. 在Linux系统运行的过程中,如果直接拔掉Type-C电源断电,可能会导致文件系统丢失某些数据或者损坏,所以在断电前请先使用poweroff命令关闭开发板的Linux系统,然后再拔掉电源。

    orangepi@orangepi:~$ sudo poweroff

  2. 另外开发板配有开关机按键,还可以短按开发板上的开关机按键来关机。

    294x80px

注意,Linux桌面版系统按下开关机按键后会弹出下图所示的确认框,需要点击Shut Down选项后才会关机。

207x193px

  1. 关机后短按开发板上的开关机按键即可开机。

    294x80px

  2. 重启Linux系统的命令为

    orangepi@orangepi:~$ sudo reboot

Linux SDK——orangepi-build使用说明

编译系统需求

我们可以在x64的电脑中交叉编译开发板的Linux镜像,也可以在开发板的Ubuntu22.04系统中来编译开发板的Linux镜像,请根据自己的喜好二选一。

如果是在开发板的Ubuntu22.04系统中使用orangepi-build来编译Linux镜像,请做好散热(尤其是SSD启动时)。如果散热没做好,容易出现文件系统跑飞的错误。

使用开发板的Ubuntu22.04系统编译

  1. Linux SDK,即orangepi-build,支持在开发板的Ubuntu 22.04的上运行(其它系统没有测试过),所以下载orangepi-build前,请首先确保开发板已安装的Ubuntu版本是Ubuntu 22.04。查看开发板已安装的Ubuntu版本的命令如下所示,如果Release字段显示的不是22.04,说明当前使用的Ubuntu版本不符合要求,请更换系统后再进行下面的操作。

    orangepi@orangepi:~$ lsb_release -a

    No LSB modules are available.

    Distributor ID: Ubuntu

    Description: Ubuntu 22.04.1 LTS

    Release: 22.04

    Codename: jammy

  2. 由于内核和U-boot等源码都是存放在GitHub上的,所以编译镜像的时候请确保开发板能正常从GitHub下载代码,这点是非常重要的。

使用x64的Ubuntu22.04电脑编译

  1. Linux SDK,即orangepi-build,支持在安装有Ubuntu 22.04的电脑上运行,所以下载orangepi-build前,请首先确保自己电脑已安装的Ubuntu版本是Ubuntu 22.04。查看电脑已安装的Ubuntu版本的命令如下所示,如果Release字段显示的不是22.04,说明当前使用的Ubuntu版本不符合要求,请更换系统后再进行下面的操作。

    test@test:~$ lsb_release -a

    No LSB modules are available.

    Distributor ID: Ubuntu

    Description: Ubuntu 22.04 LTS

    Release: 22.04

    Codename: jammy

  2. 如果电脑安装的是Windows系统,没有安装有Ubuntu 22.04的电脑,可以考虑使用VirtualBox或者VMware来在Windows系统中安装一个Ubuntu 22.04虚拟机。但是请注意,不要在WSL虚拟机上编译orangepi-build,因为orangepi-build没有在WSL虚拟机中测试过,所以无法确保能正常在WSL中使用orangepi-build。

  3. Ubuntu 22.04 amd64版本的安装镜像下载地址为:

    https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/22.04/ubuntu-22.04-desktop-amd64.iso

    或者

    https://repo.huaweicloud.com/ubuntu-releases/22.04/ubuntu-22.04.1-desktop-amd64.iso

  4. 在电脑中或者虚拟机中安装完Ubuntu 22.04后,请先设置Ubuntu 22.04的软件源为清华源,不然后面安装软件的时候很容易由于网络原因而出错

    1. 替换清华源的方法参考这个网页的说明即可

https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

  1. 注意Ubuntu版本需要切换到22.04

    576x241px

  2. 需要替换的/etc/apt/sources.list文件的内容为

    test@test:~$ sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

    test@test:~$ sudo vim /etc/apt/sources.list

    # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

    # 预发布软件源,不建议启用

    # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

  3. 替换完后需要更新下包信息,并确保没有报错

    test@test:~$ sudo apt update

  4. 另外,由于内核和U-boot等源码都是存放在GitHub上的,所以编译镜像的时候请确保电脑能正常从GitHub下载代码,这点是非常重要的。

获取Linux sdk的源码

从github下载orangepi-build

  1. Linux sdk其实指的就是orangepi-build这套代码,orangepi-build是基于armbian build编译系统修改而来的,使用orangepi-build可以编译出多个版本的Linux镜像。首先下载orangepi-build的代码,命令如下所示:

test@test:~$ sudo apt-get update

test@test:~$ sudo apt-get install -y git

test@test:~$ git clone https://github.com/orangepi-xunlong/orangepi-build.git -b next

注意,Orange Pi 3B开发板是需要下载orangepi-build的next分支源码的,上面的git clone命令需要指定orangepi-build源码的分支为next。

576x298px

通过git clone命令下载orangepi-build的代码是不需要输入github账号的用户名和密码的(下载本手册中的其他代码也是一样的),如果如输入git clone命令后Ubuntu PC提示需要输入github账号的用户名和密码,一般都是git clone后面的orangepi-build仓库的地址输入错误了,请仔细检查命令拼写是否有错误,而不是以为我们这里忘了提供github账号的用户名和密码。

  1. 开发板当前使用的u-boot和Linux内核版本如下所示
分支 u-boot版本 Linux内核版本
legacy u-boot 2017.09 Linux5.10

这里所说的分支和orangepi-build源代码的分支不是同一个东西,请不要搞混了。此分支主要是用来区分不同内核源码版本的。

目前RK提供的Linux5.10 bsp内核我们定义为legacy分支。如果以后支持主线内核了,就会添加一个current分支。

  1. orangepi-build下载完后会包含下面的文件和文件夹

    1. build.sh: 编译启动脚本

    2. external: > 包含编译镜像需要用的配置文件、特定的脚本以及部分程序的源码等

    3. LICENSE: GPL 2许可证文件

    4. README.md: orangepi-build说明文件

    5. scripts: 编译Linux镜像的通用脚本

      test@test:~/orangepi-build$ ls

      build.sh external LICENSE README.md scripts

      如果是从github下载的orangepi-build的代码,下载完后你可能会发现orangepi-build中并没有包含u-boot和Linux内核的源码,也没有编译u-boot和Linux内核需要用到交叉编译工具链,这是正常的,因为这些东西都存放在其它单独的github仓库或者某些服务器上了(下文会详述其地址)。orangepi-build在脚本和配置文件中会指定u-boot、Linux内核和交叉编译工具链的地址,运行orangepi-build时,当其发现本地没有这些东西,会自动去相应的地方下载的。

下载交叉编译工具链

只有在x64的电脑中使用orangepi-build编译镜像才会下载交叉编译工具链。在开发板的Ubuntu22.04中编译开发板的Linux镜像是不会下载交叉编译工具链的,此时orangepi-build/toolchains会是一个空文件夹。

  1. orangepi-build第一次运行的时候会自动下载交叉编译工具链放在toolchains文件夹中,每次运行orangepi-build的build.sh脚本后,都会检查toolchains中的交叉编译工具链是否都存在,如果不存在则会重新开始下载,如果存在则直接使用,不会重复下载。

  2. 交叉编译工具链在中国境内的镜像网址为清华大学的开源软件镜像站

    https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/

  3. toolchains下载完后会包含多个版本的交叉编译工具链,开发板只会使用其中的两个

    test@test:~/orangepi-build$ ls toolchains/

    gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu

    gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf

    gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu

    gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf

    gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi

    gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf

    gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu

    gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi

    gcc-linaro-aarch64-none-elf-4.8-2013.11_linux

    gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux

    gcc-linaro-arm-none-eabi-4.8-2014.04_linux

  4. 编译Linux内核源码使用的交叉编译工具链为

    1. Linux5.10

      gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu

  5. 编译u-boot源码使用的交叉编译工具链为

    1. v2017.09

      gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu

orangepi-build完整目录结构说明

  1. orangepi-build仓库下载完后并不包含Linux内核、u-boot的源码以及交叉编译工具链,Linux内核和u-boot的源码存放在独立的git仓库中

    1. Linux内核源码存放的git仓库如下所示:

      https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-5.10-rk35xx

    2. u-boot源码存放的git仓库如下所示:

      https://github.com/orangepi-xunlong/u-boot-orangepi/tree/v2017.09-rk3588

  2. orangepi-build第一次运行的时候会去下载交叉编译工具链、u-boot和Linux内核源码,成功编译完一次Linux镜像后在orangepi-build中可以看到的文件和文件夹有

    1. build.sh: 编译启动脚本

    2. external: > 包含编译镜像需要用的配置文件、特定功能的脚本以及部分程序的源码,编译镜像过程中缓存的rootfs压缩包也存放在external中

    3. kernel: > 存放Linux内核的源码,里面名为orange-pi-5.10-rk35xx的文件夹存放的就是RK3588/RK3588S/RK3566系列开发板legacy分支的内核源码,内核源码的文件夹的名字请不要手动修改,如果修改了,编译系统运行时会重新下载内核源码

    4. LICENSE: GPL 2许可证文件

    5. README.md: orangepi-build说明文件

    6. output: > 存放编译生成的u-boot、Linux等deb包、编译日志以及编译生成的镜像等文件

    7. scripts: 编译Linux镜像的通用脚本

    8. toolchains: 存放交叉编译工具链

    9. u-boot: > 存放u-boot的源码,里面名为v2017.09-rk3588的文件夹存放的就是RK3588/RK3588S/RK3566系列开发板legacy分支的u-boot源码,u-boot源码的文件夹的名字请不要手动修改,如果修改了,编译系统运行时会重新下载u-boot源码

    10. userpatches: 存放编译脚本需要用到的配置文件

      test@test:~/orangepi-build$ ls

      build.sh external kernel LICENSE output README.md scripts toolchains u-boot userpatches

编译u-boot

  1. 运行build.sh脚本,记得加sudo权限

    test@test:~/orangepi-build$ sudo ./build.sh

  2. 选择U-boot package,然后回车

  3. 接着选择开发板的型号

  4. 然后就会开始编译u-boot,编译时提示的部分信息说明如下

    1. u-boot源码的版本

      [ o.k. ] Compiling u-boot [ v2017.09 ]

    2. 交叉编译工具链的版本

      [ o.k. ] Compiler version [ aarch64-linux-gnu-gcc 7.4.1 ]

    3. 编译生成的u-boot deb包的路径

      [ o.k. ] Target directory [ orangepi-build/output/debs/u-boot ]

    4. 编译生成的u-boot deb包的包名

      [ o.k. ] File name [ linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb ]

    5. 编译使用的时间

      [ o.k. ] Runtime [ 1 min ]

    6. 重复编译u-boot的命令,使用下面的命令无需通过图形界面选择,可以直接开始编译u-boot

      [ o.k. ] Repeat Build Options [ sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=u-boot KERNEL_CONFIGURE=no ]

  5. 查看编译生成的u-boot deb包

    test@test:~/orangepi-build$ ls output/debs/u-boot/

    linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb

  6. 生成的u-boot的deb包包含的文件如下所示

    1. 使用下面的命令可以解压deb包

      test@test:~/orangepi-build$ cd output/debs/u-boot

      test@test:~/orangepi_build/output/debs/u-boot$ $ dpkg -x \

      linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb . (注意命令最后有个”.”)

      test@test:~/orangepi_build/output/debs/u-boot$ ls

      linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb usr

    2. 解压后的文件如下所示

      test@test:~/orangepi-build/output/debs/u-boot$ tree usr

      usr

      └── lib

      ├── linux-u-boot-legacy-orangepi3b_1.0.0_arm64

      │   ├── idbloader.img

      │   ├── rkspi_loader.img

      │   └── u-boot.itb

      └── u-boot

      ├── LICENSE

      ├── orangepi-3b-rk3566_defconfig

      └── platform_install.sh

      3 directories, 6 files

  7. orangepi-bulid编译系统编译u-boot源码时首先会将u-boot的源码和github服务器的u-boot源码进行同步,所以如果想修改u-boot的源码,首先需要关闭源码的下载更新功能(需要完整编译过一次u-boot后才能关闭这个功能,否则会提示找不到u-boot的源码,如果是从百度云盘下载的源码压缩包,则没有这个问题,因为u-boot的源码都已缓存好了),否则所作的修改都会被还原,方法如下:

    设置userpatches/config-default.conf中的IGNORE_UPDATES变量为”yes”

    test@test:~/orangepi-build$ vim userpatches/config-default.conf

    IGNORE_UPDATES="yes"

  8. 调试u-boot代码时,可以使用下面的方法来更新Linux镜像中的u-boot进行测试

    1. 将编译好的u-boot的deb包上传到开发板的Linux系统中

      test@test:~/orangepi-build$ cd output/debs/u-boot

      test@test:~/orangepi_build/output/debs/u-boot$ scp \

      linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb root@192.168.1.xxx:/root

    2. 然后登录到开发板,卸载已安装的u-boot的deb包

      root@orangepi:~# apt purge -y linux-u-boot-orangepi3b-legacy

    3. 再安装刚才上传的新的u-boot的deb包

      root@orangepi:~# dpkg -i linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb

    4. 然后运行 nand-sata-install脚本

      root@orangepi:~# nand-sata-install

    5. 然后选择5 Install/Update the bootloader on SD/eMM来更新TF卡中的u-boot或者7 Install/Update the bootloader on SPI Flash来更新SPI Flash中的u-boot

      312x152px

    6. 按下回车键后首先会弹出一个Warring

      309x168px

    7. 再按下回车键就会开始更新u-boot,更新完后会显示下面的信息

      244x137px

    8. 然后就可以重启开发板来测试u-boot的修改是否生效了

  9. 其它有用的信息

    1. u-boot 2017.09源码中,开发板使用的defconfig配置文件为

      orangepi-build/u-boot/v2017.09-rk3588/configs/orangepi-3b-rk3566_defconfig

    2. u-boot 2017.09源码中,开发板使用dts文件为

orangepi-build/u-boot/v2017.09-rk3588/arch/arm/dts/rk3566-orangepi-3b.dts编译Linux内核

  1. 运行build.sh脚本,记得加sudo权限

    test@test:~/orangepi-build$ sudo ./build.sh

  2. 选择Kernel package,然后回车

  3. 接着选择开发板的型号

  4. 然后会提示是否需要显示内核配置界面,如果不需要修改内核配置,则选择第一个即可,如果需要修改内核配置,则选择第二个

    576x87px

  5. 如果第4) 步选择了需要显示内核配置菜单(第二个选项),则会弹出通过make menuconfig打开的内核配置的界面,此时可以直接修改内核的配置,修改完后再保存退出即可,退出后会开始编译内核源码

    575x400px

  1. 如果不需要修改内核的配置选项,在运行build.sh脚本时,传入KERNEL_CONFIGURE=no就可临时屏蔽弹出内核的配置界面了

    test@test:~/orangepi-build$ sudo ./build.sh KERNEL_CONFIGURE=no

  2. 也可以设置orangepi-build/userpatches/config-default.conf配置文件中的KERNEL_CONFIGURE=no,这样可以永久禁用这个功能

  3. 编译内核的时候如果提示下面的错误,这是由于Ubuntu > PC的终端界面太小,导致make > menuconfig的界面无法显示,请把Ubuntu > PC的终端调到最大,然后重新运行build.sh脚本

    574x234px

  1. 编译内核源码时提示的部分信息说明如下

    1. Linux内核源码的版本

      [ o.k. ] Compiling current kernel [ 5.10.160 ]

    2. 使用的交叉编译工具链的版本

      [ o.k. ] Compiler version [ aarch64-none-linux-gnu-gcc 11.2.1 ]

    3. 内核默认使用的配置文件以及它存放的路径

      [ o.k. ] Using kernel config file [ config/kernel/linux-rockchip-rk356x-legacy.config ]

    4. 编译生成的内核相关的deb包的路径

      [ o.k. ] Target directory [ orangepi-build/output/debs/ ]

    5. 编译生成的内核镜像deb包的包名

      [ o.k. ] File name [ linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb ]

    6. 编译使用的时间

      [ o.k. ] Runtime [ 5 min ]

    7. 最后会显示重复编译上一次选择的内核的编译命令,使用下面的命令无需通过图形界面选择,可以直接开始编译内核源码

      [ o.k. ] Repeat Build Options [ sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=kernel KERNEL_CONFIGURE=no ]

  2. 查看编译生成的内核相关的deb包

    1. linux-dtb-legacy-rockchip-rk356x_1.0.0_arm64.deb包含内核使用的dtb文件

    2. linux-headers-legacy-rockchip-rk356x_1.0.0_arm64.deb包含内核头文件

    3. linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb包含内核镜像和内核模块

      test@test:~/orangepi-build$ ls output/debs/linux-*

      output/debs/linux-dtb-legacy-rockchip-rk356x_1.0.0_arm64.deb output/debs/linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb

      output/debs/linux-headers-legacy-rockchip-rk356x_1.0.0_arm64.deb

  3. 生成的linux-image的deb包包含的文件如下所示

    1. 使用下面的命令可以解压deb包

      test@test:~/orangepi-build$ cd output/debs

test@test:~/orangepi_build/output/debs$ mkdir test

test@test:~/orangepi_build/output/debs$ cp \

linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb test/

test@test:~/orangepi_build/output/debs$ cd test

test@test:~/orangepi_build/output/debs/test$ dpkg -x \

linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb .

test@test:~/orangepi_build/output/debs/test$ ls

boot etc lib linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb usr

  1. 解压后的文件如下所示

    test@test:~/orangepi-build/output/debs/test$ tree -L 2

    .

    ├── boot

    │   ├── config-5.10.160-rockchip-rk356x

    │   ├── System.map-5.10.160-rockchip-rk356x

    │   └── vmlinuz-5.10.160-rockchip-rk356x

    ├── etc

    │   └── kernel

    ├── lib

    │   └── modules

    ├── linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb

    └── usr

    ├── lib

    └── share

  1. orangepi-bulid编译系统编译Linux内核源码时首先会将Linux内核源码和github服务器的Linux内核源码进行同步,所以如果想修改Linux内核的源码,首先需要关闭源码的更新功能(需要完整编译过一次Linux内核源码后才能关闭这个功能,否则会提示找不到Linux内核的源码,如果是从百度云盘下载的源码压缩包,则没有这个问题,因为Linux的源码都已缓存好了),否则所作的修改都会被还原,方法如下:

    设置userpatches/config-default.conf中的IGNORE_UPDATES变量为”yes”

    test@test:~/orangepi-build$ vim userpatches/config-default.conf

    IGNORE_UPDATES="yes"

  2. 如果对内核做了修改,可以使用下面的方法来更新开发板Linux系统的内核和内核模块

    1. 将编译好的Linux内核的deb包上传到开发板的Linux系统中

      test@test:~/orangepi-build$ cd output/debs

      test@test:~/orangepi-build/output/debs$ scp \

      linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb root@192.168.1.xxx:/root

    2. 然后登录到开发板,卸载已安装的Linux内核的deb包

      root@orangepi:~# apt purge -y linux-image-legacy-rockchip-rk356x

    3. 再安装刚才上传的新的Linux内核的deb包

      root@orangepi:~# dpkg -i linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb

    4. 然后重启开发板,再查看内核相关的修改是否已生效

      root@orangepi:~# reboot

  3. 其它有用的信息

    1. 内核配置文件存放位置如下所示,请不要到内核源码中去找开发板所使用的内核配置文件

    2. orangepi-build/external/config/kernel/linux-rockchip-rk356x-legacy.config开发板使用的dts文件所在的位置为

orangepi-build/kernel/orange-pi-5.10-rk35xx/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b.dts

编译rootfs

  1. 运行build.sh脚本,记得加sudo权限

    test@test:~/orangepi-build$ sudo ./build.sh

  2. 选择Rootfs and all deb packages,然后回车

  1. 接着选择开发板的型号

  2. 然后选择rootfs的类型

    575x86px

  3. 然后选择镜像的类型

    1. Image with console interface > (server)表示服务器版的镜像,体积比较小

    2. Image with desktop environment表示带桌面的镜像,体积比较大

  4. 如果是编译服务器版的镜像,还可以选择编译Standard版本或者Minimal版本,Minimal版本预装的软件会比Standard版本少很多(没特殊需求请不要选择Minimal版本,因为很多东西默认没有预装,部分功能可能用不了

  5. 如果是编译桌面版本的镜像还需要选择桌面环境的类型,目前Ubuntu Jammy主要维护XFCE和Gnome两种桌面,Ubuntu Focal只维护XFCE桌面,Debian Bullseye主要维护XFCE和KDE桌面

    576x74px

    然后可以选择需要安装的额外的软件包。这里请按下回车键直接跳过。

    575x264px

  6. 然后就会开始编译rootfs,编译时提示的部分信息说明如下所示

    1. rootfs的类型

      [ o.k. ] local not found [ Creating new rootfs cache for jammy]

    2. 编译生成的rootfs压缩包的存放路径

      [ o.k. ] Target directory [ external/cache/rootfs ]

    3. 编译生成的rootfs压缩包的名字

      [ o.k. ] File name [ jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4 ]

    4. 编译使用的时间

      [ o.k. ] Runtime [ 13 min ]

  7. 查看编译生成的rootfs压缩包

    1. jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4是rootfs的压缩包,名字各字段的含义为

      1. jammy表示rootfs的Linux发行版的类型

      2. xfce表示rootfs为桌面版的类型,如果为cli则表示服务器版类型

      3. arm64表示rootfs的架构类型

      4. f930ff6ebbac1a72108a2e100762b18f是由rootfs安装的所有软件包的包名生成的MD5哈希值,只要没有修改rootfs安装的软件包的列表,那么这个值就不会变,编译脚本会通过这个MD5哈希值来判断是否需要重新编译rootfs

    2. jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list列出了rootfs安装的所有软件包的包名

      test@test:~/orangepi-build$ ls external/cache/rootfs/

      jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4

      jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.current

      jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list

  8. 如果需要的rootfs在external/cache/rootfs下已经存在,那么再次编译rootfs就会直接跳过编译过程,不会重新开始编译,编译镜像的时候也会去external/cache/rootfs下查找是否已经有缓存可用的rootfs,如果有就直接使用,这样可以节省大量的下载编译时间。

编译Linux镜像

  1. 运行build.sh脚本,记得加sudo权限

    test@test:~/orangepi-build$ sudo ./build.sh

  2. 选择Full OS image for flashing,然后回车

  1. 然后选择开发板的型号

  2. 然后选择rootfs的类型

    575x86px

  3. 然后选择镜像的类型

    1. Image with console interface > (server)表示服务器版的镜像,体积比较小

    2. Image with desktop environment表示带桌面的镜像,体积比较大

  4. 如果是编译服务器版的镜像,还可以选择编译Standard版本或者Minimal版本,Minimal版本预装的软件会比Standard版本少很多(没特殊需求请不要选择Minimal版本,因为很多东西默认没有预装,部分功能可能用不了

  5. 如果是编译桌面版本的镜像还需要选择桌面环境的类型,目前Ubuntu Jammy主要维护XFCE和Gnome两种桌面,Ubuntu Focal只维护XFCE桌面,Debian Bullseye主要维护XFCE和KDE桌面

    576x74px

    然后可以选择需要安装的额外的软件包。这里请按下回车键直接跳过。

    575x264px

  6. 然后就会开始编译Linux镜像,编译的大致流程如下

    1. 初始化Ubuntu PC的编译环境,安装编译过程需要的软件包

    2. 下载u-boot和Linux内核的源码(如果已经缓存,则只更新代码)

    3. 编译u-boot源码,生成u-boot的deb包

    4. 编译Linux源码,生成Linux相关的deb包

    5. 制作Linux firmware的deb包

    6. 制作orangepi-config工具的deb包

    7. 制作板级支持的deb包

    8. 如果是编译desktop版镜像,还会制作desktop相关的deb包

    9. 检查rootfs是否已经缓存,如果没有缓存,则重新制作rootfs,如果已经缓存,则直接解压使用

    10. 安装前面生成的deb包到rootfs中

    11. 对不同的开发板和不同类型镜像做一些特定的设置,如预装额外的软件包,修改系统配置等

    12. 然后制作镜像文件,并格式化分区,默认类型为ext4

    13. 再将配置好的rootfs拷贝到镜像的分区中

    14. 然后更新initramfs

    15. 最后将u-boot的bin文件通过dd命令写入到镜像中

  7. 编译完镜像后会提示下面的信息

    1. 编译生成的镜像的存放路径

      [ o.k. ] Done building [ output/images/Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160/Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.img ]

    2. 编译使用的时间

[ o.k. ] Runtime [ 19 min ]

  1. 重复编译镜像的命令,使用下面的命令无需通过图形界面选择,可以直接开始编译镜像

    [ o.k. ] Repeat Build Options [ sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=image RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=yes ]

Android 11系统的使用说明

已支持的Android版本

Android版本 内核版本
Android 11 Linux4.19

Android 功能适配情况

功能 Android 11
USB2.0x3 OK
USB3.0x1 OK
M.2 NVMe SSD启动 OK
WIFI OK
蓝牙 OK
GPIO(40pin) OK
UART(40pin) OK
SPI(40pin) OK
I2C(40pin) OK
PWM(40pin) OK
PWM风扇接口 OK
3pin调试串口 OK
EMMC OK
TF卡启动 OK
HDMI 视频 OK
HDMI 音频 OK
LCD OK
eDP显示 OK
千兆网口 OK
网口状态灯 OK
耳机播放 OK
耳机录音 OK
LED灯 OK
GPU OK
NPU OK
VPU OK
RTC OK

WIFI的连接测试方法

  1. 首先点击进入Setting

549x228px

  1. 然后选择Network & internet

565x120px

  1. 然后选择Wi-Fi

561x99px

  1. 然后打开Wi-Fi开关

560x167px

  1. 打开Wi-Fi后如果一切正常,就可以扫描到附近的Wi-Fi热点了

    561x166px

  2. 然后选择想连接的Wi-Fi后会弹出下图所示的密码输入界面

    553x237px

  3. 然后使用键盘输入Wi-Fi对应的密码,再使用鼠标点击虚拟键盘中的回车按钮就会开始连接Wi-Fi了

    553x232px

  4. Wi-Fi连接成功后的显示如下图所示:

    558x102px

Wi-Fi hotspot的使用方法

  1. 首先请确保以太网口已连接网线,并且能正常上网

  2. 然后选择Settings

    549x228px

  3. 然后选择Network & internet

    565x120px

  4. 然后选择Hotspot & tethering

    549x173px

  5. 然后选择Wi-Fi hotspot

    548x104px

  6. 然后打开Wi-Fi hotspot,下图中还可以看到生成的热点的名字和密码,记住它们,在连接热点的时候要用到(如果需要修改热点的名字和密码,需要先关闭Wi-Fi hotspot,然后才能修改)

    551x158px

  7. 此时可以拿出你的手机,如果一切正常,在手机搜索到的WI-FI列表中就能找到上图Hotspot name下面显示的同名(这里为 AndroidAP_6953)的WIFI热点了。然后可以点击AndroidAP_6953连接热点,密码在上图的Hotspot password 下面可以看到

313x238px

  1. 连接成功后显示如下图所示(不同手机界面会有区别,具体界面以你手机显示的为准)。此时就可以在手机上打开一个网页看下能否上网了,如果能正常打开网页, 说明开发板的WI-FI Hotspot 能正常使用

327x165px

蓝牙的测试方法

  1. 首先点击进入Setting

    549x228px

  2. 然后选择Connected devices

    547x115px

  3. 然后点击Pair new device打开蓝牙并开始扫描周围的蓝牙设备

    547x126px

  4. 搜索到的蓝牙设备会在Available devices下面显示出来

    559x279px

  5. 然后点击想要连接的蓝牙设备就可以开始配对了,当弹出下面的界面时,请使用鼠标选择Pair选项

    522x212px

  6. 这里测试的是开发板和安卓手机蓝牙的配置过程,此时在手机上会弹出下面的确认界面,在手机上也点击配对按钮后就会开始配对过程

    236x273px

  7. 配对完成后,可以看到如下图所示的已配对的蓝牙设备

    545x178px

  8. 此时可以使用手机蓝牙给开发板发送一张图片,发送后,在开发板的安卓系统中可以看到下面的确认界面,然后点击Accept就可以开始接收手机发过来的图片了

    559x238px

  9. 开发板Android系统蓝牙接收到的图片可以在文件管理器中打开Download目录查看

    573x97px

树莓派5寸屏幕的使用方法

请确保使用的镜像为下面的两个版本的镜像:

OrangePi3B_RK3566_Android11_lcd_v1.x.x.img

OrangePi3B_RK3566_Android11_spi-nvme_lcd_v1.x.x.img

  1. 首先需要组装好屏幕,请参考树莓派5寸屏幕的组装方法

  2. 给板子接通Type-C电源,并上电,系统启动后,就可以看到屏幕显示如下图所示

    516x332px

40pin 接口 GPIO、UART、SPI 和 PWM 测试

40pin GPIO 口测试

  1. 首先点击wiringOP图标打开wiringOP APP

    576x210px

  2. wiringOP APP的主界面显示如下图所示,然后点击GPIO_TEST按钮打开GPIO测试界面

    575x148px

  3. GPIO测试界面如下图所示,左边的两排CheckBox按钮跟40pin引脚是一一对应的关系。当勾选CheckBox按钮时,对应的GPIO引脚会被设置为OUT模式,引脚电平设置为高电平;当取消勾选时,GPIO引脚电平设置为低电平;当点击右边的GPIO READALL按钮时,可以获取到wPi号、GPIO模式、引脚电平等信息;当点击BLINK ALL GPIO按钮时,程序会控制28个GPIO口不停的切换高低电平

    576x303px

  4. 然后点击GPIO READALL按钮,输出信息如下图所示:

    575x323px

  5. 开发板40pin中总共有28个GPIO口可以使用,下面以7号引脚——对应GPIO为GPIO4_A4 ——对应wPi序号为2——为例演示如何设置GPIO口的高低电平。首先点击7号引脚对应的CheckBox按钮,当按钮为选中状态时,7号引脚会设置为高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为3.3v,说明设置高电平成功

    258x349px

  6. 然后点击GPIO READALL按钮,可以看到当前的7号引脚模式为OUT,引脚电平为高电平

    574x301px

  7. 再次点击下图的CheckBox按钮取消勾选状态,7号引脚会设置为低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功

    250x345px

  8. 然后点击GPIO READALL按钮,可以看到当前的7号引脚模式为OUT,引脚电平为低电平

    576x300px

40pin的UART测试

  1. Android中默认打开了UART7和UART9,在40pin的位置如下图所示,对应的设备节点分别是/dev/ttyS7/dev/ttyS9

    376x92px

  2. 首先点击wiringOP图标打开wiringOP APP

    576x210px

  3. wiringOP APP的主界面显示如下图所示,然后点击UART_TEST按钮打开UART测试界面

    575x156px

  4. APP的串口测试界面如下图所示

576x324px

  1. 下面以测试UART7为例,在选择框中选择/dev/ttyS7节点,在编辑框中输入想要设置的波特率,然后点击OPEN按钮打开/dev/ttyS7节点,打开成功后,OPEN按钮变为不可选中状态,CLOSE按钮和SEND按钮变为可选中状态

574x166px

  1. 然后使用杜邦线短接uart7的RXD和TXD引脚

    418x103px

  2. 然后可以在下面的发送编辑框中输入一段字符,点击SEND按钮开始发送

575x161px

  1. 如果一切正常,接收框内会显示已接收到的字符串

574x164px

40pin的SPI测试

  1. 由 40pin 接口的原理图可知,Orange Pi 3B可用的 spi 为 spi3

    577x193px

  2. 这里通过w25q64模块来测试SPI接口,首先在SPI3接口接入w25q64设备

    373x215px

  3. 然后点击wiringOP图标打开wiringOP APP

    576x210px

  4. wiringOP APP的主界面显示如下图所示,点击SPI_TEST按钮打开SPI的测试界面

    574x149px

  5. 然后点击OPEN按钮初始化SPI

576x241px

  1. 然后填充需要发送的字节,比如读取w25q64的ID信息,在data[0]中填入地址0x9f,然后点击TRANSFER按钮

    572x216px

  2. 最后APP会显示读取到的ID信息

575x296px

  1. w25q64模块的MANUFACTURER ID为EFh,Device ID为4017h,跟上面读取到的值是对应的(h代表是16进制)

    374x126px

40pin的PWM测试

  1. Android默认开启了PWM11,对应的引脚在40pin的所在位置如下图所示

    334x107px

  2. 首先点击wiringOP图标打开wiringOP APP

    576x210px

  3. 然后在wiringOP的主界面点击PWM_TEST按钮进入PWM的测试界面

    575x150px

  4. PWM11对应的基地址是fe6f0030,这里pwmchip0右边显示是fdd70020.pwm, 这时需要点击下拉选项选择其它的pwmchip,直到右边显示febf0030.pwm为止

    576x178px

  5. 当下拉选项选择pwmchip3时,右边对应的就是PWM11对应的基地址fe6f0030

    574x161px

  6. 然后确认PWM的通道,默认是0通道,并确认PWM的周期,默认的配置是50000ns,转换为PWM频率是20KHz,可自行修改,点击EXPORT按钮导出PWM11

    575x160px

  7. 然后拖动下面的拖动条,就可以改变PWM的占空比,然后勾选Enable就可以输出PWM波形了

575x167px

  1. 然后使用示波器测量开发板40pin中的第32号引脚就可以看到下面的波形了

460x276px

ADB的使用方法

使用网络连接adb调试

使用网络adb无需数据线来连接电脑和开发板,而是通过网络来通信,所以首先请确保开发板的有线或者无线网络已经连接好了,然后获取开发板的IP地址,后面要用到。

  1. 确保Android系统的service.adb.tcp.port设置为5555端口号

    console:/ # getprop | grep "adb.tcp"

    [service.adb.tcp.port]: [5555]

  2. 如果service.adb.tcp.port没有设置,可以使用下面的命令设置网络adb的端口号

console:/ # setprop service.adb.tcp.port 5555

console:/ # stop adbd

console:/ # start adbd

  1. 在Ubuntu PC上安装adb工具

    test@test:~$ sudo apt update

    test@test:~$ sudo apt install -y adb

  2. 然后在Ubuntu PC上连接网络adb

    test@test:~$ adb connect 192.168.1.xxx (IP地址需要修改为开发板的IP地址)

    * daemon not running; starting now at tcp:5037

    * daemon started successfully

    connected to 192.168.1.xxx:5555

    test@test:~$ adb devices

    List of devices attached

    192.168.1.xxx:5555 device

  3. 然后在Ubuntu PC上通过adb shell就可以登录到android系统

test@test:~$ adb shell

console:/ #

附录

用户手册更新历史

版本 日期 更新说明
v0.1 2023-07-19 初始版本

镜像更新历史

日期 更新说明
2023-07-19 Orangepi3 b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.7z

Orange pi3b_1.0.0_ubuntu_jammy_desktop_xfce_linux5.10.160.7z

Orange pi3b_1.0.0_ubuntu_focal_desktop_xfce_linux5.10.160.7z

OrangePi3B_RK3566_Android11_v1.0.0.tar.gz

OrangePi3B_RK3566_Android11_lcd_v1.0.0.tar.gz

OrangePi3B_RK3566_Android11_spi-nvme_v1.0.0.tar.gz

O rangePi3B_RK3566_Android11_lcd_spi-nvme_v1.0.0.tar.gz

  • 初始版本