background image

Orange Pi Manual                    Copy right by Shenzhen Xunlong Software Co., Ltd 

www.orangepi.org 

                                              1                                                       

www.xunlong.tv

  

 

Orange Pi Manual 

 

 

 

 

 

 

 

 

 

 

 

Summary of Contents for Orange PI

Page 1: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 1 www xunlong tv Orange Pi Manual ...

Page 2: ...ode Compilation 41 1 Obtain the Source Code of Development 42 2 Compile Project 43 3 Update the kernel image file and Library 45 III Android Kernel Source Code Compilation 49 1 Install JDK 50 2 Install Platform Supported Software 51 3 Download the Source Package and Unzip it 51 4 Install The Compiler Tool Chain 52 5 Compile Linux source Code 52 6 Compile Android Code 53 IV Use Project Configuratio...

Page 3: ...ed Application code 73 4 Running demo 75 VI Using Debug tools on OrangePi 77 Operation Steps on Windows 78 a Install driver for TTL to USB cable on Windows 78 b Install putty on Windows 79 c Connect style 79 d Equipment information acquisition 80 e Open putty configuration 82 f Start debug 82 Operation steps on Linux 83 a Install Kermit 83 b Connect style 85 c Setting kermit 85 d Start debug 86 ...

Page 4: ... All winner H3 Soc and has DDR3 SDRAM 2 What can I do with Orange Pi You can use it to build A computer A wireless server Games Music and sounds HD video A speaker Android Scratch Pretty much anything else because Orange Pi is open source 3 Whom is it for Orange Pi is for anyone who wants to create with technology not just consuming It s a simple fun useful tool and you can use it to take control ...

Page 5: ...64GB MMC card slot up to 2T on 2 5 SATA disk 16GB EMMC Flash On board Network 10 100 1000M Ethernet RJ45 On board WIFI Realtek RTL8189ETV IEEE 802 11 b g n Video Input A CSI input connector Camera Supports 8 bit YUV422 CMOS sensor interface Supports CCIR656 protocol for NTSC and PAL Supports SM pixel camera sensor Supports video capture solution up to 1080p 30fps Audio Input MIC Supports HDMI outp...

Page 6: ...pply power USB 2 0 Ports Four USB 2 0 HOST one USB 2 0 OTG Low level peripherals 40 Pins Header compatible with Raspberry Pi B GPIO 1x3 pin UART ground LED Power led Status led Key Power button Next to Reset button UBoot button optional Behind HDMI connector Supported OS Android Lubuntu Debian Raspberry Pi Image Interface definition Product size 107mm 60mm Weight 85g Orange Pi is a trademark of th...

Page 7: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 7 www xunlong tv 5 View of Hardware Top view Bottom view ...

Page 8: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 8 www xunlong tv 6 Interface instructions ...

Page 9: ... time and use your Orange Pi Start your Orange Pi need to complete the following steps Step 1 Prepare Accessories Needed The first time you use the Orange Pi you need at least some parts for the following No Items Requirements and Instructions 1 TF card 4Gb min class 4 the class indicates how fast the card is Branded TF cards which are much more reliable are the good choice ...

Page 10: ... if a HDMI monitor is unavailable 3 Keyboard and mouse Any keyboard and mouse with USB port is applicable Keyboard and mouse are high power so a USB concentrator is required 4 Ethernet cable USB WiFi Optional Network is optional It makes more convenient to mount and upgrade software in your Orange Pi PC 5 DC power adapter 5V 2V min high qualified power adapter OTG can not used a power supply 6 Aud...

Page 11: ...ng system image file to the Windows and Linux environments 1 How to write the operating system in addition to the Android system into the system a Windows 1 Inserting the TF card into the computer the capacity of the card must be larger than the operating system image usually requires 4GB or greater capacity 2 Formatting the TF card i Download tools for formatting TF card such as TF Formatter coul...

Page 12: ...N iv Make sure the inserted TF card codes are in accordance with the chosen codes v Click the Format button 3 Download the operating system image file from the download page the page address is as follows http www orangepi cn downloadresourcescn 4 model to Unzip the downloaded file in addition to the Android system this method can be used to burn to write the Android system need another burn the f...

