Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero Plus 2

954 bytes added, 20:13, 30 June 2022
no edit summary
|}
<br>
<div style="display:flex;padding-left:100px; ">
<div style="text-align:center;">
[[File:Orange-pi-pc2-img7.png|200px200px|]]<br>
</div>
c.Download the operating system image file from the download page, the page address is as following:<br>
http://www.orangepi.org/downloadresourceshtml/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.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>
e.Right click to download the file, select "Unzip file" to write image to TF card
<br>
c.Download the OS image from download page <br>
http://www.orangepi.org/`downloadresourceshtml/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br>
<br>
d.Unzip and right click the downloaded file, select " Unzip file"<br>
https://drive.google.com/file/d/0B_VynIqhAcB7NTg2UkRDdHRWX2s/edit?usp=sharing<br>
Download Android OS image from here: <br>
http://www.orangepi.org/downloadresourceshtml/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br>
b.Format the TF card<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img15.png|400px|]]</div>
<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>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img16.png|600px|]]</div>
<br>
d.Click "OK" button after successfully formatted the TF card to normal.<br>
e.Burn the Android OS image into your TF card. Please pay attention to the following with red marks.<br>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img17.png|600px|]]</div>
<br>
f.Click "Burn" button for writing to TF card and wait for it finish<br>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img18.png|600px|]]</div>
<br>
g.Click "Exit" button after burn Android image to TF card successfully.<br>
<br>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img19.png|400px|]]</div>
<br>
ii. Select the image file path that has been unzipped<br>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img20.png|600px|]]</div>
<br>
iii. Click "start" button and wait for the image to write.<br>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img21.png|600px|]]</div>
<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 >[[File: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>
In this section would take image: ubuntu_server_zeroplus2_H5_V0_1.img as an example to illustrate how to write Linux image into EMMC. We would recommend you use the server version image since the RAM of zero plus2 is not too big.<br>
<br>
* Method 1:
a. $ sudo OrangePi_FormatEMMC.sh Formatting EMMC
<br>
<div >[[File:Orange-pi-zero-plus2-img9.png|600px|]]</div>
<br>
$ sudo OrangePi_Install_OrangePi_2_EMMC.sh Writ image into EMMC<br>
<br>
<div >[[File:Orange-pi-zero-plus2-img10.png|600px|]]</div>
<br>
Wait for writing finish and re-boot<br>
<br>
* Method 2:
$ sudo OrangePi_Settings<br>
<br>
<div >[[File:Orange-pi-zero-plus2-img11.png|600px|]]</div>
<br>
Select the fourth one Storage Setting<br>
<br>
<div >[[File:Orange-pi-zero-plus2-img12.png|600px|]]</div>
<br>
Select the first one, Format EMMC as Normal Storage First format EMMC<br>
Select fourth one, Install Image into EMMC Install image into EMMC and re-boot
<div >[[File:Orange-pi-zero-plus2-img13.png|600px|]]</div>
<br>
'''1)Hardware Connection Sketch Map'''<br>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2zero-plus2-img22img14.png|400px|]]<br><div style="width:400px;text-align:center;">Orange Pi PC2 Zero Plus2 runs on Android 45.4 1 system</div>
</div>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2zero-plus2-img23img15.png|400px|]]<br><div style="width:400px;text-align:center;">Orange Pi PC2 Zero Plus2 runs on Debian system</div>
</div>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2zero-plus2-img24img16.png|400px|]]<br><div style="width:400px;text-align:center;">Orange Pi PC2 Zero Plus2 runs on Ubuntu system</div>
</div>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-pc2zero-plus2-img25img17.png|400px|]]
</div>
<br>
<br>
a.Insert the TF card with written image in to the TF card slot.<br>
b.It is HDMI interface on the bottom edge of the board. You could use HDMI cable to connect your Orange Pi to HDMI TV or monitor.<br>
You could also use AV interface and audio interface to connect output video and audio to analog TV or display.<br>
c.Insert USB keyboard There is 13pin on board which you could connect to expansion board. For expansion board, 2USB ports, mic and mouse into the USB interfaceIR receiver are available.<br>d.It is the network port in the middle of 3USB interfacesmodule on board, which you can access Orange Pi to the wired network.<br>e.It is the You could connect to a power input interface adapter on the right side for connecting mic USB OTG with a power adapter up to or bigger than 5V/2A. Avoid using smaller power GSM mobile phone charger, it is not able to output 2A even if it marked "5V/2A ".<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>
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>
<br>
 
