Difference between revisions of "Orange Pi Prime"

From Wiki-Orange Pi
Jump to: navigation, search
(GPIO Specifications)
 
(45 intermediate revisions by the same user not shown)
Line 92: Line 92:
 
<br>
 
<br>
 
'''Top view of Orange Pi Prime'''
 
'''Top view of Orange Pi Prime'''
<div>[[文件:Orange-pi-prime-img1.png|500px]]</div>
+
<div>[[File:Orange-pi-prime-img1.png|500px]]</div>
 
<br>
 
<br>
 
'''Bottom view of Orange Pi Prime'''
 
'''Bottom view of Orange Pi Prime'''
<div>[[文件:Orange-pi-prime-img2.png|500px]]</div>
+
<div>[[File:Orange-pi-prime-img2.png|500px]]</div>
 
<br>
 
<br>
 
'''Interface instructions of Orange Pi Prime'''
 
'''Interface instructions of Orange Pi Prime'''
<div>[[文件:Orange-pi-prime-img3.png|600px]]</div>
+
<div>[[File:Orange-pi-prime-img3.png|600px]]</div>
 
<br>
 
<br>
<div>[[文件:Orange-pi-prime-img4.png|600px]]</div>
+
<div>[[File:Orange-pi-prime-img4.png|600px]]</div>
 
<br>
 
<br>
  
Line 106: Line 106:
 
<br>
 
<br>
 
A 40-pin GPIO interface on the Orange Pi Prime is the same as Model A and Model B of Raspberry Pi. The picture below is GPIO pin define of Orange Pi Prime.
 
A 40-pin GPIO interface on the Orange Pi Prime is the same as Model A and Model B of Raspberry Pi. The picture below is GPIO pin define of Orange Pi Prime.
<div>[[文件:Orange-pi-pc2-img5.png|800px]]</div>
+
<div>[[File:Orange-pi-pc2-img5.png|800px]]</div>
 
<br>
 
<br>
 
     <table style=" min-width: 800px;text-align: center;" border="1" bordercolor="#d8d8d8" cellspacing="0"
 
     <table style=" min-width: 800px;text-align: center;" border="1" bordercolor="#d8d8d8" cellspacing="0"
Line 320: Line 320:
 
=== '''Specification of CSI Camera Connector''' ===
 
=== '''Specification of CSI Camera Connector''' ===
 
<br>
 
<br>
The CSI Camera Connector is a 24-pin FPC connector which can connect external camera module with proper signal pin mappings. The pin of CIS connector can be defined as follows. The connector marked with "CON 1" on the Orange Pi Plus 2E is camera connector.
+
The CSI Camera Connector is a 24-pin FPC connector which can connect external camera module with proper signal pin mappings. The pin of CIS connector can be defined as follows. The connector marked with "CON 1" on the Orange Pi Prime is camera connector.
<div>[[文件:Orange-pi-pc2-img6.png|800px]]</div>
+
<div>[[File:Orange-pi-pc2-img6.png|800px]]</div>
 
<br>
 
<br>
'''Orange Pi Plus 2E-CSI'''
+
'''Orange Pi Prime-CSI'''
 
<br>
 
<br>
 
  <table style=" min-width: 800px;text-align: center;" border="1" bordercolor="#d8d8d8" cellspacing="0"
 
  <table style=" min-width: 800px;text-align: center;" border="1" bordercolor="#d8d8d8" cellspacing="0"
Line 466: Line 466:
 
| 2|| HDMI to HDMI cable or HDMI to DVI cable|| HDMI to HDMI cable is used to connect HD TV or HD monitor
 
| 2|| HDMI to HDMI cable or HDMI to DVI cable|| HDMI to HDMI cable is used to connect HD TV or HD monitor
 
|-
 
|-
| 3|| AV video cable|| A standard AV video cable can be used to connect stimulated monitor if a HDMI monitor is unavailable.
+
| 3|| AV cable|| If your screen does not have HDMI port, then you could use AV cable to connect it.
 
|-
 
|-
| 4|| Keyboard and mouse|| Any keyboard and mouse with USB port is applicable; Keyboard and mouse are
+
| 4|| Keyboard and mouse|| You could use keyboard and mouse with USB por; keyboard and mouse are high-power, so a USB concentrator is required.
high-power, so a USB concentrator is required.
 
 
|-
 
|-
| 5|| Ethernet cable/USB WiFi(Optional)|| Network is optional, It makes more convenient to mount and upgrade software in your Orange
+
| 5|| Ethernet cable/(Optional)|| Network is optional, it makes more convenient to mount and upgrade software in your Orange Pi.
Pi PC.
 
 
|-
 
|-
| 6|| DC power adapter|| 5V/2V min. high qualified power adapter, OTG can not used a power supply.
+
| 6|| DC power adapter|| 5V/2V min. high qualified power adapter, OTG can use as power supply.
 
|-
 
|-
 
| 7|| Audio cable (Optional)|| You can select an audio cable with 3.5mm jack to feel stereo audio.
 
| 7|| Audio cable (Optional)|| You can select an audio cable with 3.5mm jack to feel stereo audio.
 
|}
 
|}
 
<br>
 
<br>
<div style="display:flex;padding-left:100px;">
+
<div style="display:flex; ">
 
<div style="text-align:center;">
 
<div style="text-align:center;">
[[文件:Orange-pi-pc2-img7.png|200px200px|]]<br>
+
[[File:Orange-pi-pc2-img7.png|200px200px|]]<br>
 
HDMI to HDMI cable
 
HDMI to HDMI cable
 
</div>
 
</div>
 
<div style="text-align:center;margin-left:100px;padding-top:3px;">
 
<div style="text-align:center;margin-left:100px;padding-top:3px;">
[[文件:Orange-pi-pc2-img8.png|200px200px|]]<br>
+
[[File:Orange-pi-pc2-img8.png|200px200px|]]<br>
 
HDMI to DVI cable
 
HDMI to DVI cable
 
</div>
 
</div>
 
<div style="text-align:center;margin-left:100px;padding-top:1px;">
 
<div style="text-align:center;margin-left:100px;padding-top:1px;">
[[文件:Orange-pi-pc2-img9.png|200px200px|]]<br>
+
[[File:Orange-pi-pc2-img9.png|200px200px|]]<br>
AV video cable
+
AV cable
 
</div>
 
</div>
 
</div>
 
</div>
 
<br>
 
<br>
<div style="display:flex;padding-left:200px;">
+
<div style="display:flex; ;">
 
<div style="text-align:center;">
 
<div style="text-align:center;">
[[文件:Orange-pi-pc2-img10.png|200px200px|]]<br>
+
[[File:Orange-pi-pc2-img10.png|200px200px|]]<br>
 
TF card
 
TF card
 
</div>
 
</div>
 
<div style="text-align:center;margin-left:100px;padding-top:15px;">
 
<div style="text-align:center;margin-left:100px;padding-top:15px;">
[[文件:Orange-pi-pc2-img11.png|200px200px|]]<br>
+
[[File:Orange-pi-pc2-img11.png|200px200px|]]<br>
 
DC power adapter
 
DC power adapter
 
</div>
 
</div>
Line 522: Line 520:
 
iii In the options settings select the "format" button for quick formatting. "Format size adjustment" select "(ON)"<br>
 
iii In the options settings select the "format" button for quick formatting. "Format size adjustment" select "(ON)"<br>
 
<br>
 
<br>
<div style="padding-left:180px;">[[文件:Orange-pi-pc2-img12.png|400px|]]</div>
+
<div style="padding-left:180px;">[[File:Orange-pi-pc2-img12.png|400px|]]</div>
 
<br>
 
<br>
<div style="padding-left:180px;">[[文件:Orange-pi-pc2-img13.png|400px|]]</div>
+
<div style="padding-left:180px;">[[File:Orange-pi-pc2-img13.png|400px|]]</div>
 
<br>
 
<br>
 
iv Make sure the inserted TF card disk are in accordance with the chosen disk.<br>
 
iv Make sure the inserted TF card disk are in accordance with the chosen disk.<br>
Line 531: Line 529:
 
</div>
 
</div>
 
c.Download the operating system image file from the download page, the page address is as following:<br>
 
c.Download the operating system image file from the download page, the page address is as following:<br>
http://www.orangepi.org/downloadresources<br>
+
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html<br>
 
d.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)<br>
 
d.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)<br>
 
e.Right click to download the file, select "Unzip file" to write image to TF card
 
e.Right click to download the file, select "Unzip file" to write image to TF card
Line 540: Line 538:
 
ii Select the image file path that has been unzipped.<br>
 
ii Select the image file path that has been unzipped.<br>
 
<br>
 
<br>
<div style="padding-left:180px;">[[文件:Orange-pi-pc2-img14.png|400px|]]</div>
+
<div style="padding-left:180px;">[[File:Orange-pi-pc2-img14.png|400px|]]</div>
 
<br>
 
<br>
 
iii Click "Write" button and wait for the image to write. <br>
 
iii Click "Write" button and wait for the image to write. <br>
Line 549: Line 547:
 
'''2)Write Linux into TF card based on Linux platform?'''
 
'''2)Write Linux into TF card based on Linux platform?'''
 
<br>
 
<br>
a.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.<br>
+
a.Inserting the TF card into the computer, the capacity of the card must be larger than the operating system image, usually requires 8GB or greater capacity.<br>
 
<br>
 
<br>
 
b.Formatting the TF card.<br>
 
b.Formatting the TF card.<br>
Line 561: Line 559:
 
<br>
 
<br>
 
c.Download the OS image from download page <br>
 
c.Download the OS image from download page <br>
http://www.orangepi.org/`downloadresources<br>
+
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html<br>
 
<br>
 
<br>
 
d.Unzip and right click the downloaded file, select " Unzip file"<br>
 
d.Unzip and right click the downloaded file, select " Unzip file"<br>
Line 581: Line 579:
 
https://drive.google.com/file/d/0B_VynIqhAcB7NTg2UkRDdHRWX2s/edit?usp=sharing<br>
 
https://drive.google.com/file/d/0B_VynIqhAcB7NTg2UkRDdHRWX2s/edit?usp=sharing<br>
 
Download Android OS image from here: <br>
 
Download Android OS image from here: <br>
http://www.orangepi.org/downloadresources/<br>
+
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html<br>
 
b.Format the TF card<br>
 
b.Format the TF card<br>
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img15.png|400px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img15.png|400px|]]</div>
 
<br>
 
<br>
 
c.Please make sure the inserted TF card is in accordance with the chosen TF card, click "restore" button for TF card formatting.<br>
 
c.Please make sure the inserted TF card is in accordance with the chosen TF card, click "restore" button for TF card formatting.<br>
 
<br>
 
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img16.png|600px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img16.png|600px|]]</div>
 
<br>
 
<br>
 
d.Click "OK" button after successfully formatted the TF card to normal.<br>
 
d.Click "OK" button after successfully formatted the TF card to normal.<br>
Line 593: Line 591:
 
e.Burn the Android OS image into your TF card. Please pay attention to the following with red marks.<br>
 
e.Burn the Android OS image into your TF card. Please pay attention to the following with red marks.<br>
 
<br>
 
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img17.png|600px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img17.png|600px|]]</div>
 
<br>
 
<br>
 
f.Click "Burn" button for writing to TF card and wait for it finish<br>
 
f.Click "Burn" button for writing to TF card and wait for it finish<br>
 
<br>
 
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img18.png|600px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img18.png|600px|]]</div>
 
<br>
 
<br>
 
g.Click "Exit" button after burn Android image to TF card successfully.<br>
 
g.Click "Exit" button after burn Android image to TF card successfully.<br>
Line 609: Line 607:
 
<br>
 
<br>
 
<br>
 
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img19.png|400px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img19.png|400px|]]</div>
 
<br>
 
<br>
 
ii. Select the image file path that has been unzipped<br>
 
ii. Select the image file path that has been unzipped<br>
 
<br>
 
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img20.png|600px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img20.png|600px|]]</div>
 
<br>
 
<br>
 
iii. Click "start" button and wait for the image to write.<br>
 
iii. Click "start" button and wait for the image to write.<br>
 
<br>
 
<br>
 
iv. After the image is written, click "close" button<br>
 
iv. After the image is written, click "close" button<br>
<br>
 
'''5)Write Android image into EMMC'''<br>
 
<br>
 
Steps for writing image into EMMC is almost the same with writing into TF card.<br>
 
<br>
 
a.Download corresponding Android image and Phoenix Card writing tool.<br>
 
b.Formatting SD card.<br>
 
c.Make sure the Disk is same as TF card, and start formatting SD card.<br>
 
d.Write Android into TF card, please note the red mark, which is different
 
from writing into TF card.<br>
 
<br>
 
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img2.png|600px|]]</div>
 
<br>
 
After written image with Card production, then exit.<br>
 
<br>
 
e.Power it on, you could found that the red LED on board is flashing which means the image is writing. When the red LED off, image written finished. Take off the TF card, then power the board on, it should run.<br>
 
<br>
 
'''6)Write Linux image into EMMC'''<br>
 
<br>
 
It is same of H3 serial for image writing into EMMC. In this charter would take Plus 2E as an example to illustrate which just need to install_to_emmc.<br>
 
a.Official website image<br>
 
$ sudo install_to_emmc<br>
 
Enter Y to make sure data in emmc has been erased
 
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img3.png|400px|]]</div>
 
<br>
 
After finished writing into EMMC, take SD card off and it will boot from EMMC.
 
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img4.png|400px|]]</div>
 
<br>
 
b.Armbian image<br>
 
$ sudo nand-sata-install
 
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img5.png|400px|]]</div>
 
<br>
 
Select OK
 
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img6.png|400px|]]</div>
 
<br>
 
Select EXT4 as the format of the image
 
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img7.png|400px|]]</div>
 
<br>
 
Formatting partition
 
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img8.png|400px|]]</div>
 
<br>
 
Wait image writing to EMMC.
 
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img9.png|400px|]]</div>
 
 
<br>
 
<br>
  
Line 667: Line 622:
 
'''1)Hardware Connection Sketch Map'''<br>
 
'''1)Hardware Connection Sketch Map'''<br>
 
<br>
 
<br>
<div style="padding-left:200px;">
+
<div style=" ;">
[[文件:Orange-pi-plus-2e-img10.png|400px|]]<br>
+
[[File:Orange-pi-prime-img5.png|400px|]]<br>
<div style="width:400px;text-align:center;">Orange Pi PC2 runs on Android 4.4 system</div>
+
</div>
 +
<br>
 +
<div style=" ;">
 +
[[File:Orange-pi-plus-2e-img10.png|400px|]]<br>
 +
<div style="width:400px;text-align:center;">Orange Pi Prime runs on Android 5.1 system</div>
 
</div>
 
</div>
 
<br>
 
<br>
<div style="padding-left:200px;">
+
<div style=" ;">
[[文件:Orange-pi-plus-2e-img11.png|400px|]]<br>
+
[[File:Orange-pi-plus-2e-img11.png|400px|]]<br>
<div style="width:400px;text-align:center;">Orange Pi PC2 runs on Debian system</div>
+
<div style="width:400px;text-align:center;">Orange Pi Prime runs on Debian system</div>
 
</div>
 
</div>
 
<br>
 
<br>
<div style="padding-left:200px;">
+
<div style=" ;">
[[文件:Orange-pi-plus-2e-img12.png|400px|]]<br>
+
[[File:Orange-pi-prime-img6.png|400px|]]<br>
<div style="width:400px;text-align:center;">Orange Pi PC2 runs on Ubuntu system</div>
 
 
</div>
 
</div>
 
<br>
 
<br>
 
'''2)Details of Booting Steps'''<br>
 
'''2)Details of Booting Steps'''<br>
 
<br>
 
<br>
a.Insert the TF card with written image in to the TF card slot on the left edge of the bottom of Orange Pi.<br>
+
a.Insert TF card with written image in to TF card slot on Orange Pi.<br>
 
b.You could use HDMI cable to connect your Orange Pi to HDMI TV or monitor.<br>
 
b.You could use HDMI cable to connect your Orange Pi to HDMI TV or monitor.<br>
 
<br>
 
<br>
You could also use AV interface and audio interface to connect output video and audio to analog TV or display.<br>
+
You could also use DVI interface to connect TV. If you don’t have both HDMI and DVI port, then you could use MIPS to connect LCD.<br>
 
<br>
 
<br>
c.Insert USB keyboard and mouse into the right edge of the USB interface.<br>
+
c.Insert USB keyboard and mouse into USB ports<br>
 
d.It is the network port in the middle of 3USB interfaces, which you can access Orange Pi to the wired network.<br>
 
d.It is the network port in the middle of 3USB interfaces, which you can access Orange Pi to the wired network.<br>
e.It is the power input interface on the right side for connecting a 5V and at least 2A or bigger than 2A power adapter. Avoid using smaller power GSM mobile phone charger, it is not able to output 2A even if it marked "2A 5V".<br>
+
e.It is the power input interface on the right side for connecting a 5V and at least 2A or bigger than 2A power adapter. Avoid using smaller power GSM mobile phone charger, it is unable to output 2A even if it marked "2A 5V".<br>
<br>
 
Note: Micro-USB(OTG)cannot use as power input which may cause the fail boot of the OrangePi. Only the power interface could input power.<br>
 
 
<br>
 
<br>
 
The Orange Pi will boot in a few minutes If the above steps are successful. There will be graphical interface in he monitor. It may take a long time to start the first time, please wait patiently. The next time will boot very fast.<br>
 
The Orange Pi will boot in a few minutes If the above steps are successful. There will be graphical interface in he monitor. It may take a long time to start the first time, please wait patiently. The next time will boot very fast.<br>
Line 715: Line 671:
 
Megabit is using internal phy, here is the configuration: <br>
 
Megabit is using internal phy, here is the configuration: <br>
 
2 indicates internal phy
 
2 indicates internal phy
<div style="padding-left:200px;">
+
<div style=" ;">
[[文件:Orange-pi-pc2-img26.png|600px|]]
+
[[File:Orange-pi-pc2-img26.png|600px|]]
 
</div>
 
</div>
 
<br>
 
<br>
 
Gigabit is using external phy, here is the configuration: <br>
 
Gigabit is using external phy, here is the configuration: <br>
 
1 indicates external phy
 
1 indicates external phy
<div style="padding-left:200px;">
+
<div style=" ;">
[[文件:Orange-pi-pc2-img27.png|600px|]]
+
[[File:Orange-pi-pc2-img27.png|600px|]]
 
</div>
 
</div>
 
<br>
 
<br>
Line 733: Line 689:
 
* Modify ssh configuration file /etc/ssh/sshd_config
 
* Modify ssh configuration file /etc/ssh/sshd_config
 
<br>
 
<br>
<div style="padding-left:200px;">
+
<div style=" ;">
[[文件:Orange-pi-pc2-img28.png|400px|]]
+
[[File:Orange-pi-pc2-img28.png|400px|]]
 
</div>
 
</div>
 
<br>
 
<br>
 
* Check the IP with ifconfig, login via ssh of root user
 
* Check the IP with ifconfig, login via ssh of root user
 
<br>
 
<br>
<div style="padding-left:200px;">
+
<div style=" ;">
[[文件:Orange-pi-pc2-img29.png|600px|]]
+
[[File:Orange-pi-pc2-img29.png|600px|]]
 
</div>
 
</div>
 
<br>
 
<br>
Line 749: Line 705:
 
card indicates card number, device indicates device number.<br>
 
card indicates card number, device indicates device number.<br>
 
aplay -l it could check the system to load the sound card number and details<br>
 
aplay -l it could check the system to load the sound card number and details<br>
cat /proc/asound/cards it also could check the sound card and details It could be used after use alsamixer to change the sound card.<br>
+
cat /proc/asound/cards it also could check the sound card and details <br>
 +
It could be used after use alsamixer to change the sound card.<br>
 
alsactl store -f /var/lib/alsa/asound.state used for saving modified parameters<br>
 
alsactl store -f /var/lib/alsa/asound.state used for saving modified parameters<br>
b.It needs to modify configuration on file system for output on 3.5mm of
+
b.Switch to graphical interface<br>
/etc/asound.conf, modify card1 into card0, or use amixer to modify. The default one is configured, or you could use player on graphical interface to switch via sound channel selection.<br>
+
Open smplayer,select preferences on options, select alsa(audiocodec). It could only open one of HDMI or audiocodec in one time.<br>
 
c.How to use mic sound recording <br>
 
c.How to use mic sound recording <br>
 
arecord -d 5 -f cd -t wav 123.wav<br>
 
arecord -d 5 -f cd -t wav 123.wav<br>
Line 758: Line 715:
 
aplay 123.wav<br>
 
aplay 123.wav<br>
 
<br>
 
<br>
'''4)Test GPU'''<br>
 
<br>
 
After boot the board, login on hami interface and open terminal. Execute the following command:<br>
 
glmark2-es2<br>
 
You could see the test result of mali400.
 
  
 
=== '''Universal Software Configuration''' ===
 
=== '''Universal Software Configuration''' ===
Line 771: Line 723:
 
a.Use root account to login Orange Pi(please note that do not login with the account of orangepi<br>
 
a.Use root account to login Orange Pi(please note that do not login with the account of orangepi<br>
 
b.$ usermod -l zhangsan orangepi Change orangepi account into Zhangsan
 
b.$ usermod -l zhangsan orangepi Change orangepi account into Zhangsan
<div style="padding-left:100px;">
+
<div style=" ">
[[文件:Orange-pi-pc2-img30.png|400px|]]
+
[[File:Orange-pi-pc2-img30.png|400px|]]
 
</div>
 
</div>
 
c.$ groupmod -n zhangsan orangepi Change group
 
c.$ groupmod -n zhangsan orangepi Change group
<div style="padding-left:100px;">
+
<div style=" ">
[[文件:Orange-pi-pc2-img31.png|400px|]]
+
[[File:Orange-pi-pc2-img31.png|400px|]]
 
</div>
 
</div>
 
d.$ mv /home/ornagepi /home/zhangsan Change directory of original orangepi
 
d.$ mv /home/ornagepi /home/zhangsan Change directory of original orangepi
 
<div style="padding-left:80px;">
 
<div style="padding-left:80px;">
[[文件:Orange-pi-pc2-img32.png|600px|]]
+
[[File:Orange-pi-pc2-img32.png|600px|]]
 
</div>
 
</div>
 
e.$ usermod -d /home/orangepi orangepi Set this directory to orangepi user's home directory
 
e.$ usermod -d /home/orangepi orangepi Set this directory to orangepi user's home directory
 
<div style="padding-left:80px;">
 
<div style="padding-left:80px;">
[[文件:Orange-pi-pc2-img33.png|600px|]]
+
[[File:Orange-pi-pc2-img33.png|600px|]]
 
</div>
 
</div>
 
f.$ cat /etc/passwd It should be shown as below:
 
f.$ cat /etc/passwd It should be shown as below:
 
<div>
 
<div>
[[文件:Orange-pi-pc2-img34.png|800px|]]
+
[[File:Orange-pi-pc2-img34.png|800px|]]
 
</div>
 
</div>
 
After the modification of the above iterms, it can be used the new account Zhangsan to land.<br>
 
After the modification of the above iterms, it can be used the new account Zhangsan to land.<br>
Line 804: Line 756:
 
c.udevadm control –reload-rules <br>
 
c.udevadm control –reload-rules <br>
 
It could refer to this:<br>
 
It could refer to this:<br>
http://unix.stackexchange.com/questions/134797/how-to-automatically-mou nt-an-usb-device-on-plugin-time-on-an-already-running-sy<br>
+
http://unix.stackexchange.com/questions/134797/how-to-automatically-mount-an-usb-device-on-plugin-time-on-an-already-running-sy<br>
 
<br>
 
<br>
 
'''3)System Source Configuration'''<br>
 
'''3)System Source Configuration'''<br>
Line 812: Line 764:
 
$ sudo vi /etc/apt/sources.list
 
$ sudo vi /etc/apt/sources.list
 
<div>
 
<div>
[[文件:Orange-pi-pc2-img35.png|800px|]]
+
[[File:Orange-pi-pc2-img35.png|800px|]]
 
</div>
 
</div>
 
b.Edit source file<br>
 
b.Edit source file<br>
Line 832: Line 784:
 
There are a lot of software, such as VNG, XRDP, X2GO, etc. For X2GO, it has more functions, and desktop color restore is very good which does not need too much configuration. And XRDP is much more safety than VNC.<br>
 
There are a lot of software, such as VNG, XRDP, X2GO, etc. For X2GO, it has more functions, and desktop color restore is very good which does not need too much configuration. And XRDP is much more safety than VNC.<br>
 
a.$sudo apt-get install tightvncserver      Install VNC
 
a.$sudo apt-get install tightvncserver      Install VNC
<div>[[文件:Orange-pi-pc2-img36.png|400px|]]</div>
+
<div>[[File:Orange-pi-pc2-img36.png|400px|]]</div>
 
<br>
 
<br>
 
b.vncpassw Set the password: do not execute this command but executing vncserver directly. It will prompt you to enter the password twice, when prompted whether can be read only to select the N.
 
b.vncpassw Set the password: do not execute this command but executing vncserver directly. It will prompt you to enter the password twice, when prompted whether can be read only to select the N.
<div>[[文件:Orange-pi-pc2-img37.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img37.png|800px|]]</div>
 
<br>
 
<br>
 
c.Open one or more of desktops by vncserver or vncserver:1(vncserver:2)… you can also transfer more parameters through the full command as below:<br>
 
c.Open one or more of desktops by vncserver or vncserver:1(vncserver:2)… you can also transfer more parameters through the full command as below:<br>
Line 868: Line 820:
 
http://luyou.xunlei.com/thread-12545-1-1.html. <br>
 
http://luyou.xunlei.com/thread-12545-1-1.html. <br>
 
Download Xware1.0.31_cubieboard zip file.
 
Download Xware1.0.31_cubieboard zip file.
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img38.png|800px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img38.png|800px|]]</div>
 
<br>
 
<br>
 
Note: If you want to try the latest version, you can download the latest test version: http://luyou.xunlei.com/thread-15167-1-1.htm.<br>
 
Note: If you want to try the latest version, you can download the latest test version: http://luyou.xunlei.com/thread-15167-1-1.htm.<br>
Line 876: Line 828:
 
ii $ chmod 755 portal<br>
 
ii $ chmod 755 portal<br>
 
iii $ ./portal
 
iii $ ./portal
<div>[[文件:Orange-pi-pc2-img39.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img39.png|800px|]]</div>
 
<br>
 
<br>
 
iv You will get an activation code after booting like the following:
 
iv You will get an activation code after booting like the following:
<div>[[文件:Orange-pi-pc2-img40.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img40.png|800px|]]</div>
 
<br>
 
<br>
 
v Copy this activation code to http://yuancheng.xunlei.com (Which required to log in with account of Thunder). Then click the tab on the top right corner to add, fill in the activation code to complete the binding according to the following figure.
 
v Copy this activation code to http://yuancheng.xunlei.com (Which required to log in with account of Thunder). Then click the tab on the top right corner to add, fill in the activation code to complete the binding according to the following figure.
<div>[[文件:Orange-pi-pc2-img41.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img41.png|800px|]]</div>
 
<br>
 
<br>
 
vi Setting start up<br>
 
vi Setting start up<br>
Line 893: Line 845:
 
i $ cd /xxx/xunlei The xxx is the directory of installation file of xunlei<br>
 
i $ cd /xxx/xunlei The xxx is the directory of installation file of xunlei<br>
 
ii $ sudo nano thunder_mounts.cfg Modify the download path
 
ii $ sudo nano thunder_mounts.cfg Modify the download path
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img42.png|400px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img42.png|400px|]]</div>
 
<br>
 
<br>
 
iii chmod +x etm_monitor<br>
 
iii chmod +x etm_monitor<br>
Line 918: Line 870:
 
<br>
 
<br>
 
Enter into the system and extend via shell Before partition
 
Enter into the system and extend via shell Before partition
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img43.png|400px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img43.png|400px|]]</div>
 
<br>
 
<br>
 
Eneter into system and expend via resize_rootfs.sh
 
Eneter into system and expend via resize_rootfs.sh
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img44.png|400px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img44.png|400px|]]</div>
 
<br>
 
<br>
 
Enter resize_rootfs.sh on command line, the system will expending automatically,
 
Enter resize_rootfs.sh on command line, the system will expending automatically,
 
Reboot the system and use df -lh to check whether expending is successful
 
Reboot the system and use df -lh to check whether expending is successful
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img45.png|400px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img45.png|400px|]]</div>
 
<br>
 
<br>
 
a.Expand file system<br>
 
a.Expand file system<br>
Line 946: Line 898:
 
resize2fs /dev/sdb2 900M<br>
 
resize2fs /dev/sdb2 900M<br>
 
The "s"after the number represents specifying the size of file system via the sectors(every sector calculated by 512 bite). You could also specify it into K(KB), M(MB), G(GB), etc.<br>
 
The "s"after the number represents specifying the size of file system via the sectors(every sector calculated by 512 bite). You could also specify it into K(KB), M(MB), G(GB), etc.<br>
iv. Use fdisk /dev/sdb to adjust the partition size, after into it, enter p, and keep in mind about the initial position of needed extending size partition. You need to first delete the partition then build a new one because the fdisk could not modify the size dynamic(you need to calculate the size, it have to enough to contain the file system adjusted in last step).
+
iv. Use fdisk /dev/sdb to adjust the partition size, after into it, enter p, and keep in mind about the initial position of needed extending size partition. You need to first delete the partition then build a new one because the fdisk could not modify the size dynamic(you need to calculate the size, it have to enough to contain the file system adjusted in last step).<br>
 
v. Enter d to delete the partition need to change the size(my file system is /dev/sdb2, which is the 2 partition ).<br>
 
v. Enter d to delete the partition need to change the size(my file system is /dev/sdb2, which is the 2 partition ).<br>
 
vi. Enter n to build a new partition, make sure the initial position is the same as you deleted, and enter the number as you desire. Besides, if it is bootable partition you want to change, note that need to keep the bootable mark in case cannot boot.<br>
 
vi. Enter n to build a new partition, make sure the initial position is the same as you deleted, and enter the number as you desire. Besides, if it is bootable partition you want to change, note that need to keep the bootable mark in case cannot boot.<br>
Line 984: Line 936:
 
You could check image output from camera.<br>
 
You could check image output from camera.<br>
 
Besides, you could also refer to this link:<br>
 
Besides, you could also refer to this link:<br>
http://www.cnx-software.com/2015/09/26/how-to-use-orange-pi-camera-in-l inux-with-motion/<br>
+
http://www.cnx-software.com/2015/09/26/how-to-use-orange-pi-camera-in-linux-with-motion/<br>
 
<br>
 
<br>
 
'''9)eth0 and wlan0 static mac address setting'''
 
'''9)eth0 and wlan0 static mac address setting'''
Line 1,044: Line 996:
 
After executed scripts, enter reboot command and reboot it, you could use the device authorization management software normally.<br>
 
After executed scripts, enter reboot command and reboot it, you could use the device authorization management software normally.<br>
 
After rebooted, there might be no super administrator icon, you need to delete the desk configuration file and reboot the board.<br>
 
After rebooted, there might be no super administrator icon, you need to delete the desk configuration file and reboot the board.<br>
<br>
 
'''11)WiringPi installation and usage'''
 
<br>
 
a. Install WiringPi<br>
 
i Install compilation tools for source code compilation<br>
 
$ sudo apt-get install gcc g++ make <br>
 
ii Compile GPIO driver of H5<br>
 
git clone https://github.com/kazukioishi/WiringOP.git -b h5 <br>
 
cd WiringOP<br>
 
chmod +x ./build <br>
 
sudo ./build<br>
 
iii GPIO print out information <br>
 
# gpio -v<br>
 
gpio version: 2.20<br>
 
Copyright (c) 2012-2014 Gordon Henderson<br>
 
This is free software with ABSOLUTELY NO WARRANTY. For details type: gpio -warranty<br>
 
<br>
 
Banana Pro Details:<br>
 
<br>
 
Type: Banana Pro, Revision: 1.2, Memory: 1024MB, Maker: LeMaker <br>
 
iv Display<br>
 
gpio readall
 
<div>[[文件:Orange-pi-pc2-img46.png|800px|]]</div>
 
<br>
 
'''12)Configure Network'''<br>
 
<br>
 
* '''Method 1:'''
 
a.Enter following on the command line:<br>
 
$ ifconfig<br>
 
To chcek whether there is wlan(wlan*)<br>
 
b.If no, load corresponding wlan model<br>
 
$ insmod 8189*.ko<br>
 
For example, RTL8189ftv is corresponding to 8189fs.ko, while RTL8189etv is corresponding to 8189es.ko<br>
 
c.Enter command ifconfig you should find there is wlan0(Hypothesis it is wlan0)<br>
 
d.Configure wireless, first you need to know ssid and psk(account and password), enter corresponding wlan*,ssid,psk<br>
 
$ sudo nano /etc/network/interfaces (add the following contents) <br>
 
auto wlan0<br>
 
iface wlan0 inet dhc<br>
 
wpa-ssid xxxx<br>
 
wpa-psk xxxx<br>
 
e.Reboot the board and wireless should be available<br>
 
$ sudo reboot<br>
 
<br>
 
* '''Method 2:'''
 
a.Establish a wifi hotspot configure file wpa_supplication.conf on the directory of
 
/etc/network/ and add the following contents: <br>
 
network={<br>
 
ssid="wifi hotspot name" <br>
 
psk="wifi hotspot password" <br>
 
priority=1<br>
 
}<br>
 
b.Connect wifi with the following command:<br>
 
<br>
 
ifconfig wlan0 up<br>
 
sudo wpa_supplicant -i wlan0 -c /etc/network/wpa_supplication.conf & dhcpcd wlan0 &<br>
 
<br>
 
c.Test the condition of wifi connection<br>
 
Use ifconfig command you could check the information of wlan0 and use ping command to test.<br>
 
<br>
 
'''13)Use USBwifi of official image'''<br>
 
<br>
 
a.Insert USBwifi and make sure USB is opened. Enter command lsusb to check the detail information of USB<br>
 
$ dmesg<br>
 
$ lsusb<br>
 
(Bus 008 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter) id is 8176 and check the driver from internet it is rtl8188cu. You could find it from the following link:<br>
 
https://sites.google.com/site/easylinuxtipsproject/reserve-7#TOC-Realtek-RTL8188CUS- and-RTL8192CU-chipsets-0bda:8176-and-0bda:8178-<br>
 
<br>
 
1 Determine the chipset<br>
 
2 Realtek RTL8188CUS and RTL8192CU chipsets (0bda:8176 and 0bda:8178)
 
Source code compile lib/modules/*/drivers/net/wireless/realtak/ and it will generated into 8192CU.ko<br>
 
b.Source code in disk <br>
 
(rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911.tar.gz)<br>
 
Update the directory of uImage and lib<br>
 
<br>
 
c.Power it on, and it will load the following module:<br>
 
rtlwifi.ko,rtl8192c_common.ko,mac80211.ko,rtl8192cu.ko.<br>
 
<br>
 
d.Uninstall the module of rtl8192cu.ko and install 8192cu.ko, modify /etc/modules and add 8192cu, to make it could boot after power on<br>
 
e.Modify /etc/network/interfaces, add ssid and psk.<br>
 
f.Reboot and USBwifi should be available.<br>
 
 
<br>
 
<br>
  
Line 1,131: Line 1,003:
 
This manual describes how to use the binary file to speed up the development of the project.<br>
 
This manual describes how to use the binary file to speed up the development of the project.<br>
 
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
 
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img13.png|800px|]]</div>
+
<div style=" ;">[[File:Orange-pi-prime-img7.png|800px|]]</div>
<br>
 
Note: In the following sections, * indicates wild-cards, you need to fill in the actual values according to their file storage path.<br>
 
 
<br>
 
<br>
 
=== '''Download Linux Source Code''' ===
 
=== '''Download Linux Source Code''' ===
 
<br>
 
<br>
You could download the source code from the official website(Source code for H3 chip are the same): <br>
+
You could download the source code from the official website(Source code for AH5 chip are the same), and you could find the tools of lichee and android for file compilation.<br>
http://www.orangepi.org/downloadresources/
+
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html<br>
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img14.png|300px|]]</div>
 
 
<br>
 
<br>
 
Subsection and compress the file, then unzip it after finish downloaded:
 
Subsection and compress the file, then unzip it after finish downloaded:
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img49.png|600px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img49.png|600px|]]</div>
 
<br>
 
<br>
 
buildroot: Project compilation script<br>
 
buildroot: Project compilation script<br>
Line 1,160: Line 1,029:
 
* If there is .buildconfig after commanded ll –a, delete it<br>
 
* If there is .buildconfig after commanded ll –a, delete it<br>
 
$ rm –rf .buildconfig
 
$ rm –rf .buildconfig
<div>[[文件:Orange-pi-pc2-img50.png|800px|]]</div>
+
<div>[[File:Orange-pi-prime-img9.png|800px|]]</div>
 
<br>
 
<br>
 
* Use the following command to compile the entire project<br>
 
* Use the following command to compile the entire project<br>
 
$ ./build.sh config
 
$ ./build.sh config
<div>[[文件:Orange-pi-pc2-img51.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img51.png|800px|]]</div>
 
<br>
 
<br>
 
At this point the system will prompt the choice of the chip, as shown below, for OrangePi, select sun50iw2p1<br>
 
At this point the system will prompt the choice of the chip, as shown below, for OrangePi, select sun50iw2p1<br>
 
At this point, the system will be prompted to select the platform, as shown below, for OrangePi, select Android<br>
 
At this point, the system will be prompted to select the platform, as shown below, for OrangePi, select Android<br>
At this point, the system will be prompted the choice of the board, as shown below, for the OrangePi, select dolphin-p1
+
<div style=" ;">[[File:Orange-pi-prime-img10.png|400px|]]</div>
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img52.png|400px|]]</div>
 
 
<br>
 
<br>
 
Appear this interface indicates waiting for the compiler.
 
Appear this interface indicates waiting for the compiler.
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img53.png|400px|]]</div>
+
<div style=" ;">[[File:Orange-pi-prime-img11.png|400px|]]</div>
 
<br>
 
<br>
 
Wait fifteen minutes or so, compile complete.
 
Wait fifteen minutes or so, compile complete.
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img54.png|400px|]]</div>
+
<div style=" ;">[[File:Orange-pi-prime-img12.png|400px|]]</div>
 
<br>
 
<br>
 +
 
=== '''Update the Kernel Image File and Replace Library''' ===
 
=== '''Update the Kernel Image File and Replace Library''' ===
 
<br>
 
<br>
 
* After compilation is finished, the following files will be generated in the directory:
 
* After compilation is finished, the following files will be generated in the directory:
libs: lichee/out/sun8iw7p1/android/common/lib/modules/3.4.39 <br>
+
libs: lichee/out/sun50iw2p1/android/common/lib/modules/3.10.65 <br>
 
Download image from official website:<br>
 
Download image from official website:<br>
http://www.orangepi.org/downloadresources/
+
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html<br>
<div>[[文件:Orange-pi-plus-2e-img15.png|800px|]]</div>
 
 
<br>
 
<br>
 
* Write the image:<br>
 
* Write the image:<br>
 
$ sudo dd bs=4M if=*.img of=/dev/sdb<br>
 
$ sudo dd bs=4M if=*.img of=/dev/sdb<br>
 
<br>
 
<br>
<div>[[文件:Orange-pi-plus-2e-img16.png|800px|]]</div>
+
<div>[[File:Orange-pi-plus-2e-img16.png|800px|]]</div>
 
<br>
 
<br>
Pull out the card reader, and then insert it again.<br>
+
* Pull out the card reader, and then insert it again.<br>
 
At this time, the SD card is inserted into PC, view the SD card mount point (if you don't know how to get a mount point for the SD card, please refer to the diagram below).
 
At this time, the SD card is inserted into PC, view the SD card mount point (if you don't know how to get a mount point for the SD card, please refer to the diagram below).
<div>[[文件:Orange-pi-pc2-img57.png|800px|]]</div>
 
 
<br>
 
<br>
 
The first boot partition
 
The first boot partition
<div>[[文件:Orange-pi-pc2-img58.png|800px|]]</div>
+
<div>[[File:Orange-pi-prime-img14.png|800px|]]</div>
 
<br>
 
<br>
 
The second rootfs partition
 
The second rootfs partition
<div>[[文件:Orange-pi-pc2-img59.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img59.png|800px|]]</div>
 
<br>
 
<br>
 
Copy the kernel image file generated by the compiler to the first partition (boot partition)<br>
 
Copy the kernel image file generated by the compiler to the first partition (boot partition)<br>
 
Copy the lib library which generated after compilation to the second partition (rootfs partition)<br>
 
Copy the lib library which generated after compilation to the second partition (rootfs partition)<br>
 
'''We would suggest using compilation system on github of official website.'''
 
'''We would suggest using compilation system on github of official website.'''
<div>[[文件:Orange-pi-pc2-img60.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img60.png|800px|]]</div>
 
<br>
 
<br>
 
build.sh Execute script into the graphical interface of compilation <br>
 
build.sh Execute script into the graphical interface of compilation <br>
Line 1,212: Line 1,079:
 
uboot uboot source code<br>
 
uboot uboot source code<br>
 
<br>
 
<br>
Execute./build.sh enter into graphical interface and select Plus 2E
+
Execute./build.sh enter into graphical interface and select Prime
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img61.png|600px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img61.png|600px|]]</div>
 
<br>
 
<br>
 
Enter password of root
 
Enter password of root
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img62.png|600px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img62.png|600px|]]</div>
 
<br>
 
<br>
 
Update Kernel directory and module
 
Update Kernel directory and module
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img63.png|600px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img63.png|600px|]]</div>
 
<br>
 
<br>
 
Select corresponding file directory and update uImage and modules
 
Select corresponding file directory and update uImage and modules
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img64.png|600px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img64.png|600px|]]</div>
 
<br>
 
<br>
  
Line 1,228: Line 1,095:
 
<br>
 
<br>
 
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
 
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img13.png|800px|]]</div>
+
<div style=" ;">[[File:Orange-pi-prime-img15.png|800px|]]</div>
 
<br>
 
<br>
 
Software<br>
 
Software<br>
Line 1,234: Line 1,101:
 
Linux host computer needs: <br>
 
Linux host computer needs: <br>
 
Version 2.7.3 of Python;<br>
 
Version 2.7.3 of Python;<br>
Version 3.81-3.82 of GNU Make; JDK 6;<br>
+
Version 3.81-3.82 of GNU Make; <br>
 
Version 1.7 or higher version of Git.<br>
 
Version 1.7 or higher version of Git.<br>
 +
Version 1.7 of Java<br>
 
<br>
 
<br>
 
=== '''Install JDK''' ===
 
=== '''Install JDK''' ===
Line 1,244: Line 1,112:
 
* $./jdk-6u31-linux-x64.bin <br>
 
* $./jdk-6u31-linux-x64.bin <br>
 
It will generate a folder:
 
It will generate a folder:
<div>[[文件:Orange-pi-pc2-img66.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img66.png|800px|]]</div>
 
<br>
 
<br>
 
* Input at terminal<br>
 
* Input at terminal<br>
 
Note that JAVA_HOME is the name of the current directory, you need to fill in according to your own storage directory.
 
Note that JAVA_HOME is the name of the current directory, you need to fill in according to your own storage directory.
<div>[[文件:Orange-pi-pc2-img67.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img67.png|800px|]]</div>
 
<br>
 
<br>
 
$ export JAVA_HOME=*/jdk1.6.0_31<br>
 
$ export JAVA_HOME=*/jdk1.6.0_31<br>
Line 1,254: Line 1,122:
 
$ export CLASSPATH=.:$JAVA_HOME/lib<br>
 
$ export CLASSPATH=.:$JAVA_HOME/lib<br>
 
$ export JRE_HOME=$JAVA_HOME/jre
 
$ export JRE_HOME=$JAVA_HOME/jre
<div>[[文件:Orange-pi-pc2-img68.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img68.png|800px|]]</div>
 
<br>
 
<br>
* Command line input Jav and press tab to see whether it can auto completion (Java), which indicates it can successfully installed<br>
+
* Command line input Jav and press tab to see whether it auto completion (Java), which indicates it can successfully installed version 1.7.<br>
 
<br>
 
<br>
 +
 
=== Install Platform Supported Software ===
 
=== Install Platform Supported Software ===
 
<br>
 
<br>
Line 1,267: Line 1,136:
 
=== '''Download Android Source Package''' ===
 
=== '''Download Android Source Package''' ===
 
<br>
 
<br>
Download website(source code is same for all boards of H3 chip):  http://www.orangepi.org/downloadresources/ <br>
+
Download website(source code is same for all boards of H3 chip):  http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html<br>
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img17.png|600px|]]</div>
 
 
<br>
 
<br>
Then you will obtain the following directories:
+
Unzip the download file you will obtain the following directories:
<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img69.png|300px|]]</div>
+
<div style=" ;">[[File:Orange-pi-pc2-img69.png|300px|]]</div>
 
<br>
 
<br>
  
Line 1,278: Line 1,146:
 
The compiler tool chain has been integrated in Android SDK. Tool chain is on: lichee/brandy/gcc-linaro/ of Android SDK(already exist)<br>
 
The compiler tool chain has been integrated in Android SDK. Tool chain is on: lichee/brandy/gcc-linaro/ of Android SDK(already exist)<br>
 
<br>
 
<br>
<div>[[文件:Orange-pi-pc2-img70.png|800px|]]</div>
+
<div>[[File:Orange-pi-pc2-img70.png|800px|]]</div>
 
<br>
 
<br>
 
=== '''Compile Lichee source Code''' ===
 
=== '''Compile Lichee source Code''' ===
Line 1,285: Line 1,153:
 
$ cd lichee<br>
 
$ cd lichee<br>
 
$ ./build.sh lunch <br>
 
$ ./build.sh lunch <br>
<div>[[文件:Orange-pi-plus-2e-img18.png|400px|]]</div>
+
Select sun50iw2p1<br>
<br>
 
Select sun8iw7p1<br>
 
 
Print information of successful compilation
 
Print information of successful compilation
<div>[[文件:Orange-pi-pc2-img71.png|400px|]]</div>
+
<div>[[File:Orange-pi-prime-img16.png|400px|]]</div>
 
<br>
 
<br>
  
=== '''Compile Command of Android Code''' ===
+
=== '''Android Source Code Compilation''' ===
 
<br>
 
<br>
 
Input the command:<br>
 
Input the command:<br>
 
$ cd android<br>
 
$ cd android<br>
 
$ source ./build/envsetup.sh
 
$ source ./build/envsetup.sh
<div>[[文件:Orange-pi-plus-2e-img20.png|600px|]]</div>
+
<div>[[File:Orange-pi-prime-img17.png|600px|]]</div>
 
<br>
 
<br>
 
$ lunch dolphin_fvd_p1-eng # Select the scheme number
 
$ lunch dolphin_fvd_p1-eng # Select the scheme number
<div>[[文件:Orange-pi-plus-2e-img21.png|600px|]]</div>
+
<div>[[File:Orange-pi-prime-img18.png|600px|]]</div>
 
<br>
 
<br>
 
$ extract-bsp # Copy the kernel and the drive module
 
$ extract-bsp # Copy the kernel and the drive module
<div>[[文件:Orange-pi-plus-2e-img22.png|600px|]]</div>
+
<div>[[File:Orange-pi-prime-img19.png|600px|]]</div>
 
<br>
 
<br>
 
$ make The rear values of # is for the simultaneous compilation process, dependent on the host configuration
 
$ make The rear values of # is for the simultaneous compilation process, dependent on the host configuration
<div>[[文件:Orange-pi-plus-2e-img23.png|600px|]]</div>
+
<div>[[File:Orange-pi-prime-img20.png|600px|]]</div>
 
<br>
 
<br>
 
$ pack #Packaged into firmware
 
$ pack #Packaged into firmware
<div>[[文件:Orange-pi-plus-2e-img24.png|600px|]]</div>
 
 
<br>
 
<br>
 
$ cd */lichee/tools/pack/
 
$ cd */lichee/tools/pack/
<div>[[文件:Orange-pi-plus-2e-img25.png|600px|]]</div>
 
 
<br>
 
<br>
  
Line 1,323: Line 1,187:
 
<br>
 
<br>
 
The sys_config.fex is a binary configuration file that used by the SOC kernel driver or LiveSuit for a particular target board, including how to set up a variety of peripherals, ports, and I/O which based on the target version.<br>
 
The sys_config.fex is a binary configuration file that used by the SOC kernel driver or LiveSuit for a particular target board, including how to set up a variety of peripherals, ports, and I/O which based on the target version.<br>
For OrangePi, the location of the project configuration document is: lichee/tools/pack/chips/sun8iw7p1/configs/dolphin-p1/sys_config.fex<br>
+
For OrangePi, the location of the project configuration document is: lichee/tools/pack/chips/sun50iw2p1/configs/dolphin-p1/sys_config.fex<br>
 
Copy the file to the directory of /lichee, use command:<br>
 
Copy the file to the directory of /lichee, use command:<br>
 
$ cd ./lichee<br>
 
$ cd ./lichee<br>
$ cp ./tools/pack/chips/sun8iw7p1/configs/dolphin-p1/sys_config.fex ./ <br>
+
$ cp ./tools/pack/chips/sun50iw2p1/configs/dolphin-p1/sys_config.fex ./ <br>
<div>[[文件:Orange-pi-plus-2e-img26.png|800px|]]</div>
 
<br>
 
 
You could personalized configuration of sys_config.fex according to
 
You could personalized configuration of sys_config.fex according to
sysconfig1.fex_manul_linux_BSP_v0.4.pdf.<br>
+
sysconfig1.fex_manul_linux_BSP_v0.4.doc.
Direcotory of sysconfig1.fex_manul_linux_BSP_v0.4.pdf is
+
Direcotory of sysconfig1.fex_manul_linux_BSP_v0.4.doc is
/lichee/buildroot/docs.<br>
+
/lichee/buildroot/docs.
<br>
 
=== '''Update Uboot and boot''' ===
 
<br>
 
After modified sys_config.fex, update the new data into SD card(please note that the SD card should have wrote with image, if not, please first finished image writing). Uboot tool will supply in the official website.<br>
 
<br>
 
If the mounted point of image is“/dev/sdb”, then you could enter the following command to update u-boot, boot and script.bin:<br>
 
$ dd if=boot0_sdcard_sun8iw7p1.bin of=/dev/sdb bs=1024 seek=8<br>
 
$ dd if=u-boot-sun8iw7p1.bin of=/dev/sdb bs=1024 seek=16400<br>
 
<br>
 
u-boot and boot should have been update after the above commands, but the engineering configuration of the binary file has not yet been updated.<br>
 
Copy the generated script.bin to boot partition:<br>
 
$ cd /lichee/<br>
 
$ cp script.bin /media/*/boot/ -rf<br>
 
<br>
 
After that, engineering configuration file should have been updated and Orange Pi would run with the new configuration data.<br>
 
 
<br>
 
<br>
 +
 
=== '''Examples''' ===
 
=== '''Examples''' ===
 
<br>
 
<br>
Line 1,430: Line 1,278:
 
<br>
 
<br>
 
Note: If you want to support the new capacitive touch IC, you need to combine the configuration of the BSP A10 layer, which should be based on the original capacitive touch IC code, to make the appropriate changes. Specifically, 1) ctp_twi_id should be consistent with the hardware connection in sys_config; 2) In the drive part of the code: the use of twi from the device name + address should be consistent with the ctp_name and ctp_twi_addr in sys_config configuration. At the same time, the other sub configuration in sysconfig should also be properly configured, these configurations should be corresponding processing in the program.<br>
 
Note: If you want to support the new capacitive touch IC, you need to combine the configuration of the BSP A10 layer, which should be based on the original capacitive touch IC code, to make the appropriate changes. Specifically, 1) ctp_twi_id should be consistent with the hardware connection in sys_config; 2) In the drive part of the code: the use of twi from the device name + address should be consistent with the ctp_name and ctp_twi_addr in sys_config configuration. At the same time, the other sub configuration in sysconfig should also be properly configured, these configurations should be corresponding processing in the program.<br>
<br>
 
'''3)Modify Resolution'''<br>
 
<br>
 
Open item of disp_init and modify the subitem screen0_output_mode, it would modify into different resolution.<br>
 
Such as: Screen 0 output mode:(used for tv/hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50 5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60
 
11:pal 14:ntsc)<br>
 
The above are some main resolution, you could also find the patch of z-0003-add-additional-video-modes.patch and use it to change the resolution into what you want.<br>
 
How to make the patch:<br>
 
patch -p1 < z-0003-add-additional-video-modes.patch<br>
 
After patched up, recompile the source code with replacing uImage and script.bin.<br>
 
For example:<br>
 
1024*768 is 32<br>
 
1280*1024 is 33<br>
 
1360*768 is 34<br>
 
1440*900 is 35<br>
 
1680*1050 is 36<br>
 
 
<br>
 
<br>
  
Line 1,453: Line 1,285:
 
<br>
 
<br>
 
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
 
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img13.png|600px]]</div>
+
<div style=" ;">[[File:Orange-pi-prime-img15.png|600px]]</div>
 
<br>
 
<br>
 
=== '''Device driver and application programming''' ===
 
=== '''Device driver and application programming''' ===
Line 1,459: Line 1,291:
 
'''1)Application Program (app.c)'''<br>
 
'''1)Application Program (app.c)'''<br>
 
<br>
 
<br>
<div>[[文件:Orange-pi-i96-img50.png|600px]]</div>
+
<div>[[File:Orange-pi-i96-img50.png|600px]]</div>
 
<br>
 
<br>
 
'''2)Driver Program (OrangePi_misc.c)'''<br>
 
'''2)Driver Program (OrangePi_misc.c)'''<br>
 
<br>
 
<br>
<div>[[文件:Orange-pi-i96-img51.png|600px]]</div>
+
<div>[[File:Orange-pi-i96-img51.png|600px]]</div>
 
<br>
 
<br>
<div>[[文件:Orange-pi-i96-img52.png|600px]]</div>
+
<div>[[File:Orange-pi-i96-img52.png|600px]]</div>
 
<br>
 
<br>
  
Line 1,471: Line 1,303:
 
<br>
 
<br>
 
Copy the OrangePi_misc.c to the directory of :<br>
 
Copy the OrangePi_misc.c to the directory of :<br>
<nowiki>*/lichee/linux-3.4.39/driver/misc</nowiki><br>
+
<nowiki>*/lichee/linux-3.10/driver/misc</nowiki><br>
<div>[[文件:Orange-pi-pc2-img83.png|800px]]</div>
+
<div>[[File:Orange-pi-pc2-img83.png|800px]]</div>
<br>
 
Enter to */lichee/linux-3.4.39/drivers/misc/, and modify makefile<br>
 
<div>[[文件:Orange-pi-pc2-img84.png|800px]]</div>
 
 
<br>
 
<br>
 +
Enter to */lichee/linux-3.10/drivers/misc/, and modify makefile<br>
 
Modify Makefile on currently file, shown as following:
 
Modify Makefile on currently file, shown as following:
<div>[[文件:Orange-pi-i96-img53.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img53.png|800px]]</div>
 
<br>
 
<br>
 
There is Kconfig on the same sibling folders with Makefile. Each Kconfig respectively describes the the source directory file related kernel configuration menu. In the kernel configuration making menuconfig, it read from the Kconfig config menu and the user configuration saved to the config. In the kernel compile, the main Makefile by calling this.Config could know the user's configuration of the kernel.<br>
 
There is Kconfig on the same sibling folders with Makefile. Each Kconfig respectively describes the the source directory file related kernel configuration menu. In the kernel configuration making menuconfig, it read from the Kconfig config menu and the user configuration saved to the config. In the kernel compile, the main Makefile by calling this.Config could know the user's configuration of the kernel.<br>
 
Kconfig is corresponding to the kernel configuration menu. Add a new driver to the kernel source code, you can modify the Kconfig to increase the configuration menu for your drive, so you can choose whether the menuconfig driver was compiled or not.
 
Kconfig is corresponding to the kernel configuration menu. Add a new driver to the kernel source code, you can modify the Kconfig to increase the configuration menu for your drive, so you can choose whether the menuconfig driver was compiled or not.
<div>[[文件:Orange-pi-i96-img54.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img54.png|800px]]</div>
 
<br>
 
<br>
 
Back to the source code directory:<br>
 
Back to the source code directory:<br>
<div>[[文件:Orange-pi-pc2-img85.png|800px]]</div>
+
<div>[[File:Orange-pi-pc2-img85.png|800px]]</div>
 
<br>
 
<br>
 
$ ./build.sh<br>
 
$ ./build.sh<br>
After compiled the kernel, there will be an orangepi_misc.ko file generated on the directory of lichee/linux-3.4/output/lib/modules/3.4.39<br>
+
After compiled the kernel, there will be an orangepi_misc.ko file generated on the directory of lichee/linux-3.10/output/lib/modules/3.10.65<br>
<div>[[文件:Orange-pi-plus-2e-img27.png|800px]]</div>
+
<div>[[File:Orange-pi-prime-img16.png|400px]]</div>
 
<br>
 
<br>
There is a .ko module which generated after compiled of OrangePi_misc.c on */lichee/linux-3.4/output/lib/modules/3.4.39/
+
There will be a .ko file on the directory of:<br>
<div>[[文件:Orange-pi-plus-2e-img28.png|800px]]</div>
+
*/lichee/linux-3.10/output/lib/modules/3.10.65/<br>
 +
It is generated after OrangePi_misc.c compilation.<br>
 +
IInsert U disk (please note the SD card should have been written image) if the SD card system is mounted to the directory / dev/ sdb, SD card will have two sub mount points, respectively are / dev / sdb1 and /dev/sdb2. Two partition of SD card will automatically mount to the PC /media/ directory, the first partition is the boot partition and the second partition is the rootfs partition.
 +
<div>[[File:Orange-pi-i96-img55.png|800px]]</div>
 
<br>
 
<br>
Insert U disk (please note the SD card should have been written image) if the SD card system is mounted to the directory / dev / SDB, SD card will have two sub mount points, respectively are / dev / sdb1 and /dev/sdb2. Two partition of SD card will automatically mount to the PC /media/ directory, the first partition is the boot partition and the second partition is the rootfs partition.
+
Copy OrangePi_misc.ko file to /media/*/lib/modules/3.10.65.<br>
<div>[[文件:Orange-pi-i96-img55.png|800px]]</div>
+
$ cp OrangePi_misc.ko /media/*/lib/modules/3.10.65<br>
<br>
 
Copy the OrangePi_misc.ko file to /media/*/lib/modules/3.4.39.
 
$ cp OrangePi_misc.ko /media/*/lib/modules/3.4.39<br>
 
 
<br>
 
<br>
  
Line 1,505: Line 1,335:
 
Here will take arm-linux-gnueabihf-gcc as an example. Check whether there is the cross compiler, if not, then download and install it.<br>
 
Here will take arm-linux-gnueabihf-gcc as an example. Check whether there is the cross compiler, if not, then download and install it.<br>
 
$ arm-linux-gnueabihf-gcc -v
 
$ arm-linux-gnueabihf-gcc -v
<div>[[文件:Orange-pi-i96-img56.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img56.png|800px]]</div>
 
<br>
 
<br>
 
While compiling the application, you will fill that  you need the cross compiler arm-linux-gnueabihf-gcc, download and install it.
 
While compiling the application, you will fill that  you need the cross compiler arm-linux-gnueabihf-gcc, download and install it.
<div>[[文件:Orange-pi-i96-img57.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img57.png|800px]]</div>
 
<br>
 
<br>
 
Unzip the downloaded file and enter the the directory
 
Unzip the downloaded file and enter the the directory
<div>[[文件:Orange-pi-i96-img58.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img58.png|800px]]</div>
 
<br>
 
<br>
 
Check the information after entering bin directory
 
Check the information after entering bin directory
<div>[[文件:Orange-pi-i96-img59.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img59.png|800px]]</div>
 
<br>
 
<br>
 
pwd hows the path and export it into the whole project
 
pwd hows the path and export it into the whole project
<div>[[文件:Orange-pi-i96-img60.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img60.png|800px]]</div>
 
<br>
 
<br>
 
$ ll /etc/environment  shows that the file can only read, need to modify permissions <br>
 
$ ll /etc/environment  shows that the file can only read, need to modify permissions <br>
 
$ chmod 755 /etc/environment<br>
 
$ chmod 755 /etc/environment<br>
 
Modify permission
 
Modify permission
<div>[[文件:Orange-pi-i96-img61.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img61.png|800px]]</div>
 
<br>
 
<br>
 
Add the path to the whole environment variable<br>
 
Add the path to the whole environment variable<br>
<div>[[文件:Orange-pi-i96-img62.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img62.png|800px]]</div>
 
<br>
 
<br>
 
Compile the application with cross compiler<br>
 
Compile the application with cross compiler<br>
Line 1,539: Line 1,369:
 
You need to switch to root users and load module driver module to the development board first.<br>
 
You need to switch to root users and load module driver module to the development board first.<br>
 
$ insmod /lib/modules/orangepi.ko
 
$ insmod /lib/modules/orangepi.ko
<div>[[文件:Orange-pi-i96-img63.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img63.png|800px]]</div>
 
<br>
 
<br>
 
$ lsmod      To check whether it is loaded
 
$ lsmod      To check whether it is loaded
<div>[[文件:Orange-pi-i96-img64.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img64.png|800px]]</div>
 
<br>
 
<br>
 
$ ll /dev/orangepimisc( Miscellaneous equipment automatically generated device files, the specific look at the driver code)
 
$ ll /dev/orangepimisc( Miscellaneous equipment automatically generated device files, the specific look at the driver code)
<div>[[文件:Orange-pi-i96-img65.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img65.png|800px]]</div>
 
<br>
 
<br>
 
Executive application (note the use of the application, check the code for specify)<br>
 
Executive application (note the use of the application, check the code for specify)<br>
Line 1,555: Line 1,385:
 
<br>
 
<br>
 
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
 
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[文件:Orange-pi-plus-2e-img13.png|800px]]</div>
+
<div style=" ;">[[File:Orange-pi-prime-img15.png|800px]]</div>
 
<br>
 
<br>
 
'''TTL to USB cable'''
 
'''TTL to USB cable'''
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img67.png|800px]]</div>
+
<div style=" ;">[[File:Orange-pi-i96-img67.png|800px]]</div>
 
<br>
 
<br>
 
=== '''Operations on Windows''' ===
 
=== '''Operations on Windows''' ===
Line 1,568: Line 1,398:
 
* Download and unzip the latest version of driver: <br>
 
* Download and unzip the latest version of driver: <br>
 
 PL2303_Prolific_DriverInstaller_v130.zip
 
 PL2303_Prolific_DriverInstaller_v130.zip
<div>[[文件:Orange-pi-i96-img68.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img68.png|800px]]</div>
 
<br>
 
<br>
 
* Choose application installation as Administrator
 
* Choose application installation as Administrator
<div>[[文件:Orange-pi-i96-img69.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img69.png|800px]]</div>
 
<br>
 
<br>
 
* Wait for installation completing  
 
* Wait for installation completing  
<div>[[文件:Orange-pi-i96-img70.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img70.png|800px]]</div>
 
<br>
 
<br>
 
'''2)Install putty on Windows'''<br>
 
'''2)Install putty on Windows'''<br>
 
<br>
 
<br>
 
* Download putty installation package
 
* Download putty installation package
<div>[[文件:Orange-pi-i96-img71.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img71.png|800px]]</div>
 
<br>
 
<br>
 
* Unzip and install it
 
* Unzip and install it
<div>[[文件:Orange-pi-i96-img72.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img72.png|800px]]</div>
 
<br>
 
<br>
 
* Open it after installed, shown as below:
 
* Open it after installed, shown as below:
 
<br>
 
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img73.png|600px]]</div>
+
<div style=" ;">[[File:Orange-pi-i96-img73.png|600px]]</div>
 
<br>
 
<br>
 
'''3)Connect method'''<br>
 
'''3)Connect method'''<br>
Line 1,595: Line 1,425:
 
<br>
 
<br>
 
* Select control panel on Start menu
 
* Select control panel on Start menu
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img75.png|400px]]</div>
+
<div style=" ;">[[File:Orange-pi-i96-img75.png|400px]]</div>
 
<br>
 
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img76.png|600px]]</div>
+
<div style=" ;">[[File:Orange-pi-i96-img76.png|600px]]</div>
 
<br>
 
<br>
 
* Click on the device manager to check the port number
 
* Click on the device manager to check the port number
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img77.png|400px]]</div>
+
<div style=" ;">[[File:Orange-pi-i96-img77.png|400px]]</div>
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img78.png|400px]]</div>
+
<div style=" ;">[[File:Orange-pi-i96-img78.png|400px]]</div>
 
<br>
 
<br>
 
'''5)Putty configuration'''
 
'''5)Putty configuration'''
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img79.png|400px]]</div>
+
<div style=" ;">[[File:Orange-pi-i96-img79.png|400px]]</div>
 
<br>
 
<br>
 
Serial port should set to the corresponding port number (COM5), the speed should set to 115200<br>
 
Serial port should set to the corresponding port number (COM5), the speed should set to 115200<br>
Line 1,610: Line 1,440:
 
'''6)Start debug'''<br>
 
'''6)Start debug'''<br>
 
Power Orange Pi on and boot it, the serial port will automatic print out debug log.
 
Power Orange Pi on and boot it, the serial port will automatic print out debug log.
<div style="padding-left:100px;">[[文件:Orange-pi-i96-img80.png|600px]]</div>
+
<div style=" ">[[File:Orange-pi-i96-img80.png|600px]]</div>
 
<br>
 
<br>
  
Line 1,621: Line 1,451:
 
* Install the Kermit by execute command:
 
* Install the Kermit by execute command:
 
 $ sudo apt-get install ckermit
 
 $ sudo apt-get install ckermit
<div>[[文件:Orange-pi-i96-img81.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img81.png|800px]]</div>
 
<br>
 
<br>
 
* Configurate Kermit
 
* Configurate Kermit
 
 $ sudo vi /etc/kermit/kermrc
 
 $ sudo vi /etc/kermit/kermrc
<div>[[文件:Orange-pi-i96-img82.png|800px]]</div>
+
<div>[[File:Orange-pi-i96-img82.png|800px]]</div>
 
<br>
 
<br>
 
* Add lines:
 
* Add lines:
Line 1,641: Line 1,471:
 
set window      5
 
set window      5
 
</div>
 
</div>
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img83.png|600px]]</div>
+
<div style=" ;">[[File:Orange-pi-i96-img83.png|600px]]</div>
 
<br>
 
<br>
 
'''2)Connect method for debug'''
 
'''2)Connect method for debug'''
Line 1,650: Line 1,480:
 
<br>
 
<br>
 
$ ls /dev/  (Input command in the PC terminal to check the device number of TTL to the serial cable)
 
$ ls /dev/  (Input command in the PC terminal to check the device number of TTL to the serial cable)
<div style="padding-left:100px;">[[文件:Orange-pi-i96-img85.png|800px]]</div>
+
<div style=" ">[[File:Orange-pi-i96-img85.png|800px]]</div>
 
<br>
 
<br>
 
* It can be seen from the figure that TTL to the serial port cable is identified as ttyUSB0, configure the /ect/kermit/kermitc file, update the serial port information.<br>
 
* It can be seen from the figure that TTL to the serial port cable is identified as ttyUSB0, configure the /ect/kermit/kermitc file, update the serial port information.<br>
 
 $ sudo vi /etc/kermit/kermitc
 
 $ sudo vi /etc/kermit/kermitc
 
* Set the value of setline into /dev/ttyUSB0
 
* Set the value of setline into /dev/ttyUSB0
<div style="padding-left:100px;">[[文件:Orange-pi-i96-img86.png|800px]]</div>
+
<div style=" ">[[File:Orange-pi-i96-img86.png|800px]]</div>
 
<br>
 
<br>
 
'''4)Start debug'''
 
'''4)Start debug'''
Line 1,661: Line 1,491:
 
* Input command in the host computer terminal, enter the Kermit mode:
 
* Input command in the host computer terminal, enter the Kermit mode:
 
 $ sudo kermit –c
 
 $ sudo kermit –c
<div style="padding-left:100px;">[[文件:Orange-pi-i96-img87.png|800px]]</div>
+
<div style=" ">[[File:Orange-pi-i96-img87.png|800px]]</div>
 +
<br>
 +
* Power on and boot OrangePi, the serial port will print debug log automatically
 +
<div style="  ">[[File:Orange-pi-i96-img88.png|800px]]</div>
 
<br>
 
<br>
* Power it on and boot Orange Pi, the serial port will automatic print debug log, the account and password ard root/orangepi and orangepi/orangepi
+
== '''Download the Orange Pi Prime User Manual''' ==
<div style="padding-left:100px;">[[文件:Orange-pi-i96-img88.png|800px]]</div>
 
 
<br>
 
<br>
For more information on using the Orange Pi Plus 2E, please see the <span style="color:red;">Orange Pi Plus 2E User Manual</span>. (Click to download)
+
For more information on using the Orange Pi Prime, please see the [https://drive.google.com/open?id=1bfnUh1yQYXn4IQTU9xEh3Lmxu2AsxEJ0 <span style="color:red;">Orange Pi Prime User Manual</span>]. (Click to download)

Latest revision as of 20:18, 30 June 2022

Orange Pi Introduction


What is Orange Pi Prime?


 It’s an open-source single-board computer. It can run Android 5.1, Ubuntu, Debian, Rasberry Pi Image, it uses the AllWinner H5 SoC, and has 2GB DDR3 SDRAM.

What can I do with Orange Pi Prime?


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 Prime is open source


Whom is it for?


 Orange Pi Prime 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.

Hardware specification of Orange Pi Prime


Hardware specification
CPU H5 Quad-core Cortex-A53 64bit
GPU

Mali450 GPU including dual Geometry
Processors(GP) and quad Pixel Processors
Supports OpenGL ES 2.0 and OpenVG1.1
3000Mpix/sec and 163Mtri/sec
Full scene over-sampled 4X anti-aliasing engine with no additional bandwidth usage

Memory (SDRAM) 2GB DDR3 (shared with GPU)
On-board Storage

TF card (Max. 32GB)/NOR flash(2MB)

On-board Network 1000/100M Ethernet RJ45
Onboard WIFI+BT 8723BS, IEEE 802.11 b/g/n,BT4.0
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
Video Outputs

Supports HDMI output with HDCP
Supports HDMI CEC
Supports HDMI 30 function

Audio Output 3.5 mm Jack and HDMI
Power Source DC input can supply power USB OTG input can supply power
USB 2.0 Ports Three 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
Buttons Power Button(SW2), Reset Button (SW4)
Key IR Input, Power, Reset
Supported OS Android Lubuntu, Debian, Raspberry Pi Image
Interface definition
Product size 98mm × 60mm
Weight 75g
Orange Pi™ is a trademark of the Shenzhen Xunlong Software CO., Limited


Top view of Orange Pi Prime

Orange-pi-prime-img1.png


Bottom view of Orange Pi Prime

Orange-pi-prime-img2.png


Interface instructions of Orange Pi Prime

Orange-pi-prime-img3.png


Orange-pi-prime-img4.png


GPIO Specifications


A 40-pin GPIO interface on the Orange Pi Prime is the same as Model A and Model B of Raspberry Pi. The picture below is GPIO pin define of Orange Pi Prime.

Orange-pi-pc2-img5.png


OrangePi(H5)
CON3-P01 VCC-3V3
CON3-P02 VCC-5V
CON3-P03 TWI0-SDA PA12
CON3-P04 VCC-5V
CON3-P05 TWI0-SCK PA11
CON3-P06 GND
CON3-P07 PWM1 PA6
CON3-P08 UART3_TX PA13
CON3-P09 GND
CON3-P10 UART3_RX PA14
CON3-P11 UART2_RX PA1
CON3-P12 PD14 PD14
CON3-P13 UART2_TX PA2
CON3-P14 GND
CON3-P15 UART2_CTS PA3
CON3-P16 PC4 PC4
CON3-P17 VCC-3V3
CON3-P18 CAN_RX PC7
CON3-P19 SPI0_MOSI PC0
CON3-P20 GND
CON3-P21 SPI0_MISO PC1
CON3-P22 UART2_RTS PA2
CON3-P23 SPI0_CLK Prime
CON3-P24 SPI0_CS0 PC3
CON3-P25 GND
CON3-P26 PA21 PA21
CON3-P27 TWI1-SDA PA19
CON3-P28 TWI1-SCK PA18
CON3-P29 PA7 PA7
CON3-P30 GND
CON3-P31 PA8 PA8
CON3-P32 UART1_RTS PG8
CON3-P33 PA9 PA9
CON3-P34 GND
CON3-P35 PA10 PA10
CON3-P36 UART1_CTS PG9
CON3-P37 PA20 PA20
CON3-P38 UART1_TX PG6
CON3-P39 GND
CON3-P40 UART1_RX PG7


Specification of CSI Camera Connector


The CSI Camera Connector is a 24-pin FPC connector which can connect external camera module with proper signal pin mappings. The pin of CIS connector can be defined as follows. The connector marked with "CON 1" on the Orange Pi Prime is camera connector.

Orange-pi-pc2-img6.png


Orange Pi Prime-CSI

CON1-P01 NC
CON1-P02 GND
CON1-P03 TWI2-SDA PE13
CON1-P04 VCC-CSI
CON1-P05 TWI2-SCK PE12
CON1-P06 CSI-RESET# PE15
CON1-P07 CSI-VSYNC PE3
CON1-P08 CSI-STBY-EN PE15
CON1-P09 CSI-HSYNC PE2
CON1-P10 VDD1V8-CSI
CON1-P11 VCC-CSI
CON1-P12 CSI-D7 PE11
CON1-P13 CSI-MCLK PE1
CON1-P14 CSI-D6 PE10
CON1-P15 GND
CON1-P16 CSI-D5 PE9
CON1-P17 CSI-PCLK PE0
CON1-P18 CSI-D4 PE8
CON1-P19 CSI-D0 PE4
CON1-P20 CSI-D3 PE7
CON1-P21 CSI-D1 PE5
CON1-P22 CSI-D2 PE6
CON1-P23 GND
CON1-P24 AFVCC-CSI


Using Method Introduction


Follow these steps, you can configure and run your Orange Pi in a very short period of time. Boot your Orange Pi need to complete the following steps.

Step 1: Prepare Accessories Needed


You need at least some accessories like the following if it is your first time to use the Orange Pi.

No. Items Requirements and Instructions
1 TF card 8GB min.; class 10. Branded TF cards would be reference which are much more reliable.
2 HDMI to HDMI cable or HDMI to DVI cable HDMI to HDMI cable is used to connect HD TV or HD monitor
3 AV cable If your screen does not have HDMI port, then you could use AV cable to connect it.
4 Keyboard and mouse You could use keyboard and mouse with USB por; keyboard and mouse are high-power, so a USB concentrator is required.
5 Ethernet cable/(Optional) Network is optional, it makes more convenient to mount and upgrade software in your Orange Pi.
6 DC power adapter 5V/2V min. high qualified power adapter, OTG can use as power supply.
7 Audio cable (Optional) You can select an audio cable with 3.5mm jack to feel stereo audio.


Orange-pi-pc2-img7.png
HDMI to HDMI cable

Orange-pi-pc2-img8.png
HDMI to DVI cable

Orange-pi-pc2-img9.png
AV cable


Orange-pi-pc2-img10.png
TF card

Orange-pi-pc2-img11.png
DC power adapter


Step 2:Prepare a TF Card or EMMC Image


In order to use Orange Pi normally, you must install the operating system into TF card first.

1)Write Linux into TF Card Based on Windows Platform

a.Inserting the TF card into the computer, the capacity of the card must be bigger than the operating system, usually requires 8GB or bigger.
b.Formatting the TF card.

i Download tools for formatting TF card, such as TF Formatter, it could be downloaded from:
https://www.sdcard.org/downloads/formatter_4/eula_windows/

ii Unzip the downloaded files, and run setup.exe

iii In the options settings select the "format" button for quick formatting. "Format size adjustment" select "(ON)"

Orange-pi-pc2-img12.png


Orange-pi-pc2-img13.png


iv Make sure the inserted TF card disk are in accordance with the chosen disk.

v Click the "Format" button.

c.Download the operating system image file from the download page, the page address is as following:
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html
d.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)
e.Right click to download the file, select "Unzip file" to write image to TF card

i Download tools to write image,such as Win32 Diskimager, here is the download page:
http://sourceforge.net/projects/win32diskimager/files/Archive/

ii Select the image file path that has been unzipped.

Orange-pi-pc2-img14.png


iii Click "Write" button and wait for the image to write.

iv After the image is written, click "Exit" button.


2)Write Linux into TF card based on Linux platform?
a.Inserting the TF card into the computer, the capacity of the card must be larger than the operating system image, usually requires 8GB or greater capacity.

b.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 command to delete all partitions of TF Card, and then us n order to add a new partition, finally use w command to save and exit.
iv Run sudo mkfs.vfat /dev/sdx1 command 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 command in Linux will format TF card automatic.

c.Download the OS image from download page
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html

d.Unzip and right click the downloaded file, select " Unzip file"

e.Write image to TF card

i Run sudo fdisk –l order 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 order to monitoring procedure.

3)Use PhoenixCard tool to write Android image into TF card
It is impossible for Android image to be written into TF card by using dd command under Linux or using Win32 Diskimager under Windows. Here PhoenixCard tool is applicable for Android image writing.

a.Download the Android OS image and PhoenixCard tool. Download PhoenixCard from here:
https://drive.google.com/file/d/0B_VynIqhAcB7NTg2UkRDdHRWX2s/edit?usp=sharing
Download Android OS image from here:
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html
b.Format the TF card

Orange-pi-pc2-img15.png


c.Please make sure the inserted TF card is in accordance with the chosen TF card, click "restore" button for TF card formatting.

Orange-pi-pc2-img16.png


d.Click "OK" button after successfully formatted the TF card to normal.

e.Burn the Android OS image into your TF card. Please pay attention to the following with red marks.

Orange-pi-pc2-img17.png


f.Click "Burn" button for writing to TF card and wait for it finish

Orange-pi-pc2-img18.png


g.Click "Exit" button after burn Android image to TF card successfully.

4)Write Armbian Image into TF Card

a.Insert TF card into computer, please note that the TF card capacity must bigger than the operating system image, usually need to be 8GB or bigger.
b.Download the OS image file from the download page: http://www.armbian.com/download/
c.Write the image into TF card.
i. Download image writing tool such as Rufus, the download page: https://rufus.akeo.ie/

Orange-pi-pc2-img19.png


ii. Select the image file path that has been unzipped

Orange-pi-pc2-img20.png


iii. Click "start" button and wait for the image to write.

iv. After the image is written, click "close" button

Step 3: Boot your Orange Pi


1)Hardware Connection Sketch Map

Orange-pi-prime-img5.png


Orange-pi-plus-2e-img10.png

Orange Pi Prime runs on Android 5.1 system


Orange-pi-plus-2e-img11.png

Orange Pi Prime runs on Debian system


Orange-pi-prime-img6.png


2)Details of Booting Steps

a.Insert TF card with written image in to TF card slot on Orange Pi.
b.You could use HDMI cable to connect your Orange Pi to HDMI TV or monitor.

You could also use DVI interface to connect TV. If you don’t have both HDMI and DVI port, then you could use MIPS to connect LCD.

c.Insert USB keyboard and mouse into USB ports
d.It is the network port in the middle of 3USB interfaces, which you can access Orange Pi to the wired network.
e.It is the power input interface on the right side for connecting a 5V and at least 2A or bigger than 2A power adapter. Avoid using smaller power GSM mobile phone charger, it is unable to output 2A even if it marked "2A 5V".

The Orange Pi will boot in a few minutes If the above steps are successful. There will be graphical interface in he monitor. It may take a long time to start the first time, please wait patiently. The next time will boot very fast.

Step 4: Turn off your Orange Pi Correctly


  • You can use the shutdown button on the interface to safety close the Orange Pi.
  • You can also close the system by entering commands in the shell:


sudo halt or sudo shutdown –h

It will be safety to turn off the Orange Pi. If directly use the power button to shut down the system may damage the file system on TF Card. After the system is closed, the power can be cut off by more than 5 seconds’ press.

Other configuration


1)Connect to the wired network

If Orange pi has already connected to wire cable before powered on, then the system would get the IP address automatically. If it has not connected to wire cable or other problem of network, then it will fail to get the IP address. The system would take some time to load but it has no influence for the board running.
It should be green LED light on and yellow LED flash. You need to make sure the image you wrote is accordingly to the board you use, since there are some board that is Megabit and some are Gigabit which could not be used mixed .
Megabit is using internal phy, here is the configuration:
2 indicates internal phy

Orange-pi-pc2-img26.png


Gigabit is using external phy, here is the configuration:
1 indicates external phy

Orange-pi-pc2-img27.png


It is defaulted configured, you could take that as reference.

2)Login via vnc and ssh

If there is no condition for connecting HDMI, you could enter the system via vnc or ssh remote login.

  • Login via serial port and install ssh apt-get install ssh
  • Modify ssh configuration file /etc/ssh/sshd_config


Orange-pi-pc2-img28.png


  • Check the IP with ifconfig, login via ssh of root user


Orange-pi-pc2-img29.png


3)HDMI or 3.5mm Sound Output

a.The sound was default to output via HDMI on image, it could check and change via alsamixer.
ls /etc/asound.conf
card indicates card number, device indicates device number.
aplay -l it could check the system to load the sound card number and details
cat /proc/asound/cards it also could check the sound card and details
It could be used after use alsamixer to change the sound card.
alsactl store -f /var/lib/alsa/asound.state used for saving modified parameters
b.Switch to graphical interface
Open smplayer,select preferences on options, select alsa(audiocodec). It could only open one of HDMI or audiocodec in one time.
c.How to use mic sound recording
arecord -d 5 -f cd -t wav 123.wav
After recording, use the following to play
aplay 123.wav

Universal Software Configuration


1)Default Account Changing

The default log in account is orangepi. In order to secure, it is recommended to modify the default orangepi accounts to your own account, for example Zhangsan. Steps are as follows:
a.Use root account to login Orange Pi(please note that do not login with the account of orangepi
b.$ usermod -l zhangsan orangepi Change orangepi account into Zhangsan

Orange-pi-pc2-img30.png

c.$ groupmod -n zhangsan orangepi Change group

Orange-pi-pc2-img31.png

d.$ mv /home/ornagepi /home/zhangsan Change directory of original orangepi

Orange-pi-pc2-img32.png

e.$ usermod -d /home/orangepi orangepi Set this directory to orangepi user's home directory

Orange-pi-pc2-img33.png

f.$ cat /etc/passwd It should be shown as below:

Orange-pi-pc2-img34.png

After the modification of the above iterms, it can be used the new account Zhangsan to land.

2)U Disk Automatic Mounted Configuration

a.sudo apt-get install usbmount
b.sudo vim /etc/udev/rules.d/automount.rules
ACTION=="add",KERNEL=="sdb*", RUN+="/usr/bin/pmount --sync --umask 000 %k"
ACTION=="remove", KERNEL=="sdb*", RUN+="/usr/bin/pumount %k" ACTION=="add",KERNEL=="sdc*", RUN+="/usr/bin/pmount --sync --umask 000 %k"
ACTION=="remove", KERNEL=="sdc*", RUN+="/usr/bin/pumount %k"

c.udevadm control –reload-rules
It could refer to this:
http://unix.stackexchange.com/questions/134797/how-to-automatically-mount-an-usb-device-on-plugin-time-on-an-already-running-sy

3)System Source Configuration

Take Ubuntu as an example:
a.Open the source file
$ sudo vi /etc/apt/sources.list

Orange-pi-pc2-img35.png

b.Edit source file
Replace the source file with your favorite source. Take an example of Ubuntu 16.04 on Zhonkeda source:
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
Note: xenial is the version of the code name in this source, if the other version of Ubuntu needs to replace the corresponding version code which can be found on the internet.

4)Remote desktop installation
There are a lot of software, such as VNG, XRDP, X2GO, etc. For X2GO, it has more functions, and desktop color restore is very good which does not need too much configuration. And XRDP is much more safety than VNC.
a.$sudo apt-get install tightvncserver Install VNC

Orange-pi-pc2-img36.png


b.vncpassw Set the password: do not execute this command but executing vncserver directly. It will prompt you to enter the password twice, when prompted whether can be read only to select the N.

Orange-pi-pc2-img37.png


c.Open one or more of desktops by vncserver or vncserver:1(vncserver:2)… you can also transfer more parameters through the full command as below:
vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565
(Note: If it prompted you that cannot find the file or other error when installing, please run sudo apt-get update to update the software source and try installing again.)

5)NAS and DLAN Configuration
a.NAS:
There are many files could be reference from Internet, for example: http://www.geekfan.net/5003/, it detailed descriptions on the operation and the mounted of U disk is very useful.
b.DLNA:
Mainly through the minidlna software to achieve the sharing of media resources within the LAN, such as sharing video, music, etc.. The installation steps are as follows:
i. sudo apt-get minidlna
ii. Execute the following command to modify the configuration file:
sudo nano /etc/minidlna.conf
Note: you can also use other text editor to modify.
iii. Add the following:
media_dir=A,/nas, path: /DLNA/Music
media_dir=V,/nas, path: /DLNA/Video
media_dir=P,/nas, path: DLNA/Picture
db_dir=/nas, path: /DLNA/log
db_dir=/nas, path: /DLNA/db
ctrl +o and enter, ctrl +x to save and exit.
iv. Established above folders respectively, noted that path consistency and assigned to read and write permissions. In order for convenient, it could be Chmod 755, such as sudo Chmod 755 /nas path /DLNA/Music
v. Re-start minidlna to take effect the configuration: /etc/init.d/minidlna restart.
Transmit the corresponding file on the computer to the corresponding folder through samba.
Note: It is recommended to download MoliPlayer on the mobile device. The effect is good and no blue light pressure on both Android and IOS.

6)Thunder remote download
a.Go to the Thunder routing forum to download the required installation package first. The link for stable version:
http://luyou.xunlei.com/thread-12545-1-1.html.
Download Xware1.0.31_cubieboard zip file.

Orange-pi-pc2-img38.png


Note: If you want to try the latest version, you can download the latest test version: http://luyou.xunlei.com/thread-15167-1-1.htm.
b.Enter the directory after uploaded the unzip file to OrangePi. It is recommended to rename the file to xunlei
c.Installation method of version 1.0.31:
i $ cd /xxx/xunlei The xxx is the directory of installation xunlei file
ii $ chmod 755 portal
iii $ ./portal

Orange-pi-pc2-img39.png


iv You will get an activation code after booting like the following:

Orange-pi-pc2-img40.png


v Copy this activation code to http://yuancheng.xunlei.com (Which required to log in with account of Thunder). Then click the tab on the top right corner to add, fill in the activation code to complete the binding according to the following figure.

Orange-pi-pc2-img41.png


vi Setting start up
$ sudo nano /etc/rc.loacl
add the following contents before exit 0
cd /xx/xunlei
./portal & ctrl +o and enter, ctrl +x to save and exit.
d.Installation of version 3.0.32.253:
i $ cd /xxx/xunlei The xxx is the directory of installation file of xunlei
ii $ sudo nano thunder_mounts.cfg Modify the download path

Orange-pi-pc2-img42.png


iii chmod +x etm_monitor
iv Run ./etm_monitor, there will be an activation code page like version 1.0.32. And then binding on the Thunder remote page (above steps 4, 5). There might be one or two errors while running, ignore it (selection type of shell and generation of INI file).
v Setting start up
sudo nano /etc/rc.loacl
add the following contents before exit 0
cd /xx/xunlei
./etm_monitor &
ctrl +o and enter, ctrl +x to save and exit.
It could be remote downloading on computer, mobile phone or tablet by login yuancheng.xunlei.com

7)Modify the size of ext4 file system
After made the written image into SD card for booting, enter into rootfs partition’s expansion of file system. It could enhance the performance of SD card to avoid limited storage cause prblem.

  • Method 1


Extend rootfs file partition of TF card on PC: Select the specified disk, right click and select the corresponding disk, select "change size" and adjust it into your desired size, click "resize", close the dialog box and click "apply all operations", select the application to complete the expansion operation

  • Method 2


Enter into the system and extend via shell Before partition

Orange-pi-pc2-img43.png


Eneter into system and expend via resize_rootfs.sh

Orange-pi-pc2-img44.png


Enter resize_rootfs.sh on command line, the system will expending automatically, Reboot the system and use df -lh to check whether expending is successful

Orange-pi-pc2-img45.png


a.Expand file system
i. Boot to Linux, umount /dev/sdb1 and /dev/sdb2, if it prompts disk busy, then use fuser to clean the using disk(we will recommend using another Linux booting disk to lead the system).
ii. Use fdisk /dev/sdb to adjust the partition size, after into it, enter p, and keep in mind about the initial position of needed extending size partition.
iii. Enter d to delete the partition need to change the size(my file system is /dev/sdb2, which is the 2 partition ).
iv. Enter n to build a new partition, make sure the initial position is the same as you deleted, and enter the number as you desire.
v. Enter w to save the partition data.
vi. Use the following command to check the file system(make sure it is a right file system)
e2fsck -f /dev/sdb2
vii. Adjust the partition size
resize2fs /dev/sdb2
viii. It could mount a disk partition, you could check whether it has changed.

b.Shrink file system
i. Boot to Linux, umount /dev/sdb1 and /dev/sdb2, if it prompts disk busy, then use fuser to clean the using disk(we will recommend using another Linux booting disk to lead the system).
ii. Use the following command to check the file system(make sure it is a right file system)
e2fsck -f /dev/sdb2
iii. Modify the size of file system(Use resize2fs)
resize2fs /dev/sdb2 900M
The "s"after the number represents specifying the size of file system via the sectors(every sector calculated by 512 bite). You could also specify it into K(KB), M(MB), G(GB), etc.
iv. Use fdisk /dev/sdb to adjust the partition size, after into it, enter p, and keep in mind about the initial position of needed extending size partition. You need to first delete the partition then build a new one because the fdisk could not modify the size dynamic(you need to calculate the size, it have to enough to contain the file system adjusted in last step).
v. Enter d to delete the partition need to change the size(my file system is /dev/sdb2, which is the 2 partition ).
vi. Enter n to build a new partition, make sure the initial position is the same as you deleted, and enter the number as you desire. Besides, if it is bootable partition you want to change, note that need to keep the bootable mark in case cannot boot.
The above illustration is using fdisk and resize2fs to modify partition and file system, you could also use gparted. Gparted has graphical interface and it could help you to re-size file system at the same time of re-sizing partition. Goarted is much easier to use and reduce the change to make mistake. For now our offial Lubuntu and Raspbian could not use it.

8)How to use gc2035 on Linux
a.Use find command to find the location of the following files, and load it according to the specified order
insmod videobuf-core.ko
insmod videobuf-dma-contig.ko
insmod uvcvideo.ko
insmod cci.ko
insmod vfe_os.ko
insmod vfe_subdev.ko
insmod gc2035.ko
insmod vfe_v4l2.ko
There should be generated video0 on /dev/ after loaded. After low-level driver install, then the Andoird could be used directory.
b. Use camera in Linux
i Load up driver
sudo modprobe gc2035
sudo modprobe vfe_v4l2
ii. Install motion
sudo apt-get install motion
iii. Modify configuration
sudo nano /etc/motion/motion.conf
stream_localhost off
iv. Create folder for images saving
mkdir ~/motion
v. Modify permission
chmod 777 motion
vi. Continue modifying configuration
sudo nano /etc/default/motion
start_motion_daemon=yes
vii. Boot the server
Sudo /etc/init.d/motion start
Enter the following in browser: localhost:8081
You could check image output from camera.
Besides, you could also refer to this link:
http://www.cnx-software.com/2015/09/26/how-to-use-orange-pi-camera-in-linux-with-motion/

9)eth0 and wlan0 static mac address setting
a.If the system do not use systemd, you could modify rc.local directory and add the following:
$ vim /etc/rc.local
MAC=00:e0:4c:a1:2b:d4
ifconfig wlan0 down
ifconfig wlan0 hw ether $MAC
ifconfig wlan0 up
dhclient &
After rebooting, you could use ifconfig to check whether mac address has changed.
b.If the system used systemd, you also need to add the following besides the above steps:
$ cd /etc/systemd/system/
$ vim change_mac_address.service (You could name the server, format just like the following)

[unit]
Description=Change OrangePi Wifi mac address

[Service]
ExecStart=/etc/rc.local RemainAfterExit=yes

[Install]
sWantedBy=multi-user.target

$ systemctl enable change_mac_address.service
Modify mac address of eth0 is same as modifying wlan0’s, just need to replace wlan0 into eth0.

10)Orange Pi Android root
There is defaulted with root permission on Android pre-installed, but lacking authorization management software. The following is how to add authorization management software.

You need to have UsbModeSwitch.apk and UPDATE-SuperSU-v2.46.zip, install kingroot and make sure OTG on Orange Pi could connect to PC.

a.Open adb debug mode
Use U disk or card reader to install UsbModeSwitch.apk into Orange Pi OS and open it, tick "enable usb device mode" and use debug cable to connect OTG port and PC (make sure it is micro usb-cable in case other cables could not be recognized). Normally PC would search and install adb driver software automatically. If PC failed to install, you could install PC version’s Peasecod to install the driver software.

b.After connected Orange PI and PC, open command mode of PC, enter related command of adb(you need to install adb debug command, which Peasecod has adb command ). Here is the command:
adb remount
adb shell
windows(win+r) command line enter into command mode, then enter into kingroot directory and execute the following steps:
adb shell
root@rabbit-p1:/ # mkdir /tmp
root@rabbit-p1:/ # cd /system/bin
root@rabbit-p1:/ # mount -o remount, rw /system
root@rabbit-p1:/system/bin # ln -s busybox-smp unzip
Logout adb shell Mode
root@rabbit-p1:/exit (Or Ctrl + C)
Unzip UPDATE-SuperSU-v2.46.zip
You will obtain META-INF/com/google/android/update-binary and put it into specific catalog.
adb push /path/UPDATE-SuperSU-v2.46.zip /data/local/tmp path is file’s path
adb push /path/ update-binary /data/local/tmp
adb shell
root@rabbit-p1:/ #cd /data/local/tmp
root@rabbit-p1:/ #sh update-binary 0 1
/data/local/tmp/UPDATE-SuperSU-v2.46.zip
......
......
After executed scripts, enter reboot command and reboot it, you could use the device authorization management software normally.
After rebooted, there might be no super administrator icon, you need to delete the desk configuration file and reboot the board.

Linux Kernel Source Code Compilation


In order to support the rapid development of the project, we are writing this sections for project configuration options to the binary file. When the system is running, it can get the information of the system running by reading the binary file, which can greatly simplify the time of project development.
This manual describes how to use the binary file to speed up the development of the project.
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1

Orange-pi-prime-img7.png


Download Linux Source Code


You could download the source code from the official website(Source code for AH5 chip are the same), and you could find the tools of lichee and android for file compilation.
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html

Subsection and compress the file, then unzip it after finish downloaded:

Orange-pi-pc2-img49.png


buildroot: Project compilation script
brandy: gcc-linaro, boot and uboot source code and open source cross compiler tool
linux-3.10: Kernel source code
tools: Tools of project compilation
build.sh: compilation script

Compile Project Source Code


You need to compile the entire project while it is your first time to use the source code. You can use the following commands in the /lichee directory to complete the project:

  • Enter into content of lichee, command

$ ll -a
Check if there is an executable permission on build.sh, if not, modify the permissions
$ chmod 755 build.sh

  • If there is .buildconfig after commanded ll –a, delete it

$ rm –rf .buildconfig

Orange-pi-prime-img9.png


  • Use the following command to compile the entire project

$ ./build.sh config

Orange-pi-pc2-img51.png


At this point the system will prompt the choice of the chip, as shown below, for OrangePi, select sun50iw2p1
At this point, the system will be prompted to select the platform, as shown below, for OrangePi, select Android

Orange-pi-prime-img10.png


Appear this interface indicates waiting for the compiler.

Orange-pi-prime-img11.png


Wait fifteen minutes or so, compile complete.

Orange-pi-prime-img12.png


Update the Kernel Image File and Replace Library


  • After compilation is finished, the following files will be generated in the directory:

libs: lichee/out/sun50iw2p1/android/common/lib/modules/3.10.65
Download image from official website:
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html

  • Write the image:

$ sudo dd bs=4M if=*.img of=/dev/sdb

Orange-pi-plus-2e-img16.png


  • Pull out the card reader, and then insert it again.

At this time, the SD card is inserted into PC, view the SD card mount point (if you don't know how to get a mount point for the SD card, please refer to the diagram below).
The first boot partition

Orange-pi-prime-img14.png


The second rootfs partition

Orange-pi-pc2-img59.png


Copy the kernel image file generated by the compiler to the first partition (boot partition)
Copy the lib library which generated after compilation to the second partition (rootfs partition)
We would suggest using compilation system on github of official website.

Orange-pi-pc2-img60.png


build.sh Execute script into the graphical interface of compilation
extenal Inside are patch and some configuration kernel file
output File generated
script Script compiled
toolchain Cross compiler location
uboot uboot source code

Execute./build.sh enter into graphical interface and select Prime

Orange-pi-pc2-img61.png


Enter password of root

Orange-pi-pc2-img62.png


Update Kernel directory and module

Orange-pi-pc2-img63.png


Select corresponding file directory and update uImage and modules

Orange-pi-pc2-img64.png


Android Kernel Source Code Compilation


Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1

Orange-pi-prime-img15.png


Software
Linux host computer, which hard disk space at least 50G (to meet a fully compiled need)
Linux host computer needs:
Version 2.7.3 of Python;
Version 3.81-3.82 of GNU Make;
Version 1.7 or higher version of Git.
Version 1.7 of Java

Install JDK


The following will be illustrating jdk1.6 installation, it would be same for jdk1.7 installation.

  • Download and install JDK, you will obtain jdk-6u31-linux-x64.bin
  • Modify the permission of jdk-6u31-linux-x64.bin, which has no prior permission
  • $./jdk-6u31-linux-x64.bin

It will generate a folder:

Orange-pi-pc2-img66.png


  • Input at terminal

Note that JAVA_HOME is the name of the current directory, you need to fill in according to your own storage directory.

Orange-pi-pc2-img67.png


$ export JAVA_HOME=*/jdk1.6.0_31
$ export PATH=$PATH:/$JAVA_HOME/bin
$ export CLASSPATH=.:$JAVA_HOME/lib
$ export JRE_HOME=$JAVA_HOME/jre

Orange-pi-pc2-img68.png


  • Command line input Jav and press tab to see whether it auto completion (Java), which indicates it can successfully installed version 1.7.


Install Platform Supported Software


$ sudo apt-get install git gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ libgl1-mesa-dev g++-multilib mingw32 tofrodos \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

Download Android Source Package


Download website(source code is same for all boards of H3 chip): http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.html

Unzip the download file you will obtain the following directories:

Orange-pi-pc2-img69.png


Install Compiler Tool Chain


The compiler tool chain has been integrated in Android SDK. Tool chain is on: lichee/brandy/gcc-linaro/ of Android SDK(already exist)

Orange-pi-pc2-img70.png


Compile Lichee source Code


There are Android and Lichee after unzipped the package, enter the directory of Lichee:
$ cd lichee
$ ./build.sh lunch
Select sun50iw2p1
Print information of successful compilation

Orange-pi-prime-img16.png


Android Source Code Compilation


Input the command:
$ cd android
$ source ./build/envsetup.sh

Orange-pi-prime-img17.png


$ lunch dolphin_fvd_p1-eng # Select the scheme number

Orange-pi-prime-img18.png


$ extract-bsp # Copy the kernel and the drive module

Orange-pi-prime-img19.png


$ make The rear values of # is for the simultaneous compilation process, dependent on the host configuration

Orange-pi-prime-img20.png


$ pack #Packaged into firmware
$ cd */lichee/tools/pack/

Use Project Configuration Files


sys_config.fex Introduction


Configure hardware: sys_config.fe

The sys_config.fex is a binary configuration file that used by the SOC kernel driver or LiveSuit for a particular target board, including how to set up a variety of peripherals, ports, and I/O which based on the target version.
For OrangePi, the location of the project configuration document is: lichee/tools/pack/chips/sun50iw2p1/configs/dolphin-p1/sys_config.fex
Copy the file to the directory of /lichee, use command:
$ cd ./lichee
$ cp ./tools/pack/chips/sun50iw2p1/configs/dolphin-p1/sys_config.fex ./
You could personalized configuration of sys_config.fex according to sysconfig1.fex_manul_linux_BSP_v0.4.doc. Direcotory of sysconfig1.fex_manul_linux_BSP_v0.4.doc is /lichee/buildroot/docs.

Examples


1)Modify the output mode into tv

  • tv-out out, the output type of tv0 is invalid, you need to set the output type of tv1 into pal.

Modify defaulted enable display output configuration into tv
[tv0]
used = 1
tv_dac_used = 1
dac_src0 = 0
dac_type0= 0
interface= 1
[tvout_para]
tvout_used= 1
tvout_channel_num= 1

[disp]
disp_init_enable= 1
disp_mode= 1
screen0_output_type= 2
screen0_output_mode= 11
screen1_output_type= 2
screen1_output_mode= 11
dev0_output_type = 4
dev0_output_mode = 4
dev0_screen_id = 0
dev0_do_hpd = 1
dev1_output_type = 2
dev1_output_mode = 11
Modify sys_confi and replace it when it generated OrangePiH5.dtb. If would be faster if use compilation system on githug. About compilation you could refer to the charter of Linux Compilation.

2)Loading tv.ko module automatically after booted
Enter /lib/ directory, enter command:
depmod -a
Add one more line on /etc/modules
tv
It would be tv out after booted

  • Capacitance touch panel (capacitor tp)


Configuration Item Configuration Meaning
ctp_used=xx Whether turn on capacitance touch panel, if so set the value as 1, and vice verso 0.
ctp_name =xx Indicates the control scheme used in the specified scheme, for now there are: "ft5x_ts" or "Goodix-TS".
ctp_twi_id=xx Used for selecting i2c adapter, there are 0 and 2.
ctp_twi_addr =xx Indicates the device address of i2c, it is related to the specific hardware.
ctp_screen_max_x=xx Maximum coordinates of the X axis of the touch panel
ctp_screen_max_y=xx Maximum coordinates of the Y axis o the touch panel
ctp_revert_x_flag=xx Whether needed to flip the X coordinates, if so then set 1, and vice verso 0.
ctp_revert_y_flag=xx Whether needed to flip the Y coordinates, if so then set 1, and vice verso 0.
ctp_int_port=xx GPIO configuration of the interrupt signal of capacitive touch panel
ctp_wakeup=xx GPIO configuration of the wake-up signal of capacitive touch panel
ctp_io_port=xx Capacitive screen IO signal, currently share with interrupt signal common pin

Configuration samples:

ctp_used = 1
ctp_name = "ft5x_ts"
ctp_twi_id = 2
ctp_twi_addr = 0x70
ctp_screen_max_x = 800
ctp_screen_max_y = 480
ctp_revert_x_flag = 0
ctp_revert_y_flag = 0
ctp_int_port = port:PH21<6><default>
ctp_wakeup = port:PB13<1><default><default><1>
ctp_io_port = port:PH21<0><default>

Note: If you want to support the new capacitive touch IC, you need to combine the configuration of the BSP A10 layer, which should be based on the original capacitive touch IC code, to make the appropriate changes. Specifically, 1) ctp_twi_id should be consistent with the hardware connection in sys_config; 2) In the drive part of the code: the use of twi from the device name + address should be consistent with the ctp_name and ctp_twi_addr in sys_config configuration. At the same time, the other sub configuration in sysconfig should also be properly configured, these configurations should be corresponding processing in the program.

Orange Pi Driver development


 In order to help developers become more familiar with OrangePi, this manual describes how to use simple device driver modules and applications on the development board.

Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1

Orange-pi-prime-img15.png


Device driver and application programming


1)Application Program (app.c)

Orange-pi-i96-img50.png


2)Driver Program (OrangePi_misc.c)

Orange-pi-i96-img51.png


Orange-pi-i96-img52.png


Compile device driver


Copy the OrangePi_misc.c to the directory of :
*/lichee/linux-3.10/driver/misc

Orange-pi-pc2-img83.png


Enter to */lichee/linux-3.10/drivers/misc/, and modify makefile
Modify Makefile on currently file, shown as following:

Orange-pi-i96-img53.png


There is Kconfig on the same sibling folders with Makefile. Each Kconfig respectively describes the the source directory file related kernel configuration menu. In the kernel configuration making menuconfig, it read from the Kconfig config menu and the user configuration saved to the config. In the kernel compile, the main Makefile by calling this.Config could know the user's configuration of the kernel.
Kconfig is corresponding to the kernel configuration menu. Add a new driver to the kernel source code, you can modify the Kconfig to increase the configuration menu for your drive, so you can choose whether the menuconfig driver was compiled or not.

Orange-pi-i96-img54.png


Back to the source code directory:

Orange-pi-pc2-img85.png


$ ./build.sh
After compiled the kernel, there will be an orangepi_misc.ko file generated on the directory of lichee/linux-3.10/output/lib/modules/3.10.65

Orange-pi-prime-img16.png


There will be a .ko file on the directory of:

  • /lichee/linux-3.10/output/lib/modules/3.10.65/

It is generated after OrangePi_misc.c compilation.
IInsert U disk (please note the SD card should have been written image) if the SD card system is mounted to the directory / dev/ sdb, SD card will have two sub mount points, respectively are / dev / sdb1 and /dev/sdb2. Two partition of SD card will automatically mount to the PC /media/ directory, the first partition is the boot partition and the second partition is the rootfs partition.

Orange-pi-i96-img55.png


Copy OrangePi_misc.ko file to /media/*/lib/modules/3.10.65.
$ cp OrangePi_misc.ko /media/*/lib/modules/3.10.65

Corss-complile or compiled Application code


Here will take arm-linux-gnueabihf-gcc as an example. Check whether there is the cross compiler, if not, then download and install it.
$ arm-linux-gnueabihf-gcc -v

Orange-pi-i96-img56.png


While compiling the application, you will fill that you need the cross compiler arm-linux-gnueabihf-gcc, download and install it.

Orange-pi-i96-img57.png


Unzip the downloaded file and enter the the directory

Orange-pi-i96-img58.png


Check the information after entering bin directory

Orange-pi-i96-img59.png


pwd hows the path and export it into the whole project

Orange-pi-i96-img60.png


$ ll /etc/environment shows that the file can only read, need to modify permissions
$ chmod 755 /etc/environment
Modify permission

Orange-pi-i96-img61.png


Add the path to the whole environment variable

Orange-pi-i96-img62.png


Compile the application with cross compiler

$ arm-linux-gnueabihf-gcc app.c –o aq
There will be an ap application generated in the directory, copy it to the development board file system(on the rootfs directory of /home/orangepi/)
$ cp aq /media/*/home/orangepi/

Running driver and application


Removed the SD card and inserted it into the development board and power on.
You need to switch to root users and load module driver module to the development board first.
$ insmod /lib/modules/orangepi.ko

Orange-pi-i96-img63.png


$ lsmod To check whether it is loaded

Orange-pi-i96-img64.png


$ ll /dev/orangepimisc( Miscellaneous equipment automatically generated device files, the specific look at the driver code)

Orange-pi-i96-img65.png


Executive application (note the use of the application, check the code for specify)
$ ./aq /dev/orangepimisc

Using Debug tools on OrangePi


Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1

Orange-pi-prime-img15.png


TTL to USB cable

Orange-pi-i96-img67.png


Operations on Windows


 In order to get more debugging information in the project development process of using OrangePi, OrangePi default support for serial information debugging. For developers, you can simply get the serial port debugging information with the materials mentioned above. The host computer using different serial debugging tools are similar, basically can reference with the following manual for deployment. There are a lot of debugging tools for Windows platform, the most commonly used tool is putty. This section takes putty as an example to explain the deployment.

1)Install USB driver on Windows

  • Download and unzip the latest version of driver:

 PL2303_Prolific_DriverInstaller_v130.zip

Orange-pi-i96-img68.png


  • Choose application installation as Administrator
Orange-pi-i96-img69.png


  • Wait for installation completing
Orange-pi-i96-img70.png


2)Install putty on Windows

  • Download putty installation package
Orange-pi-i96-img71.png


  • Unzip and install it
Orange-pi-i96-img72.png


  • Open it after installed, shown as below:


Orange-pi-i96-img73.png


3)Connect method

Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC
4)Equipment information acquisition

  • Select control panel on Start menu
Orange-pi-i96-img75.png


Orange-pi-i96-img76.png


  • Click on the device manager to check the port number
Orange-pi-i96-img77.png
Orange-pi-i96-img78.png


5)Putty configuration

Orange-pi-i96-img79.png


Serial port should set to the corresponding port number (COM5), the speed should set to 115200

6)Start debug
Power Orange Pi on and boot it, the serial port will automatic print out debug log.

Orange-pi-i96-img80.png


Operations on Linux


There are Minicom and Kermit serial debugging tools for Linux, this section will take Kermit as an example to have an illustrate.

1)Install Kermit

  • Install the Kermit by execute command:

 $ sudo apt-get install ckermit

Orange-pi-i96-img81.png


  • Configurate Kermit

 $ sudo vi /etc/kermit/kermrc

Orange-pi-i96-img82.png


  • Add lines:

set line /dev/ttyUSB1
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5

Orange-pi-i96-img83.png


2)Connect method for debug
 Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC
3)Equipment information acquisition

$ ls /dev/ (Input command in the PC terminal to check the device number of TTL to the serial cable)

Orange-pi-i96-img85.png


  • It can be seen from the figure that TTL to the serial port cable is identified as ttyUSB0, configure the /ect/kermit/kermitc file, update the serial port information.

 $ sudo vi /etc/kermit/kermitc

  • Set the value of setline into /dev/ttyUSB0
Orange-pi-i96-img86.png


4)Start debug

  • Input command in the host computer terminal, enter the Kermit mode:

 $ sudo kermit –c

Orange-pi-i96-img87.png


  • Power on and boot OrangePi, the serial port will print debug log automatically
Orange-pi-i96-img88.png


Download the Orange Pi Prime User Manual


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