Advertisement

Orange Pi User Manual
Shenzhen Xunlong Software Co., Ltd.
Orange Pi RK3399

User Manual

www.orangepi.org
I
www.xunlong.tv

Advertisement

Table of Contents
loading

Summary of Contents for Orange Pi RK3399

  • Page 1: User Manual

    Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. Orange Pi RK3399 User Manual www.orangepi.org www.xunlong.tv...
  • Page 2 Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. History Data Author Brief Publish Memo 2017-07-14 Younix Create Document 2018-1-31 Update Compilation of Android 2018-02-01 Younix 2018-3-6 SDK in chapter Ⅲ(3) 2018-03-19 Younix Update Frequency FAQⅤ(3) 2018-3-19 www.orangepi.org www.xunlong.tv...
  • Page 3: Table Of Contents

    Contents I. Orange Pi RK3399 Introduction......................1 1. What is Orange Pi RK3399?......................1 2. What can I do with Orange Pi RK3399?..................1 3. Whom is it for?..........................1 4. Orange Pi RK3399 Hardware specification.................. 1 5. GPIO Specifications........................5 II.
  • Page 4: Orange Pi Rk3399 Introduction

    1. What is Orange Pi RK3399? It’s an open-source single-board computer. It can run Android 6.0, Ubuntu, Debian, it uses the RK3399 SoC, and has 2GB DDR3 SDRAM 2. What can I do with Orange Pi RK3399? You can use it to build…...
  • Page 5 Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. Dual-Core Cortex-A72 and Quad-Core Cortex-A53 ARM Mali-T860 MP4 Quad-Core GPU Completely compatible with OpenGL ES1.1/2.0/3.0/3.1, OpenVG1.1, OpenCL, DX11 Support AFBC Supports multi-format video decoders including H.264/H.265/VP9 4Kx2K@60fps 1080P Multi format video...
  • Page 6 Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. audio input and ouput) 1 x Speaker for audio output ( 1.5W 8Ω or 2.5W 4Ω ) 1 x SPDIF 1 x On-board Microphone 1 x I2S (up to 8 channels) for audio input and output...
  • Page 7 Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. OS / Software Android 6.0, Debian 9 Programming C, C++, Kotlin, Java, Shell, Pyhon support Interface definition Size 129 mm × 99 mm Weight 100g www.orangepi.org www.xunlong.tv...
  • Page 8: Gpio Specifications

    Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. 5. GPIO Specifications The following is GPIO Pin of Orange Pi RK3399: PIN1 3V3-1 Power 3.3V PIN2 5V-1 Power 5V PIN3 GPIO1_B3 I2C4_SDA Default used as I2C PIN4 5V-2 Power 5V...
  • Page 9 Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. PIN8 GPIO4_C4 UART2DBG_TX Default used as Debug PIN9 GND1 Ground PIN10 RX GPIO4_C3 UART2DBG_RX Default used as Debug PIN11 GPIO17 GPIO2_C0 UART0_RXD PIN12 GPIO18 GPIO2_A1 I2C2_SCL PIN13 GPIO27 GPIO2_C1 UART0_TXD PIN14 GND5...
  • Page 10 Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. Default used as PIN33 GPIO13 GPIO2_A6 HDMIIN_PWREN PIN34 GND8 Ground PIN35 GPIO19 GPIO2_A7 I2C7_SDA Default used as PIN36 GPIO16 GPIO2_B1 SPI2_RXD I2C6_SDA HDMIIN_PWREN18 PIN37 GPIO26 GPIO2_B0 I2C7_SCL PIN38 GPIO20 GPIO2_B2 SPI2_TXD...
  • Page 11: Using Method Introduction

    Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. II. Using Method Introduction 1.Hardware Requirement Orange Pi RK3399 Development Board  A PC for compilation with following specs:  64bit CPU Up to 16GB RAM UP to 40GB spare disk space Operation system should up to Ubuntu12.04, it would be better if it is Ubuntu16.04...
  • Page 12: Android Compilation Environment Construction

    III. 1.Download SDK compression package Take OrangePi-RK3399_Android6.0_V1.0_2017_0720.tgz as am example, after get the original compression package: mkdir OrangePi-rk3399 tar xvf OrangePi-rk3399_Android6.0_V1.0_2017_0720.tgz -C OrangePi-rk3399 cd OrangePi-rk3399 2.Construct Compilation Environment It could also refer to Google file: http://source.android.com/source/initializing.html  Install JDK Compilation of Android6.0 is based on JAVA7, it needs to first install OpenJDK before compilation.
  • Page 13: 3.Compilation Of Sdk Source Code

    Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. sudo apt-get update 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 \ g++-multilib mingw32 tofrodos gcc-multilib ia32-libs \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 For Ubuntu14.04:...
  • Page 14: 4.Generated Firmware

    U-boot Compilation: cd u-boot make rk3399_defconfig make ARCHV=aarch64 -j4 Kernel Compilation: cd kernel make ARCH=arm64 orangepi_defconfig make ARCH=arm64 rk3399-orangepi.img -j4 Android Compilation: source build/envsetup.sh lunch rk3399_mid-userdebug make -j4 4.Generated Firmware ./mkimages.sh After execute ./mkimages.sh, it will generate a full firmware package on the directory of rockdev/Image-rk3399_mid.
  • Page 15: Android Firmware Flashing

    Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. Android Firmware Flashing Relevant keys and connectors for firmware flashing of Orange Pi RK3399 : There are two types of Firmware file: Multi-partition images: generated uboot.img, recovery.img, trust.img, kernel.img, resource.img, ...
  • Page 16: 1.Flashing Image On Windows

    In order to use the latest driver of all device, please first click Drive unload and then click Drive install: Connect with Type-C data cable and PC with Orange Pi RK3399 after installed USB driver, there would be show the status of USB driver on lower right corner like the following: www.orangepi.org...
  • Page 17 Since OrangePi RK3399 supports powered by TypeC, power voltage on USB of PC is enough for flashing image. However, it may not enough to support Orange Pi booting. In that case, we need to insert DC power supply to make sure the Orange Pi could boot successfully after flashed image.
  • Page 18: 2.Flashing Image On Linux

    Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. If need to flash unity firmware(update.img), click Firmware on Upgrade Firmware, select path of  update.img. After it recognized LOADER device, click Upgrade and it will begin to upgrade. The right side would show the status of flashing.
  • Page 19 Since OrangePi RK3399 supports powered by TypeC, power voltage on USB of PC is enough for flashing image. However, it may not enough to support Orange Pi booting. In that case, we need to insert DC power supply to make sure the Orange Pi could boot successfully after flashed image.
  • Page 20 Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. It could be operated by entering the corresponding instructions after the Rockusb> prompt. No  distinguish between capital and lowercase. TD Command: used to test whether the device status is normal DI Command: used for flashing separate partitions *.img :...
  • Page 21: 3.Faq Of Image Flashing

    Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. Rockusb>uf RK3399_IMAGE/Image_Android6.0_20171228.img After flashed, there would show the following information and the Orange Pi would reboot. (UF command would reboot, but not DI command.) 2) Write Scripts to Implement User-Defined Flash upgrade_tool also supports used as Linux command for flashing, you only need to add the path of tool into environment variable.
  • Page 22 Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. 4. Wait a moment then release the metal tweezers 5. Use a micro USB Type-C cable to connect device and host PC 6. Device should enter MASKROM mode It would show the following with AndroidTools on Windows: After this could flash the image in the normal way.
  • Page 23 Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. It would show the following if use upgrade_tool on Linux: It would be re-flash the image with uf command. Principle: It would clean data on flash if short connect pin and GND because the system would consider data error of flash.
  • Page 24: Linux Environment Construction And Firmware Compilation

    Compilation 1.Download SDK compression package Take OrangePi_Android6.0_V1.0_2017_0720.tgz as an example, after get the original compression package: mkdir OrangePi-rk3399-Linux tar xvf OrangePi_Linux_V1.0_2018_0110.tgz -C OrangePi-rk3399-Linux cd OrangePi-rk3399-Linux 2.Construct Compilation Environment It could also refer to Google file: http://source.android.com/source/initializing.html 3.Install Software Package For Ubuntu16.04:...
  • Page 25 Ubuntu16.04 LXDE version: ubuntu-lxde.img Debian9 Desktop version: debian-desktop.img You could also make your own Rootfs with reference of OrangePi RK3399 Rootfs prepare. Pack every partitions’ image into a unity full firmware: ./build/mk-image.sh -c rk3399 -t system -s 4000 -r out/ubuntu-server.img...
  • Page 26: 5.Flash Linux Firmware

    Maskrom mode. EMMC Clk is on behind of miniPCIe just like the following shows: 2. Connect TypeC cable 3. Execute the following command to flash ./build/flash_tool.sh -c rk3399 -p system -i out/system.img c for chip, represents chip model www.orangepi.org www.xunlong.tv...
  • Page 27 You could also flash different partitions separately, for example: Separate flashing boot: ./build/flash_tool.sh -c rk3399 -p boot -i out/boot.img Separate flashing uboot: ./build/flash_tool.sh -p loader1 -i out/u-boot/idbloader.img -c rk3399 ./build/flash_tool.sh -p loader2 -i out/u-boot/uboot.img -c rk3399 ./build/flash_tool.sh -p atf -i out/u-boot/trust.img -c rk3399...
  • Page 28: Construct Compilation Environment And Make Rootfs Image

    Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. VI. Construct Compilation Environment and Make Rootfs Image 1.Construct Compilation Environment sudo apt-get update sudo apt-get install qemu-user-static If your development environment is not Ubuntu16.04, please make sure the gcc-arm-linux-gnueabihf and gcc-aarch64-linux-gnu compile tool train less than 6.0.
  • Page 29: 4.Make Rootfs Image

    Orange Pi User Manual Shenzhen Xunlong Software Co., Ltd. # Install desktop version, it would take a little long time, please keep the network smooth. # It would be Server version if do not execute apt install ubuntu-desktop # Add user and set password...

Table of Contents