Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Lite 2

3,561 bytes removed, 20:29, 30 June 2022
no edit summary
 Orange Pi Lite 2 is not just a consumer product, it is also designed for anyone who wants to use technology to create and innovate. It is a very simple, interesting and practical tool that you can use to build the world around you.<br>
<br>
<div>[[文件File:Orange-pi-lite2-img1.png|800px]]</div>
<br>
=== '''Hardware Features of Orange Pi Lite 2''' ===
<br>
<div>[[文件File:Orange-pi-lite2-img2.png|800px]]</div><div>[[文件File:Orange-pi-lite2-img3.png|800px]]</div>
<br>
=== '''GPIO specifications''' ===
The following figure is the GPIO pin function diagram of Orange Pi Lite 2:
<div>[[文件File:Orange-pi-3-img4.png|800px]]</div>{| class="wikitable" style="text-align:center;width:1000px800px;background:#ffffff;"
|-
| colspan=3| Orange Pi Lite 2 pin correspondence table
* TF card, minimum 8GB capacity, class 10, recommended brand TF card, such as SanDisk 16G TF card
* For a compiling host, the configuration should preferably meet the following conditions:
<p style="padding-left:20px ;">
64bit CPU;<br>
8 GB memory and above<br>
</p>
The operating system is best:
<p style="padding-left:200px;">
'''Ubuntu14.04 (for compiling Android)'''<br>
'''Ubuntu18.04 (for compiling Linux source code)'''
The above software can be obtained through Github, Mega network disk and Baidu cloud disk.
<p style="padding-left:200px;">'''http://www.orangepi.org/downloadresourceshtml/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Lite2.html''' <br>'''http://www.orangepi.cn/downloadresourcescnhtml/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Lite2.html'''
</p>
lichee/bootloader/uboot_2014_sunxi_spl&nbsp;&nbsp;&nbsp;#boot0 Code directory<br>
lichee/linux-3.10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#Kernel code<br>
lichee/tools&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#Solution hardware <br>configuration, packaging tools, etc.
</div>
<br>
Welcome to mkscript setup progress<br>
All available chips:<br>
<p style="padding-left:20px ;">
# sun50iw1p1
# sun50iw2p1
Choice: 2<br>
All available platforms:
<p style="padding-left:20px ;">
# android
# dragonboard
Choice: 0<br>
All available business:
<p style="padding-left:20px ;">
# 5.1
# 4.4
<br>
<br>
 
== '''Linux compilation environment setup''' ==
<br>
<br>
Enter the root password and press enter
<div style="padding-left:200px;">[[文件File:Orange-pi-3-img5.png|600px]]</div>
<br>
Select 0 Build system with uboot / kernel / rootfs / image to enter the interface of development board model selection.
<br>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-3-img6.png|600px]]</div>
<br>
Select orange pi lite2, enter the kernel version selection interface after entering<br>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-lite2-img4.png|600px]]</div>
<br>
At present, the orangepi lite2 development board supports the kernel code of '''Linux 4.9 and mainline.''' Select one of them and press Enter to start downloading the corresponding SDK source code.<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-3-img8.png|600px]]</div>
The downloaded source code will be stored in the same directory of OrangePi_Build<br>
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ ls ../OrangePi_Build -l OrangePi_Build<br>
<p style="padding-left:20px ;">'''OrangePiH6_Linux4.9''' (Where the kernel version is Linux4.9)<br>
'''OrangePiH6_mainline''' (The current kernel version is Linux5.3.5)</p>
</div>
If GitHub fails to download the code, you can download the source code compression package of Linux SDK directly from Baidu Cloud Disk.<br>
Download link is:
httpshttp://panwww.baiduorangepi.comorg/shtml/15NOF_eAwbN9ah3dfWx0ArQhardWare/computerAndMicrocontrollers/details/Orange-Pi-Lite-2.html 
=== '''Build a compilation environment''' ===
<br>
├── scripts&nbsp;&nbsp;&nbsp;&nbsp;Script files used during compilation<br>
├── toolchain&nbsp;&nbsp;&nbsp;&nbsp;Cross-compilation toolchain used by the kernel and u-boot<br>
└── uboot&nbsp;&nbsp;&nbsp;&nbsp;Store boot0 and u-boot source code6 code<br>6 directories, 1 file<br>
</div>
<br>
 
