Open main menu

Wiki-Orange Pi β

Orange Pi One Plus

Orange Pi One Plus Basic Features


What is Orange Pi One Plus?


 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.

What Orange Pi One Plus does?


We can use it to build:

  • 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.

For whom the Orange Pi One Plus Designed?


 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.

Orange Pi One Plus hardware features




GPIO specifications


The following figure is the GPIO pin function diagram of Orange Pi One Plus:

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


Development board instructions


Prepare hardware and software tools


Hardware requirements:

  • 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:

64bit CPU;
8 GB memory and above
100GB of free disk space;

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

http://www.orangepi.cn/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-pi-One-Plus.html
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-pi-One-Plus.html

Development board power supply


There are two ways to power the development board:

  • DC (5V 2A) power supply:

Plug in the DC adapter and it will power on.

  • Micro USB (5V 2A) OTG power supply:

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.

$ mkdir OrangePi_OnePlus
$ cat H6-2018-1-2.tar.gza* > OrangePi_OnePlus.tar
$ tar xf OrangePi_OnePlus.tar -C OrangePi_OnePlus

Build a compilation environment

  • Install JDK


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:

$ sudo add-apt-repository ppa:openjdk-r/ppa
$ sudo apt-get update
$ sudo apt-get install openjdk-8-jdk

  • 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:

$ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
$ export PATH=$JAVA_HOME/bin:$PATH
$ export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar

  • Install platform support software

For Ubuntu 14.04:

$ sudo apt-get update
$ 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

$ sudo apt-get install u-boot-tools

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:

lichee/brandy/u-boot-2014.07     #uboot Code directory
lichee/bootloader/uboot_2014_sunxi_spl   #boot0 Code directory
lichee/linux-3.10      #Kernel code
lichee/tools       #Solution hardware
configuration, packaging tools, etc.


Enter the following command in the lichee directory:

$ cd OrangePi_OnePlus/lichee
$ ./build.sh config

Welcome to mkscript setup progress
All available chips:

  1. sun50iw1p1
  2. sun50iw2p1
  3. sun50iw6p1
  4. sun8iw11p1
  5. sun8iw12p1
  6. sun8iw6p1
  7. sun8iw7p1
  8. sun8iw8p1
  9. sun9iw1p1

Choice: 2
All available platforms:

  1. android
  2. dragonboard
  3. linux
  4. eyeseelinux

Choice: 0
All available business:

  1. 5.1
  2. 4.4
  3. 7.x

Choice: 2


The output after compilation is as follows:

regenerate rootfs cpio
15757 blocks
17099 blocks
build_ramfs
Copy boot.img to output directory ...
Copy modules to target ...

sun50iw6p1 compile Kernel successful
INFO: build kernel OK.

INFO: build rootfs ...
INFO: skip make rootfs for android
INFO: build rootfs OK.
build sun50iw6p1 android 7.x lichee OK


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.

  • uboot / boot0 compilation process (optional)


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:

cd lichee/brandy/u-boot-2014.07
make distclean && make sun50iw6p1_config && make -j5 # compile uboot

cd lichee/brandy/u-boot-2014.07
make distclean && make sun50iw6p1_config && make spl # compile boot0

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.

  • Android code compilation process


$ cd android
$ source ./build/envsetup.sh
$ lunch petrel_fvd_p1-eng
$ extract-bsp
$ make -j8 && pack


The pack command is to generate the firmware. If the compilation and packaging process passes successfully, the following message will be prompted:

Dragon execute image.cfg SUCCESS !


image is at----------

OrangePi_OnePlus/lichee/tools/pack/sun50iw6p1_android_petrel-p1_uart0.img

pack finish


According to the prompt, you can see the generated Android firmware sun50iw6p1_android_petrel-p1_uart0.img in the OrangePi_OnePlus / lichee / tools / pack / directory. Below, please refer to the "Android Firmware Burning" section to complete the Android firmware burning.

Linux compilation environment setup


Get the Linux SDK source code from Github


  • Orange Pi Linux Source Downloader


Orange Pi One Plus'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. The way is as follows:

$ sudo apt-get install git
$ git clone https://github.com/orangepi-xunlong/OrangePi_Build.git
$ cd OrangePi_Build
$ ls
Build_OrangePi.sh lib README.md


  • Run the downloader


$ ./Build_OrangePi.sh


Enter the root password and press enter


Select 0 Build system with uboot / kernel / rootfs / image to enter the interface of development board model selection.


Select orangepi oneplus, enter the kernel version selection interface after entering