=== '''Step 4: Turn off your Orange Pi Correctly''' ===
<br>
'''1)Connect to the wired network'''<br>
<br>
If * Method 1:<br>a.Enter the Orange Pi has connect to wire cable, then following in the system would obtain the IP address automaticallycommand line:<br>$ ifconfig<br>To check whether there is (wlan*)<br>b. If there is no wire cable connecting, then load the system would fail at obtaining IP address which could cause corresponding module according to the booting delaywlan model<br>$ insmod bcmdhd.ko<br>After connecting to For example: For AP6212 is bcmdhd.ko<br>c.Enter command ifconfig, you should see wlan0(hypothesis it is wlan0)<br>d.Configure wired network, it should be green LED lighting and yellow LED flashing. You first you need to make sure the image you wrote is correspondent since some boards are 100M Ethernet but some are 1000M Ethernet.know ssid and psk(account and password), enter corresponding wlan*, ssid, psk<br>100M Ethernet is using internal phy, configuration just like $ sudo nano /etc/network/interfaces (add the following:contents) <br>2 indicates internal phyauto wlan0<br>iface wlan0 inet dhcp <div style="paddingbr>wpa-left:200px;"ssid xxxx<br>[[File:Orangewpa-pi-pc2-img26psk xxxx<br>e.Reboot the computer and the wired network will work.png|600px|]]<br>$ sudo reboot</divbr>
<br>
1000M Ethernet is using external phy<div style="padding-left* Method 2:200px;">[[File:Orange-pi-pc2-img27.png|600px|]]</div>
<br>
The above a.Build wifi hotspot configuration has been configuredfile of wpa_supplication.conf for on/etc/network/ directory and add the following: <br>network={<br>ssid="wifi hot spot name" <br>psk="wifi hot spot password" <br>priority=1<br>}b.Connect wifi, here is the command: <br>ifconfig wlan0 up<br>sudo wpa_supplicant -i wlan0 -c /etc/network/wpa_supplication.conf & dhcpcd wlan0 &<br>c.Test the condition of wifi connection<br>Use iwconfig command, you could refer will find the related information of wlan0, use ping command to it when usingtest.<br>
<br>
'''2)Login via vnc and ssh'''<br>
* Modify ssh configuration file /etc/ssh/sshd_config
<br>
<div style="padding-left:200px;" >
[[File:Orange-pi-pc2-img28.png|400px|]]
</div>
* Check the IP with ifconfig, login via ssh of root user
<br>
<div style="padding-left:200px;" >
[[File:Orange-pi-pc2-img29.png|600px|]]
</div>
<br>
'''3)HDMI or 3.5mm Sound Output(3.5mm sound output would require using an expansion board)'''<br>
<br>
a.The sound was default to output via HDMI on image, it could check and change via alsamixer.<br>
aplay 123.wav<br>
<br>
 
=== '''Universal Software Configuration''' ===
<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
<div style="padding-left:100px; ">
[[File:Orange-pi-pc2-img30.png|400px|]]
</div>
c.$ groupmod -n zhangsan orangepi Change group
<div style="padding-left:100px; ">
[[File:Orange-pi-pc2-img31.png|400px|]]
</div>
http://luyou.xunlei.com/thread-12545-1-1.html. <br>
Download Xware1.0.31_cubieboard zip file.
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img38.png|800px|]]</div>
<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>
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
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img42.png|400px|]]</div>
<br>
iii chmod +x etm_monitor<br>
<br>
Enter into the system and extend via shell Before partition
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img43.png|400px|]]</div>
<br>
Eneter into system and expend via resize_rootfs.sh
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img44.png|400px|]]</div>
<br>
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
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img45.png|400px|]]</div>
<br>
a.Expand file system<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>
<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>[[File:Orange-pi-pc2-img46.png|800px|]]</div>
<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
<div style="padding-left:200px;" >[[File:Orange-pi-pc2zero-plus2-img47img18.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>
=== '''Download Linux Source Code''' ===
<br>
You could download the source code from the official website(Source code for H5 chip are the same): <br>http://www.orangepi.org/downloadresourceshtml/hardWare/computerAndMicrocontrollers/service-and-support/<div>[[File:Orange-piPi-Zero-pc2Plus-img482.png|800px|]]html</divbr>
<br>
Subsection and compress the file, then unzip it after finish downloaded:
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img49.png|600px|]]</div>
<br>
buildroot: Project compilation script<br>
build.sh: compilation script<br>
<br>
 
=== '''Compile Project Source Code''' ===
<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="padding-left:200px;" >[[File:Orange-pi-pc2-img52.png|400px|]]</div>
<br>
Appear this interface indicates waiting for the compiler.
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img53.png|400px|]]</div>
<br>
Wait fifteen minutes or so, compile complete.
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img54.png|400px|]]</div>
<br>
=== '''Update the Kernel Image File and Replace Library''' ===
libs: lichee/out/sun50iw2p1/android/common/lib/modules/3.10.65 <br>
Download image from official website:<br>
http://www.orangepi.org/downloadresourceshtml/hardWare/computerAndMicrocontrollers/service-and-support/<div>[[File:Orange-piPi-Zero-pc2Plus-img552.png|800px|]]html</divbr>
<br>
* Write the image:<br>
$ sudo dd bs=4M if=*.img of=/dev/sdb<br>
<br>
<div>[[File:Orange-pi-pc2plus-img562e-img16.png|800px|]]</div>
<br>
Pull out the card reader, and then insert it again.<br>
uboot uboot source code<br>
<br>
Execute./build.sh enter into graphical interface and select PC2Zero Plus2<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img61.png|600px|]]</div>
<br>
Enter password of root
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img62.png|600px|]]</div>
<br>
Update Kernel directory and module
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img63.png|600px|]]</div>
<br>
Select corresponding file directory and update uImage and modules
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img64.png|600px|]]</div>
<br>
<br>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;" >[[File:Orange-pi-pc2zero-plus2-img65img18.png|800px|]]</div>
<br>
Software<br>
Linux host computer needs: <br>
Version 2.7.3 of Python;<br>
Version 3.81-3.82 of GNU Make; <br>JDK 6;<br>
Version 1.7 or higher version of Git.<br>
<br>
=== '''Download Android Source Package''' ===
<br>
Download website: http://www.orangepi.org/downloadresourceshtml/ hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br><br>
Then you will obtain the following directories:
<div>[[File:Orange-pi-pc2-img69.png|300px|]]</div>
<br>
 
=== '''Install Compiler Tool Chain''' ===
<br>
Select sun50iw2p1<br>
Print information of successful compilation
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img71.png|400px|]]</div>
<br>
=== '''Compile Command of Android Code''' ===
<br>
$ lunch dolphin_fvd_p1-eng # Select the scheme number
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img73.png|600px|]]</div>
<br>
$ extract-bsp # Copy the kernel and the drive module
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img74.png|600px|]]</div>
<br>
$ make The rear values of # is for the simultaneous compilation process, dependent on the host configuration
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img75.png|600px|]]</div>
<br>
$ pack #Packaged into firmware
'''Write image:'''<br>
Copy the generated image file i to the SD card, switch to the windows operating system. Programming software download website:<br>
http://www.orangepi.org/downloadresourceshtml/<div style="paddinghardWare/computerAndMicrocontrollers/service-and-left:200px;">[[File:support/Orange-piPi-pc2Zero-img78Plus-2.png|800px|]]html</divbr>
<br>
Download the compressed package, unzip and get the folder
<div style="padding-left:200px;" >[[File:Orange-pi-pc2-img81.png|200px|]]</div>
<br>
Enter the folder, open the program to run as Administrator
Insert the TF card with written image to OrangePi, turn on the computer then you could enter to Android system.<br>
<br>
 
