Changes

Jump to: navigation, search

Orange Pi One Plus

29,934 bytes added, 09:57, 22 June 2022
创建页面,内容为“__TOC__ == '''Orange Pi One Plus Basic Features''' == <br> === '''What is Orange Pi One Plus?''' === <br>  Orange Pi is an open source single board card computer,…”
__TOC__
== '''Orange Pi One Plus Basic Features''' ==
<br>
=== '''What is Orange Pi One Plus?''' ===
<br>
 Orange Pi is an open source single board card computer, a new generation of arm64 development board, which can run Android 7.0, Ubuntu and Debian operating systems. Orange Pi single board computer uses Allwinner H6 Soc and has 1GB LPDDR3 memory.<br>
<br>
=== '''What Orange Pi One Plus does?''' ===
<br>
We can use it to build:<br>

* A computer
* A web server
* Game console
* HD video player
* Speaker
* Android
* ......
There are many more features because Orange Pi One Plus is open source.<br>
<br>
=== '''For whom the Orange Pi One Plus Designed?''' ===
<br>
 Orange Pi One Plus is not just a consumer product, it is also designed for anyone who wants to use technology for creative innovation. It is a very simple, interesting and practical tool that you can use to build the world around you.<br>
<br>
=== '''Orange Pi One Plus hardware features''' ===
<br>
<div>[[文件:Orange-pi-one-plus-img1.png|800px]]</div>
<div>[[文件:Orange-pi-one-plus-img2.png|800px]]</div>
<br>
<div>[[文件:Orange-pi-one-plus-img3.png|800px]]</div>
<br>
=== '''GPIO specifications''' ===
<br>
The following figure is the GPIO pin function diagram of Orange Pi One Plus:
<div>[[文件:Orange-pi-3-img4.png|800px]]</div>
{| class="wikitable" style="text-align:center;width:1000px;background:#ffffff;"
|-
| colspan=3| Orange Pi One Plus GPIO pin correspondence table
|-
| CON12-P01 || VCC-3.3V|| VCC-IO
|-
| CON12-P02|| VCC-5V|| DCIN
|-
| CON12-P03 || TWI1-SDA|| PH06
|-
| CON12-P04|| VCC-5V|| DCIN
|-
| CON12-P05|| TWI1-SCK|| PH05
|-
| CON12-P06 || GND|| GND
|-
| CON12-P07 || PWM1|| PH04
|-
| CON12-P08|| PD21|| PD21
|-
| CON12-P09|| GND|| GND
|-
| CON12-P10|| PD22|| PD22
|-
| CON12-P11|| UART3-RX|| PD24
|-
| CON12-P12|| PC09|| PC09
|-
| CON12-P13|| UART3-TX|| PD23
|-
| CON12-P14|| GND|| GND
|-
| CON12-P15|| UART3_CTS|| PD26
|-
| CON12-P16|| PC08|| PC08
|-
| CON12-P17|| VCC-3.3V|| VCC-IO
|-
| CON12-P18 || PC07|| PC07
|-
| CON12-P19|| SPI0_MOSI|| PC02
|-
| CON12-P20|| GND|| GND
|-
| CON12-P21|| SPI0_MISO|| PC03
|-
| CON12-P22|| UART3_RTS|| PD25
|-
| CON12-P23|| SPI0_CLK|| PC00
|-
| CON12-P24|| SPI0_CS0|| PC05
|-
| CON12-P25|| GND || GND
|-
| CON12-P26|| PH03|| PH03
|}
<br>

== '''Development board instructions''' ==
<br>
=== '''Prepare hardware and software tools''' ===
<br>
'''Hardware requirements:'''<br>
<br>
* Orange Pi One Plus Development Board
* 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>
100GB of free disk space;
</p>
The operating system is best:
<p style="padding-left:200px;">
'''Ubuntu14.04 (for compiling Android)'''<br>
'''Ubuntu18.04 (for compiling Linux source code)'''
</p>

'''Software Requirements:'''<br>


* Orange Pi Lite 2 SDK
* Orange Pi Lite 2 firmware
* Android and Linux flashing tools

The above software can be obtained through Github, Mega network disk and Baidu cloud disk.

<p style="padding-left:200px;">
'''http://www.orangepi.org/downloadresources/''' <br>
'''http://www.orangepi.cn/downloadresourcescn/'''
</p>

=== '''Development board power supply''' ===

There are two ways to power the development board:<br>

* DC (5V 2A) power supply: <br>
Power on after inserting the DC adapter
* Micro USB (5V 2A) OTG power supply:<br>
Plug in the Micro USB adapter to power on.

== '''Android compilation environment''' ==

The following operations are performed on a PC with Ubuntu 14.04 installed. Other versions of Ubuntu systems or Linux distributions may have some differences.

=== '''Get SDK source code zip''' ===

After downloading the Android source package, first you need to combine multiple compressed files into one and then decompress them.

<div style="background:#f1f1f1;border:1px solid #000;">
$ mkdir OrangePi_Lite2<br>
$ cat H6-2018-1-2.tar.gza* > OrangePi_Lite2.tar<br>
$ tar xf OrangePi_Lite2.tar -C OrangePi_Lite2
</div>

=== '''Build a compilation environment''' ===

* '''Install JDK'''
<br>
Android 7.0 development can only use the version of openjdk8, higher or lower than this version and Oracle's JDK will cause the compilation to fail. Openjdk-8 installation command is as follows:

<div style="background:#f1f1f1;border:1px solid #000;">
$ sudo add-apt-repository ppa:openjdk-r/ppa<br>
$ sudo apt-get update<br>
$ sudo apt-get install openjdk-8-jdk
</div>

*'''Configure JAVA environment variables'''
 For example, the installation path is / usr / lib / jvm / java-8-openjdk-amd64. You can run the following command in the terminal to configure the environment variables:

<div style="background:#f1f1f1;border:1px solid #000;">
$ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64<br>
$ export PATH=$JAVA_HOME/bin:$PATH<br>
$ export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
</div>

* '''Install platform support software'''

For Ubuntu 14.04:

<div style="background:#f1f1f1;border:1px solid #000;">
$ sudo apt-get update<br>
$ sudo apt-get install git gnupg flex bison gperf build-essential \ zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \ lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache \ libgl1-mesa-dev libxml2-utils xsltproc unzip<br>

$ sudo apt-get install u-boot-tools
</div>

=== '''Compile SDK source code''' ===

After the SDK is decompressed, there will be two subdirectories andorid and lichee under the decompressed directory. The main contents of the lichee directory are as follows:
<div style="background:#f1f1f1;border:1px solid #000;">
lichee/brandy/u-boot-2014.07&nbsp;&nbsp;&nbsp;&nbsp; #uboot Code directory<br>
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 configuration, packaging tools, etc.
</div>
<br>
'''(1)Kernel compilation process'''
<br>
Enter the following command in the lichee directory:
<div style="background:#f1f1f1;border:1px solid #000;">
$ cd OrangePi_3/lichee<br>
$ ./build.sh config<br>
<br>
Welcome to mkscript setup progress<br>
All available chips:<br>
<p style="padding-left:20px;">
# sun50iw1p1
# sun50iw2p1
# sun50iw6p1
# sun8iw11p1
# sun8iw12p1
# sun8iw6p1
# sun8iw7p1
# sun8iw8p1
# sun9iw1p1
</p>
Choice: 2<br>
All available platforms:
<p style="padding-left:20px;">
# android
# dragonboard
# linux
# eyeseelinux
</p>
Choice: 0<br>
All available business:
<p style="padding-left:20px;">
# 5.1
# 4.4
# 7.x
</p>
Choice: 2
</div>
<br>
The output after compilation is as follows:<br>
<br>
<div style="background:#f1f1f1;border:1px solid #000;">
regenerate rootfs cpio <br>
15757 blocks<br>
17099 blocks<br>
build_ramfs<br>
Copy boot.img to output directory ...<br>
Copy modules to target ...<br>
<br>
sun50iw6p1 compile Kernel successful<br>
INFO: build kernel OK.<br>
<br>
INFO: build rootfs ...<br>
INFO: skip make rootfs for android<br>
INFO: build rootfs OK.<br>
<span style="border-top:1px dashed #000;border-bottom:1px dashed #000;display:inline-block;padding: 10px 0">build sun50iw6p1 android 7.x lichee OK</span>
</div>
<br>
The kernel code is in the lichee / linux-3.10 directory. Executing the above commands will automatically copy the configuration file from lichee / linux-3.10 / arch / arm64 / configs / sun50iw6p1smp_android_7.x_defconfig to lichee / linux-3.10 / .config as the default configuration before compiling , You can run ./build.sh directly in the lichee directory for the next compilation, and will continue to use the previous .config configuration.
'''(2)uboot / boot0 compilation process (optional)'''<br>
<br>
Under normal circumstances, you do not need to recompile uboot, but if you have customized modifications to uboot, you can compile. The compilation method is as follows:
<br>
<br>
<div style="border:1px solid #000;background:#f1f1f1">
cd lichee/brandy/u-boot-2014.07<br>
make distclean && make sun50iw6p1_config && make -j5 # compile uboot<br>
<br>
cd lichee/brandy/u-boot-2014.07<br>
make distclean && make sun50iw6p1_config && make spl # compile boot0<br>
</div>
If uboot / boot0 is not compiled, the default is to use the pre-compiled results of lichee
/ tools / pack / chips / sun50iw6p1 / bin. After recompiling with the above command, the above files will be replaced automatically.
<br>
<br>
'''(3)Android code compilation process'''
<br>
<div style="border:1px solid #000;background:#f1f1f1">
$ cd android<br>
$ source ./build/envsetup.sh<br>
$ lunch '''petrel_fvd_p1-eng'''<br>
$ extract-bsp<br>
$ make -j8 && pack
</div>
<br>
The pack command is to generate the firmware. If the compilation and packaging process passes successfully, the following message will be prompted:
<br>
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
Dragon execute image.cfg SUCCESS !<br>
----------image is at----------<br>
OrangePi_Lite2/lichee/tools/pack/sun50iw6p1_android_petrel-p1_uart0.img<br>
<br>
pack finish
</div>
<br>
According to the prompt, you can see the generated Android firmware sun50iw6p1_android_petrel-p1_uart0.img in the OrangePi_Lite2 / lichee / tools / pack / directory. Below, please refer to the "Android Firmware Burning" section to complete the Android firmware burning.
<br>
<br>
== '''Linux compilation environment setup''' ==
<br>
=== '''Get the Linux SDK source code from Github''' ===
<br>
'''(1)Orange Pi Linux Source Downloader'''<br>
<br>
Orange Pi lite2's Linux source code has been uploaded to GitHub. The currently supported kernel version is Linux 4.9 and the mainline kernel (some drivers are still under development). We can use the Orange Pi Linux source downloader to download and obtain the downloader source code. Here's how:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ sudo apt-get install git<br>
$ git clone '''https://github.com/orangepi-xunlong/OrangePi_Build.git'''<br>
$ cd OrangePi_Build<br>
$ ls<br>
Build_OrangePi.sh lib README.md
</div>
<br>
'''(2)Run the downloader'''
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ ./Build_OrangePi.sh
</div>
<br>
Enter the root password and press enter
<div style="padding-left:200px;">[[文件: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;">[[文件: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;">[[文件: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;">[[文件: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>
<br>
=== '''Get the source code of Linux SDK from Baidu Cloud Disk''' ===
<br>
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:
https://pan.baidu.com/s/15NOF_eAwbN9ah3dfWx0ArQ
=== '''Build a compilation environment''' ===
<br>
The Orange Pi H6 Linux SDK has only been tested on PCs with Ubuntu 18.04. Please prepare the host environment of ubuntu 18.04 before use.<br>
The Linux source directory structure for Orange Pi H6 is shown below:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd OrangePiH6_Linux4.9<br>
$ tree -L 1<br>
.<br>
├── build.sh -> scripts/build.s&nbsp;&nbsp;&nbsp;&nbsp;Compile startup script<br>
├── external&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Store additional configuration files<br>
├── kernel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Linux kernel source<br>
├── output&nbsp;&nbsp;&nbsp;&nbsp;Store output files, only generated after compiling source code<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 directories, 1 file<br>
</div>
<br>
=== '''Compile Linux and U-boot source code''' ===
<br>
'''(1) Execute compile startup script'''
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd OrangePiH6_Linux4.9<br>
$ sudo ./build.sh
</div>
<br>
Select OrangePi lite2 and press Enter
<div>[[文件:Orange-pi-lite2-img5.png|600px]]</div>
The functions of each option are as follows:<br>
<div style="font-weight:700">
* 0 Build Release Image —— Compile ubuntu or debian distribution images
* 1 Build Rootfs —— Compile rootfs for ubuntu or debian
* 2 Build Uboot —— Compile boot0 and u-boot source code
* 3 Build Linux —— Compile Linux kernel source code
* 4 Build Module only —— Compile Linux kernel modules
* 5 Update kernel Image —— Update kernel in SD card Linux system
* 6 Update Module —— Update the kernel module in SD card Linux system
* 7 Update Uboot —— Update boot0 and u-boot and dtb configuration of SD card Linux system
</div>
<div>[[文件: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;">
$ cd output<br>
$ tree -L 2<br>
.<br>
├── images //Generated image file<br>
│ └──<br>
OrangePi_lite2_ubuntu_xenial_server_linux4.9.118_v2.0.2.img<br>
├── kernel //Compile the generated kernel│<br>
── uImage_lite2<br>
├── rootfs //Compile the generated rootfs<br>
├── uboot //Compile the generated uboot image<br>
│ ├── boot0_sdcard_sun50iw6p1.bin<br>
│ ├── H6.dtb<br>
│ └── u-boot-sun50iw6p1.bin<br>
└── xenial_arm64_server_rootfs.tar.gz
</div>
<br>

=== '''Linux SDK usage example''' ===
<br>
The following will fully demonstrate the use of the Linux SDK by adding a rtl8812AU USB WIFI kernel module to the kernel source.<br>
<br>
'''(1)Get the source code of rtl8812AU from github'''
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd OrangePiH6_Linux4.9/kernel/drivers/net/wireless<br>
$ git clone https://github.com/diederikdehaas/rtl8812AU.git<br>
Cloning into 'rtl8812AU'...<br>
remote: Counting objects: 2347, done.<br>
Receiving objects: 100% (2347/2347), 7.87 MiB | 22.00 KiB/s, done.<br>
Resolving deltas: 100% (1292/1292), done.<br>
Checking connectivity... done.
</div>
<br>
'''(2)Add rtl8812AU configuration'''
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd OrangePiH6_Linux4.9/kernel/drivers/net/wireless<br>
$ git diff .<br>
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig<br>
index 373666b..b7ebd5c 100755<br>
--- a/drivers/net/wireless/Kconfig<br>
+++ b/drivers/net/wireless/Kconfig<br>
@@ -294,4 +294,5 @@ source "drivers/net/wireless/rtl8192eu/Kconfig"<br>
+source "drivers/net/wireless/rtl8812AU/Kconfig" endif # WLAN<br>
<br>
diff --git a/drivers/net/wireless/Makefile <br>
b/drivers/net/wireless/Makefile<br>
index fd8a466..3aef800 100755<br>
--- a/drivers/net/wireless/Makefile<br>
+++ b/drivers/net/wireless/Makefile<br>
@@ -66,3 +66,4 @@ obj-$(CONFIG_XR_WLAN) += xradio/<br>
+obj-$(CONFIG_RTL8812AU)&nbsp;&nbsp;+= rtl8812AU/
</div>
<br>
'''(3)Select Realtek 8812A USB WiFi in the kernel configuration and compile it into a kernel module'''
<br>
<div style="padding-left:300px;">[[文件: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;">[[文件:Orange-pi-3-img12.png|300px]]</div>
Partially compiled log looks like this:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
Start Compile.....<br>
Start Compile Module<br>
<p style="padding-left:10px;">
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_cmd.o<br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_security.o <br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_debug.o<br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_io.o<br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_ioctl_query.o <br>
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_ioctl_set.o<br>
</p>
</div>
After compiling, you can find the compiled kernel module in output / lib / modules /
4.9.118 + / kernel / drivers / net / wireless / rtl8812AU
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd output/lib/modules/4.9.118+/kernel/drivers/net/wireless/rtl8812AU<br>
$ ls <br>
'''8812au.ko'''
</div>
<br>
'''(5)Update the kernel module'''
<br>
First, insert the SD card that has been burned with Linux firmware into a PC used
to compile Linux source code (physical or virtual machine with Ubuntu 18.04 installed). After the system recognizes and successfully mounts the inserted SD card, we can / media / $ LOGNAME see the name of the corresponding partition.
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd /media/$LOGNAME<br>
$ ls<br>
BOOT Store the kernel <br>
rootfs Root file system<br>
</div>
<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>[[文件: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.

== '''Android firmware burning''' ==
<br>
 Android firmware cannot be written to the TF card via the dd command in Linux or the Win32 Diskimager tool in Windows. Need to use the tool PhoenixCard to write, PhoenixCard current latest version is PhoenixCard V4.1.2, can be downloaded from the official tool on the official website download page.<br>
<br>
=== '''Android firmware burning steps''' ===
<br>
'''(1)Format TF card'''<br>
<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>[[文件:Orange-pi-3-img14.png|800px]]</div>
<div>[[文件:Orange-pi-3-img15.png|800px]]</div>
<br>
'''(2)Then select firmware, select boot card.'''
<br>
Please note the red mark in the picture below:
<br>
<br>
<div>[[文件: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>[[文件: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>

== '''Linux firmware burning''' ==
<br>
We can burn the Linux firmware of Orange Pi Lite 2 into the TF card through Etcher. Since Orange Pi Lite 2 has no on-board eMMC, we can only start the system through TF. Etcher supports the following operating systems:<br>
* Linux (most distributions, such as Ubuntu)
* MacOS 10.9 and later
* Windows 7 and later
The Etcher software installation package can be downloaded from its official website https://etcher.io/, or it can be downloaded from the official tools on the official download page of Orange Pi Lite 2.<br>
<br>
=== '''How to install Etcher''' ===
<br>
* The installation method of Etcher in Windows is the same as that of ordinary software
* Etcher is installed on Ubuntu and Debian systems as follows
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
1.Add Etcher Debian repository:<br>
$ echo "deb https://dl.bintray.com/resin-io/debian stable etcher" | sudo tee /etc/apt/sources.list.d/etcher.list<br>
<br>
2.Download the key<br>
$ sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 379CE192D401AB61
<br>
<br>
3.Update and install<br>
$ sudo apt-get update && sudo apt-get install etcher-electron
<br>
<br>
4.Uninstallation method<br>
$ sudo apt-get remove etcher-electron<br>
$ sudo rm /etc/apt/sources.list.d/etcher.list && sudo apt-get update
</div>
<br>
=== '''How to flash Linux firmware through Etcher''' ===
<br>
'''(1)First open Etcher, its interface is shown below'''<br>
<br>
<div>[[文件:Orange-pi-3-img24.png|800px]]</div>
<br>
'''(2)Then use "Select image" to select the Linux firmware to be burned'''<br>
<br>
'''(3)Then insert the TF card, Etcher will automatically identify the corresponding drive'''<br>
<br>
'''(4)Finally, click “Flash!” To start burning. After burning, you can insert the development board to start the system.'''<br>
<br>
<div>[[文件:Orange-pi-3-img25.png|800px]]</div>
<br>

== '''Instructions for use of Linux system''' ==
<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 the system operating card is prepared, the rootfs partition of the file system should be expanded immediately. This will greatly improve the performance of the system and avoid various complicated problems caused by insufficient space.<br>
<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;">
The amount of free space in the system before expansion
</div>
root@OrangePi:~# df -h
<table>
<tr>
<td>Filesystem</td>
<td>Size</td>
<td>Used </td>
<td>Avail </td>
<td>Use%</td>
<td>Mounted on</td>
</tr>
<tr style="font-weight:700;">
<td>/dev/mmcblk0p2</td>
<td>1.1G</td>
<td>520M</td>
<td>488M</td>
<td>52%</td>
<td>/</td>
</tr>
<tr>
<td>devtmpfs</td>
<td>481M</td>
<td>0</td>
<td>481M</td>
<td>0%</td>
<td>/dev</td>
</tr>
<tr>
<td>tmpfs </td>
<td>489M</td>
<td>0</td>
<td>489M</td>
<td>0%</td>
<td>/dev/shm</td>
</tr>
<tr>
<td>tmpfs </td>
<td>489M</td>
<td>6.6M</td>
<td>489M</td>
<td>2%</td>
<td>/run</td>
</tr>
<tr>
<td>tmpfs </td>
<td>5.0M</td>
<td>4.0K</td>
<td>5.0M</td>
<td>1%</td>
<td>/run/lock</td>
</tr>
<tr>
<td>tmpfs</td>
<td>489M</td>
<td>0</td>
<td>489M</td>
<td>0%</td>
<td>/sys/fs/cgroup</td>
</tr>
<tr>
<td>/dev/mmcblk1p1</td>
<td>50M</td>
<td>29M</td>
<td>22M</td>
<td>58%</td>
<td>/boot</td>
</tr>
</table>
<br>
<div style="font-weight:700;">
Run the built-in expansion script
</div>
root@OrangePi:~# resize_rootfs.sh<br>
<br>
<div style="font-weight:700;">
The amount of space available in the system after the expansion
</div>
root@OrangePi:~# df -h<br>
<br>
<table>
<tr>
<td>Filesystem</td>
<td>Size</td>
<td>Used </td>
<td>Avail </td>
<td>Use%</td>
<td>Mounted on</td>
</tr>
<tr style="font-weight:700;">
<td>/dev/mmcblk0p2</td>
<td>7.2G</td>
<td>539M</td>
<td>6.4G</td>
<td>8%</td>
<td>/</td>
</tr>
<tr>
<td>devtmpfs</td>
<td>481M</td>
<td>0</td>
<td>481M</td>
<td>0%</td>
<td>/dev</td>
</tr>
<tr>
<td>tmpfs </td>
<td>489M</td>
<td>0</td>
<td>489M</td>
<td>0%</td>
<td>/dev/shm</td>
</tr>
<tr>
<td>tmpfs </td>
<td>489M</td>
<td>13M</td>
<td>477M</td>
<td>3%</td>
<td>/run</td>
</tr>
<tr>
<td>tmpfs </td>
<td>5.0M</td>
<td>4.0K</td>
<td>5.0M</td>
<td>1%</td>
<td>/run/lock</td>
</tr>
<tr>
<td>tmpfs</td>
<td>489M</td>
<td>0</td>
<td>489M</td>
<td>0%</td>
<td>/sys/fs/cgroup</td>
</tr>
<tr>
<td>/dev/mmcblk1p1</td>
<td>50M</td>
<td>29M</td>
<td>22M</td>
<td>58%</td>
<td>/boot</td>
</tr>
</table>
</div>
<br>
=== '''Recording playback test method''' ===
<br>
<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>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
root@orangepilite2:~# 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@orangepilite2:~#
</div>
<br>
'''(2)Test the HDMI playback function, just use the aplay command to play'''<br>
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
root@orangepilite2:~# aplay Test.wav
</div>
<br>
<br>

=== '''WIFI configuration method''' ===
<br>
Add the following configuration to / etc / network / interface and restart<br>
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
auto wlan0<br>
iface wlan0 inet dhcp<br>
wpa-ssid orangepi&nbsp;&nbsp;&nbsp;&nbsp;//Fill in the WIFI account here(orangepi)<br>
wpa-psk orangepi&nbsp;&nbsp;&nbsp;&nbsp;//Fill in the WIFI password here(orangepi)<br>
</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;">[[文件:Orange-pi-3-img28.png|800px]]</div>
Connect the serial cable as shown in the figure below. From the silk screen on the back of the board, you can see that the corresponding functions of the different colors are as follows<br>
* Black—GND
* Green-RX
* White-TX
<div style="padding-left:200px;">[[文件:Orange-pi-lite2-img6.png|800px]]</div>
<br>
=== '''Use on Windows platform''' ===
<br>
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>[[文件:Orange-pi-3-img30.png|800px]]</div>
Select application installation as administrator<br>
<div style="padding-left:200px;">[[文件:Orange-pi-3-img31.png|800px]]</div>
Wait for the installation to complete
<div style="padding-left:200px;">[[文件:Orange-pi-3-img32.png|800px]]</div>
'''(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;">[[文件:Orange-pi-lite2-img7.png|600px]]</div>
'''(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>[[文件:Orange-pi-3-img33.png|800px]]</div>
<br>
'''(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>[[文件:Orange-pi-3-img34.png|800px]]</div>
'''(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>
'''(1)Install and launch Putty'''<br>
<div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;">
$ sudo apt-get install putty<br>
$ sudo putty
</div>
<br>
'''(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>[[文件:Orange-pi-3-img35.png|800px]]</div>

== '''History''' ==
<br>
<table cellspacing='0' cellpadding='0' border='1' bordercolor='#d8d8d8' style="width:800px;text-align:center;">
<tr style="background:#b7b7b7;height:50px;">
<td>Ver</td><td>Data</td><td>Author</td><td>Brief</td><td>Publish</td><td>Memo</td>
</tr>
<tr style="height:50px;">
<td>1.0</td><td>2018-05-07</td><td>Leeboby</td><td>Create Files</td><td></td><td></td>
</tr>
<tr style="height:50px;">
<td>1.0</td><td>2019-7-10</td><td>Leeboby</td><td>Update audio instructions</td><td></td><td></td>
</tr>
<tr style="height:50px;">
<td>1.0</td><td>2019-12-16</td><td>Leeboby</td><td></td><td></td><td></td>
</tr>
<tr style="height:50px;">
<td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr style="height:50px;">
<td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr style="height:50px;">
<td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr style="height:50px;">
<td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr style="height:50px;">
<td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
</table>
<br>
For more information on using the Orange Pi Lite 2, please see the <span style="color:red;">Orange Pi Lite 2 User Manual</span>. (Click to download)

Navigation menu