At present, the orangepi oneplus 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.

The downloaded source code will be stored in the same directory of OrangePi_Build

$ ls ../OrangePi_Build -l OrangePi_Build

OrangePiH6_Linux4.9 (Where the kernel version is Linux4.9)
OrangePiH6_mainline (The current kernel version is Linux5.3.5)


Get the source code of Linux SDK from Baidu Cloud Disk


If GitHub fails to download the code, you can download the source code compression package of Linux SDK directly from Baidu Cloud Disk.
Download link is:

 http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-pi-One-Plus.html

Build a compilation environment


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.
The Linux source directory structure for Orange Pi H6 is shown below:

$ cd OrangePiH6_Linux4.9
$ tree -L 1
.
├── build.sh -> scripts/build.s    Compile startup script
├── external       Store additional configuration files
├── kernel       Linux kernel source
├── output    Store output files, only generated after compiling source code
├── scripts    Script files used during compilation
├── toolchain    Cross-compilation toolchain used by the kernel and u-boot
└── uboot    Store boot0 and u-boot source code
6 directories, 1 file


Compile Linux and U-boot source code


  • Execute compile startup script


$ cd OrangePiH6_Linux4.9
$ sudo ./build.sh


Select OrangePi oneplus and press Enter

The functions of each option are as follows:

  • 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

The final file generated by the compilation will be saved in the output directory


$ cd output
$ tree -L 2
.
├── images //Generated image file
│ └──
OrangePi_oneplus_ubuntu_xenial_server_linux4.9.118_v2.0.2.img
├── kernel //Compile the generated kernel│
── uImage_oneplus
├── rootfs //Compile the generated rootfs
├── uboot //Compile the generated uboot image
│ ├── boot0_sdcard_sun50iw6p1.bin
│ ├── H6.dtb
│ └── u-boot-sun50iw6p1.bin
└── xenial_arm64_server_rootfs.tar.gz


Linux SDK usage example


The following will fully demonstrate the use of the Linux SDK by adding a rtl8812AU USB WIFI kernel module to the kernel source.

  • Get the source code of rtl8812AU from github


$ cd OrangePiH6_Linux4.9/kernel/drivers/net/wireless
$ git clone https://github.com/diederikdehaas/rtl8812AU.git
Cloning into 'rtl8812AU'...
remote: Counting objects: 2347, done.
Receiving objects: 100% (2347/2347), 7.87 MiB | 22.00 KiB/s, done.
Resolving deltas: 100% (1292/1292), done.
Checking connectivity... done.


  • Add rtl8812AU configuration


$ cd OrangePiH6_Linux4.9/kernel/drivers/net/wireless
$ git diff .
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 373666b..b7ebd5c 100755
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -294,4 +294,5 @@ source "drivers/net/wireless/rtl8192eu/Kconfig"
+source "drivers/net/wireless/rtl8812AU/Kconfig" endif # WLAN

diff --git a/drivers/net/wireless/Makefile
b/drivers/net/wireless/Makefile
index fd8a466..3aef800 100755
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -66,3 +66,4 @@ obj-$(CONFIG_XR_WLAN) += xradio/
+obj-$(CONFIG_RTL8812AU)  += rtl8812AU/


  • Select Realtek 8812A USB WiFi in the kernel configuration and compile it into a kernel module


  • Recompile the kernel according to the method in `` Compiling Linux and U-boot Source

Partially compiled log looks like this:

Start Compile.....
Start Compile Module

CC [M] drivers/net/wireless/rtl8812AU/core/rtw_cmd.o
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_security.o
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_debug.o
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_io.o
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_ioctl_query.o
CC [M] drivers/net/wireless/rtl8812AU/core/rtw_ioctl_set.o

After compiling, you can find the compiled kernel module in output / lib / modules / 4.9.118 + / kernel / drivers / net / wireless / rtl8812AU

$ cd output/lib/modules/4.9.118+/kernel/drivers/net/wireless/rtl8812AU
$ ls
8812au.ko


  • Update the kernel module


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.

$ cd /media/$LOGNAME
$ ls
BOOT Store the kernel
rootfs Root file system


Then choose 6 Update Module to update the kernel module according to the instructions in the section `` Compiling Linux and U-boot Source


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


 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.

Android firmware burning steps


  • Format TF card


Check whether the inserted TF card is consistent with the selected drive letter, click the "Restore Card" button to start formatting the TF


  • Then select firmware, select boot card.


Please note the red mark in the picture below:

(3)Click "Burn Card" to start writing to the TF card and wait for the burning to complete.

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

