Getting Started with Orange Pi PC, Pi 2 and Pi Plus Development Boards

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…

Click to Enlarge
Click to Enlarge

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.

Click to Enlarge
Top of Orange Pi Mini 2 Board (Click to Enlarge)
Click to Enlarge
Bottom of Orange Pi Mini 2 Board (Click to Enlarge)

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…

Orange Pi Camera
Orange Pi 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:

  1. Install dependencies:
  2. Uncompress the firmware:
  3. Locate your micro SD card with lsblk (I used a 16GB Class 10 micro SD card):
  4. Flash the image with dd:

    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.
  5. Remove the micro SD card, and reinsert it again in your computer, it should automount two partitions in the SD card: linux and BOOT.orange_pi_boot_partition
  6. 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:
  7. 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.

Orange_PI_Debian_8_LoginType 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:

    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:

    Orange_Pi_Resize_SD_card

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.

Debian 8 running in Orange Pi mini 2 (Click for Original Size)
Debian 8 running in Orange Pi mini 2 (Click for Original Size)

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:


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:

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:


Now you’ll need to edit param.sh with you favorite editor:


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:


It took less than 20 minutes on my machine. If you want to modify the rootfs, you can chroot in linux-vidid directory:


Finally, once you are done, you can create a Ubuntu vivid image with:


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.

66
Leave a Reply

avatar
66 Comment threads
0 Thread replies
4 Followers
 
Most reacted comment
Hottest comment thread
30 Comment authors
Richard1937theguyukNazaBoxjp therouxJim Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jesu
Guest
Jesu

Thx! Good article.I tried to talk myself of no purchase, so I will not go. Never grow up …

natsu
Guest
natsu

very interesting, please can you test OPENWRT and video playback under android

arete
Guest
arete

Hi, is thi board usable with linux as desktop?
is possible see an video review?

FransM
Guest
FransM

It is a nice board, but you may want to use a USB hard disk or SSD with it (or go for the model that supports SATA. Alternately use some fast SD card.

I have never used it for video playback; I don’t think the current kernel supports hardware acceleration.

miniNodes
Guest

Excellent review here, and thanks Jon for contributing the board!

ben
Guest
ben

What kind of applications are best suited for the Orange Pi Flavors, vs boards like the BeagleBoneBlack (Green) or Banana / Raspberry Pi?

zoobab
Guest

On the smplayer test, it is not multithreaded, but VLC is. So mplayer will be stuck at 100pc on one core, but won’t use the second core. Try VLC you will see the difference…

Required
Guest
Required

Could you test the IR? Is it supposed to work with any model of infrared remote control or is a particular one required?

xxiao
Guest
xxiao

how is H3 board’s cpu performance? would love to see how much it can run computation wise with 1GB memory.
I ordered one and is waiting to experience that, thanks for the post!

Steve
Guest
Steve

The big issue with AllWinner based boards is the terrible VPU and GPU Linux driver support isn’t it? This is why the Kodi devs gave up on Linux development for the platform ages ago.

At one point it looked liked Allwinner could have been the ‘next big thing’ in Kodi – but the Raspberry Pi and AMLogic platforms have so much better support that they have won the crown for ARM-based Linux media player platforms.

trackback

[…] I wrote a quick start guide for Orange Pi PC / 2 / Plus showing how to install Linux distributions on the board, and build your own image. With the launch […]

Jon Smirl
Member

@Required

Modern Linux kernels have IR support built in. This built-in support can handle almost any remote using any protocol. But IR support needs to be turned on in the kernel.

Hardware for IR support is trivial. Just wire the IR sensor to a pin that will interrupt on both 0/1 and 1/0 transitions from the sensor. Then hook it up in the device tree.

LIRC is optional. Its only real purpose now is to record the signal from an unknown remote. Once the keys are mapped you can make a kernel IR keymap file and get rid of LIRC. The kernel support works by taking the IR signals, matching them against a keymap, and then turning them into simulated keyboard keys.

Kernel IR support is not limited to a single remote. You can load in a 100 IR keymaps and they will all work.

Hammu
Guest
Hammu

What size is the power jack?

slackstick
Guest
slackstick

Anyone knows if there is a chance to use a mainline kernel?

Jon Smirl
Member

You need to make a new keymap file for the specific remote. The built in ones are here:
linus/drivers/media/rc/keymaps

This article explains how to do it….
http://atterer.org/mythtv-xmbc-remote-control-without-lirc

Jon Smirl
Member
slowstream
Guest
slowstream

Someone manage to install zidoo image on the forum: http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=376&extra=page%3D1

Would be interesting ta have cnx reviewing Orange Pi mini 2 with zidoo x1 1.0.17 firmware version. Could be tested with their remote apk…

slowstream
Guest
slowstream

I understand. But unofficially they don’t seem much stressed, see 4th post:
http://forum.zidoo.tv/index.php?threads/orangi-pi-with-zidoo-image.465/

gicho
Guest
gicho

Could anyone provide alternative links for the android images for Orange Pi PC? I got my board today but I cannot download from google drive (no link, just icon?) and baide wants me registered even for slow download.
Google,mega, onedrive or anything similar would be fine for me.
Thanks.

gicho
Guest
gicho

Sure it will! Thank you!

trackback

[…] this month, I wrote a Quick Start Guide for Orange Pi Allwinner H3 boards such as Orange Pi PC, and showed how to install and configure Debian on the boards. I’ve also […]

Richard
Guest
Richard

Any thoughts on the camera install/usage? I’ve been toying around with it and can’t seem to get it to work, so any suggestions you have would be invaluable.

Thanks!

trackback

[…] double precision (DP), Roseapply Pi delivers around 173.8 MFlops, which we can compare against Orange Pi 2 mini (182 to 188 MFlops) and Raspberry Pi 2 (154 Mflops with GCC 4.8). More Linux based benchmarks […]

Dave
Guest
Dave

I could kiss you for all of this! The install_to_emmc was INVALUABLE! I’m getting pretty comfortable with linux on development boards eg raspbian on raspberry but the Orange is a beast all its own. The lack of data on the Orange Pi Plus hardware and associated drivers is making me pull my hair out but its a challenge. If I could just get the wifi working…. THANK YOU!!!!

Jaroslav
Guest
Jaroslav

Hi,

thanks for this super HowTo. Is there some option to get installation from eMMC back to memory card? I need make many changes and installation my own application for ModBUS communication.

Thanks a lot,

Jaroslav

Ghostdog
Guest
Ghostdog

Hi,
Great job! Did you try to compile VLC or mplayer with cedar (h264 hw decoder) support in any way?
http://linux-sunxi.org/VLC
Or kodi, if possible, of course, with HW decoder suppot.