2016-03-16

Orange Pi One board is the most cost-effective development board available on the market today, so I decided to purchase one sample on Aliexpress to try out the firmware, which has not always been perfect simply because Shenzhen Xunlong focuses on hardware design and manufacturing, and spends little time on software development to keep costs low, so the latter mostly relies on the community. Recently, armbian has become popular operating systems for Linux ARM platform in recent months, so I’ve decided to write a getting started guide for Orange Pi One using a Debian Desktop image released by armbian community.

Orange Pi One Unboxing

But let’s start by checking out what I received. The Orange Pi One board is kept in an anti-static bag, and comes with a Regulatory Compliance and Safety Information sheet, but no guide, as instead the company simply asks users to visit www.orangepi.org to access information to use their boards.



Click to Enlarge

The top of the board have the most interesting bits with Ethernet, micro USB and USB ports, HDMI port, micro SD slot, power jack, a power button, the 40-pin “Raspberry Pi” compatible header, Allwinner H3 processor and one Samsung RAM chip. The 3-pin serial console header can be found right next (under in the pic) to the RJ45 jack.



Click to Enlarge

The bottom of the board features another Samsung RAM chip (512MB in total), and the camera interface.



Click to Enlarge

I’ve also taken a picture to compare Orange Pi One dimensions to the ones of Orange Pi 2 mini, Raspberry Pi 2, and Raspberry Pi Zero.

Click to Enlarge

By the way, while the official prices for Raspberry Pi ($5), Orange Pi One ($9.99), and C.H.I.P ($9) are a little different, I ended up paying about the same for all three boards once shipping is included: £9.04 (or about $12.77) for Raspberry Pi Zero, $13.38 for Orange Pi One, and $14.22 for C.H.I.P (Cyber Monday deal for “$8”). C.H.I.P computer is not shown in the picture above simply because I have not received it yet. The performance of Orange Pi One will be much greater than the other thanks to its quad core processor as discussed on Raspberry Pi Zero, C.H.I.P and Orange Pi One comparison.

Installing and Setting Up Armbian on Orange Pi One

While the company claims your can download firmware on Orange Pi Download page, they have not published a firmware image specifically for Orange Pi One, and while you could probably use an Orange Pi PC image (this may mess up with regulator), I’ve never heard anyone ever praise Shenzhen Xunlong for the quality of the images they’ve released, quite the contrary.  While Orange Pi community member Loboris released several images for Allwinner H3 boards, he does not seem to have updated them for Orange Pi One, and I’ve heard a lot about armbian distribution recently based on Debian and targeting ARM Linux boards, so that’s the image I’m going to try.

You can currently download Debian Jessie server or desktop based on Linux 3.4 legacy kernel, but once the Ethernet driver gets into Linux mainline (aka Vanilla), you’ll be able to run the latest Linux mainline on Orange Pi One, at least for headless operation.

First you’ll need to get yourself a 8GB or greater micro SD card preferably with good performance (Class 10 or better), and use a Windows, Mac OS and Linux computer to download and flash the firmware image.

I’ve done so in Ubuntu 14.04. Once you insert the micro SD card into the computer, you may want to located the SD card with lsblk:

1

2

3

4

5

6

7

8

9

lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda      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]

sdb      8:16   1  29.3G  0 disk

└─sdb1   8:17   1  29.3G  0 part /media/jaufranc/f3c9afc7-0761-48d7-afd1-7150df6

sr0     11:0    1  1024M  0 rom

I used a 32GB class 10 micro SD card, and in my case the device is /dev/sdb. I’m going to use the command line, but you can use ImageWriter for Ubuntu or Windows, as well as some other tools for Mac OS. Let’s download the firmware, extract it, and flash it to the micro SD card (replace /dev/sdX by your own device):

1

2

3

4

5

6

7

wget http://mirror.igorpecovnik.com/Armbian_5.05_Orangepih3_Debian_jessie_3.4.110_desktop.zip

unzip Armbian_5.05_Orangepih3_Debian_jessie_3.4.110_desktop.zip

cd Armbian_5.05_Orangepih3_Debian_jessie_3.4.110_desktop/

sudo apt-get install pv

umount /dev/sdX*

dd if=Armbian_5.05_Orangepih3_Debian_jessie_3.4.110_desktop.raw | pv | sudo dd of=/dev/sdX bs=16M

sync

