Changes

Jump to: navigation, search

Orange Pi Prime

3,064 bytes removed, 20:18, 30 June 2022
no edit summary
<br>
'''Top view of Orange Pi Prime'''
<div>[[文件File:Orange-pi-prime-img1.png|500px]]</div>
<br>
'''Bottom view of Orange Pi Prime'''
<div>[[文件File:Orange-pi-prime-img2.png|500px]]</div>
<br>
'''Interface instructions of Orange Pi Prime'''
<div>[[文件File:Orange-pi-prime-img3.png|600px]]</div>
<br>
<div>[[文件File:Orange-pi-prime-img4.png|600px]]</div>
<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.
<div>[[文件File:Orange-pi-pc2-img5.png|800px]]</div>
<br>
<table style=" min-width: 800px;text-align: center;" border="1" bordercolor="#d8d8d8" cellspacing="0"
<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 Prime is camera connector.
<div>[[文件File:Orange-pi-pc2-img6.png|800px]]</div>
<br>
'''Orange Pi Prime-CSI'''
|}
<br>
<div style="display:flex;padding-left:100px; ">
<div style="text-align:center;">
[[文件File:Orange-pi-pc2-img7.png|200px200px|]]<br>
HDMI to HDMI cable
</div>
<div style="text-align:center;margin-left:100px;padding-top:3px;">
[[文件File:Orange-pi-pc2-img8.png|200px200px|]]<br>
HDMI to DVI cable
</div>
<div style="text-align:center;margin-left:100px;padding-top:1px;">
[[文件File:Orange-pi-pc2-img9.png|200px200px|]]<br>
AV cable
</div>
</div>
<br>
<div style="display:flex;padding-left:200px;">
<div style="text-align:center;">
[[文件File:Orange-pi-pc2-img10.png|200px200px|]]<br>
TF card
</div>
<div style="text-align:center;margin-left:100px;padding-top:15px;">
[[文件File:Orange-pi-pc2-img11.png|200px200px|]]<br>
DC power adapter
</div>
iii In the options settings select the "format" button for quick formatting. "Format size adjustment" select "(ON)"<br>
<br>
<div style="padding-left:180px;">[[文件File:Orange-pi-pc2-img12.png|400px|]]</div>
<br>
<div style="padding-left:180px;">[[文件File:Orange-pi-pc2-img13.png|400px|]]</div>
<br>
iv Make sure the inserted TF card disk are in accordance with the chosen disk.<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-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>
e.Right click to download the file, select "Unzip file" to write image to TF card
ii Select the image file path that has been unzipped.<br>
<br>
<div style="padding-left:180px;">[[文件File:Orange-pi-pc2-img14.png|400px|]]</div>
<br>
iii Click "Write" button and wait for the image to write. <br>
<br>
c.Download the OS image from download page <br>
http://www.orangepi.org/`downloadresourceshtml/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Prime.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-Prime.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>
'''1)Hardware Connection Sketch Map'''<br>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-prime-img5.png|400px|]]<br>
</div>
<br>
<div style="padding-left:200px;">[[文件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>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-plus-2e-img11.png|400px|]]<br>
<div style="width:400px;text-align:center;">Orange Pi Prime runs on Debian system</div>
</div>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-prime-img6.png|400px|]]<br>
</div>
<br>
Megabit is using internal phy, here is the configuration: <br>
2 indicates internal phy
<div style="padding-left:200px;">[[文件File:Orange-pi-pc2-img26.png|600px|]]
</div>
<br>
Gigabit is using external phy, here is the configuration: <br>
1 indicates external phy
<div style="padding-left:200px;">[[文件File:Orange-pi-pc2-img27.png|600px|]]
</div>
<br>
* Modify ssh configuration file /etc/ssh/sshd_config
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-pc2-img28.png|400px|]]
</div>
<br>
* 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>
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>
d.$ mv /home/ornagepi /home/zhangsan Change directory of original orangepi
<div style="padding-left:80px;">
[[文件File:Orange-pi-pc2-img32.png|600px|]]
</div>
e.$ usermod -d /home/orangepi orangepi Set this directory to orangepi user's home directory
<div style="padding-left:80px;">
[[文件File:Orange-pi-pc2-img33.png|600px|]]
</div>
f.$ cat /etc/passwd It should be shown as below:
<div>
[[文件File:Orange-pi-pc2-img34.png|800px|]]
</div>
After the modification of the above iterms, it can be used the new account Zhangsan to land.<br>
$ sudo vi /etc/apt/sources.list
<div>
[[文件File:Orange-pi-pc2-img35.png|800px|]]
</div>
b.Edit source file<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
<div>[[文件File:Orange-pi-pc2-img36.png|400px|]]</div>
<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.
<div>[[文件File:Orange-pi-pc2-img37.png|800px|]]</div>
<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>
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>
ii $ chmod 755 portal<br>
iii $ ./portal
<div>[[文件File:Orange-pi-pc2-img39.png|800px|]]</div>
<br>
iv You will get an activation code after booting like the following:
<div>[[文件File:Orange-pi-pc2-img40.png|800px|]]</div>
<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.
<div>[[文件File:Orange-pi-pc2-img41.png|800px|]]</div>
<br>
vi Setting start up<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>
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>
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>
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>
You could check image output from camera.<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 inuxlinux-with-motion/<br>
<br>
'''9)eth0 and wlan0 static mac address setting'''
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-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>
=== '''Download Linux Source Code''' ===
<br>
You could download the source code from the official website(Source code for H3 AH5 chip are the same): , and you could find the tools of lichee and android for file compilation.<br>http://www.orangepi.org/downloadresourceshtml/hardWare/computerAndMicrocontrollers/<div style="paddingservice-and-left:200px;">[[文件:support/Orange-pi-plus-2ePi-img14Prime.png|300px|]]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>
* If there is .buildconfig after commanded ll –a, delete it<br>
$ rm –rf .buildconfig
<div>[[文件File:Orange-pi-pc2prime-img50img9.png|800px|]]</div>
<br>
* Use the following command to compile the entire project<br>
$ ./build.sh config
<div>[[文件File:Orange-pi-pc2-img51.png|800px|]]</div>
<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 the choice of the board, as shown below, for the OrangePi, select dolphin-p1<div style="padding-left:200px;">[[文件File:Orange-pi-pc2prime-img52img10.png|400px|]]</div>
<br>
Appear this interface indicates waiting for the compiler.
<div style="padding-left:200px;">[[文件File:Orange-pi-pc2prime-img53img11.png|400px|]]</div>
<br>
Wait fifteen minutes or so, compile complete.
<div style="padding-left:200px;">[[文件File:Orange-pi-pc2prime-img54img12.png|400px|]]</div>
<br>
 
=== '''Update the Kernel Image File and Replace Library''' ===
<br>
* After compilation is finished, the following files will be generated in the directory:
libs: lichee/out/sun8iw7p1sun50iw2p1/android/common/lib/modules/3.410.39 65 <br>
Download image from official website:<br>
http://www.orangepi.org/downloadresourceshtml/<div>[[文件:OrangehardWare/computerAndMicrocontrollers/service-piand-plussupport/Orange-2ePi-img15Prime.png|800px|]]html</divbr>
<br>
* Write the image:<br>
$ sudo dd bs=4M if=*.img of=/dev/sdb<br>
<br>
<div>[[文件File:Orange-pi-plus-2e-img16.png|800px|]]</div>
<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).
<div>[[文件:Orange-pi-pc2-img57.png|800px|]]</div>
<br>
The first boot partition
<div>[[文件File:Orange-pi-pc2prime-img58img14.png|800px|]]</div>
<br>
The second rootfs partition
<div>[[文件File:Orange-pi-pc2-img59.png|800px|]]</div>
<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>
'''We would suggest using compilation system on github of official website.'''
<div>[[文件File:Orange-pi-pc2-img60.png|800px|]]</div>
<br>
build.sh Execute script into the graphical interface of compilation <br>
uboot uboot source code<br>
<br>
Execute./build.sh enter into graphical interface and select Plus 2EPrime<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-plus-2eprime-img13img15.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; JDK 6;<br>
Version 1.7 or higher version of Git.<br>
Version 1.7 of Java<br>
<br>
=== '''Install JDK''' ===
* $./jdk-6u31-linux-x64.bin <br>
It will generate a folder:
<div>[[文件File:Orange-pi-pc2-img66.png|800px|]]</div>
<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.
<div>[[文件File:Orange-pi-pc2-img67.png|800px|]]</div>
<br>
$ export JAVA_HOME=*/jdk1.6.0_31<br>
$ export CLASSPATH=.:$JAVA_HOME/lib<br>
$ export JRE_HOME=$JAVA_HOME/jre
<div>[[文件File:Orange-pi-pc2-img68.png|800px|]]</div>
<br>
* Command line input Jav and press tab to see whether it can auto completion (Java), which indicates it can successfully installedversion 1.7.<br>
<br>
 
=== Install Platform Supported Software ===
<br>
=== '''Download Android Source Package''' ===
<br>
Download website(source code is same for all boards of H3 chip): http://www.orangepi.org/downloadresourceshtml/ <br><div style="paddinghardWare/computerAndMicrocontrollers/service-and-left:200px;">[[文件:support/Orange-piPi-plus-2e-img17Prime.png|600px|]]html</divbr>
<br>
Then Unzip the download file you will obtain the following directories:<div style="padding-left:200px;">[[文件File:Orange-pi-pc2-img69.png|300px|]]</div>
<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>
<div>[[文件File:Orange-pi-pc2-img70.png|800px|]]</div>
<br>
=== '''Compile Lichee source Code''' ===
$ cd lichee<br>
$ ./build.sh lunch <br>
<div>[[文件:Orange-pi-plus-2e-img18.png|400px|]]</div><br>Select sun8iw7p1sun50iw2p1<br>
Print information of successful compilation
<div>[[文件File:Orange-pi-pc2prime-img71img16.png|400px|]]</div>
<br>
=== '''Compile Command of Android Source CodeCompilation''' ===
<br>
Input the command:<br>
$ cd android<br>
$ source ./build/envsetup.sh
<div>[[文件File:Orange-pi-plusprime-2e-img20img17.png|600px|]]</div>
<br>
$ lunch dolphin_fvd_p1-eng # Select the scheme number
<div>[[文件File:Orange-pi-plusprime-2e-img21img18.png|600px|]]</div>
<br>
$ extract-bsp # Copy the kernel and the drive module
<div>[[文件File:Orange-pi-plusprime-2e-img22img19.png|600px|]]</div>
<br>
$ make The rear values of # is for the simultaneous compilation process, dependent on the host configuration
<div>[[文件File:Orange-pi-plusprime-2e-img23img20.png|600px|]]</div>
<br>
$ pack #Packaged into firmware
<div>[[文件:Orange-pi-plus-2e-img24.png|600px|]]</div>
<br>
$ cd */lichee/tools/pack/
<div>[[文件:Orange-pi-plus-2e-img25.png|600px|]]</div>
<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>
For OrangePi, the location of the project configuration document is: lichee/tools/pack/chips/sun8iw7p1sun50iw2p1/configs/dolphin-p1/sys_config.fex<br>
Copy the file to the directory of /lichee, use command:<br>
$ cd ./lichee<br>
$ cp ./tools/pack/chips/sun8iw7p1sun50iw2p1/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
sysconfig1.fex_manul_linux_BSP_v0.4.pdfdoc.<br>Direcotory of sysconfig1.fex_manul_linux_BSP_v0.4.pdf doc is/lichee/buildroot/docs.<br><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>
 