=== '''Compile Linux and U-boot source code''' ===
<br>
<br>
Select OrangePi lite2 and press Enter
<div>[[文件File:Orange-pi-lite2-img5.png|600px]]</div>
The functions of each option are as follows:<br>
<div style="font-weight:700">
* 7 Update Uboot —— Update boot0 and u-boot and dtb configuration of SD card Linux system
</div>
<div>[[文件File:Orange-pi-3-img10.png|600px]]</div>
The final file generated by the compilation will be saved in the output directory<br>
<div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;">
'''(3)Select Realtek 8812A USB WiFi in the kernel configuration and compile it into a kernel module'''
<br>
<div style="padding-left:300px ;">[[文件File:Orange-pi-3-img11.png|600px]]</div>
'''(4)Recompile the kernel according to the method in `` Compiling Linux and U-boot Source '''''
<div style="padding-left:300px ;">[[文件File:Orange-pi-3-img12.png|300px]]</div>
Partially compiled log looks like this:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
<br>
Then choose 6 Update Module to update the kernel module according to the instructions in the section `` Compiling Linux and U-boot Source ''
<div>[[文件File:Orange-pi-3-img13.png|600px]]</div>
<br>
Next, you can start the system through the SD card and use the new 8812au.ko kernel module to drive the USB WIFI network card.
<br>
Check whether the inserted TF card is consistent with the selected drive letter, click the "Restore Card" button to start formatting the TF
<div>[[文件File:Orange-pi-3-img14.png|800px]]</div><div>[[文件File:Orange-pi-3-img15.png|800px]]</div>
<br>
'''(2)Then select firmware, select boot card.'''
<br>
<br>
<div>[[文件File:Orange-pi-3-img16.png|800px]]</div>
'''(3)Click "Burn Card" to start writing to the TF card and wait for the burning to complete.'''
<div>[[文件File:Orange-pi-3-img17.png|800px]]</div>
After the Android firmware is successfully programmed, click the "Close" button, and then you can insert the TF card into the development board to start the system
<br>
=== '''How to flash Linux firmware through Etcher''' ===
<br>
* '''(1)First open Etcher, its interface is shown below'''<div>[[文件:Orange-pi-3-img24.png|800px]]</div>* Then use "Select image" to select the Linux firmware to be burned* Then insert the TF card, Etcher will automatically identify the corresponding drive* Finally, click “Flash!” To start burning. After burning, you can insert the development board to start the system.<div>[[文件:Orange-pi-3-img25.png|800px]]</divbr>
<br>
=== '''Program Linux system into EMMC Flash chip through script''' ===<div>[[File:Orange-pi-3-img24.png|800px]]</div>
<br>
 If you purchased the Orange Pi 3 development board with EMMC Flash chip, after booting '''(2)Then use "Select image" to select the Linux system through the TF card, you can also burn the Linux system into EMMC Flash through the install_to_emmc script.firmware to be burned'''<br> Enter the install_to_emmc command in the Linux terminal, and then enter y as prompted, and the Linux system will automatically be burned into EMMC Flash. After the programming is complete, turn off the power, remove the TF card, and then power on the Linux system in EMMC Flash automatically.
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">root@OrangePi:~# '''install_to_emmc(3)Then insert the TF card, Etcher will automatically identify the corresponding drive'''<br>
<br>
WARNING: EMMC WILL BE ERASED !, Continue '''(y/N4)? y<br>Erasing EMMC .Finally, click “Flash!” To start burning.After burning, you can insert the development board to start the system.'''<br>Creating new filesystem on EMMC ...<br><p style="padding-left:20px;">New filesystem created on /dev/mmcblk0.</p>Partitioning EMMC ...<br><p style="padding-left:20px;">Creating boot & linux partitions<br>OK.</p>Formating fat partition ... <p style="padding-left:20px;">fat partition formated.</p>Formating linux partition (ext4), please wait ...<p style="padding-left:20px;">linux partition formated.</p>
<br>
Instaling u-boot to EMMC ...<brdiv><br>Mounting EMMC partitions...<br>FAT partitions mounted to /tmp/_fatdir<br>linux partition mounted to /tmp/_extdir<br><br>Copying file system to EMMC ...<br><br><p style="padding[[File:Orange-pi-3-left:20px;">Creating "fstab"</p><br><span>*******************************</span><br> Linux system installed to EMMCimg25.<br><span>*******************************</span>png|800px]]</div>
<br>
=== '''Linux boot light description''' ===
<br>
* After booting, the on board LED light will first light up red, then the red light will turn off, and the yellow light will stay on.<br>
<br>
=== '''Login account and password''' ===
<br>
* Username root, password: orangepi<br>* Username orangepi, password: orangepi<br>
<br>
=== '''extend rootfs partition''' ===
<br>
 After After the system running operating card is prepared, the rootfs partition of the file system rootfs partition should be expanded immediately. This will greatly improve the performance of the system performance and avoid various tedious complicated problems caused by insufficient space.<br> We <br>We can use the system's built-in script resize_rootfs.sh to expand the capacity after entering the system.:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
<div style="font-weight:700;">
</tr>
<tr style="font-weight:700;">
<td>/dev/mmcblk1p2mmcblk0p2</td>
<td>1.1G</td>
<td>981M520M</td><td>28M488M</td><td>9852%</td>
<td>/</td>
</tr>
<tr>
<td>devtmpfs</td>
<td>985M481M</td>
<td>0</td>
<td>985M 481M</td>
<td>0%</td>
<td>/dev</td>
<tr>
<td>tmpfs </td>
<td>994M489M</td>
<td>0</td>
<td>994M489M</td>
<td>0%</td>
<td>/dev/shm</td>
<tr>
<td>tmpfs </td>
<td>994M489M</td><td>86.9M6M</td><td>985M 489M</td><td>12%</td>
<td>/run</td>
</tr>
<tr>
<td>tmpfs</td>
<td>994M489M</td>
<td>0</td>
<td>994M489M</td>
<td>0%</td>
<td>/sys/fs/cgroup</td>
<td>/dev/mmcblk1p1</td>
<td>50M</td>
<td>15M29M</td><td>36M 22M</td><td>3058%</td>
<td>/boot</td>
</tr>
<tr>
<td>tmpfs</td>
<td>199M</td>
<td>0</td>
<td>199M</td>
<td>0%</td>
<td>/run/user/0</td>
</tr>
</table>
root@OrangePi:~#<br>
<br>
<div style="font-weight:700;">
</tr>
<tr style="font-weight:700;">
<td>/dev/mmcblk1p2mmcblk0p2</td><td>15G7.2G</td><td>982M539M</td><td>13G6.4G</td><td>78%</td>
<td>/</td>
</tr>
<tr>
<td>devtmpfs</td>
<td>985M481M</td>
<td>0</td>
<td>985M 481M</td>
<td>0%</td>
<td>/dev</td>
<tr>
<td>tmpfs </td>
<td>994M489M</td>
<td>0</td>
<td>994M489M</td>
<td>0%</td>
<td>/dev/shm</td>
<tr>
<td>tmpfs </td>
<td>994M489M</td><td>8.9M13M</td><td>985M 477M</td><td>13%</td>
<td>/run</td>
</tr>
<tr>
<td>tmpfs</td>
<td>994M489M</td>
<td>0</td>
<td>994M489M</td>
<td>0%</td>
<td>/sys/fs/cgroup</td>
<td>/dev/mmcblk1p1</td>
<td>50M</td>
<td>15M29M</td><td>36M 22M</td><td>3058%</td>
<td>/boot</td>
</tr>
<tr>
<td>tmpfs</td>
<td>199M</td>
<td>0</td>
<td>199M</td>
<td>0%</td>
<td>/run/user/0</td>
</tr>
</table>
=== '''Recording playback test method''' ===
<br>
 Note<span style="color:red;">Note: The Audio Codec audio driver for the mainline kernel is not yet available</span><br><br>'''(1)Test recording function'''<br>
<br>
* Test recording function
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
root@orangepi3orangepilite2:~# arecord -d 10 -f cd -D hw:1,0 -t wav Test.wav Recording<br>
WAVE 'Test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,<br>
 Stereo<br>
root@orangepi3orangepilite2:~#
</div>
<br>
* Test '''(2)Test the HDMI playback function, just use the aplay command to play<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">root@orangepi3:~# aplay Test.wav'''</divbr>
<br>
* Test headset playback
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
root@orangepi3orangepilite2:~# aplay -D hw:1,0 Test.wav
</div>
<br>
<br>
<br>
=== '''WIFI configuration method''' ===
<br>
</div>
<br>
=== '''Test method of PCIE interface''' ===<br> When using the PCIE interface, it should be noted that if the PCIE interface is used, the USB2.0 interface cannot be used. If used at the same time, it will cause a system error.<br>Currently, only the rtl8822be PCIE driver is integrated in the linux3.10 kernel. The drivers for other PCIE devices have not been adapted for the time being, and other versions of the kernel cannot currently use the PCIE function. If you need to test the function of the PCIE interface, please use the Linux 3.10 image or the Android image.<br><br><div>[[文件:Orange-pi-3-img26.png|800px]]</div> Insert the RTL8822BE wireless network card module according to the method shown in the figure below and start the system. The system will automatically identify and load the 88x2be.ko kernel module.<div style="padding-left:200px;">[[文件:Orange-pi-3-img27.png|800px]]</div> The lsmod command can be used to check whether the driver is successfully loaded.The ifconfig command can be used to check the network node corresponding to the PCIE wireless network card.<br><br><div style="border:1px solid #ddd;padding:5px;background:#f1f1f1;">root@OrangePi:~# lsmod<br><table><tr><td>Module</td><td>Size</td><td>Used by </td></tr><tr style="font-weight:700;"><td>88x2be</td><td>2116402 </td><td>0 </td></tr></table><br>root@OrangePi:~# ifconfig <span style="font-weight:700;">wlp1s0</span><br><span style="font-weight:700;">wlp1s0 Link encap:Ethernet HWaddr f8:da:0c:5a:00:6f UP</span> <br><p style="font-weight:700;padding-left:54px;">BROADCAST MULTICAST MTU:1500 Metric:1<br>RX packets:0 errors:0 dropped:6 overruns:0 frame:0 TX<br>packets:0 errors:0 dropped:0 overruns:0 carrier:0 <br>collisions:0 txqueuelen:1000<br>RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)</p></div><br>
== '''Introduction to serial debugging tools''' ==
<br>
First you need to prepare a USB to TTL serial cable similar to the picture below:<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-3-img28.png|800px]]</div>Connect the serial cable as shown in the figure below. The From the silk screen on the back of the board, you can see that the corresponding functions of the cables of different colors are as follows:<br>* Black——GNDBlack—GND
* Green-RX
* White-TX
<div style="padding-left:200px;">[[文件File:Orange-pi-3lite2-img29img6.png|800px]]</div>
<br>
=== '''Use on Windows platform''' ===
In the process of using OrangePi for project development, in order to obtain more debugging information, OrangePi supports serial port information debugging by default. For developers, they only need to prepare the materials mentioned above to get serial debugging information. The serial debugging tools used by different host computers are similar. Basically, you can refer to the methods below to deploy. There are many tools for serial debugging on the Windows platform. The commonly used tool is putty. This section uses putty as an example to explain deployment.<br>
<br>
* '''(1)Install USB driver'''<br><br>
Download the latest driver PL2303_Prolific_DriverInstaller_v130.zip, download and unzip.<br>
<div>[[文件File:Orange-pi-3-img30.png|800px]]</div>
Select application installation as administrator<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-3-img31.png|800px]]</div>
Wait for the installation to complete
<div style="padding-left:200px;">[[文件File:Orange-pi-3-img32.png|800px]]</div>* '''Download (2)Download and install Putty'''<br><br>
Putty can be downloaded from the following address, please choose the version suitable for your development environment.<br>
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
<p>Double-click the downloaded putty.exe directly to open putty. The software interface
is shown in the figure below.</p>
* <div style="padding-left:40px;">[[File:Orange-pi-lite2-img7.png|600px]]</div>'''Acquisition (3)Acquisition of equipment information'''<br>
<br>
 In Windows 7, we can check whether the serial port connection is normal and the device number of the serial port through the device manager. If the device is not recognized properly, please check if the driver is successfully installed. If there is a problem with the driver installation, you can try to scan and install the driver using 360 Driver Master.
<div>[[文件File:Orange-pi-3-img33.png|800px]]</div>
<br>
* '''Putty (4)Putty configuration'''<br>
<br>
 Set the serial port to the corresponding port number (COM4), disable flow control, and set the speed to 115200
<div>[[文件File:Orange-pi-3-img34.png|800px]]</div>* Start '''(5)Start debugging serial output'''<br><br>
OrangePi is powered on and putty will automatically print serial port log information<br>
<br>
 
=== '''Use on Linux platform''' ===
<br>
There is not much difference between using putty on the Linux platform and the Windows platform. The following mainly describes the operation steps where there are differences. All operations are based on Ubuntu 14.04 system.<br>
<br>
* '''Install (1)Install and start launch Putty'''<br>
<div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;">
$ sudo apt-get install putty<br>
</div>
<br>
* '''Configure (2)Configure Putty'''<br><br>
The serial number can be viewed through ls / dev / ttyUSB *<br>
Baud rate needs to be set to 115200<br>
And turn off flow control
<div>[[文件File:Orange-pi-3-img35.png|800px]]</div> 
== '''History''' ==
<br>
</tr>
<tr style="height:50px;">
<td>1.0</td><td>20192018-0105-2407</td><td>Leeboby</td><td>Create documentFiles</td><td></td><td></td>
</tr>
<tr style="height:50px;">
</table>
<br>
== '''Download the Orange Pi Lite 2 User Manual''' ==<br>For more information on using the Orange Pi 3Lite 2, please see the [httphttps://localhost:8080drive.google.com/index.phpopen?titleid=%E6%96%87%E4%BB%B6:Orange_Pi_3.docx 1i_jeJRCf0Sr5p62RMo5xodUwTFXELpEi <span style="color:red;">Orange Pi 3 Lite 2 User Manual</span>]. (Click to download)