Changes

Jump to: navigation, search

Orange Pi Win Plus

2,404 bytes removed, 20:18, 30 June 2022
no edit summary
<br>
'''Top view of Orange Pi Win'''
<div>[[文件File:Orange-pi-win-img1.png|500px]]</div>
<br>
'''Bottom view of Orange Pi Win'''
<div>[[文件File:Orange-pi-win-img2.png|500px]]</div>
<br>
'''Interface instructions of Orange Pi Win'''
<div>[[文件File:Orange-pi-win-img3.png|500px]]</div><div>[[文件File:Orange-pi-win-img4.png|500px]]</div>
<br>
'''Top view of Orange Pi Win Plus'''
<div>[[文件File:Orange-pi-win-img5.png|500px]]</div>
<br>
'''Bottom view of Orange Pi Win Plus'''
<div>[[文件File:Orange-pi-win-img6.png|500px]]</div>
<br>
'''Interface instructions of Orange Pi Win Plus'''
<div>[[文件File:Orange-pi-win-img7.png|500px]]</div><div>[[文件File:Orange-pi-win-img8.png|500px]]</div>
<br>
<br>
A 40-pin GPIO interface on the Orange Pi Win/Win Plus is the same as Model A and Model B of Raspberry Pi. The picture below is GPIO pin define of Orange Pi Win/Win Plus.
<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 Win/Win Plus is camera connector.
<div>[[文件File:Orange-pi-pc2-img6.png|800px]]</div>
<br>
'''Orange Pi Win/Win Plus-CSI'''
<div style="display:flex;">
<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:50px;padding-top:3px;">
[[文件File:Orange-pi-pc2-img8.png|200px200px|]]<br>
HDMI to DVI cable
</div>
<div style="text-align:center;margin-left:50px;padding-top:25px;">
[[文件File:Orange-pi-pc2-img10.png|200px200px|]]<br>
TF card
</div>
<div style="text-align:center;margin-left:50px;padding-top:40px;">
[[文件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-Win-Plus.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-Win-Plus.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-Win-Plus.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>
'''1)Hardware Connection Sketch Map'''<br>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-win-img10.png|400px|]]<br>[[文件File:Orange-pi-win-img12.png|400px|]]<br>
<div style="width:400px;text-align:center;">Orange Pi Win/Win Plus runs on Android 6.0 system</div>
</div>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-win-img13.png|400px|]]<br>
<div style="width:400px;text-align:center;">Orange Pi Win/Win Plus runs on Debian system</div>
</div>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-win-img11.png|400px|]]
</div>
<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". You could short cut jumper cat on the 4pin next to DC in port. Short cut the edge 2pin for DC in, if short cut the other 2 pin then for battery in. There are two large solder joints on the back side of the board which screen printing department marked the + - pole and BAT1 logo like the following.<br>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-win-img14.png|400px|]]
</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>
Note: In the following sections, * indicates wild-cards, you need to fill in the actual values according to their file storage path.<br>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[文件File:Orange-pi-win-img15.png|800px|]]</div>
<br>
=== '''Download Linux Source Code''' ===
<br>
You could download the source code from the official website: (Source code for A64 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/service-and-support/<div>[[文件:Orange-piPi-pc2Win-img48Plus.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>
* If there is .buildconfig after commanded ll –a, delete it<br>
$ rm –rf .buildconfig
<div>[[文件File:Orange-pi-pc2-img50.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-p1t1<br><div style="padding-left:200px;">[[文件File:Orange-pi-pc2win-img52img16.png|400px|]]</div>
<br>
Appear this interface indicates waiting for the compiler.
<div style="padding-left:200px;">[[文件File:Orange-pi-pc2win-img53img17.png|400px|]]</div>
<br>
Wait fifteen minutes or so, compile complete.
<div style="padding-left:200px;">[[文件File:Orange-pi-pc2win-img54img18.png|400px|]]</div>
<br>
 
=== '''Update the Kernel Image File and Replace Library''' ===
<br>
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>[[文件:Orange-piPi-pc2Win-img55Plus.png|800px|]]html</divbr>
<br>
* Write the image:<br>
$ sudo dd bs=4M if=*.img of=/dev/sdb<br>
<br>
<div>[[文件:Orange-pi-pc2-img56.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>[[文件File:Orange-pi-pc2-img57.png|800px|]]</div>
<br>
The first boot partition
<div>[[文件File:Orange-pi-pc2-img58.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 PC2Win/<div style="padding-left:200px;">[[文件File:Orange-pi-pc2win-img61img20.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-pc2win-img65img15.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>
$ 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 \
/usr/lib/i386-linux-gnu/libGL.so<br>
<br>
 
=== '''Download Android Source Package''' ===
<br>
Download website(source code is same for all boards of H3 chip): http://www.orangepi.org/downloadresourceshtml/ hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Win-Plus.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>
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''' ===
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''' ===
$ cd android<br>
$ source ./build/envsetup.sh
<div>[[文件File:Orange-pi-pc2-img72.png|800px|]]</div>
<br>
$ lunch dolphin_fvd_p1-eng # Select the scheme number
<div>[[File:Orange-pi-win-img21.png|600px|]]</div><div style="padding-left:200px; ">[[文件File:Orange-pi-pc2win-img73img22.png|600px400px|]]</div>
<br>
$ extract-bsp # Copy the kernel and the drive module<div style="padding-left:200px;">[[文件: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;">[[文件:Orange-pi-pc2-img75.png|600px|]]</div><br>$ pack #Packaged into firmware<div>[[文件:Orange-pi-pc2-img76.png|600px|]]</div><br>$ cd */lichee/tools/pack/<div>[[文件:Orange-pi-pc2-img77.png|600px|]]</div><br>'''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/downloadresources/<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img78.png|800px|]]</div><br>Download the compressed package, unzip and get the folder<div style="padding-left:200px;">[[文件:Orange-pi-pc2-img81.png|200px|]]</div><br>Enter the folder, open the program to run as Administrator<div>[[文件:Orange-pi-pc2-img79.png|600px|]]</div><br>Write Android image on Windows with this tool:<div>[[文件:Orange-pi-pc2-img80.png|800px|]]</div><br>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>
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: <br>lichee/tools/pack/chips/sun8iw7p1sun50iw1p1/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/sun8iw7p1sun50iw1p1/configs/dolphin-p1/sys_config.fex ./ <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<br>
/lichee/buildroot/docs.<br>
<br>
 
=== '''Examples''' ===
<br>
'''1)Modify the output mode into tv'''<br>* 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 <br>[tv0]<br>used = 1<br>tv_dac_used = 1<br>dac_src0 = 0<br>dac_type0= 0<br>interface= 1 <br>[tvout_para] <br>tvout_used= 1<br>tvout_channel_num= 1<br><br>[disp] <br>disp_init_enable= 1<br>disp_mode= 1<br>screen0_output_type= 2<br>screen0_output_mode= 11<br>screen1_output_type= 2<br>screen1_output_mode= 11<br>dev0_output_type = 4<br>dev0_output_mode = 4<br>dev0_screen_id = 0<br>dev0_do_hpd = 1<br>dev1_output_type = 2<br>dev1_output_mode = 11<br>Modify sys_confi sys_config and replace it when it will generated OrangePiH5OrangePiA64.dtband replace it. If It would be faster if use compilation using github system on githug. About compilation you could refer to the charter of Linux Compilationcompile.<br><br>'''2)Loading tv.ko module automatically after booted'''<br>Enter /lib/ directory, enter command: <br>depmod -a<br>Add one more line on /etc/modules <br>tv<br>It would be tv out after booted<br>* Capacitance touch panel (capacitor tp)<br>
<br>
{| class="wikitable" style="background:#fff;width:800px;"
<br>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[文件File:Orange-pi-pc2win-img65img15.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>
=== '''Compile device driver''' ===
<br>
Copy the OrangePi_misc.c to the directory of :<br><nowiki>*/lichee/linux-3.4/driver/misc directory:</nowiki><br><div>[[文件File:Orange-pi-pc2-img83.png|800px]]</div>
<br>
Enter to */lichee/linux-3.410/drivers/misc/, and modify makefile<br><div>[[文件File:Orange-pi-pc2-img84.png|800px]]</div>
<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.4165<br><div>[[文件File:Orange-pi-pc2win-img86.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-pc2-img87img23.png|800px]]</div>
<br>
There will be a .ko file on the directory of:<br><nowiki>*/lichee/linux-3.10/output/lib/modules/3.10.65/</nowiki><br>It is generated after OrangePi_misc.c compilation.<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 / 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>
=== '''Corss-complile or compiled Application code''' ===
<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>
=== '''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>
$ insmod /lib/modules/orangepi.ko<div>[[文件: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-pc2win-img65img15.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 rootWin/orangepi and orangepi/orangepi<div styleWin Plus User Manual''' =="padding-left:100px;">[[文件:Orange-pi-i96-img88.png|800px]]</div>
<br>
For more information on using the Orange Pi PC2Win/Win Plus, please see the [https://mega.nz/#!81lSiZ5D!-ft7KxJ3qjUPP6vJ-2tsUgTEXHLisVawpIJph8aXyoU <span style="color:red;">Orange Pi PC2 Win/Win Plus User Manual</span>]. (Click to download)

Navigation menu