=== '''Examples''' ===
<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>
<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>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[文件File:Orange-pi-plus-2eprime-img13img15.png|600px]]</div>
<br>
=== '''Device driver and application programming''' ===
'''1)Application Program (app.c)'''<br>
<br>
<div>[[文件File:Orange-pi-i96-img50.png|600px]]</div>
<br>
'''2)Driver Program (OrangePi_misc.c)'''<br>
<br>
<div>[[文件File:Orange-pi-i96-img51.png|600px]]</div>
<br>
<div>[[文件File:Orange-pi-i96-img52.png|600px]]</div>
<br>
<br>
Copy the OrangePi_misc.c to the directory of :<br>
<nowiki>*/lichee/linux-3.4.3910/driver/misc</nowiki><br><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>
Enter to */lichee/linux-3.10/drivers/misc/, and modify makefile<br>
Modify Makefile on currently file, shown as following:
<div>[[文件File:Orange-pi-i96-img53.png|800px]]</div>
<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.
<div>[[文件File:Orange-pi-i96-img54.png|800px]]</div>
<br>
Back to the source code directory:<br>
<div>[[文件File:Orange-pi-pc2-img85.png|800px]]</div>
<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.3965<br><div>[[文件File:Orange-pi-plusprime-2e-img27.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>[[文件:Orange-pi-plus-2e-img28img16.png|800px400px]]</div>
<br>
Insert There will be a .ko file on the directory of:<br>*/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 / SDBsdb, 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>
Copy the OrangePi_misc.ko file to /media/*/lib/modules/3.410.3965.<br>$ cp OrangePi_misc.ko /media/*/lib/modules/3.410.3965<br>
<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>
While compiling the application, you will fill that you need the cross compiler arm-linux-gnueabihf-gcc, download and install it.
<div>[[文件File:Orange-pi-i96-img57.png|800px]]</div>
<br>
Unzip the downloaded file and enter the the directory
<div>[[文件File:Orange-pi-i96-img58.png|800px]]</div>
<br>
Check the information after entering bin directory
<div>[[文件File:Orange-pi-i96-img59.png|800px]]</div>
<br>
pwd hows the path and export it into the whole project
<div>[[文件File:Orange-pi-i96-img60.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>
Add the path to the whole environment variable<br>
<div>[[文件File:Orange-pi-i96-img62.png|800px]]</div>
<br>
Compile the application with cross compiler<br>
You need to switch to root users and load module driver module to the development board first.<br>
$ insmod /lib/modules/orangepi.ko
<div>[[文件File:Orange-pi-i96-img63.png|800px]]</div>
<br>
$ lsmod To check whether it is loaded
<div>[[文件File:Orange-pi-i96-img64.png|800px]]</div>
<br>
$ ll /dev/orangepimisc( Miscellaneous equipment automatically generated device files, the specific look at the driver code)
<div>[[文件File:Orange-pi-i96-img65.png|800px]]</div>
<br>
Executive application (note the use of the application, check the code for specify)<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-plus-2eprime-img13img15.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''' ===
* Download and unzip the latest version of driver: <br>
 PL2303_Prolific_DriverInstaller_v130.zip
<div>[[文件File:Orange-pi-i96-img68.png|800px]]</div>
<br>
* Choose application installation as Administrator
<div>[[文件File:Orange-pi-i96-img69.png|800px]]</div>
<br>
* Wait for installation completing
<div>[[文件File:Orange-pi-i96-img70.png|800px]]</div>
<br>
'''2)Install putty on Windows'''<br>
<br>
* Download putty installation package
<div>[[文件File:Orange-pi-i96-img71.png|800px]]</div>
<br>
* Unzip and install it
<div>[[文件File:Orange-pi-i96-img72.png|800px]]</div>
<br>
* 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>
* Install the Kermit by execute command:
 $ sudo apt-get install ckermit
<div>[[文件File:Orange-pi-i96-img81.png|800px]]</div>
<br>
* Configurate Kermit
 $ sudo vi /etc/kermit/kermrc
<div>[[文件File:Orange-pi-i96-img82.png|800px]]</div>
<br>
* Add lines:
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-i96-left:100px;img87.png|800px]]</div><br>* Power on and boot OrangePi, the serial port will print debug log automatically<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 stylePrime User Manual''' =="padding-left:100px;">[[文件:Orange-pi-i96-img88.png|800px]]</div>
<br>
For more information on using the Orange Pi Plus 2EPrime, please see the [https://drive.google.com/open?id=1bfnUh1yQYXn4IQTU9xEh3Lmxu2AsxEJ0 <span style="color:red;">Orange Pi Plus 2E Prime User Manual</span>]. (Click to download)

Navigation menu