Page 13: ...n click the Exit button b Linux 1 Inserting the TF card into the computer the capacity of the card must be larger than the operating system image usually requires 4GB or greater capacity 2 Formatting the TF card i Run fdisk l order to make sure TF disk ii Run umount dev sdxx to uninstall all partitions of TF Card iii Run sudo fdisk dev sdx order Use o order to delete all partitions of TF Card and ...

Page 14: ...s download page mention optional It will output sha1sum path imagename which should be same as the image paye SHA 1 iii Run umount dev sdxx order to uninstall all partitions in TF Card iv Run sudo dd bs 4M if path imagename of dev sdx to write down image file Wait for the image to write If it cannot work at 4M then replace a 1M which takes more time You can run sudo pkill USR1 n x dd directory to ...

Page 15: ...xunlong tv 3 Please make sure the inserted TF card is in accordance with the chosen click restore button for TF card format Successfully to format the TF card to normal click the OK button 4 Then burn the Android OS image to your TF card Please pay attention to the following with red marks ...

Page 16: ...Shenzhen Xunlong Software Co Ltd www orangepi org 16 www xunlong tv Click the Burn button for writing to TF card and wait for it finish Burn Android OS image to TF card successfully Click Exit d Write Armbian image file into TF card ...

Page 17: ...please note that the TF card capacity must bigger than the operating system image usually need 8GB or greater capacity 2 Download the OS image file from the download page http www armbian com download 3 Write the image into TF card i Download image writing tool such as Rufus the download page https rufus akeo ie Open the tool page ...

Page 18: ... 18 www xunlong tv i Select the image file path that has been unzipped ii Click the start button and wait for the mirror to write iii After the image is written click the close button Step 3 Start your OrangePi According to the following diagram you can easily start your Orange Pi ...

Page 19: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 19 www xunlong tv Hardware connection sketch map ...

Page 20: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 20 www xunlong tv Orange Pi runs on Android 4 4 system Orange Pi runs on Debian system ...

Page 21: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 21 www xunlong tv Orange Pi runs on Ubuntu system Hardware connection diagram ...

Page 22: ...e into the right edge of the USB interface 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 not able to output 2A even if it marked 2A 5V Note Micro USB OTG canno...

Page 23: ...e 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 8 Configuration Software a Change default account 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 1 Use root account to login Orange Pi please...

Page 24: ... shown as below After the modification of the above iterms it can be used the new account Zhangsan to land b Set the U disk automatically mount 1 sudo apt get install usbmount 2 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 KER...

Page 25: ...ce 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 ...

Page 26: ...estricted 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 d Remote desktop installation There are a lot of software such as VNG XRDP X2GO etc For X2GO there is more functions and the desktop color restore is very good which does not need too many configuration And X...

Page 27: ... RaspberryPi could be reference in Internet for example http www geekfan net 5003 it detailed descriptions on the operation and the mounted of U disk is very useful ii 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 sudo apt get minidlna Execute the following command to modify t...

Page 28: ...ba 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 f Thunder remote download 1 Go to the Thunder routing forum to download the required installation package first The link for stable version i http luyou xunlei com thread 12545 1 1 html ii Download Xware1 0 31_cubieboard zip file Note If you want to try the la...

Page 29: ...for installation file of Xunlei ii chmod 755 portal iii portal 4 You will get an activation code after booting like the following interface 5 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 ...

Page 30: ...d exit 7 Installation of version 3 0 32 253 i cd xxx xunlei The xxx is the directory for installation file of Xunlei ii sudo nano thunder_mounts cfg Modify the download path 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 selectio...

Page 31: ...Recommend using another Linux to boot for leading system 2 Use fdisk dev sdb to modify the size of partition after that enter p to mark the size of start partition 3 Enter d to delete the partition needs to change my file system is dev sdb2 which also is the second partition 4 Enter n to build a new partition Please note that the start position and deleted partition are the same and then input the...

Page 32: ...rt partition Because fdisk cannot modify the partition size dynamically which needs delete partition first and then rebuild a smaller partition You need to calculate the size which cannot be put the file system at last modified 5 Enter d to delete the partition needed to modify my file system is dev sdb2 which also is the second partition 6 Enter n to build a new partition Please note that the sta...

Page 33: ...v4l2 ko After loaded there should be a video0 in dev Bottom driver installed Android can be used directly 2 You could write a test program for Linux by yourself i Specific steps to configure the network Method 1 1 Enter the following on the directory line ifconfig To check whether there is Network card wlan 2 If no load the corresponding module of the Network card model insmod 8189 ko For example ...

Page 34: ...t the computer the wireless will be connected sudo reboot Method 2 1 Create a WiFi hotspot configuration file wpa_supplication conf in the directory of etc network add the following contents network ssid name of wifi hotspot psk name of wifi hotspot priority 1 2 Connect to wifi execute the following directories ifconfig wlan0 up sudo wpa_supplicant i wlan0 c etc network wpa_supplication conf dhcpc...

Page 35: ...ipsproject reserve 7 TOC Realtek RTL8188CUS and RTL8192CU chipsets 0bda 8176 and 0bda 8178 1 Determine the chipset 2 Realtek RTL8188CUS and RTL8192CU chipsets 0bda 8176 and 0bda 8178 Source code configuration 8192CU ko generate in lib modules drivers net wireless realtak 2 Source provided in CD ROM rtl8188C_8192C_usb_linux_v4 0 2_9000 20130911 tar gz Update the catalog of uImage and lib 3 Re power...

Page 36: ...lso execute cat etc asound conf to check whether the sound card is correct Input command alsamixer in the terminal and then press F6 select audiocodec press Enter and then press 5 times Right arrow key go to the audio lineout and then press m key open sound it will appear mm mm mm oo then close the window then exist You can play music with headphones on After that you need to save the configuratio...

Page 37: ...s Model A and Model B of Raspberry Pi The picture below is GPIO pin define of Orange Pi Orange_Pi H3 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 PC...

Page 38: ..._RTS PA2 CON3 P23 SPI0_CLK PC2 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 2 Specification of CSI Camera Connector 1 CSI Camer...

Page 39: ...le 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 is camera connector 2 OrangePi 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 ...

Page 40: ...pi org 40 www xunlong tv 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 ...

Page 41: ...nd a TF card In order to support the rapid development of the project OrangePi will write the 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 ...

Page 42: ...g sections you need to fill in the actual values according to their file storage path 1 Obtain the Source Code of Development You could download the source code from the official website of OrangePi http www orangepi org downloadresources Unzip the file after finish downloaded Obtain the following contents after unzipped buildroot Project compilation script ...

Page 43: ...r first time to use the source code The default configuration of the project has been set up u boot source code cross compiler tools and the kernel source code By using a script you can simply compile the entire system You can use the following commands in the lichee directory to complete the project Notes before compilation a Input to content of lichee command ll a b Check if there is an executab...

Page 44: ... prompt the choice of the chip as shown below for OrangePi select sun8iw7p1 At this point the system will be prompted to select the platform as shown below for OrangePi select dragonboard At this point the system will be prompted the choice of the board as shown below for the OrangePi select dolphin p1 Appear this screen indicates waiting for the compiler Wait fifteen minutes or so compile complet...

Page 45: ...rectory boot lichee tools pack chips sun8iw7p1 bin boot0_sdcard_sun8iw7p1 bin uboot lichee tools pack chips sun8iw7p1 bin u boot sun8iw7p1 bin uImage lichee out sun8iw7p1 dragonboard common uImage libs lichee linux 3 4 output lib modules Download image from official website http www orangepi org downloadresources Insert U disk into the computer check whether TF card mount first ensure that the TF ...

Page 46: ...g 46 www xunlong tv Write the image dd bs 4M if img of dev sdb Pull out the card reader and then insert it again At this time the SD card is inserted into a 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 ...

Page 47: ...tory the first partition is the boot partition and the second partition is the rootfs There are two files boot partition script bin and uImage The first boot partition The second rootfs partition Copy the kernel image file generated by the compiler to the first partition boot partition cp lichee out sun8iw7p1 dragonboard common uImage media rf Copy the lib library which generated after compilation...

Page 48: ... debugging information will not continue after printed to the u boot phase The reason is that the previous u boot corresponding to the kernel the new kernel u boot need to change the parameters and then need to replace the item lichee brandy u boot 2011 09 include configs sun8iw7p1 h and then re compile the kernel Methods back to the lichee directory of the command line and input build sh Copy the...

Page 49: ...epi org 49 www xunlong tv III Android Kernel Source Code Compilation Hardware OrangePi series development board A card reader a TF card and a power adapter Software Linux host computer which hard disk space at least 50G to meet a fully compiled need Linux host computer needs ...

