Orange PI

Shenzhen Orange PI User manual

  • Hello! I am an AI chatbot trained to assist you with the Shenzhen Orange PI User manual. I’ve already reviewed the document and can help you find the information you need or explain it in simple terms. Just ask your questions, and providing more details will help me assist you more effectively!
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 1 www.xunlong.tv
Orange Pi Manual
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 2 www.xunlong.tv
Content
I.Orange Pi Introduction ................................................................................................................................. 4
1.What is Orange Pi .................................................................................................................... 4
2.What can I do with Orange Pi? ............................................................................................... 4
3.Whom is it for? ............................................................................................................................ 4
4.Hardware specification ................................................................................................................ 4
5.Using Method .............................................................................................................................. 9
6.Configuration Software ..............................................................................................................23
7.GPIO Specifications ...................................................................................................................37
II.Linux Kernel Source Code Compilation ....................................................................................................41
1.Obtain the Source Code of Development ...................................................................................42
2.Compile Project ..........................................................................................................................43
3.Update the kernel image file and Library ...................................................................................45
III.Android Kernel Source Code Compilation ...............................................................................................49
1.Install JDK ..................................................................................................................................50
2.Install Platform Supported Software ...........................................................................................51
3.Download the Source Package and Unzip it ...............................................................................51
4.Install The Compiler Tool Chain ................................................................................................52
5.Compile Linux source Code .......................................................................................................52
6.Compile Android Code ...............................................................................................................53
IV.Use Project Configuration Files ...............................................................................................................57
1.Update System Project Configuration File .................................................................................57
2.Update Boot and U-boot .............................................................................................................58
3.Samples.......................................................................................................................................58
VOrangePi Driver development ................................................................................................................66
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 3 www.xunlong.tv
1.Device driver and application demo code ...................................................................................67
2.Compile device driver ................................................................................................................69
3.Corss-complile or compiled Application code ...........................................................................73
4.Running demo ............................................................................................................................75
VIUsing Debug tools on OrangePi ............................................................................................................77
Operation Steps on Windows ........................................................................................................78
a. Install driver for TTL to USB cable on Windows ......................................................................78
b.Install putty on Windows ............................................................................................................79
c. Connect style ..............................................................................................................................79
d.Equipment information acquisition ............................................................................................80
e. Open putty configuration ............................................................................................................82
f. Start debug ..................................................................................................................................82
Operation steps on Linux ...............................................................................................................83
a. Install Kermit ..............................................................................................................................83
b.Connect style ..............................................................................................................................85
c. Setting kermit .............................................................................................................................85
d.Start debug ..................................................................................................................................86
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 4 www.xunlong.tv
I. Orange Pi Introduction
1.What is Orange Pi
It’s an open-source single-board computer. It can run Android 4.4,
Ubuntu, Debian, Raspberry Pi Image. It uses the All-winner H3 Soc, and has
DDR3 SDRAM.
2. What can I do with Orange Pi?
You can use it to build…
A computer
A wireless server
Games
Music and sounds
HD video
A speaker
Android
Scratch
Pretty much anything else, because Orange Pi is open source
3. Whom is it for?
Orange Pi 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.
4. Hardware specification(plus2)
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 5 www.xunlong.tv
CPU
H3 Quad-core Cortex-A7 H.265/HEVC 4K
GPU
·Mali400MP2 GPU @600MHz
·Supports OpenGL ES 2.0
Memory (SDRAM)
2GB DDR3 (shared with GPU)
On-board Storage
TF card (Max. 64GB) /?MMC card slot, up to 2T
on 2.5 SATA disk
16GB EMMC Flash
On-board Network
10/100/1000M Ethernet RJ45
On-board WIFI
Realtek RTL8189ETV, IEEE 802.11 b/g/n
Video Input
A CSI input connector Camera
Supports 8-bit YUV422 CMOS sensor interface
Supports CCIR656 protocol for NTSC and PAL
Supports SM pixel camera sensor
Supports video capture solution up to
1080p@30fps
Audio Input
MIC
Supports HDMI output with HDCP
Supports HDMI CEC
Supports HDMI 30 function
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 6 www.xunlong.tv
Video Outputs
Integrated CVBS
Supports simultaneous output of HDMI and
CVBS
Audio Output
HDMI
Power Source
DC input, USB OTG input don't supply power
USB 2.0 Ports
Four USB 2.0 HOST, one USB 2.0 OTG
Low-level peripherals
40 Pins Header,compatible with Raspberry Pi B+
GPIO(1x3) pin
UART, ground.
LED
Power led & Status led
Key
Power button: Next to Reset button
UBoot button (optional): Behind HDMI connector
Supported OS
Android Lubuntu, Debian, Raspberry Pi Image
Interface definition
Product size
107mm × 60mm
Weight
85g
Orange Pi™ is a trademark of the Shenzhen Xunlong Software CO., Limited
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 7 www.xunlong.tv
5. View of Hardware
Top view
Bottom view
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 8 www.xunlong.tv
6. Interface instructions:
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 9 www.xunlong.tv
7. Using Method
Follow these steps, you can configure in a very short period of time and
use your Orange Pi. Start your Orange Pi need to complete the following
steps.
Step 1: Prepare Accessories Needed
The first time you use the Orange Pi, you need at least some parts for the
following:
No.
Items
Requirements and Instructions
1
TF card
4Gb min.; class 4 (the class indicates how fast
the card is).
Branded TF cards which are much more reliable
are the good choice
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 10
www.xunlong.tv
2a
HDMI to HDMI cable or
HDMI to DVI cable
HDMI to HDMI cable is used to connect HD
TV or HD monitor;
HDMI to DVI cable is used to connect DVI
monitor.
2b
AV video cable
A standard AV video cable can be used to connect
stimulated monitor if a HDMI monitor is unavailable.
3
Keyboard and mouse
Any keyboard and mouse with USB port is applicable;
Keyboard and mouse are high-power, so a USB
concentrator is required.
4
Ethernet cable/USB
WiFi(Optional)
Network is optional, It makes more convenient to
mount and upgrade software in your Orange Pi PC.
5
DC power adapter
5V,2V min. high qualified power adapter, OTG can not
used a power supply.
6
Audio cable (Optional)
You can select an audio cable with 3.5mm jack to feel
stereo audio.
HDMI to HDMI cable HDMI to DVI cable AV video cable
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 11
www.xunlong.tv
TF card DC power adapter
Step 2: Prepare a TF Card
In order to be able to use Orange Pi normally, you must install the
operating system in the TF card first. The following instructions will teach
you how to write the operating system image file to the Windows and Linux
environments.
1. How to write the operating system (in addition to the Android system)
into the system?
a. Windows:
1) Inserting the TF card into the computer, the capacity of the card
must be larger than the operating system image, usually requires
4GB or greater capacity.
2) Formatting the TF card.
i. Download tools for formatting TF card, such as TF Formatter,
could be download from
https://www.sdcard.org/downloads/formatter_4/eula_windows/
ii. Unzip the downloaded files, and run setup.exe
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 12
www.xunlong.tv
iii. In the options settings option set the format type option to
quick formatting. Logical size adjustment option to open
“(ON)"
iv. Make sure the inserted TF card codes are in accordance with
the chosen codes.
v. Click the “Format” button.
3) Download the operating system image file from the download
page, the page address is as follows:
http://www.orangepi.cn/downloadresourcescn/
4) model to Unzip the downloaded file (in addition to the Android
system, this method can be used to burn to write, the Android
system need another burn, the following will introduce).
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 13
www.xunlong.tv
i. Right click to download the file, select " Unzip file".
5) Write image to TF card
i. Download tools to write image, such as Win32 Diskimager,
http://sourceforge.net/projects/win32diskimager/files/Archive/,
install and open the tool.
ii. Select the image file path that has been unzipped.
iii. Click the "Write" button and wait for the image to write.
iv. After the image is written, click the "Exit" button.
b. Linux:
1) Inserting the TF card into the computer, the capacity of the card
must be larger than the operating system image, usually requires
4GB or greater capacity
2) Formatting the TF card.
i. Run fdisk l order to make sure TF disk.
ii. Run umount /dev/sdxx to uninstall all partitions of TF Card.
iii.Run sudo fdisk /dev/sdx order. Use o order to delete all
partitions of TF Card, and then us n order to add a new partition,
finally use w order to save and exit.
iv. Run sudo mkfs.vfat /dev/sdx1 order to format the TF card
partition set up last step to FAT32 form.(according to your TF
card disk to replacex ). Or you could skip this step since order in
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 14
www.xunlong.tv
Linux will format TF card automatic. Besides, you could use tool
of PhoenixCard to select Format to normal to formatting TF card.
3) Download the image OS from download page,
http://www.orangepi.cn/`downloadresourcescn/
4) Unzip the downloaded file (This method can be used to burn and
write in OS except Android. The Android system needs another
method to burn which will be introduced in the following). And
then Right Click to download the file, select " Unzip file".
5) Write image to TF card
i. Run sudo fdisk l directory to make sure the TF card disk
ii. make sure the image file hash key is the same as download
page mention(optional) . It will output sha1sum
[path]/[imagename], which should be same as the image paye
"SHA-1"
iii. Run umount /dev/sdxx order to uninstall all partitions in TF
Card
iv. Run sudo dd bs=4M if=[path]/[imagename] of=/dev/sdx to
write down image file. Wait for the image to write. If it cannot
work at 4M, then replace a 1M which takes more time. You can
run sudo pkill USR1 n x dd directory to
monitoring procedure.
c. How to write the image into Android operating system?
It is impossible for Android image file to be written into TF card by
using dd command under Linux or by using Win32 Diskimager under
Windows. PhoenixCard is applicable.
1) Download the Android OS image and PhoenixCard.
Download PhoenixCard from
https://drive.google.com/file/d/0B_VynIqhAcB7NTg2UkRDdH
RWX2s/edit?usp=sharing
Download Android OS image from
http://www.orangepi.org/downloadresources/
2) Format the TF card
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 15
www.xunlong.tv
3) Please make sure the inserted TF card is in accordance with the
chosen, click “restore” button for TF card format.
Successfully to format the TF card to normal, click the “OK” button.
4) Then burn the Android OS image to your TF card. Please pay
attention to the following with red marks.
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 16
www.xunlong.tv
Click the “Burn” button for writing to TF card and wait for it finish
Burn Android OS image to TF card successfully. Click “Exit”.
d. Write Armbian image file into TF card
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 17
www.xunlong.tv
1) Insert TF card into computer, please note that the TF card
capacity must bigger than the operating system image, usually
need 8GB or greater capacity
2) Download the OS image file from the download page:
http://www.armbian.com/download/
3) Write the image into TF card.
i. Download image writing tool such as Rufus, the download
page: https://rufus.akeo.ie/
Open the tool page:
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 18
www.xunlong.tv
i. Select the image file path that has been unzipped
ii. Click the "start" button and wait for the mirror to write.
iii. After the image is written, click the "close" button
Step 3: Start your OrangePi
According to the following diagram, you can easily start your Orange Pi.
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 19
www.xunlong.tv
Hardware connection sketch map
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org 20
www.xunlong.tv
Orange Pi runs on Android 4.4 system
Orange Pi runs on Debian system
/