Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero 3

1,522 bytes removed, 10:19, 19 July 2023
How to install Debian system
|-
| Onboard storage
| TF micro SD card slot, 16MB SPI Flash
|-
| Ethernet
| WIFI+Bluetooth
|
* AW859A chip, support IEEE 802.11 a/b/g/n/ac, BT5.0
|-
| Video Output
|
* Micro HDMI 2.0a
* TV CVBS output, support PAL/NTSC (via 13pin expansion board)
|-
| Audio output
|
* Micro HDMI output
* 3.5mm audio port (via 13pin expansion board)
|-
|-
| USB 2.0 port
| 3 * USB 2.0 HOST (two of them are through 13pin expansion board)
|-
| 26pin connector
== Prepare the required accessories ==
# TF Micro SD card, a high-speed SanDisk card of class 10 or above with a minimum capacity of 8GB
::[[File:zero3-img7.png]]
|-
|
<big>'''Using other brands of TF micro SD cards (non-SanDisk TF micro SD cards), as shown in the picture below (including but not limited to these cards), some friends have reported that there will be problems during the system startup process, such as the system is stuck halfway through startup, Or the reboot command cannot be used normally, and it was finally resolved after changing the SanDisk TF micro SD card. So if you use a non-SanDisk TF micro SD card and find that there is a problem with the system startup or use, please replace the SanDisk TF micro SD card and then test.'''</big>
<p>[[File:zero3-img8.png|180px]][[File:zero3-img9.png|195px]][[File:zero3-img10.png|198px]][[File:zero3-img11-1.png|190px]]</p>
<p style="text-align: center;">'''Current feedback is that there are some TF micro SD cards that have problems starting on Orange Pi Zero 3'''</p>
<big>'''In addition, the TF micro SD card that can be used normally on other types of development boards does not guarantee that it can be started normally on Orange Pi Zero 3, please pay special attention to this point.'''</big>
|}
<ol start="2" style="list-style-type: decimal;">
<li>TF micro SD card reader, used to read and write TF micro SD card</li>
[[File:zero3-img12.png]]
<li><p>USB to TTL module and DuPont line, when using the serial port debugging function, need USB to TTL module and DuPont line to connect the development board and computer</p></li>
[[File:zero3-img25-1.png]] [[File:zero3-img26.png]]
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
<span id="method-of-burning-linux-image-to-tf-card-based-on-windows-pc"></span>
== Method of burning Linux image to TF micro SD card based on Windows PC ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''Note that the Linux image mentioned here specifically refers to the image of Linux distributions such as Debian or Ubuntu downloaded from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html Orange Pi data download page].'''</big>
|}
=== How to use balenaEtcher to burn Linux image ===
# First prepare a TF micro SD card with a capacity of 8GB or more. The transmission speed of the TF micro SD card must be '''class 10 or above'''. It is recommended to use a TF micro SD card of SanDisk and other brands# Then use the card reader to insert the TF micro SD card into the computer# Download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;.img&quot; is the image file of the operating system. The size is generally more than 1GB
# Then download the burning software of Linux image——'''balenaEtcher,''' the download address is
<big>'''Please select balenaEtcher, right-click, and select Run as administrator.'''</big>
[[File:zero3-img31-1.png|center]]
|}
</ol>
<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 micro SD card</p></li><li><p>Finally click Flash to start burning the Linux image to the TF micro SD card</p>
[[File:zero3-img32.png]]
</li></ol>
</li>
<li><p>The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the TF micro SD card</p></li>
[[File:zero3-img33.png]]
</ol>
<ol start="10" style="list-style-type: decimal;">
<li>After burning the Linux image, balenaEtcher will also verify the image burned to the TF micro SD 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>
[[File:zero3-img34.png]]
</ol>
<ol start="11" style="list-style-type: decimal;">
<li>After successful burning, the display interface of balenaEtcher is as shown in the figure below. If the green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, and then pull out the TF micro SD card and insert it into the TF micro SD card slot of the development board. .</li>
<div class="figure">
<ol style="list-style-type: decimal;">
<li><p>First prepare a TF micro SD card with a capacity of 8GB or more. The transmission speed of the TF micro SD card must be '''class 10 or above'''. It is recommended to use a TF micro SD card of SanDisk and other brands</p></li><li><p>Then use the card reader to insert the TF micro SD card into the computer</p></li><li><p>Then format the TF micro SD card</p>
<ol style="list-style-type: lower-alpha;">
<li>'''SD Card Formatter''' can be used to format the TF micro SD card. The download link is</li>
{| class="wikitable" style="width:800px;"
<ol start="2" style="list-style-type: lower-alpha;">
<li><p>After downloading, unzip and install directly, and then open the software</p></li>
<li><p>If only a TF micro SD card is inserted into the computer, the drive letter of the TF micro SD card will be displayed in the &quot; '''Select card''' &quot; column. If multiple USB storage devices are inserted into the computer, you can select the corresponding drive letter of the TF micro SD card through the drop-down box</p></li>
<div class="figure">
</ol>
<ol start="5" style="list-style-type: lower-alpha;">
<li>After formatting the TF micro SD card, the message shown in the figure below will pop up, click OK</li>
[[File:zero3-img38.png]]
</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.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;.img&quot; is the image file of the operating system. The size is generally more than 1GB</p></li><li><p>Use Win32Diskimager to burn the Linux image to the TF micro SD card</p>
<ol style="list-style-type: lower-alpha;">
<li>The download page of Win32Diskimager is</li>
<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 micro SD card is consistent with that displayed in the &quot;'''Device'''&quot; column</p></li>
<li><p>c) Finally click &quot;'''Write'''&quot; to start burning</p></li>
<div class="figure">
</li></ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>After the image writing is completed, click the &quot;'''Exit'''&quot; button to exit, and then you can pull out the TF micro SD card and insert it into the development board to start</li></ol>
</li></ol>
<span id="method-of-burning-linux-image-to-tf-card-based-on-ubuntu-pc"></span>
== Method of burning Linux image to TF micro SD card based on Ubuntu PC ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''Note that the Linux image mentioned here specifically refers to the image of Linux distributions such as Debian or Ubuntu downloaded from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html Orange Pi data download page], and the Ubuntu PC refers to the personal computer with the Ubuntu system installed.'''</big>
|}
# First prepare a TF micro SD card with a capacity of 8GB or more. The transmission speed of the TF micro SD card must be '''class 10 or above'''. It is recommended to use a TF micro SD card of SanDisk and other brands# Then use the card reader to insert the TF micro SD card into the computer
# Download the balenaEtcher software, the download address is
</ol>
<ol start="6" style="list-style-type: decimal;">
<li>Download the image file compression package of the Linux operating system that you want to burn from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;'''.img'''&quot; is the image file of the operating system. The size is generally above 1GB. The decompression command for the compressed package ending in 7z is as follows:</li>
{| class="wikitable" style="width:800px;"
</ol>
<ol start="7" style="list-style-type: decimal;">
<li>After decompressing the image, you can first use the '''sha256sum -c *.sha''' command to calculate whether the checksum is correct. If the prompt is successful, it means that the downloaded image is correct, and you can safely burn it to the TF micro SD card. '''If it prompts that the checksum does not match''', it means there is a problem with the downloaded image, please try to download again</li>
{| class="wikitable" style="width:800px;"
<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 micro SD card</p></li><li><p>Finally click Flash to start burning the Linux image to the TF micro SD card</p></li>
<div class="figure">
</li></ol>
<ol start="10" style="list-style-type: decimal;">
<li>The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the TF micro SD card</li>
[[File:zero3-img42.png]]
</ol>
<ol start="11" style="list-style-type: decimal;">
<li>After burning the Linux image, balenaEtcher will also verify the image burned into the TF micro SD 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>
[[File:zero3-img43.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 micro SD card and insert it into the TF micro SD card slot of the development board for use</li>
[[File:zero3-img44.png]]
<span id="how-to-burn-android-image-to-tf-card"></span>
== How to burn Android image to TF micro SD card ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''The Android image of the development board can only be burned into the TF micro SD card under the Windows platform using the <span style="color:#FF0000">PhoenixCard</span> software, and the version of the PhoenixCard software must be <span style="color:#FF0000">PhonixCard-4.2.8</span>.'''
'''Please do not use software for burning Linux images, such as Win32Diskimager or balenaEtcher, to burn Android images.'''
'''In addition, the PhoenixCard software does not have versions for Linux and Mac platforms, so it is impossible to burn Android images to TF micro SD cards under Linux and Mac platforms.'''</big>
|}
<ol start="2" style="list-style-type: decimal;">
<li>If not installed '''Microsoft Visual C++ 2008 Redistrbutable - x86''', Using PhoenixCard to format TF micro SD card or burn Android image will prompt the following error</li>
<div class="figure">
</ol>
<ol start="4" style="list-style-type: decimal;">
<li><p>Then prepare a TF micro SD card with 8GB or larger capacity. The transmission speed of the TF micro SD card must be '''class 10 or above'''. It is recommended to use a TF micro SD card of SanDisk and other brands</p></li><li><p>Then use the card reader to insert the TF micro SD card into the computer</p></li>
<li><p>Download the Android image and PhoenixCard programming tool from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''Orange Pi data download page''']. '''<span style="color:#FF0000">Please ensure that the version of the PhonenixCrad tool is PhonixCard-4.2.8.</span>''' Please do not use the PhonixCard software version lower than 4.2.8 to burn the Android image. There may be problems with the Android image flashed by this version of the PhonixCard tool</p></li>
[[File:zero3-img49-1.png]]
</ol>
<ol start="7" style="list-style-type: decimal;">
<li>Then use the decompression software to decompress the compressed package of the downloaded Android image. Among the decompressed files, the file ending with &quot;.img&quot; is the Android image file, and the size is more than 1GB. If you don't know how to decompress the compressed package of the Android image, you can install a [https://yasuo.360.cn/ '''compression software'''] to decompress the image.</li>
 
[[File:zero3-img50.png]]
</ol>
<ol start="8" style="list-style-type: decimal;">
<li>Then use decompression software to decompress '''PhonixCard4.2.8.zip''', this software does not need to be installed, just find PhoenixCard in the decompressed folder and open it</li>
[[File:zero3-img51.png]]
</ol>
<ol start="98" style="list-style-type: decimal;"><li>After opening PhoenixCard, if the TF micro SD card is recognized normally, the drive letter and capacity of the TF micro SD card will be displayed in the middle list. '''<span style="color:#FF0000">Please make sure that the displayed drive letter is consistent with the drive letter of the TF micro SD card you want to burn</span>'''. If there is no display, you can try to unplug the TF micro SD card, or click the &quot;'''Refresh Drive Letter'''&quot; button in PhoenixCard</li>
[[File:zero3-img52-1.png]]
</ol>
<ol start="109" style="list-style-type: decimal;"><li>After confirming the drive letter, format the TF micro SD card first, and click the &quot;'''Recover Card'''&quot; button in PhoenixCard (if the &quot;'''Recover Card'''&quot; button is gray and cannot be pressed, you can first click the &quot;'''Refresh Drive Letter'''&quot; button)</li>
<div class="figure">
|-
|
<big>'''If there is a problem with formatting, please try to unplug and insert the TF micro SD card and then test again. If the problem still exists after re-plugging and inserting the TF micro SD card, you can restart the Windows computer or try another computer.'''</big>
|}
</ol>
<ol start="1110" style="list-style-type: decimal;"><li><p>Then start to write the Android image into the TF micro SD card</p>
<ol style="list-style-type: lower-alpha;">
<li><p>First select the path of the Android image in the &quot;'''Firmware'''&quot; column</p></li>
</ol>
</li></ol>
<ol start="1211" style="list-style-type: decimal;"><li>After burning, the display of PhoenixCard is as shown in the figure below. At this time, click the &quot;'''Close'''&quot; button to exit PhoenixCard, and then you can pull out the TF micro SD card from the computer and insert it into the development board to start</li>
<div class="figure">
|-
|
<big>'''After burning the Android system, the TF micro SD card can only see a 128 MB partition in Windows, and the displayed partition is as shown in the figure below (some computers may pop up more than 20 disk partitions, but only the 128 MB partition can be opened. partition), please note that this is normal, please do not think that the TF micro SD card is burned out. The reason for this is that the Android system has a total of more than 20 partitions, but most of them cannot be recognized normally in the Windows system. At this point, please safely unplug the TF micro SD card and insert it into the development board to start it.'''</big>
[[File:zero3-img56.png|center]]
<big>'''After the Android system starts, use the following command to see the twenty or so partitions in the TF micro SD card:'''</big>
[[File:zero3-img57.png|center]]
<big>'''Use the df -h command to see that the 16GB TF micro SD card has about 11 GB of space available after burning the Android system (more than 20 partitions will not be mounted to the Android system, focus on these to the partition).'''</big>
[[File:zero3-img58.png|center]]
[[File:zero3-img59-1.png]]
There is a tiny linux system programmed into SPI Flash by default, which is mainly used to prove that the development board can start normally. When you get the development board, you don't need to burn the system into the TF micro SD card, you only need to connect the Type-C power supply to the development board to start the micro linux system in the SPI Flash. The main functions of this system are:
<ol style="list-style-type: lower-alpha;">
<p>Due to the limited functions of the tiny linux system in SPI Flash, if you want to use all the functions of the development board normally, please burn the linux image or Android image to the TF micro SD card, and then use it.</p>
<span id="start-the-orange-pi-development-board"></span>
== Start the Orange Pi development board ==
# Insert the TF micro SD card with the burned image into the TF micro SD card slot of the Orange Pi development board
# The development board has a Micro HDMI interface, and the development board can be connected to a TV or HDMI display through a Micro HDMI to HDMI cable
# If you have purchased a 13pin expansion board, you can plug the 13pin expansion board into the 13pin interface of the development board
<div class="figure">
::[[File:zero3-img60-1.png]]
</div>
<li><p>If there is no 13pin expansion board, you can use a 4pin 2.54mm DuPont to USB2.0 female cable to expand the USB interface. The specific method is as follows:</p>
<ol style="list-style-type: lower-alpha;">
<li>First, you need to prepare a 4pin 2.54mm Dupont to USB2.0 female cable (this cable can be bought on TaobaoAmazon, please search and buy by yourself), as shown in the figure below:</li>
[[File:zero3-img75-1.png]] [[File:zero3-img76.png]]
</ol>
<ol start="2" style="list-style-type: lower-alpha;">
|}
After entering the download page of the corresponding development board on [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''the Orange Pi data download page'''], you can see the following download options. In the description below, the Ubuntu image and the Debian image are generally referred to as the Linux image.
[[File:zero3-img80.png]]
| style="text-align: center;"| '''OK'''
|-
| style="text-align: center;"| '''TF micro SD card start'''
| style="text-align: center;"| '''OK'''
| style="text-align: center;"| '''OK'''
</ol>
<ol start="3" style="list-style-type: decimal;">
<li>Then restart the system and a login dialog box will appear, at which point a [[Orange Pi Zero 3#Linux system default login account and password|'''Linux system default login account and password''' ]] is required to enter the system</li>
<div class="figure">
|-
| '''The kernel boots into the system'''
| style="text-align: center;"| '''闪烁flashing'''
| style="text-align: center;"| '''off'''
|-
<big>'''The two LED lights on the development board are controlled by software.'''
'''When you get the development board, you may find that even if the TF micro SD card with the system programmed is not inserted into the development board, the two LED lights will be on after the development board is connected to the power supply. This is because the 16MB on the development board SPI Flash will burn a miniature linux system by default when leaving the factory. This system will light up the red light during the u-boot startup phase. After entering the kernel, it will turn off the red light and set the green light to flash.'''
'''If the linux system in the SPI Flash is cleared, then the two LED lights on the development board will not light up after the power is turned on without inserting the TF micro SD card with the system programmed'''</big>
|}
<ol start="2" style="list-style-type: decimal;">
<li>The method of setting the green light on and /off and flashing is as follows:</li>
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
</ol>
<ol start="3" style="list-style-type: decimal;">
<li>The method of setting the red light on and /off and flashing is as follows:</li>
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
<span id="instructions-for-operating-the-rootfs-partition-capacity-of-the-linux-system-in-the-tf-card"></span>
== Instructions for operating the rootfs partition capacity of the linux system in the TF micro SD card ==
<span id="the-first-startup-will-automatically-expand-the-capacity-of-the-rootfs-partition-in-the-tf-card"></span>
=== The first startup will automatically expand the capacity of the rootfs partition in the TF micro SD card ===
<ol start="1" style="list-style-type: decimal;">
<li>After burning the Linux image of the development board into the TF micro SD card, you can check the capacity usage of the TF micro SD card on the '''<span style="color:#FF0000">Ubuntu computer</span>''', the steps are as follows:
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''Note that this step does not affect the automatic expansion of the Linux system of the development board. Here I just want to explain how to check the capacity of the TF micro SD card after burning the Linux image on the TF micro SD card.'''</big>
|}
</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>After opening gparted, you can select the TF micro SD card in the upper right corner, and then you can see the usage of the TF micro SD card capacity</li>
[[File:zero3-img91.png]]
</ol>
<ol start="4" style="list-style-type: lower-alpha;">
<li>The figure above shows the situation of the TF micro SD card after burning the Linux desktop version system. It can be seen that although the total capacity of the TF micro SD card is 16GB (displayed as 14.84GiB in GParted), the rootfs partition (/dev/ sdc1) actually allocated only 4.05GiB, leaving 10.79GiB unallocated</li></ol>
</li></ol>
<!-- -->
<ol start="2" style="list-style-type: decimal;">
<li><p>Then you can insert the TF micro SD card that has burned the Linux system into the development board to start. When the TF micro SD card starts the Linux system for the first time, it will call the '''orangepi-resize-filesystem''' script automatically through the systemd service '''orangepi-resize-filesystem.service''' The expansion of the rootfs partition, '''<span style="color:#FF0000">so there is no need to manually expand the capacity</span>'''</p></li><li><p>After logging in to the system, you can use the '''df -h''' command to check the size of the rootfs. If it is consistent with the actual capacity of the TF micro SD card, it means that the automatic expansion is running correctly.</p>
{| class="wikitable" style="width:800px;"
</li></ol>
<ol start="4" style="list-style-type: decimal;">
<li>After starting the Linux system for the first time, we can also remove the TF micro SD card from the development board and reinsert it into the '''<span style="color:#FF0000">Ubuntu computer</span>''', and then use gparted to check the status of the TF micro SD card again, as shown in the figure below, the rootfs partition (/dev/ The capacity of sdc1) has been expanded to 14.69GiB</li>
[[File:zero3-img92.png]]
<span id="the-method-of-prohibiting-automatic-expansion-of-the-capacity-of-the-rootfs-partition-in-the-tf-card"></span>
=== The method of prohibiting automatic expansion of the capacity of the rootfs partition in the TF micro SD card ===
# First burn the linux image of the development board to the TF micro SD card on the '''<span style="color:#FF0000">Ubuntu computer</span>''' (Windows not available), '''<span style="color:#FF0000">and then re-plug and insert the TF micro SD card</span>'''# Then the Ubuntu computer will automatically mount the partition of the TF micro SD card. If the automatic mounting is normal, use the ls command to see the following output
::{| class="wikitable" style="width:800px;"
test@test:~$ '''sudo -i'''
[sudo] password for test 的密码:
root@test:~'''<span style="color:#FF0000">#</span>'''
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>Then enter the root directory of the linux system in the TF micro SD card and create a new file named '''.no_rootfs_resize'''</li>
{| class="wikitable" style="width:800px;"
</ol>
<ol start="5" style="list-style-type: decimal;">
<li><p>Then you can uninstall the TF micro SD card, and then pull out the TF micro SD card and insert it into the development board to start. When the linux system starts, when the file'''.no_rootfs_resize''' is detected in the '''/root''' directory, the rootfs will not be automatically expanded.</p></li><li><p>After entering the Linux system after prohibiting automatic expansion of rootfs, you can see that the total capacity of the rootfs partition is only 4GB (the image of the desktop version is tested here), which is much smaller than the actual capacity of the TF micro SD card, indicating that the automatic expansion of rootfs is prohibited.</p></li>
{| class="wikitable" style="width:800px;"
</ol>
<ol start="7" style="list-style-type: decimal;">
<li>If you need to re-expand the capacity of the rootfs partition in the TF micro SD card, just execute the following command, and then restart the Linux system of the development board.</li>
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|}
After restarting, enter the Linux system of the development board again, and you can see that the rootfs partition has been expanded to the actual capacity of the TF micro SD card
{| class="wikitable" style="width:800px;"
<span id="the-method-of-manually-expanding-the-capacity-of-the-rootfs-partition-in-the-tf-card"></span>
=== The method of manually expanding the capacity of the rootfs partition in the TF micro SD card ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''If the total capacity of the TF micro SD card is large, such as 128GB, you do not want the rootfs partition of the Linux system to use all the capacity of the TF micro SD card, but only want to allocate a part of the capacity, such as 16GB, to the Linux system, and then the remaining capacity of the TF micro SD card can be used for other use. Then you can use the content introduced in this section to manually expand the capacity of the rootfs partition in TF.'''</big>
|}
# First burn the linux image of the development board to the TF micro SD card on the '''<span style="color:#FF0000">Ubuntu computer</span>''' (Windows not available), '''<span style="color:#FF0000">and then re-plug and insert the TF micro SD card</span>'''# Then the Ubuntu computer will automatically mount the partition of the TF micro SD card. If the automatic mounting is normal, use the ls command to see the following output
::{| class="wikitable" style="width:800px;"
test@test:~$ '''sudo -i'''
[sudo] password for test 的密码:
root@test:~'''<span style="color:#FF0000">#</span>'''
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>Then enter the root directory of the linux system in the TF micro SD card and create a new file named '''.no_rootfs_resize'''</li>
{| class="wikitable" style="width:800px;"
</ol>
<ol start="7" style="list-style-type: decimal;">
<li>After opening gparted, you can select the TF micro SD card in the upper right corner, and then you can see the usage of the TF micro SD card capacity. The figure below shows the situation of the TF micro SD card after burning the Linux desktop version system. It can be seen that although the total capacity of the TF micro SD card is 16GB (displayed as 14.84GiB in GParted), the rootfs partition (/dev/sdc1) Only 4.05GiB were actually allocated, leaving 10.79GiB unallocated</li>
[[File:zero3-img91.png]]
</ol>
<ol start="9" style="list-style-type: decimal;">
<li>Click the right mouse button again to see the operation options shown in the figure below. If the TF micro SD card has been mounted, first you need to Umount the rootfs partition of the TF micro SD card</li>
[[File:zero3-img94.png]]
</ol>
<ol start="12" style="list-style-type: decimal;">
<li>Then you can directly drag the location shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in '''New siezesize(MiB)'''</li>
[[File:zero3-img97.png]]
</ol>
<ol start="15" style="list-style-type: decimal;">
<li>Then select'''Apply''', It it will officially start to expand the capacity of the rootfs partition</li>
[[File:zero3-img100.png]]
</ol>
<ol start="17" style="list-style-type: decimal;">
<li>Then you can pull out the TF micro SD card, insert it into the development board and start it up. After entering the Linux system of the development board, if you can see that the size of the rootfs partition is the same as the size set before, it means manual Expansion succeeded</li>
{| class="wikitable" style="width:800px;"
<span id="how-to-reduce-the-capacity-of-the-rootfs-partition-in-the-tf-card"></span>
=== How to reduce the capacity of the rootfs partition in the TF micro SD card ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''After configuring the application program or other development environment in the Linux system of the TF micro SD card, if you want to back up the Linux system in the TF micro SD card, you can use the method in this section to reduce the size of the rootfs partition first, and then start the backup.'''</big>
|}
# First insert the TF micro SD card you want to operate in the '''<span style="color:#FF0000">Ubuntu computer</span>''' (Windows not available)
# Then install the gparted software on the Ubuntu computer
<ol start="3" style="list-style-type: decimal;">
<li>Then opengpartedopen gparted</li>
{| class="wikitable" style="width:800px;"
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>After opening gparted, you can select the TF micro SD card in the upper right corner, and then you can see the usage of the TF micro SD card capacity</li>
[[File:zero3-img102.png]]
</ol>
<ol start="6" style="list-style-type: decimal;">
<li>Click the right mouse button again to see the operation options shown in the figure below. If the TF micro SD card has been mounted, first you need to Umount the rootfs partition of the TF micro SD card</li>
[[File:zero3-img104.png]]
</ol>
<ol start="8" style="list-style-type: decimal;">
<li>After the'''Resize/Move''' option is turned on, the following setting interface will pop up</li>
[[File:zero3-img106.png]]
</ol>
<ol start="9" style="list-style-type: decimal;">
<li>Then you can directly drag the location shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in '''New siezesize(MiB)'''</li>
[[File:zero3-img97.png]]
</ol>
<ol start="10" style="list-style-type: decimal;">
<li>After setting the capacity, click'''Resize/Move''' in the lower right corner</li>
[[File:zero3-img98.png]]
</ol>
<ol start="14" style="list-style-type: decimal;">
<li>Then you can pull out the TF micro SD card, insert it into the development board and start it up. After entering the Linux system of the development board, if you can use the '''df -h''' command to see that the size of the rootfs partition is the same as the size set before, it means that the size has been reduced. capacity success</li>
{| class="wikitable" style="width:800px;"
|-
|
<big><p>'''Please do not copy the following commands. For example, the network node name in debian12 is end0, and the following command needs to be changed to ping www.baidu.com -I end0, I is capital i,.'''</p></big>
|}
<li><p>First log in to the linux system, there are the following three ways</p>
<ol style="list-style-type: lower-alpha;">
<li>If the development board is connected with a network cable, [[Orange Pi Zero 3#SSH remote login development board under Ubuntu|'''you can remotely log in to the Linux system through sshSSH remote login development board under Ubuntu''']]</li></ol>
<!-- -->
<!-- -->
<ol start="2" style="list-style-type: decimal;">
<li>First use the '''nmcli dev wifi'''command to scan the surrounding WIFI hotspots
{| class="wikitable" style="width:800px;"
</ol>
<ol start="4" 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;"
<li><p>First log in to the linux system, there are the following three ways</p>
<ol style="list-style-type: lower-alpha;">
<li><p>If the development board is connected with a network cable''', [[Orange Pi Zero 3#SSH remote login development board under Ubuntu|'''you can remotely log in to the Linux system through sshSSH remote login development board under Ubuntu''']]'''</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 (please use MobaXterm for the serial port software, and the minicom cannot display the graphical interface)</p></li>
<li><p>If the development board is connected to the HDMI display, you can log in to the linux system through the HDMI display terminal</p></li></ol>
<div class="figure">
[[File:zero3-img113-2.png]]
</div></ol>
</ol>
<ol start="3" style="list-style-type: decimal;">
<li>Then enter the password of the WIFI hotspot, and then click '''Connect'''to start connecting to WIFI</li>
[[File:zero3-img116.png]]
<li>Take out the mobile phone at this time, you can find the WIFI hotspot named '''orangepi''' created by the development board in the searched WIFI list, and then you can click '''orangepi''' to connect to the hotspot, the password is set above '''orangepi'''</li>
[[File:zero3-img119-1.png]]
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>After the connection is successful, the display is as shown in the figure below</li>
[[File:zero3-img120-1.png]]
</ol>
<ol start="5" style="list-style-type: decimal;">
By default, the DHCP service of the development board will assign an IP address of '''192.168.12.0/24''' to the device connected to the hotspot. At this time, click on the connected WIFI hotspot '''orangepi''', and then you can see that the IP address of the mobile phone is '''192.168.12.X'''
[[File:zero3-img120-1.png]]
[[File:zero3-img121-12.png]]
</li></ol>
<ol start="6" style="list-style-type: decimal;">
At this time, after connecting to the hotspot through the mobile phone, click on the connected WIFI hotspot '''orangepi''', and then you can see that the IP address of the mobile phone is '''192.168.2.X'''.
[[File:zero3-img120-1.png]]
[[File:zero3-img122-2.png]]
</ol>
<ol start="7" style="list-style-type: decimal;">
At this time, the mobile phone cannot search for the WIFI hotspot. You need to manually specify the name of the WIFI hotspot and enter the password to connect to the WIFI hotspot.
[[File:zero3-img123-1.png]]
</li></ol>
<span id="create_ap-method-to-create-wifi-hotspot-in-bridge-mode"></span>
<li>Take out the mobile phone at this time, and you can find the WIFI hotspot named orangepi created by the development board in the searched WIFI list, and then you can click '''orangepi''' to connect to the hotspot, and the password is the '''orangepi''' set above</li>
[[File:zero3-img119-1.png]]
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>After the connection is successful, the display is as shown in the figure below</li>
[[File:zero3-img120-1.png]]
</ol>
<ol start="5" style="list-style-type: decimal;">
|}
The IP of the device connected to the WIFI hotspot is also assigned by the main router, so the mobile phone connected to the WIFI hotspot and the development board are in the same network segment. At this time, click on the connected WIFI hotspot orangepi, and then you can see the IP address of the mobile phone Also also '''192.168.1.X'''.
[[File:zero3-img120-1.png]]
[[File:zero3-img124-1.png]]
</ol>
<ol start="6" style="list-style-type: decimal;">
At this time, the mobile phone cannot search for the WIFI hotspot. You need to manually specify the name of the WIFI hotspot and enter the password to connect to the WIFI hotspot.
[[File:zero3-img123-1.png]]
</li></ol>
<span id="how-to-set-static-ip-address"></span>
|-
|
<big><p>'''Note that in the following commands, I is capital i, Debian12 needs to change eth0 to end0.'''</p></big>
|}
{| class="wikitable" style="width:800px;"
<big>'''To use the method in this section, you first need to prepare a Linux system machine. For example, a computer or a virtual machine with Ubuntu system installed.'''
'''Why do you need a Linux system machine, because the root file system of the development board Linux system burned in the TF micro SD card is in ext4 format, and the Linux system machine can mount it normally, and then modify the configuration files in it.'''</big>
|}
<ol style="list-style-type: decimal;">
<li><p>First burn the Linux image of the development board you want to use into the TF micro SD card, and then use a card reader to insert the TF micro SD card that has burned the Linux image of the development board into a machine with a Linux system (such as a machine with an Ubuntu system installed computer, the following uses Ubuntu computer as an example to demonstrate)</p></li><li><p>When the TF micro SD card is inserted into the Ubuntu computer, the Ubuntu computer will generally automatically mount the partition of the Linux root file system in the TF micro SD card. You can know from the following command that '''/media/test/opi_root''' is the Linux root file in the TF micro SD card The path where the system is mounted</p>
{| class="wikitable" style="width:800px;"
|-
|}
</li>
<li><p>Then enter the '''/boot''' directory of the Linux system burned in the TF micro SD card</p>
{| class="wikitable" style="width:800px;"
|-
</li></ol>
</li>
<li><p>After modifying the orangepi_first_run.txt file, you can exit the /boot directory of the development board Linux system in the TF micro SD card, uninstall the TF micro SD card, and then insert the TF micro SD card into the development board to start</p></li>
<li><p>If you have not set a static IP address, you still need to check the IP address through the background of the router. If you have set a static IP address, you can ping the set static IP address on the computer. If you can ping, it means that the system has started normally, and The network has also been set correctly, and then you can use the set IP address ssh to remotely log in to the Linux system of the development board</p>
|-
|
<big>'''Note that although many laptops have an HDMI interface, the HDMI interface of the notebook generally only has the output function, and does not have the function of HDMI inIN, that is to say, the HDMI output of other devices cannot be displayed on the notebook screen.'''
'''When you want to connect the HDMI of the development board to the HDMI port of the laptop, please make sure that your laptop supports the HDMI in IN function.'''</big>
|}
<ol style="list-style-type: decimal;">
<li><p>For the order of the 26-pin interface pins on the Orange Pi Zero 3 development board, please refer to the silkscreen diagram on the development board</p>
<p>[[File:zero3-img171-12.png]]</p></li>
<li><p>The functions of the 26 pin interface pins on the development board are shown in the table below</p>
{| class="wikitable" style="width:380px;margin-right: 20px;"
|-
| style="text-align: center;"| '''GPIO序号GPIO S/N'''
| style="text-align: center;"| '''GPIO'''
| style="text-align: center;"| '''功能Function'''| style="text-align: center;"| '''引脚Pin'''
|-
| style="text-align: center;"|
{| class="wikitable" style="width:380px;"
|-
| style="text-align: center;"| '''引脚Pin'''| style="text-align: center;"| '''功能Function'''
| style="text-align: center;"| '''GPIO'''
| style="text-align: center;"| '''GPIO序号GPIO S/N'''
|-
| style="text-align: center;"| '''2'''
<span id="how-to-set-the-pull-down-resistance-of-pin-gpio-port"></span>
=== 26 How to set the pull-up and pull-down resistance of resistors on 26 pin GPIO port ports ===
<ol style="list-style-type: decimal;">
<li><p>According to the schematic diagram of the 26pin interface, the available uart is uart5</p>
<p>[[File:zero3-img181.png]]</p></li>
<li><p>uart5 Uart5 is disabled by default in the Linux system, and it needs to be opened manually to use it. The steps to open 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>
|}
<ol style="list-style-type: lower-alpha;">
<li><p>Enter the following command on the command line to make pwm1 output a 50Hz rectangular square wave</p>
{| class="wikitable" style="width:800px;"
|-
</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>Enter the following command on the command line to make pwm3 output a 50Hz rectangular square wave</li>
{| class="wikitable" style="width:800px;"
|-
<ol style="list-style-type: lower-alpha;">
<li><p>'''--channel''': Specify the channel number of SPI</p></li>
<li><p>'''--port''': specify Specify the port number of SPI</p></li></ol>
</li>
<li><p>Do not short-circuit the mosi and miso pins of SPI1, the output result of running spidev_test.py is as follows, you can see that the data of TX and RX are inconsistent</p>
<ol style="list-style-type: decimal;">
<li><p>First of all, please install docker and make sure that docker can run normally. '''For the installation steps of docker'''The Method Of Installing The Docker, please refer to the instructions in the section on [[Orange Pi Zero 3#The Method Of Installing The Docker|'''how to install Docker''']].</p></li>
<li><p>Then you can search for the docker image of Home Assistant</p>
{| class="wikitable" style="width:800px;"
<big><p>'''It takes a while for the Home Assistant container to start. If the following interface is not displayed normally, please wait for a few seconds and then refresh. If the following interface is not displayed normally after waiting for more than one minute, it means that there is a problem with the installation of Home Assistant. At this time, you need to check whether there is a problem with the previous installation and setting process.'''</p></big>
|}
<p>[[File:zero3-img188-1.png]]</p></li>
<li><p>Then enter '''your name''', '''user name''' and '''password''' and click '''Create Account'''</p>
<p>[[File:zero3-img189-1.png]]</p></li>
<li><p>Then follow the interface prompts to set according to your preferences, and then click Next</p>
<p>[[File:zero3-img190-1.png]]</p></li>
<li><p>Then click Next</p>
<p>[[File:zero3-img191-1.png]]</p></li>
<li><p>Then click Finish</p>
<p>[[File:zero3-img192-1.png]]</p></li>
<li><p>The final main interface displayed by Home Assistant is shown in the figure below</p>
<p>[[File:zero3-img193-1.png]]</p></li>
<li><p>How to stop the Home Assistant container</p>
<ol style="list-style-type: lower-alpha;">
<big><p>'''When running the hass command for the first time, you will download and install and cache some necessary libraries and dependencies to run. This process may take a few minutes. Note that at this time, the interface of Home Assistant cannot be seen in the browser. Please wait for a while before refreshing.'''</p></big>
|}
<p>[[File:zero3-img194-1.png]]</p></li></ol>
<span id="opencv-installation-method"></span>
|-
|
<big>'''aapanel 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 (extracted excerpted from the [https://www.bt.cn/new/index.html Baota official website of the aapanel])'''</big>
|}
<p>[[File:zero3-img218.png]]</p></li>
<li><p>Then search '''Google Pinyin''' and click '''OK'''</p>
<p>[[File:zero3-img219-1.png]]</p></li>
<li><p>Then bring '''Google Pinyin''' to the front</p>
<p>[[File:zero3-img220.png]]</p>
</div></li></ol>
<ol start="8" style="list-style-type: decimal;">
<li>8)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.
<div class="figure">
</div></li></ol>
<ol start="8" style="list-style-type: decimal;">
<li>8)Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Windows PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board.
<div class="figure">
<p>'''https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/22.04/ubuntu-22.04-desktop-amd64.iso'''</p>
|}
 
After installing Ubuntu 22.04 on the computer or virtual machine, please set the software source of Ubuntu 22.04 to Tsinghua source (or other domestic sources that you think is fast), otherwise it is easy to make mistakes due to network reasons when installing software later. The steps to replace Tsinghua source are as follows:
 
<ol style="list-style-type: lower-alpha;">
<li>For the method of replacing Tsinghua source, please refer to the instructions on this web page.
 
{| class="wikitable" style="width:800px;"
|-
|
[https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ '''https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/''']
|}
</li></ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li><p>Note that the Ubuntu version needs to be switched to 22.04.</p>
<p>[[File:zero3-img293.png]]</p></li>
<li><p>The content of the '''/etc/apt/sources.list''' file that needs to be replaced is:</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~$ '''sudo mv /etc/apt/sources.list cat /etc/apt/sources.list.bak'''</p>
<p>test@test:~$ '''sudo vim /etc/apt/sources.list'''</p>
<p># By default, the source image is commented to improve the speed of apt update, you can uncomment it yourself if necessary</p>
<p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse</p>
<p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse</p>
<p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse</p>
<p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse</p>
<p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse</p>
<p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse</p>
<p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse</p>
<p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse</p>
 
 
<p># 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>
|}
</li>
<li><p>After the replacement, you need to update the download information and make sure that there is no error.</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~$ '''sudo apt-get update'''</p>
|}
</li>
<li><p>'''<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>'''</p></li></ol>
<span id="get-the-source-code-of-linux-sdk"></span>
|-
|
[https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/ '''https://mirrorsimola.tuna.tsinghua.eduarmbian.cncom/armbian-releasesdl/_toolchain/''']
|}
<ol style="list-style-type: decimal;">
<li><p>Download '''rootcheck.apk''' from the <span class="mark">[http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''official tool''']</span> on the development board data download page</p>
<p>[[File:zero3-img349.png|1200px]]</p><p>[[File:zero3-img350.png|1200px]]</p></li>
<li><p>Then make sure that the adb connection between the Ubuntu PC and the development board is normal. For how to use adb, please refer to the instructions in the section on [[Orange Pi Zero 3#How to use ADB|'''how to use ADB''']]</p></li>
<li><p>Then use the adb command to install rootcheck.apk to the Android system, of course, you can also use the U disk to copy the installation</p>
|-
|
<big>'''It doesn’t doesn't matter if there is no w25q64 module, because there is a SPIFlash connected to SPI0 on the development board, and the configuration of SPI0 is also enabled by default in Android, so we can also directly use the onboard SPIFlash test.'''</big>
|}
</li></ol>
| style="text-align: center;"| 2023-07-05
| style="text-align: center;"| initial version
|-
| style="text-align: center;"| v1.1
| style="text-align: center;"| 2023-07-14
| style="text-align: center;"| Add the compilation method of Android 12 source code
|}
: *initial version
|-
| 2023-07-13
|
Opios-arch-aarch64-xfce-opizero3-23.07-linux6.1.31.img.xz
 
: *initial version
|}