Page 50: ...Git 1 Install JDK a Download and install JDK you will get jdk 6u31 linux x64 bin after downloaded b Modify the permission of jdk 6u31 linux x64 bin which has no prior permission c jdk 6u31 linux x64 bin It will generate a folder d 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 export JAVA_HOME jdk1 6 0_31 ...

Page 51: ...6 The above steps is just an example 2 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 s...

Page 52: ...gz Two contents after unzipped 4 Install The 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 5 Compile Linux source Code There are Android and Lichee after unzipped the package enter the directory of Lichee cd lichee build sh lunch ...

Page 53: ... Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 53 www xunlong tv Print information of successful compilation 6 Compile Android Code Input the command cd android source build envsetup sh ...

Page 54: ...www orangepi org 54 www xunlong tv lunch dolphin_fvd_p1 eng Select the scheme number extract bsp Copy the kernel and the drive module make j8 The rear values is for the simultaneous compilation process dependent on the host configuration pack Packaged into firmware ...

Page 55: ...lichee tools pack Insert U disk into the computer check whether TF card mount first ensure that the TF card was formatted mount Write image Copy the generated image file i to the SD card switch to the windows operating system Programming software download website http www orangepi org downloadresources ...

Page 56: ... www xunlong tv Download the compressed package unzip and get the folder Enter the folder open the program to run as Administrator Write Android image on windows by this tool Insert the TF card with written image to OrangePi turn on the computer then you could enter to Android system ...

Page 57: ...un8iw7p1 configs dolphin p1 sys_config fex Copy the file to the directory of lichee use command cd lichee cp tools pack chips sun8iw7p1 configs dolphin p1 sys_config fex You could personalized configuration of sys_config fex according to sysconfig1 fex_manul_linux_BSP_v0 4 pdf Direcotory of sysconfig1 fex_manul_linux_BSP_v0 4 pdf is lichee buildroot docs 1 Update System Project Configuration File ...

Page 58: ...n dev null mv sys_config bin script bin 2 Update Boot and U boot If the mount of written system is dev sdb update u boot boot and script Bin by execute command at the terminal dd if boot0_sdcard_sun8iw7p1 bin of dev sdb bs 1024 seek 8 dd if u boot sun8iw7p1 bin of dev sdb bs 1024 seek 16400 U boot and boot will update after complete the above steps however the project configuration of the binary f...

Page 59: ...not suitable for you you could find patch of z 0003 add additional video modes patch from some Maker communities This patch supports some other resolution How to put a patch patch p1 z 0003 add additional video modes patch After put a patch recompile the source code replace the uImage and script bin For example 1024 768 is 32 1280 1024 is 33 1360 768 is 34 1440 900 is 35 1680 1050 is 36 Note The d...

Page 60: ...e of etc modules tv It will be TV out when you re start b Display Configuration Configuration Item Configuration Meaning disp_init_enable xx Whether on the way of display initialization settings disp_mode xx Display mode 0 screen0 screen0 fb0 screen0_output_type xx Screen 0 output type 0 none 1 lcd 2 tv 3 hdmi 4 vga screen0_output_mode xx Screen 0 output mode used for tv hdmi output 0 480i 1 576i ...

Page 61: ...idth xx fb0 width for 0 it will be in accordance with the resolution of the output device fb0_height xx fb0 height for 0 it will be in accordance with the resolution of the output device fb1_format xx fb1 format 4 RGB655 5 RGB565 6 RGB556 7 ARGB1555 8 RGBA5551 9 RGB888 10 ARGB8888 12 ARGB4444 fb1_pixel_sequence xx fb1 pixel sequence 0 ARGB 1 BGRA 2 ABGR 3 RGBA fb1_scaler_mode_enable xx fb1 uses sc...

Page 62: ...ode 4 fb0_framebuffer_num 2 fb0_format 10 fb0_pixel_sequence 0 fb0_scaler_mode_enable 0 fb1_framebuffer_num 2 fb1_format 10 fb1_pixel_sequence 0 fb1_scaler_mode_enable 0 c CPU Frequency Setting max_freq The maximum frequency min_freq The minimum frequency LV_count Indicates several level xx frequency LV1_freq Frequency at the first level ...