== '''Use Project Configuration Files''' ==
<br>
<br>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;" >[[File:Orange-pi-pc2zero-plus2-img65img18.png|600px]]</div>
<br>
=== '''Device driver and application programming''' ===
<br>
$ ./build.sh<br>
After compiled the kernel, there will be an orangepi_misc.ko file generated on the directory of lichee/linux-3.410/output/lib/modules/3.410.4165<br><div>[[File:Orange-pi-pc2prime-img86img16.png|800px]]</div>
<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/
<div>[[File:Orange-pi-pc2plus-img872e-img28.png|800px]]</div>
<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.
<br>
=== '''Corss-complile or compiled Cross compiler Application codeProgram''' ===
<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
<div>[[File:Orange-pi-i96-img56.png|800px]]</div>
<br>
$ ll /etc/environment shows that the file can only read, need to modify permissions <br>
$ chmod 755 /etc/environment<br>Modify permission
<div>[[File:Orange-pi-i96-img61.png|800px]]</div>
<br>
=== '''Running driver and application''' ===
<br>
Running Applications on Development Board<br>
Removed the SD card and inserted it into the development board and power on.<br>
You need to switch to root users and load module driver module to the development board first.<br>
<br>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;" >[[File:Orange-pi-pc2zero-plus2-img65img18.png|800px]]</div>
<br>
'''TTL to USB cable'''
<div style="padding-left:200px;" >[[File:Orange-pi-i96-img67.png|800px]]</div>
<br>
=== '''Operations on Windows''' ===
* Open it after installed, shown as below:
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-i96-img73.png|600px]]</div>
<br>
'''3)Connect method'''<br>
<br>
* Select control panel on Start menu
<div style="padding-left:200px;" >[[File:Orange-pi-i96-img75.png|400px]]</div>
<br>
<div style="padding-left:200px;" >[[File:Orange-pi-i96-img76.png|600px]]</div>
<br>
* Click on the device manager to check the port number
<div style="padding-left:200px;" >[[File:Orange-pi-i96-img77.png|400px]]</div><div style="padding-left:200px;" >[[File:Orange-pi-i96-img78.png|400px]]</div>
<br>
'''5)Putty configuration'''
<div style="padding-left:200px;" >[[File:Orange-pi-i96-img79.png|400px]]</div>
<br>
Serial port should set to the corresponding port number (COM5), the speed should set to 115200<br>
'''6)Start debug'''<br>
Power Orange Pi on and boot it, the serial port will automatic print out debug log.
<div style="padding-left:100px; ">[[File:Orange-pi-i96-img80.png|600px]]</div>
<br>
set window 5
</div>
<div style="padding-left:200px;" >[[File:Orange-pi-i96-img83.png|600px]]</div>
<br>
'''2)Connect method for debug'''
<br>
$ ls /dev/ (Input command in the PC terminal to check the device number of TTL to the serial cable)
<div style="padding-left:100px; ">[[File:Orange-pi-i96-img85.png|800px]]</div>
<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
* Set the value of setline into /dev/ttyUSB0
<div style="padding-left:100px; ">[[File:Orange-pi-i96-img86.png|800px]]</div>
<br>
'''4)Start debug'''
* Input command in the host computer terminal, enter the Kermit mode:
 $ sudo kermit –c
<div style="padding ">[[File:Orange-pi-left:100px;i96-img87.png|800px]]</div><br>* Power on and boot OrangePi, the serial port will automatic print debug log<div style=" ">[[File:Orange-pi-i96-img87img88.png|800px]]</div>
<br>
* Power it on and boot == '''Download the Orange Pi, the serial port will automatic print debug log, the account and password ard root/orangepi and orangepi/orangepi<div styleZero Plus2 User Manual''' =="padding-left:100px;">[[File:Orange-pi-i96-img88.png|800px]]</div>
<br>
For more information on using the Orange Pi PC2Zero Plus2, please see the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html <span style="color:red;">Orange Pi PC2 Zero Plus2 User Manual</span>]. (Click to download)