Now insert the micro SD card into Orange Pi One, and connect all necessary cables and accessories. I connected HDMI and Ethernet cables, a RF dongle for an air mouse, a USB OTG adapter for a USB flash drive, the serial debug board, and the power supply. Please note that the micro USB port cannot be used to power the board, so you’ll either need to purchase the power adapter, or an inexpensive USB to 4.0/1.7mm power jack adapter to use with a 5V/2A USB power adapter.

As you connect the power supply, the red LED should lit, and after a few seconds, you should see the kernel log on the HDMI TV or monitor. I also access the serial console via a UART debug board, but it will only show the very beginning, and once the framebuffer is setup most message are redirected to the monitor. This is what I got for the first boot in the serial console:

U-Boot 2016.03-rc2-armbian (Mar 08 2016 – 20:18:51 +0100) Allwinner Technology

CPU: Allwinner H3 (SUN8I)

I2C: ready

DRAM: 512 MiB

MMC: SUNXI SD/MMC: 0

*** Warning – bad CRC, using default environment

In: serial

Out: serial

Err: serial

Net: No ethernet found.

starting USB…

No controllers found

Hit any key to stop autoboot: 0

switch to partitions #0, OK

mmc0 is current device

Scanning mmc 0:1…

Found U-Boot script /boot/boot.scr

2096 bytes read in 202 ms (9.8 KiB/s)

## Executing script at 43100000

gpio: pin PA15 (gpio 15) value is 1

gpio: pin PG11 (gpio 203) value is 1

0 bytes read in 162 ms (0 Bytes/s)

** File not found /boot/.next **

** Unrecognized filesystem type **

** File not found .next **

35896 bytes read in 536 ms (64.5 KiB/s)

4866320 bytes read in 490 ms (9.5 MiB/s)

Kernel image @ 0x48000000 [ 0x000000 – 0x4a4110 ]

Using machid 0x1029 from environment

Starting kernel …

[sun8i_fixup]: From boot, get meminfo:

Start: 0x40000000

Size: 512MB

ion_carveout reserve: 160m@0 256m@0 130m@1 200m@1

ion_reserve_common: ion reserve: [0x56000000, 0x60000000]!

Debian GNU/Linux 8 orangepih3 ttyS0

orangepih3 login:

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

U-Boot SPL 2016.03-rc2-armbian (Mar 08 2016 - 20:18:51)

DRAM: 512 MiB

Failed to set core voltage! Can‘t set CPU frequency

Trying to boot from MMC

U-Boot 2016.03-rc2-armbian (Mar 08 2016 - 20:18:51 +0100) Allwinner Technology

CPU:   Allwinner H3 (SUN8I)

I2C:   ready

DRAM:  512 MiB

MMC:   SUNXI SD/MMC: 0

*** Warning - bad CRC, using default environment

In:    serial

Out:   serial

Err:   serial

Net:   No ethernet found.

starting USB...

No controllers found

Hit any key to stop autoboot:  0

switch to partitions #0, OK

mmc0 is current device

Scanning mmc 0:1…

Found U-Boot script /boot/boot.scr

2096 bytes read in 202 ms (9.8 KiB/s)

## Executing script at 43100000

gpio: pin PA15 (gpio 15) value is 1

gpio: pin PG11 (gpio 203) value is 1

0 bytes read in 162 ms (0 Bytes/s)

** File not found /boot/.next **

** Unrecognized filesystem type **

** File not found .next **

35896 bytes read in 536 ms (64.5 KiB/s)

4866320 bytes read in 490 ms (9.5 MiB/s)

Kernel image @ 0x48000000 [ 0x000000 - 0x4a4110 ]

Using machid 0x1029 from environment

Starting kernel ...

[sun8i_fixup]: From boot, get meminfo:

Start:  0x40000000

Size:   512MB

ion_carveout reserve: 160m@0 256m@0 130m@1 200m@1

ion_reserve_common: ion reserve: [0x56000000, 0x60000000]!

Debian GNU/Linux 8 orangepih3 ttyS0

orangepih3 login:

But I got many error messages on the TV reading “[cpu_freq] ERR: set cpu frequency top 1296MHz failed!”. Those are actually normal because a single firmware image is used for all Orange Pi Allwinner H3 boards, and they use different regulators. The message will disappear subsequently once the system will have detected an Orange Pi One.

You may have to be patient the first few minutes of the very first boot (2 to 3 minutes) as you see the error messages above looping seemingly forever, as the system is resizing the root file system partition, creating a 128Mb emergency swap area, creating the SSH key, and updating some packages. Once this is all done, the system will reboot, and you’ll be asked to change the root password, create a new user, and adjust the resolution with h3disp utility which will automatically patch script.bin file in the FAT32 boot partition of your micro SD card. The default credentials are root with password 1234.

Welcome screen and new account creation after changing root password

H3disp options

H3disp utility allows you to choosen the resolution and refresh rate of your system, and I select 1080p50, and rebooted the board one last time, and after about 20 seconds, I could get to the Debian XFCE desktop.

Click for Original Size

The resolution of the desktop is indeed 1920×1080, Ethernet is working, but my keyboard layout does not match as the default layout is for Slovenian language. I went to Settings->Keyboard to change that.

And it seemed to work randomly as I sometimes got a QWERTY keyboard, but other times it would revert to a QWERTZ keyboard, and I’m not sure why. Following the instructions on armbian documentation using:

1

dpkg-reconfigure keyboard-configuration

did not completely solve my issue either at first, but it seems to be fine now…

I’ve also noticed some permissions issues starting with the network which requires sudo for ping and iperf, and likely to CONFIG_ANDROID_PARANOID setting in the kernel configuration. My USB flash drive was also not automatically mounted, and I had to use the sudo to mount the drive manually too.

Most people will also likely need to change the timezone with:

1

dpkg-reconfigure tzdata

Let’s check some parameters with the command line:

root@orangepione:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq

1200000

root@orangepione:~# sudo modprobe gpio-sunxi

root@orangepione:~# ls /sys/class/gpio_sw/

PA0 PA10 PA14 PA21 PA6 PA8 PC4 PD14 PG7 PG9

PA1 PA13 PA2 PA3 PA7 PA9 PC7 PG6 PG8

root@orangepione:~# free -h

total used free shared buffers cached

Mem: 494M 175M 319M 4.9M 11M 69M

-/+ buffers/cache: 93M 400M

Swap: 127M 0B 127M

root@orangepione:~# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/root 29G 2.1G 26G 8% /

devtmpfs 168M 0 168M 0% /dev

tmpfs 248M 0 248M 0% /dev/shm

tmpfs 248M 4.5M 243M 2% /run

tmpfs 5.0M 4.0K 5.0M 1% /run/lock

tmpfs 248M 0 248M 0% /sys/fs/cgroup

tmpfs 256M 8.0K 256M 1% /tmp

tmpfs 50M 0 50M 0% /run/user/1000

tmpfs 50M 0 50M 0% /run/user/0

root@orangepione:~#

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

root@orangepione:~# uname -a

Linux orangepione 3.4.110-sun8i #18 SMP PREEMPT Tue Mar 8 20:03:32 CET 2016 armx

root@orangepione:~# cat /etc/issue

Debian GNU/Linux 8 n l

root@orangepione:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq

1200000

root@orangepione:~# sudo modprobe gpio-sunxi

root@orangepione:~# ls /sys/class/gpio_sw/

PA0  PA10  PA14  PA21  PA6  PA8  PC4  PD14  PG7  PG9

PA1  PA13  PA2   PA3   PA7  PA9  PC7  PG6   PG8

root@orangepione:~# free -h

total       used       free     shared    buffers     cached

Mem:          494M       175M       319M       4.9M        11M        69M

-/+ buffers/cache:        93M       400M

Swap:         127M         0B       127M

root@orangepione:~# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/root        29G  2.1G   26G   8% /

devtmpfs        168M     0  168M   0% /dev

tmpfs           248M     0  248M   0% /dev/shm

tmpfs           248M  4.5M  243M   2% /run

tmpfs           5.0M  4.0K  5.0M   1% /run/lock

tmpfs           248M     0  248M   0% /sys/fs/cgroup

tmpfs           256M  8.0K  256M   1% /tmp

tmpfs            50M     0   50M   0% /run/user/1000

tmpfs            50M     0   50M   0% /run/user/0

root@orangepione:~#

The system is running sunxi Linux 3.4.110 kernel, and Debian 8. The processor max frequency is set to 1.2 GHz as it should be, the GPIOs appear to be supported just like in Orange Pi 2 mini (but less I/Os are shown), total RAM is 494MB, and 2.1GB is used out of the 29GB root partition in the micro SD card. I know some ARM boards can’t be powered off properly, but it’s not the case with Orange Pi One as I could turn it off cleanly with the power LED turning off at the end of the shutdown process.

That’s all for this guide, and I’ll showcase 3D graphics and video hardware decoding in a separate post. You can get further by checking out Armbian Orange Pi One page, following the instructions to build your own Armbian image, and browsing Orange Pi One thread in armbian forums.

Tweet Orange Pi One board is the most cost-effective development board available on the market today, so I decided to purchase one sample on Aliexpress to try out the firmware,…

Show more