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.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
66 Comments
oldest
newest
Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications