I’ve recently received a kit based on Orange Pi mini 2 development board powered by Allwinner H3 quad core processor, but contrary to most other devices or boards I reviewed, this one what sent to me by one of my reader (thanks Jon!) as for various reasons he did not need to get it shipped to him. Today, I’ll start by showing off the kit I received, before writing a quick start guide showing how to install a Debian, and build your own Linux image. The instructions will work for all Orange Pi Allwinner H3 boards, including Orange Pi 2, Orange Pi Plus, and the recently launched Orange Pi PC, which has been rather popular thanks to its low $15 price tag.
Orange Pi mini 2 Board Kit and CSI Camera
This is what I got in the package…
The board with a regulatory compliance and safety information sheet, as well as a 5V/2A power supply, that was bought as part of a kit for $28.90 on Aliexpress. Bear in mind that although Orange Pi boards feature a micro USB OTG port, AFAIK none of them can be power via the micro USB connector, and instead you need to make you have a 5V power adapter with the right barrel size, meaning you can re-use your old smartphone’s charger like you would do with a Raspberry Pi. Shenzhen Xunlong normally offers various kits including power supply and/or acrylic case on their Aliexpress store.
I’ve taken the board out of its anti-static bag, and taken some close up pictures.


So my board does not include flash, nor a WiFi module (located on the top left corner on the top), which I’ll connect the board via Ethernet, and boot from a micro SD card.
Then I noticed a tiny plastic bag had fallen on my desk… oh!!! a camera…
The cable reads SH-2035-IPLAY, and it must the be the $5.90 camera sold on Aliexpress by Xunlong Software, Orange Pi board makers, although the picture differs a bit. So I looked for some documentation about the camera on Orange Pi website, and I found… nothing… Until I looked into the forums, and found somebody managed to make it work after many efforts, as the firmware images were not setup for the camera, and the driver was also missing. I initially intended to try out the camera in this getting started guide, but it will have to be a separate post.
Installing and Setting Up Linux
Orange Pi Allwinner H3 boards support both Android and Ubuntu, but most people buying such development board are likely to prefer running a Linux distribution, and I’ve already tested Android on Allwinner H3 when I reviewed Zidoo X1, so I decided to focus on Linux in this getting started guide. Orange Pi 2 boards and Zidoo X1 are pretty similar hardware platform, and I’ve already installed Orange Pi 2 Lubuntu 14.04 on Zidoo X1 downloaded from Orange Pi Downloads page, and vice versa, Zidoo X1 Android image has also been tested on Orange Pi 2. And in both cases the images run fine, although with some caveats such as WiFi not working with Linux on Zidoo X1.
However, I’ve been recommended to use Linux images released by Loboris forum member instead, so that’s what I’ve done, and among the various Ubuntu, Lubuntu, and Debian images available, I’ve decided to go with Debian 8 Jessie + XFCE image (OrangePI_Jessie_Xfce.img.xz), and you can download the images from Mega or Google Drive. Minimal images without desktop environment for headless operation are also available.
You’ll need a Linux or Windows PC, and a micro SD card to install the Linux image.
These are the steps I followed to install Debian on the micro SD card from a Ubuntu 14.04 computer:
- Install dependencies:
1sudo apt-get install xz-utils pv - Uncompress the firmware:
1xz -d OrangePI_Jessie_Xfce.img.xz - Locate your micro SD card with lsblk (I used a 16GB Class 10 micro SD card):
123456789lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 465.8G 0 disk├─sda1 8:1 0 512M 0 part /boot/efi├─sda2 8:2 0 461.8G 0 part /└─sda3 8:3 0 3.5G 0 part [SWAP]<strong>sdb 8:16 1 14.7G 0 disk</strong>└─sdb1 8:17 1 14.7G 0 part /media/jaufranc/WINPEsr0 11:0 1 1024M 0 rom - Flash the image with dd:
12sudo dd if=OrangePI_Jessie_Xfce.img | pv | sudo dd of=/dev/sdb bs=16Msync
Note: If you are using Windows, use Win32DiskImager to flash the image to the micro SD card instead of going through the first 4 steps shown above. - Remove the micro SD card, and reinsert it again in your computer, it should automount two partitions in the SD card: linux and BOOT.

- You’ll want to select the BOOT partitions, where you’ll find the kernel “uImage_OPI-2” for Orange Pi 2 and Pi PC boards, and “uImage_OPI-PLUS” for Orange Pi Plus boards. uImage in the partition was already uImage_OPi-2 for my board, but to be on the safe side, you can copy the kernel image to uImage. Finally, you’ll also need to select one of the scrip.bin file to match the board and resolution you wish to use. This is what I did in a terminal window for my Orange Pi mini 2 board, but you can also use the desktop to do so in Linux or Windows:
12345pushd /media/jaufranc/BOOTcp uImage_OPI-2 uImagecp script.bin.OPI-2_1080p50 script.binpopdsudo umount /dev/sdb* - Done! The micro SD card is now ready.
You can insert it into your board, and connect the power. After a few seconds you should start seeing the kernel log on the screen, and a little later the login screen.
Type the user name “orangepi” and the password “orangepi” to login. There’s still one last step to complete the setup. Open a terminal window:
- If your board has an eMMC, you can install Linux to the internal flash with:
1sudo install_to_emmc
Now power off the board, remove the micro SD card, and start again to run Linux. - If your board has no internal storage, as in my case, you’ll still want to resize the Linux partition to make full use of your SD card capacity with:
12sudo fs_resizereboot

The installation is now complete, have fun! The whole process what quite straightforward thanks to clear instructions provided by Loboris.
Running Debian 8 on Orange Pi mini 2
I’ve quickly tested the image. Chromium is pre-installed, and the developer must be from Croatia, since Chromium will start google.hr by default. Web browsing is fine, but Adobe flash (libpepperflash) is not installed, Thai language is not supported, and Youtube videos are super slow and unwatchable in Chromium. Having said that, you can use SMPlayer to watch YouTube video perfectly fine… in windowed mode (as shown in the screenshot below), but if you go full screen the system can’t cope. I’ve also tried to play a 1080p H.264 video locally, but it won’t play smoothly at all. es2gears (installed with apt-get install mesa-utils-extra) runs, but es2_info reports the render is the software rasterizer.

So the image does not support 2D/3D GPU acceleration nor hardware video decoding, but this was to be expected, and these two are usually time consuming to implement. If you need OpenGLES or hardware video decoding, you’ll need to use Android instead. The language issues and lack of Adobe flash support in Chromium should be easy to fix yourself by installing the needed software package such as libpepperflash. I had no problem accessing Internet using Ethernet, I just connected the cable and was good to go.
Here are some details about the image, as well as its memory and storage usage:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
orangepi@OrangePI:~$ uname -a Linux OrangePI 3.4.39 #1 SMP PREEMPT Sun Aug 30 14:14:50 CEST 2015 armv7l GNU/Lx orangepi@OrangePI:~$ cat /etc/issue Debian GNU/Linux 8 \n \l orangepi@OrangePI:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq 1536000 orangepi@OrangePI:~$ sudo modprobe gpio-sunxi orangepi@OrangePI:~$ ls /sys/class/gpio_sw/ normal_led PA10 PA13 PA18 PA20 PA6 PA9 PC2 PC7 PG7 PL10 PA0 PA11 PA14 PA19 PA21 PA7 PC0 PC3 PD14 PG8 standby_led PA1 PA12 PA15 PA2 PA3 PA8 PC1 PC4 PG6 PG9 orangepi@OrangePI:~$ free -h total used free shared buffers cached Mem: 1.0G 182M 821M 28M 8.2M 77M -/+ buffers/cache: 96M 906M Swap: 0B 0B 0B orangepi@OrangePI:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p2 15G 1.2G 13G 9% / none 372M 0 372M 0% /dev tmpfs 502M 0 502M 0% /dev/shm tmpfs 502M 13M 489M 3% /run tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 502M 0 502M 0% /sys/fs/cgroup tmpfs 502M 4.0K 502M 1% /tmp /dev/mmcblk0p1 63M 24M 40M 38% /media/boot tmpfs 101M 0 101M 0% /run/user/107 tmpfs 101M 0 101M 0% /run/user/1000 orangepi@OrangePI:~$ |
You’ll notice that the CPU frequency is set to 1.5GHz, instead of 1.2GHz in consumer devices like Zidoo X1, so if you plan to run the system at full speed for an extended period of time, e.g. to build the kernel, you may consider adding a heatsink and a fan to the board.
I’ve also connected a USB to TTL debug board to the 3-pin serial console header of the board, and captured the full boot log with minicom:
|
1 |
The boot time to the login window is about 45 seconds with my SD card.
Creating Your Own Linux Image for Orange Pi Allwinner H3 Boards
Loboris did not only provide binary images, but also the scripts to create a full image from scratch. It won’t build the Linux kernel from source however, but you can download the Linux SDK from Orange Pi website if you wish to customize the kernel or build your own drivers.
You can run the scripts to create an image in a Ubuntu or Debian computer, or even Orange Pi board itself.
First, download and extract make_linux.tar.gz from Mega, install some dependencies:
|
1 2 3 4 |
sudo apt-get install debootstrap qemu-user-static mkdir ~/edev/orangepi2 tar xvf make_linux.tar.gz cd make_linux |
Now you’ll need to edit param.sh with you favorite editor:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# ===================================================== # ==== P A R A M E T E R S ============================ # ===================================================== # ***************************************************** # Set to "yes" to create realy minimal image * # ***************************************************** ONLY_BASE="yes" # ***************************************************** # Set hostname, user to be created * # and root and user passwords * # ***************************************************** HOSTNAME="CNXSoftPI" USER="cnxsoft" ROOTPASS="orangepi2" USERPASS="orangepi2" # ***************************************************** # Set timezone, for default (HOST'S) set _timezone="" * # ***************************************************** _timezone="Etc/UTC" #_timezone="" # ***************************************************** # SET IF YOU WANT TO INSTALL SPECIFIC LANGUAGE, * # COMMENT FOR DEFAULT (HOST) settings * # ***************************************************** LANGUAGE="en" LANG="en_US.UTF-8" # ***************************************************** # Set the base name of your image. * # Distro name is automaticaty appended, and the image * # will be "image_name-distro.img" * # --------------------------------------------------- * # IF image_name="", image file won't be created, * # installation will be created in local directories * # linux-$distro & boot-$distro * # YOU CAN CREATE THE IMAGE LATER RUNNING: * # sudo ./image_from_dir <DEVICE|IMAGE> * # === IT IS THE RECOMMENDED WAY OF IMAGE CREATION === * # --------------------------------------------------- * # IF image_name is BLOCK DEVICE (/dev/sdXn) * # LINUX filesystem will be created directly on it * # Partition must exist ! * # IF _format="" partition will NOT be formated * # otherwyse it will be formated with specified format * # ***************************************************** image_name="" #image_name="minimal" #image_name="/dev/sdg" # ***************************************************** # Filesystem type for linux partition * # If btrfs is selectet, partition will be mounted * # "compressed" option, you can save some sdcard space * # --------------------------------------------------- * # Used when creating the system directly on SDCard or * # SDCard image file and in "image_from_dir" script * # ***************************************************** _format="ext4" #_format="btrfs" # ***************************************************** # SD Card partitions sizes in MB (1024 * 1024 bytes) * # --------------------------------------------------- * # If creating on physical sdcard (not image) you can * # set "linuxsize=0" to use maximum sdcard size * # --------------------------------------------------- * # When creating the image with "image_from_dir" script* # "linuxsize" is calculated from directory size * # ***************************************************** fatsize=64 linuxsize=800 # ***************************************************** # Select ubuntu/debian distribution and repository * # === SELECT ONLY ONE distro AND ONE repo === * # ***************************************************** # === Ubuntu === #distro="precise" #distro="trusty" #distro="utopic" distro="vivid" repo="http://ports.ubuntu.com/ubuntu-ports" # === Debian === #distro="wheezy" #distro="jessie" #repo="http://ftp.hr.debian.org/debian" raspbian="no" # === Raspbian === #distro="wheezy" #distro="jessie" #repo="http://archive.raspbian.org/raspbian" #raspbian="yes" # ****************************************************** # If creating the image, you can xz compress the image * # after creation and make the md5sum file * # to do that automatically, set _compress="yes" * # ****************************************************** _compress="yes" # ===================================================== # IF YOU WANT TO HAVE BOOT FILES ON EXT4 PARTITION = # AND NOT ON SEPARATE FAT16 PARTITION = # set _boot_on_ext4="yes" and = # FAT partitin won't be created = # --------------------------------------------------- = # DO NOT CHANGE FOR NOW ! = # ===================================================== _boot_on_ext4="no" # ^^^^ P A R A M E T E R S ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
I’ve only modified the first two sections of the file in order to build a minimal Ubuntu vivid image with CNXSoftPI as the hostname.
Let’s start the build:
|
1 |
sudo ./create_image |
It took less than 20 minutes on my machine. If you want to modify the rootfs, you can chroot in linux-vidid directory:
|
1 |
sudo chroot linux-vivid /usr/bin/qemu-arm-static -cpu cortex-a9 /bin/bash |
Finally, once you are done, you can create a Ubuntu vivid image with:
|
1 |
sudo ./image_from_dir linux-vivid <image_name> |
This will create <image_name>.img that you can dump to a micro SD card or explained in the first part of this post, as well as <image_name).img.xz that you can distribute.
If you want to go further you may want to checkout Orange Pi Wiki, and checkout what others have done so far on Orange Pi Forums.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress. We also use affiliate links in articles to earn commissions if you make a purchase after clicking on those links.







