8,367
edits
Changes
→Interface details of Orange Pi 3B
<span id="basic-features-of-orange-pi-3b"></span>= '''Basic features of Orange Pi 3B'''=
[[\lFile:pi3b-img3.png|2.12.1. 调试串口的连接说明 [108](#调试串口的连接说明)800px]]
[[\lFile:pi3b-img4.png|2.13. 使用开发板40pin接口中的5v引脚供电说明 [116](#使用开发板40pin接口中的5v引脚供电说明)800px]]
[[\lFile:pi3b-img5-1.png|3.2. Linux系统适配情况 [117](#_Toc10533)800px]]
[[\lFile:pi3b-img6.png|3.3. 本手册Linux命令格式说明 [118](#本手册linux命令格式说明)800px]]
::[[\l|3File:pi3b-img7.4.5. Linux桌面版系统禁用桌面的方法 [122](#linux桌面版系统禁用桌面的方法)png]]
[[\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|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|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|3File:pi3b-img16.9.1. HDMI显示测试 [150](#hdmi显示测试)png]]
[[\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>
::[[\lFile:pi3b-img19.png|3.11.3. USB无线网卡测试 [159](#usb无线网卡测试)800px]]
{| 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>|}
# 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 "'''.img'''" 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|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]]
[[\lFile:pi3b-img23.png|3.16.4. 40pin I2C测试 [181](#pin-i2c测试)center]]
[[\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|3File:pi3b-img25.17.1. wiringOP-Python的安装方法 [186](#wiringop-python的安装方法)png]]
[[\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|3File:pi3b-img28.18. 硬件看门狗测试 [196](#硬件看门狗测试)png]]
::[[\l|3File:pi3b-img16.22.1. Debian系统的安装方法 [202](#debian系统的安装方法)png]]
[[\l|3File:pi3b-img29.23. 远程登录Linux系统桌面的方法 [219](#远程登录linux系统桌面的方法)png]]
[[\l|3File:pi3b-img30.24. Linux系统支持的部分编程语言测试 [225](#linux系统支持的部分编程语言测试)png]]
[[\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 "'''Driver Installation'''" 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 "'''The driver is installed successfully'''", and then click the "'''OK'''" 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 "'''No device found'''"</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.3File:pi3b-img36. Ubuntu22.04安装ROS 2 Humble的方法 [245](#ubuntu22.04安装ros-2-humble的方法)png]]
[[\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 "'''found a MASKROM device'''"</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|3File:pi3b-img40.28.4. 桌面版镜像旋转显示和触摸方向的方法 [254](#桌面版镜像旋转显示和触摸方向的方法)png]]
[[\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|4File:pi3b-img46. Linux SDK——orangepi-build使用说明 [264](#_Toc10484)png]]
[[\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|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.3File:pi3b-img51. 编译u-boot [270](#编译u-boot)png]]
[[\l|5File:pi3b-img52.1. 已支持的Android版本 [285](#已支持的android版本)png]]
[[\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 "'''.img'''" 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 "'''Device'''" column</p></li><li><p>c)]]Finally click "'''Write'''" to start burning</p></li>
[[\l|5File:pi3b-img55.6. 树莓派5寸屏幕的使用方法 [294](#树莓派5寸屏幕的使用方法)png]]
{| 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>|}
::{| class="wikitable" style="width:800px;" |-| [[\l|5https://www.balena.7io/etcher/ '''https://www.4balena. 40pin的PWM测试 [304](#pin的pwm测试)]io/etcher/''']|}
[[\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 "'''.img'''" is the image file of the operating system. The size is generally more than 2GB</li>
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-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图形处理器}
</div>
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
| Wi-Fi+蓝牙| Wi<big>'''Note that the "MiniLoader-Fi 5+BT 5things needed to burn the Linux image" 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 "'''.img'''" 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>
[[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]]
[[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>|}
[[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>
[[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>
|}
::[[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>
orangepi@orangepi:~/Desktop$ '''注意,这里说的Linux镜像具体指的是从[http://www.orangepi.cn/html/serviceAndSupport/index.html Orange Pi资料下载页面]下载的Debian、Ubuntu这样的Linux发行版镜像。ls'''
'''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'''
{| 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'''
<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>首先准备一张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>
<!-- --/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卡的方法 ==
</div>{| class="wikitable" style="background-color:# 首先准备一张16GB或更大容量的TF卡,TF卡的传输速度必须为ffffdc;width:800px;" |-| <big>'''Note that the "MiniLoader-things needed to burn the Linux image" 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 "'''class10.img'''级以上,建议使用闪迪等品牌的TF卡" 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 "'''Driver Installation'''" 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 "'''The driver is installed successfully'''", and then click the "'''OK'''" 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 "'''No device found'''"</spanli>=== 使用RKDevTool烧录Linux镜像到eMMC中的方法 ===
<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 > 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>
[[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中的方法 ===
<!-/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''' > 参数后面是要填写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>
[[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烧录的方法 ===
<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 > 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 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 > 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>
[[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>然后选择'''<Yes>'''The log displayed after burning the Linux image is shown in the figure below</li></ol>
{| 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 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>
[[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 "nvme0n1"'''</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=''' > 参数后面是要填写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>
<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 '''<Yes>'''</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'''
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>
'''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: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 "nvme0n1"'''
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: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: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 > poweroff'''命令关机了。然后请拔出TF卡,再短按电源按键开机,此时就会启动SPIFlash+NVMe > 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/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卡中的方法 ===
<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">
<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>
<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中的方法 ===
<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 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 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>
</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中的方法 ==
<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>
</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 > SSD启动镜像'''文件夹中的镜像进行下载</p><p>[[File:media/image150.png|195x65px]]</p></li><li><p>进入'''SPIFlashto-NVME > 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>
<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 > 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>
</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 ".img" 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 "'''Driver Installation'''" 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 "'''No device found'''"</li>
</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-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>
[[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">
<span id/div></ol><ol start="14" style="ubuntu平台调试串口的使用方法list-style-type: lower-alpha;"><li>Then click the "'''Upgrade Firmware'''" 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 "'''Linux下可以使用的串口调试软件有很多,如putty、minicom等,下面演示putty的使用方法。Firmware'''" button to select the path of the Android image that needs to be burned</li>
<span iddiv class="windows平台调试串口的使用方法figure"></span>=== Windows平台调试串口的使用方法 ===
</li></ol>
<span id="how-to-use-sddisktool-to-burn-android-image-to-tf-card"></span>
<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">
</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>
</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 ".img" 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 "'''Select Removable Disk Device'''" 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 "SD Boot" in "Select Function Mode"</p></li><li><p>Then select the path of the Android image in the "Select to upgrade firmware" column</p></li><li><p>Finally click the "Start Create" button to start burning the Android image to the TF card</p></li>
|-
| 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:~$''' > 提示符表示这个命令是在'''开发板的Linux系统'''中输入的, > 提示符最后的 '''$''' > 表示系统当前用户为普通用户,当执行特权命令时,需要加上'''sudo'''</p></li><li><p>'''root@www.orangepi:~#''' > 提示符表示这个命令是在'''开发板的Linux系统'''中输入的, > 提示符最后的 '''#''' > 表示系统当前用户为root用户,可以执行任何想要执行的命令<.org/html/p><hardWare/li><li><p>'''test@test:~$''' 提示符表示这个命令是在Ubuntu > PC或者Ubuntu虚拟机中输入的,而不是开发板的Linux系统中。提示符最后的 > '''$''' > 表示系统当前用户为普通用户,当执行特权命令时,需要加上'''sudo'''<computerAndMicrocontrollers/p><service-and-support/li><li><p>Orange-Pi-3B.html Orange Pi'''root@test:~#s download page].''' 提示符表示这个命令是在Ubuntu > PC或者Ubuntu虚拟机中输入的,而不是开发板的Linux系统中。提示符最后的 > '''#''' 表示系统当前用户为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 '''"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" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null'''</p></li></ol></li></ol>
<span iddiv class="linux系统登录说明figure"></span>== Linux系统登录说明 ==
[[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 ".img" 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 "'''Driver Installation'''" 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 "'''driver installed successfully'''", and then click the "'''OK'''" button.</spanli>=== 设置Linux系统终端自动登录的方法 ===
[[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 "'''No device found'''"</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>
<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 "'''sudo desktop_login.sh rootfound a MASKROM device'''</p></li><li><p>然后重启系统,就会自动使用root用户登录桌面了"</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>
</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 > trigger'''</p></li><li><p>设置绿灯常亮的命令如下</p><p>root@orangepi[[File:/sys/class/leds/work# '''echo defaultpi3b-on > trigger'''img141.png]]</p></li><li><p>设置绿灯闪烁的命令如下</p><p>root@orangepi:/sys/class/leds/work# '''echo heartbeat > 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 "'''Upgrade Firmware'''" column of the burning tool</li>
[[File:pi3b-img132.png]]</ol><ol start="14" style== 以太网口测试 ==="list-style-type: lower-alpha;"><li>Then click the "'''Firmware'''" 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 "'''不需要其他任何配置Upgrade'''</p></li><li><p>在开发板的Linux系统中查看IP地址的命令如下所示</p><p>orangepi@orangepi:~$ '''ip addr show eth0'''</p><p>2: eth0: <quot;BROADCASTbutton to start burning,MULTICAST,UP,LOWER_UP> 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>
<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>
[[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'".</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<quot;BROADCAST,MULTICAST,UPis the Android image file,LOWER_UP> 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 "'''Select Removable Disk Device'''" 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 "'''ssh远程登录Linux系统Select Removable Disk Device''']]"</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 "'''nmtuiFirmware Upgrade'''</p></li><li><p>输入nmtui命令打开的界面如下所示</p><p>[[File:media/image179.png|345x215px]]</p></li><li><p>选择" in "'''Activate a connectSelect Function Mode'''后回车</p><p>[[File:media/image180.png|349x216px]]"</p></li><li><p>然后就能看到所有搜索到的WIFI热点</p><p>[[File:media/image181.png|360x229px]]</p></li><li><p>选择想要连接的WIFI热点后再使用Tab键将光标定位到Then select the path of the Android firmware in the "'''ActivateSelect Upgrade Firmware'''后回车</p><p>[[File:media/image182.png|366x230px]]" column</p></li><li><p>然后会弹出输入密码的对话框,在Finally click the "'''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: <BROADCAST,MULTICAST,UP,LOWER_UP>quot; 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地址的方法 ===
<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>'''"Wired connection 1"''' > 表示设置以太网口的静态IP地址,如果需要设置WIFI的静态IP地址,请修改为WIFI网络接口对应的名字(通过'''nmcli > con show'''命令可以获取到)</p></li><li><p>'''ipv4.addresses'''后面是要设置的静态IP地址,可以修改为自己想要设置的值</p></li><li><p>'''ipv4.gateway''' 表示网关的地址</p><p>orangepi@orangepi:~$ '''nmcli con mod "Wired connection 1" \'''</p><p>'''ipv4.addresses "192.168.1.110" \'''</p><p>'''ipv4.gateway "192.168.1.1" \'''</p><p>'''ipv4.dns "8.8.8The M.8" \'''</p><p>'''ipv4.method "manual"'''</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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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远程登录开发板 ==
[[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远程登录开发板 ===
</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>
<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>
[[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 "'''如果还不行,请重烧系统试下。driver installed successfully'''", and then click the "'''OK'''" 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 "'''No device found'''"<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 > 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 "'''found a MASKROM device'''"</spanli>== 上传文件到开发板Linux系统中的方法 ==
[[File:pi3b-img39.png]]</ol><span idol start="在ubuntu6" style="list-pc中上传文件到开发板linux系统中的方法style-type: lower-alpha;"><li>Then click the "'''Upgrade Firmware'''" 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 "'''Firmware'''" button to select the Android image to be burned</li>
==== 使用filezilla上传文件的方法 ==Using RKDevTool to clear SPIFlash ==
::[[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 "MiniLoader-things needed to burn the Linux image" 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 "'''Driver Installation'''" 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 "'''driver installed successfully'''", and then click the "'''OK'''" 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 "'''No device found'''"</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>
</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 "'''FileZilla_Server_1.5.1_win64-setup.exefound a MASKROM device'''</p>"</li></ol>
<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>
::{| 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>
'''</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>|}
<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>
: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显示测试 ===
</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>
{| 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>|}
<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>=== 桌面版镜像的测试方法 ===
[[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>
<span iddiv class="连接usb存储设备测试figure"></span>=== 连接USB存储设备测试 ===
<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>
[[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>
{| [[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}
</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>
<span id="rtl8821cu测试supported-linux-image-types-and-kernel-versions"></span>==== RTL8821CU测试 ==Supported Linux image types and kernel versions ==
|}<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 > 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 "\" 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>
== 温度传感器 Linux system login instructions ==
{| class="wikitable" style="width:800px;text-align: center;"|-|'''Account'''|'''Passport'''|-|'''root'''|'''orangepi@'''|-|'''orangepi:~$ '''sensors|'''orangepi'''|}
<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 "Temperature:"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>
<div class="figure">
::[[File:media/image261pi3b-img172.png|575x355px|66AC(IBG%N8L@Y7(1BZPS`N]]
</div>
<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测试 ==
::{| 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口测试 ===
{| 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>
# 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>
<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 iddiv class="pin-i2c测试figure"></span>=== 40pin I2C测试 ===
</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 > 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 > 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 >"| 对应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
: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
|}
'''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>
<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'''。
{| 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>|}
{| 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>|}
<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>
<ol startdiv class="2figure" style="list-style-type: lower-alpha;"><li>然后导入wiringpi的python模块</li></ol>
</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>
:inet '''<span style="color:#FF0000">192.168.1.11</span>'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
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>
<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 "import wiringpi; \'''</p><p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \'''</p><p>'''wiringpi.pinMode(2, GPIO.OUTPUT) ; "'''</p></li><li><p>然后设置GPIO口输出低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功</p><p>root@orangepi:~/wiringOP-Python# '''python3 -c "import wiringpi; \'''</p><p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''</p><p>'''wiringpi.digitalWrite(2, GPIO.LOW)"'''</p></li><li><p>然后设置GPIO口输出高电平,设置完后可以使用万用表测量引脚的电压的数值,如果为3.3v,说明设置高电平成功</p><p>root@orangepi:~/wiringOP-Python# '''python3 -c "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)"'''</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>>>> '''import wiringpi'''</p><p>>>> '''from wiringpi import GPIOthe Linux system through ssh''']]</p></li><li><p>然后设置GPIO口为输出模式,其中'''pinMode'''函数的第一个参数是引脚对应的wPi的序号,第二个参数是GPIO的模式</p><p>>>> '''wiringpi.wiringPiSetup()'''</p><p>0</p><p>>>> '''wiringpi.pinMode(2If the development board is connected to the debugging serial port, GPIO.OUTPUT)'''</p></li><li><p>然后设置GPIO口输出低电平,设置完后可以使用万用表测量引脚的电压的数值,如果为0v,说明设置低电平成功</p><p>>>> '''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>>>> '''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测试 ===
<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">
<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>
</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'''
::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
|}
</ol>
<span id="test-method-of-desktop-image"></span>
[[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芯片的序列号 ==
<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 ====
<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 '''<Automatic>''' 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 '''<Show>'''</spanli>== 宝塔Linux面板的安装方法 ==
[[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/&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 "/tmp"'''</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<OK>''']</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'''<Back>''' 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'''<OK>''', 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'''<Deactivate>''', and press Enter to disable '''Wired connection 1'''</spanli>=== Debian系统的安装方法 ===
[[File:pi3b-img201.png]]</ol><span idol start="16" style="ubuntulist-20.04系统的安装方法style-type: decimal;"><li>Then you can exit nmtui through the'''<Back>''' and '''Quit''' buttons</spanli>=== Ubuntu 20.04系统的安装方法 ===
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''注意,这一步不是很好拖动的,请耐心多试几次。ip addr show eth0'''
: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><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'''
<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>
: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
:inet '''<span idstyle="ubuntu-jammy系统color:#FF0000">192.168.1.110</span>=== Ubuntu Jammy系统 ==='''/32 brd 192.168.1.110 scope global noprefixroute eth0
::valid_lft forever preferred_lft forever|}</ol><span id="ubuntu20.04安装rosssh-remote-1login-noetic的方法development-board"></span>=== Ubuntu20.04安装ROS 1 Noetic的方法 ===
::{| class="wikitable" style="width:800px;" |-| test@test:~$ '''httpsssh [mailto://wikiroot@192.168.1.36 root@192.168.ros1.org/Distributions]xxx''' (Need to be replaced with the IP address of the development board)
</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:'''
root@orangepi:~# '''The read operation timed outreset_ssh.sh'''
<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的方法 ===
<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的方法 ===
<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">
</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">
</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>
<span id="how-to-upload-files-using-filezilla-1"></span>== 服务器版镜像旋转显示方向的方法 == How to upload files using filezilla ====
::{| 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>
<!-- --/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>
</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>
During the installation process, please select '''最新版本的Ubuntu20.04、Ubuntu22.04、Debian11和Debian12桌面版系统中已经预装了zfs,直接使用即可。Decline''' on the following installation interface, and then select '''Next>'''
[[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 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 ===
<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-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>
[[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>
{| 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>|}
<span id="linuxconnect-sdkorangepithe-build使用说明usb-storage-device-test"></span>= Linux SDK——orangepi-build使用说明 =
== 编译系统需求 = Connect the USB storage device test ===
::{| class="wikitable" style="width:800px;"|-|orangepi@orangepi:~$ '''cat /proc/partitions | grep "sd*"'''<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系统编译 ===
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 "sd"'''</p><p>No LSB modules are available.</p><p>Distributor ID: Ubuntu<dev/p><p>Description: Ubuntu 22.04 LTS<sda1 29G 208K 29G 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
::{| 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>
|}
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''目前RK提供的Linux5.10 bsp内核我们定义为legacy分支。如果以后支持主线内核了,就会添加一个current分支。dmesg'''
[[File83.588422] usb 2-1:media/image381Product: 802.png|575x278px|选区_396]]11n WLAN Adapter
[ 83.603894] Bluetooth: hci0: RTL: rom_version status=0 version= 编译u-boot ==1
[[File83.610108] Bluetooth: hci0: RTL:medialoading rtl_bt/image382rtl8723b_config.png|576x132px|选区_238]]bin
[[File83.658494] rtk_btusb:media/image383Realtek Bluetooth USB driver ver 3.1.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]6d45ddf.20220519-142432
[[File:media/image38783.png|575x116px|选区_240]890140]usb 2-1: Vendor: Realtek
[[File:media/image38383.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]890159]usb 2-1: rtl8723bu_parse_efuse: dumping efuse (0x200 bytes):
[ 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'''
::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 && sudo apt install bluez'''
hci0: Type: Primary Bus: '''</div><ol start="3" span style="list-style-typecolor: decimal;#FF0000"><li><p>接着选择开发板的型号USB</p><div class="figure"span>'''
::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>
::{| 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>|}
[[File118.767152] usb 2-1:media/image383New USB device found, idVendor=0bda, idProduct=c811, bcdDevice= 2.png|576x197px|}4$_5F06}}0R4GU8]OVO}4E]]00
[[File118.767199] usb 2-1:media/image393Product: 802.png|576x75px|选区_245]]11ac NIC
[[File:media/image394118.png|569x77px|选区_397]767235]usb 2-1: SerialNumber: 123456
[[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'''
|}
</ol>
<span id="rtl8821cu-test"></span>
# 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 "Realtek"''' 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 ""| '''OK'''|-| style="text-align: leftRealtek""| '''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的连接测试方法 ==''')
<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>
[[File57.242594] usb-storage 2-1:media/image4101.png|313x238px]]0: USB Mass Storage device detected
[[File:media/image41158.png|327x165px]069172]usb 2-1: USB disconnect, device number 2
[ 58.587827] usb 2-1: New USB device strings: Mfr=1, Product= 树莓派5寸屏幕的使用方法 =2, SerialNumber=3
[[File:media/image43058.png|576x324px]664746]Bluetooth: hci0: RTL: cfg_sz 10, total sz 31990
[[File:media/image43159.png|574x166px]265513]usbcore: registered new interface driver rtl8821cu
<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'''
::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 && sudo apt-get install -y bluez'''
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
[[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>
:'''<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>
[[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 ==
::[[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 "Temperature:"'''</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''' #Remember to add Sudo permissions [sudo] password for orangepi: #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 '''/dev/i2c-2''' '''/dev/i2c-3''' '''/dev/i2c-4''' /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 '''/dev/ttyS3 /dev/ttyS7 /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: -> 0 Out: 1: -> 1 Out: 2: -> 2 Out: 3: -> 3 Out: 4: -> 4 Out: 5: -> 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: -> 0 Out: 1: -> 1 Out: 2: -> 2 Out: 3: -> 3 Out: 4: -> 4 Out: 5: -> 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: -> 0 Out: 1: -> 1 Out: 2: -> 2 Out: 3: -> 3 Out: 4: -> 4 Out: 5: -> 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 > /sys/class/pwm/pwmchip1/export''' root@orangepi:~# '''echo 20000000 > /sys/class/pwm/pwmchip1/pwm0/period''' root@orangepi:~# '''echo 1000000 > /sys/class/pwm/pwmchip1/pwm0/duty_cycle''' root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip1/pwm0/enable'''|} [[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 > 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 "import wiringpi; 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.|}</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;" |-| >>> '''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;" |-| >>> '''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) :| >>>|}</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 "import wiringpi; \''' '''from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \''' '''wiringpi.pinMode(<span style="color:#FF0000">2, GPIO.OUTPUT</span>) ; "'''|}</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 "import wiringpi; \''' '''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\''' '''wiringpi.digitalWrite(<span style="color:#FF0000">2, GPIO.LOW</span>)"'''|}</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 "import wiringpi; \''' '''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\''' '''wiringpi.digitalWrite(<span style="color:#FF0000">2, GPIO.HIGH</span>)"'''|}</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;" |-| >>> '''import wiringpi''' >>> '''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;" |-| >>> '''wiringpi.wiringPiSetup()''' 0 >>> '''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;" |-| >>> '''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;" |-| >>> '''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 '''/dev/i2c-2''' '''/dev/i2c-3''' '''/dev/i2c-4''' /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 \''' '''"/dev/i2c-4"''' Thu 2023-01-05 14:57:55 Thu 2023-01-05 14:57:56 Thu 2023-01-05 14:57:57 ^C exit|}</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 '''/dev/ttyS3 /dev/ttyS7 /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 \''' '''"/dev/ttyS3"''' Out: 0: -> 0 Out: 1: -> 1 Out: 2: -> 2 Out: 3: -> 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 \''' '''"/dev/ttyS7"''' Out: 0: -> 0 Out: 1: -> 1 Out: 2: -> 2 Out: 3: -> 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 \''' '''"/dev/ttyS9"''' Out: 0: -> 0 Out: 1: -> 1 Out: 2: -> 2 Out: 3: -> 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/&,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 "/tmp"''' tmpfs 2.0G 12K '''<span style="color:#FF0000">2.0G</span>''' 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 "I have agreed and read" User Agreement ", and then click" Enter the panel " 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 '''<OK>''' 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&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: '''<span style="color:#FF0000">#Set the VNC password here, 8 -bit characters</span>''' Verify: '''<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 <stdio.h></p> int main(void) { :printf("Hello World!\n"); :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 "help", "copyright", "credits" or "license" for more information. >>>|}</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("Hello World!"); :} }|}</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 <stdio.h></p> int main(void) { :printf("Hello World!\n"); :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 "help", "copyright", "credits" or "license" for more information. >>>|}</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("Hello World!"); :} }|}</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 <stdio.h></p> int main(void) { :printf("Hello World!\n"); :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 "help", "copyright", "credits" or "license" for more information. >>>|}</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("Hello World!"); :} }|}</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'''->'''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 "ardent" Skip end-of-life distro "bouncy" Skip end-of-life distro "crystal" Skip end-of-life distro "dashing" Skip end-of-life distro "eloquent" Add distro "foxy" Add distro "galactic" Skip end-of-life distro "groovy" Add distro "humble" Skip end-of-life distro "hydro" Skip end-of-life distro "indigo" Skip end-of-life distro "jade" Skip end-of-life distro "kinetic" Skip end-of-life distro "lunar" Add distro "melodic" Add distro "noetic" Add distro "rolling" updated cache in /home/orangepi/.ros/rosdep/sources.cache|}</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 <command> -h` for more detailed usage. ... ros2 is an extensible command-line tool for ROS 2. optional arguments: :-h, --help show this help message and exit Commands: :action Various action related sub-commands :bag Various rosbag related sub-commands :component Various component related sub-commands :daemon Various daemon related sub-commands :doctor Check ROS setup and other potential issues :interface Show information about ROS interfaces :launch Run a launch file :lifecycle Various lifecycle related sub-commands :multicast Various multicast related sub-commands :node Various node related sub-commands :param Various param related sub-commands :pkg Various package related sub-commands :run Run a package specific executable :security Various security related sub-commands :service Various service related sub-commands :topic Various topic related sub-commands :wtf Use `wtf` as alias to `doctor` :Call `ros2 <command> -h` for more detailed usage.|}</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 <command> -h` for more detailed usage. ... ros2 is an extensible command-line tool for ROS 2. optional arguments: :-h, --help show this help message and exit Commands: :action Various action related sub-commands :bag Various rosbag related sub-commands :component Various component related sub-commands :daemon Various daemon related sub-commands :doctor Check ROS setup and other potential issues :interface Show information about ROS interfaces :launch Run a launch file :lifecycle Various lifecycle related sub-commands :multicast Various multicast related sub-commands :node Various node related sub-commands :param Various param related sub-commands :pkg Various package related sub-commands :run Run a package specific executable :security Various security related sub-commands :service Various service related sub-commands :topic Various topic related sub-commands :wtf Use `wtf` as alias to `doctor` :Call `ros2 <command> -h` for more detailed usage.|}</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 <linux/init.h></p> <p>#include <linux/module.h></p> static int hello_init(void) { :printk("Hello Orange Pi -- init\n"); :return 0; } static void hello_exit(void) { :printk("Hello Orange Pi -- exit\n"); :return; } module_init(hello_init); module_exit(hello_exit); MODULE_LICENSE("GPL");|}</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 "Hello"''' [ 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 "Hello"''' [ 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 '''<Save>''' to save</li> [[File:pi3b-img360.png]]</ol><ol start="6" style="list-style-type: lower-alpha;"><li>Then select '''<Back>'''</li> [[File:pi3b-img361.png]]</ol><ol start="7" style="list-style-type: lower-alpha;"><li>Then select '''<Reboot>''' 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 "TransformationMatrix" "x x x x x x x x x" to /usr/share/X11/xorg.conf.d/40-libinput.conf Where "x x x x x x x x x" 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 "zfs"''' zfs 2801664 0 zunicode 327680 1 zfs zzstd 471040 1 zfs zlua 139264 1 zfs zcommon 69632 1 zfs znvpair 61440 2 zfs,zcommon zavl 16384 1 zfs icp 221184 1 zfs spl 77824 6 zfs,icp,zzstd,znvpair,zcommon,zavl|} <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 2801664 0 zunicode 327680 1 zfs zzstd 471040 1 zfs zlua 139264 1 zfs zcommon 69632 1 zfs znvpair 61440 2 zfs,zcommon zavl 16384 1 zfs icp 221184 1 zfs spl 77824 6 zfs,icp,zzstd,znvpair,zcommon,zavl|} In Debian12, the default version of zfs is 2.1.11, so we can install zfs directly through the following command. Again, please make sure that the system has installed the deb package of the kernel header file before installation. {| 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 Size Used Avail Use% Mounted on tmpfs 1.6G 18M 1.6G 2% /run <br> /dev/mmcblk0p2 29G 6.0G 22G 22% / <br> tmpfs 7.7G 46M 7.7G 1% /dev/shm <br> tmpfs 5.0M 4.0K 5.0M 1% /run/lock <br> tmpfs 7.7G 944K 7.7G 1% /tmp <br> /dev/mmcblk0p1 1022M 115M 908M 12% /boot <br> /dev/zram1 188M 4.5M 169M 3% /var/log <br> tmpfs 1.6G 80K 1.6G 1% /run/user/1000 <br> '''pool1 489G 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' -> '/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<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 external LICENSE README.md 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 external kernel LICENSE output README.md scripts toolchains u-boot 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 "." 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 "yes" {| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''vim userpatches/config-default.conf''' IGNORE_UPDATES="'''<span style="color:#FF0000">yes</span>'''"|}</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 "yes" {| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''vim userpatches/config-default.conf''' IGNORE_UPDATES="'''<span style="color:#FF0000">yes</span>'''"|}</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 & 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 & internet'''</li> [[File:pi3b-img397.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>Then select '''Hotspot & 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 "adb.tcp"''' [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
<p>* 初始版本initial version</p>
|}