P573811-Orangepi 3 - User Manual - v1.0 PDF
P573811-Orangepi 3 - User Manual - v1.0 PDF
P573811-Orangepi 3 - User Manual - v1.0 PDF
Orange Pi 3
User Manual
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
History
Contents
I. Orange Pi One Plus Introduction........................................................................................................... 1
1. What is Orange Pi 3?..................................................................................................................... 1
2. What can I do with Orange Pi 3?...................................................................................................1
3. Whom is it for?.............................................................................................................................. 1
4. Hardware specification of Orange Pi 3......................................................................................... 4
Hardware specification....................................................................................................... 4
Interface definition..............................................................................................................5
5. GPIO Specifications...................................................................................................................... 6
II. Using Method Introduction...............................................................................................................7
1. Hardware and Software Requirement........................................................................................... 7
2. Power Supply Requirement........................................................................................................... 7
III. Android Compilation Environment Construction........................................................................... 8
1. Download SDK compression package.......................................................................................... 8
2. Construct Compilation Environment.............................................................................................8
3. Compilation of SDK Source Code................................................................................................ 9
IV. Linux Environment Construction..................................................................................................12
1. Download SDK compression package........................................................................................ 12
2. Construct Compilation Environment...........................................................................................14
3. Configure Linux and U-boot Source Code..................................................................................15
4. Linux SDK Usage Sample...........................................................................................................17
V. Android Firmware Flash................................................................................................................. 20
1. Steps for Android Firmware Flashing(Boot from SD Card).......................................................20
2. Steps for Android Firmware Flashing(Boot from EMMC Flash with SD Card)........................22
VI. Linux Firmware Flash................................................................................................................... 25
1. Install Etcher................................................................................................................................ 25
2. Flash Linux Firmware via Etcher................................................................................................ 26
3. Flash linux Firmware into EMMC Flash with Scripts................................................................ 27
VII. Linux System Usage.................................................................................................................... 28
1. Reflect when booting with Linux................................................................................................ 28
2. Login account and password....................................................................................................... 28
3. Expand rootfs partition................................................................................................................ 28
4. Record and Play Sound................................................................................................................29
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
5. WIFI configuration...................................................................................................................... 31
6. Test Method of PCIE Interface.................................................................................................... 31
VIII. Using Debug tools...................................................................................................................... 33
Prepare a USB to TTL cable like the following:..................................................................................... 33
1. Operation Steps on Windows...................................................................................................... 34
2. Operation Steps on Linux............................................................................................................ 37
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
1. What is Orange Pi 3?
3. Whom is it for?
Orange Pi 3 is for anyone who wants to create with technology– not just
consuming. It's a simple, fun, useful tool and you can use it to take control of
the world around you.
www.orangepi.org 1 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
www.orangepi.org 2 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
www.orangepi.org 3 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Hardware specification
CPU H6 Quad-core 64-bit 1.8GHZ ARM Cortex™-A53
GPU • High-performance multi-core GPU Mali T720
• OpenGL ES3.1/3.0/2.0/1.1
www.orangepi.org 4 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
PMU AXP805
USB 2.0 Ports 1*USB 2.0 Host, 1*USB OTG 2.0
USB 3.0 Ports 4*USB 3.0 Host
Low-level 26 Pin
peripherals
GPIO(1x3) pin UART, ground.
LED
Power LED、Status LED and USB3.0 LED
IR YES
Key Power(SW4)
Supported OS Android7.0, Ubuntu, Debian
Interface definition
Product size 90mm*64mm
Weight 75g
www.orangepi.org 5 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
5. GPIO Specifications
www.orangepi.org 6 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Software Requirements:
Orange Pi 3 SDK
Orange Pi 3 Firmware
Android and Linux flash tool
Below files could be downloaded from Github and Mega, more details pls visit our
website:
https://github.com/orangepi-xunlong
http://www.orangepi.org/downloadresources/
www.orangepi.org 7 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
The following operations are based on Ubuntu 14.04, there might be some difference if
you are working with Ubuntu or Linux distro。
Install JDK
It could only works on version openjdk8 for Android 7.0 compilation, it would cause failure if the
$ 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
www.orangepi.org 8 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
There would be android and lichee two directories after unzipped SDK package, contents
on lichee are as following
$ cd OrangePi_3/lichee
$ ./build.sh config
www.orangepi.org 9 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
3. eyeseelinux
Choice: 0
All available business:
0. 5.1
1. 4.4
2. 7.x
Choice: 2
After the above compilation, you will get the following output:
Kernel code is on the directory of lichee/linux-3.10.The system would copy the configure
file from lichee/linux-3.10/arch/arm64/configs/sun50iw6p1smp_android_7.x_defconfig
to lichee/linux-3.10/.config as default configure when you input the above compilation
command.
In the next compilation, you could run ./build.sh on lichee directory and go on with
previous .config configure.
www.orangepi.org 10 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
cd lichee/brandy/u-boot-2014.07
make distclean && make sun50iw6p1_config && make -j5 #编译 uboot
cd lichee/brandy/u-boot-2014.07
make distclean && make sun50iw6p1_config && make spl #编译 boot0
It would be replaced the default command if recompiled with the above command.
$ cd android
$ source ./build/envsetup.sh
$ lunch petrel_fvd_p1-eng
$ extract-bsp
$ make -j8 && pack
The pack command is to pack it into firmware, if it is packed successfully, then there would be the
following information:
OrangePi_3/lichee/tools/pack/sun50iw6p1_android_petrel-p1_uart0.img
pack finish
According to the above prompt, you could check the generated firmware of
sun50iw6p1_android_petrel-p1_uart0.img on the directory of
OrangePi_3/lichee/tools/pack/. About Android image flashing, you could refer to the
section of Android image flashing
www.orangepi.org 11 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Run Downloader
$ ./Build_OrangePi.sh
Choose 0 Build system with kernel/uboot/rootfs enter the interface of model selection of
development board
www.orangepi.org 12 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Choose 19 orangepi 3, click enter, then it will be started to download the linux SDK for Orange
Pi 3
$ ls ../OrangePi_Build
OrangePi_Build OrangePiH6
www.orangepi.org 13 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
6 directories, 1 file
The directory structure of cross compile tool chain is shown below. If the source code is
different from it, or it is empty in the directory of toolchain,which means there are errors
during the download, please download the source code again with OrangePi_Build
$ cd toolchain
$ tree -L 2
.
└── gcc-linaro-aarch
├── aarch64-linux-gnu
├── bin
├── gcc-linaro Store tool train for u-boot compile
├── gcc-linaro-4.9-4.9-2015.01-3-2015.02-3-manifest.txt
├── include
├── lib
├── libexec
└── share
8 directories, 1 file
www.orangepi.org 14 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Input password of root and Enter, the select the function you want to run
www.orangepi.org 15 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
You need to first compile kernel source code before compile U-boot, otherwise the
dtc program maybe cannot find.
The generated file will store on output directory
$ cd output
$ tree -L 2
.
├── boot0.bin
├── initrd.img
├── lib
│ └── modules
├── OrangePiH6.dtb
├── pack
│ └── out
├── uboot.bin
├── uEnv.txt
└── uImage
4 directories, 6 files
www.orangepi.org 16 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
www.orangepi.org 17 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
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
www.orangepi.org 18 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
The compiled module would be listed on
output/lib/modules/3.10.65+/kernel/drivers/net/wireless/rtl8812AU after compiled.
$ cd output/lib/modules/3.10.65+/kernel/drivers/net/wireless/rtl8812AU
$ ls
8812au.ko
Update kernel module
Insert SD card with Linux firmware into PC(installed Ubuntu 14.04 virtual or virtual PC), when the
system recognized and mounted SD card, you could check corresponding partition name on
/media/$LOGNAME
$ cd /media/$LOGNAME
$ ls
BOOT Store kernel and OrangePiH6.dtb file
rootfs Rootfs file system
Refer to the section of compile Linux and U-boot on Linux environment construction, then select 4
Update Module to update kernel module
Enter path of root file partition, and Enter, the scripts will copy kernel module into SD card auto.
Boot the board with SD card with USB WIFI card driver of 8812au.ko kernel module.
www.orangepi.org 19 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Android firmware cannot be flashed into SD card with dd command or writing with
Win32 Diskimager on Windows. PhoenixCard card could be used for Android firmware
flash. The latest version of PhoenixCard is PhoenixCard V4.1.2
Format TF Card
Check whether card disk as same for TF card and selected disk, click restore to format SD card
www.orangepi.org 20 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
After finished Android flash, click close and you could use this SD card with written
image to boot.
www.orangepi.org 21 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
If you bought the orange pi 3 with EMMC flash slodered on board, then you could flash the
Android image into EMMC with SD Card, and then boot it from EMMC. If you bought the orange pi
3 without EMMC Flash soldered on board, then you could boot it from sd card only.
As shown in the figure below, the Orange Pi 3 development board with EMMC Flash chip is on
the left, but not on the right
The Steps of flashing image into EMMC flash with SD card are as follow:
Format TF Card
Check whether card disk as same for TF card and selected disk, click restore to format SD card
-Product’
Note the red marking in the following picture:
www.orangepi.org 22 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
After finished Android flash, click close-关闭 and you could use this SD card with
written image to boot. When you power the board, it will auto. transfer the image from sd
www.orangepi.org 23 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
card into emmc, the red led onboard will be twinkled until the end. You could check the
following buring interface via the HDMI
When it finished, unplug the power supply and sd card, the board with boot from emmc.
www.orangepi.org 24 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
We could use Etcher to write Linux Firmware into TF card and boot the Orange Pi 3
with TF card. If you bought the orange pi 3 without EMMC Flash, then you could only
boot from sd card. Etcher supports following computer system:
1. Install Etcher
2. Download key
4. Upload
$ sudo apt-get remove etcher-electron
$ sudo rm /etc/apt/sources.list.d/etcher.list && sudo apt-get update
www.orangepi.org 25 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Click “Flash!” , after finished, boot the board with inserting the TF card
www.orangepi.org 26 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
root@OrangePi:~# OrangePi_install2EMMC.sh
Creating "fstab"
*******************************
Linux system installed to EMMC.
*******************************
www.orangepi.org 27 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
We could use the built-in scripts of resize_rootfs.sh to expansion after enter into system
The size of the available space before expansion of the system
root@OrangePi:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk1p2 1.1G 981M 28M 98% /
devtmpfs 985M 0 985M 0% /dev
tmpfs 994M 0 994M 0% /dev/shm
tmpfs 994M 8.9M 985M 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 994M 0 994M 0% /sys/fs/cgroup
/dev/mmcblk1p1 50M 15M 36M 30% /boot
tmpfs 199M 0 199M 0% /run/user/0
root@OrangePi:~#
www.orangepi.org 28 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
编译完的可执行文件放在 out/tinyalsa-arm64 中
$ cd out/tinyalsa-arm64
$ ls
libtinyalsa.so tinycap_ahub tinypcminfo tinyplay_ahub
tinycap tinymix tinyplay
www.orangepi.org 29 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
$ cat /proc/asound/cards
0 [sndahub ]: sndahub - sndahub
sndahub
1 [sndhdmi ]: sndhdmi - sndhdmi
sndhdmi
2 [snddaudio2 ]: snddaudio2 - snddaudio2
snddaudio2
3 [sndacx00codec ]: sndacx00-codec - sndacx00-codec
sndacx00-codec
www.orangepi.org 30 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
5. WIFI configuration
Add the following configuration under /etc/network/interface, then restart the orange pi 3:
auto wlan0
iface wlan0 inet dhcp
wpa-ssid orangepi //enter the wifi account(it is orangepi right now)
wpa-psk orangepi //enter the wifi WIFI password(it is orangepi right now)
The lsmod command can be used to check whether the driver is loaded successfully, and the
ifconfig command can be used to check the corresponding network nodes of the PCIE wireless
network card
root@OrangePi:~# lsmod
Module Size Used by
www.orangepi.org 31 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
88x2be 2116402 0
ss 44426 0
rtk_btusb 37346 0
sunxi_ir_rx 10075 0
bcmdhd 721838 0
root@OrangePi:~# ifconfig
eth0 Link encap:Ethernet HWaddr 72:d6:05:4f:b9:3b
inet addr:192.168.1.131 Bcast:192.168.1.255
inet6 addr: fe80::70d6:5ff:fe4f:b93b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:112 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9214 (9.2 KB) TX bytes:2056 (2.0 KB)
Interrupt:44
www.orangepi.org 32 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Connect the debug port with cable like the following, or you could check the function
onthe board silk
Black——GND
Green——RX
White——TX
www.orangepi.org 33 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
www.orangepi.org 34 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Install Putty
You could download Putty from the following address and select a suitable version to your are
development environment
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
www.orangepi.org 35 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
在 Windows7 中,我们可以通过设备管理器查看串口连接是否正常以及串口的
设备号。如果设备没有正常识别,请检查驱动是否安装成功。如果驱动安装有问题,
可以尝试使用 360 驱动大师扫描安装驱动。
www.orangepi.org 36 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Putty Configure
Serial port should set to the corresponding port number (COM4), close
flow control and set the speed as 115200
When running putty, , there is not too much difference on Linux platform or Windows
platform. Here the instruction is based on Ubuntu 14.04 OS
Install and start Putty
$ sudo apt-get install putty
$ sudo putty
www.orangepi.org 37 www.xunlong.tv
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd.
Configure Putty
Check serial number via ls /dev/ttyUSB*
Set baud rate into 115200
Close flow control
www.orangepi.org 38 www.xunlong.tv