Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 3B

79,693 bytes added, 09:06, 24 August 2023
Interface details of Orange Pi 3B
<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 ==
<div class="figure">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.
[[File:mediaOrange 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/image2VR, smart security, smart home and other fields, covering various AIoT industries.jpeg|576x388px|_MG_1990(1)]]
</div>'''目录'''Orange Pi 3B supports Android11, Ubuntu22.04, Ubuntu20.04, Debian11, Debian12, OpenHarmony 4.0 Beta1, Orange Pi OS (Arch), Orange Pi OS (OH) based on OpenHarmony and other operating systems.
[[\l|1. Orange Pi 3B的基本特性 [7](#<span id="purpose-of-orange-pi-3b的基本特性)]]3b"></span>
[[\l|1.1. 什么是 == Purpose of Orange Pi 3B [7](#什么是-orange-pi-3b)]]==
[[\l|1.2. Orange Pi 3B的用途 [7](#orange-pi-3b的用途)]]We can use it to achieve:
[[\l|1* A Linux desktop computer* A Linux web server* Android tablet* Android game console, etc.3. Orange Pi 3B的硬件特性 [8](#orange-pi-3b的硬件特性)]]
[[\l{|1.4class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Of course, there are more functions. Relying on a powerful ecosystem and a variety of expansion accessories, Orange Pi 3B的顶层视图和底层视图 [10](#orange-pi-3b的顶层视图和底层视图)]]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.'''</big>|}
[[\l|1.5. Orange Pi 3B的接口详情图 [11](#<span id="hardware-features-of-orange-pi-3b的接口详情图)]]3b"></span>
[[\l|2. 开发板使用介绍 [13](#开发板使用介绍)]]== Hardware Features of Orange Pi 3B ==
[[\l{|class="wikitable" style="width:800px;text-align:center;"|-|colspan=2.|<div style="text-align:center"><big>'''Introduction to hardware features'''</big></div>|-| style="width: 200px" | Master chip| Rockchip RK3566|-| CPU| Quad-core 64-bit Cortex-A55 processor, 22nm advanced technology, main frequency up to 1. 准备需要的配件 [13](#准备需要的配件)]]8GHz|-| GPU| • ARM Mali G52 2EE graphics processor
[[\l|• Support OpenGL ES 1.1/2.0/3.2, OpenCL 2. 下载开发板的镜像和相关的资料 [16](#下载开发板的镜像和相关的资料)]]0, Vulkan 1.1
[[\l|2.3. 基于Windows PC将Linux镜像烧写到TF卡的方法 [18](#基于windows• Embedded high-pc将linux镜像烧写到tf卡的方法)]]performance 2D acceleration hardware
[[\l|2.3.1-| NPU| • Integrated RKNN NPU AI accelerator, 0. 使用balenaEtcher烧录Linux镜像的方法 [18](#使用balenaetcher烧录linux镜像的方法)]]8Tops@INT8 performance
[[\l|2.3.2. 使用RKDevTool烧录Linux镜像到TF卡中的方法 [21](#使用rkdevtool烧录linux镜像到tf卡中的方法)]]• Supports one-click conversion of Caffe/TensorFlow/TFLite/ONNX/PyTorch/Keras/Darknet architecture models
[[\l|2.3-| VPU| • 4K@60fps H.3265/H. 使用Win32Diskimager烧录Linux镜像的方法 [29](#使用win32diskimager烧录linux镜像的方法)]]264/VP9 video decoding
[[\l|2• 1080P@100fps H.4. 基于Ubuntu PC将Linux镜像烧写到TF卡的方法 [31](#基于ubuntu-pc将linux镜像烧写到tf卡的方法)]]265 video encoding
[[\l|2• 1080P@60fps H.5. 烧录Linux镜像到eMMC中的方法 [35](#_Toc32616)]]264 video encoding
[[\l|2.-| PMU| Rockchip RK809-5.1. 使用RKDevTool烧录Linux镜像到eMMC中的方法 [35](#使用rkdevtool烧录linux镜像到emmc中的方法)]]|-| Memory| 2GB/4GB/8GB (LPDDR4/4x)|-| storage| • Support eMMC module: 16GB/32GB/64GB/128GB/256GB
[[\l|2.5.2. 使用dd命令烧录Linux镜像到eMMC中的方法 [43](#使用dd命令烧录linux镜像到emmc中的方法)]]• SPI Flash: 16MB/32MB
[[\l|• M.2M-KEY slot: SATA3 or PCIe2.6. 烧写Linux镜像到SPIFlash+NVMe SSD中的方法 [45](#烧写linux镜像到spiflashnvme-ssd中的方法)]]0 NVME SSD
[[\l|2.6.1. 使用RKDevTool烧录的方法 [45](#使用rkdevtool烧录的方法)]]• TF card slot
[[\l|2.6-| 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. 使用dd命令烧录的方法 [54](#使用dd命令烧录的方法)]]0, maximum support 4K@60FPS
[[\l|• 1xMIPI DSI 2.6.3. 使用balenaEtcher软件烧录的方法 [59](#使用balenaetcher软件烧录的方法)]]Lane
[[\l|2• eDP1.7. 烧录Android镜像到TF卡中的方法 [74](#烧录android镜像到tf卡中的方法)]]3
[[\l|-| Camera| 1xMIPI CSI 2 Lane camera interface|-| USB| • 1xUSB 2.7.1. 通过USB2.0烧录口将Android 镜像烧录到TF卡中的方法 [74](#通过usb2.0烧录口将android-镜像烧录到tf卡中的方法)]]0 supports Device or HOST mode
[[\l|2• 1xUSB 3.7.2. 使用SDDiskTool工具将Android镜像烧到TF卡的方法 [80](#使用sddisktool工具将android镜像烧到tf卡的方法)]]0 HOST
[[\l|• 2xUSB 2.8. 烧录Android镜像到eMMC中的方法 [83](#烧录android镜像到emmc中的方法)]]0 HOST
[[\l|2-| Audio| 3.85mm headphone jack audio input/output|-| Button| 1x MaskROM key, 1xRESET key, 1 xPOWER key|-| FAN| 2Pin 1.25mm 5V fan interface|-| RTC| 2Pin 1. 通过USB2.0烧录口将Android 镜像烧录到eMMC中的方法 [83](#通过usb2.0烧录口将android25mm backup battery interface|-镜像烧录到emmc中的方法)]]| 40Pin| 40Pin function expansion interface, supports the following interface types:
[[\lGPIO, UART, I2C, SPI, PWM|2-| Power Supply| Type-C 5V3A|-| Supported OS| Android11, Ubuntu22.804, Ubuntu20.204, Debian11, Debian12, OpenHarmony 4. 通过TF卡将Android11镜像烧录到eMMC中的方法 [90]0 Beta1, Orange Pi OS (#通过tf卡将android11镜像烧录到emmc中的方法Arch)]], Orange Pi OS (OH) based on OpenHarmony 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|}
[[\l|2.9. 烧录Android镜像到SPIFlash+NVMe SSD中的方法 [95](#烧录android镜像到spiflashnvme<span id="top-ssd中的方法)]]view-and-bottom-view-of-orange-pi-3b"></span>
[[\l|2.10. 使用RKDevTool清空SPIFlash的方法 [100](#使用rkdevtool清空spiflash的方法)]]== Top view and bottom view of Orange Pi 3B ==
[[\l|2.11. 启动香橙派开发板 [107](#启动香橙派开发板)]]<big>'''Top view:'''</big><br>
[[\l|2.12. 调试串口的使用方法 [108](#调试串口的使用方法)]]<div class="figure">
[[\lFile:pi3b-img3.png|2.12.1. 调试串口的连接说明 [108](#调试串口的连接说明)800px]]
[[\l|2.12.2. Ubuntu平台调试串口的使用方法 [109](#ubuntu平台调试串口的使用方法)]]</div><big>'''Bottom view:'''</big><br>
[[\l|2.12.3. Windows平台调试串口的使用方法 [112](#windows平台调试串口的使用方法)]]<div class="figure">
[[\lFile:pi3b-img4.png|2.13. 使用开发板40pin接口中的5v引脚供电说明 [116](#使用开发板40pin接口中的5v引脚供电说明)800px]]
[[\l|3. Ubuntu</Debian Server和Xfce桌面系统使用说明 [117](#_Toc7393)]]div><span id="interface-details-of-orange-pi-3b"></span>
[[\l|3.1. 已支持的Linux镜像类型和内核版本 [117](#已支持的linux镜像类型和内核版本)]]== Interface details of Orange Pi 3B ==
[[\lFile:pi3b-img5-1.png|3.2. Linux系统适配情况 [117](#_Toc10533)800px]]
[[\lFile:pi3b-img6.png|3.3. 本手册Linux命令格式说明 [118](#本手册linux命令格式说明)800px]]
[[\l{|3class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''The diameter of the four positioning holes is 2.47mm, and the diameter of the M. Linux系统登录说明 [119](#_Toc19677)]]2 PICE device fixing hole is 2.9mm.'''</big>|}
[[\l|3.4.1. Linux系统默认登录账号和密码 [119](#_Toc4893)]]<span id="introduction-to-the-use-of-the-development-board"></span>
[[\l|3.4.2. 设置Linux系统终端自动登录的方法 [120](#设置linux系统终端自动登录的方法)]]= '''Introduction to the use of the development board''' =
[[\l|3.4.3. Linux桌面版系统自动登录说明 [120](#_Toc15422)]]<span id="prepare-the-required-accessories"></span>== Prepare the required accessories ==
[[\l|3.4.4. Linux桌面版系统root用户自动登录的设置方法 [121]# TF card, '''class 10''' or above high-speed SanDisk card with a minimum capacity of 16GB (#linux桌面版系统root用户自动登录的设置方法recommended 32GB or above)]]
::[[\l|3File:pi3b-img7.4.5. Linux桌面版系统禁用桌面的方法 [122](#linux桌面版系统禁用桌面的方法)png]]
[[\l|3.5. 板载LED灯测试说明 [123](#板载led灯测试说明)]]<ol start="2" style="list-style-type: decimal;"><li>TF card reader, used to burn the image into the TF card</li>
[[\l|3.6File:pi3b-img8. 网络连接测试 [124](#_Toc3023)png]]</ol><ol start="3" style="list-style-type: decimal;"><li>Display with HDMI interface</li>
[[\l|3File:pi3b-img9.6.1. 以太网口测试 [124](#以太网口测试)png]]</ol><ol start="4" style="list-style-type: decimal;"><li>HDMI to HDMI cable, used to connect the development board to an HDMI monitor or TV for display</li>
[[\l|3File:pi3b-img10.6.2. WIFI连接测试 [125](#_Toc8082)png]]
[[\l{|3class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note, if you want to connect a 4K monitor, please make sure that the HDMI cable supports 4K video output.6.3. 设置静态IP地址的方法 [132](#设置静态ip地址的方法)]]'''</big>|}</ol><ol start="5" style="list-style-type: decimal;"><li>Power adapter, Orange Pi 3B is recommended to use 5V/3A Type-C power supply for power supply</li>
[[\l|3File:pi3b-img11-1.7. SSH远程登录开发板 [140](#_Toc23407)png]]</ol><ol start="6" style="list-style-type: decimal;"><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>
[[\l|3File:pi3b-img12.7.1. Ubuntu下SSH远程登录开发板 [140](#ubuntu下ssh远程登录开发板)png]]</ol><ol start="7" style="list-style-type: decimal;"><li>USB camera</li>
[[\l|3File:pi3b-img13.7png]]</ol><ol start="8" style="list-style-type: decimal;"><li>5V cooling fan.2As shown in the figure below, the development board has an interface for connecting the cooling fan, and the interface specification is '''2pin 1. Windows下SSH远程登录开发板 [141](#windows下ssh远程登录开发板)]]25mm''' '''pitch'''</li>
[[\l{|3class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''The fan on the development board can adjust the speed and switch through PWM.8. 上传文件到开发板Linux系统中的方法 [143](#上传文件到开发板linux系统中的方法)]]'''</big>|}
[[\l|3File:pi3b-img14.8.1. 在Ubuntu PC中上传文件到开发板Linux系统中的方法 [143png]](#在ubuntu</ol><ol start="9" style="list-pc中上传文件到开发板linux系统中的方法)]]style-type: decimal;"><li>100M or 1000M network cable, used to connect the development board to the Internet</li>
[[\l|3File:pi3b-img15.8png]]</ol><ol start="10" style="list-style-type: decimal;"><li>USB2.2. 在Windows PC中上传文件到开发板Linux系统中的方法 [147](#在windows0 male-to-pc中上传文件到开发板linux系统中的方法)]]male data cable, used to burn images to eMMC, NVMe SSD and other functions</li>
[[\l|3.9. HDMI测试 [150](#hdmi测试)]]<div class="figure">
[[\l|3File:pi3b-img16.9.1. HDMI显示测试 [150](#hdmi显示测试)png]]
[[\l|</div></ol><ol start="11" style="list-style-type: decimal;"><li>'''3.9.2. HDMI转VGA显示测试 [151](#hdmi转vga显示测试)]]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>
[[\lFile:pi3b-img17.png|3400px]] [[File:pi3b-img18.9.3. HDMI分辨率设置方法 [152](#hdmi分辨率设置方法)png|400px]]</ol><ol start="12" style="list-style-type: decimal;"><li>A personal computer with Ubuntu and Windows operating systems installed</li>
[[\l{|3class="wikitable" style="width:800px;text-align: center;"|-|1|Ubuntu22.10. 蓝牙使用方法 [155](#蓝牙使用方法)]]04 PC|Optional, used to compile Linux source code|-|2|Windows PC|For burning Android and Linux images|}</ol><span id="download-the-image-of-the-development-board-and-related-materials"></span>
[[\l|3.10.1. 桌面版镜像的测试方法 [155](#桌面版镜像的测试方法-1)]]== Download the image of the development board and related materials ==
[[\l|3.11. USB接口测试 [158](#usb接口测试)]]The website for downloading the English version of materials is:
[[\l::{|3class="wikitable" style="width:800px;" |-| '''http://www.11orangepi.1org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B. 连接USB鼠标或键盘测试 [158](#连接usb鼠标或键盘测试)]]html'''|}
[[\l|3.11.2. 连接USB存储设备测试 [159](#连接usb存储设备测试)]]<div class="figure">
::[[\lFile:pi3b-img19.png|3.11.3. USB无线网卡测试 [159](#usb无线网卡测试)800px]]
[[\l|3.11.4. USB摄像头测试 [167](#usb摄像头测试)]]</div><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>
[[\l|3.12. 音频测试 [169](#音频测试)]]<span id="method-of-burning-linux-image-to-tf-card-based-on-windows-pc"></span>
[[\l|3.12.1. 在桌面系统中测试音频方法 [169](#在桌面系统中测试音频方法)]]== Method of burning Linux image to TF card based on Windows PC ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that the Linux image mentioned here specifically refers to the images of Linux distributions such as Debian and Ubuntu downloaded from the [[\l|3http://www.12orangepi.2org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B. 使用命令播放音频的方法 [171](#使用命令播放音频的方法)]html Orange Pi data download page].'''</big>|}
[[\l|3.12.3. 使用命令测试录音的方法 [172](#使用命令测试录音的方法)]]<span id="how-to-use-balenaetcher-to-burn-linux-image"></span>=== 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# 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 [[\l|3http://www.orangepi.13org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B. 温度传感器 [173html '''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:
[[\l::{|3class="wikitable" style="width:800px;" |-| '''https://www.14balena. 40 Pin接口引脚说明 [173](#pin接口引脚说明)]]io/etcher/'''|}
[[\l|3.15. 安装wiringOP的方法 [175](#安装wiringop的方法)]]<ol start="5" 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>
[[\l|3File:pi3b-img20.16. 40pin接口GPIO、I2C、UART、SPI和PWM测试 [176](#pin接口gpioi2cuartspi和pwm测试)png]]</ol><ol start="6" style="list-style-type: decimal;"><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>
[[\l|3File:pi3b-img21.16png]]</ol><ol start="7" style="list-style-type: decimal;"><li>If the downloaded version of balenaEtcher needs to be installed, please install it before using it.1If you downloaded the Portable version of balenaEtcher, just double-click to open it. 40pin GPIO口测试 [177](#pin-gpio口测试)]]The balenaEtcher interface after opening is shown in the figure below:</li>
[[\l|3.16.2File:pi3b-img22. 40pin GPIO口上下拉电阻的设置方法 [178](#pin-gpio口上下拉电阻的设置方法)png]]
[[\l{|3.16.3. 40pin SPI测试 [179](class="wikitable" style="background-color:#pinffffdc;width:800px;" |-spi测试)]]| <big>'''When opening balenaEtcher, if the following error is prompted:'''</big>
[[\lFile:pi3b-img23.png|3.16.4. 40pin I2C测试 [181](#pin-i2c测试)center]]
[[\l|3<big>'''Please select balenaEtcher, right-click, and select Run as administrator.16.5. 40pin的UART测试 [182](#pin的uart测试)]]'''</big>
[[\lFile:pi3b-img24.png|3.16.6. PWM的测试方法 [184](#pwm的测试方法)center]]|}</ol><ol start="8" style="list-style-type: decimal;"><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>
[[\l|3.17. wiringOP-Python的安装使用方法 [186](#wiringop-python的安装使用方法)]]<div class="figure">
[[\l|3File:pi3b-img25.17.1. wiringOP-Python的安装方法 [186](#wiringop-python的安装方法)png]]
[[\l|3.17.2. 40pin GPIO口测试 [188](#pin</div></ol></li></ol><ol start="9" style="list-gpio口测试style-1)]]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>
[[\l|3File:pi3b-img26.17.3. 40pin SPI测试 [190png]](#pin</ol><ol start="10" style="list-spi测试style-1)]]type: decimal;"><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>
[[\l|3File:pi3b-img27.17.4. 40pin I2C测试 [192png]](#pin</ol><ol start="11" style="list-i2c测试style-1)]]type: decimal;"><li>After successful burning, the display interface of balenaEtcher is as 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.</li>
[[\l|3.17.5. 40pin的UART测试 [194](#pin的uart测试-1)]]<div class="figure">
[[\l|3File:pi3b-img28.18. 硬件看门狗测试 [196](#硬件看门狗测试)png]]
[[\l|3.19. 查看RK3566芯片的序列号 [197](#查看rk3566芯片的序列号)]]</div></ol><span id="how-to-use-rkdevtool-to-burn-linux-image-to-tf-card"></span>
[[\l|3.20. 下载安装arm64版本balenaEtcher的方法 [197](#下载安装arm64版本balenaetcher的方法)]]=== How to use RKDevTool to burn Linux image to TF card ===
[[\l|3# First, you need to prepare a good quality USB2.21. 宝塔Linux面板的安装方法 [199](#宝塔linux面板的安装方法)]]0 male-to-male data cable
[[\l|3.22. 设置中文环境以及安装中文输入法 [202](#设置中文环境以及安装中文输入法)]]<div class="figure">
::[[\l|3File:pi3b-img16.22.1. Debian系统的安装方法 [202](#debian系统的安装方法)png]]
[[\l|3</div><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.2212.2zip''' and '''MiniLoader''' and the burning tool '''RKDevTool_Release_v3. Ubuntu 2015.04系统的安装方法 zip''' from the [209](#ubuntuhttp://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-203B.04系统的安装方法)]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>
[[\l|3.22.3. Ubuntu 22.04系统的安装方法 [213](#ubuntu-22.04系统的安装方法)]]<div class="figure">
[[\l|3File:pi3b-img29.23. 远程登录Linux系统桌面的方法 [219](#远程登录linux系统桌面的方法)png]]
[[\l|3.23.1. 使用NoMachine远程登录 [219](#使用nomachine远程登录)]]</div></ol><ol start="2" style="list-style-type: lower-alpha;"><li>Then download all the files below</li>
[[\l|3.23.2. 使用VNC远程登录 [223](#使用vnc远程登录)]]<div class="figure">
[[\l|3File:pi3b-img30.24. Linux系统支持的部分编程语言测试 [225](#linux系统支持的部分编程语言测试)png]]
[[\l</div>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-|3<big>'''Note that the &quot;MiniLoader-things needed to burn the Linux image&quot; folder is hereinafter referred to as the MiniLoader folder.24'''</big>|}</ol></li></ol><ol start="4" style="list-style-type: decimal;"><li><p>Then download the Linux operating system image file compression package that you want to burn from the [http://www.1orangepi. Debian Bullseye系统 [225](#debianorg/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-bullseye系统)]3B.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>
[[\l|3File:pi3b-img31.24png]]</ol><ol start="6" style="list-style-type: decimal;"><li><p>After opening '''DriverInstall.2. Ubuntu Focal系统 [227](#ubuntuexe''', the steps to install the Rockchip driver are as follows</p><ol style="list-style-type: lower-focal系统)]]alpha;"><li>Click the &quot;'''Driver Installation'''&quot; button</li>
[[\l|3File:pi3b-img32.24.3. Ubuntu Jammy系统 [228png]](#ubuntu</ol><ol start="2" style="list-style-type: lower-jammy系统)]]alpha;"><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>
[[\l|3File:pi3b-img33.25. QT的安装方法 [230](#qt的安装方法)png]]</ol></li></ol><ol start="7" 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>
[[\l|3File:pi3b-img34.26. ROS安装方法 [238](#ros安装方法)png]]</ol><ol start="8" 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>
[[\l|3File:pi3b-img35.26.1. Ubuntu20.04安装ROS 1 Noetic的方法 [238png]](#ubuntu20</ol><ol start="9" style="list-style-type: decimal;"><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.04安装ros0 male-1to-noetic的方法)]]male data cable. The position of the USB2.0 programming port of the development board is shown in the figure below</li>
[[\l|3.26.2. Ubuntu20.04安装ROS 2 Galactic的方法 [242](#ubuntu20.04安装ros-2-galactic的方法)]]<div class="figure">
[[\l|3.26.3File:pi3b-img36. Ubuntu22.04安装ROS 2 Humble的方法 [245](#ubuntu22.04安装ros-2-humble的方法)png]]
[[\l|3.27. 安装内核头文件的方法 [247](#安装内核头文件的方法)]]</div></ol><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>
[[\l|3File:pi3b-img37.28. 树莓派5寸屏幕的使用 [250](#树莓派5寸屏幕的使用)png]]</ol><ol start="4" style="list-style-type: lower-alpha;"><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>
[[\l|3File:pi3b-img38.28.1. 树莓派5寸屏幕的组装方法 [250](#树莓派5寸屏幕的组装方法)png]]</ol><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>
[[\l|3File:pi3b-img39.28.2. 打开树莓派5寸屏幕配置的方法 [251](#打开树莓派5寸屏幕配置的方法)png]]</ol><ol start="6" style="list-style-type: lower-alpha;"><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>
[[\l|3.28.3. 服务器版镜像旋转显示方向的方法 [254](#服务器版镜像旋转显示方向的方法)]]<div class="figure">
[[\l|3File:pi3b-img40.28.4. 桌面版镜像旋转显示和触摸方向的方法 [254](#桌面版镜像旋转显示和触摸方向的方法)png]]
[[\l|3.29. 开关机logo使用说明 [257](#开关机logo使用说明)]]</div></ol><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>
[[\l|3File:pi3b-img41.30. ZFS文件系统的使用方法 [257](#zfs文件系统的使用方法)png]]</ol><ol style="list-style-type: lower-roman;"><li>Then select the '''import configuration''' option</li>
[[\l|3File:pi3b-img42.30.1. 安装ZFS的方法 [258](#安装zfs的方法)png]]</ol><ol start="10" style="list-style-type: lower-alpha;"><li>Then select the '''rk3588_Linux_tfcard.cfg''' configuration file in the '''MiniLoader''' folder downloaded earlier, and click '''Open'''</li>
[[\l|3File:pi3b-img43.30.2. 创建ZFS池的方法 [259](#创建zfs池的方法)png]]</ol><ol start="11" style="list-style-type: lower-alpha;"><li>Then click '''OK'''</li>
[[\l|3File:pi3b-img44.30.3. 测试ZFS的数据去重功能 [261](#测试zfs的数据去重功能)png]]</ol><ol start="12" style="list-style-type: lower-alpha;"><li>Then click the position shown in the figure below</li>
[[\l|3File:pi3b-img45.30.4. 测试ZFS的数据压缩功能 [261](#测试zfs的数据压缩功能)png]]</ol><ol start="13" style="list-style-type: lower-alpha;"><li>Then select '''rk3566_MiniLoaderAll.bin''' in the '''MiniLoader''' folder downloaded earlier, and click to '''open'''</li>
[[\l|3.31. 关机和重启开发板的方法 [262](#关机和重启开发板的方法)]]<div class="figure">
[[\l|4File:pi3b-img46. Linux SDK——orangepi-build使用说明 [264](#_Toc10484)png]]
[[\l|4.1. 编译系统需求 [264](#编译系统需求)]]</div></ol><ol start="14" style="list-style-type: lower-alpha;"><li>Then click the position shown in the figure below</li>
[[\l|4File:pi3b-img47.1.1. 使用开发板的Ubuntu22.04系统编译 [264](#使用开发板的ubuntu22.04系统编译)png]]</ol><ol start="15" style="list-style-type: lower-alpha;"><li>Then select the path of the Linux image you want to burn, and then click '''Open'''</li>
[[\l{|4class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Before burning the image, it is recommended to rename the Linux image to be burned to orangepi.1img or other shorter names, so that you can see the percentage value of the burning progress when burning the image.2. 使用x64的Ubuntu22.04电脑编译 [264](#使用x64的ubuntu22.04电脑编译)]]'''</big>|}
[[\l|4File:pi3b-img48.2. 获取Linux sdk的源码 [266png]](#获取linux</ol><ol start="16" style="list-sdk的源码)]]style-type: lower-alpha;"><li>Then please check the '''mandatory write by address''' option</li>
[[\l|4File:pi3b-img49.2.1. 从github下载orangepipng]]</ol><ol start="17" style="list-style-build [266](#从github下载orangepitype: lower-build)]]alpha;"><li>Click the execute button again to start burning the Linux image to the tf card of the development board</li>
[[\l|4File:pi3b-img50.2.2. 下载交叉编译工具链 [268](#下载交叉编译工具链)png]]</ol><ol start="18" style="list-style-type: lower-alpha;"><li>The display log after burning the Linux image is shown in the figure below</li>
[[\l|4.2.3. orangepi-build完整目录结构说明 [269](#orangepi-build完整目录结构说明)]]<div class="figure">
[[\l|4.3File:pi3b-img51. 编译u-boot [270](#编译u-boot)png]]
[[\l|4</div></ol><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.4. 编译Linux内核 [274](#_Toc12646)]]</li></ol></li></ol><span id="how-to-use-win32diskimager-to-burn-linux-image"></span>
[[\l|4.5. 编译rootfs [278](#编译rootfs)]]=== How to use Win32Diskimager to burn Linux image ===
[[\l<ol style="list-style-type: decimal;"><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>{| class="wikitable" style="width:800px;" |-|4'''https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.6zip'''|}</ol><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. 编译Linux镜像 [281](#编译linux镜像)]]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>
[[\l|5. Android 11系统的使用说明 [285](#_Toc17425)]]<div class="figure">
[[\l|5File:pi3b-img52.1. 已支持的Android版本 [285](#已支持的android版本)png]]
[[\l|5.2. Android 功能适配情况 [285]</div></ol><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 (#android-功能适配情况Y)]]'''&quot;</li>
[[\l|5.3File:pi3b-img53. WIFI的连接测试方法 [286](#wifi的连接测试方法)png]]</ol><ol start="5" style="list-style-type: lower-alpha;"><li>After formatting the TF card, the information shown in the figure below will pop up, click OK</li>
[[\l|5File:pi3b-img54.png]]</ol></li></ol><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. Wiorg/html/hardWare/computerAndMicrocontrollers/service-Fi hotspot的使用方法 [288and-support/Orange-Pi-3B.html '''Orange Pi data download page'''](#wi, 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-fistyle-hotspot的使用方法type: lower-alpha;"><li>The download page of Win32Diskimager is</li>{| class="wikitable" style="width:800px;" |-| '''http://sourceforge.net/projects/win32diskimager/files/Archive/'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li><p>After downloading, install it directly. The interface of Win32Diskimager is as follows</p><ol style="list-style-type: none;"><li><p>a) First select the path of the image file</p></li><li><p>b) 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>c)]]Finally click &quot;'''Write'''&quot; to start burning</p></li>
[[\l|5.5. 蓝牙的测试方法 [290](#蓝牙的测试方法)]]<div class="figure">
[[\l|5File:pi3b-img55.6. 树莓派5寸屏幕的使用方法 [294](#树莓派5寸屏幕的使用方法)png]]
[[\l|5.7. 40pin 接口 GPIO、UART、SPI 和 PWM 测试 [295](#_Toc17235)]]</div></ol></li></ol><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></li></ol><span id="method-of-burning-linux-image-to-tf-card-based-on-ubuntu-pc"></span>
[[\l|5.7.1. 40pin GPIO 口测试 [295](#pin-gpio-口测试)]]== Method of burning Linux image to TF card based on Ubuntu PC ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that the Linux image mentioned here specifically refers to the images of Linux distributions such as Debian and Ubuntu downloaded from the [[\l|5http://www.7orangepi.2org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B. 40pin的UART测试 [298](#pin的uart测试-2)]html Orange Pi data download page], and the Ubuntu PC refers to the personal computer with the Ubuntu system installed.'''</big>|}
[[\l|5# First prepare a TF card with a capacity of 16GB or more.7The transmission speed of the TF card must be '''class 10''' or above.3. 40pin的SPI测试 [301](It is recommended to use a TF card of SanDisk and other brands# Then use the card reader to insert the TF card into the computer#pin的spi测试)]]Download the balenaEtcher software, the download address is
::{| class="wikitable" style="width:800px;" |-| [[\l|5https://www.balena.7io/etcher/ '''https://www.4balena. 40pin的PWM测试 [304](#pin的pwm测试)]io/etcher/''']|}
[[\l|5.8. ADB的使用方法 [307](#adb的使用方法)]]<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>
[[\l|5File:pi3b-img20.8.1. 使用网络连接adb调试 [307](#使用网络连接adb调试)png]]</ol><ol start="5" style="list-style-type: decimal;"><li>Then choose to download the Linux version of the software</li>
[[\l|6File:pi3b-img56. 附录 [309png](#附录)]</ol><ol start="6" style="list-style-type: decimal;"><li>Download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.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>
[[\l|6.1. 用户手册更新历史 [309](#用户手册更新历史)]]The decompression command for the compressed package ending in 7z is as follows
[[\l{|6class="wikitable" style="width:800px;" |-| test@test:~$ '''7z x Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.2160. 镜像更新历史 [309](#镜像更新历史)]]7z'''
<span id="orange-pi-3b的基本特性"></span>= Orange Pi 3B的基本特性 =test@test:~$ '''ls Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.160.*'''
<span id="什么是-orange-pi-3b"></span>== 什么是 Orange Pi 3B ==Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.160.7z
Orange Pi 3B采用了瑞芯微RK3566四核64位Cortex-A55处理器,采用的22nm工艺,主频最高可达1Orangepi3b_1.8GHz,集成ARM Mali-G52 GPU,内嵌高性能2D图像加速模块,内置00.8Tops算力的AI加速器NPU,可选2GB、4GB或者8GB内存,具有高达4K显示处理能力。0_debian_bullseye_desktop_xfce_Linux5.10.160.sha #checksum file
Orange Pi 3B引出了相当丰富的接口,包括HDMI输出、MOrangepi3b_1.2 PCIe20.0x1、千兆网口、USB20_debian_bullseye_desktop_xfce_Linux5.0、USB310.0接口和40pin扩展排针等。可广泛适用于高端平板、边缘计算、人工智能、云计算、AR160.img #mirror file|}</ol><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</VR、智能安防、智能家居等领域,覆盖 AIoT各个行业。li>
Orange Pi 3B支持Android11、Ubuntu22{| class="wikitable" style="width:800px;" |-| test@test:~$ '''sha256sum -c *.04、Ubuntu20.04、Debian11、Debian12、开源鸿蒙4.0 Beta1、Orange Pi OS(Arch)、基于开源鸿蒙的Orange Pi OS(OH)等操作系统。sha'''
Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_Linux5.10.160.img: OK|}</ol><span idol start="orange8" style="list-pistyle-3b的用途type: decimal;"><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</spanli>== Orange Pi 3B的用途 ==
我们可以用它实现:[[File:pi3b-img57.png]]</ol><ol start="9" style="list-style-type: decimal;"><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>
* 一台Linux桌面计算机* 一台Linux网络服务器* Android平板* Android游戏机等<div class="figure">
'''当然还有其他更多的功能,依托强大的生态系统以及各式各样的扩展配件,Orange Pi可以帮助用户轻松实现从创意到原型再到批量生产的交付,是创客、梦想家、业余爱好者的理想创意平台。'''[[File:pi3b-img25.png]] </div></ol></li></ol><ol start="10" 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>
[[File:pi3b-img58.png]]<span id/ol><ol start="11" style="orangelist-pistyle-3b的硬件特性type: decimal;"><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</spanli>== Orange Pi 3B的硬件特性 ==
[[File:pi3b-img59.png]]
</ol>
<ol start="12" style="list-style-type: decimal;">
<li>After successful burning, the display interface of balenaEtcher is as 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.</li>
[[File:pi3b-img60.png]]</ol><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>=== Using RKDevTool to burn the Linux image into eMMC ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
| <big>'''硬件规格参数Note that all the following operations are performed on a Windows computer.'''</big>|}{|class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
| 主控芯片| Rockchip RK3566|<big>'''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/hardWare/computerAndMicrocontrollers/service-and-support/Orange-| CPU| 四核 64 位 CortexPi-A55 处理器,22nm 先进工艺,主频最高 13B.html Orange Pi data download page].8GHz|-| GPU'''</big>| ·ARM Mali G52 2EE图形处理器}
·支持OpenGL ES 1# The development board reserves the expansion interface of the eMMC module.1/2Before burning the system to the eMMC, you first need to purchase an eMMC module that matches the eMMC interface of the development board.0/3Then install the eMMC module to the development board.2,OpenCL 2.0,Vulkan 1.1The eMMC module and the method of plugging into the development board are as follows:
·内嵌高性能2D加速硬件::[[File:pi3b-img61.png|400px]] [[File:pi3b-img62.png|400px]]
|::[[File:pi3b-| NPUimg63.png| ·集成 RKNN NPU AI 加速器,0.8Tops@INT8 性能800px]]
·支持 C affe<ol start="2" style="list-style-type: decimal;"><li>You also need to prepare a good quality USB2.0 male-to-male data cable</TensorFlow/TFLite/ONNX/PyTorch/Keras/Darknet 架构模型一键转换li>
|-| VPU| ·4K@60fps H.265/H.264/VP9 视频解码<div class="figure">
·1080P@100fps H[[File:pi3b-img16.265 视频编码png]]
·1080P@60fpsH</div></ol><ol start="3" style="list-style-type: decimal;"><li><p>Then download the Rockchip driver '''DriverAssitant_v5.264 视频编码12.zip''' and '''MiniLoader''' and the burning tool '''RKDevTool_Release_v3.15.zip''' from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.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>
|-<div class="figure">| PMU| Rockchip RK809-5|[[File:pi3b-| 内存| 2GB/4GB/8GB (LPDDR4/4x)|-| 存储| ·支持eMMC模块:16GB/32GB/64GB/128GBimg29.png]]
·SPI Flash</div></ol><ol start="2" style="list-style-type: 16MBlower-alpha;"><li>Then download all the files below</32MBli>
·M.2 M-KEY插槽:SATA3 或者 PCIe2.0 NVME SSD<div class="figure">
·TF卡槽[[File:pi3b-img30.png]]
</div>
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
| Wi-Fi+蓝牙| Wi<big>'''Note that the &quot;MiniLoader-Fi 5+BT 5things needed to burn the Linux image&quot; folder is hereinafter referred to as the MiniLoader folder.0,BLE(20U5622)'''</big>|-}| 以太网收发器</ol>| 10</100li></1000Mbps以太网(板载PHY芯片:YT8531C)ol>|<ol start="4" style="list-style-type: decimal;">| 显示<li><p>Then download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.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>| ·1x HDMI TX 2<li><p>Then use the decompression software to decompress '''DriverAssitant_v5.12.zip''', and then find the '''DriverInstall.0,最大支持4K@60FPSexe''' executable file in the decompressed folder and open it</p></li>
·1xMIPI DSI 2 Lane[[File:pi3b-img31.png]]</ol><ol start="6" style="list-style-type: decimal;"><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>
·eDP1[[File:pi3b-img32.3png]]</ol><ol start="2" style="list-style-type: lower-alpha;"><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>
|[[File:pi3b-img33.png]]| 摄像头</ol>| 1xMIPI CSI 2 Lane摄像头接口</li></ol>|<ol start="7" style="list-style-type: decimal;">| USB| ·1xUSB 2<li>Then decompress '''RKDevTool_Release_v3.15.0 支持Device或HOST模式zip''', this software does not need to be installed, just find '''RKDevTool''' in the decompressed folder and open it</li>
·1xUSB 3[[File:pi3b-img34.png]]</ol><ol start="8" 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 HOSTmale-to-male data cable at this time, the lower left corner will prompt &quot;'''No device found'''&quot;</li>
·2xUSB 2[[File:pi3b-img35.png]]</ol><ol start="9" style="list-style-type: decimal;"><li><p>Then start burning the Linux image into eMMC</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 HOSTprogramming port of the development board is shown in the figure below</li>
|-| 音频| 3.5mm耳机孔音频输入/输出|-| 按键| 1x MaskROM键,1xRESET键,1 xPOWER键|-| FAN| 2Pin 1.25mm规格的5V风扇接口|-| RTC| 2Pin 1.25mm规格的备用电池接口|-| 40Pin| 40Pin功能扩展接口,支持以下接口类型:<div class="figure">
GPIO、UART、I2C、SPI、PWM[[File:pi3b-img36.png]]
|-</div></ol>| 电源| Type<ol start="2" style="list-C 5V3A|style-| 支持的操作系统| Android11、Ubuntu22 .04、Ubuntu20.04、Debian11、Debian12、开源鸿蒙4.0 Beta1、Orange Pi OS(Arch)、基于开源鸿蒙的Orange Pi OS(OH)等操作系统。|type: lower-alpha;">| '''外观规格介绍'''<li><p>Make sure that the development board is not inserted into the TF card and not connected to the power supply</p></li>||-| PCB尺寸| 85mm x 56mm x 17mm|-| 重量| 49g|-| [] (media<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></image3.pn g){width=“0.2694 7944006999125in” height=“0.3153 127734033246in”}li>
rangePi™是 深圳市迅龙软件有 限公司的注册商标[[File:pi3b-img37.png]]</ol><ol start="4" style="list-style-type: lower-alpha;"><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>
|[[File:pi3b-img38.png]]|}</ol><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>
[[File:pi3b-img39.png]]</ol><span idol start="orange6" style="list-style-pitype: lower-3b的顶层视图和底层视图alpha;"><li>Then place the mouse cursor in the area below</spanli>== Orange Pi 3B的顶层视图和底层视图 == '''顶层视图:'''
<div class="figure">
[[File:media/image4pi3b-img64.jpeg|447x348px|_MG_1982(1)png]]
</div></ol>'''底层视图:'''<ol start="7" 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>
[[File:pi3b-img41.png]]<div class/ol><ol start="8" style="figurelist-style-type: lower-alpha;"><li>Then select the '''import configuration''' option</li>
[[File:media/image5pi3b-img42.jpeg|438x331px|_MG_1986(1)png]]</ol><ol style="list-style-type: lower-roman;"><li>Then select the '''rk3588_Linux_emmc.cfg''' configuration file in the '''MiniLoader''' folder downloaded earlier, and click '''Open'''</li>
[[File:pi3b-img65.png]]</divol><span idol start="orange10" style="list-pistyle-3b的接口详情图type: lower-alpha;"><li>Then click '''OK'''</spanli>== Orange Pi 3B的接口详情图 ==
[[File:pi3b-img66.png]]<div class/ol><ol start="11" style="list-style-type: lower-alpha;"><li>Then click the position shown in the figure"below</li>
[[File:media/image6pi3b-img67.jpeg|576x752px|06e73d88e8e969cc17f52f732f5f82b2png]]</ol><ol start="12" style="list-style-type: lower-alpha;"><li>Then select '''rk3566_MiniLoaderAll.bin''' in the '''MiniLoader''' folder downloaded earlier, and then click to '''open'''</li>
</divclass="figure"> [[File:media/image7pi3b-img68.png|575x277px]]
'''四个定位孔的直径都是3.0mm,M.2 PICE设备固定孔直径为3.5mm。'''</div></ol><ol start="13" style="list-style-type: lower-alpha;"><li>Then click the position shown in the figure below</li>
[[File:pi3b-img69.png]]</ol><ol start= "14" style="list-style-type: lower-alpha;"><li>Then select the path of the Linux image you want to burn, and then click '''开发板使用介绍Open''' =</li>
{| class="wikitable" style= 准备需要的配件 =="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|}
<ol style="list-style-type: decimal;"><li><p>TF卡,最小16GB容量(推荐32GB或以上)的'''class10'''级或以上的高速闪迪卡</p><p>[[File:media/image8pi3b-img48.png|124x96px]]</p></li><li><p>TF卡读卡器,用于将镜像烧录到TF卡中</pol><p>[[File:media/image9.png|139x106px]]</p></li><li><p>HDMI接口的显示器</p><p>[[Fileol start="15" style="list-style-type: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的Typelower-C电源供电</p><p>[[File:media/image12.png|188x133px]]</p></lialpha;"><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的散热风扇。如下图所示,开发板上有用于接散热风扇的接口,接口规格为Then please check the option to '''2pin 1.25mm间距force writing by address'''</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">
[[File:media/image17pi3b-img70.png|158x155px|D6BB9058]]</ol><ol start="16" style="list-CDC3style-42d7type: lower-A7FC-FBF630D886B7]]alpha;"><li>Click the execute button again to start burning the Linux image to the eMMC of the development board</li>
</div></li><li><p>'''3.3V'''的USB转TTL模块和杜邦线,使用串口调试功能时,需要USB转TTL模块和杜邦线来连接开发板和电脑</p><p>[[File:media/image18pi3b-img71.png|217x89px|G7U7JZX(V`L$`A6864]38$P]] [[File:media/image19.png|305x110px]]</pol></liol start="17" style="list-style-type: lower-alpha;"><li><p>安装有Ubuntu和Windows操作系统的个人电脑</p>The log displayed after burning the Linux image is shown in the figure below</li></ol>
[[File:pi3b-img72.png]]</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>{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
| style<big>'''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 [[Orange Pi 3B#Using RKDevTool to clear SPIFlash|the method of using RKDevTool to clear SPIFlash]].'''</big>|}</ol></li></ol><span id="textuse-align: left;the-dd-command-to-burn-the-linux-image-into-emmc"| 1></span> === Use the dd command to burn the Linux image into eMMC === {| styleclass="text-align: left;wikitable"| Ubuntu22.04 PC| style="textbackground-aligncolor: left#ffffdc;width:800px;"| 可选,用于编译Linux源码
|-
| style="text<big>'''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/hardWare/computerAndMicrocontrollers/service-and-align: left;"| 2| style="textsupport/Orange-align: left;"| Windows PC| style="textPi-align: left;"| 用于烧录Android和Linux镜像3B.html Orange Pi data download page].'''</big>
|}
== 下载开发板的镜像和相关的资料 == # 中文版资料的下载网址为: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:
'''http://www:[[File:pi3b-img61.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pipng|400px]] [[File:pi3b-3Bimg62.html'''png|400px]]
::[[File:media/image20pi3b-img63.png|576x455px800px]]
<ol start="2" style="list-style-type: decimal;">
<li><p>英文版资料的下载网址为:</p><p>'''http://wwwUsing 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.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/For the method of burning the Linux image to the TF card, please refer to the instructions in the two sections of [[Orange-Pi-3B.html'''</p><p>[[File:media/image21.png#Method of burning Linux image to TF card based on Windows PC|575x481px]]</p></li><li><p>资料主要包含</p><ol style="list-style-type: lower-alpha;"><li><p>'''Android源码the method of burning the Linux image to the TF card based on the Windows PC''':保存在百度云盘和谷歌网盘上</p></li><li><p>]] and [[Orange Pi 3B#Method of burning Linux image to TF card based on Ubuntu PC|'''Linux源码the method of burning the Linux image to the TF card based on the Ubuntu PC''':保存在Github上]].</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 [[Orange Pi 3B#The method of uploading files to the Linux system of the development board|'''用户手册和原理图: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 '''官方工具:'''主要包括开发板使用过程中需要用到的软件</p><home/li><li><p>'''Android镜像''':保存在百度云盘和谷歌网盘上<orangepi/p></li><li><p>Desktop'''Ubuntu镜像directory Download it, and then enter the ''':保存在百度云盘和谷歌网盘上</p><home/li><li><p>'''Debian镜像''':保存在百度云盘和谷歌网盘上</p><orangepi/li><li><p>Desktop'''Orange Pi OS镜像''':保存在百度云盘和谷歌网盘上</p></li><li><p>'''OpenHarmony镜像''':保存在百度云盘和谷歌网盘上directory to see the uploaded image file.</p></li></ol></li></ol>
<span id{| class="基于windowswikitable" style="width:800px;" |-pc将linux镜像烧写到tf卡的方法"><| orangepi@orangepi:~$ '''cd /home/orangepi/span>== 基于Windows PC将Linux镜像烧写到TF卡的方法 ==Desktop'''
orangepi@orangepi:~/Desktop$ '''注意,这里说的Linux镜像具体指的是从[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange Pi资料下载页面]下载的Debian、Ubuntu这样的Linux发行版镜像。ls'''
<span idOrangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img|}{| class="wikitable" style="使用balenaetcher烧录linux镜像的方法background-color:#ffffdc;width:800px;">|-| </spanbig>=== '''使用''How to enter the command line of the development board Linux system?'balenaEtcher'''烧录Linux镜像的方法''' ===
# 首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''级或'''class10'''级以上,建议使用闪迪等品牌的TF卡# 然后使用读卡器把TF卡插入电脑# 从1. For the method of using the serial port to log in to the terminal, please refer to the instructions in the section on [[http://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面'''Pi 3B#How to use the debugging serial port|how to use the debugging serial port]]下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”'''.img'''”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上。# 然后下载Linux镜像的烧录软件——'''balenaEtcher''',下载地址为:
[https://www.balena.io/etcher/ '''https://www2.balenaUse ssh to remotely log in to the Linux system, please refer to the instructions in the section of [[Orange Pi 3B#SSH remote login development board|SSH remote login to the development board]].io/etcher/''']
'''3. If HDMI, LCD and other display screens are connected, you can open a command line terminal on the desktop.'''</big>
|}
</ol>
<!-- -->
<ol start="5" style="list-style-type: decimal;">
<li><p>进入balenaEtcher下载页面后,点击绿色的下载按钮会跳到软件下载的地方Next, we first use the following command to confirm the device node of eMMC</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>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~/Desktop$ '''打开balenaEtcher时如果提示下面的错误:ls /dev/mmcblk*boot0 | cut -c1-12'''
[[File'''<span style="color:media#FF0000">/image25dev/mmcblk0</span>'''|}</ol><ol start="6" style="list-style-type: decimal;"><li>Then we can use the dd command to clear the eMMC.png|209x164px]]Note that after the '''of=''' parameter, please fill in the output result of the above command</li>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~/Desktop$ '''请选择balenaEtcher后点击右键,然后选择以管理员身份运行。sudo dd bs=1M if=/dev/zero of=<span style="color:#FF0000">/dev/mmcblk0</span> count=1000 status=progress'''
[[Fileorangepi@orangepi:media~/image26.pngDesktop$ '''sudo sync'''|273x37px]]}</ol><ol start="87" style="list-style-type: decimal;"><li><p>使用balenaEtcher烧录Linux镜像的具体步骤如下所示Then you can use the dd command to burn the Linux image of the development board into the eMMC</p>
<ol style="list-style-type: lower-alpha;">
<li><p>首先选择要烧录的Linux镜像文件的路径<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 /p><home/li><li><p>然后选择TF卡的盘符<orangepi/p><Desktop/li><li><p>最后点击Flash就会开始烧录Linux镜像到TF卡中</p><p>[[File:media/image27Linux image'''). Because we have entered the path of the Linux image above, we only need to fill in the name of the Linux image.png|423x237px]]</p></li></ol></li><li><p>balenaEtcher烧录Linux镜像的过程显示的界面如下图所示,另外进度条显示紫色表示正在烧录Linux镜像到TF卡中</p><p>[[File:media/image28Please 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).png|428x268px]]</p></li><li><p>Linux镜像烧录完后,balenaEtcher默认还会对烧录到TF卡中的镜像进行校验,确保烧录过程没有出问题。如下图所示,显示绿色的进度条就表示镜像已经烧录完成,balenaEtcher正在对烧录完成的镜像进行校验</p>{| class="wikitable" style="width:800px;" <p>[[File:media/image29.png|427x267px]]</p></li>-<li><p>成功烧录完成后balenaEtcher的显示界面如下图所示,如果显示绿色的指示图标说明镜像烧录成功,此时就可以退出balenaEtcher,然后拔出TF卡插入到开发板的TF卡槽中使用了</p>| '''sudo dd bs=1M if=Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img of=<pspan style="color:#FF0000">[[File:media/image30.png|430x266px]]<dev/p></li>mmcblk0</olspan>status=progress'''
'''sudo''' '''sync'''|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''<span idstyle="使用rkdevtool烧录linux镜像到tf卡中的方法color:#FF0000">Note, if you upload a .7z or .xz Linux image compressed file, please remember to decompress it before using the dd command to burn.</span>=== 使用RKDevTool烧录Linux镜像到TF卡中的方法 ==='''
<ol style="list-style-type: decimal;">
<li><p>首先需要准备一根品质良好的USB2.0公对公数据线</p>
<div class="figure">
[[File:media/image17.png|146x143px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]] </div></li><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><ol style="list-style-type: lower-alpha;"><li><p>在[http://wwwThe 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.orangepi.cn/html/serviceAndSupport/index.html Orange &gt; Pi的资料下载页面]首先选择'''官方工具''',然后进入下面的文件夹中</pbig><p>[[File:media/image31.png|267x56px]]</p></li>}<li><p>然后下载下面的所有文件</pol><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 start="8" style="list-style-type: lower-alphadecimal;"><li><p>点击”After successfully burning the Linux image of the development board to the eMMC, you can use the '''驱动安装poweroff'''”按钮</p><p>[[File:media/image34command to shut down.png|245x129px]]</p></li><li><p>等待一段时间后,会弹出窗口提示”'''安装驱动成功'''”,然后点击'''“确定”'''按钮即可</p><p>[[File:media/image35Then 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.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 class="wikitable" style="listbackground-style-typecolor:#ffffdc;width: lower-alpha800px;"><li><p>首先通过USB2.0公对公数据线连接好开发板与Windows电脑,开发板USB2.0烧录口的位置如下图所示</p><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><pbig>如果前面的步骤顺利,此时开发板会进入'''MASKROM'''模式,在烧录工具的界面上会提示”'''发现一个MASKROM设备'''”</p><p>[[File:media/image41Note, after burning the image into eMMC, if the test finds that it cannot be started, please clear the SPIFlash and try again.png|454x213px]]</p></li><li><p>此时请在TF卡插槽中插入TF卡</p></li><li><p>然后将鼠标光标放在下面的这片区域中</p><p>For the method of clearing SPIFlash, please refer to [[File:media/image42.pngOrange Pi 3B#Using RKDevTool to clear SPIFlash|452x212pxthe method of using RKDevTool to clear SPIFlash]]</p></li><li><p>然后点击鼠标右键会弹出下图所示的选择界面</p><p>[[File:media/image43.png|453x213px]]</p></li><li><p>然后选择'''导入配置'''选项</pbig><p>[[File:media/image44.png|458x215px]]</p></li>}<li><p>然后选择前面下载的'''MiniLoader'''文件夹中的'''rk3588_linux_tfcard.cfg'''配置文件,再点击'''打开'''</pol><p>[[File:media/image45.png|457x215px]]</p></li><lispan id="how-to-write-linux-image-to-spiflashnvme-ssd"><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"span>
[[File:media/image48.png|494x232px|[78~~Z7UFB@US@8P$QL%OM6]]== How to write Linux image to SPIFlash+NVMe SSD ==
</div></li>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-<li><p>然后点击下图所示的位置</p>| <pbig>'''Note that the Linux image mentioned here specifically refers to the images of Linux distributions such as Debian and Ubuntu downloaded from the [[Filehttp:media/image49/www.png|493x232px]]<orangepi.org/html/hardWare/p><computerAndMicrocontrollers/li><li><p>然后选择想要烧录的Linux镜像的路径,再点击'''打开'''<service-and-support/p><p>'''在烧录镜像前,建议将要烧录的Linux镜像重命名为orangepiOrange-Pi-3B.html Orange Pi data download page].img或者其它比较短的名字,这样在烧录镜像的时候就能看到烧录进度的百分比数值。'''</pbig><p>[[File|}{| class="wikitable" style="background-color:#ffffdc;width:media/image50.png800px;" |-|499x234px]]</p></li><li><pbig>然后请勾选上'''强制按地址写Note that all the following operations are performed on a Windows computer.'''选项</p><p>[[File:media/image51.png|497x234px]]</p></li><li><p>再点击执行按钮就会开始烧录Linux镜像到开发板的tf卡中</pbig><p>[[File:media/image52.png|497x233px]]</p></li><li><p>Linux镜像烧录完后的显示log如下图所示</p><div class="figure">}
[[File:media/image53.png|492x231px|%O4~FPPAT$0RH{3S~CGJ@@Q(1)]] </div></li><li><p>烧录完Linux镜像到tf卡中后,Linux系统会自动启动。</p></li></ol></li></ol> <span id="使用win32diskimager烧录linux镜像的方法using-rkdevtool-to-burn"></span>=== '''使用Win32Diskimager烧录Linux镜像的方法''' Using RKDevTool to burn ===
<ol style="list-style-type: decimal;">
<li><p>首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''级或'''class10'''级以上,建议使用闪迪等品牌的TF卡<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/p></li><li><p>然后使用读卡器把TF卡插入电脑</p></li><li><p>接着格式化TF卡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>可以使用'''SD Card Formatter'''这个软件格式化TF卡,其下载地址为The M.2 2230 SSD is as follows</li></ol></li></ol>
[https[File://wwwpi3b-img73.sdcard.orgpng]]</downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip '''httpsol><ol start="2" style="list-style-type://www.sdcardlower-alpha;"><li>The M.org/downloads/formatter/eula_windows2 2242 SSD is as follows</SDCardFormatterv5_WinEN.zip''']li>
[[File:pi3b-img74.png]]</ol></li></ol><ol start="2" style="list-style-type: lower-alphadecimal;"><li><p>下载完后直接解压安装即可,然后打开软件Then insert the NVMe SSD into the M.2 PCIe interface of the development board and fix it</p></li><li><p>如果电脑只插入了TF卡,则”'''Select card'''”一栏中会显示TF卡的盘符,如果电脑插入了多个USB存储设备,可以通过下拉框选择TF卡对应的盘符</p><div class="figure">
[[File:media/image54pi3b-img75.png|209x228px|选区_199]]</ol><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>
[[File:pi3b-img76.png]]</divol></liol start="4" style="list-style-type: decimal;"><li><p>然后点击”'''Format'''”,格式化前会弹出一个警告框,选择”'''是(Y)'''”后就会开始格式化</p>Then you need to prepare a good quality USB2.0 male-to-male data cable</li></ol>
[[File:media/image55.png|304x147px]]<div class="figure">
<ol start="5" style="list-style-type: lower-alpha;"><li><p>格式化完TF卡后会弹出下图所示的信息,点击确定即可</p><p>[[File:media/image56pi3b-img16.png|186x149px]]</p></li></ol>
<!-- --/div></ol><ol start="45" style="list-style-type: decimal;"><li><p>从[http://www.orangepi.cn/html/serviceAndSupport/index.html Then download the Rockchip driver '''Orange Pi的资料下载页面DriverAssitant_v5.12.zip''']下载想要烧录的Linux操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”and '''.imgMiniLoader'''”结尾的文件就是操作系统的镜像文件,大小一般都在2GB以上</p></li><li><p>使用and the burning tool '''Win32DiskimagerRKDevTool_Release_v3.15.zip'''烧录Linux镜像到TF卡from the Orange Pi data download page</p>
<ol style="list-style-type: lower-alpha;">
<li>Win32Diskimager的下载页面为On the data download page of Orange Pi, first select the '''official tool''', and then enter the following folder</li></ol> </li></oldiv class="figure">
[http[File://sourceforgepi3b-img29.net/projects/win32diskimager/files/Archive/ '''http://sourceforge.net/projects/win32diskimager/files/Archive/'''png]]
</div></ol>
<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>Then download all the files below</li><li><p>镜像写入完成后,点击”'''退出'''”按钮退出即可,然后就可以拔出TF卡插到开发板中启动</p></li></ol>
<span iddiv class="基于ubuntu-pc将linux镜像烧写到tf卡的方法figure"></span>== 基于Ubuntu PC将Linux镜像烧写到TF卡的方法 ==
'''注意,这里说的Linux镜像具体指的是从[http[File://wwwpi3b-img30.orangepi.cn/html/serviceAndSupport/index.html Orange Pi资料下载页面png]]下载的Debian、Ubuntu这样的Linux发行版镜像,Ubuntu PC指的是安装了Ubuntu系统的个人电脑。'''
</div>{| class="wikitable" style="background-color:# 首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为ffffdc;width:800px;" |-| <big>'''Note that the &quot;MiniLoader-things needed to burn the Linux image&quot; folder is hereinafter referred to as the MiniLoader folder.'''</big>|}</ol></li></ol><ol start="6" style="list-style-type: decimal;"><li><p>Then download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html '''class10Orange Pi data download page'''级或], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;'''class10.img'''级以上,建议使用闪迪等品牌的TF卡&quot; is the image file of the operating system , the size is generally more than 2GB</p></li># 然后使用读卡器把TF卡插入电脑# 下载balenaEtcher软件,下载地址为<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>
[https[File://wwwpi3b-img31.balena.io/etcher/ '''https://www.balena.io/etcher/'''png]]</ol><ol start="48" style="list-style-type: decimal;"><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操作系统镜像文件压缩包,然后使用解压软件解压,解压后的文件中,以”After opening '''DriverInstall.imgexe'''”结尾的文件就是操作系统的镜像文件,大小一般都在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镜像的具体步骤如下所示, the steps to install the Rockchip driver are as follows</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>Click the &quot;'''Driver Installation'''&quot; button</li><li><p>Linux镜像烧录完后,balenaEtcher默认还会对烧录到TF卡中的镜像进行校验,确保烧录过程没有出问题。如下图所示,显示绿色的进度条就表示镜像已经烧录完成,balenaEtcher正在对烧录完成的镜像进行校验</p><p>[[File:media/image62.png|436x190px]]</p></li></ol>
[[File:pi3b-img32.png]]<!-- --/ol><ol start="122" style="list-style-type: decimallower-alpha;"><li><p>成功烧录完成后balenaEtcher的显示界面如下图所示,如果显示绿色的指示图标说明镜像烧录成功,此时就可以退出balenaEtcher,然后拔出TF卡插入到开发板的TF卡槽中使用了</p><p>[[File:media/image63After 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.png|435x257px]]</p></li></ol>
[[File:pi3b-img33.png]]</ol></li></ol><span idol start="烧录linux镜像到emmc中的方法9" 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</spanli>== 烧录Linux镜像到eMMC中的方法 ==
[[File:pi3b-img34.png]]<span id/ol><ol start="使用rkdevtool烧录linux镜像到emmc中的方法10"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;</spanli>=== 使用RKDevTool烧录Linux镜像到eMMC中的方法 ===
'''注意,下面所有的操作都是在Windows电脑中进行的。'''[[File:pi3b-img35.png]]</ol><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>
'''注意,这里说的Linux镜像具体指的是从[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange Pi资料下载页面]下载的Debian、Ubuntu这样的Linux发行版镜像。'''
 
<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:media/image17pi3b-img36.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
</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>然后从[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 stylestart="list-style-type: lower-alpha;2"><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]]Make sure that the development board is not connected to the power supply and inserted into the TF card and eMMC</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>[[FileThen 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: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:media/image70pi3b-img37.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]</ol><ol start="4" style="list-style-type: lower-alpha;"><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>
</div></li><li><p>然后点击下图所示的位置</p><p>[[File:media/image71pi3b-img38.png|459x216px]]</p></li><li><p>然后选择想要烧录的Linux镜像的路径,再点击'''打开'''</pol><p>'''在烧录镜像前,建议将要烧录的Linux镜像重命名为orangepi.img或者其它比较短的名字,这样在烧录镜像的时候就能看到烧录进度的百分比数值。'''</p><p>[[Fileol start="5" style="list-style-type:media/image50.png|499x234px]]</p></lilower-alpha;"><li><p>然后请勾选上If the previous steps are successful, the development board will enter the '''强制按地址写MASKROM'''选项</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>mode at this time, and the interface of the burning tool will prompt &quot;'''注意,烧录镜像到eMMC中后如果测试发现启动不了,请清空下SPIFlash后再启动试下。清空SPIFlash的方法请参考[[\l|使用RKDevTool清空SPIFlash的方法]]小节的内容。found a MASKROM device'''</p></li></ol>&quot;</li></ol>
[[File:pi3b-img39.png]]<span id/ol><ol start="使用dd命令烧录linux镜像到emmc中的方法6"style="list-style-type: lower-alpha;"><li>Then place the mouse cursor in the area below</spanli>=== 使用dd命令烧录Linux镜像到eMMC中的方法 ===
'''注意,这里说的Linux镜像具体指的是从Orange Pi资料下载页面下载的Debian、Ubuntu或者OPi OS Arch这样的Linux发行版镜像。'''<div class="figure">
<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/image66pi3b-img64.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>
<!-/div></ol><ol start="7" style="list- style-type: lower-alpha;"># '''使用串口登录终端的方法请参考[[\l|调试串口的使用方法]]一小节的说明。'''# '''使用ssh远程登录Linux系统请参考[[\l|SSH远程登录开发板]]一小节的说明。'''# '''如果接了HDMI、LCD等显示屏幕,可以在桌面中打开一个命令行终端。'''<li>Then click the right mouse button and the selection interface shown in the figure below will pop up</li>
[[File:pi3b-img41.png]]<!-- --/ol><ol start="58" 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>下面的命令中 Then select the '''if=import configuration''' &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>option</li><li><p>当成功烧录开发板的Linux镜像到eMMC后,此时就可以使用'''poweroff'''命令关机了。然后请拔出TF卡,再短按电源按键开机,此时就会启动eMMC中的Linux系统了。</p><p>'''注意,烧录镜像到eMMC中后如果测试发现启动不了,请清空下SPIFlash后再启动试下。清空SPIFlash的方法请参考[[\l|使用RKDevTool清空SPIFlash的方法]]小节的内容。'''</p></li></ol>
[[File:pi3b-img42.png]]</ol><span idol start="烧写linux镜像到spiflashnvme9" style="list-ssd中的方法style-type: lower-alpha;"><li>Then enter the '''MiniLoader''' folder downloaded earlier, then select the '''rk3588_Linux_pcie.cfg''' configuration file, and click '''Open'''</spanli>== 烧写Linux镜像到SPIFlash+NVMe SSD中的方法 ==
[[File:pi3b-img77.png]]</ol><ol start="10" style="list-style-type: lower-alpha;"><li>Then click '''注意,这里说的Linux镜像具体指的是从Orange Pi资料下载页面下载的Debian、Ubuntu这样的Linux发行版镜像。OK'''</li>
'''注意,下面所有的操作都是在Windows电脑中进行的。'''[[File:pi3b-img78.png]]</ol><ol start="11" style="list-style-type: lower-alpha;"><li>Then click the position shown in the figure below</li>
[[File:pi3b-img79.png]]<span id/ol><ol start="使用rkdevtool烧录的方法12"style="list-style-type: lower-alpha;"><li>Then select '''rk3566_MiniLoaderAll.bin''' in the '''MiniLoader''' folder downloaded earlier, and then click to '''open'''</spanli>=== 使用RKDevTool烧录的方法 ===
<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">
[[File:media/image17pi3b-img68.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
</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 stylestart="list-style-type: lower-alpha;13"><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>Then click the position shown in the figure below</li><li><p>再选择前面下载的'''MiniLoader'''文件夹中'''rk3566_MiniLoaderAll.bin''',再点击'''打开'''</p><div class="figure">
[[File:media/image70pi3b-img80.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]]</ol><ol start="14" style="list-style-type: lower-alpha;"><li>Then enter the MiniLoader folder downloaded earlier, select '''rk3566_rkspi_loader.img''', and click '''Open'''</li>
</div></li>
<li><p>然后点击下图所示的位置</p>
<p>[[File:media/image83.png|486x228px]]</p></li>
<li><p>然后进入前面下载的'''MiniLoader'''文件夹中,再选择'''rk3566_rkspi_loader.img''',再点击'''打开'''</p>
<div class="figure">
[[File:media/image84pi3b-img81.png|488x228px|GGU}ZN)TL%P[INB(M%MNJV7]]
</div></liol><li><p>然后点击下图所示的位置</p><p>[[Fileol start="15" style="list-style-type: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]]</plower-alpha;"><p>'''如果烧录有问题,请先清空下SPIFlash然后再烧录试下。清空SPIFlash的方法请参考下[[\l|使用RKDevTool清空SPIFlash的方法]]一小节的说明。'''</p></li><li><p>镜像烧录完后会自动启动SPIFlash+PCIe &gt; SSD中的Linux系统,如果没有正常启动,请重新上电试下。</p></li></ol>Then click the position shown in the figure below</li></ol>
[[File:pi3b-img82.png]]</ol><ol start="16" style== 使用dd命令烧录的方法 ==="list-style-type: lower-alpha;"><li>Then select the path of the Linux image you want to burn, and then click '''Open'''</li>
<ol style{| class="list-style-type: decimal;wikitable"><li><p>首先需要准备一个NVMe SSD固态硬盘,开发板M.2插槽支持的PCIe为PCIe2.0x1,理论最高速度为500MB/s。PCIe3.0和PCIe4.0的NVMe SSD也是可以用的,只是速度最高只有PCIe2.0x1的速度。</p><ol style="listbackground-style-typecolor:#ffffdc;width: lower-alpha800px;"><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><pbig>先运行下'''nand-sata-install''''''普通用户记得加sudo权限'''</p><p>Before burning the image, it is recommended to rename the Linux image to be burned to orangepi@orangepi:~$ '''sudo nand-sata-install.img or other shorter names, so that you can see the percentage value of the burning progress when burning the image.'''</p></libig><li><p>然后选择'''7 Install/Update ther bootloader on SPI Flash'''</p></li></ol></li></ol>|}
[[File:pi3b-img48.png]]<div class/ol><ol start="17" style="figurelist-style-type: lower-alpha;"><li>Then please check the option to force writing by address</li>
[[File:media/image89pi3b-img83.png|355x174px|IMG_256]]</ol><ol start="18" style="list-style-type: lower-alpha;"><li>Click the Execute button again to start burning the Linux image to the SSD</li>
[[File:pi3b-img84.png]]</divol><ol start="319" style="list-style-type: lower-alpha;"><li>然后选择'''&lt;Yes&gt;'''The log displayed after burning the Linux image is shown in the figure below</li></ol>
<div class="figure">[[File:pi3b-img85.png]]
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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 [[File:media/image90.pngOrange Pi 3B#Using RKDevTool to clear SPIFlash|356x179px|IMG_256the method of using RKDevTool to clear SPIFlash]].'''</big>|}</ol><ol start="20" style="list-style-type: lower-alpha;"><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></li></ol><span id="the-method-of-using-the-dd-command-to-burn"></span>
</div><ol start="4" style="list-style-type: lower-alpha;"><li>然后请耐心等待烧录完成,烧录完成后显示如下所示(左下角会显示一个'''Done'''):</li></ol>= The method of using the dd command to burn ===
<div classol style="figurelist-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><ol style="list-style-type: lower-alpha;"><li>The M.2 2230 SSD is as follows</li>
[[File:media/image91pi3b-img73.png|358x161px|IMG_256]]</ol><ol start="2" style="list-style-type: lower-alpha;"><li>The M.2 2242 SSD is as follows</li>
[[File:pi3b-img74.png]]</divol></li></ol><ol start="62" 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_xThen insert the NVMe SSD into the M.x.x_debian_bullseye_desktop_xfce_linux5.10.160.img</p><p>'''怎么进入开发板Linux系统的命令行?'''</p>2 PCIe interface of the development board and fix it</li></ol>
<!-- --># '''使用串口登录终端的方法请参考[[\l|调试串口的使用方法File:pi3b-img75.png]]一小节的说明。'''# '''使用ssh远程登录Linux系统请参考[[\l|SSH远程登录开发板]]一小节的说明。'''</ol><ol start="3" style="list-style-type: decimal;"># '''如果接了HDMI、LCD等显示屏幕,可以在桌面中打开一个命令行终端。'''<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>
[[File:pi3b-img76.png]]<!-- --/ol><ol start="84" style="list-style-type: decimal;"><li><p>接下来,我们先确认下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 TiBBurning the Linux image to SPIFlash+NVMe SSD requires a TF card, 2048408248320 bytesso first you need to burn the Linux image to the TF card, 4000797360 sectors</p><p>使用'''lspci'''命令可以看到一个NVMe相关的PCI设备</p><p>orangepi@orangepi:~/Desktop$ '''lspci'''</p><p>00:00.0 PCI bridge: Fuzhou Rockchip Electronics Coand 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, 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>然后我们可以使用dd命令清空下NVMe SSD(可选)</p><p>orangepi@orangepi3b:~/Desktop$ please refer to the instructions in the two sections of [[Orange Pi 3B#Method of burning Linux image to TF card based on Windows PC|'''sudo dd bs=1M if=/dev/zero Method of=/dev/nvme0n1 count=2000 status=progressburning Linux image to TF card based on Windows PC'''</p><p>orangepi@orangepi3b:~/Desktop$ ]] and [[Orange Pi 3B#Method of burning Linux image to TF card based on Ubuntu PC|'''sudo syncthe method of burning the Linux image to the TF card based on the Ubuntu PC''']].</p></li><li><p>然后就可以使用dd命令烧录开发板的Linux镜像到NVMe SSD中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;">
<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 Run nand-sata-hinstall first, '''命令可以看到实际的硬盘容量</p><ol span style="list-style-typecolor: lower-alpha;#FF0000"><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:~$ '''ordinary users remember to add sudo fix_mmc_ssd.sh'''permission</p><pspan>'''一模一样的系统是指镜像名一字不差的意思。就算都是Debian11系统,版本不同也是不同的。'''</p></li></ol>
<span id{| class="使用balenaetcher软件烧录的方法wikitable"></span>=== 使用balenaEtcher软件烧录的方法 === <ol style="list-style-typewidth: decimal800px;"><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|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 nand-l | grep &quot;nvme0n1&quot;sata-install'''|}</pol><p>Disk /dev/nvme0n1ol start="2" style="list-style-type: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors</plower-alpha;"><pli>使用'''lspciThen select '''命令可以看到一个NVMe相关的PCI设备<7 Install/p><p>orangepi@orangepi:~/Desktop$ Update the bootloader on SPI Flash'''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>
<div class="figure">
[[File:media/image92pi3b-img86.png|506x249px|IMG_256]]
</div>'''如果没有预装,balenaEtcher arm64版本的下载安装方法请参考[[\l|下载安装arm64版本balenaEtcher的方法]]小节的说明。'''</ol><ol start="73" style="list-style-type: decimallower-alpha;"><li>balenaEtcher打开后的界面如下所示:Then select '''&lt;Yes&gt;'''</li></ol>
<div class="figure">
[[File:media/image93pi3b-img87.png|406x207px|IMG_256]]
</div></ol><ol start="8" style="list-style-type: decimal;4"><li><p>使用balenaEtcher烧录u-boot到开发板SPI Flash中的方法如下所示:</p><ol 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 '''Flash from fileDone'''will be displayed in the lower left corner):</li></ol></li></ol>
<div class="figure">
[[File:media/image94pi3b-img88.png|406x205px|IMG_256]]
</div></ol></li></ol><ol start="26" style="list-style-type: lower-alphadecimal;"><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 [[Orange Pi 3B#The method of uploading files to the Linux system of the development board|'''the method of uploading files to the development board Linux system''']].</usrp></lib/linux-u-boot-legacy-orangepi3b_1.xli><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.x_arm64For example, I store the Linux image of the development board in the '''目录,再选择/home/orangepi/Desktop'''rkspi_loader.imgdirectory Download it, and then enter the ''',再点击/home/orangepi/Desktop'''Open'''打开directory to see the uploaded image file.</lip></olli>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''cd /home/orangepi/Desktop'''
<div class="figure">orangepi@orangepi:~/Desktop$ '''ls'''
[[FileOrangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img|}{| class="wikitable" style="background-color:#ffffdc;width:media/image95.png800px;" |563x110px-|IMG_256]]<big>'''How to enter the command line of the development board Linux system?'''
</div><ol start="3" style="list-style-type: lower-alpha;"><li><p>打开'''rkspi_loader1.img'''后的界面如下所示:</p><p>For the method of using the serial port to log in to the terminal, please refer to the instructions in the section on [[File:media/image96.pngOrange Pi 3B#How to use the debugging serial port|379x181pxhow to use the debugging serial port]]</p></li><li><p>然后点击'''Select target.'''</p></li></ol>
<div class="figure">'''2. Use ssh to remotely log in to the Linux system, please refer to the instructions in the section of [[Orange Pi 3B#SSH remote login development board|SSH remote login to the development board]].'''
[[File'''3. If HDMI, LCD and other display screens are connected, you can open a command line terminal on the desktop.'''</big>|}</ol><!-- --><ol start="8" style="list-style-type:mediadecimal;"><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</image97.png|379x171px|IMG_256]]li>
</div><ol start{| class="5wikitable" style="list-style-typewidth: lower-alpha800px;"><li>然后点击|-| orangepi@orangepi:~/Desktop$ '''Show 2 hiddensudo fdisk -l | grep &quot;nvme0n1&quot;'''打开更多存储设备的选项</li></ol>
<div class="figure">Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors|}
[[File:media/image98.png|385x155px|IMG_256]]Use the '''lspci''' command to see an NVMe-related PCI device
</div><ol start{| class="6wikitable" style="list-style-typewidth: lower-alpha800px;"><li>然后选择SPI Flash的设备名'''|-| orangepi@orangepi:~/dev/mtdblock0Desktop$ ''',然后点击lspci'''Select'''</li></ol>
<div class="figure">00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)
[[File01:media/image9900.0 Non-Volatile memory controller: Realtek Semiconductor Co., Ltd.pngDevice 5765 (rev 01)|389x264px|IMG_256]]}</ol><ol start="9" style="list-style-type: decimal;"><li>Then we can use the dd command to clear the NVMe SSD (optional)</li>
</div><ol start{| class="7wikitable" style="list-style-typewidth: lower-alpha800px;"><li>然后点击|-| orangepi@orangepi3b:~/Desktop$ '''Flashsudo dd bs=1M if=/dev/zero of=/dev/nvme0n1 count=2000 status=progress'''</li></ol>
orangepi@orangepi3b:~/Desktop$ '''sudo sync'''|}<div class/ol><ol start="10" style="figurelist-style-type: decimal;"><li>Then you can use the dd command to burn the Linux image of the development board to the NVMe SSD</li>
[[File<!-- --><ol style="list-style-type:medialower-alpha;"><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 /image100home/orangepi/Desktop/Linux image''').png|394x268px|IMG_256]]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>
</div><ol start{| class="8wikitable" style="list-style-typewidth: lower-alpha800px;"><li>然后点击|-| '''Yes, I’m suresudo dd bs=1M if=Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img of=/dev/nvme0n1 status=progress'''</li></ol>
<div class="figure">
[[File'''sudo''' '''sync'''|}{| class="wikitable" style="background-color:#ffffdc;width:media/image101.png800px;" |396x269px-|IMG_256]]<big>'''<span style="color:#FF0000">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.</span>'''
</div>
<ol style="list-style-type: lower-roman;">
<li>然后输入开发板Linux系统的密码'''orangepi''',就会开始烧录u-boot镜像到SPI &gt; Flash中</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.'''<div class/big>|}</ol></ol><ol start="11" style="figurelist-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>After starting the system in the NVMe SSD, use the '''df -h''' command to see the actual hard disk capacity</p><ol style="list-style-type: lower-alpha;"><li>128GB NVMe SSD</li>
[[File{| class="wikitable" style="width:800px;"|-|<p>orangepi@orangepi:~$ '''df -h'''</p><span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail</span><span style="margin-right: 50px;">Use% Mounted on</span><br><span style="margin-right:media110px;">udev</image102span><span style="margin-right: 60px;">3.png8G </span><span style="margin-right: 50px;">8.0K </span><span style="margin-right: 70px;">3.8G </span><span style="margin-right: 90px;">1% /dev</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 30px;">1.4M </span><span style="margin-right: 70px;">768M </span><span style="margin-right: 90px;">1% /run</span><br><span style="margin-right: 25px;color:#FF0000">'''/dev/nvme0n1p2'''</span><span style="margin-right: 50px;color:#FF0000">'''118G '''</span><span style="margin-right: 35px;color:#FF0000">'''5.8G '''</span><span style="margin-right: 80px;color:#FF0000">'''111G '''</span><span style="margin-right: 90px;color:#FF0000">'''5% /'''</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">3.8G </span><span style="margin-right: 50px;">0</span><span style="margin-right: 50px;">3.8G </span><span style="margin-right: 90px;">0% /dev/shm</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">5.0M </span><span style="margin-right: 50px;">4.0K </span><span style="margin-right: 50px;">5.0M </span><span style="margin-right: 90px;">1% /run/lock</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">3.8G </span><span style="margin-right: 50px;">16K </span><span style="margin-right: 50px;">3.8G </span><span style="margin-right: 90px;">1% /tmp</span><br><span style="margin-right: 25px;color:#FF0000">'''/dev/nvme0n1p1'''</span><span style="margin-right: 50px;color:#FF0000">'''256M '''</span><span style="margin-right: 35px;color:#FF0000">'''90M '''</span><span style="margin-right: 80px;color:#FF0000">'''166M '''</span><span style="margin-right: 90px;color:#FF0000">'''36% /boot'''</span><br><span style="margin-right: 65px;">/dev/zram1</span><span style="margin-right: 60px;">194M </span><span style="margin-right: 50px;">9.9M </span><span style="margin-right: 50px;">170M </span><span style="margin-right: 90px;">6% /var/log</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">769M </span><span style="margin-right: 50px;">60K </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 90px;">1% /run/user/1000</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">769M </span><span style="margin-right: 50px;">48K </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 90px;">1% /run/user/0</span><br>|393x269px}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>2TB NVMe SSD</li>{| class="wikitable" style="width:800px;"|-|IMG_256]]<p>orangepi@orangepi:~$ '''df -h'''</p><span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail</span><span style="margin-right: 50px;">Use% Mounted on</span><br><span style="margin-right: 110px;">udev</span><span style="margin-right: 60px;">3.8G </span><span style="margin-right: 50px;">8.0K </span><span style="margin-right: 70px;">3.8G </span><span style="margin-right: 90px;">1% /dev</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 30px;">1.4M </span><span style="margin-right: 70px;">768M </span><span style="margin-right: 90px;">1% /run</span><br><span style="margin-right: 25px;color:#FF0000">'''/dev/nvme0n1p2'''</span><span style="margin-right: 50px;color:#FF0000">'''1.9T '''</span><span style="margin-right: 35px;color:#FF0000">'''4.1G '''</span><span style="margin-right: 80px;color:#FF0000">'''1.8T '''</span><span style="margin-right: 90px;color:#FF0000">'''1% /'''</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">3.8G </span><span style="margin-right: 50px;">0</span><span style="margin-right: 50px;">3.8G </span><span style="margin-right: 90px;">0% /dev/shm</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">5.0M </span><span style="margin-right: 50px;">4.0K </span><span style="margin-right: 50px;">5.0M </span><span style="margin-right: 90px;">1% /run/lock</span><br><span style="margin-right: 65px;">/dev/zram2</span><span style="margin-right: 60px;">3.7G </span><span style="margin-right: 50px;">76K </span><span style="margin-right: 50px;">3.5G </span><span style="margin-right: 90px;">1% /tmp</span><br><span style="margin-right: 25px;color:#FF0000">'''/dev/nvme0n1p1'''</span><span style="margin-right: 50px;color:#FF0000">'''256M '''</span><span style="margin-right: 35px;color:#FF0000">'''90M '''</span><span style="margin-right: 80px;color:#FF0000">'''166M '''</span><span style="margin-right: 90px;color:#FF0000">'''36% /boot'''</span><br><span style="margin-right: 65px;">/dev/zram1</span><span style="margin-right: 60px;">194M </span><span style="margin-right: 50px;">9.9M </span><span style="margin-right: 50px;">170M </span><span style="margin-right: 90px;">6% /var/log</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">769M </span><span style="margin-right: 50px;">60K </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 90px;">1% /run/user/1000</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">769M </span><span style="margin-right: 50px;">48K </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 90px;">1% /run/user/0</span><br>|}</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>
</div><ol start{| class="10wikitable" style="listwidth:800px;" |-| orangepi@orangepi:~$ '''sudo fix_mmc_ssd.sh'''|}{| class="wikitable" style="background-typecolor:#ffffdc;width: lower-alpha800px;">|-| <libig>烧录过程的显示如下所示:'''Exactly the same system means that the image name is exactly the same. Even if they are all Debian11 systems, the versions are different.'''</libig>|}</ol><span id="how-to-use-balenaetcher-software-to-burn"></span>
<div class="figure">== How to use balenaEtcher software to burn ===
[[File<ol style="list-style-type:mediadecimal;"><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/image103s. PCIe3.png|397x272px|IMG_256]]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>
[[File:pi3b-img73.png]]</divol><ol start="112" style="list-style-type: lower-alpha;"><li>烧录完成后的显示如下所示:The M.2 2242 SSD is as follows</li></ol>
[[File:pi3b-img74.png]]<div class/ol></li></ol><ol start="2" style="figurelist-style-type: decimal;"><li>Then insert the NVMe SSD into the M.2 PCIe interface of the development board and fix it</li>
[[File:media/image104pi3b-img75.png|395x225px|IMG_256]]</ol><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>
[[File:pi3b-img76.png]]</divol><ol start="94" style="list-style-type: decimal;"><li><p>烧录TF卡中的Linux系统到NVMe SSD中的方法(此方法相当于将TF卡中的系统克隆到NVMe SSD)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 [[Orange Pi 3B#Method of burning Linux image to TF card based on Windows PC|'''the method of burning the Linux image to the TF card based on the Windows PC''']] and [[Orange Pi 3B#Method of burning Linux image to TF card based on Ubuntu PC|'''the method of burning the Linux image to the TF card based on the Ubuntu PC''']].</p><ol style="list-style-type: lower-alpha;"/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''Clone drive'command to see '''nvme''' related information</lip></olli><{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~/li></ol>Desktop$ '''sudo fdisk -l | grep &quot;nvme0n1&quot;'''
<div class="figure">Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors|}
[[File:media/image105.png|386x204px|IMG_256]]Use the '''lspci''' command to see an NVMe-related PCI device
</div><ol start{| class="2wikitable" style="list-style-typewidth: lower-alpha800px;"><li>然后选择TF卡的设备名|-| orangepi@orangepi:~/Desktop$ '''/dev/mmcblk1lspci'''</li></ol>
<div class="figure">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><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> <div class="figure"> [[File:media/image106pi3b-img89.png|379x256px|IMG_256]]
</div>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''If it is not pre-installed, for [[Orange Pi 3B#The method of downloading and installing the balenaEtcher version of arm64|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.'''</big>|}</ol><ol start="7" style="list-style-type: decimal;"><li>The interface after balenaEtcher is opened is as follows:</li> <div class="figure"> [[File:pi3b-img90.png]] </div></ol><ol start="38" style="list-style-type: decimal;" ><li><p>The method of using balenaEtcher to burn u-boot to the SPI Flash of the development board is as follows:</p><ol style="list-style-type: lower-alpha;"><li>打开TF卡后的界面如下所示:First click on '''Flash from file'''</li> <div class="figure"> [[File:pi3b-img91.png]] </div></ol><ol start="2" style="list-style-type: lower-alpha;"><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>
<div class="figure">
[[File:media/image107pi3b-img92.png|381x191px|IMG_256]]
</div></ol><ol start="3" style="list-style-type: lower-alpha;"><li>The interface after opening '''rkspi_loader.img''' is as follows:</li> [[File:pi3b-img93.png]]</ol>
<ol start="4" style="list-style-type: lower-alpha;">
<li>然后点击Then click '''Select target'''</li></ol>
<div class="figure">
[[File:media/image97pi3b-img94.png|379x171px|IMG_256]]
</div></ol>
<ol start="5" style="list-style-type: lower-alpha;">
<li>然后点击Then click '''Show 2 hidden'''打开更多存储设备的选项to open more options for storage devices</li></ol>
<div class="figure">
[[File:media/image98pi3b-img95.png|385x155px|IMG_256]]
</div></ol>
<ol start="6" style="list-style-type: lower-alpha;">
<li>然后选择NVMe SSD的设备名Then select the device name of SPI Flash '''/dev/nvme0n1mtdblock0''',然后点击and click '''Select'''</li> </oldiv class="figure">
[[File:media/image108pi3b-img96.png|386x264px]]
</div></ol>
<ol start="7" style="list-style-type: lower-alpha;">
<li>然后点击Then click '''Flash'''</li></ol>
<div class="figure">
[[File:media/image109pi3b-img97.png|389x264px|IMG_256]]
</div></ol>
<ol start="8" style="list-style-type: lower-alpha;">
<li>然后点击Then click '''Yes, I’m I'm sure'''</li></ol>
<div class="figure">
[[File:media/image110pi3b-img98.png|392x268px|IMG_256]]
</div></ol><ol start="9" style="list-style-type: lower-romanalpha;"><li>然后输入开发板Linux系统的密码orangepi,就会开始烧录Linux镜像到SSD中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>
<div class="figure">
[[File:media/image111pi3b-img99.png|390x267px|IMG_256]]
</div></ol>
<ol start="10" style="list-style-type: lower-alpha;">
<li>烧录过程的显示如下所示:The display of the burning process is as follows:</li></ol> [[File:media/image112.png|393x212px]]
<div class="figure">
[[File:media/image113pi3b-img100.png|395x205px|IMG_256]]
</div></ol>
<ol start="11" style="list-style-type: lower-alpha;">
<li>烧录完成后的显示如下所示:The display after burning is as follows:</li></ol>
[[File:media/image114.png|398x227px]]<div class="figure">
[[File:pi3b-img101.png]] </div></ol></li></ol><ol start="129" style="list-style-type: lower-alphadecimal;"><li><p>然后需要扩容下NVMe SSD中rootfs分区的容量,步骤如下所示: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>
<ol style="list-style-type: lower-alpha;">
<li><p>首先打开'''GParted,'First click ''如果系统没有预装Gparted,请使用apt命令安装下</p><p>orangepi@orangepi:~$ '''sudo apt-get install -y gpartedClone drive'''</p></li></ol></li></ol>
<div class="figure">
[[File:media/image115pi3b-img102.png|576x215px|IMG_256]]
</div></ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>然后输入Linux系统的密码orangepi,再点击Then select the device name of the TF card '''Authenticate/dev/mmcblk1'''</li></ol>
[[File:media/image116.png|356x173px]]<div class="figure">
[[File:pi3b-img103.png]]
 
</div></ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li><p>然后点击'''Fix'''</p><p>[[FileThe interface after opening the TF card is as follows:media/image117.png|355x261px]]</p></li><li><p>然后选择NVMe SSD</p></li></ol>
<div class="figure">
[[File:media/image118pi3b-img104.png|452x187px|IMG_256]]
</div></ol><ol start="54" style="list-style-type: lower-alpha;"><li>选择NVMe SSD后的显示界面如下所所示:Then click '''Select target'''</li></ol>
<div class="figure">
[[File:media/image119pi3b-img94.png|451x187px|IMG_256]]
</div></ol><ol start="65" style="list-style-type: lower-alpha;"><li>然后选择Then click '''/dev/nvme0n1p2'''分区,再击点击右键,再选择'''Resize/MoveShow 2 hidden'''to open more options for storage devices</li></ol>
<div class="figure">
[[File:media/image120pi3b-img95.png|448x345px|IMG_256]]
</div></ol><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> [[File:pi3b-img105.png]]</ol>
<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>然后点击Then click '''CloseFlash'''关闭即可</p><p>[[File:media/image125.png|383x234px]]</p></li></ol>
<!-- --><ol startdiv class="13figure" style="list-style-type: lower-alpha;"><li>此时就可以使用'''sudo &gt; poweroff'''命令关机了。然后请拔出TF卡,再短按电源按键开机,此时就会启动SPIFlash+NVMe &gt; SSD中的Linux系统了。</li></ol> <!-- --><ol start="10" style="list-style-type: decimal;"><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>
<span id="烧录android镜像到tf卡中的方法"></span>== 烧录Android镜像到TF卡中的方法 ==[[File:pi3b-img106.png]]
<span id/div></ol><ol start="通过usb2.0烧录口将android8" style="list-style-type: lower-镜像烧录到tf卡中的方法alpha;"><li>Then click '''Yes, I'm sure'''</spanli>=== 通过USB2.0烧录口将Android 镜像烧录到TF卡中的方法 ===
<ol style="list-style-type: decimal;">
<li><p>首先准备一张8GB或更大容量的TF卡,TF卡的传输速度必须为class10或以上,建议使用闪迪等品牌的TF卡</p></li>
<li><p>还需要准备一根品质良好的USB2.0公对公数据线</p>
<div class="figure">
[[File:media/image17pi3b-img107.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
</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 stylestart="list-style-type: lower-alpha;9"><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>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><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]]
 
</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">
[[File:media/image133pi3b-img108.jpeg|477x222px|D~T2CO%X~K2@ELR98)BVP~2png]]
</div></liol><liol start="10" style="list-style-type: lower-alpha;"><pli>切换成功的显示如下图所示The display of the burning process is as follows:</p><div class="figure"li>
[[File:media/image134.jpeg|474x223px|QFVLTK~19N32OK2UGH{D{AK]] </div></li><li><p>然后点击烧录工具的”'''升级固件'''”一栏</p><p>[[File:media/image135.png|477x224px]]</p></li><li><p>接着点击”'''固件'''”按钮选择需要烧录的Android镜像的路径</p><p>[[File:media/image136pi3b-img109.png|444x209px]]</p></li><li><p>最后点击”'''升级'''”按钮就会开始烧录,烧录过程中的log如下图所示。烧录完成后Android系统会自动启动。</p></li></ol></li></ol>
<div class="figure">
[[File:media/image137pi3b-img110.png|455x214px|GO~ZSPN`B]JCQM`@_9UU8[R]]
</div></ol><span idol start="11" style="使用sddisktool工具将android镜像烧到tf卡的方法list-style-type: lower-alpha;"><li>The display after burning is as follows:</spanli>=== 使用SDDiskTool工具将Android镜像烧到TF卡的方法 ===
[[File:pi3b-img111.png]]</ol ><ol start="12" style="list-style-type: decimallower-alpha;"><li><p>首先准备一张8GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''或以上,建议使用闪迪等品牌的TF卡</p></li><li><p>然后使用读卡器把TF卡插入电脑</p></li><li><p>然后从[http://www.orangepiThen you need to expand the capacity of the rootfs partition in the NVMe SSD.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载SDDiskTool烧写工具,'''请确保SDDiskTool工具的版本为最新的v1.72'''</p></li><li><p>然后从[httpThe steps are as follows://www.orangepi.cn/html/serviceAndSupport/index.html '''Orange Pi的资料下载页面''']下载Android11的镜像</p><ol style="list-style-type: lower-alphanone;"><li><p>打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择a) Open '''TF卡和eMMC启动镜像GParted'''文件夹中的镜像进行下载first, if the system does not have Gparted pre-installed, please use the apt command to install it</p><p>[[File:media/image127.png{|224x82px]]</p></li><li><p>进入'''TF卡和eMMC启动镜像'''文件夹后可以看到下面两个镜像,它们的区别是:</p><ol class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li><p>不带lcd的镜像是专门用于HDMI显示的,支持4K显示,如果不使用LCD屏幕,请下载不带lcd的镜像</p></li>|-<li><p>如果要使用LCD屏幕,请选择带lcd的镜像</p>| <p>[[Fileorangepi@orangepi:media/image128.png|281x62px]]~$ '''sudo apt-get install -y gparted'''</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|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>
<span iddiv class="烧录android镜像到emmc中的方法figure"></span>== 烧录Android镜像到eMMC中的方法 ==[[File:pi3b-img112.png]]
</div></ol><ol start="2" style="list-style-type: none;"><li>b) Then enter the password orangepi of the Linux system, and click '''注意,烧录镜像到eMMC中后如果测试发现启动不了,请清空下SPIFlash后再启动试下。清空SPIFlash的方法请参考[[\l|使用RKDevTool清空SPIFlash的方法]]小节的内容。Authenticate'''</li>
[[File:pi3b-img113.png]]</ol><span idol start="3" style="通过usb2.0烧录口将androidlist-style-镜像烧录到emmc中的方法type: none;"><li>c) Then click '''Fix'''</spanli>=== 通过USB2.0烧录口将Android 镜像烧录到eMMC中的方法 ===
'''注意,下面所有的操作都是在Windows电脑中进行的。'''[[File:pi3b-img114.png]]</ol><ol start="4" style="list-style-type: none;"><li>d) Then select NVMe SSD</li>
<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">
[[File:media/image17pi3b-img115.png|141x138px|D6BB9058]] </div></ol><ol start="5" style="list-CDC3style-42d7-A7FC-FBF630D886B7]]type: none;"><li>e) The display interface after selecting NVMe SSD is as follows:</li>
</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">
[[File:media/image70pi3b-img116.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]] </div></ol><ol start="6" style="list-style-type: none;"><li>f) Then select the '''/dev/nvme0n1p2''' partition, click the right button again, and then select '''Resize/Move'''</li>
</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">
[[File:media/image137pi3b-img117.png|455x214px|GO~ZSPN`B]JCQM`@_9UU8] </div></ol><ol start="7" style="list-style-type: none;"><li>g) Then drag the capacity to the maximum at the position shown in the figure below</li> [R[File:pi3b-img118.png]]</ol><ol start="8" style="list-style-type: none;"><li>h) Then click '''Resize/Move'''</li>
[[File:pi3b-img119.png]]</divol></li></olstyle="list-style-type: none;"></li>i) Then click the green '''√''' in the position below</olli>
[[File:pi3b-img120.png]]<span id/ol><ol start="通过tf卡将android11镜像烧录到emmc中的方法10"style="list-style-type: none;"><li>j) Then click '''Apply'''</spanli>=== 通过TF卡将Android11镜像烧录到eMMC中的方法 ===
[[File:pi3b-img121.png]]</ol><ol start="11" style="list-style-type: none;"><li>k) Then click '''注意,下面所有的操作都是在Windows电脑中进行的。Close'''to close</li>
<ol style="list-style-type: decimal;"><li><p>开发板预留了eMMC的扩展接口,烧录系统到eMMC前,首先需要购买一个与开发板eMMC接口相匹配的eMMC模块。然后将eMMC模块安装到开发板上。eMMC模块和插入开发板的方法如下所示:</p><p>[[File:media/image64.png|115x84px]] [[File:media/image65pi3b-img122.png|120x87px]]</p><p>[[File:media/image66.png|286x133px]]</p></li><li><p>还需要准备一张8GB或更大容量的TF卡,TF卡的传输速度必须为'''class10'''或以上,建议使用闪迪等品牌的TF卡</p></liol><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的镜像</pol><ol start="13" style="list-style-type: lower-alpha;"><li><p>打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择At this point, you can use the '''TF卡和eMMC启动镜像sudo poweroff'''文件夹中的镜像进行下载</p><p>[[File:media/image127command to shut down.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/image128Then 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.png|283x62px]]</p></li></ol>
</li></ol>
</li!-- --><li><p>然后使用解压软件解压下载的Android镜像的压缩包,解压后的文件中,以”.img” 结尾的文件就是Android镜像文件,大小在1GB以上</p></liol start="10" style="list-style-type: decimal;"><li><p>然后使用解压软件解压'Step ''SDDiskTool_v1.72.zip'9'',此软件无需安装,在解压后的文件夹中找到'''SD_Firmware_Toolis to clone the system in the TF card to the NMVe SSD.exe'''打开即可</p><p>[[File:media/image138We can also directly burn the Linux image file to the NVMe SSD.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>[[FileHere are the steps:media/image140.png|247x212px]]</p></li><li><p>然后开始将Android镜像写入TF卡</p>
<ol style="list-style-type: lower-alpha;">
<li><p>首先在'''“选择可移动磁盘设备”'''下面确认显示的盘符为TF卡对应的盘符Upload the Linux image file to the Linux system of the development board</p></li><li><p>然后在”'''选择功能模式'''”中选择'''“固件升级”'''Then use balenaEtcher to burn</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>
<span iddiv class="烧录android镜像到spiflashnvme-ssd中的方法figure"></span>== 烧录Android镜像到SPIFlash+NVMe SSD中的方法 ==
'''注意,下面所有的操作都是在Windows电脑中进行的。'''[[File:pi3b-img123.png]]
<ol style="list-style-type: decimal;"><li><p/div>首先需要准备一个NVMe SSD固态硬盘</pol><ol start="3" style="list-style-type: lower-alpha;"><li><p>M'''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.2 2230规格的SSD如下所示</p>'''<p>[[File:media/image75.png|147x120px]]</p></li><li><p>M.2 2242规格的SSD如下所示</pol><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]]</pspan id="how-to-burn-android-image-to-tf-card"></li><li><p>还需要准备一根品质良好的USB2.0公对公数据线</p><div class="figure"span>
[[File:media/image17.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]== How to burn Android image to TF card ==
</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 stylespan id="listmethod-of-styleburning-type: lowerandroid-alpha;"><li><p>打开安卓镜像的下载链接后可以看到下面两种类型的安卓镜像,请选择'''SPIFlashimage-NVME &gt; SSD启动镜像'''文件夹中的镜像进行下载</p><p>[[File:media/image150.png|195x65px]]</p></li><li><p>进入'''SPIFlashto-NVME &gt; SSD启动镜像'''文件夹后可以看到下面两个镜像,它们的区别是:</p><ol style="listtf-stylecard-type: lowerthrough-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>打开'''DriverInstallusb2.exe'''后安装瑞芯微驱动的步骤如下所示</p><ol style="list-style0-type: lowerburning-alpha;port"><li><p>点击”'''驱动安装'''”按钮</pspan><p>[[File:media/image34=== Method of burning Android image to TF card through USB2.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 style0 burning port ==="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>
<span id="使用rkdevtool清空spiflash的方法"></span># 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== 使用RKDevTool清空SPIFlash的方法 ==# You also need to prepare a good quality USB2.0 male-to-male data cable
<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">
::[[File:media/image17pi3b-img16.png|141x138px|D6BB9058-CDC3-42d7-A7FC-FBF630D886B7]]
</div></liol start="3" 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.cnorg/html/serviceAndSupporthardWare/computerAndMicrocontrollers/indexservice-and-support/Orange-Pi-3B.html '''Orange Pi的资料下载页面Pi's data download page''']下载瑞芯微驱动'''DriverAssitant_v5</p></li><li><p>Then download the Android image from [http://www.orangepi.12org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.ziphtml '''Orange Pi's download page''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>如果前面的步骤顺利,此时开发板会进入''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 'MASKROM''TF card and eMMC startup image'模式,在烧录工具的界面上会提示”'''发现一个MASKROM设备'''”</p><p>[[File:media/image41.png|457x215px]]</p>folder to download</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/image70pi3b-img124.png|459x216px|SIS5H0S2@F5M2D(6ANZEUPG]] </div></ol><ol start="2" style="list-style-type: lower-alpha;"><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: none;"><li><p>a) 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>b) If you want to use lcd screen, please choose image with lcd</p></li>
</div></li><li><p>然后点击'''下载'''</p><p>[[File:media/image131.png|472x222px]]</p></li><li><p>下载完'''rk3566_MiniLoaderAll.bin'''后的显示如下图所示</p><p>[[File:media/image143pi3b-img125.png|474x223px]]</p></li><li><p>然后选择存储设备为'''SPINOR'''</pol><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="5" 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>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>
[[File:pi3b-img31.png]]</ol><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><ol style="list-style-type: lower-alpha;"><li>Click the &quot;'''Driver Installation'''&quot; button</li>
# 将烧录好镜像的TF卡插入香橙派开发板的TF卡插槽中。如果SPIFlash+NVMe SSD已经烧录好镜像了,那么就不需要插入TF卡了,只需确保NVMe SSD正常插入到开发板中即可。[[File:pi3b-img32.png]]</ol># 开发板有HDMI接口,可以通过HDMI转HDMI连接线把开发板连接到电视或者HDMI显示器。如果有购买LCD屏幕,也可以使用LCD屏幕来显示开发板的系统界面。如果有Type<ol start="2" style="list-style-C转HDMI的线,也可以通过Typetype: lower-C接口来显示开发板的系统界面。# 接上USB鼠标和键盘,用于控制香橙派开发板。# 开发板有以太网口,可以插入网线用来上网。alpha;"># 连接一个5V/3A或者5V/4A的USB Type<li>After waiting for a period of time, a pop-C接口的up window will prompt &quot;'''高品质The driver is installed successfully'''的电源适配。&quot;, and then click the &quot;'''OK'''&quot; button.</li>
[[File:pi3b-img33.png]]</ol></li></ol><ol start="8" style="list-style-type: decimal;"><li>Then decompress '''切记不要插入电压输出大于5V的电源适配器,会烧坏开发板。RKDevTool_Release_v3.15.zip''', this software does not need to be installed, just find '''RKDevTool''' in the decompressed folder and open it</li>
[[File:pi3b-img34.png]]</ol><ol start="9" style="list-style-type: decimal;"><li>After opening the '''RKDevTool'''系统上电启动过程中很多不稳定的现象基本都是供电有问题导致的,所以一个靠谱的电源适配器很重要。如果启动过程中发现有不断重启的现象,请更换下电源或者Typeburning tool, because the computer has not connected to the development board through the USB2.0 male-C数据线再试下。to-male data cable at this time, the lower left corner will prompt &quot;'''No device found'''&quot;</li>
'''Type[[File:pi3b-C电源接口是不支持PD协商的。'''img35.png]]</ol><ol start="10" style="list-style-type: decimal;"><li><p>Then start burning the Android 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 interface of the development board is shown in the figure below</li>
'''另外请不要接到电脑的USB接口来给开发板供电。'''<div class="figure">
<ol start="6" style="list-style-type: decimal;"><li><p>然后打开电源适配器的开关,如果一切正常,此时HDMI显示器或者LCD屏幕就能看到系统的启动画面了。</p></li><li><p>如果想通过调试串口查看系统的输出信息,请使用串口线将开发板连接到电脑,串口的连接方法请参看[[\l|'''调试串口的使用方法'''File:pi3b-img36.png]]一节。</p></li></ol>
</div></ol><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>
[[File:pi3b-img37.png]]</ol><ol start="4" style== 调试串口的连接说明 ==="list-style-type: lower-alpha;"><li>Then connect the power supply of the Type-C interface to the development board, and power on</li>
# 首先需要准备一个[[File:pi3b-img38.png]]</ol><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;'''3.3Vfound a MASKROM device'''的USB转TTL模块,然后将USB转TTL模块的USB接口一端插入到电脑的USB接口中。&quot;</li>
[[File:pi3b-img39.png]]</ol><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 '''为了更好的兼容性,推荐使用CH340 USB转TTL模块,请不要使用CP2102、PL2303类型的USB转TTL模块。advanced features'''</p><p>[[File:pi3b-img126.png]]</p></li><li><p>Then click the position shown in the figure below</p><p>[[File:pi3b-img127.png]]</p></li><li><p>Then select '''rk3566_MiniLoaderAll.bin''' in the '''MiniLoader''' folder downloaded earlier, and click to open</p></li>
'''购买USB转TTL模块前,请确认模块支持1500000速率的波特率。'''<div class="figure">
[[File:media/image157pi3b-img68.png|569x114px]]
</div></ol><ol start="210" style="list-style-type: decimallower-alpha;"><li><p>开发板的调试串口GND、RXD和TXD引脚的对应关系如下图所示Then click '''download'''</p><p>[[File:media/image158pi3b-img128.png|428x110px]]</p></li><li><p>USB转TTL模块GND、TXD和RXD引脚需要通过杜邦线连接到开发板的调试串口上The display after downloading '''rk3566_MiniLoaderAll.bin''' is shown in the figure below</p><ol style="list-style-typep>[[File: lowerpi3b-alpha;"><li><p>USB转TTL模块的GND接到开发板的GND上img129.png]]</p></li><li><p>USB转TTL模块的Then select the storage device as '''RX接到开发板的TX上SD'''</p></li><li><p>USB转TTL模块的, and then click '''TX接到开发板的RX上Switch Storage'''</p></li></ol></li><li><p>USB转TTL模块连接电脑和Orange Pi开发板的示意图如下所示</p>
<div class="figure">
[[File:media/image159pi3b-img130.jpeg|524x189px|QQ图片20210204145010png]] </div></li><li><p>The display of successful switching is shown in the figure below</p></li> <div class="figure">
</div><p>'''串口的TX和RX是需要交叉连接的,如果不想仔细区分TX和RX的顺序,可以把串口的TX和RX先随便接上,如果测试没有输出再交换下TX和RX的顺序,这样就总有一种顺序是对的'''</p></li></ol>[[File:pi3b-img131.png]]
<span id/div></ol><ol start="14" style="ubuntu平台调试串口的使用方法list-style-type: lower-alpha;"><li>Then click the &quot;'''Upgrade Firmware'''&quot; column of the burning tool</spanli>=== Ubuntu平台调试串口的使用方法 ===
[[File:pi3b-img132.png]]</ol><ol start="15" style="list-style-type: lower-alpha;"><li>Then click the &quot;'''Linux下可以使用的串口调试软件有很多,如putty、minicom等,下面演示putty的使用方法。Firmware'''&quot; button to select the path of the Android image that needs to be burned</li>
<ol style="list-style-type: decimal;"><li><p>首先将USB转TTL模块插入Ubuntu电脑的USB接口,如果USB转TTL模块连接识别正常,在Ubuntu PC的'''/dev'''下就可以看到对应的设备节点名,记住这个节点名,后面设置串口软件时会用到</p><p>test@test:~$ '''ls /dev/ttyUSB*'''</p><p>/dev/ttyUSB0</p></li><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/image160pi3b-img133.png|367x321px]]</p></li><li><p>首先选择串口的设置界面</p><p>[[File:media/image161.png|359x352px]]</p></li><li><p>然后设置串口的参数</pol><ol start="16" style="list-style-type: lower-alpha;"><li><p>设置Serial line to connect Finally, click the &gtquot; to为/dev/ttyUSB0(修改为对应的节点名,一般为/dev/ttyUSB0)</p></li><li><p>设置Speed(baud)为'''1500000Upgrade'''(串口的波特率)</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&quot;"><li><p>首先选择Connection type为Serial</p></li><li><p>然后点击Open按钮连接串口</p><p>[[File:media/image163button to start burning, and the log during the burning process is shown in the figure below.png|345x340px]]</p></li></ol></li><li><p>启动开发板后,就能从打开的串口终端中看到系统输出的Log信息了</p><p>[[File:media/image164After burning is completed, the Android system will start automatically.png|468x340px]]</p></li></ol>
<span iddiv class="windows平台调试串口的使用方法figure"></span>=== Windows平台调试串口的使用方法 ===
'''Windows下可以使用的串口调试软件有很多,如SecureCRT、MobaXterm等,下面演示MobaXterm的使用方法,这款软件有免费版本,无需购买序列号即可使用。'''[[File:pi3b-img134.png]]
<ol style="list-style-type: decimal;"><li><p>下载MobaXterm</p><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></lidiv></ol>
</li></ol>
<span id="how-to-use-sddisktool-to-burn-android-image-to-tf-card"></span>
[[File:media/image169.png|575x438px]]=== How to use SDDiskTool to burn Android image to TF card ===
<ol start="4" 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>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/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html '''Orange Pi data download page'''OK], '''<span style="color:#FF0000">please make sure that the version of the SDDiskTool tool is the latest v1.72</span>.'''”按钮后会进入下面的界面,此时启动开发板就能看到串口的输出信息了</p></li><li><p>Then download the Android11 image from the [[Filehttp:media/image170/www.orangepi.png|575x291px]org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html '''Orange Pi data 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</olli>
<div class== 使用开发板40pin接口中的5v引脚供电说明 =="figure">
'''我们推荐的开发板的供电方式是使用5V/3A或者5V/4A的Type C接口的电源线插到开发板的Type[[File:pi3b-C电源接口来供电的。如果需要使用40pin接口中的5V引脚来给开发板供电,请确保使用的电源线和电源适配器能满足开发板的供电需求。如果有使用不稳定的情况,请换回Type-C电源供电。'''img124.png]]
</div></ol><ol start="2" style="list-style-type: decimallower-alpha;"><li><p>首先需要准备一根下图所示的电源线After entering the '''TF card and eMMC boot image''' folder, you can see the following two images, the difference between them is:</p><div class="figure"li>
[[File<ol style="list-style-type:medianone;"><li><p>a) 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</image171.jpeg|216x154px|4ff86e49b6624616f9498fe44c366f29]]p></li><li><p>b) If you want to use LCD screen, please choose image with lcd</p></li>
</div><p>'''上图所示的电源线在淘宝可以买到,请自行搜索购买。'''</p></li><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/image172pi3b-img125.png|366x71px]]</pol></li></ol>
</li></ol>
<ol start="5" style="list-style-type: decimal;">
<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>
[[File:pi3b-img135.png]]</ol><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. '''<span idstyle="ubuntudebian-server和xfce桌面系统使用说明color:#FF0000">Please make sure that the displayed disk device is consistent with the drive letter of the TF card you want to burn</span>= Ubuntu''', if there is no display, you can try to unplug the TF card</Debian Server和Xfce桌面系统使用说明 =li>
[[File:pi3b-img136.png]]</ol><ol start="8" style="list-style-type: decimal;"><li>After confirming the drive letter, you can format the TF card first, click the '''本章内容是基于Linux服务器版本的镜像和xfce桌面版本镜像编写的。restore disk button'''in '''SDDiskTool,''' or use the '''SD Card Formatter''' mentioned above to format the TF card</li>
[[File:pi3b-img137.png]]<span id/ol><ol start="9" style="已支持的linux镜像类型和内核版本list-style-type: decimal;"><li><p>Then start to write the Android image to the TF card</spanp><ol style== 已支持的Linux镜像类型和内核版本 =="list-style-type: lower-alpha;"><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><li><p>Finally click the &quot;Start Create&quot; button to start burning the Android image to the TF card</p></li>
{| class[[File:pi3b-img138.png]]</ol></li></ol><ol start="wikitable10"|-| style="textlist-align: left;"| '''Linux镜像类型'''| style="text-aligntype: leftdecimal;"| '''内核版本'''><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> | style="text[[File:pi3b-align: left;"| '''服务器版'''img139.png]]</ol>| style<span id="texthow-to-burn-android-image-to-align: left;emmc"| '''桌面版'''></span>|-| style="text-align: left;"| '''Debian 11 - Bullseye'''= How to burn Android image to eMMC == {| styleclass="text-align: left;wikitable"| '''Linux5.10'''| style="textbackground-aligncolor: left#ffffdc;"| '''支持'''| style="text-alignwidth: left800px;"| '''支持'''
|-
| style="text-align: left;"| '''Ubuntu 20.04 - Focal'''| style="text-align: left;"| <big>'''Linux5Note, after burning the image into eMMC, if the test finds that it cannot be started, please clear the SPIFlash and try again.10'''| style="text-align: left;"| '''支持'''| style="text-align: left;"| '''支持'''|-| style="text-align: left;"| '''Ubuntu 22.04 - Jammy'''For the method of clearing SPIFlash, please refer to [[Orange Pi 3B#Using RKDevTool to clear SPIFlash| style="text-align: left;"| '''Linux5the method of using RKDevTool to clear SPIFlash]].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;"|</big>
|}
<span id="linux系统适配情况method-of-burning-android-image-into-emmc-through-usb2.0-burning-port"></span>== Linux系统适配情况 = Method of burning Android image into eMMC through USB2.0 burning port ===
{| class="wikitable"|-| style="text-align: left;"| '''功能'''| style="text-align: left;"| '''Debian11'''| style="text-align: left;"| '''Ubuntu20.04'''| style="text-align: left;"| '''Ubuntu22.04'''|-| style="text-align: left;"| '''USB2.0x3'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| 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启动'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="textbackground-aligncolor: left#ffffdc;"| '''OK'''|-| style="text-align: left;"| '''WIFI'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''蓝牙'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''GPIO(40pin)'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''UART(40pin)'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-alignwidth: left800px;"| '''OK'''
|-
| style="text-align: left;"| '''SPI(40pin)'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''I2C(40pin)'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''PWM(40pin)'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''PWM风扇接口'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''3pin调试串口'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''EMMC'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''TF卡启动'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''HDMI 视频'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''HDMI 音频'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''Camera'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''LCD'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''eDP显示'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''千兆网口'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''网口状态灯'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''耳机播放'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''耳机录音'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''LED灯'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''RTC'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''GPU'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''NPU'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''VPU'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''看门狗测试'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''Chromium硬解视频'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| <big>'''OKNote that all the following operations are performed on a Windows computer.'''</big>
|}
<span idol style="本手册linux命令格式说明list-style-type: decimal;"><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.</spanp>== 本手册Linux命令格式说明 ==<p>The eMMC module and the method of plugging into the development board are as follows:</p></li>
[[File:pi3b-img61.png|400px]] [[File:pi3b-img62.png|400px]] [[File:pi3b-img63.png|800px]]</ol ><ol start="2" style="list-style-type: decimal;"><li><p>本手册中所有需要在Linux系统中输入的命令都会使用下面的方框框起来You also need to prepare a good quality USB2.0 male-to-male data cable</pli> <p>如下所示,黄色方框里内容表示需要特别注意的内容,这里面的命令除外。</pdiv class="figure"[[File:pi3b-img16.png]] </li><lidiv><p>命令前面的提示符类型说明</pol><ol start="3" style="list-style-type: lower-alphadecimal;"><li><p>命令前面提示符指的是下面方框内红色部分的内容,这部分内容不是Linux命令的一部分,所以在Linux系统中输入命令时,请不要把红色字体部分的内容也输入进去。</p><p>Then download Rockchip driver '''orangepi@orangepi:~$ sudo apt update'''</p><p>'DriverAssitant_v5.12.zip''root@orangepi:~#'and burning tool '' '''vim /boot/bootRKDevTool_Release_v3.15.cmdzip'''</p><p>'''test@test:~$ ssh from [mailtohttp:root@192//www.168orangepi.1.36 root@192org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.168.1.]xxxhtml '''</p><p>''Orange Pi'root@test:~# lss data download page''']</p></li><li><p>Then download the Android image from '''root@orangepi[http:~$''' &gt; 提示符表示这个命令是在'''开发板的Linux系统'''中输入的, &gt; 提示符最后的 '''$''' &gt; 表示系统当前用户为普通用户,当执行特权命令时,需要加上'''sudo'''</p></li><li><p>'''root@www.orangepi:~#''' &gt; 提示符表示这个命令是在'''开发板的Linux系统'''中输入的, &gt; 提示符最后的 '''#''' &gt; 表示系统当前用户为root用户,可以执行任何想要执行的命令<.org/html/p><hardWare/li><li><p>'''test@test:~$''' 提示符表示这个命令是在Ubuntu &gt; PC或者Ubuntu虚拟机中输入的,而不是开发板的Linux系统中。提示符最后的 &gt; '''$''' &gt; 表示系统当前用户为普通用户,当执行特权命令时,需要加上'''sudo'''<computerAndMicrocontrollers/p><service-and-support/li><li><p>Orange-Pi-3B.html Orange Pi'''root@test:~#s download page].''' 提示符表示这个命令是在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>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 '''&quot;deb [arch=$(dpkg --print-architecture) \TF card and eMMC startup image folder'''</p><p>'''signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \'''</p><p>'''https://to 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>
<span iddiv class="linux系统登录说明figure"></span>== Linux系统登录说明 ==
<span id="linux系统默认登录账号和密码"></span>=== Linux系统默认登录账号和密码 ===[[File:pi3b-img124.png]]
{| class</div></ol><ol start="wikitable2"|-| style="textlist-align: left;"| '''账号'''| style="text-aligntype: leftlower-alpha;"| '''密码'''|->| style="text-align: left;"| <li><p>After entering the '''rootTF card and eMMC startup image folder''', you can see the following two images, the difference between them is</p>| <ol style="text-align: left;"| '''orangepi'''|list-| style="text-aligntype: leftnone;"| '''orangepi'''>| style="text-align: left;"| '''orangepi''<li><p>a) 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>b) If you want to use lcd screen, please choose image with lcd</p></li>
[[File:pi3b-img125.png]]</ol></li></ol></li></ol><ol start="5" style="list-style-type: decimal;"><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>
[[File:pi3b-img31.png]]</ol><ol start="7" style="list-style-type: decimal;"><li><p>After opening '''当输入密码提示错误,或者ssh连接有问题,请注意,只要使用的是Orange Pi提供的Linux镜像,就请不要怀疑上面的密码不对,而是要找其它的原因。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>
[[File:pi3b-img32.png]]<span id/ol><ol start="设置linux系统终端自动登录的方法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.</spanli>=== 设置Linux系统终端自动登录的方法 ===
<ol style="list-style-type: decimal;"><li><p>Linux系统默认就是自动登录终端的,默认登录的用户名是'''orangepi'''</p><p>[[File:media/image173pi3b-img33.png|351x198px]]</pol></li><li><p>使用下面的命令可以设置root用户自动登录终端</pol><p>orangepi@orangepiol start="8" style="list-style-type:~$ '''sudo auto_login_cli.sh root'''</p></lidecimal;"><li><p>使用下面的命令可以禁止自动登录终端</p><p>orangepi@orangepi:~$ Then decompress '''sudo auto_login_cliRKDevTool_Release_v3.sh -d15.zip'''</p></li><li><p>使用下面的命令可以再次设置orangepi用户自动登录终端</p><p>orangepi@orangepi:~$ , this software does not need to be installed, just find '''sudo auto_login_cli.sh orangepiRKDevTool'''</p>in the decompressed folder and open it</li></ol>
[[File:pi3b-img34.png]]<span id/ol><ol start="linux桌面版系统自动登录说明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;</spanli>=== Linux桌面版系统自动登录说明 ===
[[File:pi3b-img35.png]]</ol ><ol start="10" style="list-style-type: decimal;"><li><p>桌面版系统启动后会自动登录进入桌面,无需输入密码Then start burning the Android image into eMMC</p><div classol 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>
[[File:media/image174.png|576x324px|1]]
 
</div></li>
<li><p>运行下面的命令可以禁止桌面版系统自动登录桌面</p>
<p>orangepi@orangepi:~$ '''sudo disable_desktop_autologin.sh'''</p></li>
<li><p>然后重启系统就会出现登录对话框,此时需要输入[[\l|'''密码''']]才能进入系统</p>
<div class="figure">
[[File:media/image175pi3b-img36.png|569x320px|IMG_256]]
</div></ol><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></olli><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>
[[File:pi3b-img37.png]]<span id/ol><ol start="linux桌面版系统root用户自动登录的设置方法4"style="list-style-type: lower-alpha;"><li>Then connect the power supply of the Type-C interface to the development board</spanli>=== Linux桌面版系统root用户自动登录的设置方法 ===
[[File:pi3b-img38.png]]</ol ><ol start="5" style="list-style-type: decimallower-alpha;"><li><p>执行下面的命令可以设置桌面版系统使用root用户自动登录</p><p>orangepi@orangepi:~$ 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;'''sudo desktop_login.sh rootfound a MASKROM device'''</p></li><li><p>然后重启系统,就会自动使用root用户登录桌面了&quot;</p><p>[[File:media/image176pi3b-img39.png|448x187px]]</pli><li><p>Then please select '''注意,如果使用root用户登录桌面系统,是无法使用右上角的pulseaudio来管理音频设备的。Advanced Features'''</p><p>'''另外请注意这并不是一个bug,因为pulseaudio本来就不允许在root用户下运行。'''[[File:pi3b-img126.png]]</p></li><li><p>执行下面的命令可以再次设置桌面版系统使用orangepi用户自动登录Then click the position shown in the figure below</p><p>orangepi@orangepi[[File:~$ '''sudo desktop_loginpi3b-img127.sh orangepi'''png]]</p></li></ol>
<span idol start="linux桌面版系统禁用桌面的方法8" style="list-style-type: lower-alpha;"><li>Select '''rk3566_MiniLoaderAll.bin''' in the MiniLoader folder downloaded earlier, and click to open.</spanli>=== Linux桌面版系统禁用桌面的方法 ===
<ol stylediv class="list-style-type: decimal;figure"><li><p>首先在命令行中输入下面的命令,'''请记得加sudo权限'''</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;"><li><p>首先在命令行中输入下面的命令,'''请记得加sudo权限'''</p><p>orangepi@orangepi:~$ '''sudo systemctl start lightdm.service'''</p></li><li><p>命令执行完成后就会显示桌面了</p></li></ol></li></ol>
<span id="板载led灯测试说明"></span>== 板载LED灯测试说明 ==[[File:pi3b-img68.png]]
</div></ol ><ol start="9" style="list-style-type: decimallower-alpha;"><li><p>开发板上有三个LED灯,一个绿灯,一个红灯,一个PCIe指示灯,所在位置如下图所示:Then click '''Download'''</p><p>[[File:media/image177pi3b-img128.png|425x126px]]</p></li><li><p>The display after downloading '''只要开发板打开了电源,红色的LED灯就会常亮,这是由硬件控制的,软件无法关闭。MiniLoaderAll.bin'''is shown in the figure below</p></li><li><p>绿色的LED灯在内核启动后会一直闪烁,这是由软件控制的。[[File:pi3b-img140.png]]</p></li><li><p>PCIe指示灯在PCIe接口有数据传输时会闪烁。</p></li><li><p>设置绿灯亮灭和闪烁的方法如下所示</p><p>Then select the storage device as '''注意,下面的操作请在root用户下进行。EMMC'''</p><ol style="list-style-type: lower-alpha;"><li><p>首先进入绿灯的设置目录</p><p>root@orangepi:~# , and then click Switch '''cd /sys/class/leds/statusStorage'''</p></li><li><p>设置绿灯停止闪烁的命令如下</p><p>root@orangepi:/sys/class/leds/work# '''echo none &gt; trigger'''</p></li><li><p>设置绿灯常亮的命令如下</p><p>root@orangepi[[File:/sys/class/leds/work# '''echo defaultpi3b-on &gt; trigger'''img141.png]]</p></li><li><p>设置绿灯闪烁的命令如下</p><p>root@orangepi:/sys/class/leds/work# '''echo heartbeat &gt; trigger'''The display of successful switching is shown in the figure below</p></li></ol></li></ol>
[[File:pi3b-img142.png]]</ol><ol start="13" style= 网络连接测试 =="list-style-type: lower-alpha;"><li>Then click the &quot;'''Upgrade Firmware'''&quot; column of the burning tool</li>
[[File:pi3b-img132.png]]</ol><ol start="14" style== 以太网口测试 ==="list-style-type: lower-alpha;"><li>Then click the &quot;'''Firmware'''&quot; button to select the path of the Android image that needs to be burned</li>
[[File:pi3b-img133.png]]</ol><ol start="15" style="list-style-type: decimallower-alpha;"><li><p>首先将网线的一端插入开发板的以太网接口,网线的另一端接入路由器,并确保网络是畅通的</p></li><li><p>系统启动后会通过'''DHCP'''自动给以太网卡分配IP地址,Finally, click the &quot;'''不需要其他任何配置Upgrade'''</p></li><li><p>在开发板的Linux系统中查看IP地址的命令如下所示</p><p>orangepi@orangepi:~$ '''ip addr show eth0'''</p><p>2: eth0: &ltquot;BROADCASTbutton to start burning,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 and the log during the following places</p><p>* /sbin/ifconfig</p><p>* /usr/sbin/ifconfig</p><p>The command could not be located because '/sbin:/usr/sbin' burning process is not included shown in the PATH environment variablefigure below.</p><p>This After burning is most likely caused by completed, the lack of administrative privileges associated with your user accountAndroid system will start automatically.</p><p>ifconfig: command not found</p></li></ol>
'''开发板启动后查看IP地址有三种方法:'''<div class="figure">
# '''接HDMI显示器,然后登录系统使用ip addr show eth0命令查看IP地址'''# '''在调试串口终端输入ip addr show eth0命令来查看IP地址'''# '''如果没有调试串口,也没有HDMI显示器,还可以通过路由器的管理界面来查看开发板网口的IP地址。不过这种方法经常有人会无法正常看到开发板的IP地址。如果看不到,调试方法如下所示:'''[[File:pi3b-img134.png]]
<!-- --><ol style="list-style-type: upper-alpha;"><li><p>'''首先检查Linux系统是否已经正常启动,如果开发板的绿灯在闪烁了,一般是正常启动了,如果只亮红灯,说明系统都没正常启动;'''</pdiv></li><li><p>'''检查网线有没有插紧,或者换根网线试下;'''</p></liol><li><p>'''换个路由器试下(路由器的问题有遇到过很多,比如路由器无法正常分配IP地址,或者已正常分配IP地址但在路由器中看不到);'''</p></li><li><p>'''如果没有路由器可换就只能连接HDMI显示器或者使用调试串口来查看IP地址。'''</pol><pspan id="how-to-burn-android11-image-into-emmc-via-tf-card">'''另外需要注意的是开发板DHCP自动分配IP地址是不需要任何设置的。'''</p></li></olspan>
<!-- --><ol start="4" style="list-style-type: decimal;"><li><p>测试网络连通性的命令如下,'''ping'''命令可以通过'''Ctrl+C'''快捷键来中断运行</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 ttlHow to burn Android11 image into eMMC via TF card =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{| class="wikitable" style="wifi连接测试background-color:#ffffdc;width:800px;"|-| <big>'''Note that all the following operations are performed on a Windows computer.'''</spanbig>=== WIFI连接测试 ===|}
'''请不要通过修改/etc/network/interfaces配置文件的方式来连接WIFI,通过这种方式连接WIFI网络使用会有问题。'''# 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:
<span id="服务器版镜像通过命令连接wifi"></span>==== 服务器版镜像通过命令连接WIFI ====::[[File:pi3b-img61.png|400px]] [[File:pi3b-img62.png|400px]]
'''当开发板没有连接以太网,没有连接HDMI显示器,只连接了串口时,推荐使用此小节演示的命令来连接WIFI网络。因为nmtui在某些串口软件(如minicom)中只能显示字符,无法正常显示图形界面。当然,如果开发板连接了以太网或者HDMI显示屏,也可以使用此小节演示的命令来连接WIFI网络的。'''::[[File:pi3b-img63.png|800px]]
<ol start="2" style="list-style-type: decimal;"><li><p>先登录Linux系统,有下面三种方式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/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html '''Orange Pi data download page'''], '''<span style="color:#FF0000">please make sure that the version of the SDDiskTool tool is the latest v1.72</span>'''</p></li><li><p>Then download the Android image from [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.html '''Orange Pi's download page''']</p>
<ol style="list-style-type: lower-alpha;">
<li>如果开发板连接了网线,可以通过[[\l|After opening the download link of the Android image, you can see the following two types of Android images, please select the image in '''ssh远程登录Linux系统the TF card and eMMC startup image folder''']]to download</li></ol>
<!-- --><ol stylediv class="list-style-type: lower-alpha;figure"><li><p>如果开发板连接好了调试串口,可以使用串口终端登录Linux系统</p></li><li><p>如果连接了开发板到HDMI显示器,可以通过HDMI显示的终端登录到Linux系统</p></li></ol></li></ol>
<!-- --><ol style="list-style[[File:pi3b-type: decimal;"><li><p>首先使用'''nmcli dev wifi'''命令扫描周围的WIFI热点</p><p>orangepi@orangepi:~$ '''nmcli dev wifi'''</p><div class="figure">img124.png]]
[[File</div></ol><ol start="2" style="list-style-type: lower-alpha;"><li><p>After entering '''the TF card and eMMC boot image folder''', you can see the following tow images, the difference between them is:media</image178p><ol style="list-style-type: none;"><li><p>a) The first image is dedicated to HDMI display and supports 4K display.png|575x250px|选区_011]]If you don't use LCD screen, please download the image without lcd</p></li><li><p>b) If you want to use lcd screen, please choose image with lcd</p></li>
[[File:pi3b-img125.png]]</divol></li></ol></li><p>然后使用'''nmcli''' 命令连接扫描到的WIFI热点,其中:</pol><ol start="6" style="list-style-type: lower-alphadecimal;"><li><p>'''wifi_name'''需要换成想连接的WIFI热点的名字</p></li><li><p>'''wifi_passwd'''需要换成想连接的WIFI热点的密码</p><p>orangepi@orangepi:~$ '''nmcli dev wifi connect wifi_name password wifi_passwd'''</p><p>Device 'wlan0' successfully activated Then use the decompression software to decompress the compressed package of the downloaded Android image. Among the decompressed files, the file ending with 'cf937f88-ca1e-4411-bb50-61f402eef293'&quot;.</p></li></ol></li><li><p>通过'''ip addr show wlan0'''命令可以查看wifi的IP地址</p><p>orangepi@orangepi:~$ '''ip addr show wlan0'''</p><p>11: wlan0: img&ltquot;BROADCAST,MULTICAST,UPis the Android image file,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 foreverand the size is more than 1GB</p></li><li><p>使用Then use decompression software to decompress '''pingSDDiskTool_v1.72.zip'''命令可以测试wifi网络的连通性,'''ping'''命令可以通过'''Ctrl+C'''快捷键来中断运行</p><p>orangepi@orangepi:~$ , this software does not need to be installed, just find '''ping wwwSD_Firmware_Tool.orangepi.org -I wlan0exe'''</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 msin the decompressed folder and open it</p></li></ol>
[[File:pi3b-img135.png]]</ol><ol start="8" 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. '''<span idstyle="服务器版镜像通过图形化方式连接wificolor:#FF0000">Please make sure that the displayed disk device is consistent with the drive letter of the TF card you want to burn</span>==== 服务器版镜像通过图形化方式连接WIFI ====''', if there is no display, you can try to unplug the TF card.</li>
[[File:pi3b-img136.png]]</ol><ol start="9" 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> [[File:pi3b-img137.png]]</ol ><ol start="10" style="list-style-type: decimal;"><li><p>先登录Linux系统,有下面三种方式Then start to write the Android image into the TF card</p>
<ol style="list-style-type: lower-alpha;">
<li><p>如果开发板连接了网线,可以通过[[\l|First confirm that the displayed drive letter is the drive letter corresponding to the TF card under &quot;'''ssh远程登录Linux系统Select Removable Disk Device''']]&quot;</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:~$ Then select &quot;'''nmtuiFirmware Upgrade'''</p></li><li><p>输入nmtui命令打开的界面如下所示</p><p>[[File:media/image179.png|345x215px]]</p></li><li><p>选择&quot; in &quot;'''Activate a connectSelect Function Mode'''后回车</p><p>[[File:media/image180.png|349x216px]]&quot;</p></li><li><p>然后就能看到所有搜索到的WIFI热点</p><p>[[File:media/image181.png|360x229px]]</p></li><li><p>选择想要连接的WIFI热点后再使用Tab键将光标定位到Then select the path of the Android firmware in the &quot;'''ActivateSelect Upgrade Firmware'''后回车</p><p>[[File:media/image182.png|366x230px]]&quot; column</p></li><li><p>然后会弹出输入密码的对话框,在Finally click the &quot;'''PasswordStart Create'''内输入对应的密码然后回车就会开始连接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&gtquot; 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 wlan0button to start burning</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-img143.png]]</ol></li></ol><ol start="11" style=== 桌面版镜像的测试方法 ===="list-style-type: decimal;"><li>After the burning is completed, the display is as shown in the figure below, and then you can exit SDDiskTool</li>
[[File:pi3b-img144.png]]</ol ><ol start="12" style="list-style-type: decimal;"><li><p>点击桌面右上角的网络配置图标(测试WIFI时请不要连接网线)</p><p>[[File:media/image185Then pull out the TF card from the computer and insert it into the development board.png|377x166px]]</p></li><li><p>在弹出的下拉框中点击'''More networks'''可以看到所有扫描到的WIFI热点,然后选择想要连接的WIFI热点</p><p>[[File:media/image186.png|576x353px]]</p></li><li><p>然后输入WIFI热点的密码,再点击'''Connect'''就会开始连接WIFI</p><p>[[File:media/image187After 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.png|320x163px]]</p></li><li><p>连接好WIFI后,可以打开浏览器查看是否能上网,浏览器的入口如下图所示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><p>[[File:media/image188.png|576x308px]]</p></li><li><p>打开浏览器后如果能打开其他网页说明WIFI连接正常</p><div class="figure"> [[File:media/image189.png|576x273px|5]]
[[File:pi3b-img145.png]]</divol><ol start="14" style="list-style-type: decimal;"></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.</olli>
[[File:pi3b-img146.png]]</ol><span id="设置静态ip地址的方法how-to-burn-android-image-to-spiflashnvme-ssd"></span>=== 设置静态IP地址的方法 ===
'''请不要通过修改/etc/network/interfaces配置文件的方式来设置静态IP地址。'''== How to burn Android image to SPIFlash+NVMe SSD ==
<span id{| class="使用nmtui命令来设置静态ip地址wikitable"></span>==== 使用nmtui命令来设置静态IP地址 ==== <ol style="list-stylebackground-typecolor: decimal#ffffdc;"><li><p>首先运行'''nmtui'''命令</p><p>orangepi@orangepi:~$ '''nmtui'''</p></li><li><p>然后选择'''Edit a connection'''并按下回车键</p><p>[[Filewidth: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键将光标移动到下图所示的'''&lt800px;Automatic&gt;'''位置进行IPv4的配置</p>" <p>[[File:media/image193.png|575x240px]]</p></li>-<li><p>然后回车,通过上下方向键选择'''Manual''',然后回车确定</p><p>[[File:media/image194.png|576x237px]]</p></li><libig><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 Note that all the following operations are performed on 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/image203Windows computer.png|576x224px]]</p></li><li><p>然后通过'''&lt;Back&gt;'''和'''Quit'''按钮就可以退出nmtui</pbig><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> <span id="使用nmcli命令来设置静态ip地址"></span>==== 使用nmcli命令来设置静态IP地址 ====}
<ol style="list-style-type: decimal;">
<li><p>如果要设置网口的静态IP地址,请先将网线插入开发板,'''如果需要设置WIFI的静态IP地址,请先连接好WIFI''',然后再开始设置静态IP地址</p></li><li><p>然后通过'''nmcli con show'''命令可以查看网络设备的名字,如下所示First, you need to prepare an NVMe SSD solid state drive</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;"><li><p>'''&quot;Wired connection 1&quot;''' &gt; 表示设置以太网口的静态IP地址,如果需要设置WIFI的静态IP地址,请修改为WIFI网络接口对应的名字(通过'''nmcli &gt; con show'''命令可以获取到)</p></li><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.8The M.8&quot; \'''</p><p>'''ipv4.method &quot;manual&quot;'''</p></li></ol></li><li><p>然后重启Linux系统</p><p>orangepi@orangepi:~$ '''sudo reboot'''</p>2 2230 SSD is as follows</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>
[[File:pi3b-img73.png]]</ol><span idol start="2" style="ssh远程登录开发板list-style-type: lower-alpha;"><li>The M.2 2242 SSD is as follows</spanli>== SSH远程登录开发板 ==
'''Linux系统默认都开启了ssh远程登录,并且允许root用户登录系统。ssh登录前首先需要确保以太网或者wifi网络已连接,然后使用ip addr命令或者通过查看路由器的方式获取开发板的IP地址。'''[[File:pi3b-img74.png]]</ol></li></ol><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>
[[File:pi3b-img75.png]]<span id/ol><ol start="ubuntu下ssh远程登录开发板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</spanli>=== Ubuntu下SSH远程登录开发板 ===
# 获取开发板的IP地址[[File:pi3b-img76.png]]# 然后就可以通过ssh命令远程登录Linux系统</ol><ol start="4" style="list-style-type: decimal;"><li>You also need to prepare a good quality USB2.0 male-to-male data cable</li>
test@test:~$ '''ssh [mailto:root@192.168.1.36 root@192.168.1.]xxx''' (需要替换为开发板的IP地址)<div class="figure">
root@192.168.1[[File:pi3b-img16.xx's password: (在这里输入密码,默认密码为orangepi)png]]
</div></ol><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 '''Orange Pi's data download page'''</p></li><li><p>Then download the image of Android11</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 S'''PIFlash-NVME SSD boot image folder''' to download</li>
'''如果提示拒绝连接,只要使用的是Orange Pi提供的镜像,就请不要怀疑orangepi这个密码是不是不对,而是要找其他原因。'''
 
<ol start="3" style="list-style-type: decimal;">
<li><p>成功登录系统后的显示如下图所示</p>
<div class="figure">
[[File:media/image206pi3b-img124.png|405x207px|L467QDF65C(YR79U]TH[TND]]
</div>
</ol><ol start="2" style="list-style-type: lower-alpha;"><li><p>After entering the '''如果ssh无法正常登陆Linux系统,首先请检查下开发板的IP地址是否能ping通,如果ping通没问题的话,可以通过串口或者HDMI显示器登录Linux系统然后在开发板上输入下面的命令后再尝试是否能连接:SPIFlash-NVME SSD boot image folder''', you can see the following two images. Their differences are:</p><ol style="list-style-type: none;"><li><p>a) 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>b) If you want to use LCD screen, please choose image with lcd</p></olli>
root@orangepi[[File:~# pi3b-img147.png]]</ol></li></ol></li></ol><ol start="7" style="list-style-type: decimal;"><li>Then use the decompression software to decompress '''DriverAssitant_v5.12.zip''', and then find the '''reset_sshDriverInstall.shexe''' executable file in the decompressed folder and open it</li> [[File:pi3b-img31.png]]</ol><ol start="8" style="list-style-type: decimal;"><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>
[[File:pi3b-img32.png]]</ol><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>
[[File:pi3b-img33.png]]<span id/ol></li></ol><ol start="windows下ssh远程登录开发板9"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</spanli>=== Windows下SSH远程登录开发板 ===
[[File:pi3b-img34.png]]</ol ><ol start="10" 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;<p/li>首先获取开发板的IP地址 [[File:pi3b-img35.png]]</pol></liol start="11" style="list-style-type: decimal;"><li><p>在windows下可以使用MobaXterm远程登录开发板,首先新建一个ssh会话Then start burning the Android image to SPIFlash+NVMe SSD</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/image207First, connect the development board to the Windows computer through the USB2.0 male-to-male data cable. The position of the USB2.png|576x292px]]</p>0 programming port of the development board is shown in the figure below</li></ol></li><li><p>然后会提示输入密码,默认root和orangepi用户的密码都为orangepi</p><p>'''注意,输入密码的时候,屏幕上是不会显示输入的密码的具体内容的,请不要以为是有什么故障,输入完后直接回车即可。'''</p></li></ol>
<div class="figure">
[[File:media/image208pi3b-img36.png|578x150px|IMG_256]]
</div></ol><ol start="42" style="list-style-type: decimallower-alpha;"><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:</olp></li>
[[File:media/image209pi3b-img37.png|576x334px]]</ol><ol start="4" style="list-style-type: lower-alpha;"><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>
[[File:pi3b-img38.png]]</ol><span idol start="5" style="上传文件到开发板linux系统中的方法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;</spanli>== 上传文件到开发板Linux系统中的方法 ==
[[File:pi3b-img39.png]]</ol><span idol start="在ubuntu6" style="list-pc中上传文件到开发板linux系统中的方法style-type: lower-alpha;"><li>Then click the &quot;'''Upgrade Firmware'''&quot; column of the burning tool</spanli>=== 在Ubuntu PC中上传文件到开发板Linux系统中的方法 ===
[[File:pi3b-img132.png]]</ol><ol start="7" style=== 使用scp命令上传文件的方法 ===="list-style-type: lower-alpha;"><li>Then click the &quot;'''Firmware'''&quot; button to select the Android image to be burned</li>
<ol style="list[[File:pi3b-style-type: decimal;">img133.png]]<li><p>使用scp命令可以在Ubuntu PC中上传文件到开发板的Linux系统中,具体命令如下所示</pol><ol start="8" 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:''' Finally, click the &quot;Upgrade&gtquot; 开发板Linux系统中的路径,也可以修改为其它的路径</p><p>test@test:~$ '''scp file_path orangepi@192button to start burning.168The burning process is shown in the figure below.xxYou can see that the firmware will be burned to SPIFlash first, and then burned to PCIE.xx:/home/orangepi/'''</p></li></ol></li><li><p>如果要上传文件夹,需要加上-r参数</p><p>test@test:~$ '''scp -r dir_path orangepi@192.168After burning is completed, the Android system will start automatically.xx.xx:/home/orangepi/'''</p></li><li><p>scp还有更多的用法,请使用下面的命令查看man手册</p></li></ol>
test@test[[File:~$ '''man scp'''pi3b-img148.png]]</ol></li></ol><span id="using-rkdevtool-to-clear-spiflash"></span>
==== 使用filezilla上传文件的方法 ==Using RKDevTool to clear SPIFlash ==
<ol style="list-style-type: decimal;"><li><p>首先在Ubuntu PC中安装filezilla</p><p>test@test:~$ '''sudo apt install -y filezilla'''</p></li><li><p>然后使用下面的命令打开filezilla</p><p>test@test:~$ '''filezilla'''</p></li><li><p>filezilla打开后的界面如下所示,此时右边远程站点下面显示的是空的</p><div class="# The position of SPI Flash on the development board is shown in the figure">below
::[[File:media/image210pi3b-img76.png|576x453px|截图 2022-12-03 19-04-40]]
</div></liol start="2" style="list-style-type: decimal;"><li><p>连接开发板的方法如下图所示</p>First, you need to prepare a good quality USB2.0 male-to-male data cable</li></ol>
<div class="figure">
[[File:media/image211pi3b-img16.png|577x128px|IMG_256]]
</div></ol><ol start="53" 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'''</p><p>[from the [Filehttp:media/image212/www.png|249x181px]]<orangepi.org/html/hardWare/computerAndMicrocontrollers/p><service-and-support/li><li><p>然后选择Orange-Pi-3B.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</olli>
<div class="figure">
[[File:media/image213pi3b-img149.png|278x150px|IMG_256]]
</div></ol><ol start="72" style="list-style-type: decimallower-alpha;"><li>连接成功后在filezilla软件的右边就可以看到开发板Linux文件系统的目录结构了Then download all the files below</li></ol>
<div class="figure">
[[File:media/image214pi3b-img150.png|533x330px|IMG_256]]
</div>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that the &quot;MiniLoader-things needed to burn the Linux image&quot; folder is hereinafter referred to as the MiniLoader folder.'''</big>|}</ol></li></ol><ol start="84" style="list-style-type: decimal;"><li>然后在filezilla软件的右边选择要上传到开发板中的路径,再在filezilla软件的左边选中Ubuntu PC中要上传的文件,再点击鼠标右键,再点击上传选项就会开始上传文件到开发板中了。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]]<div class/ol><ol start="5" style="figurelist-style-type: decimal;"><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>
[[File:media/image215pi3b-img32.png|529x414px|IMG_256]]</ol><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>
[[File:pi3b-img33.png]]</ol></li></divol><ol start="96" style="list-style-type: decimal;"><li><p>上传完成后就可以去开发板Linux系统中的对应路径中查看上传的文件了</p>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><li><p>上传文件夹的方法和上传文件的方法是一样的,这里就不再赘述了</p></li></ol>
[[File:pi3b-img34.png]]</ol><span idol start="在windows7" style="list-pc中上传文件到开发板linux系统中的方法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;</spanli>=== 在Windows PC中上传文件到开发板Linux系统中的方法 ===
[[File:pi3b-img35.png]]</ol><span idol start="使用filezilla上传文件的方法8" style="list-1style-type: decimal;"><li><p>Then you can start to clear the content in SPI FLASH</spanp><ol style==== 使用filezilla上传文件的方法 ===="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>
# 首先下载filezilla软件Windows版本的安装文件,下载链接如下所示<div class="figure">
[https://filezilla-project.org/download.php?type=client '''https://filezilla-project.org/download.php?type=client'''][[File:media/image216pi3b-img36.png|472x171px|IMG_256]]
</div></ol><ol start="2" style="list-style-type: lower-alpha;"><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> [[File:media/image217pi3b-img37.png|384x276px]]</ol><ol start="4" style="list-style-type: lower-alpha;"><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>
[[File:pi3b-img38.png]]</ol><ol start="25" style="list-style-type: decimallower-alpha;"><li><p>下载的安装包如下所示,然后双击直接安装即可</p><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;'''FileZilla_Server_1.5.1_win64-setup.exefound a MASKROM device'''</p>&quot;</li></ol>
安装过程中,下面的安装界面请选择[[File:pi3b-img39.png]]</ol><ol start="6" style="list-style-type: lower-alpha;"><li><p>Then please select '''Advanced Features'''</p><p>[[File:pi3b-img126.png]]</p></li><li><p>Then click the position shown in the figure below</p><p>[[File:pi3b-img127.png]]</p></li><li><p>Select '''Declinerk3566_MiniLoaderAll.bin''',然后再选择in the '''Next&gt;MiniLoader'''folder you downloaded earlier, and click Open</p></li>
<div class="figure">
[[File:media/image218pi3b-img68.png|319x251px|IMG_256]]
</div></ol><ol start="3" style="list-style-type: decimallower-roman;"><li>filezilla打开后的界面如下所示,此时右边远程站点下面显示的是空的<p>Then click '''Download'''</p><p>[[File:pi3b-img128.png]]</p></li></ol>
<div classol start="10" style="list-style-type: lower-alpha;"><li><p>The display after downloading '''rk3566_MiniLoaderAll.bin''' is shown in the figurebelow</p><p>[[File:pi3b-img140.png]]</p></li><li><p>Then select the storage device as '''SPINOR'''</p><p>[[File:pi3b-img151.png]]</p></li><li><p>Then click Switch '''Storage'''</p><p>[[File:pi3b-img152.png]]</p></li><li><p>Then click '''Erase All''' to start erasing SPIFlash</p><p>[[File:pi3b-img153.png]]</p></li><li><p>The display log after erasing SPIFlash is shown in the figure below</p><p>[[File:pi3b-img154.png]]</p></li></ol></li></ol><span id="start-the-orange-pi-development-board"></span>
[[File:media/image219.png|451x357px|IMG_256]]== Start the Orange Pi development board ==
</div># 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.<ol start="4" style="list# 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-styleC to HDMI cable, the system interface of the development board can also be displayed through the Type-type: decimal;">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.<li>连接开发板的方法如下图所示:<# Connect a high-quality power adapter with a 5V/li></ol>3A USB Type-C interface.
::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <div classbig>'''<span style="figurecolor:#FF0000">Remember not to plug in a power adapter with a voltage output greater than 5V, as this will burn out the development board.'''</span>
[[File'''<span style="color:media#FF0000">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.'''</image220.png|522x108px|IMG_256]]span>
'''</div><ol start="5" span style="list-style-typecolor: decimal;#FF0000"><li>然后选择''The Type-C power port does not support PD negotiation.'保存密码''',再点击'''确定'''</li></olspan>
'''<div classspan style="figurecolor:#FF0000">In addition, please do not connect the USB interface of the computer to power the development board.'''</span></big>|}
[[File<ol start="6" style="list-style-type:mediadecimal;"><li>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.</image221.png|207x146px|IMG_256]]li>
</div><ol start="6" style="list-style-type: decimal;"><li>然后选择'''总是信任该主机'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 '',再点击'''确定[[Orange Pi 3B#How to use the debugging serial port|the section on how to use the debugging serial port]].'''</li></ol><span id="how-to-use-the-debugging-serial-port"></span>
<div class="figure">= How to use the debugging serial port ==
[[File:media<span id="connection-instruction-of-debugging-serial-port"></image222.png|221x109px|IMG_256]]span>=== Connection instruction of debugging serial port ===
</div><ol start="7" style="list-style-type: decimal;"><li>连接成功后在filezilla软件的右边就可以看到开发板Linux文件系统的目录结构了<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>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''For better compatibility, it is recommended to use CH340 USB to TTL module, please do not use CP2102, PL2303 USB to TTL module.'''</lip><p>'''Before purchasing a USB to TTL module, please confirm that the module supports a baud rate of 1500000.'''</p></olbig>|}
<div class="figure">
[[File:media/image223pi3b-img155.png|537x397px|IMG_256]]
</div></li></ol><ol start="82" style="list-style-type: decimal;"><li>然后在filezilla软件的右边选择要上传到开发板中的路径,再在filezilla软件的左边选中Windows PC中要上传的文件,再点击鼠标右键,再点击上传选项就会开始上传文件到开发板中了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]]<div class/ol><ol start="3" style="figurelist-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>
[[File:media/image224a.png|535x394px|IMG_256]]Connect the GND of the USB to TTL module to the GND of the development board
:b. The '''</div><ol start="9" span style="list-style-typecolor: decimal;#FF0000"><li><p>上传完成后就可以去开发板Linux系统中的对应路径中查看上传的文件了</p></li><li><p>上传文件夹的方法和上传文件的方法是一样的,这里就不再赘述了</p></li>RX of the USB to TTL module is connected to the TX</olspan>''' of the development board
:c. The '''<span idstyle="hdmi测试color:#FF0000">TX of the USB to TTL module is connected to the TX</span>''' of the development board</ol><ol start="4" style= HDMI测试 =="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>
<span iddiv class="hdmi显示测试figure"></span>=== HDMI显示测试 ===
<ol style="list-style-type: decimal;"><li><p>使用HDMI转HDMI线连接Orange Pi开发板和HDMI显示器</p><p>[[File:media/image11pi3b-img157.png|199x129px]]</p></li><li><p>启动Linux系统后如果HDMI显示器有图像输出说明HDMI接口使用正常</p></li></ol>
</div>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''注意,很多笔记本电脑虽然带有HDMI接口,但是笔记本的HDMI接口一般只有输出功能,并没有HDMI in的功能,也就是说并不能将其他设备的HDMI输出显示到笔记本的屏幕上。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'''</big>|}</ol><span id="how-to-use-the-debugging-serial-port-on-the-ubuntu-platform"></span>
'''当想把开发板的HDMI接到笔记本电脑HDMI接口时,请先确认清楚您的笔记本是支持HDMI in的功能。'''=== How to use the debugging serial port on the Ubuntu platform ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''当HDMI没有显示的时候,请先检查下HDMI线有没有插紧,确认接线没问题后,可以换一个不同的屏幕试下有没有显示。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.'''</big>|}
<span id="hdmi转vga显示测试"><# 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 '''/span>=== HDMI转VGA显示测试 ===dev''' on the Ubuntu PC. Remember this node name, and then set the serial port software will be used
<ol style::{| class="list-style-type: decimal;wikitable"><li><p>首先需要准备下面的配件</p><ol style="list-style-typewidth: lower-alpha800px;"><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>[[Filetest@test:media/image227.png|576x339px]]</p><p>~$ '''使用HDMI转VGA显示时,开发板以及开发板的Linux系统是不需要做任何设置的,只需要开发板HDMI接口能正常显示就可以了。所以如果测试有问题,请检查HDMI转VGA转换器、VGA线以及显示器是否有问题。ls /dev/ttyUSB*'''</p></li></ol>
<span id="hdmi分辨率设置方法"></span>dev/ttyUSB0=== HDMI分辨率设置方法 ===|}
<ol start="2" style="list-style-type: decimal;"><li><p>首先在'''Settings'''中打开'''Display'''Then use the following command to install putty on Ubuntu PC</pli><p>[[File{| class="wikitable" style="width:media/image228.png|576x370px]]</p></li><li><p>然后就能看到系统当前的分辨率</p>800px;" <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>[[Filetest@test:media/image231.png|415x277px]]</p></li><li><p>等新的分辨率设置完后再选择~$ '''Keep the configurationsudo apt-get update'''即可</p><p>[[File:media/image232.png|447x243px]]</p></li></ol>
test@test:~$ '''sudo apt-get install -y putty'''|}</ol><ol start="3" style= 蓝牙使用方法 ="list-style-type: decimal;"><li>Then run putty, '''<span style="color:#FF0000">remember to add sudo permission</span>'''</li>
{| class="wikitable" style="width:800px;" |-| test@test:~$ '''sudo putty'''|}</ol><span idol start="4" style="桌面版镜像的测试方法list-style-1type: decimal;"><li>After executing the putty command, the following interface will pop up</spanli>=== 桌面版镜像的测试方法 ===
<ol style="list-style-type: decimal;"><li><p>点击桌面右上角的蓝牙图标</p><p>[[File:media/image233pi3b-img158.png|330x128px]]</p></li><li><p>然后选择适配器</pol><p>[[Fileol start="5" style="list-style-type:media/image234.png|375x165px]]</p></lidecimal;"><li><p>如果有提示下面的界面,请选择'''Yes'''</p><p>[[File:media/image235.png|248x85px]]</p>First select the setting interface of the serial port</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-img159.png]]</ol><span idol start="6" style="usb接口测试list-style-type: decimal;"><li><p>Then set the parameters of the serial port</spanp><ol style== USB接口测试 =="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>
'''USB接口是可以接USB hub来扩展USB接口的数量的。'''<div class="figure">
<span id="连接usb鼠标或键盘测试"></span>=== 连接USB鼠标或键盘测试 ===[[File:pi3b-img160.png]]
# 将USB接口的键盘插入Orange Pi开发板的USB接口中</div></ol># 连接Orange Pi开发板到HDMI显示器</li></ol># 如果鼠标或键盘能正常操作系统说明USB接口使用正常(鼠标只有在桌面版的系统中才能使用)<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><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>
<span iddiv class="连接usb存储设备测试figure"></span>=== 连接USB存储设备测试 ===
# 首先将U盘或者USB移动硬盘插入Orange Pi开发板的USB接口中# 执行下面的命令如果能看到sdX的输出说明U盘识别成功[[File:pi3b-img161.png]]
orangepi@orangepi:~$ '''cat </div></ol></procli></partitions | grep &quotol><ol start="8" style="list-style-type: decimal;sd*&quot;'''"><li>After starting the development board, you can see the Log information output by the system from the opened serial port terminal</li>
major minor #blocks name[[File:pi3b-img162.png]]</ol><span id="how-to-use-the-debugging-serial-port-on-windows-platform"></span>
8 0 30044160 '''sda'''=== How to use the debugging serial port on Windows platform ===
8 1 30043119 {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''sda1There 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.'''</big>|}
<ol startstyle="3list-style-type: decimal;" ><li><p>Download MobaXterm</p><ol style="list-style-type: decimallower-alpha;"><li>使用mount命令可以将U盘挂载到Download MobaXterm website as follows</li>{| class="wikitable" style="width:800px;" |-| [https://mobaxterm.mobatek.net/ '''https:/mnt/mobaxterm.mobatek.net'''中,然后就能查看U盘中的文件了]|}</liol></olstart="2" style="list-style-type: lower-alpha;"orangepi@orangepi:~$ <li>After entering the MobaXterm download page, click '''sudo mount /dev/sda1 /mnt/GET XOBATERM NOW!'''</li>
orangepi@orangepi[[File:~$ '''ls pi3b-img163.png]]</mntol><ol start="3" style="list-style-type: lower-alpha;"><li>Then choose to download the Home version</'''li>
test[[File:pi3b-img164.txtpng]]</ol><ol start="4" style="list-style-type: lower-alpha;"><li>Then select the Portable version. After downloading, you don't need to install it, just open it and use it</li>
[[File:pi3b-img165.png]]</ol></li></ol><ol start="42" style="list-style-type: decimal;"><li>挂载完后通过'''df After downloading, use decompression software to decompress the downloaded compressed package, you can get the executable software of MobaXterm, and then double-h'''命令就能查看U盘的容量使用情况和挂载点click to open</li></ol>
orangepi@orangepi[[File:~$ pi3b-img166.png]]</ol><ol start="3" style="list-style-type: decimal;"><li><p>After opening the software, the steps to set up the serial port connection are as follows</p><ol style="list-style-type: lower-alpha;"><li><p>Open the session settings interface</p></li><li><p>Select the serial port type</p></li><li><p>Select the port number of the serial port (select the corresponding port number according to the actual situation)</p></li><li><p>Select the baud rate of the serial port as '''df -h | grep 1500000'''</p></li><li><p>Finally click the &quot;sd'''OK'''&quot;'''button to complete the setting</p></li>
/dev/sda1 29G 208K 29G 1% /mnt<div class="figure">
<span id="usb无线网卡测试"></span>=== USB无线网卡测试 ===[[File:pi3b-img167.png]]
目前</div></ol></li></ol><ol start="4" style="list-style-type: decimal;"><li>After clicking the &quot;'''测试过的OK'''能用的USB无线网卡如下所示,其他型号的USB无线网卡请自行测试,如果无法使用就需要移植对应的USB无线网卡驱动&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>
{| <div class="wikitablefigure"|-| 序号| 型号||-| 1| RTL8723BU>
支持2[[File:pi3b-img168.4G WIFI+BT4.0png]]
| [[File:media</image2%2043.png]]div></ol>|<span id="instructions-for-using-the-5v-pin-| 2| RTL8811in-the-40pin-interface-of-the-development-board-to-supply-power"></span>
支持2.4G +5G WIFI== Instructions for using the 5v pin in the 40pin interface of the development board to supply power ==
{| [[Fileclass="wikitable" style="background-color:media/image2%2044.png]]#ffffdc;width:800px;"
|-
| 3<big>'''The power supply method we recommend for the development board is to use the 5V/3A 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.'''</big>| RTL8821CU}
支持2.4G +5G WIFI# First, you need to prepare a power cord as shown in the figure below
支持BT 4.2<div class="figure">
| <div class="figure"> ::[[File:media/image24%205pi3b-img169.jpeg|tb_imag e_share_1670833201 123png]]
</div>
::{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''Please purchase the power cord shown in the picture above by yourself'''</big>
|}
<ol start="2" style="list-style-type: decimal;"><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 power adapter connector ('''<span idstyle="rtl8723bu测试color:#FF0000">please do not plug into the computer's USB port for power supply</span>''')</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, '''<span style==== RTL8723BU测试 ===="color:#FF0000">remember not to reverse the connection</span>'''</p></li>
<ol style="list-style-type: decimal;"><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[File: new high-speed USB device number 2 using ehcipi3b-platform</p><p>[ 83img170.588375png] 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</pol><p>[ 83.588443] usb 2-1: Manufacturer: Realtek</pli><p>[ 83.588460] usb 2-1: SerialNumber: 00e04c000001</pol><p>[ 83.601974] Bluetooth: hci0: RTL: examining hci_verspan id=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"instructions-142432</p><p>[ 83.658651] usbcore: registered new interface driver rtk_btusb</p><p>[ 83.667124] usb 2for-1: This Realtek USB WiFi dongle (0x0bda:0xb720) is untested!</p><p>[ 83.667137] usb 2use-1: Please report results to Jes.Sorensen@gmail.com</p><p>[ 83.890140] usb 2of-1: Vendor: Realtek</p><p>[ 83.890153] usb 2ubuntudebian-1: Product: 802.11n WLAN Adapter</p><p>[ 83.890159] usb 2server-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 2and-1: rtl8xxxu: Loading firmware rtlwifi/rtl8723bu_nic.bin</p><p>[ 83.895289] usb 2xfce-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 2desktop-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><psystem">在桌面中也可以看到出现了蓝牙图标,此时蓝牙还未打开,所以会显示一个红色的'''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></olspan>
<span id="rtl8811测试"><'''Instructions for use of Ubuntu/span>==== RTL8811测试 ===Debian Server and Xfce desktop system''' =
<ol {| class="wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;"><li><p>首先将RTL8811无线网卡模块插入开发板的USB接口中</p></li><li><p>然后Linux系统会自动加载RTL8811 WIFI相关的内核模块,通过lsmod命令可以看到下面内核模块已自动加载</p><p>orangepi@orangepi:~$ '''lsmod'''</p><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><pbig>orangepi@orangepi:~$ '''sudo ifconfig wlx1cbfced9d260The content of this chapter is written based on the images of the Linux server version and the xfce desktop version.'''</pbig><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测试supported-linux-image-types-and-kernel-versions"></span>==== RTL8821CU测试 ==Supported Linux image types and kernel versions ==
<ol {| class="wikitable" style="listwidth:800px;text-style-typealign: decimalcenter;"><li><p>首先将rtl8821cu 无线网卡模块插入开发板的usb 接口中</p></li>|-|'''Linux image type'''|'''kernel version'''|'''server version'''|'''desktop version'''|-|'''Debian 11 - Bullseye'''|'''Linux5.10'''|'''support'''|'''support'''<li><p>然后使用|-|'''lsusbUbuntu 20.04 - Focal'''命令就可以看到rtl8821cu usb wifi模块的设备信息,请确保USB模块没有处于Driver CDROM Mode</p><p>orangepi@orangepi:~$ |'''Linux5.10'''|'''support'''lsusb | grep &quot;Realtek&quot;'''</p>support'''|-<p>Bus 002 Device 003: ID 0bda:c820 Realtek Semiconductor Corp|'''Ubuntu 22. 80204 - Jammy'''|'''Linux5.11ac NIC</p></li></ol>10'''|'''support'''|'''support'''|}
orangepi@orangepi:~$ '''lsusb | grep &quot;Realtek&quot;'''<span id="linux-system-adaptation"></span>== Linux System adaptation ==
Bus 002 Device 002{| class="wikitable" style="width: ID 0bda800px;text-align:1a2b Realtek Semiconductor Corpcenter;"|-|'''Function'''|'''Debian11'''|'''Ubuntu20. RTL8188GU 80204'''|'''Ubuntu22.11n WLAN Adapter (04'''|-|'''USB2.0x3'''|'''OK'''|'''OK'''|'''OK'''|-|'''USB3.0x1'''|'''OK'''|'''OK'''|'''OK'''|-|'''M.2 NVMe SSD Start'''|'''OK'''|'''OK'''|'''OK'''|-|'''WIFI'''|'''OK'''|'''OK'''|'''OK'''|-|'''Bluetooth'''|'''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 fan interface'''|'''OK'''|'''OK'''|'''OK'''|-|'''3pin Debug serial port'''|'''OK'''|'''OK'''|'''OK'''|-|'''EMMC'''|'''OK'''|'''OK'''|'''OK'''|-|'''TF card start'''|'''OK'''|'''OK'''|'''OK'''|-|'''HDMI Video'''|'''OK'''|'''OK'''|'''OK'''|-|'''HDMI Audio'''|'''OK'''|'''OK'''|'''OK'''|-|'''Camera'''|'''OK'''|'''OK'''|'''OK'''|-|'''LCD'''|'''OK'''|'''OK'''|'''OK'''|-|'''Edp Display'''|'''OK'''|'''OK'''|'''OK'''|-|'''Gigabit Ethernet port'''|'''OK'''|'''OK'''|'''OK'''|-|'''Network port status light'''|'''OK'''|'''OK'''|'''OK'''|-|'''headphone playback'''|'''OK'''|'''OK'''|'''OK'''|-|'''headphone recording'''|'''OK'''|'''OK'''|'''OK'''|-|'''LED Light'''|'''OK'''|'''OK'''|'''OK'''|-|'''RTC'''|'''OK'''|'''OK'''|'''OK'''|-|'''GPU'''|'''OK'''|'''OK'''|'''OK'''|-|'''NPU'''|'''OK'''|'''OK'''|'''OK'''|-|'''VPU'''|'''OK'''|'''OK'''|'''OK'''|-|'''watchdog test'''|'''OK'''|'''OK'''|'''OK'''|-|'''Chromium Hard solution video'''|'''OK'''|'''OK'''|'''Driver CDROM ModeOK''')|}
'''如果lsusb命令看到的USB WIFI模块处于Driver CDROM Mode,请重新拔插下USB WIFI模块。如果还不行,请手动执行下面的命令切换下模式:'''<span id="the-format-of-linux-commands-in-this-manual"></span>== The format of Linux commands in this manual ==
orangepi@orangepi# In this manual, all commands that need to be entered in the Linux system will be marked with the following box:~$ '''sudo usb_modeswitch -KW -v 0bda :{| class="wikitable" style="width:800px;height:40px;" |-p 1a2b'''|
<ol start="3" style="list-style-type: decimal;"><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 foundAs shown below, idVendor=0bdathe content in the yellow box indicates the content that needs special attention, idProduct=1a2b, bcdDevice= 2except for the commands in it.00</p><p>[ 57.231916] usb 2-1: New USB device strings: Mfr{| class=1, Product"wikitable" style=2, SerialNumber=0</p><p>[ 57.231937] usb 2"background-1color: Product: DISK</p><p>[ 57.231956] usb 2-1: Manufacturer: Realtek</p><p>[ 57.242594] usb-storage 2-1#ffffdc;width: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&lt800px;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@orangepiheight:~$ '''sudo apt-get update &amp40px;&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>
|}<span idol start="usb摄像头测试2"></span>=== USB摄像头测试 === <ol style="list-style-type: decimal;"><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摄像头的方法Description of the prompt type in front of the command</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>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><li><p>安装完fswebcam后可以使用下面的命令来拍照</p><ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><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><pspan style="color:#FF0000">orangepi@orangepi:~$ '''scp image.jpg [mailto:test@192.168.1.55:</home/test test@192.168.1.55:/home/test] (根据实际情况修改IP地址和路径)span> sudo apt update'''</p></li><li><p>在桌面版的Linux系统中,可以通过HDMI显示器直接查看拍摄的图片</p></li></ol></li></ol>
'''<span style== 音频测试 =="color:#FF0000">root@orangepi:~#</span>''' '''vim /boot/boot.cmd'''
'''<span style=== 在桌面系统中测试音频方法 ==="color:#FF0000">test@test:~$</span> ssh [mailto:root@192.168.1.36 root@192.168.1.]xxx'''
'''<span style="color:#FF0000">root@test:~#</span> ls'''|}</ol><ol start="2" style="list-style-type: decimallower-alpha;"><li><p>首先打开文件管理器'''</pspan style="color:#FF0000">root@orangepi:~$<p/span>[[File:media/image251''' 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.png|357x176px]]When executing a privileged command, you need to add '''sudo'''</p></li><li><p>然后找到下面这个文件(如果系统中没有这个音频文件,可以自己上传一个音频文件到系统中)'''<span style="color:#FF0000">root@orangepi:~#</span>''' 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>[[File'''<span style="color:#FF0000">test@test:media~$</image252span>''' 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.png|283x225px]]When executing privileged commands, sudo needs to be added '''sudo'''</p></li><li><p>然后选中audio'''<span style="color:#FF0000">root@test:~#</span>''' 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.wav文件,右键选择使用vlc打开就可以开始播放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><p/li>[[File:media</image253.png|288x234px]]ol></pli></liol><!-- --><ol start="3" style="list-style-type: decimal;"><li><p>切换HDMI播放和耳机播放等不同音频设备的方法What are the commands that need to be entered?</p>
<ol style="list-style-type: lower-alpha;">
<li><p>首先打开音量控制界面</p><p>[[File:media/image254.png|308x169px]]</p></li><li><p>播放音频的时候,在As shown below, '''Playbackthe 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</pli><p>[[File{| class="wikitable" style="width:media/image255.png800px;" |-|576x282px]]</p></li></ol><root@orangepi:~# '''cat /li><boot/ol>orangepiEnv.txt'''
'''<span style="color:#FF0000">verbosity== 使用命令播放音频的方法 ===7</span>'''
bootlogo==== 耳机接口播放音频测试 ====false
'''<ol span style="list-style-typecolor: decimal;#FF0000"><li><p>首先将耳机插入开发板的耳机孔中console=serial</p><pspan>[[File:media/image256.png|395x112px]]</p></li><li><p>然后可以通过'''aplay -l'''命令可以查看下Linux系统支持的声卡设备,从下面的输出可知,'''card 0'''为rk809的声卡设备,也就是耳机的声卡设备</p><p>orangepi@orangepi:~$ '''aplay -l'''</p>|}<p>**** List of PLAYBACK Hardware Devices ****</pol><p>'''card 0: rockchiprk809 [rockchipol start="2" style="list-style-rk809], device 0type: dailinklower-multicodecs rk817-hifi-0 [dailink-multicodecs rk817-hifi-0]'''</palpha;"><pli>'''Subdevices: 0/1'''</p><p>'''Subdevice #0: subdevice #0'''</p><p>card 1: rockchiphdmi [rockchipAs 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,hdmi]the last &quot;\&quot; of each line needs to be removed, device 0: fe400000this is not part of the command.i2s-i2s-hifi i2s-hifi-0 [fe400000.i2s-i2s-hifi i2s-hifi-0]In addition, there are spaces in different parts of the command, please don't miss it</pli><p>Subdevices{| class="wikitable" style="width: 0/1</p>800px;" <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''echo \'</p><p>Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo</p></li></ol>
<span id="hdmi音频播放测试"></span>==== HDMI音频播放测试 ==='''&quot;deb [arch=$(dpkg --print-architecture) \'''
<ol style="list-style-type: decimal;"><li><p>首先使用HDMI 转HDMI线将Orange Pi开发板连接到电视机上(其他的HDMI显示器需要确保可以播放音频)</p></li><li><p>然后查看下HDMI的声卡序号,从下面的输出可以知道HDMI的声卡为'''card 1'''</p><p>orangepi@orangepi:~$ '''aplay signed-l'''<by=/p><p>**** List of PLAYBACK Hardware Devices ****<usr/p><p>card 0: rockchiprk809 [rockchip-rk809], device 0: dailink-multicodecs rk817-hifi-0 [dailink-multicodecs rk817-hifi-0]<share/p><p>Subdevices: 0keyrings/1</p><p>Subdevice #0: subdevice #0</p><p>'''card 1: rockchiphdmi [rockchip,hdmi], device 0: fe400000.i2s-i2sdocker-hifi i2sarchive-hifi-0 [fe400000keyring.i2s-i2s-hifi i2s-hifi-0gpg]\'''</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>
=== 使用命令测试录音的方法 ==='''https://download.docker.com/Linux/debian \'''
<ol style="list-style-type: decimal;"><li><p>Orange Pi 3B开发板没有板载MIC,只能通过带MIC功能的耳机来录制音频。将带MIC功能的耳机插入开发板后,运行下面的命令会通过耳机录制一段音频</p><p>orangepi@orangepi:~$ '''amixer $(lsb_release -c 0 cset name='Capture MIC Path' 'Main Mic''''<cs) stable&quot; | sudo tee /etc/apt/p><p>orangepi@orangepi:~$ '''arecord -D hw:0,0 -sources.list.d 5 -f cd -t wav /tmpdocker.list &gt; /dev/test.wavnull'''|}</pol></li></ol><span id="linux-system-login-instructions"></span>
== 温度传感器 Linux system login instructions ==
# 查看系统温度传感器的命令为:<span id="linux-system-default-login-account-and-password"></span>=== Linux system default login account and password ===
{| class="wikitable" style="width:800px;text-align: center;"|-|'''Account'''|'''Passport'''|-|'''root'''|'''orangepi@'''|-|'''orangepi:~$ '''sensors|'''orangepi'''|}
soc_thermal{| class="wikitable" style="background-virtualcolor:#ffffdc;width:800px;" |-0| <big>'''Note that when entering the password, <span style="color:#FF0000">the specific content of the entered password will not be displayed on the screen</span>, please do not think that there is any fault, just press Enter after inputting.'''</big>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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, <span style="color:#FF0000">please do not suspect that the above password is wrong</span>, but look for other reasons.'''</big>|}
Adapter: Virtual device temp1: +41.9°C (crit <span id= +115.0°C)"how-to-set-automatic-terminal-login-in-linux-system"></span>
gpu_thermal-virtual-0=== How to set automatic terminal login in Linux system ===
Adapter# The Linux system automatically logs in to the terminal by default, and the default login user name is '''<span style="color: Virtual device#FF0000">orangepi</span>'''
temp1: +43:[[File:pi3b-img171.8°Cpng]]
<ol start="2" style="list-style-type: decimal;">
<li>Use the following command to set the root user to automatically log in to the terminal<p/li>查看nvme ssd固态硬盘当前温度的命令为:{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo auto_login_cli.sh root'''|}</pol><ol start="3" style="list-style-type: decimal;"><pli>Use the following command to disable automatic login terminal</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo smartctl auto_login_cli.sh -a /dev/nvme0 | grep &quot;Temperature:&quot;d'''|}</pol><pol start="4" style="list-style-type: decimal;">Temperature<li>Use the following command to set the orangepi user to automatically log in to the terminal again</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi: ~$ '''40 Celsiussudo auto_login_cli.sh orangepi'''|}</pol></lispan id="instructions-for-automatic-login-of-linux-desktop-version-system"></olspan>
<span id="pin接口引脚说明"></span>== 40 Pin接口引脚说明 Instructions for automatic login of Linux desktop version system ===
<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> <span id="安装wiringop的方法"></span>== 安装wiringOP的方法 == '''注意,Orange Pi发布的Linux镜像中已经预装了wiringOP,除非wiringOP的代码有更新,否则无需重新下载编译安装,直接使用即可。''' '''编译好的wiringOP的deb包在orangepi-build中的存放路径为:''' '''orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb''' '''进入系统后可以运行下gpio readall命令,如果能看到下面的输出,说明wiringOP已经预装并且能正常使用。'''# After the desktop system starts, it will automatically log in to the desktop without entering a password
<div class="figure">
::[[File:media/image261pi3b-img172.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]
</div>
'''wiringOP目前主要适配了设置GPIO口输入输出,设置GPIO口输出高低电平以及设置上下拉电阻的功能,像硬件PWM这样的功能是用不了的。''' <ol start="2" style="list-style-type: decimal;"><li><p>下载wiringOP的代码Run the following command to prohibit the desktop system from automatically logging into the desktop</pli><p>orangepi@orangepi{| class="wikitable" style="width:~$ '''sudo apt update'''</p>800px;" <p>orangepi@orangepi:~$ '''sudo apt install |-y git'''</p><p>| orangepi@orangepi:~$ '''git clone https://githubsudo disable_desktop_autologin.com/orangepi-xunlong/wiringOP.git -b nextsh'''</p><p>'''注意,Orange Pi 3B需要下载wiringOP next分支的代码,请别漏了-b next这个参数。'''</p>|}<p>'''如果从GitHub下载代码有问题,可以直接使用Linux镜像中自带的wiringOP源码,存放位置为:/usr/src/wiringOP。'''</p></liol><li><p>编译安装wiringOP</p><p>orangepi@orangepiol start="3" style="list-style-type:~$ '''cd wiringOP'''</p><p>orangepi@orangepi:~/wiringOP$ '''sudo ./build clean'''</p><p>orangepi@orangepi:~/wiringOP$ '''sudo ./build'''</p></lidecimal;"><li><p>测试gpio readall命令的输出如下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:media/image261pi3b-img173.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]
</div></li></ol>
<span id="pin接口gpioi2cuartspi和pwm测试the-setting-method-of-root-user-automatic-login-in-linux-desktop-version-system"></span>== 40pin接口GPIO、I2C、UART、SPI和PWM测试 ==
'''注意,如果需要设置overlays同时打开多个配置,请像下面这样使用空格隔开写在一行即可。'''=== The setting method of root user automatic login in Linux desktop version system ===
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''# Execute the following command to set the desktop system to automatically log in as the root user
::{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''overlays=spi3-m0-cs0-spidev i2c2-m1 i2c3-m0 uart7-m2 uart9-m2 pwm11-m1sudo desktop_login.sh root'''|}
<span idol start="pin2" style="list-gpio口测试style-type: decimal;"><li>Then restart the system, and the root user will automatically log in to the desktop</spanli>=== 40pin GPIO口测试 ===
'''Orange Pi发布的Linux系统中有预装一个blink_all_gpio程序,这个程序会设置40pin中的所有28个GPIO口不停的切换高低电平。'''[[File:pi3b-img174.png]]
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''运行blink_all_gpio程序后,当用万用表去测量GPIO口的电平时,会发现GPIO引脚会在0和3Note 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.3v之间不停的切换。使用这个程序我们可以来测试GPIO口是否能正常工作。'''
'''运行blink_all_gpio程序的方式如下所示:Also note that this is not a bug, since pulseaudio is not allowed to run as root.'''</big>|}</ol><ol start="3" style="list-style-type: decimal;"><li>Execute the following command to set the desktop system to log in automatically with the orangepi user again</li>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi3borangepi:~$ '''sudo blink_all_gpiodesktop_login.sh orangepi''' #记得加sudo权限|}</ol><span id="the-method-of-disabling-the-desktop-in-the-linux-desktop-version-system"></span>
[sudo] password for orangepi: #在这里需要输入密码=== The method of disabling the desktop in the Linux desktop version system ===
# First enter the following command on the command line, '''<ol span style="list-style-typecolor: decimal;#FF0000"><li>Please remember to add sudo permission<p/span>开发板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@orangepiclass="wikitable" style="width:~/wiringOP# '''gpio mode 2 out'''</p></li>800px;" <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>rootorangepi@orangepi:~/wiringOP# $ '''gpio write 2 1sudo systemctl disable lightdm.service'''</p><p>使用gpio readall可以看到7号引脚的值(V)变为了1</p><p>[[File:media/image264.png|576x118px]]</p></li><li><p>其他引脚的设置方法类似,只需修改wPi的序号为引脚对应的序号即可</p></li></ol>}
<span idol start="pin2" style="list-gpio口上下拉电阻的设置方法style-type: decimal;"><li>Then restart the Linux system and you will find that the desktop will not be displayed</spanli>=== 40pin GPIO口上下拉电阻的设置方法 ===
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''注意,Orange Pi 3B下面4个GPIO引脚因为外部有3.3V上拉,所以设置下拉是无效的,其它的引脚可以正常设置上下拉电阻功能sudo reboot'''|}</ol><ol start="3" style="list-style-type: decimal;"><li><p>The steps to reopen the desktop are as follows:</p><ol style="list-style-type: lower-alpha;"><li>First enter the following command on the command line, '''<span style="color:#FF0000">Please remember to add sudo permission</span>'''</li>
[[File{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:media/image265~$ '''sudo systemctl start lightdm.pngservice'''|575x353px]]}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>After the command is executed, the desktop will be displayed</li></ol></li></ol>
<ol stylespan id="listonboard-styleled-type: decimal;light-test-instructions"><li><p>下面以11号引脚——对应GPIO为GPIO3_C6 ——对应wPi序号为5——为例演示如何设置GPIO口的上下拉电阻</p><p>[[File:media/image266.png|576x147px]]</p></li><li><p>首先需要设置GPIO口为输入模式,其中第三个参数需要输入引脚对应的wPi的序号</p><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></olspan>
<span id="pin-spi测试"></span>=== 40pin SPI测试 =Onboard LED Light Test Instructions ==
<ol style="list-style-type: decimal;"><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# There are three LED lights on the development board, one green light, one red light, and one PCIe light.0'''</p><p>spi mode: 0x0</p><p>bits per word: 8</p><p>max speedThe location is shown in the figure below: 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>
<span iddiv class="pin-i2c测试figure"></span>=== 40pin I2C测试 ===
<ol style="list-style-type: decimal;"><li><p>由下表可知,Orange Pi 3B可用的i2c为i2c2、i2c3和i2c4共三组 i2c总线</p><p>:[[File:media/image269pi3b-img175.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>
</div><ol start="2" style="list-style-type: decimal;"><li><p>'''<span style="color:#FF0000">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</span>'''</p></li><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>{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|<big>'''Note that the following operations should be performed under the root user.'''</big>| }<ol style="textlist-alignstyle-type: leftlower-alpha;"| i2c2-m1><li>First enter the setting directory of the green light</li>{| styleclass="text-align: left;wikitable"| i2c3-m0| style="text-alignwidth: left800px;"| i2c4-m0
|-
| sda引脚root@orangepi:~# '''cd /sys/class/leds/status_led'''| }</ol><ol start="2" style="textlist-alignstyle-type: leftlower-alpha;"| 对应3号引脚><li>The command to set the green light to stop flashing is as follows</li>{| styleclass="text-align: left;wikitable"| 对应27号引脚| style="text-alignwidth: left800px;"| 对应19号引脚
|-
| sck引脚root@orangepi:/sys/class/leds/status_led# '''echo none &gt; trigger'''| }</ol><ol start="3" style="textlist-alignstyle-type: leftlower-alpha;"| 对应5号引脚><li>The command to set the green light to be on is as follows</li>{| styleclass="text-align: left;wikitable"| 对应28号引脚| style="text-alignwidth: left800px;"| 对应23号引脚
|-
| vcc引脚root@orangepi:/sys/class/leds/status_led# '''echo default-on &gt; trigger'''| }</ol><ol start="4" style="textlist-style-aligntype: leftlower-alpha;"| 对应1号引脚><li>The command to set the green light to flash is as follows</li>{| styleclass="text-align: left;wikitable"| 对应1号引脚| style="text-alignwidth: left800px;"| 对应1号引脚
|-
| gnd引脚| style="text-alignroot@orangepi: left/sys/class/leds/status_led# '''echo heartbeat &gt;"| 对应6号引脚| style="text-align: left;"| 对应6号引脚| style="text-align: left;"| 对应6号引脚trigger'''
|}
</ol>
</li></ol>
<span id="network-connection-test"></span>
== Network connection test == <ol startspan id="4" style="listethernet-styleport-type: decimal;test"><li/span><p>然后使用'''i2cdetect -y=== Ethernet port test === # 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# After the system starts, it will automatically assign an IP address to the Ethernet card through DHCP, '''命令如果能检测到连接的i2c设备的地址,就说明i2c能正常使用</p><p>orangepi@orangepispan style="color:~$ sudo i2cdetect -y 2 #i2c2的命令</p><pFF0000">orangepi@orangepi:~$ sudo i2cdetect -y 3 #i2c3的命令No other configuration is required</pspan>'''<p>orangepi@orangepi:~$ sudo i2cdetect -y 4 #i2c4的命令</p></li></ol>The command to view the IP address in the Linux system of the development board is as follows
<div ::{| class="figurewikitable">style="width:800px;" |-| orangepi@orangepi:~$ '''ip addr show eth0'''
[[File2:media/image270.png|476x179px|UN}~]Q}T_70O%Z%RNO8R@YE]]eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc mq state UP group default qlen 1000
<:link/div><span id="pin的uart测试"></span>=== 40pin的UART测试 ===ether 4a:fe:2b:3d:17:1c brd ff:ff:ff:ff:ff:ff
:inet '''<ol span style="list-style-typecolor: decimal;#FF0000"><li><p>由下表可知,Orange Pi 3B可用的uart为uart3、uart7和uart9共三组uart总线</p><p>[[File:media/image271192.168.1.png|575x160px]]150</p><pspan>'''从上表中可以看到,i2c3_m0和uart3_m0是引脚复用的,两者不能同时打开'''</p><p>'''在Linux系统中,40pin中的uart默认都是关闭的,需要手动打开才能使用。'''</p><p>'''在/boot/orangepiEnv24 brd 192.168.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以同时打开uart3、uart7、和uart9,如果只需要打开一个,那么就填写一个即可。'''</p><p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv1.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>255 scope global dynamic noprefixroute eth0
{| class="wikitable"|-::valid_lft 43150sec preferred_lft 43150sec|| style="text-align: left;"| uart3| style="text-aligninet6 fe80: left;"| uart7| style="text-align: left;"| uart9|-| tx引脚| style="text-align9a04: left;"| 对应28号引脚| style="text-align3703: left;"| 对应16号引脚| style="text-alignfaed: left;"| 对应29号引脚23be/64 scope link noprefixroute|-| rx引脚| style="text-align: left;"| 对应27号引脚| style="text-align: left;"| 对应15号引脚| style="text-align: left;"| 对应7号引脚valid_lft forever preferred_lft forever
|}
[[File:media:{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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'''</image272.png|545x134px]]big>
<ol start="4" style="list-style-type: decimal;">
<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>
<span id="pwm的测试方法"></span>=== PWM的测试方法 ===orangepi@orangepi:~$ '''ifconfig'''
<ol style="list-style-type: decimal;"><li><p>由下表可知,Orange Pi 3B可用的pwm11</p><p>[[File:media/image273.png|575x160px]]</p><p>Command 'ifconfig''在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">is available in the following places
[[File:media* /image274.png|576x46px|RCUS$_~VYM{4ZS]_L}DNZQR]]sbin/ifconfig
<* /div><usr/li><li><sbin/li><li><p>pwm11寄存器的基地址为fe6f0030,再看 '''ls /sys/class/pwm/ -l'''命令的输出,可以看到pwmchip1中链接到了fe6f0030.pwm,所以pwm11对应pwmchip为pwmchip1</p></li><li><p>然后使用下面的命令可以让pwm11输出一个50Hz的方波(请先切换到root用户,再执行下面的命令)</p></li></ol>ifconfig
root@orangepi:~# ''The command could not be located because 'echo 0 &gt; /sys/class/pwmsbin:/pwmchip1usr/export''sbin'is not included in the PATH environment variable.
root@orangepi:~# '''echo 20000000 &gt; /sys/class/pwm/pwmchip1/pwm0/period'''This is most likely caused by the lack of administrative privileges associated with your user account.
root@orangepiifconfig:~# '''echo 1000000 &gt; /sys/class/pwm/pwmchip1/pwm0/duty_cycle'''command not found|}
root@orangepi:~:{| class="wikitable" style="background-color:# ffffdc;width:800px;" |-| <big>'''echo 1 &gt; /sys/class/pwm/pwmchip1/pwm0/enableThere are three ways to check the IP address after the development board starts:'''
[[File:media/image275'''1.png|575x346px]]Connect the HDMI display, then log in to the system and use the ip addr show eth0 command to view the IP address'''
<span id="wiringop-python的安装使用方法"></span>== wiringOP-Python的安装使用方法 =='''2. Enter the ip addr show eth0 command in the debugging serial terminal to view the IP address'''
'''wiringOP-Python是wiringOP的Python语言版本的库,用于在Python程序中操作开发板的GPIO、I2C、SPI和UART等硬件资源。3. 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:'''
<ol style="list-style-type: upper-alpha;"><li><p>'''另外请注意下面所有的命令都是在root用户下操作的。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>
<span id="wiringop-python的安装方法"></span>
=== wiringOP-Python的安装方法 ===
<ol style="list-style-type: decimal;"><li><p>首先安装依赖包</p><p>root@orangepi:~# '''sudo apt-get updateIn addition, it should be noted that the development board DHCP automatically assigns an IP address without any settings.'''</pbig><p>root@orangepi:~# '''sudo apt-get -y install git swig python3-dev python3-setuptools'''</p></li><li><p>然后使用下面的命令下载wiringOP-Python的源码</p></li></ol>|}
<ol start="4" style="list-style-type: decimal;"><li>The command to test the network connectivity is as follows, the '''ping''注意,下面的git clone--recursive命令会自动下载wiringOP的源码,因为wiringOP-Python是依赖wiringOP的。请确保下载过程没有因为网络问题而报错。' command can be interrupted through the shortcut key of '''Ctrl+C'''</li>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''如果从GitHub下载代码有问题,可以直接使用Linux镜像中自带的wiringOP-Python源码,存放位置为:/usr/src/wiringOPping www.baidu.com -PythonI eth0'''
root@orangepiPING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0:~# '''git clone --recursive https://github56(84) bytes of data.com/orangepi-xunlong/wiringOP-Python -b next'''
root@orangepi64 bytes from 14.215.177.38 (14.215.177.38):~# '''cd wiringOP-Python'''icmp_seq=1 ttl=56 time=6.74 ms
root@orangepi64 bytes from 14.215.177.38 (14.215.177.38):~/wiringOP-Python# '''git submodule update --init --remote'''icmp_seq=2 ttl=56 time=6.80 ms
<ol start64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq="3" stylettl=56 time="list-style-type: decimal;"><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 setup6.py install'''</p></li><li><p>然后输入下面的命令,如果有帮助信息输出,说明wiringOP-Python安装成功,按下'''q'''键可以退出帮助信息的界面</p></li></ol>26 ms
root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; help64 bytes from 14.215.177.38 (wiringpi14.215.177.38)&quot;''': icmp_seq=4 ttl=56 time=7.27 ms
Help on module wiringpi:^C
NAME--- www.a.shifen.com ping statistics ---
wiringpi4 packets transmitted, 4 received, 0% packet loss, time 3002ms
DESCRIPTIONrtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms|}</ol><span id="wifi-connection-test"></span>
# This file was automatically generated by SWIG (http://www.swig.org).=== WIFI connection test ===
{| class="wikitable" style="background-color:# Version 4ffffdc;width:800px;" |-| <big>'''Please do not connect to WIFI by modifying the /etc/network/interfaces configuration file.0There will be problems connecting to the WIFI network in this way.2'''</big>|}
#<span id="wifi-the-server-image-connects-to-wifi-through-commands"></span>==== The server image connects to WIFI through commands ====
{| class="wikitable" style="background-color:# Do ffffdc;width:800px;" |-| <big>'''When the development board is not connected to Ethernet, not make changes connected to HDMI display, but only connected to the serial port, it is recommended to use the commands demonstrated in this file unless 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 know what you are doing--modifycan also use the commands demonstrated in this section to connect to the WIFI network.'''</big>|}
# the SWIG interface file instead. <ol start="5" style="list-style-type: decimal;"><li><p>在python命令行下测试wiringOP-Python是否安装成功的步骤如下所示:First log in to the Linux system, there are the following three ways</p>
<ol style="list-style-type: lower-alpha;">
<li>首先使用python3命令进入python3的命令行模式<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</olp></li>
root{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~# $ '''python3nmcli dev wifi'''|}
<ol startdiv class="2figure" style="list-style-type: lower-alpha;"><li>然后导入wiringpi的python模块</li></ol>
&gt;&gt;&gt; '''import wiringpi;'''[[File:pi3b-img176.png]]
</div></ol><ol start="3" style="list-style-type: lower-alphadecimal;"><li>最后输入下面的命令可以查看下wiringOP-Python的帮助信息,按下'''q'''键可以退出帮助信息的界面Then use the nmcli command to connect to the scanned WIFI hotspot, where:</li></ol>
&gt;&gt;&gt; :a. '''help(wiringpi)wifi_name'''needs to be replaced with the name of the WIFI hotspot you want to connect to
Help on module wiringpi:b. '''wifi_passwd''' needs to be replaced with the password of the WIFI hotspot you want to connect to
NAME:{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''nmcli dev wifi connect <span style="color:#FF0000">wifi_name</span> password <span style="color:#FF0000">wifi_passwd</span>'''
wiringpiDevice 'wlan0' successfully activated with 'cf937f88-ca1e-4411-bb50-61f402eef293'.|}</ol><ol start="4" style="list-style-type: decimal;"><li>You can view the IP address of wifi through the '''ip addr show wlan0''' command
DESCRIPTION{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''ip addr show wlan0'''
# This file was automatically generated by SWIG (http11://www.swig.org).wlan0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
# Version 4.0.2:link/ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff
:inet '''<span style="color:#FF0000">192.168.1.11</span>'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
# Do not make changes to this file unless you know what you are doing--modify::valid_lft 259192sec preferred_lft 259192sec
# the SWIG interface file instead.:inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute
CLASSES::valid_lft 259192sec preferred_lft 172792sec
builtins.object:inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute
GPIO::valid_lft forever preferred_lft forever|}</ol><ol start="5" style="list-style-type: decimal;"><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>
I2C{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0'''
SerialPING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data.
nes64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms
class GPIO64 bytes from 182.92.236.130 (builtins182.92.object236.130): icmp_seq=2 ttl=52 time=41.3 ms
| GPIO64 bytes from 182.92.236.130 (pinmode182.92.236.130): icmp_seq=3 ttl=52 time=0)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
&gt;&gt;&gt;^C
<span id="pin-gpio口测试-1"></span>=== 40pin GPIO口测试 ===- www.orangepi.org ping statistics ---
'''wiringOP-Python跟wiringOP一样,也是可以通过指定wPi号来确定操作哪一个GPIO引脚,因为wiringOP-Python中没有查看wPi号的命令,所以只能通过wiringOP中的gpio命令来查看板子wPi号与物理引脚的对应关系。'''5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms|}<div class/ol><span id="figurethe-server-image-connects-to-wifi-in-a-graphical-way"></span>
[[File:media/image261.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]==== The server image connects to WIFI in a graphical way ====
</div>
<ol style="list-style-type: decimal;">
<li><p>下面以7号引脚——对应GPIO为GPIO4_A4 ——对应wPi序号为2——为例演示如何设置GPIO口的高低电平</p><p>[[File:media/image262.png|576x120px]]</p>First log in to the Linux system, there are the following three ways</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(2If the development board is connected with a network cable, 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:~you can remotely log in to [[Orange Pi 3B# SSH remote login development board|'''python3'''</p></li><li><p>然后导入wiringpi的python模块</p><p>&gt;&gt;&gt; '''import wiringpi'''</p><p>&gt;&gt;&gt; '''from wiringpi import GPIOthe Linux system through ssh''']]</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(2If the development board is connected to the debugging serial port, GPIO.OUTPUT)'''</p></li><li><p>然后设置GPIO口输出低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功</p><p>&gt;&gt;&gt; '''wiringpi.digitalWriteyou can use the serial port terminal to log in to the Linux system (2please use MobaXterm for the serial port software, GPIO.LOWand the minicom cannot display the graphical interface)'''</p></li><li><p>然后设置GPIO口输出高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为3.3v,说明设置高电平成功</p><p>&gt;&gt;&gt; '''wiringpi.digitalWrite(2If the development board is connected to the HDMI display, 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'''you can log in to the Linux system through the HDMI display terminal</p></li></ol>
<span idli>Then enter the nmtui command in the command line to open the wifi connection interface</li>{| class="pinwikitable" style="width:800px;" |-spi测试| orangepi@orangepi:~$ '''nmtui'''|}</ol><ol start="3" style="list-style-1type: decimal;"><li>Enter the nmtui command to open the interface as shown below</spanli>=== 40pin SPI测试 ===
<ol style="list-style-type: decimal;"><li><p>由40pin接口的原理图可知,Orange Pi 3B可用的spi为spi3</p><p>[[File:media/image267pi3b-img177.png|577x193px]]</p><p>'''在Linux系统中,40pin中的spi3默认是关闭的,需要手动打开才能使用。'''</pol><p>'''在/boot/orangepiEnv.txt中加入下面红色字体部分的配置,然后重启Linux系统就可以打开spi4。'''</p><p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p><p>'''overlaysol start=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 "4" style="list-style-type: lower-alphadecimal;"><li><p>Select '''--channelActivate a connect''':指定SPI的通道号</p>and press Enter</li><li><p>'''--port''':指定SPI的端口号</p></li></ol></li><li><p>先不短接 SPI3 的 mosi 和 miso 两个引脚,运行 spidev_test.py 的输出结果如下所示,可以看到 TX 和 RX 的数据不一致</p><p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p></li></ol>
root@orangepi[[File:~pi3b-img178.png]]</wiringOPol><ol start="5" style="list-Pythonstyle-type: decimal;"><li>Then you can see all the searched WIFI hotspots</examples# '''python3 spidev_test.py \'''li>
<div class="figure"> [[File:pi3b-img179.png]] </div></ol><ol start="6" style="list-style-type: decimal;"><li>Select the WIFI hotspot you want to connect to, then use the Tab key to position the cursor on '''--channel 3 --port 0Activate'''and press Enter</li> <div class="figure">
spi mode[[File: 0x0pi3b-img180.png]]
max speed</div></ol><ol start="7" style="list-style-type: 500000 Hz (500 KHz)decimal;"><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>
Opening device /dev/spidev3.0<div class="figure">
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 |[[File:pi3b-img181......@.......…|png]]
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 |.............….|</div></ol><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 startdiv class="5figure" 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>
root@orangepi[[File:~/wiringOPpi3b-Python/examples# '''python3 spidev_testimg182.py \'''png]]
</div></ol><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>{| class="wikitable" style="width:800px;" |--channel 3 --port 0| orangepi@orangepi:~$ '''ip addr show wlan0'''
spi mode11: 0x0wlan0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
max speed: 500000 Hz (500 KHz)link/ether 24:8c:d3:aa:76:bb brd ff:ff:ff:ff:ff:ff
Opening device :inet '''<span style="color:#FF0000">192.168.1.11</devspan>'''/spidev324 brd 192.168.1.0255 scope global dynamic noprefixroute wlan0
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 |......@.......…|::valid_lft 259069sec preferred_lft 259069sec
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 |......@.......…|:inet6 240e:3b7:3240:c4a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute
<span id="pin-i2c测试-1"></span>=== 40pin I2C测试 ===::valid_lft 259071sec preferred_lft 172671sec
<ol start="5" style="list-style-type: decimal;"><li><p>由下表可知,Orange Pi 3B可用的i2c为i2c2、i2c3和i2c4共三组 i2c总线</p><p>[[Fileinet6 fe80::42f1: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@orangepi6019:~$ '''sudo vim /boot/orangepiEnv.txt'''</p><p>'''overlays=i2c2-m1 i2c3-m0 i2c4-m0'''</p></li><li><p>启动Linux系统后,先确认下/dev下存在i2c的设备节点</p><p>orangepi@orangepia80e:~# '''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><4c31/ol>64 scope link noprefixroute
::valid_lft forever preferred_lft forever|}</ol><ol start="10" style="list-style-type: decimal;"><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>{| class="wikitable" style="width:800px;"
|-
|| 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-alignorangepi@orangepi: left;"| 对应23号引脚|~$ '''ping www.orangepi.org -I wlan0'''| vcc引脚| style="text-alignPING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: left;"| 对应1号引脚56(84) bytes of data.| style="text-align: left;"| 对应1号引脚| style="text-align64 bytes from 182.92.236.130 (182.92.236.130): left;"| 对应1号引脚|-| gnd引脚| styleicmp_seq="text-align: left;"| 对应6号引脚| style1 ttl="text-align: left;"| 对应6号引脚| style52 time="text-align: left;"| 对应6号引脚|}43.5 ms
[[File64 bytes from 182.92.236.130 (182.92.236.130):media/image276icmp_seq=2 ttl=52 time=41.png|180x153px]]3 ms
<ol start64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq="8" style3 ttl="list-style-type: decimal;"><li><p>然后使用'''i2cdetect -y'''命令如果能检测到连接的i2c设备的地址,就说明i2c能正常使用</p><p>orangepi@orangepi:~$ sudo i2cdetect -y 2 #i2c2的命令</p><p>orangepi@orangepi:~$ sudo i2cdetect -y 3 #i2c3的命令</p><p>orangepi@orangepi:~$ sudo i2cdetect -y 4 #i2c4的命令</p><div class52 time="figure">44.9 ms
[[File:media/image27764 bytes from 182.92.236.png|464x174px|V@130 (61L~0}182.92.236.130)Q`8VLBCAYEP[2]]: icmp_seq=4 ttl=52 time=45.6 ms
</div></li><li><p>然后可以运行'''examples'''中的'''ds130764 bytes from 182.py'''测试程序读取RTC的时间</p><p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p><p>root@orangepi92.236.130 (182.92.236.130):~/wiringOP-Python/examples# '''python3 ds1307icmp_seq=5 ttl=52 time=48.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>8 ms
<span id="pin的uart测试-1"></span>=== 40pin的UART测试 ===^C
<ol style="list-style-type: decimal;"><li><p>由下表可知,Orange Pi 3B可用的uart为uart3、uart7和uart9共三组uart总线</p><p>[[File:media/image271- www.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=uart3org ping statistics -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;"| uart3| style="text-align: left;"| uart7| style="text-align: left;"| uart9|-| tx引脚| style="text-align: left;"| 对应28号引脚| style="text-align: left;"| 对应16号引脚5 packets transmitted, 5 received, 0% packet loss, time 4006ms| style="text-align: left;"| 对应29号引脚|-| rx引脚| style="text-align: left;"| 对应27号引脚| style="text-align: left;"| 对应15号引脚| stylertt min/avg/max/mdev ="text-align: left;"| 对应7号引脚41.321/44.864/48.834/2.484 ms
|}
</ol>
<span id="test-method-of-desktop-image"></span>
<ol start="4" style="list-style-type: decimal;"><li><p>使用examples中的'''serialTest.py'''程序测试串口的回环功能如下所示,如果能看到下面的打印,说明串口通信正常</p><ol style="list-style-type: lower-alpha;"><li><p>测试UART3</p><p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''</p><p>'''&quot;/dev/ttyS3&quot;'''</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:^C</p><p>exit</p></li><li><p>测试UART7</p><p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''</p><p>'''&quot;/dev/ttyS7&quot;'''</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:^C</p><p>exit</p></li><li><p>测试UART9</p><p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''</p><p>'''&quot;/dev/ttyS9&quot;'''</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:^C</p><p>exit</p></li></ol></li></ol>= Test method of desktop image ====
== 硬件看门狗测试 ==# Click the network configuration icon in the upper right corner of the desktop (please do not connect the network cable when testing WIFI)
Orange Pi发布的Linux系统中预装了watchdog_test程序,可以直接测试。::[[File:pi3b-img183.png]]
运行watchdog_test程序的方法如下所示:<ol start="2" style="list-style-type: decimal;"><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>
[[File:pi3b-img184.png]]</ol><ol start="3" style="list-style-type: lower-alphadecimal;"><li><p>第二个参数10表示看门狗的计数时间,如果这个时间内没有喂狗,系统会重启</p></li><li><p>我们可以通过按下键盘上的任意键(ESC除外)来喂狗,喂狗后,程序会打印一行keep alive表示喂狗成功</p><p>orangepi@orangepi:~$ Then enter the password of the WIFI hotspot, and then click '''sudo watchdog_test 10Connect'''</p><p>open success</p><p>options is 33152,identity is sunxi-wdt</p><p>put_usr return,if 0,success:0</p><p>The old reset time is: 16</p><p>return ENOTTY,if -1,success:0</p><p>return ENOTTY,if -1,success:0</p><p>put_user return,if 0,success:0</p><p>put_usr return,if 0,success:0</p><p>keep alive</p><p>keep alive</p><p>keep alive</p>to start connecting to WIFI</li></ol>
[[File:pi3b-img185.png]]</ol><span idol start="4" style="查看rk3566芯片的序列号list-style-type: decimal;"><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</spanli>== 查看RK3566芯片的序列号 ==
查看RK3566芯片序列号的命令如下所示,每个芯片的序列号都是不同的,所以可以使用序列号来区分多个开发板。[[File:pi3b-img186.png]]</ol><ol start="5" style="list-style-type: decimal;"><li>If you can open other web pages after opening the browser, it means that the WIFI connection is normal</li>
orangepi@orangepi[[File:~$ '''cat_serialpi3b-img187-1.sh'''png]]</ol><span id="how-to-set-a-static-ip-address"></span>
Serial : '''8fa18eaf489041f0'''=== How to set a static IP address ===
<span id{| class="wikitable" style="下载安装arm64版本balenaetcher的方法background-color:#ffffdc;width:800px;"|-| <big>'''Please do not set a static IP address by modifying the /etc/network/interfaces configuration file.'''</spanbig>== 下载安装arm64版本balenaEtcher的方法 ==|}
<ol stylespan id="listuse-stylethe-type: decimal;"><li><p>balenaEtcher arm64版本的下载地址为:</p><ol style="list-style-type: lower-alpha;"><li><p>deb安装包的下载地址如下所示,需要安装才能使用</p><p>[https://github.com/Itainmtui-Nelken/BalenaEtchercommand-arm/releases/download/v1.7.9/balenato-etcherset-electron_1.7.9+5945ab1f_arm64.deb '''https://github.com/Itaia-Nelken/BalenaEtcherstatic-arm/releases/download/v1.7.9/balenaip-etcher-electron_1.7.9+5945ab1f_arm64.deb''']</paddress"></lispan><li><p>无需安装的AppImage版本的下载地址如下所示:</p><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>==== Use the nmtui command to set a static IP address ====
<div class="figure"># First run the '''nmtui''' command
[[File:media/image278.png:{|527x211pxclass="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''nmtui'''|IMG_256]]}
</div>
<ol start="2" style="list-style-type: decimal;">
<li><p>deb版本balenaEtcher的安装使用方法:</p><ol style="list-style-type: lower-alpha;"><li><p>deb版本的balenaEtcher安装命令如下所示:</p><p>orangepi@orangepi:~$ '''sudo apt install -y \'Then select ''</p><p>'Edit a connection''--fix-broken ./balena-etcher-electron_1.7.9+5945ab1f_arm64.deb'''</p>and press Enter</li><li><p>deb版本的balenaEtcher安装完成后,在Application中就可以打开了</p><div class="figure">
[[File:media/image92pi3b-img188.png|507x249px|IMG_256]]</ol><ol start="3" style="list-style-type: decimal;"><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>
[[File:pi3b-img189.png]]</div></liol><li><p>balenaEtcher打开后的界面如下所示:</p></li></olstart="4" style="list-style-type: decimal;"></li>Then select '''Edit''' with the '''Tab''' key and press the Enter key</olli>
[[File:pi3b-img190.png]]<div class/ol><ol start="5" style="list-style-type: decimal;"><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>
[[File:media/image279pi3b-img191.png|429x263px|IMG_256]]</ol><ol start="6" style="list-style-type: decimal;"><li>Then press Enter, select '''Manual''' with the up and down arrow keys, and press Enter to confirm</li>
[[File:pi3b-img192.png]]</divol><ol start="37" style="list-style-type: decimal;"><li><p>AppImage版本的balenaEtcher的使用方法:The display after selection is shown in the figure below</p><ol style="list-style-type: lower-alpha;"><li><p>首先给balenaEtcher添加权限</p><p>orangepi@orangepi:~/Desktop$ '''chmod +x balenaEtcher-1.7.9+5945ab1f-arm64.AppImage'''</p></li><li><p>然后选中AppImage版本balenaEtcher,再点击鼠标右键,再点击Execute就可以打开balenaEtcher了</p><p>[[File:media/image280.png|145x118px]]</p></li></ol></li></ol>
[[File:pi3b-img193.png]]</ol><span idol start="8" style="宝塔linux面板的安装方法list-style-type: decimal;"><li>Then move the cursor to the '''&lt;Show&gt;'''</spanli>== 宝塔Linux面板的安装方法 ==
'''宝塔Linux面板是提升运维效率的服务器管理软件,支持一键LAMP/LNMP/集群/监控/网站/FTP/数据库/JAVA等100多项服务器管理功能(摘抄自[https[File:pi3b-img194.png]]</ol><ol start="9" style="list-style-type: decimal;"><li>Then press Enter, the following setting interface will pop up after entering</www.bt.cn/ 宝塔官网])'''li>
[[File:pi3b-img195.png]]</ol ><ol start="10" style="list-style-type: decimal;"><li><p>首先需要扩展下'''/tmp'''空间的大小,设置完后需要'''重启下开发板的linux系统''',命令如下所示:</p><p>orangepi@orangepi:~$ '''sudo sed -i 's/nosuid/&amp;Then you can set the IP address (Addresses),size=2G/' /etc/fstab'''</p><p>orangepi@orangepi:~$ '''sudo reboot'''</p></li><li><p>重启后,可以看到'''/tmp'''空间的大小变为2G了</p><p>orangepi@orangepi:~$ '''df -h | grep &quot;/tmp&quot;'''</p><p>tmpfs 2.0G 12K '''2.0G''' 1% /tmp</p></li><li><p>然后在Linux系统中输入下面的命令就可以开始宝塔的安装</p><p>orangepi@orangepi:~$ '''sudo install_bt_panel.sh'''</p></li><li><p>然后宝塔安装程序会提醒是否安装'''Bt-Panel'''到'''/www'''文件夹,此时输入'''y'''即可</p><p>+----------------------------------------------------------------------</p><p>| Bt-WebPanel FOR CentOS/Ubuntu/Debian</p><p>+----------------------------------------------------------------------</p><p>| Copyright © 2015-2099 BT-SOFTgateway (http://www.bt.cnGateway) 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 and DNS server address in the position shown in the /www directory now?figure below (y/nthere are many other setting options in it, please explore by yourself): '''y, '''</p></li><li><p>然后要做的就是耐心等待,当看到终端输出下面的打印信息时,说明宝塔已经安装完成,整个安装过程大约耗时34分钟,根据网络速度的不同可能会有一些差别</p><p>[[Filespan style="color:media/image281.png|576x233px]]</p#FF0000">Please set it according to your specific needs, the value set in the figure below is just an example</li><li><pspan>此时在浏览器中输入上面显示的'''面板地址'''就可以打开宝塔Linux面板的登录界面,然后在对应的位置输入上图显示的'''username'''和'''password'''就可以登录进宝塔<br />[[File:media/image282.png|575x281px]]</p></li><li><p>成功登录宝塔后的会弹出下面的欢迎界面,首先请将中间的用户须知阅读完拖到最下面,然后就可以选择”我已同意并阅读《用户协议》“,接着点击”进入面板”就可以进入宝塔了</p><p>[[File:media/image283pi3b-img196.png|575x317px]]</p></li><li><p>进入宝塔后首先会提示需要绑定宝塔官网的账号,如果没有账号可以去宝塔的官网('''https://www.bt.cn''')注册一个</pol><p>[[Fileol start="11" style="list-style-type:media/image284.png|576x300px]]</p></lidecimal;"><li><p>最终显示的界面如下图所示,可以很直观的看到开发板Linux系统的一些状态信息,比如负载状态、CPU的使用率、内存使用率和存储空间的使用情况等</p><p>[[File:media/image285.png|575x306px]]</p></li><li><p>宝塔的更多功能可以参考下面资料自行探索</p><p>使用手册:[http://docs.bt.cn After setting, move the cursor to'''http://docs.bt.cn&lt;OK&gt;''']</p><p>论坛地址:[https://www.bt.cn/bbs '''https://www.bt.cn/bbs''']</p><p>GitHub链接:'''https://github.com/aaPanel/BaoTa'''</p>in the lower right corner, and press Enter to confirm</li></ol>
[[File:pi3b-img197.png]]</ol><ol start="12" style= 设置中文环境以及安装中文输入法 =="list-style-type: decimal;"><li>Then click'''&lt;Back&gt;''' to return to the previous selection interface</li>
[[File:pi3b-img198.png]]</ol><ol start="13" style="list-style-type: decimal;"><li>Then select '''注意,安装中文输入法前请确保开发板使用的Linux系统为桌面版系统。Activate a connection''', then move the cursor to'''&lt;OK&gt;''', and finally click Enter</li>
[[File:pi3b-img199.png]]<span id/ol><ol start="debian系统的安装方法14"style="list-style-type: decimal;"><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'''</spanli>=== Debian系统的安装方法 ===
<ol style="list[[File:pi3b-style-type: decimal;">img200.png]]<li><p>首先设置默认'''locale'''为中文</pol><ol start="15" style="list-style-type: lower-alphadecimal;"><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.UTFThen please do not move the cursor, and then press the Enter key to re-8enable '''</p><p>[[File:media/image287.png|575x160px]]</p></li><li><p>退出界面后就会开始''Wired connection 1'locale'''的设置,命令行显示的输出如下所示</p><p>orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''</p><p>Generating locales (this might , so that the static IP address set earlier will take a while)...</p><p>en_US.UTF-8... done</p><p>zh_CN.UTF-8... done</p><p>Generation complete.</p></li></ol>effect</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>
[[File:pi3b-img201.png]]</ol><span idol start="16" style="ubuntulist-20.04系统的安装方法style-type: decimal;"><li>Then you can exit nmtui through the'''&lt;Back&gt;''' and '''Quit''' buttons</spanli>=== Ubuntu 20.04系统的安装方法 ===
<ol style="list-style-type: decimal;"><li><p>首先打开'''Language Support'''</p><p>[[File:media/image301pi3b-img202.png|575x351px]]</p></li><li><p>然后找到'''汉语(中国)'''选项</p><p>[[File:media/image302pi3b-img203.png|318x311px]]</pol></liol start="17" style="list-style-type: decimal;"><li><p>然后请使用鼠标左键选中Then through '''汉语(中国)ip addr show eth0'''并按住不动,然后往上将其拖到最开始的位置,拖完后的显示如下图所示:</p><p>[[File:media/image303.png|324x320px]]</p>, you can see that the IP address of the network port has changed to the static IP address set earlier</li></ol>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''注意,这一步不是很好拖动的,请耐心多试几次。ip addr show eth0'''
<ol start="4" style="list-style-type3: decimaleth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt;"><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>mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
<span id="ubuntu-22.04系统的安装方法"><:link/span>=== Ubuntu 22.04系统的安装方法 ===ether 5e:ac:14:a5:92:b3 brd ff:ff:ff:ff:ff:ff
:inet '''<ol span style="list-style-typecolor: decimal;#FF0000"><li><p>首先打开'''Language Support'''</p><p>[[File:media/image301192.168.1.png|575x351px]]177</p></li><lispan><p>然后找到'''汉语(中国)'''选项</p><p>[[File:media/image31024 brd 192.168.png|335x326px]]</p></li><li><p>然后请使用鼠标左键选中'''汉语(中国)'''并按住不动,然后往上将其拖到最开始的位置,拖完后的显示如下图所示:</p><p>[[File:media/image3111.png|337x331px]]</p></li></ol>255 scope global noprefixroute eth0
'''注意,这一步不是很好拖动的,请耐心多试几次。'''::valid_lft forever preferred_lft forever
<ol start="4" style="list-style-type: decimal;"><li><p>然后选择'''Apply System-Wide'''将中文设置应用到整个系统</p><p>[[Fileinet6 241e:media/image312.png|336x330px]]</p></li><li><p>'''然后重启Linux系统使配置生效'''</p></li><li><p>重新进入系统后,在下面的界面请选择'''不要再次询问我''',然后请根据自己的喜好决定标准文件夹是否也要更新为中文</p><p>[[File3b8:media/image306.png|303x247px]]</p></li><li><p>然后可以看到桌面都显示为中文了</p><p>[[File3240:media/image307.png|575x383px]]</p></li><li><p>然后打开Fcitx5配置程序</p><p>[[Filec3a0:media/image313.png|575x349px]]</p></li><li><p>然后选择使用拼音输入法</p><p>[[Filee269:media/image314.png|366x289px]]</p></li><li><p>选择后的界面如下所示,再点击确定即可</p><p>[[File8305:media/image315.png|366x290px]]</p></li><li><p>然后我们可以打开'''Geany'''测试下中文输入法,打开方式如下图所示</p><p>[[Filedc08:media/image308.png|576x292px]]</p></li><li><p>打开'''Geany'''后,默认还是英文输入法,我们可以通过'''Ctrl+Space'''快捷键来切换成中文输入法,然后就能输入中文了</p><p>[[File:media/image316.png|576x408px]]</p></li><135e/ol>64 scope global dynamic noprefixroute
<span id="远程登录linux系统桌面的方法"></span>== 远程登录Linux系统桌面的方法 ==::valid_lft 259149sec preferred_lft 172749sec
'''Ubuntu Gnome Wayland镜像不支持使用此处介绍的Nomachine和VNC来远程登录桌面。''':inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute
::valid_lft forever preferred_lft forever|}</ol><span idol start="使用nomachine远程登录18" style="list-style-type: decimal;"><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'''</spanli>=== 使用NoMachine远程登录 ===
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''请确保开发板安装的Ubuntu或者Debian系统为桌面版本的系统。另外NoMachine也提供了详细的使用文档,强烈建议通读此文档来熟悉NoMachine的使用,文档链接如下所示:ping 192.168.1.47 -I eth0'''
'''httpsPING 192.168.1.47 (192.168.1.47) from 192.168.1.188 eth0://knowledgebase.nomachine56(84) bytes of data.com/DT10R00166'''
'''NoMachine支持Windows、Mac、Linux、iOS和安卓平台,所以我们可以在多种设备上通过NoMachine来远程登录控制Orange Pi开发板。下面演示下在Windows中通过NoMachine来远程登录Orange Pi开发板的Linux系统桌面。其他平台的安装方法请参考下NoMachine的官方文档。'''64 bytes from 192.168.1.47: icmp_seq=1 ttl=64 time=0.233 ms
'''操作前请先确保Windwos电脑和开发板在同一局域网内,并且能正常ssh登录开发板的Ubuntu或者Debian系统。'''64 bytes from 192.168.1.47: icmp_seq=2 ttl=64 time=0.263 ms
<ol style64 bytes from 192.168.1.47: icmp_seq=3 ttl="list-style-type: decimal;"><li><p>首先下载NoMachine软件Linux '''arm64''' deb版本的安装包,然后安装到开发板的Linux系统中</p><ol style64 time="list-style-type: lower-alpha;"><li>由于RK3566是ARMv8架构的SOC,我们使用的系统为Ubuntu或者Debian,所以这里需要下载'''NoMachine &gt; for ARM ARMv8 DEB'''安装包,下载链接如下所示:</li></ol></li></ol>0.273 ms
'''注意,这个下载链接可能会变,请认准Armv8/Arm64版本的deb包。'''64 bytes from 192.168.1.47: icmp_seq=4 ttl=64 time=0.269 ms
[https://www64 bytes from 192.168.nomachine1.com/download/download&id47: icmp_seq=5 ttl=112&s64 time=ARM '''https://downloads.nomachine0.com/download/?id=118&amp;distro=ARM''']275 ms
[[File:media/image317.png|575x227px]]^C
<ol start="2" style="list-style-type: lower-alpha;"><li><p>另外在'''官方工具'''中也可以下载到'''NoMachine'''的安装包</p><p>[[File:media/image318192.png|86x106px]]</p><p>先进入'''远程登录软件-NoMachine'''文件夹</p><p>[[File:media/image319168.png|256x46px]]</p><p>然后下载arm64版本的deb安装包</p><p>[[File:media/image3201.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 47 ping statistics ---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>5 packets transmitted, 5 received, 0% packet loss, time 4042ms
'''注意,这个下载链接可能会变。'''rtt min/avg/max/mdev = 0.233/0.262/0.275/0.015 ms|}</ol><span id="use-the-nmcli-command-to-set-a-static-ip-address"></span>
'''https://downloads.nomachine.com/download/?id=9'''=== Use the nmcli command to set a static IP address ====
[[File<ol style="list-style-type:mediadecimal;"><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;"><li><p>'''orangepi''' is the name of the WIFI network interface (the names are not necessarily the same)</image321.pngp></li><li><p>'''Wired connection 1''' is the name of the Ethernet interface</p></li>{| class="wikitable" style="width:800px;"|-|orangepi@orangepi:~$ '''nmcli con show'''<br><span style="margin-right: 180px;">NAME</span><span style="margin-right: 260px;">UUID </span><span style="margin-right: 45px;">TYPE </span><span style="margin-right: 50px;">DEVICE</span><br><span style="margin-right: 125px;">'''orangepi'''</span><span style="margin-right: 70px;">cfc4f922-ae48-46f1-84e1-2f19e9ec5e2a</span><span style="margin-right: 50px;">wifi </span><span style="margin-right: 50px;">wlan0</span><br><span style="margin-right: 50px;">'''Wired connection 1'''</span><span style="margin-right: 50px;">9db058b7-7701-37b8-9411-efc2ae8bfa30</span><span style="margin-right: 30px;">ethernet </span><span style="margin-right: 50px;">eth0</span><br>|575x163px]]}</ol></li></ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>然后在Windows中安装NoMachine,'''安装完后请重启下电脑'''Then enter the following command, where</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="使用vnc远程登录"></span>=== 使用VNC远程登录 ===: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)
:b. After '''操作前请先确保Windwos电脑和开发板在同一局域网内,并且能正常ssh登录开发板的Ubuntu或者Debian系统。ipv4.addresse'''is the static IP address to be set, which can be modified to the value you want to set
:c. '''Ubuntu20ipv4.04测试VNC很多问题,请不要使用这种方法。gateway'''indicates the address of the gateway
<ol ::{| class="wikitable" style="list-style-typewidth: decimal800px;"><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 nmcli con mod &quot;Wired connection 1&quot; \'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;"><li>首先点击Session,然后选择VNC,再填写开发板的IP地址和端口,最后点击OK确认</li></ol></li></ol>
[[File:media/image327'''ipv4.png|576x410px]]addresses &quot;192.168.1.110&quot; \'''
<ol start="2" style="list-style-type: lower-alpha'''ipv4.gateway &quot;"><li><p>然后输入前面设置的VNC的密码</p><p>[[File:media/image328192.png|274x131px]]</p></li><li><p>登录成功后的界面显示如下图所示,然后就可以远程操作开发板Linux系统的桌面了</p><p>[[File:media/image329168.png|405x293px]]</p></li></ol>1.1&quot; \'''
<span id="linux系统支持的部分编程语言测试"></span>== Linux系统支持的部分编程语言测试 =='''ipv4.dns &quot;8.8.8.8&quot; \'''
<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 10ipv4.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(method &quot;Hello World!\nmanual&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 start="4" style="list-style-type: lower-alphadecimal;"><li><p>Python具体版本如下所示Then restart the Linux system</pli><p>orangepi@orangepi:~$ '''python3'''</p><p>'''Python 3.9.2''' (default, Feb 28 2021, 17{| class="wikitable" style="width:03:44)</p><p>[GCC 10.2.1 20210110] on linux</p><p>Type &quot800px;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.pysudo reboot'''</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 start="5" style="list-style-type: lower-alphadecimal;"><li><p>可以使用下面的命令安装openjdk,Debian &gt; Bullseye中最新版本为openjdkThen re-17</p><p>orangepi@orangepi:~$ enter the Linux system and use the '''sudo apt install -y openjdk-17-jdkip addr show eth0'''</p>command to see that the IP address has been set to the desired value</li><li><p>安装完后可以查看下Java的版本</p><p>orangepi@orangepi{| class="wikitable" style="width:~$ '''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(&quot800px;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_worldip addr show eth0'''</p><p>Hello World!</p></li></ol></li></ol>
<span id="ubuntu-focal系统"></span>=== Ubuntu Focal系统 ===3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
<ol style="list-style-type: decimal;"><li><p>Ubuntu Focal默认安装有gcc编译工具链,可以直接在开发板的Linux系统中编译C语言的程序<link/p><ol style="list-style-typeether 5e: 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@orangepiae:~$ '''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:59a5: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@orangepi91:~$ '''vim hello_world.py'''</p><p>print('Hello World!')</p></li><li><p>运行'''hello_world.py'''的结果如下所示</p><p>orangepi@orangepib3 brd ff:~$ '''python3 hello_world.py'''</p><p>Hello World!</p></li></ol></li><li><p>Ubuntu Focal默认没有安装Java的编译工具和运行环境</p><ol style="list-style-typeff: 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@orangepiff:~$ '''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@orangepiff:~$ '''javac hello_world.java'''</p><p>orangepi@orangepiff:~$ '''java hello_world'''</p><p>Hello World!</p></li></ol></li></ol>ff
:inet '''<span idstyle="ubuntu-jammy系统color:#FF0000">192.168.1.110</span>=== Ubuntu Jammy系统 ==='''/32 brd 192.168.1.110 scope global noprefixroute eth0
<ol style="list-style-type: decimal;"><li><p>Ubuntu Jammy默认安装有gcc编译工具链,可以直接在开发板的Linux系统中编译C语言的程序</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;"><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>valid_lft forever preferred_lft forever
<span id="qt的安装方法"><:inet6 240e:3b7:3240:c3a0:97de:1d01:b290:fe3a/span>== QT的安装方法 ==64 scope global dynamic noprefixroute
<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>valid_lft 259183sec preferred_lft 172783sec
<span id="ros安装方法"><:inet6 fe80::3312:861a:a589:d3c/span>== ROS安装方法 ==64 scope link noprefixroute
::valid_lft forever preferred_lft forever|}</ol><span id="ubuntu20.04安装rosssh-remote-1login-noetic的方法development-board"></span>=== Ubuntu20.04安装ROS 1 Noetic的方法 ===
# ROS 1当前活跃的版本如下所示,推荐版本为'''Noetic Ninjemys'''== SSH remote login development board ==
[[File{| class="wikitable" style="background-color:#ffffdc;width:media800px;" |-| <big>'''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.'''</image345.pngbig>|345x235px]]}
[[File:media<span id="ssh-remote-login-development-board-under-ubuntu"></image346.png|576x210px]]span>=== SSH remote login development board under Ubuntu ===
[http://docs.ros.org/ '''http://docs.ros.org''']# Obtain the IP address of the development board# Then you can remotely log in to the Linux system through the ssh command
::{| class="wikitable" style="width:800px;" |-| test@test:~$ '''httpsssh [mailto://wikiroot@192.168.1.36 root@192.168.ros1.org/Distributions]xxx'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Need to be replaced with the IP address of the development board)
<ol startroot@192.168.1.xx's password: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Enter the password here, the default password is orangepi)|}::{| class="2wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig><p>ROS 1 '''Noetic Ninjemys'''官方安装文档链接如下所示:Note that when entering the password, </p><p>[httpspan style="color://wiki.ros.org/noetic/Installation/Ubuntu '''http://wiki.ros.org/noetic/Installation/Ubuntu''']</p#FF0000">the specific content of the entered password will not be displayed on the screen</lispan><li><p>ROS '''Noetic Ninjemys'''官方安装文档中Ubuntu推荐使用Ubuntu20.04,所以请确保开发板使用的系统为'''Ubuntu20, please do not think that there is any fault, just press Enter after inputting.04桌面版系统'''</pbig><p>[http|}::{| class="wikitable" style="background-color://wiki.ros.org/noetic/Installation '''http#ffffdc;width://wiki.ros.org/noetic/Installation''']</p>800px;" |-<p>[[File:media/image347.png|312x176px]]</p></li><libig>'''If you are prompted to refuse the connection, as long as you are using the image provided by Orange Pi, <pspan style="color:#FF0000">然后使用下面的脚本安装ros1please do not suspect that the password orangepi is wrong</pspan><p>orangepi@orangepi3b:~$ '''install_ros, but look for other reasons.sh ros1'''</p></libig><li><p>使用ROS工具前,首先需要初始化下rosdep,然后编译源码时就能快速的安装一些系统依赖和一些ROS中的核心组件</p></li></ol>|}
'''注意,运行下面的命令需要确保开发板能正常访问github,否则会由于网络问题而报错。'''<ol start="3" style="list-style-type: decimal;"><li>After successfully logging in to the system, the display is as shown in the figure below</li>
'''install_ros.sh脚本会尝试修改/etc/hosts并自动运行下面的命令。但是这种方法无法保证每次都能正常访问github,如果install_ros.sh安装完ros1后有提示下面的错误,请自己想其它办法让开发板的Linux系统能正常访问github,然后再手动运行下面的命令。'''<div class="figure">
'''https[[File://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osxpi3b-homebrewimg204.yaml'''png]]
</div>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Hit https://rawIf ssh cannot log in to the Linux system normally, please first check whether the IP address of the development board can be pinged.githubusercontentIf 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.com/ros/rosdistro/master/rosdep/base.yamlIs it possible to connect:'''
'''ERROR: error loading sources list:'''
root@orangepi:~# '''The read operation timed outreset_ssh.sh'''
orangepi@orangepi:~$ '''source /opt/ros/noetic/setup.bash'''
orangepi@orangepi:~$ '''sudo rosdep initIf it still doesn't work, try to reset the system.'''</big>|}</ol><span id="ssh-remote-login-development-board-under-windows"></span>
Wrote /etc/ros/rosdep/sources.list.d/20-default.list=== SSH remote login development board under Windows ===
Recommended: please run# First obtain the IP address of the development board# Under Windows, you can use MobaXterm to remotely log in to the development board, first create a new ssh session
rosdep update::a. Open '''Session'''
orangepi@orangepi:~$ :b. Then select '''SSH''' in '''rosdep updateSession Setting'''
reading ::c. Then enter the IP address of the development board in sources list data from /etc/ros/rosdep/sources.list.dthe '''Remote host'''
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew:d.yamlThen enter the user name '''root''' or '''orangepi''' of the Linux system in '''Specify username'''
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base:e.yamlFinally click '''OK'''
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml<div class="figure">
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby:[[File:pi3b-img205.yamlpng]]
Hit https</div><ol start="3" style="list-style-type:decimal;"><li>Then you will be prompted to enter a password. The default passwords for root and orangepi users are orangepi</li>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that when entering the password, <span style="color:#FF0000">the specific content of the entered password will not be displayed on the screen</rawspan>, please do not think that there is any fault, just press Enter after inputting.githubusercontent.com'''</ros/rosdistro/master/releases/fuerte.yamlbig>|}
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml<div class="figure">
Skip end[[File:pi3b-of-life distro &quot;ardent&quot;img206.png]]
Skip end</div></ol><ol start="4" style="list-ofstyle-life distro &quot;bouncy&quottype: decimal;"><li>After successfully logging in to the system, the display is as shown in the figure below</li>
Skip end[[File:pi3b-img207.png]]</ol><span id="the-method-of-uploading-files-to-the-linux-system-of-life distro &quot;crystal&quot;the-development-board"></span>
Skip end-== The method of-life distro &quot;dashing&quot;uploading files to the Linux system of the development board ==
Skip end<span id="how-ofto-life distro &quot;eloquent&quot;upload-files-to-the-development-board-linux-system-in-ubuntu-pc"></span>=== How to upload files to the development board Linux system in Ubuntu PC ===
Add distro &quot;foxy&quot;<span id="how-to-upload-files-using-the-scp-command"></span>==== How to upload files using the scp command ====
Add distro &quot;galactic&quot;# 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
Skip end-::a. '''file_path''': need to be replaced with the path of-life distro &quot;groovy&quot;the file to be uploaded
Add distro &quot;humble&quot;::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
Skip end-::c. '''192.168.xx.xx''': It is the IP address of-life distro &quot;hydro&quot;the development board, please modify it according to the actual situation
Skip end-::d. '''/home/orangepi''': The path in the Linux system of-life distro &quot;indigo&quot;the development board, which can also be modified to other paths
Skip end-of::{| class="wikitable" style="width:800px;" |-life distro &quot;jade&quot;| test@test:~$ '''scp file_path orangepi@192.168.xx.xx:/home/orangepi/'''|}
Skip end<ol start="2" style="list-ofstyle-life distro &quot;kinetic&quottype: decimal;"><li>If you want to upload a folder, you need to add the -r parameter</li>
Skip end{| class="wikitable" style="width:800px;" |-| test@test:~$ '''scp <span style="color:#FF0000">-r</span> dir_path orangepi@192.168.xx.xx:/home/orangepi/'''|}</ol><ol start="3" style="list-ofstyle-life distro &quottype: decimal;lunar&quot"><li>There are more usages of scp, please use the following command to view the man manual</li>{| class="wikitable" style="width:800px;" |-| test@test:~$ '''man scp'''|}</ol><span id="how-to-upload-files-using-filezilla"></span>
Add distro &quot;melodic&quot;==== How to upload files using filezilla ====
Add distro &quot;noetic&quot;# First install filezilla in Ubuntu PC
Add distro &quot;rolling&quot::{| class="wikitable" style="width:800px;" |-| test@test:~$ '''sudo apt install -y filezilla'''|}
updated cache in <ol start="2" style="list-style-type: decimal;"><li>Then use the following command to open filezilla</home/orangepi/.ros/rosdep/sources.cacheli>
<ol start{| class="6wikitable" style="list-style-typewidth: decimal800px;"><li><p>然后在'''桌面'''中打开一个命令行终端窗口,再使用'''test_ros.sh'''脚本可以启动一个小海龟的例程来测试下ROS是否能正常使用</p>|-| <p>orangepitest@orangepitest:~$ '''test_ros.shfilezilla'''</p></li><li><p>运行完'''test_ros.sh'''脚本后,会弹出下图所示的一个小海龟|}</pol><p>[[Fileol start="3" style="list-style-type:media/image348.png|576x276px]]</p></lidecimal;"><li><p>然后请保持刚才打开终端窗口在最上面</p>The interface after filezilla is opened is as follows, and the display under the remote site on the right is empty</li></ol>
[[File:media/image349.png|576x275px]]<div class="figure">
<ol start="9" style="list-style-type: decimal;"><li><p>此时按下键盘上的方向按键就可以控制小海龟上下左右移动了</p><p>[[File:media/image350pi3b-img208.png|575x296px]]</p></li></ol>
<span id/div></ol><ol start="4" style="ubuntu20.04安装roslist-2style-galactic的方法type: decimal;"><li>The method of connecting the development board is shown in the figure below</spanli>=== Ubuntu20.04安装ROS 2 Galactic的方法 ===
<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">
[[File:media/image353pi3b-img209.png|576x324px|1]]
</div></liol><li><p>ROS的使用方法请参考下ROS 2的文档</pol start="5" style="list-style-type: decimal;"><pli>[http://docs.ros.org/en/galactic/Tutorials.html Then choose to '''save the password''', and then click '''http://docs.ros.org/en/galactic/Tutorials.htmlOK''']</p></li></ol>
[[File:pi3b-img210.png]]<span id/ol><ol start="ubuntu22.04安装ros6" style="list-2style-humble的方法type: decimal;"><li>Then choose to always '''trust this host''', and then click '''OK'''</spanli>=== Ubuntu22.04安装ROS 2 Humble的方法 ===
<ol style="list-style-type: decimal;">
<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">
[[File:media/image354pi3b-img211.png|576x324px|1]]
</div></liol><li><p>参考文档</p><p>'''httpol start="7" style="list-style-type://docs.ros.org/en/humble/index.html'''</pdecimal;"><p>[http://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html''']</pli>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">
<ol style="list-style-type: decimal;"><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/image355pi3b-img212.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>
</div></ol><ol start="8" style= 树莓派5寸屏幕的使用 =="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.</li>
<div class=== 树莓派5寸屏幕的组装方法 ==="figure">
<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/image359pi3b-img213.png|333x199px]]</p></li></ol>
</div></ol><ol start="9" style== 打开树莓派5寸屏幕配置的方法 ==="list-style-type: decimal;"><li>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>
<ol style="list-style-type: decimal;"><li><p>Linux镜像默认是没有打开树莓派5寸屏幕的配置的,如果需要使用树莓派5寸屏幕,需要手动打开才行。</p>The method of uploading a folder is the same as that of uploading a file, so I won't go into details here</li><li><p>打开mipi lcd配置的步骤如下所示:</pol><ol stylespan id="listthe-stylemethod-type: lowerof-alpha;"><li><p>首先运行下'''orangepiuploading-files-config''',普通用户记得加'''sudo'''权限</p><p>orangepi@orangepi:~$ '''sudo orangepifrom-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>然后使用键盘的方向键定位到raspiwindows-7inchpc-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=raspito-7inchthe-touchscreen这句配置。设置完后可以先检查下。如果不存在这句配置,那么设置就是有问题。'''</p><p>'''如果觉得使用orangepilinux-config比较麻烦,也可以使用vim编辑器打开/boot/orangepiEnv.txt,然后加入overlays=raspisystem-7inchof-touchscreen 这句配置也是可以。'''</p><p>orangepi@orangepi:~$ '''cat /boot/orangepiEnv.txt | grep “raspi”'''</p><p>'''overlays=raspithe-7inchdevelopment-touchscreen #示例配置'''</pboard"></li></ol></li><li><p>启动后可以看到lcd屏幕的显示如下所示:</p></li></olspan>
[[File:media/image366.png|381x262px]]=== The method of uploading files from Windows PC to the Linux system of the development board ===
<span id="how-to-upload-files-using-filezilla-1"></span>== 服务器版镜像旋转显示方向的方法 == How to upload files using filezilla ====
<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># First download the installation file of the Windows version of the filezilla software, the download link is as follows
::{| class="wikitable" style="width:800px;" |-| '''https://filezilla-project.org/download.php?type= 桌面版镜像旋转显示和触摸方向的方法 ===client'''|}
<ol stylediv class="list-style-type: decimal;figure"><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>
<!-- --><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:[[File:pi3b-libinputimg214.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>png]]
<!-- --/div><ol start="7" stylediv class="list-style-type: decimal;figure"><li><p>触摸旋转参考资料</p><p>[https://wiki.ubuntu.com/X/InputCoordinateTransformation '''https://wiki.ubuntu.com/X/InputCoordinateTransformation''']</p></li></ol>
== 开关机logo使用说明 ==::[[File:pi3b-img215.png]]
</div><ol start="2" 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 updateThe downloaded installation package is as follows, and then double-initramfs -u'''</p>click to install directly</li></ol>
<span id{| class="zfs文件系统的使用方法wikitable"></span>style="width:800px;" |-| '''FileZilla_Server_1.5.1_win64-setup.exe'''== ZFS文件系统的使用方法 ==|}
During the installation process, please select '''最新版本的Ubuntu20.04、Ubuntu22.04、Debian11和Debian12桌面版系统中已经预装了zfs,直接使用即可。Decline''' on the following installation interface, and then select '''Next&gt;'''
'''在Ubuntu20.04、Ubuntu22.04桌面版系统中预装的zfs版本是2.1.6。'''<div class="figure">
'''在Debian11和Debian12桌面版系统中预装的zfs版本是2[[File:pi3b-img216.1.11。'''png]]
'''系统启动后,首先请确认下zfs的内核模块有没有被加载,如果使用lsmod命令可以看到zfs相关的内容,就说明系统已经预装了zfs。'''</div></ol><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>
orangepi@orangepi:~$ '''lsmod | grep &quot;zfs&quot;'''<div class="figure">
zfs 2801664 0[[File:pi3b-img217.png]]
zunicode 327680 1 zfs</div></ol><ol start="4" style="list-style-type: decimal;"><li>The method of connecting the development board is shown in the figure below:</li>
zzstd 471040 1 zfs<div class="figure">
zlua 139264 1 zfs[[File:pi3b-img209.png]]
zcommon 69632 1 zfs</div></ol><ol start="5" style="list-style-type: decimal;"><li>Then choose to '''save the password''', and then click '''OK'''</li>
znvpair 61440 2 zfs,zcommon<div class="figure">
zavl 16384 1 zfs[[File:pi3b-img218.png]]
icp 221184 1 zfs</div></ol><ol start="6" style="list-style-type: decimal;"><li>Then choose to always '''trust this host''', and then click '''OK'''</li>
spl 77824 6 zfs,icp,zzstd,znvpair,zcommon,zavl<div class="figure">
<span id="安装zfs的方法"></span>=== 安装ZFS的方法 ===[[File:pi3b-img219.png]]
'''安装zfs前,请先确保使用的Linux镜像为最新版本。另外,如果系统中已经安装了zfs,就无需重复安装了。'''</div></ol><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>
安装zfs前首先需要安装内核头文件,安装内核头文件的方法请参考[[\l|'''安装内核头文件的方法''']]小节的说明。<div class="figure">
在Ubuntu20[[File:pi3b-img220.04、Ubuntu22.04和Debian11系统中,zfs是无法通过apt直接安装的,这是因为默认的apt源中zfs版本低于2.1.6,存在和rk Linux5.10内核不兼容的问题,这个问题在zfs的2.1.6及以后的版本中得到了修复。png]]
为了解决这个问题,我们提供了能正常安装的zfs的deb包,可以从开发板的[http:</div></www.orangepiol><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.cn/html/serviceAndSupport</index.html '''官方工具''']中下载到。打开'''官方工具''',然后进入'''Ubuntu和Debian系统使用的zfs相关的deb包'''文件夹后,可以看到Ubuntu20.04、Ubuntu22.04和Debian11三种类型的deb包,请下载需要的版本。li>
[[File:media/image371.png|232x136px]]<div class="figure">
下载完对应版本的zfs deb包后,请将它们上传到开发板的Linux系统中。上传方法请参考[[\l|'''上传文件到开发板Linux系统中的方法'''File:pi3b-img221.png]]小节的说明。
上传完成后,再在开发板Linux系统的命令行中使用'''cd'''命令进入deb包的目录,然后使用下面的命令就可以安装zfs的deb包。</div></ol><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>
orangepi@orangepi:~$ '''sudo apt install .<span id="hdmi-test"></*.deb'''span>
安装完成后,使用下面的命令可以看到zfs相关的内核模块:== HDMI test ==
orangepi@orangepi:~$ '''ls /lib/modules/5.10.160<span id="hdmi-rockchipdisplay-rk356x/updates/dkmstest"></'''span>=== HDMI display test ===
'''icp.ko spl.ko zavl.ko zcommon.ko zfs.ko zlua.ko znvpair.ko zunicode.ko zzstd.ko'''# Use HDMI to HDMI cable to connect Orange Pi development board and HDMI monitor
然后重启下Linux系统就能看到zfs内核模块会自动加载了:::[[File:pi3b-img10.png]]
orangepi@orangepi<ol start="2" style="list-style-type:~$ '''lsmod | grep &quotdecimal;zfs&quot;'''"><li>After starting the Linux system, if the HDMI monitor has image output, it means that the HDMI interface is in normal use</li>
zfs 2801664 0{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''
zunicode 327680 1 zfs'''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.'''</big>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|}</ol>
zzstd 471040 1 zfs<span id="hdmi-to-vga-display-test"></span>
zlua 139264 1 zfs=== HDMI to VGA display test ===
zcommon 69632 1 zfs<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>
znvpair 61440 [[File:pi3b-img222.png]]</ol><ol start="2 zfs,zcommon" style="list-style-type: lower-alpha;"><li>A VGA cable</li>
zavl 16384 1 zfs[[File:pi3b-img223.png]]</ol><ol start="3" style="list-style-type: lower-alpha;"><li>A monitor or TV that supports VGA interface</li></ol></li></ol><ol start="2" style="list-style-type: decimal;"><li>HDMI to VGA display test as shown below</li>
icp 221184 1 zfs[[File:pi3b-img224.png]]
spl 77824 6 zfs{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''When using HDMI to VGA display,icpthe development board and the Linux system of the development board do not need to make any settings,zzstdonly the HDMI interface of the development board can display normally. So if there is a problem with the test,znvpairplease check whether there is a problem with the HDMI to VGA converter,zcommon,zavlVGA cable and monitor.'''</big>|}</ol><span id="hdmi-resolution-setting-method"></span>
在Debian12中,zfs的默认版本为2.1.11,所以我们可以通过下面的命令直接安装zfs,再次提醒下,安装前需要确保系统已安装内核头文件的deb包。=== HDMI resolution setting method ===
orangepi@orangepi:~$ # First open '''sudo apt install -y zfsutils-linux zfs-dkmsDisplay''' in '''Settings'''
<span id="创建zfs池的方法"></span>=== 创建ZFS池的方法 ===::[[File:pi3b-img225.png]]
'''ZFS是基于存储池的,我们可以将多个物理存储设备添加到池中,然后从这个池中分配存储空间。'''<ol start="2" style="list-style-type: decimal;"><li>Then you can see the current resolution of the system</li>
'''下面的内容是基于开发板接了一个NVMe SSD和一个U盘来演示的。'''[[File:pi3b-img226.png]]</ol><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 style="list-style-type: decimal;"><li><p>首先我们可以通过'''lsblk'''命令查看下开发板所有的存储设备,当前开发板接了一个NVMe SSD以及一个U盘,输出如下所示:</p><p>[[File:media/image372pi3b-img227.png|379x227px]]</p></li><li><p>然后输入下面的命令可以创建一个ZFS池,包含NVMe SSD和U盘两个存储设备</pol><p>orangepi@orangepi:~$ '''sudo zpool create ol start="4" style="list-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 style-h'''可以看到'''pool1'''被挂载到了'''/pool1'''目录</p><p>orangepi@orangepitype:~$ '''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></lidecimal;"><li><p>使用下面的命令可以看到pool1的文件系统类型为zfs</p><p>orangepi@orangepi:~$ '''mount | grep pool1'''</p><p>pool1 on /pool1 type '''zfs''' (rwThen select the resolution you want to set,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>and click Apply</li></ol>
[[File:pi3b-img228.png]]<span id/ol><ol start="测试zfs的数据去重功能5"style="list-style-type: decimal;"><li>After the new resolution is set, select '''Keep the configuration'''</spanli>=== 测试ZFS的数据去重功能 ===
<ol style="list[[File:pi3b-style-type: decimal;">img229.png]]<li><p>ZFS的数据去重功能默认是关闭的,我们需要执行下面的命令打开</pol><p>orangepi@orangepi:~$ '''sudo zfs set dedupspan id=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"how-to-use-bluetooth"></olspan>
root@orangepi:/pool1$ '''for ((i=0; i&lt;1000; i++)); do sudo cp test.1g $i.test.1g; done'''= How to use Bluetooth ==
<ol startspan id="4" style="listtest-method-of-desktop-styleimage-type: decimal;1"><li>然后用'''du -lh'''可以看到目前池中总共有1002G的数据,但实际上ZFS池的大小只有'''504GB'''(SSD+U盘的总容量),是装不下那么大的数据的</li></olspan>=== Test method of desktop image ===
root@orangepi:/pool1$ '''du -lh'''# Click the Bluetooth icon in the upper right corner of the desktop.
1002G::[[File:pi3b-img230.png]]
<ol start="52" style="list-style-type: decimal;"><li><p>然后用'''zpool list'''命令可以看到实际只占用了1.01G,因为这1001个文件都是重复的,说明数据去重功能有效。</p><p>[[File:media/image374.png|576x36px]]</p>Then select the adapter</li></ol>
[[File:pi3b-img231.png]]<span id/ol><ol start="测试zfs的数据压缩功能3"style="list-style-type: decimal;"><li>If there is a prompt on the following interface, please select '''Yes'''</spanli>=== 测试ZFS的数据压缩功能 ===
# 因为存储的数据不同,压缩节省的磁盘空间也会有所不同,所以我们选择压缩比较大的纯文本文件来进行压缩测试,执行下面的命令将[[File:pi3b-img232.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>Then set '''/var/log/Visibility Setting'''as '''/etc/Always visible'''目录打包成tar包in the Bluetooth adapter settings interface, and then close it</li>
orangepi@orangepi[[File:~$ '''cd pi3b-img233.png]]</pool1ol><ol start="5" style="list-style-type: decimal;"><li>Then open the configuration interface of the Bluetooth device</'''li>
root@orangepi[[File:pi3b-img234.png]]</pool1$ ol><ol start="6" style="list-style-type: decimal;"><li>Click '''sudo tar -cf text.tar /var/log/ /etc/Search'''to start scanning the surrounding Bluetooth device</li>
[[File:pi3b-img235.png]]</ol><ol start="27" style="list-style-type: decimal;"><li><p>然后通过Then select the Bluetooth device you want to connect to, and then click the right button of the mouse to pop up the operation interface for this Bluetooth device, select '''ls -lh'''命令可以看到的文件大小以及在ZFS池中占用的空间都是'''27MPair'''</p><p>[[File:media/image375.png|576x90px]]</p>to start pairing, and the demonstration here is to pair with an Android phone</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>
root@orangepi[[File:pi3b-img236.png]]</pool1$ ol><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 '''sudo tar -cf text.tar /var/log/ /etc/Confirm'''to confirm. At this time, the mobile phone also needs to be confirmed</li>
[[File:pi3b-img237.png]]</ol><ol start="59" style="list-style-type: decimal;"><li>这时可以看到After pairing with the mobile phone, you can choose the paired Bluetooth device, then right-click and select '''text.tarSend a File'''文件大小还是27M,但是在ZFS池中只占用9.47M的空间,说明文件被压缩了to start sending a picture to the phone</li></ol>
[[File:media/image376pi3b-img238.png|576x79px]]</ol><ol start="10" style="list-style-type: decimal;"><li>The interface of the sending picture is shown below</li>
[[File:pi3b-img239.png]]</ol><span id== 关机和重启开发板的方法 =="usb-interface-test"></span>
<ol style="list-style-type: decimal;"><li><p>在Linux系统运行的过程中,如果直接拔掉Type-C电源断电,可能会导致文件系统丢失某些数据或者损坏,所以在断电前请先使用'''poweroff'''命令关闭开发板的Linux系统,然后再拔掉电源。</p><p>orangepi@orangepi:~$ '''sudo poweroff'''</p></li><li><p>另外开发板配有开关机按键,还可以'''短按'''开发板上的开关机按键来关机。</p><p>[[File:media/image377.png|294x80px]]</p></li></ol>= USB interface test ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''注意,Linux桌面版系统按下开关机按键后会弹出下图所示的确认框,需要点击Shut Down选项后才会关机。The USB interface can be connected to a USB hub to expand the number of USB interfaces.'''</big>|}
[[File:media<span id="connect-the-usb-mouse-or-keyboard-test"></image378.png|207x193px]]span>=== Connect the USB mouse or keyboard test ===
<ol start="3" style="list-style-type: decimal;"># Insert the USB interface keyboard into the USB interface of the Orange Pi development board<li><p>关机后短按开发板上的开关机按键即可开机。</p># Connect Orange PI development board to HDMI display<p>[[File:media/image377.png|294x80px]]</p></li><li><p>重启Linux系统的命令为</p><p>orangepi@orangepi:~$ '''sudo''' '''reboot'''</p></li></ol># If the mouse or keyboard can operate normally, it means that the USB interface is working normally (the mouse can only be used in the desktop version of the system)
<span id="linuxconnect-sdkorangepithe-build使用说明usb-storage-device-test"></span>= Linux SDK——orangepi-build使用说明 =
== 编译系统需求 = Connect the USB storage device test ===
'''我们可以在x64的电脑中交叉编译开发板的Linux镜像,也可以在开发板的Ubuntu22.04系统中来编译开发板的Linux镜像,请根据自己的喜好二选一。'''# First insert the U disk or USB mobile hard disk into the USB interface of the Orange Pi development board# Execute the following command, if you can see the output of sdX, it means that the U disk is recognized successfully
::{| class="wikitable" style="width:800px;"|-|orangepi@orangepi:~$ '''cat /proc/partitions | grep &quot;sd*&quot;'''<br><span style="margin-right: 30px;">major </span><span style="margin-right: 40px;">minor </span><span style="margin-right: 30px;">#blocks</span><span style="margin-right: 50px;">name</span><br><span style="margin-right: 70px;">8</span><span style="margin-right: 60px;">0</span><span style="margin-right: 50px;">30044160 </span><span style="margin-right: 50px;color:#FF0000">'''sda'''如果是在开发板的Ubuntu22.04系统中使用orangepi</span><br><span style="margin-right: 70px;">8</span><span style="margin-right: 60px;">1</span><span style="margin-right: 50px;">30043119 </span><span style="margin-build来编译Linux镜像,请做好散热(尤其是SSD启动时)。如果散热没做好,容易出现文件系统跑飞的错误。right: 50px;color:#FF0000">'''sda1'''</span><br>|}
<span idol start="使用开发板的ubuntu22.04系统编译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</spanli>=== 使用开发板的Ubuntu22.04系统编译 ===
<ol {| class="wikitable" style="list-style-typewidth: decimal800px;"><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'''<sudo mount /p><p>No LSB modules are available.<dev/p><p>Distributor ID: Ubuntu<sda1 /p><p>Description: Ubuntu 22.04.1 LTS<mnt/p><p>Release: '''22.04'''</p><p>Codename: jammy</p></li><li><p>'''由于内核和U-boot等源码都是存放在GitHub上的,所以编译镜像的时候请确保开发板能正常从GitHub下载代码,这点是非常重要的。'''</p></li></ol>
<span id="使用x64的ubuntu22.04电脑编译"><orangepi@orangepi:~$ '''ls /span>=== 使用x64的Ubuntu22.04电脑编译 ===mnt/'''
test.txt|}</ol><ol start="4" style="list-style-type: decimal;"><li><p>Linux SDK,即After the mounting, you can view the capacity usage and mount point of the U disk through the '''orangepidf -build''h',支持在安装有'''Ubuntu 22.04'''的电脑上运行,所以下载orangepi-build前,请首先确保自己电脑已安装的Ubuntu版本是Ubuntu 22.04。查看电脑已安装的Ubuntu版本的命令如下所示,如果Release字段显示的不是'''22.04''',说明当前使用的Ubuntu版本不符合要求,请更换系统后再进行下面的操作。command</pli><p>test{| class="wikitable" style="width:800px;" |-|orangepi@testorangepi:~$ '''lsb_release df -ah | grep &quot;sd&quot;'''</p><p>No LSB modules are available.</p><p>Distributor ID: Ubuntu<dev/p><p>Description: Ubuntu 22.04 LTS<sda1 &nbsp;&nbsp;&nbsp; 29G &nbsp;&nbsp; 208K &nbsp;&nbsp; 29G &nbsp;&nbsp; 1% /p>mnt<p>Release: '''22.04'''</p>|}<p>Codename: jammy</p></liol><li><p>如果电脑安装的是Windows系统,没有安装有Ubuntu 22.04的电脑,可以考虑使用'''VirtualBox'''或者'''VMware'''来在Windows系统中安装一个Ubuntu 22.04虚拟机。但是请注意,不要在WSL虚拟机上编译orangepispan id="usb-wireless-build,因为orangepinetwork-build没有在WSL虚拟机中测试过,所以无法确保能正常在WSL中使用orangepicard-build。</ptest"></lispan><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>=== USB wireless network card test ===<p>或者</p><p>The currently '''https://repo.huaweicloud.com/ubuntu-releases/22.04/ubuntu-22.04.1-desktop-amd64.isotested'''</p></li><li><p>在电脑中或者虚拟机中安装完Ubuntu 22USB wireless network cards are shown below.04后,请先设置Ubuntu 22Please test it by yourself for other models of USB wireless network cards.04的软件源为清华源,不然后面安装软件的时候很容易由于网络原因而出错</p><ol style="list-style-type: lower-alpha;"><li>替换清华源的方法参考这个网页的说明即可</li></ol></li></ol>If you cannot use it, you need to transplant the corresponding USB wireless network card driver
[https{| class="wikitable" style="width://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ '''https800px;text-align://mirrors.tuna.tsinghua.educenter;"|-| No.cn/help/ubuntu/''']| Model||-| 1| RTL8723BU
<ol start="Support 2" style="list-style-type: lower-alpha;"><li><p>注意Ubuntu版本需要切换到22.04</p><p>[[File:media/image3794G WIFI+BT4.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>0
<span id="获取linux| [[File:pi3b-sdk的源码"></span>img240.png]]|-| 2| == 获取Linux sdk的源码 ==RTL8811
=== 从github下载orangepi-build ===Support 2.4G +5G WIFI
# Linux sdk其实指的就是orangepi| [[File:pi3b-build这套代码,orangepiimg241.png]]|-build是基于armbian build编译系统修改而来的,使用orangepi-build可以编译出多个版本的Linux镜像。首先下载orangepi-build的代码,命令如下所示:| 3| RTL8821CU
test@test:~$ '''sudo apt-get update'''Support 2.4G +5G WIFI
test@test:~$ '''sudo apt-get install -y git'''Support BT 4.2
test@test:~$ '''git clone https://github.com/orangepi-xunlong/orangepi-build.git -b next'''| <div class="figure">
'''注意,Orange Pi 3B开发板是需要下载orangepi[[File:pi3b-build的next分支源码的,上面的git clone命令需要指定orangepi-build源码的分支为next。'''img242.png]]
[[File:media</image380.pngdiv>|576x298px]]}
'''通过git clone命令下载orangepi<span id="rtl8723bu-build的代码是不需要输入github账号的用户名和密码的(下载本手册中的其他代码也是一样的),如果如输入git clone命令后Ubuntu PC提示需要输入github账号的用户名和密码,一般都是git clone后面的orangepi-build仓库的地址输入错误了,请仔细检查命令拼写是否有错误,而不是以为我们这里忘了提供github账号的用户名和密码。'''test"></span>==== RTL8723BU test ====
<ol start="2" style="list-style-type: decimal;"># First insert the RTL8723BU wireless network card module into the USB interface of the development board<li>开发板当前使用的u# Then the Linux system will automatically load the RTL8723BU bluetooth and WIFI-boot和Linux内核版本如下所示</li></ol>related kernel modules, through the lsmod command, you can see that the following kernel modules have been automatically loaded
::{| class="wikitable" style="width:800px;"
|-
| style="text-align<p>orangepi@orangepi: left;"| ~$ '''分支lsmod'''</p>| <span style="margin-right: 100px;">Module </span><span style="textmargin-alignright: left50px;"| '''u>Size </span><span style="margin-boot版本'''right: 45px;">Used by</span><br>| <span style="textmargin-alignright: left100px;"| '''Linux内核版本'''>rfcomm </span><span style="margin-right: 50px;">57344</span><span style="margin-right: 50px;">16</span><br>|<span style="margin-| right: 95px;">rtl8xxxu </span><span style="margin-right: 50px;">106496</span><span style="textmargin-alignright: left30px;"| '''legacy'''>0</span><br>| <span style="textmargin-alignright: left90px;"| '''u>rtk_btusb </span><span style="margin-boot 2017.09'''| right: 50px;">61440</span><span style="textmargin-alignright: left30px;"| '''Linux5.10'''>0</span><br>
|}
'''这里所说的分支和orangepi<ol start="3" style="list-build源代码的分支不是同一个东西,请不要搞混了。此分支主要是用来区分不同内核源码版本的。'''style-type: decimal;"><li>Through the dmesg command, you can see the loading information of the RTL8723BU module</li>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''目前RK提供的Linux5.10 bsp内核我们定义为legacy分支。如果以后支持主线内核了,就会添加一个current分支。dmesg'''
<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>..
=== 下载交叉编译工具链 ===[ 83.438901] usb 2-1: new high-speed USB device number 2 using ehci-platform
'''只有在x64的电脑中使用orangepi[ 83.588375] usb 2-build编译镜像才会下载交叉编译工具链。在开发板的Ubuntu221: New USB device found, idVendor=0bda, idProduct=b720, bcdDevice= 2.04中编译开发板的Linux镜像是不会下载交叉编译工具链的,此时orangepi-build/toolchains会是一个空文件夹。'''00
<ol style="list[ 83.588403] usb 2-style-type1: New USB device strings: decimal;"><li><p>orangepi-build第一次运行的时候会自动下载交叉编译工具链放在'''toolchains'''文件夹中,每次运行orangepi-build的build.sh脚本后,都会检查'''toolchains'''中的交叉编译工具链是否都存在,如果不存在则会重新开始下载,如果存在则直接使用,不会重复下载。</p><div classMfr=1, Product=2, SerialNumber="figure">3
[[File83.588422] usb 2-1:media/image381Product: 802.png|575x278px|选区_396]]11n WLAN Adapter
</div></li><li><p>交叉编译工具链在中国境内的镜像网址为清华大学的开源软件镜像站</p><p>[https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/ '''https://mirrors83.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/'''588443]</p></li><li><p>'''toolchains'''下载完后会包含多个版本的交叉编译工具链,开发板只会使用其中的两个</p><p>test@test:~/orangepi-build$ '''ls toolchains/'''</p><p>gcc-arm-11.usb 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-typeManufacturer: 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>Realtek
=== orangepi[ 83.588460] usb 2-build完整目录结构说明 ===1: SerialNumber: 00e04c000001
<ol style="list-style-type[ 83.601974] Bluetooth: decimal;"><li><p>orangepi-build仓库下载完后并不包含Linux内核、u-boot的源码以及交叉编译工具链,Linux内核和u-boot的源码存放在独立的git仓库中</p><ol style="list-style-typehci0: lower-alpha;"><li><p>Linux内核源码存放的git仓库如下所示:</p><p>'''httpsRTL://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 styleexamining hci_ver=06 hci_rev=000b lmp_ver=06 lmp_subver="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>8723
[ 83.603894] Bluetooth: hci0: RTL: rom_version status=0 version= 编译u-boot ==1
<ol style="list-style-type[ 83.603920] Bluetooth: decimal;"><li><p>运行build.sh脚本,记得加sudo权限</p><p>test@testhci0: RTL:~loading rtl_bt/orangepi-build$ '''sudo rtl8723b_fw./build.sh'''</p></li><li><p>选择'''U-boot package''',然后回车</p><div class="figure">bin
[[File83.610108] Bluetooth: hci0: RTL:medialoading rtl_bt/image382rtl8723b_config.png|576x132px|选区_238]]bin
</div></li><li><p>接着选择开发板的型号</p><div class="figure">[ 83.611274] Bluetooth: hci0: RTL: cfg_sz 68, total sz 22564
[[File83.658494] rtk_btusb:media/image383Realtek Bluetooth USB driver ver 3.1.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]6d45ddf.20220519-142432
</div></li><li><p>然后就会开始编译u-boot,编译时提示的部分信息说明如下</p><ol style="list-style-type: lower-alpha;"><li><p>u-boot源码的版本</p><p>[ o.k. ] Compiling u-boot [ '''v2017.09''' ]</p></li><li><p>交叉编译工具链的版本</p><p>[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 7.4.1''' ]</p></li><li><p>编译生成的u-boot deb包的路径</p><p>[ o.k. ] Target directory [ '''orangepi-build/output/debs/u-boot''' ]</p></li><li><p>编译生成的u-boot deb包的包名</p><p>[ o.k83. 658651] 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@testusbcore:~/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>registered new interface driver rtk_btusb
<span id="orangepi-buildu-bootv2017[ 83.09667124] usb 2-rk3588archarmdtsrk3566-orangepi-3b.dts编译linux内核"></span>== [https1: This Realtek USB WiFi dongle (0x0bda://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内核 ==0xb720) is untested!
<ol style="list[ 83.667137] usb 2-style-type1: decimal;"><li><p>运行buildPlease report results to Jes.sh脚本,记得加sudo权限</p><p>testSorensen@test:~/orangepi-build$ '''sudo ./buildgmail.sh'''</p></li><li><p>选择'''Kernel package''',然后回车</p><div class="figure">com
[[File:media/image38783.png|575x116px|选区_240]890140]usb 2-1: Vendor: Realtek
</div></li><li><p>接着选择开发板的型号</p><div class="figure">[ 83.890153] usb 2-1: Product: 802.11n WLAN Adapter
[[File:media/image38383.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]890159]usb 2-1: rtl8723bu_parse_efuse: dumping efuse (0x200 bytes):
</div></li><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>....
<![ 83.890412] usb 2-- --><ol style1: RTL8723BU rev E (SMIC) 1T1R, TX queues 3, WiFi="list-style-type: lower-alpha;"><li><p>如果不需要修改内核的配置选项,在运行build.sh脚本时,传入'''KERNEL_CONFIGURE1, BT=no'''就可临时屏蔽弹出内核的配置界面了</p><p>test@test:~/orangepi-build$ '''sudo ./build.sh KERNEL_CONFIGURE1, GPS=no'''</p></li><li><p>也可以设置'''orangepi-build/userpatches/config-default.conf'''配置文件中的'''KERNEL_CONFIGURE0, HI PA=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>0
<!-- --><ol start="6" style="list-style-type: decimal;"><li><p>编译内核源码时提示的部分信息说明如下</p><ol style="list-style-type: lower-alpha;"><li><p>Linux内核源码的版本</p><p>[ o.k83. 890417] Compiling current kernel [ '''5.10.160''' ]</p></li><li><p>使用的交叉编译工具链的版本</p><p>[ o.k. ] Compiler version [ '''aarch64-none-linux-gnuusb 2-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@testRTL8723BU MAC: 00:13:ef:~/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-typef4: lower-alpha;"><li><p>使用下面的命令可以解压deb包</p><p>test@test58:~/orangepi-build$ '''cd output/debs'''</p></li></ol></li></ol>ae
test@test[ 83.890421] usb 2-1:~/orangepi_build/outputrtl8xxxu: Loading firmware rtlwifi/debs$ '''mkdir test'''rtl8723bu_nic.bin
test@test[ 83.895289] usb 2-1:~/orangepi_build/output/debs$ '''cp \'''Firmware revision 35.0 (signature 0x5301)
'''linux-image-legacy-rockchip-rk356x_1[ 84.0.0_arm64.deb test/'''050893] Bluetooth: hci0: RTL: fw version 0x0e2f9f73
test@test[ 84.266905] Bluetooth:~/orangepi_build/output/debs$ '''cd test'''RFCOMM TTY layer initialized
test@test[ 84.266949] Bluetooth:~/orangepi_build/output/debs/test$ '''dpkg -x \'''RFCOMM socket layer initialized
'''linux-image-legacy-rockchip-rk356x_1[ 84.0266999] Bluetooth: RFCOMM ver 1.0_arm64.deb .'''11
test@test[ 84.884270] usbcore:~/orangepi_build/output/debs/test$ '''ls'''registered new interface driver rtl8xxxu
[ 84.912046] rtl8xxxu 2-1:1.2 wlx0013eff458ae: renamed from wlan0|}</ol><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 [[Orange Pi 3B#WIFI connection test|''boot etc lib'the WIFI connection test chapter'' linux']] for WIFI connection and testing methods</li>{| class="wikitable" style="width:800px;" |-image-legacy-rockchip-rk356x_1.0.0_arm64.deb | orangepi@orangepi:~$ '''usrsudo ifconfig wlx0013eff458ae'''
<ol startwlx0013eff458ae: flags="2" style="list-style-type: lower-alpha4099&lt;UP,BROADCAST,MULTICAST&gt;"><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>mtu 1500
<!-- --><ol start="9" style="list-style-type: decimal;"><li><p>orangepi-bulid编译系统编译Linux内核源码时首先会将Linux内核源码和github服务器的Linux内核源码进行同步,所以如果想修改Linux内核的源码,首先需要关闭源码的更新功能('''需要完整编译过一次Linux内核源码后才能关闭这个功能,否则会提示找不到Linux内核的源码,如果是从百度云盘下载的源码压缩包,则没有这个问题,因为Linux的源码都已缓存好了'''),否则所作的修改都会被还原,方法如下:</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>如果对内核做了修改,可以使用下面的方法来更新开发板Linux系统的内核和内核模块</p><ol style="list-style-typeether 00: lower-alpha;"><li><p>将编译好的Linux内核的deb包上传到开发板的Linux系统中</p><p>test@test13:~/orangepi-build$ '''cd output/debs'''</p><p>test@testef:~/orangepi-build/output/debs$ '''scp \'''</p><p>'''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb root@192.168.1.xxxf4:/root'''</p></li><li><p>然后登录到开发板,卸载已安装的Linux内核的deb包</p><p>root@orangepi58:~# '''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>ae txqueuelen 1000 (Ethernet)
[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:RX packets 0 bytes 0 (0.dts''']0 B)
== 编译rootfs ==::RX errors 0 dropped 0 overruns 0 frame 0
<ol style="list-style-type: decimal;"><li><p>运行build.sh脚本,记得加sudo权限</p><p>test@test:~/orangepi-build$ '''sudo ./buildTX packets 0 bytes 0 (0.sh'''</p></li><li><p>选择'''Rootfs and all deb packages''',然后回车</p></li></ol>0 B)
::TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0|}<div /ol><ol start="5" style="list-style-type: decimal;"><li>Then you can see the USB Bluetooth device through the '''hciconfig''' command</li>{| class="figurewikitable" style="width:800px;">|-| orangepi@orangepi:~$ '''sudo apt update &amp;&amp; sudo apt install bluez'''
[[Fileorangepi@orangepi:media/image391.png|576x119px|选区_241]]~$ '''hciconfig'''
hci0: Type: Primary Bus: '''</div><ol start="3" span style="list-style-typecolor: decimal;#FF0000"><li><p>接着选择开发板的型号USB</p><div class="figure"span>'''
[[File:media/image383.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]:BD Address: 00:13:EF:F4:58:AE ACL MTU: 820:8 SCO MTU: 255:16
</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">DOWN
[[File:media/image393.png|576x75px|选区_245]]:RX bytes:1252 acl:0 sco:0 events:125 errors:0
::TX bytes:23307 acl:0 sco:0 commands:125 errors:0|}</divol></li></olstart="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 '''<lispan style="color:#FF0000">x<p/span>如果是编译服务器版的镜像,还可以选择编译Standard版本或者Minimal版本,Minimal版本预装的软件会比Standard版本少很多('''没特殊需求请不要选择Minimal版本,因为很多东西默认没有预装,部分功能可能用不了''')will be displayed</p><div class="figure"li>
[[File:media/image394pi3b-img243.png|576x78px|选区_397]]</ol><ol start="7" style="list-style-type: decimal;"><li>Click '''Turn Bluetooth On''' to turn on Bluetooth</li>
[[File:pi3b-img244.png]]</divol></liol start="8" style="list-style-type: decimal;"><li><p>如果是编译桌面版本的镜像还需要选择桌面环境的类型,目前Ubuntu Jammy主要维护XFCE和Gnome两种桌面,Ubuntu Focal只维护XFCE桌面,Debian Bullseye主要维护XFCE和KDE桌面The display after turning on Bluetooth is as follows</p><div class="figure"li>
[[File:media/image395pi3b-img245.png]]</ol><ol start="9" style="list-style-type: decimal;"><li>Please refer to the [[Orange Pi 3B#How to use Bluetooth|575x99px|Selection_001'''Bluetooth use method''']]for Bluetooth test method, so I won't go into details here.</li></ol>
</div><p>[[File:media/image396.png|576x74px]]</p><p>然后可以选择需要安装的额外的软件包。这里请按下回车键直接跳过。</p><p>[[File:media/image397.png|575x264px]]</p></li><li><p>然后就会开始编译rootfs,编译时提示的部分信息说明如下所示</p><ol stylespan id="listrtl8811-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;test"><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></olspan>
<span id="编译linux镜像"></span>== 编译Linux镜像 = RTL8811 test ====
<ol style="list-style-type: decimal;"><li><p>运行build.sh脚本,记得加sudo权限</p><p>test@test:~/orangepi-build$ '''sudo ./build# First insert the RTL8811 wireless network card module into the USB interface of the development board.sh'''</p></li><li><p>选择'''Full OS image for flashing''',然后回车</p></li></ol># Then the Linux system will automatically load the kernel modules related to RTL8811 WIFI, and you can see that the following kernel modules have been automatically loaded through the lsmod command
::{| class="wikitable" style="width:800px;" |-|<p>orangepi@orangepi:~$ '''lsmod'''</p><div classspan style="margin-right: 100px;">Module </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 45px;">Used by</span><br><span style="margin-right: 100px;">8821cu </span><span style="margin-right: 50px;">1839104 </span><span style="figuremargin-right: 50px;">0</span><br>|}
[[File<ol start="3" style="list-style-type:mediadecimal;"><li>Through the dmesg command, you can see the loading information of the RTL8811 module</image398.pngli>{|576x128pxclass="wikitable" style="width:800px;" |选区_242]]-| orangepi@orangepi:~$ '''dmesg'''
</div><ol start="3" style="list[ 118.618194] usb 2-style1: new high-type: decimal;"><li><p>然后选择开发板的型号</p><div class="figure">speed USB device number 2 using ehci-platform
[[File118.767152] usb 2-1:media/image383New USB device found, idVendor=0bda, idProduct=c811, bcdDevice= 2.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]00
</div></li><li><p>然后选择rootfs的类型</p><p>[[File:media/image392118.png|575x86px767181]]</p></li><li><p>然后选择镜像的类型</p><ol style="listusb 2-style-type1: New USB device strings: lower-alpha;"><li><p>'''Image with console interface &gt; (server)'''表示服务器版的镜像,体积比较小</p></li><li><p>'''Image with desktop environment'''表示带桌面的镜像,体积比较大</p><div classMfr=1, Product=2, SerialNumber="figure">3
[[File118.767199] usb 2-1:media/image393Product: 802.png|576x75px|选区_245]]11ac NIC
</div></li></ol></li><li><p>如果是编译服务器版的镜像,还可以选择编译Standard版本或者Minimal版本,Minimal版本预装的软件会比Standard版本少很多('''没特殊需求请不要选择Minimal版本,因为很多东西默认没有预装,部分功能可能用不了''')</p><div class="figure">[ 118.767219] usb 2-1: Manufacturer: Realtek
[[File:media/image394118.png|569x77px|选区_397]767235]usb 2-1: SerialNumber: 123456
</div></li><li><p>如果是编译桌面版本的镜像还需要选择桌面环境的类型,目前Ubuntu Jammy主要维护XFCE和Gnome两种桌面,Ubuntu Focal只维护XFCE桌面,Debian Bullseye主要维护XFCE和KDE桌面</p><div class="figure">[ 119.500530] usbcore: registered new interface driver rtl8821cu
[[File119.525498] rtl8821cu 2-1:1.0 wlx1cbfced9d260:mediarenamed from wlan0|}</image395ol><ol start="4" style="list-style-type: decimal;"><li>Then you can see the WiFi device node through the '''sudo ifconfig''' command.pngPlease refer to the [[Orange Pi 3B#WIFI connection test|575x99px|Selection_001'''WiFi connection test chapter''']]for WIFI connection and testing methods. I won't go into details her</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo ifconfig wlx1cbfced9d260'''
</div><p>[[Filewlx1cbfced9d260:media/image396.png|576x74px]]</p><p>然后可以选择需要安装的额外的软件包。这里请按下回车键直接跳过。</p><p>[[File:media/image397.png|575x264px]]</p></li><li><p>然后就会开始编译Linux镜像,编译的大致流程如下</p><ol styleflags="list-style-type: lower-alpha4099&lt;"><li><p>初始化Ubuntu PC的编译环境,安装编译过程需要的软件包</p></li><li><p>下载u-boot和Linux内核的源码(如果已经缓存,则只更新代码)</p></li><li><p>编译u-boot源码,生成u-boot的deb包</p></li><li><p>编译Linux源码,生成Linux相关的deb包</p></li><li><p>制作Linux firmware的deb包</p></li><li><p>制作orangepi-config工具的deb包</p></li><li><p>制作板级支持的deb包</p></li><li><p>如果是编译desktop版镜像,还会制作desktop相关的deb包</p></li><li><p>检查rootfs是否已经缓存,如果没有缓存,则重新制作rootfs,如果已经缓存,则直接解压使用</p></li><li><p>安装前面生成的deb包到rootfs中</p></li><li><p>对不同的开发板和不同类型镜像做一些特定的设置,如预装额外的软件包,修改系统配置等</p></li><li><p>然后制作镜像文件,并格式化分区,默认类型为ext4</p></li><li><p>再将配置好的rootfs拷贝到镜像的分区中</p></li><li><p>然后更新initramfs</p></li><li><p>最后将u-boot的bin文件通过dd命令写入到镜像中</p></li></ol></li><li><p>编译完镜像后会提示下面的信息</p><ol style="list-style-type: lower-alphaUP,BROADCAST,MULTICAST&gt;"><li><p>编译生成的镜像的存放路径</p><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>mtu 1500
'''[ o.k. ] Runtime [ 19 min ]'''::ether 1c:bf:ce:d9:d2:60 txqueuelen 1000 (Ethernet)
<ol style="list-style-type: lower-alpha;"><li><p>重复编译镜像的命令,使用下面的命令无需通过图形界面选择,可以直接开始编译镜像</p><p>[ o.k. ] Repeat Build Options [ '''sudo ./build:RX packets 0 bytes 0 (0.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=image RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=yes''' ]</p></li></ol>0 B)
<span id="android-11系统的使用说明"></span>= Android 11系统的使用说明 =::RX errors 0 dropped 0 overruns 0 frame 0
<span id="已支持的android版本"></span>== 已支持的Android版本 ==::TX packets 0 bytes 0 (0.0 B)
{| class="wikitable"|-| style="text-align: left;"| '''Android版本'''| style="text-align: left;"| '''内核版本'''|-| style="text-align: left;"| '''Android 11'''| style="text-align: left;"| '''Linux4.19'''TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|}
</ol>
<span id="rtl8821cu-test"></span>
<span id="android-功能适配情况"></span>== Android 功能适配情况 = 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, please make sure that the USB module is not in Driver CDROM Mode ::{| class="wikitable" style="width:800px;"
|-
| style="text-alignorangepi@orangepi: left;"| ~$ '''功能lsusb | grep &quot;Realtek&quot;''' Bus 002 Device 003: ID 0bda:c820 Realtek Semiconductor Corp. 802.11ac NIC| }::{| class="wikitable" style="textbackground-aligncolor:#ffffdc;width: left800px;"| '''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启动'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''WIFI'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''蓝牙'''| 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-alignorangepi@orangepi: left;"| '''PWM(40pin)~$ '''lsusb | style="text-align: leftgrep &quot;"| '''OK'''|-| style="text-align: leftRealtek&quot;"| '''PWM风扇接口'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''3pin调试串口'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''EMMC'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''TF卡启动'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''HDMI 视频'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''HDMI 音频'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''LCD'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''eDP显示'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''千兆网口'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''网口状态灯'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''耳机播放'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''耳机录音'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''LED灯'''| 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'''|}
Bus 002 Device 002: ID 0bda:1a2b Realtek Semiconductor Corp. RTL8188GU 802.11n WLAN Adapter ('''<span idstyle="wifi的连接测试方法color:blue">Driver CDROM Mode</span>== WIFI的连接测试方法 ==''')
# 首先点击进入'''Setting'''
[[File<big>'''If the USB WIFI module seen by the lsusb command is in Driver CDROM Mode, please unplug the USB WIFI module again. If not, please manually execute the following command to switch to the next mode:media'''</image399.png|549x228px]]big>
<ol start="2" style="list-style-type: decimal;">
<li>然后选择'''Network &amp; internet'''</li></ol>
[[Fileorangepi@orangepi:media/image400.png~$ '''sudo usb_modeswitch -KW -v 0bda -p 1a2b'''|565x120px]]}
<ol start="3" style="list-style-type: decimal;">
<li>然后选择The Linux system will automatically load the rtl8821cu bluetooth and wifi-related kernel modules, through the lsmod command, you can see that the following kernel modules have been automatically loaded</li>{| class="wikitable" style="width:800px;" |-|<p>orangepi@orangepi:~$ '''Wi-Filsmod'''</lip><span style="margin-right: 100px;">Module </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 45px;">Used by</olspan><br><span style="margin-right: 100px;">8821cu </span><span style="margin-right: 50px;">1839104 </span><span style="margin-right: 50px;">0</span><br>[[File<span style="margin-right:media90px;">rtk_btusb </image401.pngspan><span style="margin-right: 50px;">61440</span><span style="margin-right: 30px;">0</span><br>|561x99px]]}</ol>
<ol start="4" style="list-style-type: decimal;">
<li>然后打开Through the dmesg command, you can see the loading information of the rtl8821cu module</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''Wi-Fidmesg'''开关</li></ol>
[[File:media/image402.png|560x167px]].....
<ol start="5" style="list[ 57.083693] usb 2-style-type1: decimal;"><li><p>打开'''Winew high-Fi'''后如果一切正常,就可以扫描到附近的Wispeed USB device number 2 using ehci-Fi热点了</p>platform <p>[[File:media/image40357.png|561x166px231888]]</p></li><li><p>然后选择想连接的Wiusb 2-Fi后会弹出下图所示的密码输入界面</p><p>[[File1:media/image404New USB device found, idVendor=0bda, idProduct=1a2b, bcdDevice= 2.png|553x237px]]</p></li>00<li><p>然后使用键盘输入Wi-Fi对应的密码,再使用鼠标点击虚拟键盘中的回车按钮就会开始连接Wi-Fi了</p><p>[[File:media/image40557.png|553x232px]231916]</p></li><li><p>Wiusb 2-Fi连接成功后的显示如下图所示:</p><p>[[File1: New USB device strings:media/image406.png|558x102px]]</p></li></ol>Mfr=1, Product=2, SerialNumber=0
<span id="wi[ 57.231937] usb 2-fi-hotspot的使用方法"></span>== Wi-Fi hotspot的使用方法 ==1: Product: DISK
<ol style="list-style-type: decimal;"><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/image40057.png|565x120px]231956]</p></li><li><p>然后选择'''Hotspot &amp; tethering'''</p><p>[[File:media/image407.png|549x173px]]</p></li><li><p>然后选择'''Wiusb 2-Fi hotspot'''</p><p>[[File1:media/image408.png|548x104px]]</p></li><li><p>然后打开'''Wi-Fi hotspot''',下图中还可以看到生成的热点的名字和密码,记住它们,在连接热点的时候要用到(如果需要修改热点的名字和密码,需要先关闭'''Wi-Fi hotspot''',然后才能修改)</p><p>[[FileManufacturer:media/image409.png|551x158px]]</p></li><li><p>此时可以拿出你的手机,如果一切正常,在手机搜索到的WI-FI列表中就能找到上图'''Hotspot name'''下面显示的同名('''这里为 AndroidAP_6953''')的WIFI热点了。然后可以点击'''AndroidAP_6953'''连接热点,密码在上图的'''Hotspot password''' 下面可以看到</p></li></ol>Realtek
[[File57.242594] usb-storage 2-1:media/image4101.png|313x238px]]0: USB Mass Storage device detected
<ol start="8" style="list[ 57.245674] scsi host0: usb-stylestorage 2-type1: decimal;"><li>连接成功后显示如下图所示(不同手机界面会有区别,具体界面以你手机显示的为准)。此时就可以在手机上打开一个网页看下能否上网了,如果能正常打开网页, 说明开发板的'''WI-FI Hotspot''' 能正常使用</li></ol>1.0
[[File:media/image41158.png|327x165px]069172]usb 2-1: USB disconnect, device number 2
== 蓝牙的测试方法 ==[ 58.440025] usb 2-1: new high-speed USB device number 3 using ehci-platform
<ol style="list-style-type: decimal;"><li><p>首先点击进入'''Setting'''</p><p>[[File:media/image39958.png|549x228px587819]]</p></li><li><p>然后选择'''Connected devices'''</p><p>[[Fileusb 2-1:media/image412.png|547x115px]]</p></li><li><p>然后点击'''Pair new New USB device'''打开蓝牙并开始扫描周围的蓝牙设备</p><p>[[File:media/image413.png|547x126px]]</p></li><li><p>搜索到的蓝牙设备会在'''Available devices'''下面显示出来</p><p>[[File:media/image414found, idVendor=0bda, idProduct=c820, bcdDevice= 2.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>00
[ 58.587827] usb 2-1: New USB device strings: Mfr=1, Product= 树莓派5寸屏幕的使用方法 =2, SerialNumber=3
'''请确保使用的镜像为下面的两个版本的镜像:'''[ 58.587833] usb 2-1: Product: 802.11ac NIC
'''OrangePi3B_RK3566_Android11_lcd_v1[ 58.x.x.img'''587838] usb 2-1: Manufacturer: Realtek
'''OrangePi3B_RK3566_Android11_spi[ 58.587844] usb 2-nvme_lcd_v1.x.x.img'''1: SerialNumber: 123456
<ol style="list-style-type: decimal;"><li><p>首先需要组装好屏幕,请参考[[\l|'''树莓派5寸屏幕的组装方法'''58.610463]]</p></li><li><p>给板子接通Type-C电源,并上电,系统启动后,就可以看到屏幕显示如下图所示</p><p>[[Filertk_btusb:media/image420Realtek Bluetooth USB driver ver 3.1.png|516x332px]]</p></li></ol>6d45ddf.20220519-142432
<span id="pin-接口-gpiouartspi-和-pwm-测试"></span>== 40pin 接口 GPIO、UART、SPI 和 PWM 测试 ==[ 58.610656] usbcore: registered new interface driver rtk_btusb
<span id[ 58.634631] Bluetooth: hci0: RTL: examining hci_ver="pin-gpio-口测试"></span>=== 40pin GPIO 口测试 08 hci_rev=000c lmp_ver=08 lmp_subver=8821
<ol style="list-style-type: decimal;"><li><p>首先点击wiringOP图标打开wiringOP APP</p><p>[[File:media/image42158.png|576x210px636729]]</p></li><li><p>wiringOP APP的主界面显示如下图所示,然后点击'''GPIO_TEST'''按钮打开GPIO测试界面</p><p>[[FileBluetooth: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>[[Filehci0:media/image423.png|576x303px]]</p></li><li><p>然后点击'''GPIO READALL'''按钮,输出信息如下图所示:</p><p>[[FileRTL: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>rom_version status=0 version=1
<span id="pin的uart测试-2"><[ 58.636740] Bluetooth: hci0: RTL: loading rtl_bt/span>=== 40pin的UART测试 ===rtl8821c_fw.bin
<ol style="list-style-type: decimal;"><li><p>Android中默认打开了UART7和UART9,在40pin的位置如下图所示,对应的设备节点分别是'''/dev/ttyS7'''和'''/dev/ttyS9'''</p><p>[[File:media/image27258.png|376x92px664190]]</p></li><li><p>首先点击wiringOP图标打开wiringOP APP</p><p>[[FileBluetooth: hci0:media/image421.png|576x210px]]</p></li><li><p>wiringOP APP的主界面显示如下图所示,然后点击'''UART_TEST'''按钮打开UART测试界面</p><p>[[FileRTL:medialoading rtl_bt/image429rtl8821c_config.png|575x156px]]</p></li><li><p>APP的串口测试界面如下图所示</p></li></ol>bin
[[File:media/image43058.png|576x324px]664746]Bluetooth: hci0: RTL: cfg_sz 10, total sz 31990
<ol start="5" style="list-style-type[ 59.122471] Bluetooth: decimal;"><li>下面以测试'''UART7'''为例,在选择框中选择'''/dev/ttyS7'''节点,在编辑框中输入想要设置的波特率,然后点击'''OPEN'''按钮打开'''/dev/ttyS7'''节点,打开成功后,'''OPEN'''按钮变为不可选中状态,'''CLOSE'''按钮和'''SEND'''按钮变为可选中状态</li></ol>hci0: RTL: fw version 0x829a7644
[[File:media/image43159.png|574x166px]265513]usbcore: registered new interface driver rtl8821cu
<ol start="6" style="list[ 59.280119] rtl8821cu 2-style-type1:1.2 wlx90de80521825: decimal;">renamed from wlan0<li><p>然后使用杜邦线短接uart7的RXD和TXD引脚</p><p>[[File:media/image432.png|418x103px]]</p></li>}<li><p>然后可以在下面的发送编辑框中输入一段字符,点击'''SEND'''按钮开始发送</p></li></ol>
<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 [[File:media/image433.pngOrange Pi 3B#WIFI connection test|575x161px'''WiFi connection test chapter''']]for WIFI connection and testing methods.</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo ifconfig wlx90de80521825'''
<ol startwlx90de80521825: flags="8" style="list-style-type: decimal4099&lt;UP,BROADCAST,MULTICAST&gt;"><li>如果一切正常,接收框内会显示已接收到的字符串</li></ol>mtu 1500
[[File:media/image434.png|574x164px]]:ether 00:13:ef:f4:58:ae txqueuelen 1000 (Ethernet)
<span id="pin的spi测试"></span>=== 40pin的SPI测试 ===::RX packets 0 bytes 0 (0.0 B)
<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>RX errors 0 dropped 0 overruns 0 frame 0
[[File:media/image437:TX packets 0 bytes 0 (0.png|576x241px]]0 B)
::TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|}
</ol>
<ol start="6" style="list-style-type: decimal;">
<li><p>然后填充需要发送的字节,比如读取w25q64的ID信息,在data[0]中填入地址0x9f,然后点击Then you can see the USB Bluetooth device through the '''TRANSFERhciconfig'''按钮command</pli><p>[[File{| class="wikitable" style="width:media/image438.png800px;" |-|572x216px]]</p></li><li><p>最后APP会显示读取到的ID信息</p></li></ol>orangepi@orangepi:~$ '''sudo apt-get update &amp;&amp; sudo apt-get install -y bluez'''
[[Fileorangepi@orangepi:media/image439.png|575x296px]]~$ '''hciconfig'''
hci0: Type: Primary Bus: '''<ol start="8" span style="list-style-typecolor: decimal;#FF0000"><li><p>w25q64模块的MANUFACTURER ID为EFh,Device ID为4017h,跟上面读取到的值是对应的(h代表是16进制)USB</pspan>'''<p>[[File::BD Address: 00:13:EF:F4:58:AE ACL MTU: 820:8 SCO MTU: 255:media/image440.png|374x126px]]</p></li></ol>16
<span id="pin的pwm测试"></span>=== 40pin的PWM测试 ===::DOWN
<ol style="list-style-type: decimal;"><li><p>Android默认开启了'''PWM11''',对应的引脚在40pin的所在位置如下图所示</p><p>[[File:media/image441.png|334x107px]]</p></li><li><p>首先点击wiringOP图标打开wiringOP APP</p><p>[[FileRX bytes:media/image421.png|576x210px]]</p></li><li><p>然后在wiringOP的主界面点击'''PWM_TEST'''按钮进入PWM的测试界面</p><p>[[File1252 acl:media/image442.png|575x150px]]</p></li><li><p>PWM11对应的基地址是'''fe6f0030''',这里pwmchip0右边显示是'''fdd70020.pwm''', 这时需要点击下拉选项选择其它的pwmchip,直到右边显示'''febf0030.pwm'''为止</p><p>[[File0 sco:media/image443.png|576x178px]]</p></li><li><p>当下拉选项选择'''pwmchip3'''时,右边对应的就是PWM11对应的基地址'''fe6f0030'''</p><p>[[File0 events:media/image444.png|574x161px]]</p></li><li><p>然后确认PWM的通道,默认是0通道,并确认PWM的周期,默认的配置是'''50000ns''',转换为PWM频率是'''20KHz''',可自行修改,点击'''EXPORT'''按钮导出'''PWM11'''</p><p>[[File125 errors:media/image445.png|575x160px]]</p></li><li><p>然后拖动下面的拖动条,就可以改变PWM的占空比,然后勾选Enable就可以输出PWM波形了</p></li></ol>0
[[File:media:TX bytes:23307 acl:0 sco:0 commands:125 errors:0|}</image446ol><ol start="7" style="list-style-type: decimal;"><li>Bluetooth icons can also be seen on the desktop.png|575x167px]]At this time, Bluetooth has not been turned on, so a red '''<span style="color:#FF0000">x</span>''' will be displayed</li>
[[File:pi3b-img243.png]]
</ol>
<ol start="8" style="list-style-type: decimal;">
<li>然后使用示波器测量开发板40pin中的第32号引脚就可以看到下面的波形了Click '''Turn Bluetooth On''' to turn on Bluetooth</li></ol>
[[File:media/image447pi3b-img244.png|460x276px]]</ol><ol start="9" style="list-style-type: decimal;"><li>The display after turning on Bluetooth is as follows</li>
[[File:pi3b-img245.png]]</ol><span idol start="adb的使用方法10" style="list-style-type: decimal;"><li>Please refer to the [[Orange Pi 3B#How to use Bluetooth|'''Bluetooth use chapter''']] for the Bluetooth test method. I won't go into details here</spanli></ol>== ADB的使用方法 ==
<span id=== 使用网络连接adb调试 ==="usb-camera-test"></span>
'''使用网络adb无需数据线来连接电脑和开发板,而是通过网络来通信,所以首先请确保开发板的有线或者无线网络已经连接好了,然后获取开发板的IP地址,后面要用到。'''=== USB Camera Test ===
<ol style="list-style-type: decimal;"><li><p>确保Android系统的'''service.adb.tcp.port'''设置为5555端口号</p><p>console:/ # '''getprop | grep &quot;adb.tcp&quot;'''</p><p>[service.adb.tcp.port]: ['''5555''']</p></li><li><p>如果'''service.adb.tcp.First, you need to prepare a USB camera that supports UVC protocol as shown in the figure below or similar, and then insert the USB camera into the USB port'''没有设置,可以使用下面的命令设置网络adb的端口号</p></li></ol>of the Orange Pi development board
console:/ # '''setprop service.adb.tcp:[[File:pi3b-img13.port 5555'''png]]
console<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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''stop adbdv4l2-ctl --list-devices'''
consoleQ8 HD Webcam:/ # Q8 HD Webcam ('''start adbd<span style="color:#FF0000">usb</span>'''-fc880000.usb-1):
:'''<ol start="3" span style="list-style-typecolor: decimal;blue"><li><p>在Ubuntu PC上安装adb工具</p><p>test@test:~$ '''sudo apt update'''</p><p>test@test:~$ '''sudo apt install -y adb'''</p><dev/li><li><p>然后在Ubuntu PC上连接网络adbvideo0</pspan><p>test@test:~$ '''adb connect 192.168.1.xxx''' '''(IP地址需要修改为开发板的IP地址)'''</p><p>* daemon not running; starting now at tcp:5037</p><p>* daemon started successfully</p><p>connected to 192.168.1.xxx:5555</p><p>test@test:~$ '''adb devices'''</p><p>List of devices attached</p><p>192.168.1.xxx:5555 device</p></li><li><p>然后在Ubuntu PC上通过adb shell就可以登录到android系统</p></li></ol>
test@test:~$ '''adb shell'''/dev/video1
console:/ dev/media0|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that the l in v4l2 is a lowercase letter l, not the number 1.'''  '''In addition, the serial number of the video is not necessarily video0, please refer to what you actually see.'''</big>|}</ol><ol start="3" style="list-style-type: decimal;"><li>In the desktop system, Cheese can be used to directly open the USB camera. The method of opening Cheese is shown in the figure below:</li> [[File:pi3b-img246.png]]
= 附录 =The interface after Cheese turns on the USB camera is shown in the figure below:
[[File:pi3b-img247.png]]</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo''' '''apt update'''
orangepi@orangepi:~$ '''sudo apt-get install -y fswebcam'''|}</ol><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: none;"><li><p>a) -d The option is used to specify the device node of the USB camera</p></li><li><p>b) --no-banner Used to remove the watermark of photos</p></li><li><p>c) -r The option is used to specify the resolution of the photo</p></li><li><p>d) -S The option is used to set the number of previous frames to skip</p></li><li><p>e) ./image.jpg The name and path for setting the generated photos</p></li>{| class="wikitable" style="width:800px;"
|-
| style="textorangepi@orangepi:~$ '''sudo''' '''fswebcam -align: left;"| d /dev/video0 \''' '''版本--no-banner -r 1280x720 -S 5 ./image.jpg'''| }</ol></li></ol><ol start="3" style="textlist-style-aligntype: leftlower-alpha;"| '''日期'''><li>In the desktop version of the Linux system, you can directly view the captured pictures through the HDMI display</li>{| class="wikitable" style="text-alignwidth: left800px;"| '''更新说明'''
|-
| style="text-alignorangepi@orangepi:~$ '''scp image.jpg''' [mailto: left;"| v0test@192.168.1| style="text-align.55: left;"| 2023-07-19| style="text-align/home/test test@192.168.1.55: left;"| 初始版本/home/test] '''(Modify the IP address and path according to the actual situation)'''
|}
</ol>
<ol start="4" style="list-style-type: lower-alpha;">
<li>In the desktop version of the Linux system, you can directly view the captured pictures through the HDMI display</li></ol>
</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]] <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> <div class="wikitablefigure"> [[File:pi3b-img249.png]] </div></ol><ol start="3" style="list-style-type: decimal;"><li>Then select the audio.wav file, right click and select open with vlc to start playing</li>|[[File:pi3b-img250.png]]| </ol><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> [[File:pi3b-img251.png]]</ol><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>| '''更新说明'''|[[File:pi3b-img252.png]]| 2023</ol></li></ol><span id="how-07to-19| Orangepi3 b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.7zplay-audio-with-commands"></span>
Orange pi3b_1.0.0_ubuntu_jammy_desktop_xfce_linux5.10.160.7z=== How to play audio with commands ===
Orange pi3b_1.0.0_ubuntu_focal_desktop_xfce_linux5.10.160.7z<span id="headphone-interface-play-audio-test"></span>==== Headphone interface play audio test ====
OrangePi3B_RK3566_Android11_v1.0.0.tar.gz# First insert the headset into the headphone jack of the development board
::[[File:pi3b-img253.png]] <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> {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''aplay -l''' <p>**** List of PLAYBACK Hardware Devices ****</p> '''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><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> {| class="wikitable" style="width:800px;" |-| 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|}</ol><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''' ::{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''aplay -l''' <p>**** List of PLAYBACK Hardware Devices ****</p> 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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''aplay -D hw:<span style="color:#FF0000">1</span>,0 /usr/share/sounds/alsa/audio.wav'''|}</ol><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 ::{| class="wikitable" style="width:800px;" |-| 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 to view the system temperature sensor is:  ::{| class="wikitable" style="width:800px;" |-| 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 to view the current temperature of the nvme ssd solid state drive is:</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo smartctl -a /dev/nvme0 | grep &quot;Temperature:&quot;'''</p><p>Temperature: '''<span style="color:#FF0000">40 Celsius</span>'''</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]] </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> [[File:pi3b-img255-1.png]]</ol><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> [[File:pi3b-img256-1.png]]</ol><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> [[File:pi3b-img257-1.png]]</ol></li></ol><ol start="3" style="list-style-type: decimal;"><li>There are a total of '''<span style="color:#FF0000">28</span>''' GPIO ports in the 40pin interface. The voltage of all GPIO ports is '''<span style="color:#FF0000">3.3v</span>'''</li></ol> <span id="how-to-install-wiringop"></span> == How to install wiringOP == {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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:''' '''<span style="color:blue">orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb</span>'''  '''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.'''</big> <div class="figure"> [[File:pi3b-img258-1.png]] </div><big>'''wiringOP is currently mainly adapted to the functions of setting GPIO port input and output, setting GPIO port output high and low levels, and setting up and down pull-down resistors. Functions such as hardware PWM are not available.'''</big>|} # Download the code of wiringOP ::{| class="wikitable" style="width:800px;" |-| 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'''|} ::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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'''</big>|} <ol start="2" style="list-style-type: decimal;"><li>Compile and install wiringOP</li> {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''cd wiringOP''' orangepi@orangepi:~/wiringOP$ '''sudo ./build clean''' orangepi@orangepi:~/wiringOP$ '''sudo ./build'''|}</ol><ol start="3" style="list-style-type: decimal;"><li>Test the output of the GPIO Readall command as follows</li> <div class="figure"> [[File:pi3b-img258-1.png]] </div></ol><span id="pin-interface-gpio-i2c-uart-spi-and-pwm-test"></span> == 40Pin interface GPIO, I2C, UART, SPI, and PWM test == {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big> orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' '''<span style="color:#FF0000">overlays=spi3-m0-cs0-spidev i2c2-m1 i2c3-m0 uart7-m2 uart9-m2 pwm11-m1</span>'''|} <span id="pin-gpio-port-test"></span>=== 40pin GPIO port test === {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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: '''</big> orangepi@orangepi3b:~$ '''sudo blink_all_gpio''' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Remember to add Sudo permissions [sudo] password for orangepi: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #You need to enter password here'''|} # 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_C3——the corresponding wPi serial number is 2—as an example to demonstrate how to set the high and low levels of the GPIO port  ::[[File:pi3b-img259-1.png]] <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> {| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">2</span> out'''|}</ol><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 level flat is successful</li> {| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio write 2 <span style="color:#FF0000">0</span>'''|} Using GPIO Readall, you can see the value of the No. 7 pin (V) to 0 [[File:pi3b-img260.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>Then set the GPIO port to output a high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means that the high level is set successfully.</li> {| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio write 2 <span style="color:#FF0000">1</span>'''|} Using GPIO Readall, you can see the value of No. 7 pin (v) into 1 [[File:pi3b-img261-1.png]]</ol><ol start="5" style="list-style-type: decimal;"><li>The setting method of other pins is similar, just modify the serial number of wPi to the corresponding serial number of the pin</li></ol> <span id="pin-gpio-port--down-and-downward-pull--down-resistance-setting-method"></span> === 40pin GPIO port pull-down resistance setting method === {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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 '''</big> [[File:pi3b-img262-1.png|center]]|} # 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-1.png]] <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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">5</span> in'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">5</span> up'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio read <span style="color:#FF0000">5</span>''' '''<span style="color:#FF0000">1</span>'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">5</span> down'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio read <span style="color:#FF0000">5</span>''' '''<span style="color:#FF0000">0</span>'''|}</ol><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-1.png]] <ol start="2" style="list-style-type: decimal;"><li><p>In the linux system, the SPI in the 40 pin is closed by default, and it needs to be opened manually before it can be used. The detailed steps are as follows:</p><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add sudo permission</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p>|}</li><li><p>Then select '''System'''</p><p>[[File:pi3b-1.png]]</p></li><li><p>Then select '''Hardware'''</p><p>[[File:pi3b-2.png]]</p></li><li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select the SPI configuration you want to open</p><p>[[File:pi3b-3.png]]</p></li><li><p>Then select '''<Save>''' to save</p><p>[[File:pi3b-4.png]]</p></li><li><p>Then select '''<Back>'''</p><p>[[File:pi3b-5.png]]</p></li><li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p><p>[[File:pi3b-6.png]]</p></li></ol></li></ol> <ol start="3" style="list-style-type: decimal;"><li>After restarting, enter the system to check whether there is a spidev3.0 device node in the Linux system. If it exists, it means that SPI3 has been set up and can be used directly</li> {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''ls /dev/spidev3.0''' /dev/spidev3.0|}</ol><ol start="4" style="list-style-type: decimal;"><li>Do not short-circuit the mosi and miso pins of SPI3, the output result of running spidev_test is as follows, you can see that the data of TX and RX are inconsistent</li> {| class="wikitable" style="width:800px;" |-| 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 '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' 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 '''<span style="color:#FF0000">FF FF FF FF FF FF</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF | ............................….|}</ol><ol start="5" style="list-style-type: decimal;"><li>Then short-circuit the two pins of mosi (pin 19 in the 40pin interface) and miso (pin 21 in the 40pin interface) of SPI3, and then run the output of spidev_test as follows, you can see the sending and receiving same data</li> [[File:pi3b-img265.png]]{| class="wikitable" style="width:800px;" |-| 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 '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' 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 '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.|}</ol><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-1.png]] ::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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'''</big>|} <ol start="2" style="list-style-type: decimal;"><li><p>In the linux system, the I2C bus in the 40 pin is closed by default, and it needs to be opened manually to use it. The detailed steps are as follows:</p><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p>|}</li><li><p>Then select '''System'''</p><p>[[File:pi3b-1.png]]</p></li><li><p>Then select '''Hardware'''</p><p>[[File:pi3b-2.png]]</p></li><li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select the I2C configuration you want to open</p><p>[[File:pi3b-3-2.png]]</p></li><li><p>Then select '''<Save>''' to save</p><p>[[File:pi3b-4.png]]</p></li><li><p>Then select '''<Back>'''</p><p>[[File:pi3b-5.png]]</p></li><li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p><p>[[File:pi3b-6.png]]</p></li></ol></li></ol> <ol start="3" style="list-style-type: decimal;"><li>After starting the Linux system, first confirm that the i2c device node exists under/dev</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~# '''ls /dev/i2c-*''' /dev/i2c-0 &nbsp;&nbsp;&nbsp;&nbsp; '''/dev/i2c-2''' &nbsp;&nbsp;&nbsp;&nbsp; '''/dev/i2c-3''' &nbsp;&nbsp;&nbsp;&nbsp; '''/dev/i2c-4''' &nbsp;&nbsp;&nbsp;&nbsp; /dev/i2c-6|}</ol><ol start="4" style="list-style-type: decimal;"><li>Then connect a i2c device on the i2c pin of the 40Pin connector</li> {| class="wikitable" style="width:800px;text-align: center;"|-||i2c2-m1|i2c3-m0|i2c4-m0|-| Sda Pin|Corresponding to No. 3 pin|Corresponding to No. 27 pin|Corresponding to No. 19 pin|-| Sck Pin|Corresponding to No. 5 pin|Corresponding to No. 28 pin|Corresponding to No. 23 pin|-| Vcc Pin|Corresponding to No. 1 pin|Corresponding to No. 1 pin|Corresponding to No. 1 pin|-| Gnd Pin|Corresponding to No. 6 pin|Corresponding to No. 6 pin|Corresponding to No. 6 pin|}</ol><ol start="5" 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>{| class="wikitable" style="width:800px;" |-| 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]] </div></ol><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-1.png]] ::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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'''</big>|} <ol start="2" style="list-style-type: decimal;"><li><p>In the linux system, the UART in the 40 pins is closed by default, and it needs to be opened manually before it can be used. The detailed steps are as follows:</p><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add sudo permission</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p>|}</li><li><p>Then select '''System'''</p><p>[[File:pi3b-1.png]]</p></li><li><p>Then select '''Hardware'''</p><p>[[File:pi3b-2.png]]</p></li><li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select the UART configuration you want to open</p><p>[[File:pi3b-3-3.png]]</p></li><li><p>Then select '''<Save>''' to save</p><p>[[File:pi3b-4.png]]</p></li><li><p>Then select '''<Back>'''</p><p>[[File:pi3b-5.png]]</p></li><li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p><p>[[File:pi3b-6.png]]</p></li></ol></li></ol> <ol start="3" 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> {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~# '''ls /dev/ttyS*''' /dev/ttyS1 &nbsp;&nbsp;&nbsp;&nbsp; '''/dev/ttyS3 &nbsp;&nbsp;&nbsp;&nbsp; /dev/ttyS7 &nbsp;&nbsp;&nbsp;&nbsp; /dev/ttyS9'''|}</ol><ol start="4" 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> {| class="wikitable" style="width:800px;text-align: center;"|-||uart3|uart7|uart9|-| Tx pin|Corresponding to the 28 pin|Corresponding to the 16 pin|Corresponding to the 29 pin|-| Rx Pin|Corresponding to the 27 pin|Corresponding to the 15 pin|Corresponding to the 22 pin|} [[File:pi3b-img269-1.png]]</ol><ol start="5" 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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>Test UART7</li>{| class="wikitable" style="width:800px;" |-| 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><ol start="3" style="list-style-type: lower-alpha;"><li>Test UART9</li>{| class="wikitable" style="width:800px;" |-| 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|}</ol></li></ol><span id="pwm-test-method"></span> === PWM test method === # From the table below, the pwm11 available for Orange Pi 3B ::[[File:pi3b-img270-1.png]] <ol start="2" style="list-style-type: decimal;"><li><p>In the linux system, the PWM in the 40 pin is turned off by default, and it needs to be turned on manually before it can be used. The detailed steps are as follows:</p><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add sudo permission</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p>|}</li><li><p>Then select '''System'''</p><p>[[File:pi3b-1.png]]</p></li><li><p>Then select '''Hardware'''</p><p>[[File:pi3b-2.png]]</p></li><li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select the PWM configuration you want to open</p><p>[[File:pi3b-3-4.png]]</p></li><li><p>Then select '''<Save>''' to save</p><p>[[File:pi3b-4.png]]</p></li><li><p>Then select '''<Back>'''</p><p>[[File:pi3b-5.png]]</p></li><li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p><p>[[File:pi3b-6.png]]</p></li></ol></li></ol> <ol start="3" style="list-style-type: decimal;"><li>After opening a pwm, there will be an extra pwmchipX in '''/sys/class/pwm/''' (X is a specific number), for example, after opening pwm11, check the pwmchipX under '''/sys/class/pwm/''' one becomes two</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''ls /sys/class/pwm/''' pwmchip0 pwmchip1|}</ol><ol start="4" style="list-style-type: decimal;"><li><p>Which pwmchip above corresponds to pwm11, let's check the output of the '''ls /sys/class/pwm/ -l''' command first, as shown below:</p></li><li><p>Then it can be known from the table below that the base address of the pwm11 register is fe6f0030, and then look at the output of the '''ls /sys/class/pwm/ -l''' command, you can see that pwmchip1 is linked to fe6f0030.pwm, so pwm11 corresponds to pwmchip as pwmchip1</p></li> <div class="figure"> [[File:pi3b-img271.png]] </div></ol><ol start="6" style="list-style-type: decimal;"><li>Then use the following command to make pwm11 output a 50Hz square wave (please switch to the root user first, and then execute the following command)</li>{| class="wikitable" style="width:800px;" |-| 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]] <li>The test method of pwm11 demonstrated above is similar to other pwm test methods.</li></ol><span id="how-to-install-and-use-wiringop-python"></span> == How to install and use wiringOP-Python == {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''wiringOP-Python is the Python language version of wiringOP, which is used to operate the hardware resources of the development board, such as GPIO, I2C, SPI and UART, in the Python program.'''  '''In addition, please note that all the following commands are operated under the root user.'''</big>|} <span id="wiringop-python-installation-method"></span>=== wiringOP-Python installation method === # First install the dependency package ::{| class="wikitable" style="width:800px;" |-| 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>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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'''</big>|}{| class="wikitable" style="width:800px;" |-| 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><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>{| class="wikitable" style="width:800px;" |-| 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><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> {| class="wikitable" style="width:800px;" |-| 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><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''python3'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>Then import the Python module of WiringPi</li>{| class="wikitable" style="width:800px;" |-| &gt;&gt;&gt; '''import wiringpi;'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| &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;|}</ol></li></ol><span id="pin-gpio-port-test-1"></span> === 40pin GPIO port test === {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''wiringOP-Python is the same as wiringOP, you can also determine which GPIO pin to operate by specifying the wPi number, because there is no command to check the wPi number in wiringOP-Python, so you can only check the board wPi number and physical Correspondence between pins.'''</big> <div class="figure"> [[File:pi3b-img258.png|center]] </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]] <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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \''' '''from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \''' '''wiringpi.pinMode(<span style="color:#FF0000">2, GPIO.OUTPUT</span>) ; &quot;'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \''' '''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\''' '''wiringpi.digitalWrite(<span style="color:#FF0000">2, GPIO.LOW</span>)&quot;'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \''' '''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\''' '''wiringpi.digitalWrite(<span style="color:#FF0000">2, GPIO.HIGH</span>)&quot;'''|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''python3'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>Then import the Python module of WiringPi</li>{| class="wikitable" style="width:800px;" |-| &gt;&gt;&gt; '''import wiringpi''' &gt;&gt;&gt; '''from wiringpi import GPIO'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| &gt;&gt;&gt; '''wiringpi.wiringPiSetup()''' 0 &gt;&gt;&gt; '''wiringpi.pinMode(<span style="color:#FF0000">2, GPIO.OUTPUT</span>)'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| &gt;&gt;&gt; '''wiringpi.digitalWrite(2, <span style="color:#FF0000">GPIO.LOW</span>)'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| &gt;&gt;&gt; '''wiringpi.digitalWrite(2, <span style="color:#FF0000">GPIO.HIGH</span>)'''|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP-Python# '''cd examples''' root@orangepi:~/wiringOP-Python/examples# '''ls blink.py''' '''blink.py''' root@orangepi:~/wiringOP-Python/examples'''# python3 blink.py'''|}</ol><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]] ::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>  orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' '''<span style="color:#FF0000">overlays=spi3-m0-cs0-spidev</span>'''|} <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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''ls /dev/spidev3.0''' /dev/spidev3.0|}</ol><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>{| class="wikitable" style="width:800px;" |-| 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 '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' 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 '''<span style="color:#FF0000">FF FF FF FF FF FF</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |.............….||}</ol><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>{| class="wikitable" style="width:800px;" |-| 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 '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' 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 '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…||}</ol><span id="pin-i2c-test-1"></span> === 40pin I2C test === <ol start="1" 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> [[File:pi3b-img266.png]] {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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'''</big>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>  orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' '''<span style="color:#FF0000">overlays=i2c2-m1 i2c3-m0 i2c4-m0</span>'''|}</ol><ol start="2" style="list-style-type: decimal;"><li>After starting the Linux system, first confirm the I2C device node under/dev.</li> {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~# '''ls /dev/i2c-*''' /dev/i2c-0 &nbsp;&nbsp;&nbsp;&nbsp; '''/dev/i2c-2''' &nbsp;&nbsp;&nbsp;&nbsp; '''/dev/i2c-3''' &nbsp;&nbsp;&nbsp;&nbsp; '''/dev/i2c-4''' &nbsp;&nbsp;&nbsp;&nbsp; /dev/i2c-6|}</ol><ol start="3" 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> {| class="wikitable" style="width:800px;text-align: center;"|-||i2c2-m1|i2c3-m0|i2c4-m0|-| Sda Pin|Corresponding to No. 3 pin|Corresponding to No. 27 pin|Corresponding to No. 19 pin|-| Sck Pin|Corresponding to No. 5 pin|Corresponding to No. 28 pin|Corresponding to No. 23 pin|-| Vcc Pin|Corresponding to No. 1 pin|Corresponding to No. 1 pin|Corresponding to No. 1 pin|-| Gnd Pin|Corresponding to No. 6 pin|Corresponding to No. 6 pin|Corresponding to No. 6 pin|} [[File:pi3b-img273.png]]</ol><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>{| class="wikitable" style="width:800px;" |-| 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]] </div></ol><ol start="5" 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>{| class="wikitable" style="width:800px;" |-| 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|}</ol><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]] ::{| class="wikitable" style="width:800px;background-color:#ffffdc;" |-| <big>'''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'''</big>|} ::{| class="wikitable" style="width:800px;background-color:#ffffdc;" |-| <big>'''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'''</big> orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' '''<span style="color:#FF0000">overlays=uart3-m0 uart7-m2 uart9-m2</span>'''|} <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> {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~# '''ls /dev/ttyS*''' /dev/ttyS1 &nbsp;&nbsp;&nbsp;&nbsp; '''/dev/ttyS3 &nbsp;&nbsp;&nbsp;&nbsp; /dev/ttyS7 &nbsp;&nbsp;&nbsp;&nbsp; /dev/ttyS9'''|}</ol><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> {| class="wikitable" style="width:800px;text-align: center;"|-||uart3|uart7|uart9|-| Tx Pin|Corresponding to the 28 pin|Corresponding to the 16 pin|Corresponding to the 29 pin|-| Rx Pin|Corresponding to the 27 pin|Corresponding to the 15 pin|Corresponding to the 7 pin|}</ol><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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>Test UART7</li>{| class="wikitable" style="width:800px;" |-| 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><ol start="3" style="list-style-type: lower-alpha;"><li>Test UART9</li>{| class="wikitable" style="width:800px;" |-| 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|}</ol></li></ol><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> {| class="wikitable" style="width:800px;" |-| 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|}</ol><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. {| class="wikitable" style="width:800px;" |-| 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>{| class="wikitable" style="width:800px;" |-| '''https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balena-etcher-electron_1.7.9+5945ab1f_arm64.deb'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| '''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]] </div></ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo apt install -y \''' '''--fix-broken ./balena-etcher-electron_1.7.9+5945ab1f_arm64.deb'''|}</ol><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> <div class="figure"> [[File:pi3b-img89.png]] </div></ol><ol start="3" style="list-style-type: lower-alpha;"><li>The interface after Balenaetcher is opened is shown below: </li> <div class="figure"> [[File:pi3b-img276.png]] </div></ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~/Desktop$ '''chmod +x balenaEtcher-1.7.9+5945ab1f-arm64.AppImage'''|}</ol><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> [[File:pi3b-img277.png]]</ol></li></ol><span id="the-installation-method-of-the-bt-panel-linux-panel"></span> == The installation method of the Bt-Panel Linux panel == {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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])'''</big>|} # First of all, the size of the'''/tmp''' space is needed. After setting, you need to '''<span style="color:#FF0000">restart the Linux system of the development board</span>''', and the command is shown below:  ::{| class="wikitable" style="width:800px;" |-| 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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''df -h | grep &quot;/tmp&quot;''' tmpfs &nbsp;&nbsp;&nbsp;&nbsp; 2.0G &nbsp;&nbsp;&nbsp;&nbsp; 12K &nbsp;&nbsp;&nbsp;&nbsp; '''<span style="color:#FF0000">2.0G</span>''' &nbsp;&nbsp;&nbsp;&nbsp; 1% /tmp|}</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo install_bt_panel.sh'''|}</ol><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 '''<span style="color:#FF0000">y</span>''' at this time</li>{| class="wikitable" style="width:800px;" |-| +---------------------------------------------------------------------- <p>| Bt-WebPanel FOR CentOS/Ubuntu/Debian</p> +---------------------------------------------------------------------- <p>| Copyright © 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved.</p> +---------------------------------------------------------------------- <p>| The WebPanel URL will be http://SERVER_IP:8888 when installed.</p> +----------------------------------------------------------------------  Do you want to install Bt-Panel to the /www directory now?(y/n): '''<span style="color:#FF0000">y</span>'''|}</ol><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> [[File:pi3b-img278.png|800px]]</ol><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|1200px]]</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> [[File:pi3b-img280.png|1200px]]</ol><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> [[File:pi3b-img281.png|1200px]]</ol><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> [[File:pi3b-img282.png|1200px]]</ol><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> {| class="wikitable" style="width:800px;" |-| 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'''|}</ol><span id="set-the-chinese-environment-and-install-chinese-input-method"></span> == Set the Chinese environment and install Chinese input method == {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|} <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> {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''|}</ol><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> [[File:pi3b-img283.png|1200px]]</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Then set the default '''locale''' as '''zh_CN.UTF-8'''</li> [[File:pi3b-img284.png|1200px]]</ol><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>{| class="wikitable" style="width:800px;" |-| 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></li></ol><ol start="2" style="list-style-type: decimal;"><li>Then open '''Input Method'''</li> [[File:pi3b-img285.png]]</ol><ol start="3" style="list-style-type: decimal;"><li>Then select '''OK'''</li> [[File:pi3b-img286.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>Then select '''Yes'''</li> [[File:pi3b-img287.png]]</ol><ol start="5" style="list-style-type: decimal;"><li>Then select '''fcitx'''</li> [[File:pi3b-img288.png]]</ol><ol start="6" style="list-style-type: decimal;"><li>Then select '''OK'''</li> [[File:pi3b-img289.png]]</ol><ol start="7" style="list-style-type: decimal;"><li><p>'''<span style="color:#FF0000">Then restart the Linux system to make the configuration effective</span>'''</p></li><li><p>Then open '''Fcitx configuration'''</p></li> [[File:pi3b-img290.png]]</ol><ol start="9" style="list-style-type: decimal;"><li>Then click the + of the position shown in the figure below</li> [[File:pi3b-img291.png]]</ol><ol start="10" style="list-style-type: decimal;"><li>Then search '''Google Pinyin''' and click '''OK'''</li> <div class="figure"> [[File:pi3b-img292.png]] </div></ol><ol start="11" style="list-style-type: decimal;"><li>Then put '''Google Pinyin''' to the front</li> [[File:pi3b-img293.png]] [[File:pi3b-img294.png]]</ol><ol start="12" style="list-style-type: decimal;"><li>Then open the '''Geany''' editor to test the Chinese input method</li> [[File:pi3b-img295.png]]</ol><ol start="13" style="list-style-type: decimal;"><li>The Chinese input method test is shown below</li> [[File:pi3b-img296.png]]</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo vim /etc/default/locale''' <p># File generated by update-locale</p> LC_MESSAGES='''<span style="color:#FF0000">zh_CN.UTF-8</span>''' LANG='''<span style="color:#FF0000">zh_CN.UTF-8</span>''' LANGUAGE='''<span style="color:#FF0000">zh_CN.UTF-8</span>'''|}</ol><ol start="16" style="list-style-type: decimal;"><li>Then '''<span style="color:#FF0000">restart the system</span>''' to see the system displayed as Chinese</li> [[File:pi3b-img297.png]]</ol><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]] <ol start="2" style="list-style-type: decimal;"><li>Then find '''Chinese (China)''' option</li> [[File:pi3b-img299.png]]</ol><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> [[File:pi3b-img300.png]] {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that this step is not easy to drag, please try more patiently.'''</big>|}</ol><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> [[File:pi3b-img301.png]]</ol><ol start="5" style="list-style-type: decimal;"><li>Then set the '''Keyboard input method system''' to '''fcitx'''</li> [[File:pi3b-img302.png]]</ol><ol start="6" style="list-style-type: decimal;"><li><p>'''<span style="color:#FF0000">Then restart the Linux system to make the configuration effective</span>'''</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> [[File:pi3b-img303.png]]</ol><ol start="8" style="list-style-type: decimal;"><li>Then you can see that the desktop is displayed as Chinese</li> [[File:pi3b-img304.png]]</ol><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> [[File:pi3b-img305.png]]</ol><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> [[File:pi3b-img306.png]]</ol><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]] <ol start="2" style="list-style-type: decimal;"><li>Then find '''Chinese (China)''' option</li> [[File:pi3b-img307.png]]</ol><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> [[File:pi3b-img308.png]] {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that this step is not easy to drag, please try more patiently.'''</big>|}</ol><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> [[File:pi3b-img309.png]]</ol><ol start="5" style="list-style-type: decimal;"><li><p>'''<span style="color:#FF0000">Then restart the Linux system to make the configuration effective</span>'''</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> [[File:pi3b-img303.png]]</ol><ol start="7" style="list-style-type: decimal;"><li>Then you can see that the desktop is displayed as Chinese</li> [[File:pi3b-img304.png]]</ol><ol start="8" style="list-style-type: decimal;"><li>Then open the Fcitx5 configuration program</li> [[File:pi3b-img310.png]]</ol><ol start="9" style="list-style-type: decimal;"><li>Then choose to use Pinyin input method</li> <div class="figure"> [[File:pi3b-img311.png]] </div></ol><ol start="10" style="list-style-type: decimal;"><li>The interface after the selection is shown below, then click OK</li> [[File:pi3b-img312.png]]</ol><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> [[File:pi3b-img305.png]]</ol><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> [[File:pi3b-img313.png]]</ol><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 == {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Ubuntu Gnome Wayland image does not support Nomachine and VNCs introduced here to remotely log in to the desktop.'''</big>|} <span id="use-nomachine-remote-login"></span>=== Use nomachine remote login === {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Make sure the Ubuntu or Debian system installed on the development board is a <span style="color:#FF0000">desktop version</span>. 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'''</big>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|} <ol style="list-style-type: decimal;"><li><p>First download the nomachine software Linux '''<span style="color:#FF0000">ARM64</span>''' 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>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that this download link may change, please recognize the DEB package of the ARMV8/ARM64 version.'''</big>|}{| class="wikitable" style="width:800px;" |-| [https://www.nomachine.com/download/download&id=112&s=ARM '''https://downloads.nomachine.com/download/?id=118&amp;distro=ARM''']|} [[File:pi3b-img314.png]]</ol><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> [[File:pi3b-img315.png]] First enter the '''remote login software-Nomachine''' folder [[File:pi3b-img316.png]] Then download the ARM64 version of the DEB installation package [[File:pi3b-img317.png]]</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo dpkg -i nomachine_x.x.x_x_arm64_arm64.deb'''|}</ol></li></ol><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>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that this download link may change.'''</big>|}{| class="wikitable" style="width:800px;" |-| '''https://downloads.nomachine.com/download/?id=9'''|} [[File:pi3b-img318.png]]</ol><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> [[File:pi3b-img319.png]]</ol><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> [[File:pi3b-img320.png]]</ol><ol start="6" style="list-style-type: decimal;"><li>Then click '''OK'''</li> [[File:pi3b-img321.png]]</ol><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> <div class="figure"> [[File:pi3b-img322.png]] </div></ol><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]]</p></li></ol> <span id="use-vnc-remote-login"></span> === Use VNC remote login === {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.''' '''<span style="color:#FF0000">Ubuntu 20.04 tests many problems with VNC, please do not use this method.</span>'''</big>|} # First run the '''set_vnc.sh''' script settings, and '''<span style="color:#FF0000">remember to add Sudo permissions</span>''' ::{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo set_vnc.sh''' You will require a password to access your desktops.  Password: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<span style="color:#FF0000">#Set the VNC password here, 8 -bit characters</span>''' Verify: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<span style="color:#FF0000">#Set the VNC password here, 8 -bit characters</span>''' Would you like to enter a view-only password (y/n)? '''<span style="color:#FF0000">n</span>''' 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> <div class="figure"> [[File:pi3b-img324.png]] </div></ol><ol start="2" style="list-style-type: lower-alpha;"><li>Then enter the password of the previously set VNC</li> [[File:pi3b-img325.png]]</ol><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]]</p></li></ol></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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>Write C language of '''Hello_world.c''' program</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.c'''  <p>#include &lt;stdio.h&gt;</p> int main(void) { :printf(&quot;Hello World!\n&quot;);  :return 0; }|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Then compile and run '''hello_world.c'''</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c''' orangepi@orangepi:~$ '''./hello_world''' Hello World!|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>'''hello_world.py''' program in Python language</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.py''' print('Hello World!')|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>The results of running '''hello_world.py''' are shown below</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''python3 hello_world.py''' Hello World!|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>After installation, you can check the version of Java</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''java --version'''|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Edit the '''hello_world.java''' of the Jave version</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.java''' public class hello_world { :public static void main(String[] args) :{ ::System.out.println(&quot;Hello World!&quot;); :} }|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>Then compile and run '''hello_world.java'''</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''javac hello_world.java''' orangepi@orangepi:~$ '''java hello_world''' Hello World!|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>'''hello_world.c''' program to write C language</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.c''' <p>#include &lt;stdio.h&gt;</p>  int main(void) { :printf(&quot;Hello World!\n&quot;);  :return 0; }|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Then compile and run '''hello_world.c'''</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c''' orangepi@orangepi:~$ '''./hello_world''' Hello World!|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>'''hello_world.py''' program in Python language</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.py''' print('Hello World!')|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>The results of running '''hello_world.py''' are shown below</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''python3 hello_world.py''' Hello World!|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>After installation, you can check the version of Java</li>{| class="wikitable" style="width:800px;" |-| 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><ol start="3" style="list-style-type: lower-alpha;"><li>Edit the '''hello_world.java''' of Jave version</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.java''' public class hello_world { :public static void main(String[] args) :{ ::System.out.println(&quot;Hello World!&quot;); :} }|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>Then compile and run '''hello_world.java'''</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''javac hello_world.java''' orangepi@orangepi:~$ '''java hello_world''' Hello World!|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>Write the '''hello_world.c''' program of c language</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.c''' <p>#include &lt;stdio.h&gt;</p>  int main(void) { :printf(&quot;Hello World!\n&quot;);  :return 0; }|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Then compile and run '''hello_world.c'''</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c''' orangepi@orangepi:~$ '''./hello_world''' Hello World!|}</ol></li></ol> <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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>Edit '''hello_world.py''' program in Python language</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.py''' print('Hello World!')|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>The results of running '''hello_world.py''' are shown below</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''python3 hello_world.py''' Hello World!|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo apt install -y openjdk-18-jdk'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>After installation, you can check the version of Java</li>{| class="wikitable" style="width:800px;" |-| 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><ol start="3" style="list-style-type: lower-alpha;"><li>Edit the '''hello_world.java''' of the Jave version</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.java''' public class hello_world { :public static void main(String[] args) :{ ::System.out.println(&quot;Hello World!&quot;); :} }|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>Then compile and run '''hello_world.java'''</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''javac hello_world.java''' orangepi@orangepi:~$ '''java hello_world''' Hello World!|}</ol></li></ol><span id="qt-installation-method"></span> == QT installation method == # Use the following script to install QT5 and QT Creator ::{| class="wikitable" style="width:800px;" |-| 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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''install_qt.sh''' ...... QMake version 3.1 Using Qt version '''<span style="color:#FF0000">5.12.8</span>''' in /usr/lib/aarch64-linux-gnu|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>Ubuntu22.04 comes with QT version '''5.15.3'''</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''install_qt.sh''' ...... QMake version 3.1 Using Qt version '''<span style="color:#FF0000">5.15.3</span>''' in /usr/lib/aarch64-linux-gnu|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Debian11 comes with QT version '''5.15.2'''</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''install_qt.sh''' ...... QMake version 3.1 Using Qt version '''<span style="color:#FF0000">5.15.2</span>''' in /usr/lib/aarch64-linux-gnu|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>Debian12 comes with QT version '''5.15.8'''</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''install_qt.sh''' ...... QMake version 3.1 Using Qt version '''<span style="color:#FF0000">5.15.8</span>''' in /usr/lib/aarch64-linux-gnu|}</ol></li></ol><ol start="3" style="list-style-type: decimal;"><li>Then you can see the QT Creator launch icon in '''Applications'''</li> [[File:pi3b-img327.png]] QT Creator can also be opened using the following command{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''qtcreator'''|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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'''</big>|}</ol><ol start="4" style="list-style-type: decimal;"><li>The interface after QT Creator is opened is as follows</li> [[File:pi3b-img328.png]]</ol><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> [[File:pi3b-img329.png]]</ol><ol start="2" style="list-style-type: lower-alpha;"><li>The default version of QT Creator in '''Ubuntu22.04''' is as follows</li> [[File:pi3b-img330.png]]</ol><ol start="3" style="list-style-type: lower-alpha;"><li>The default version of QT Creator in '''Debian11''' is as follows</li> [[File:pi3b-img331.png]]</ol><ol start="4" style="list-style-type: lower-alpha;"><li>The default version of QT Creator in '''Debian12''' is as follows</li> [[File:pi3b-img332.png]]</ol></li></ol><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> [[File:pi3b-img333.png]]</ol><ol start="2" style="list-style-type: lower-alpha;"><li>Then remove the check box for '''ClangCodeModel'''</li> [[File:pi3b-img334.png]]</ol><ol start="3" style="list-style-type: lower-alpha;"><li><p>'''<span style="color:#FF0000">Restart QT Creator after the Settings are complete</span>'''</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>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Debian12 Please skip this step.'''</big>|} [[File:pi3b-img335.png]] [[File:pi3b-img336.png]]</ol></li></ol><ol start="7" style="list-style-type: decimal;"><li>You can then open a sample code</li> [[File:pi3b-img337.png]]</ol><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> [[File:pi3b-img338.png]]</ol><ol start="9" style="list-style-type: decimal;"><li>Then click '''Configure Project'''</li> [[File:pi3b-img339.png]]</ol><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> [[File:pi3b-img340.png]]</ol><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> [[File:pi3b-img341.png]]</ol><ol start="12" style="list-style-type: decimal;"><li>Reference documents</li>{| class="wikitable" style="width:800px;" |-| '''https://wiki.qt.io/Install_Qt_5_on_Ubuntu''' '''https://download.qt.io/archive/qtcreator''' '''https://download.qt.io/archive/qt'''|}</ol><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|800px]] ::[[File:pi3b-img343.png|800px]] ::{| class="wikitable" style="width:800px;" |-| [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>{| class="wikitable" style="width:800px;" |-| [http://wiki.ros.org/noetic/Installation/Ubuntu '''http://wiki.ros.org/noetic/Installation/Ubuntu''']|}</ol><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 '''<span style="color:#FF0000">Ubuntu20.04 desktop system</span>'''</li>{| class="wikitable" style="width:800px;" |-| http://wiki.ros.org/noetic/Installation|} [[File:pi3b-img344.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>Then use the script below to install ros1</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi3b:~$ '''install_ros.sh ros1'''|}</ol><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>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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'''</big>|}{| class="wikitable" style="width:800px;" |-| 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><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 normally</p></li>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''test_ros.sh'''</p>|}<li><p>After running the '''test_ros.sh''' script, a little turtle as shown in the figure below will pop up</p></li> <div class="figure"> [[File:pi3b-img345.png]] </div></ol><ol start="8" style="list-style-type: decimal;"><li>Then please keep the terminal window just opened at the top</li> <div class="figure"> [[File:pi3b-img346.png]] </div></ol><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> [[File:pi3b-img347.png]]</ol><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]] ::[[File:pi3b-img349.png]] ::{| class="wikitable" style="width:800px;" |-| [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>{| class="wikitable" style="width:800px;" |-| '''docs.ros.org/en/galactic/Installation.html''' '''http://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html'''|}</ol><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 '''<span style="color:#FF0000">Ubuntu20.04 desktop version</span>'''. 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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''install_ros.sh ros2'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| 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><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>{| class="wikitable" style="width:800px;" |-| 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><ol start="7" style="list-style-type: decimal;"><li>Run the following command to open rviz2</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''source /opt/ros/galactic/setup.bash''' orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''|} <div class="figure"> [[File:pi3b-img350.png]] </div></ol><ol start="8" style="list-style-type: decimal;"><li>For the usage of ROS, please refer to the documentation of ROS 2</li>{| class="wikitable" style="width:800px;" |-| '''http://docs.ros.org/en/galactic/Tutorials.html'''|}</ol><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 ::{| class="wikitable" style="width:800px;" |-| 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> {| class="wikitable" style="width:800px;" |-| 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><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> {| class="wikitable" style="width:800px;" |-| 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><ol start="4" style="list-style-type: decimal;"><li>Run the following command to open rviz2</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''source /opt/ros/humble/setup.bash''' orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''|} <div class="figure"> [[File:pi3b-img351.png]] </div></ol><ol start="5" style="list-style-type: decimal;"><li>Reference documents</li>{| class="wikitable" style="width:800px;" |-| '''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''']|}</ol><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/''' ::{| class="wikitable" style="width:800px;" |-| 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>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''The name of the kernel header file deb package needs to be replaced with the actual name, please do not copy it.'''</big>|}{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo dpkg -i /opt/linux-headers-legacy-rockchip-rk356x_1.x.x_arm64.deb'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''ls /usr/src''' linux-headers-5.10.160-rockchip-rk356x|}</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello.c''' <p>#include &lt;linux/init.h&gt;</p> <p>#include &lt;linux/module.h&gt;</p>  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><ol start="2" style="list-style-type: lower-alpha;"><li>Then write the Makefile for compiling the hello kernel module, as follows:</li>{| class="wikitable" style="width:800px;" |-| 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><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>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big> [[File:pi3b-img352.png|center]]|}{| class="wikitable" style="width:800px;" |-| 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><ol start="4" style="list-style-type: lower-alpha;"><li>After compiling, the '''hello.ko''' kernel module will be generated</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''ls *.ko''' hello.ko|}</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo insmod hello.ko'''|}</ol><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> {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''dmesg | grep &quot;Hello&quot;''' [ 2871.893988] '''Hello Orange Pi -- init'''|}</ol><ol start="7" style="list-style-type: lower-alpha;"><li>Use the '''rmmod''' command to uninstall the '''hello.ko''' kernel module</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo rmmod hello''' orangepi@orangepi:~$ '''dmesg | grep &quot;Hello&quot;''' [ 2871.893988] Hello Orange Pi -- init [ 3173.800892] '''Hello Orange Pi -- exit'''|}</ol></li></ol><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> [[File:pi3b-img353.png]]</ol><ol start="2" style="list-style-type: lower-alpha;"><li>15pin MIPI cable</li> [[File:pi3b-img354.png]]</ol></li></ol><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> [[File:pi3b-img355.png]]</ol><ol start="3" style="list-style-type: decimal;"><li>Finally connect to the LCD interface of the Orange Pi 3B development board</li> [[File:pi3b-img356.png]]</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo orangepi-config'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>Then select '''System'''</li> [[File:pi3b-img357.png]]</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Then select '''Hardware'''</li> [[File:pi3b-img358.png]]</ol><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> [[File:pi3b-img359.png]]</ol><ol start="5" style="list-style-type: lower-alpha;"><li>Then select '''&lt;Save&gt;''' to save</li> [[File:pi3b-img360.png]]</ol><ol start="6" style="list-style-type: lower-alpha;"><li>Then select '''&lt;Back&gt;'''</li> [[File:pi3b-img361.png]]</ol><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> [[File:pi3b-img362.png]] {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''The above settings will eventually add the configuration of <span style="color:#FF0000">overlays=raspi-7inch-touchscreen</span> 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 <span style="color:#FF0000">overlays=raspi-7inch-touchscreen</span> is also possible.'''</big>  orangepi@orangepi:~$ '''cat /boot/orangepiEnv.txt | grep "raspi"''' '''<span style="color:#FF0000">overlays=raspi-7inch-touchscreen #Sample configuration</span>'''|}</ol></li></ol><ol start="3" style="list-style-type: decimal;"><li>After startup, you can see the lcd screen display as follows:</li> [[File:pi3b-img363.png]]</ol><span id="the-method-of-server-version-image-rotation-display-direction"></span> === The method of server version image rotation display direction === <ol start="1" style="list-style-type: decimal;"><li><p>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:</p></li> <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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' overlays=lcd1 '''<span style="color:#FF0000">extraargs=cma=64M fbcon=rotate:3</span>'''|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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).'''</big>|}</ol></li></ol><ol start="2" style="list-style-type: decimal;"><li>Then '''<span style="color:#FF0000">restart</span>''' 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]] <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> [[File:pi3b-img365.png]]</ol></li></ol><ol start="3" style="list-style-type: decimal;"><li>Then click '''Apply'''</li> [[File:pi3b-img366.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>Then select '''Keep this configuration'''</li> [[File:pi3b-img367.png]]</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''set_lcd_rotate.sh none'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>'''Left''': rotate left 90 degrees</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''set_lcd_rotate.sh left'''|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>'''Inverted''': Flip up and down, which is equivalent to rotating 180 degrees</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''set_lcd_rotate.sh inverted'''|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>'''Right''': rotate right 90 degrees</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''set_lcd_rotate.sh right'''|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|}</ol></li></ol><ol start="7" style="list-style-type: decimal;"><li>Touch rotation reference</li>{| class="wikitable" style="width:800px;" |-| '''https://wiki.ubuntu.com/X/InputCoordinateTransformation'''|}</ol><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 ::{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim /boot/orangepiEnv.txt''' verbosity=1 '''<span style="color:#FF0000">bootlogo=false</span>'''|} <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> {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim /boot/orangepiEnv.txt''' verbosity=1 '''<span style="color:#FF0000">bootlogo=true</span>'''|}</ol><ol start="4" style="list-style-type: decimal;"><li>The location of the boot logo image in the Linux system is</li>{| class="wikitable" style="width:800px;" |-| '''/usr/share/plymouth/themes/orangepi/watermark.png'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo update-initramfs -u'''|}</ol><span id="how-to-use-the-zfs-file-system"></span> == How to use the ZFS file system == {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''The latest version of Ubuntu20.04, Ubuntu22.04, Debian11 and Debian12 <span style="color:#FF0000">desktop version systems</span> 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.'''</big> orangepi@orangepi:~$ '''lsmod | grep &quot;zfs&quot;''' zfs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2801664 &nbsp;&nbsp;&nbsp; 0 zunicode &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 327680 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs zzstd &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 471040 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs zlua &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 139264 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs zcommon &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 69632 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs znvpair &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 61440 &nbsp;&nbsp;&nbsp; 2 &nbsp; zfs,zcommon zavl &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16384 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs icp &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 221184 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs spl &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 77824 &nbsp;&nbsp;&nbsp; 6 &nbsp; zfs,icp,zzstd,znvpair,zcommon,zavl|} <span id="how-to-install-zfs"></span>=== How to install ZFS === {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|} 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 [[Orange Pi 3B#How to install kernel header files|'''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/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-3B.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]] 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 '''[[Orange Pi 3B#The method of uploading files to the Linux system of the development board|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. {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo apt install ./*.deb'''|} After the installation is complete, use the following command to see the zfs-related kernel modules: {| class="wikitable" style="width:800px;" |-| 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: {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''lsmod | grep "zfs"''' zfs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2801664 &nbsp;&nbsp;&nbsp; 0 zunicode &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 327680 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs zzstd &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 471040 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs zlua &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 139264 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs zcommon &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 69632 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs znvpair &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 61440 &nbsp;&nbsp;&nbsp; 2 &nbsp; zfs,zcommon zavl &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16384 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs icp &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 221184 &nbsp;&nbsp;&nbsp; 1 &nbsp; zfs spl &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 77824 &nbsp;&nbsp;&nbsp; 6 &nbsp; 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. {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo apt install -y zfsutils-linux zfs-dkms'''|} <span id="methods-of-creating-zfs-pools"></span> === Methods of creating ZFS pools === {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|} # 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]] <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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo zpool create -f pool1 /dev/nvme0n1 /dev/sda'''|}</ol><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> [[File:pi3b-img370.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>Then execute '''df -h''' to see that '''pool1''' is mounted to the '''/pool1''' directory</li>{| class="wikitable" style="width:800px;" |-|orangepi@orangepi:~$ '''df -h''' <br> Filesystem &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Size &nbsp;&nbsp;&nbsp; Used Avail Use% Mounted on tmpfs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.6G &nbsp;&nbsp;&nbsp; 18M 1.6G 2% /run <br> /dev/mmcblk0p2 &nbsp;&nbsp;&nbsp; 29G &nbsp;&nbsp;&nbsp; 6.0G 22G 22% / <br> tmpfs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.7G &nbsp;&nbsp;&nbsp; 46M 7.7G 1% /dev/shm <br> tmpfs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.0M &nbsp;&nbsp;&nbsp; 4.0K 5.0M 1% /run/lock <br> tmpfs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.7G &nbsp;&nbsp;&nbsp; 944K 7.7G 1% /tmp <br> /dev/mmcblk0p1 &nbsp;&nbsp;&nbsp; 1022M &nbsp;&nbsp;&nbsp; 115M 908M 12% /boot <br> /dev/zram1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 188M &nbsp;&nbsp;&nbsp; 4.5M 169M 3% /var/log <br> tmpfs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.6G &nbsp;&nbsp;&nbsp; 80K 1.6G 1% /run/user/1000 <br> '''pool1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 489G &nbsp;&nbsp;&nbsp; 9.3M 489G 1% <span style="color:#FF0000">/pool1</span>''' <br>|}</ol><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>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''mount | grep pool1''' pool1 on /pool1 type '''<span style="color:#FF0000">zfs</span>''' (rw,xattr,noacl)|}</ol><ol start="6" style="list-style-type: decimal;"><li>Then we can test copying a file to the ZFS pool</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo cp -v /usr/local/test.mp4 /pool1/''' '/usr/local/test.mp4' -&gt; '/pool1/test.mp4'|}</ol><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::{| class="wikitable" style="width:800px;" |-| 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>{| class="wikitable" style="width:800px;" |-| 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><ol start="3" style="list-style-type: decimal;"><li>Then use the following command to copy 1000 random files of size 1G</li>{| class="wikitable" style="width:800px;" |-| root@orangepi:/pool1$ '''for ((i=0; i&lt;1000; i++)); do sudo cp test.1g $i.test.1g; done'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:/pool1$ '''du -lh''' 1002G|}</ol><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> [[File:pi3b-img371.png]]</ol><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 ::{| class="wikitable" style="width:800px;" |-| 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> [[File:pi3b-img372.png]]</ol><ol start="3" style="list-style-type: decimal;"><li>Then we enable compression in the ZFS pool pool1</li>{| class="wikitable" style="width:800px;" |-| root@orangepi:/pool1$ '''sudo zfs set compression=lz4 pool1'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:/pool1$ '''sudo tar -cf text.tar /var/log/ /etc/'''|}</ol><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> [[File:pi3b-img373.png]]</ol><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. ::{| class="wikitable" style="width:800px;" |-| 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> [[File:pi3b-img374.png]] {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big> [[File:pi3b-img375.png|center]]|}</ol><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> [[File:pi3b-img374.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>The command to restart the Linux system is</li>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo''' '''reboot'''|}</ol><span id="linux-sdkorangepi-build-instructions"></span> = '''Linux SDK——orangepi-build instructions''' = <span id="compilation-system-requirements"></span>== Compilation system requirements == {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|} <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. ::{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''lsb_release -a''' No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: '''<span style="color:#FF0000">22.04</span>''' Codename: jammy|} <ol start="2" style="list-style-type: decimal;"><li>'''<span style="color:#FF0000">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.</span>'''</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. ::{| class="wikitable" style="width:800px;" |-| test@test:~$ '''lsb_release -a''' No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: '''<span style="color:#FF0000">22.04</span>''' 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 '''<span style="color:#FF0000">amd64</span>''' version is:</p></li> {| class="wikitable" style="width:800px;" |-| [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><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> {| class="wikitable" style="width:800px;" |-| '''https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>Note that the Ubuntu version needs to be switched to 22.04</li> [[File:pi3b-img376.png]]</ol><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> {| class="wikitable" style="width:800px;" |-| test@test:~$ '''sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak''' test@test:~$ '''sudo vim /etc/apt/sources.list''' <p># By default, the source image is commented to improve the speed of apt update, you can uncomment it yourself if necessary</p> deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse <p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse</p> deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse <p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse</p> deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse <p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse</p> deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse <p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse</p>  <p># Pre-release software source, not recommended to enable</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>|}</ol><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>{| class="wikitable" style="width:800px;" |-| test@test:~$ '''sudo apt update'''|}</ol><ol start="5" style="list-style-type: lower-alpha;"><li>'''<span style="color:#FF0000">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.</span>'''</li></ol></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: ::{| class="wikitable" style="width:800px;" |-| 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'''|}::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that the Orange Pi 3B development board needs to download the source code of the <span style="color:#FF0000">next</span> branch of orangepi-build. The above git clone command needs to specify the branch of the orangepi-build source code as next.'''</big> <div class="figure"> [[File:pi3b-img377.png|center]] </div>|}::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|} <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> {| class="wikitable" style="width:800px;text-align: center;"|-|'''branch'''|'''u-boot version'''|'''Linux Kernel version'''|-|'''legacy'''|'''u-boot 2017.09'''|'''Linux5.10'''|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|}</ol><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>{| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''ls''' '''build.sh &nbsp;&nbsp;&nbsp;&nbsp; external &nbsp;&nbsp;&nbsp;&nbsp; LICENSE &nbsp;&nbsp;&nbsp;&nbsp; README.md &nbsp;&nbsp;&nbsp;&nbsp; scripts'''|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|}</ol></li></ol><span id="download-the-cross-compilation-toolchain"></span> === Download the cross-compilation toolchain === {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|} # 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]] </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>{| class="wikitable" style="width:800px;" |-| '''https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| 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><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>{| class="wikitable" style="width:800px;" |-| '''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| '''gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu'''|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| '''https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-5.10-rk35xx'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| '''https://github.com/orangepi-xunlong/u-boot-orangepi/tree/v2017.09-rk3588'''|}</ol></li></ol><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>:{| class="wikitable" style="width:800px;" |-| <p>test@test:~/orangepi-build$ '''ls'''</p><p>'''build.sh &nbsp;&nbsp;&nbsp; external &nbsp;&nbsp;&nbsp; kernel &nbsp;&nbsp;&nbsp; LICENSE &nbsp;&nbsp;&nbsp; output &nbsp;&nbsp;&nbsp; README.md &nbsp;&nbsp;&nbsp; scripts &nbsp;&nbsp;&nbsp; toolchains &nbsp;&nbsp;&nbsp; u-boot &nbsp;&nbsp;&nbsp; userpatches'''</p>|}</ol><span id="compile-u-boot"></span> == Compile u-boot == # Run the build.sh script, remember to add sudo permission ::{| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''sudo ./build.sh'''|} <ol start="2" style="list-style-type: decimal;"><li>Select '''U-boot package''', then enter</li> <div class="figure"> [[File:pi3b-img379.png]] </div></ol><ol start="3" style="list-style-type: decimal;"><li>Then select the model of the development board</li> <div class="figure"> [[File:pi3b-img380.png]] </div></ol><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>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Compiling u-boot [ '''v2017.09''' ]|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>The version of the cross-compilation toolchain</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 7.4.1''' ]|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Path to the generated u-boot deb package</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Target directory [ '''orangepi-build/output/debs/u-boot''' ]|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>The package name of the generated u-boot deb package</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] File name [ '''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb''' ]|}</ol><ol start="5" style="list-style-type: lower-alpha;"><li>Compilation time</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Runtime [ '''1 min''' ]|}</ol><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>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=u-boot KERNEL_CONFIGURE=no''' ]|}</ol></li></ol><ol start="5" style="list-style-type: decimal;"><li>View the u-boot deb package generated by compilation</li>{| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''ls output/debs/u-boot/''' linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb|}</ol><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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>The decompressed file is as follows</li>{| class="wikitable" style="width:800px;" |-| 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></li></ol><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> Set the IGNORE_UPDATES variable in userpatches/config-default.conf to &quot;yes&quot; {| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''vim userpatches/config-default.conf''' IGNORE_UPDATES=&quot;'''<span style="color:#FF0000">yes</span>'''&quot;|}</ol><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>{| class="wikitable" style="width:800px;" |-| 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'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''apt purge -y linux-u-boot-orangepi3b-legacy'''|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Install the new u-boot deb package just uploaded</li>{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''dpkg -i''' '''linux-u-boot-legacy-orangepi3b_1.0.0_arm64.deb'''|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>Then run the nand-sata-install script</li>{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''nand-sata-install'''|}</ol><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> [[File:pi3b-img381.png]]</ol><ol start="6" style="list-style-type: lower-alpha;"><li>After pressing the Enter key, a Warning will pop up first</li> [[File:pi3b-img382.png]]</ol><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> [[File:pi3b-img383.png]]</ol><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></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>{| class="wikitable" style="width:800px;" |-| [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><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>{| class="wikitable" style="width:800px;" |-| [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''']|}</ol></li></ol><span id="compile-the-linux-kernel"></span> == Compile the Linux kernel == # Run the build.sh script, remember to add sudo permission ::{| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''sudo ./build.sh'''|} <ol start="2" style="list-style-type: decimal;"><li>Select '''Kernel package''', then enter</li> <div class="figure"> [[File:pi3b-img384.png]] </div></ol><ol start="3" style="list-style-type: decimal;"><li>Then select the model of the development board</li> <div class="figure"> [[File:pi3b-img380.png]] </div></ol><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> [[File:pi3b-img385.png]]</ol><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> [[File:pi3b-img386.png]] <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>{| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''sudo ./build.sh KERNEL_CONFIGURE=no'''|}</ol><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> [[File:pi3b-img387.png]]</ol></ol><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>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Compiling current kernel [ '''5.10.160''' ]|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>The version of the cross-compilation toolchain used</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Compiler version [ '''aarch64-none-linux-gnu-gcc 11.2.1''' ]|}</ol><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>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Using kernel config file [ '''config/kernel/linux-rockchip-rk356x-legacy.config''' ]|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>The path of the deb package related to the kernel generated by compiling</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Target directory [ '''orangepi-build/output/debs/''' ]|}</ol><ol start="5" style="list-style-type: lower-alpha;"><li>The package name of the compiled kernel image deb package</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] File name [ '''linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb''' ]|}</ol><ol start="6" style="list-style-type: lower-alpha;"><li>The time used for compilation</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Runtime [ '''5 min''' ]|}</ol><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>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepi3b BRANCH=legacy BUILD_OPT=kernel KERNEL_CONFIGURE=no''' ]|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| 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></li></ol><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>{| class="wikitable" style="width:800px;" |-| 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><ol start="2" style="list-style-type: lower-alpha;"><li>The decompressed file is as follows</li>{| class="wikitable" style="width:800px;" |-| 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></li></ol><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> Set the IGNORE_UPDATES variable in '''userpatches/config-default.conf''' to &quot;yes&quot; {| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''vim userpatches/config-default.conf''' IGNORE_UPDATES=&quot;'''<span style="color:#FF0000">yes</span>'''&quot;|}</ol><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>{| class="wikitable" style="width:800px;" |-| 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><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''apt purge -y linux-image-legacy-rockchip-rk356x'''|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>Install the deb package of the new Linux kernel just uploaded</li>{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''dpkg -i linux-image-legacy-rockchip-rk356x_1.0.0_arm64.deb'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''reboot'''|}</ol></li></ol><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>{| class="wikitable" style="width:800px;" |-| [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><ol start="2" style="list-style-type: lower-alpha;"><li>The location of the dts file used by the development board is</li>{| class="wikitable" style="width:800px;" |-| [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></li></ol><span id="compile-rootfs"></span> == Compile rootfs == # Run the build.sh script, remember to add sudo permission ::{| class="wikitable" style="width:800px;" |-| 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> <div class="figure"> [[File:pi3b-img388.png]] </div></ol><ol start="3" style="list-style-type: decimal;"><li>Then select the model of the development board</li> <div class="figure"> [[File:pi3b-img380.png]] </div></ol><ol start="4" style="list-style-type: decimal;"><li>Then select the type of rootfs</li> [[File:pi3b-img389.png]]</ol><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> <div class="figure"> [[File:pi3b-img390.png]] </div></ol></li></ol><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> <div class="figure"> [[File:pi3b-img391.png]] </div></ol><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> <div class="figure"> [[File:pi3b-img392.png]] </div>[[File:pi3b-img393.png]] You can then select additional packages that need to be installed. Please press the Enter key to skip directly here. [[File:pi3b-img394.png]]</ol><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>{| class="wikitable" style="width:800px;" |-| [ o.k. ] local not found [ Creating new rootfs cache for '''jammy''']|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>The storage path of the compiled rootfs compressed package</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Target directory [ '''external/cache/rootfs''' ]|}</ol><ol start="3" style="list-style-type: lower-alpha;"><li>The name of the rootfs compressed package generated by compilation</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] File name [ '''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4''' ]|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>The time used for compilation</li>{| class="wikitable" style="width:800px;" |-| [ o.k. ] Runtime [ '''13 min''' ]|}</ol></li></ol><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: none;"><li><p>a) '''jammy''' indicates the type of Linux distribution of rootfs</p></li><li><p>b) '''xfce''' means rootfs is the type of desktop version, if it is '''cli''', it means the type of server version</p></li><li><p>c) '''arm64''' represents the architecture type of rootfs</p></li><li><p>d) '''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>{| class="wikitable" style="width:800px;" |-| 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></li></ol><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 ::{| class="wikitable" style="width:800px;" |-| 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> <div class="figure"> [[File:pi3b-img395.png]] </div></ol><ol start="3" style="list-style-type: decimal;"><li>Then select the model of the development board</li> <div class="figure"> [[File:pi3b-img380.png]] </div></ol><ol start="4" style="list-style-type: decimal;"><li>Then select the type of rootfs</li> [[File:pi3b-img389.png]]</ol><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> <div class="figure"> [[File:pi3b-img390.png]] </div></ol></li></ol><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> <div class="figure"> [[File:pi3b-img391.png]] </div></ol><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> <div class="figure"> [[File:pi3b-img392.png]] </div>[[File:pi3b-img393.png]] You can then select additional packages that need to be installed. Please press the Enter key to skip directly here. [[File:pi3b-img394.png]]</ol><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><ol style="list-style-type: lower-alpha;"><li><p>Initialize the compilation environment of Ubuntu PC and install the software packages required for the compilation process</p></li><li><p>Download the source code of u-boot and Linux kernel (if cached, only update the code)</p></li><li><p>Compile u-boot source code and generate u-boot deb package</p></li><li><p>Compile the Linux source code and generate Linux-related deb packages</p></li><li><p>Make the deb package of Linux firmware</p></li><li><p>Make the deb package of the orangepi-config tool</p></li><li><p>Create a deb package supported by the board</p></li><li><p>If you are compiling the desktop image, you will also create desktop-related deb packages</p></li><li><p>Check whether the rootfs has been cached, if not, recreate the rootfs, if it has been cached, directly decompress and use</p></li><li><p>Install the previously generated deb package into rootfs</p></li><li><p>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></li><li><p>Then make an image file and format the partition, the default type is ext4</p></li><li><p>Then copy the configured rootfs to the mirrored partition</p></li><li><p>Then update initramfs</p></li><li><p>Finally, write the bin file of u-boot into the image through the dd command</p></li></ol></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>{| class="wikitable" style="width:800px;" |-| [ 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><ol start="2" style="list-style-type: lower-alpha;"><li>Compilation time</li>{| class="wikitable" style="width:800px;" |-| '''[ o.k. ] Runtime [ 19 min ]'''|}</ol><ol start="3" 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>{| class="wikitable" style="width:800px;" |-| [ 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''' ]|}</ol></li></ol><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="width:800px;text-align: center;"|-|'''Android version'''|'''Kernel version'''|-|'''Android 11'''|'''Linux4.19'''|} <span id="android-function-adaptation"></span> == Android Function Adaptation == {| class="wikitable" style="width:800px;text-align: center;"|-|'''Functions'''|'''Android 11'''|-|'''USB2.0x3'''|'''OK'''|-|'''USB3.0x1'''|'''OK'''|-|'''M.2 NVMe SSD boot'''|'''OK'''|-|'''WIFI'''|'''OK'''|-|'''Bluetooth'''|'''OK'''|-|'''GPIO(40pin)'''|'''OK'''|-|'''UART(40pin)'''|'''OK'''|-|'''SPI(40pin)'''|'''OK'''|-|'''I2C(40pin)'''|'''OK'''|-|'''PWM(40pin)'''|'''OK'''|-|'''PWM fan interface'''|'''OK'''|-|'''3pin Debugging serial port'''|'''OK'''|-|'''EMMC'''|'''OK'''|-|'''TF card boot'''|'''OK'''|-|'''HDMI video'''|'''OK'''|-|'''HDMI Audio'''|'''OK'''|-|'''LCD'''|'''OK'''|-|'''eDP display'''|'''OK'''|-|'''Gigabit network port'''|'''OK'''|-|'''Network port status indicator'''|'''OK'''|-|'''Headphone playback'''|'''OK'''|-|'''Headphone recording'''|'''OK'''|-|'''LED Light'''|'''OK'''|-|'''GPU'''|'''OK'''|-|'''NPU'''|'''OK'''|-|'''VPU'''|'''OK'''|-|'''RTC'''|'''OK'''|} <span id="wifi-connection-test-method"></span> == WIFI connection test method == # First click enter '''Setting''' ::[[File:pi3b-img396.png]] <ol start="2" style="list-style-type: decimal;"><li>Then select '''Network &amp; internet'''</li> [[File:pi3b-img397.png]]</ol><ol start="3" style="list-style-type: decimal;"><li>Then select '''Wi-Fi'''</li> [[File:pi3b-img398.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>Then turn on the '''Wi-Fi''' switch</li> [[File:pi3b-img399.png]]</ol><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> [[File:pi3b-img400.png]]</ol><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> [[File:pi3b-img401.png]]</ol><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> [[File:pi3b-img402.png]]</ol><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> [[File:pi3b-img403.png]]</ol><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]] <ol start="3" style="list-style-type: decimal;"><li>Then select '''Network &amp; internet'''</li> [[File:pi3b-img397.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>Then select '''Hotspot &amp; tethering'''</li> [[File:pi3b-img404.png]]</ol><ol start="5" style="list-style-type: decimal;"><li>Then select '''Wi-Fi hotspot'''</li> [[File:pi3b-img405.png]]</ol><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 (<span style="color:blue">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</span>)</li> [[File:pi3b-img406.png]]</ol><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> [[File:pi3b-img407.png]]</ol><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> [[File:pi3b-img408.png]]</ol><span id="bluetooth-test-method"></span> == Bluetooth test method == # First click enter '''Setting''' ::[[File:pi3b-img396.png]] <ol start="2" style="list-style-type: decimal;"><li>Then select '''Connected devices'''</li> [[File:pi3b-img409.png]]</ol><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> [[File:pi3b-img410.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>The searched Bluetooth devices will be displayed under '''Available devices'''</li> [[File:pi3b-img411.png]]</ol><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> [[File:pi3b-img412.png]]</ol><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> [[File:pi3b-img413.png]]</ol><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> [[File:pi3b-img414.png]]</ol><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> [[File:pi3b-img415.png]]</ol><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> [[File:pi3b-img416.png]]</ol><span id="how-to-use-raspberry-pi-5-inch-screen"></span> == How to use Raspberry Pi 5-inch screen == {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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'''</big>|} # The screen needs to be assembled first, please refer to [[Orange Pi 3B#Use of the Raspberry PI's 5-inch screen|'''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]] <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]] <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> [[File:pi3b-img419.png]]</ol><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> [[File:pi3b-img420.png]]</ol><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> [[File:pi3b-img421.png]]</ol><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> [[File:pi3b-img422.png]]</ol><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> [[File:pi3b-img423.png]]</ol><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> [[File:pi3b-img424.png]]</ol><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> [[File:pi3b-img425.png]]</ol><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]] <ol start="2" style="list-style-type: decimal;"><li>First click on the wiringOP icon to open the wiringOP APP</li> [[File:pi3b-img418.png]]</ol><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> [[File:pi3b-img426.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>The serial port test interface of the APP is shown in the figure below</li> [[File:pi3b-img427.png]]</ol><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> [[File:pi3b-img428.png]]</ol><ol start="6" style="list-style-type: decimal;"><li>Then use Dupont wire to short the RXD and TXD pins of uart7</li> [[File:pi3b-img429.png]]</ol><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> [[File:pi3b-img430.png]]</ol><ol start="8" style="list-style-type: decimal;"><li>If everything is normal, the received string will be displayed in the receiving box</li> [[File:pi3b-img431.png]]</ol><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]] <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> [[File:pi3b-img432.png]]</ol><ol start="3" style="list-style-type: decimal;"><li>Then click the wiringOP icon to open the wiringOP APP</li> [[File:pi3b-img418.png]]</ol><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> [[File:pi3b-img433.png]]</ol><ol start="5" style="list-style-type: decimal;"><li>Then click the '''OPEN''' button to initialize the SPI</li> [[File:pi3b-img434.png]]</ol><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> [[File:pi3b-img435.png]]</ol><ol start="7" style="list-style-type: decimal;"><li>Finally, the APP will display the read ID information</li> [[File:pi3b-img436.png]]</ol><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> [[File:pi3b-img437.png]]</ol><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]] <ol start="2" style="list-style-type: decimal;"><li>First click on the wiringOP icon to open the wiringOP APP</li> [[File:pi3b-img418.png]]</ol><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> [[File:pi3b-img439.png]]</ol><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> [[File:pi3b-img440.png]]</ol><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> [[File:pi3b-img441.png]]</ol><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> [[File:pi3b-img442.png]]</ol><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> [[File:pi3b-img443.png]]</ol><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> [[File:pi3b-img444.png]]</ol><span id="how-to-use-adb"></span> == How to use ADB == <span id="use-network-connection-adb-debugging"></span>=== Use network connection adb debugging === {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|} # Make sure that the '''service.adb.tcp.port''' of the Android system is set to port number 5555 ::{| class="wikitable" style="width:800px;" |-| 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> {| class="wikitable" style="width:800px;" |-| console:/ # '''setprop service.adb.tcp.port 5555''' console:/ # '''stop adbd''' console:/ # '''start adbd'''|}</ol><ol start="3" style="list-style-type: decimal;"><li>Install adb tool on Ubuntu PC</li> {| class="wikitable" style="width:800px;" |-| test@test:~$ '''sudo apt update''' test@test:~$ '''sudo apt install -y adb'''|}</ol><ol start="4" style="list-style-type: decimal;"><li>Then connect network adb on Ubuntu PC</li> {| class="wikitable" style="width:800px;" |-| test@test:~$ '''adb connect 192.168.1.xxx''' '''(The IP address needs to be changed to the IP address of the development board)''' <p>* daemon not running; starting now at tcp:5037</p> <p>* daemon started successfully</p> connected to 192.168.1.xxx:5555  test@test:~$ '''adb devices''' List of devices attached 192.168.1.xxx:5555 device|}</ol><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> {| class="wikitable" style="width:800px;" |-| test@test:~$ '''adb shell''' console:/ #|}</ol><span id="appendix"></span> = '''Appendix''' = <span id="user-manual-update-history"></span>== User Manual Update History == {| class="wikitable" style="width:800px;text-align: center;"|-|'''Version'''|'''Date'''|'''Update Notes'''|-|v0.1|2023-07-19|initial version|} <span id="image-update-history"></span>== Image Update History == {| class="wikitable" style="width:800px;"|-| style="text-align: center;" | '''Date'''| style="text-align: center;" | '''Update Notes'''|-| style="text-align: center;" | 2023-07-19|Orangepi3b_1.0.0_debian_bullseye_desktop_xfce_linux5.10.160.7z Orangepi3b_1.0.0_ubuntu_jammy_desktop_xfce_linux5.10.160.7z Orangepi3b_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_spiOrangePi3B_RK3566_Android11_lcd_spi-nvme_v1.0.0.tar.gz 
<p>* 初始版本initial version</p>
|}