Linux firmware burning


We can burn the Linux firmware of Orange Pi One Plus into the TF card through Etcher. Since Orange Pi One Plus does not have eMMC onboard, we can only start the system through TF. Etcher supports the following operating systems:

  • 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 tool of the Orange Pi One Plus official website download page

Etcher installation method


  • The installation method of Etcher in Windows is the same as that of ordinary software, so I won't go into details here.
  • Etcher is installed on Ubuntu and Debian systems as follows

1.Add Etcher Debian repository:
$ echo "deb https://dl.bintray.com/resin-io/debian stable etcher" | sudo tee /etc/apt/sources.list.d/etcher.list

2.Download the key
$ sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 379CE192D401AB61

3.Update and installation
$ sudo apt-get update && sudo apt-get install etcher-electron

4.Uninstall method
$ sudo apt-get remove etcher-electron
$ sudo rm /etc/apt/sources.list.d/etcher.list && sudo apt-get update


How to flash Linux firmware through Etcher


  • First open Etcher, its interface is shown below



  • 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.



Instructions for Linux systems


Linux boot light description


  • After booting, the onboard LED light will first turn on the red light, then the red light will be off and the yellow light will be on.
  • The network port light will not turn on without a network cable
  • If the network cable is plugged in after power on, the network port light will turn on. After a period of time, the network port light will turn off for about 2 seconds and then turn on again.


Login account and password


Username root, password: orangepi
Username orangepi, password: orangepi

Extend rootfs partition


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.

We can use the system's built-in script resize_rootfs.sh to expand the capacity after entering the system:

The amount of free space in the system before expansion

root@OrangePi:~# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 1.1G 520M 488M 52% /
devtmpfs 481M 0 481M 0% /dev
tmpfs 489M 0 489M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 489M 0 489M 0% /sys/fs/cgroup
/dev/mmcblk1p1 50M 29M 22M 58% /boot


Run the built-in expansion script

root@OrangePi:~# resize_rootfs.sh

The amount of space available in the system after the expansion

root@OrangePi:~# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 7.2G 539M 6.4G 8% /
devtmpfs 481M 0 481M 0% /dev
tmpfs 489M 0 489M 0% /dev/shm
tmpfs 489M 13M 477M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 489M 0 489M 0% /sys/fs/cgroup
/dev/mmcblk1p1 50M 29M 22M 58% /boot


Recording playback test method


Note: The Audio Codec audio driver for the mainline kernel is not yet available

  • Test recording function


root@orangepioneplus:~# arecord -d 10 -f cd -D hw:1,0 -t wav Test.wav
Recording WAVE 'Test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Stereo
root@orangepioneplus:~#


  • Test the HDMI playback function, just use the aplay command to play


root@orangepioneplus:~# aplay Test.wav


  • Test headset playback


root@orangepioneplus:~# aplay -D hw:1,0 Test.wav


Introduction to serial debugging tools


First you need to prepare a USB to TTL serial cable similar to the following figure:

Connect the serial port cable as shown in the figure below. From the silk screen on the back of the board, you can see that the functions of the cables of different colors are as follows:

  • Black—GND
  • Green-RX
  • White-TX


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.

  • Install USB driver


Download the latest driver PL2303_Prolific_DriverInstaller_v130.zip, download and unzip.

Select application installation as administrator

Wait for the installation to complete

  • Download and install Putty


Putty can be downloaded from the following address, please choose the version suitable for your development environment.

 https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Double-click the downloaded putty.exe directly to open putty. The software interface is shown in the figure below.


  • Acquisition of equipment information


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 normally, please check whether the driver is successfully installed. If there is a problem with the driver installation, you can try to use 360 Driver Master to scan and install the driver.


  • Putty configuration


 Set the serial port to the corresponding port number (COM4), disable flow control, and set the speed to 115200

  • Start debugging serial output


OrangePi is powered on and putty will automatically print serial port log information

Use on Linux platform


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.

  • Install and launch Putty

$ sudo apt-get install putty
$ sudo putty


  • Configure Putty


The serial number can be viewed through ls / dev / ttyUSB *
Baud rate needs to be set to 115200
And turn off flow control

History


VerDataAuthorBriefPublishMemo
1.02018-05-07LeebobyCreate document
1.02019-7-10LeebobyUpdate audio instructions
1.02019-12-16Leeboby


Download the Orange Pi One Plus User Manual


For more information on using the Orange Pi One Plus, please see the Orange Pi One Plus User Manual. (Click to download)