Page 63: ...el LV3_volt Voltage setting at the third level LV4_freq Frequency at the fourth level LV4_volt Voltage setting at the fourth level LV5_freq Frequency at the fifth level LV5_volt Voltage setting at the fifth level LV6_freq Frequency at the sixth level LV6_volt Voltage setting at the sixth level LV7_freq Frequency at the seventh level LV7_volt Voltage setting at the seventh level LV8_freq Frequency ...

Page 64: ...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 a...

Page 65: ...lt 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 t...

Page 66: ...6 www xunlong tv V OrangePi Driver development Hardware OrangePi series development board A card reader and a TF card 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 ...

Page 67: ...al Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 67 www xunlong tv 1 Device driver and application demo code Write Miscellaneous Character Device Drivers and Applications a Application Program app c ...

Page 68: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 68 www xunlong tv b Driver Program OrangePi_misc c ...

Page 69: ...l Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 69 www xunlong tv 2 Compile device driver Copy the OrangePi_misc c to the lichee linux 3 4 driver misc directory Enter to lichee linux 3 4 drivers misc ...

Page 70: ...ration 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 c...

Page 71: ... Xunlong Software Co Ltd www orangepi org 71 www xunlong tv Back to the source code directory build sh 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 41 ...

Page 72: ... 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 the OrangePi_misc ko file to media lib modules 3 4 3...

Page 73: ...e or compiled Application code Check whether there is the cross compiler if not then download and install it arm linux gnueabihf gcc v While compiling the application you will fill that you need the cross compiler arm linux gnueabihf gcc download and install it Unzip the downloaded file and enter the the directory ...

Page 74: ...rg 74 www xunlong tv Check the information after entering bin directory pwd hows the path and export it into the whole project ll etc environment shows that the file can only read need to modify permissions chmod 755 etc environment Add the path to the whole environment variable ...

Page 75: ...in the directory copy it to the development board file system on the rootfs directory of home orangepi cp aq media home orangepi 4 Running demo Running Applications on Development Board 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 lsmod To chec...

Page 76: ... Ltd www orangepi org 76 www xunlong tv ll dev orangepimisc Miscellaneous equipment automatically generated device files the specific look at the driver code Executive application note the use of the application the specific look at the code aq dev orangepimisc ...

Page 77: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 77 www xunlong tv VI Using Debug tools on OrangePi Hardware OrangePi series development board TTL to USB cable ...

Page 78: ...h 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 a prepare Install driver for TTL to USB cable on Windows 1 Download and unzi...

Page 79: ...ight by Shenzhen Xunlong Software Co Ltd www orangepi org 79 www xunlong tv b Install putty on Windows 1 Download putty installation package 2 b Unzip and install 3 Open program after installed as shown below c Connect style ...

Page 80: ...henzhen Xunlong Software Co Ltd www orangepi org 80 www xunlong tv Use the TTL to the serial port cable one end connected to OrangePi the other end connected to PC d Equipment information acquisition i Start menu select control panel ...

Page 81: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 81 www xunlong tv ii Click on the device manager to check the port number ...

Page 82: ...ware Co Ltd www orangepi org 82 www xunlong tv e Open putty configuration Serial port should set to the corresponding port number COM5 the speed should set to 115200 f Start debug Power on and boot OrangePi the serial port will automatic print debug log ...

Page 83: ...long tv Operation steps on Linux There are Minicom and Kermit serial debugging tools for Linux this section will take Kermit as an example to have an illustrate a Install Kermit i Install the Kermit by execute command sudo apt get install ckermit a Configurate Kermit sudo vi etc kermit kermrc ...

Page 84: ...are Co Ltd www orangepi org 84 www xunlong tv ii 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 c ...

Page 85: ...Ltd www orangepi org 85 www xunlong tv b Connect style Use the TTL to the serial port cable one end connected to OrangePi the other end connected to PC c Setting kermit Input command in the PC terminal to check the device number of TTL to the serial cable ls dev ...

Page 86: ...e 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 2 Set the value of setline into dev ttyUSB0 d Start debug Use Kermit to get the debug log 1 Input command in the host computer terminal enter the Kermit mode sudo kermit c ...

Page 87: ...Orange Pi Manual Copy right by Shenzhen Xunlong Software Co Ltd www orangepi org 87 www xunlong tv 2 Power on and boot OrangePi the serial port will automatic print debug log ...

Reviews: