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.
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.
The bottom of the board features another Samsung RAM chip (512MB in total), and the camera interface.
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.
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:
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.
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.
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:
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 (Update: the post is up). 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.
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
Thanks for this, I will be glad to use it shortly.
Could you please check if there is an I2S port supported, normally on the 40-pin connector ? I’m not sure what to look at precisely, it seems that “lsmod | grep i2s ” could be useful, and maybe “aplay -l”.
This card could be great to provide a nice sound box if I2S is supported. Alternatively, it seems that the CHIP has a built-in audio codec, making it a yet simpler solution.
@Eric D.
That’s lsmod output:
Checking the schematics would be useful too @ http://linux-sunxi.org/File:ORANGE_PI-ONE-V1_1.pdf
those who are interested, they have a case now
@Eric D.
I2S is supported but you have to tweak script.bin, just have a look in the H3 section in Armbian forum. I2S and other important stuff are pinned ‘tutorial like’ threads.
It should be noted that the version Jean-Luc tested is rather outdated (already 8 days old!), we fixed a lot of stuff in the meantime but this is still work in progress and a lot things need more improvement. Unfortunately the majority of Armbian devs use their devices headless or for server stuff so while we’re at it fixing GUI/desktop stuff it could improve a lot more if devs more familiar with this stuff would also join development.
And it should be noted that regarding desktop useage the OPi PC for $5 more is definitely the better choice (more RAM, more connectors, more USB ports that do not have to share bandwidth and therefore the ability to move rootfs/homedir to a connected USB disk which improves ‘desktop performace’ a lot!)
Im running DietPi on mine
@Mark Birss
If Diet Pi still relies on loboris’ settings then you fry the poor device unnecessarily and it runs slower than necessary. I would check ‘dmesg’ output for ARISC errors, ‘cat /sys/class/thermal/thermal_zone1/temp’ and ‘cat /proc/interrupts’.
@cnxsoft
BTW: That you find less available GPIOs exposed with Armbian, OpenELEC or more recent loboris settings has a simple reason: The OS images Xunlong shipped simply defined every pin on the GPIO header as ‘GPIO’ therefore preventing use of I2C, SPI, I2S and all the other ‘non GPIO’ stuff. At Armbian we try to coordinate our settings with Jernej’s H3 OpenELEC fork https://github.com/jernejsk/OpenELEC-OPi2 so that users who want to switch between Armbian and OpenELEC will find identical environments.
And BTW: Now that you’re using Armbian RPi-Monitor installation is just ‘sudo armbianmonitor -r’ 😉
@tkaiser
Ah ok, thank you for your comments
been using it with heat sink
root@DietPi:~# dmesg | grep error
[ 10.407505] gpio_sw: probe of gpio_sw.0 failed with error -12
[ 10.407533] gpio_sw: probe of gpio_sw.1 failed with error -12
root@DietPi:~# cat /sys/class/thermal/thermal_zone1/temp
57
root@DietPi:~# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
29: 39158 30278 61758 23715 GIC arch_timer
30: 0 0 0 0 GIC arch_timer
32: 6 0 0 0 GIC uart0
38: 0 0 0 0 GIC twi0
43: 0 0 0 0 GIC PA
49: 0 0 0 0 GIC PG
50: 0 0 0 0 GIC sunxi_timer0
63: 0 0 0 0 GIC Thermal
72: 0 0 0 0 GIC sunxi-rtc alarm
77: 0 0 0 0 GIC PL
81: 0 0 0 0 GIC arisc_hwmsgbox_irq
82: 0 0 0 0 GIC sunxi_dmac
90: 0 0 0 0 GIC cedar_dev
92: 123692 0 0 0 GIC sunxi-mmc
93: 52 0 0 0 GIC sunxi-mmc
104: 0 0 0 0 GIC ehci_hcd:usb1
105: 0 0 0 0 GIC ohci_hcd:usb3
106: 4973 0 0 0 GIC ehci_hcd:usb2
107: 0 0 0 0 GIC ohci_hcd:usb4
114: 12043 0 0 0 GIC gmac0
118: 112723 0 0 0 GIC dispaly
129: 0 0 0 0 GIC Mali_GP
130: 0 0 0 0 GIC Mali_GP_MMU
131: 0 0 0 0 GIC Mali_PP0
132: 0 0 0 0 GIC Mali_PP0_MMU
134: 0 0 0 0 GIC Mali_PP1
135: 0 0 0 0 GIC Mali_PP1_MMU
IPI0: 0 0 0 0 CPU wakeup interrupts
IPI1: 0 0 0 0 Timer broadcast interrupts
IPI2: 9067 10411 6742 8091 Rescheduling interrupts
IPI3: 134 159 54 157 Function call interrupts
IPI4: 1 2 1 3 Single function call interrupts
IPI5: 0 0 0 0 CPU stop interrupts
IPI6: 0 0 0 0 CPU backtrace
IPI7: 0 0 0 0 completion interrupts
Err: 0
@milkboy
thank you, just got one
@Mark Birss
57°C seems a bit hot but no ARISC errors are a good sign. Did you execute my ‘fix-thermal-problems.sh’ script known from the Orange Pi forums? Does also adjust the different voltage regulator in the latest version. And you’ll see improved performance when you distribute USB and network IRQs to different CPU cores just like Armbian does it.
And another note regarding SD cards: You can use any SD card larger than 2GB with Armbian (automatic FS resize on first boot) but should be aware that fast cards help a lot when it’s about to use any SBC as ‘desktop’. And that doesn’t depend on the speed class (but please don’t buy anything that’s not at least Class 10) but way more on random I/O.
The last two table rows here are the important ones if you don’t call the ‘nand-sata-install’ that also works with USB disks and moves the rootfs from SD card to faster storage: http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-microsd-card
@tkaiser
Ok, thanks just ran your script.
@tkaiser
looks like upto 5 degrees cooler
@tkaiser
Something weird happened this morning. The welcome screen in the serial interface shows Orange Pi 2 mini is detected, and I get the the message:
So it looks like auto-detection may not always work. Somehow the desktop background is also gone, so it could be the image is corrupted.
@cnxsoft
Can you please mail me the output of ‘armbianmonitor -u’ so I’m able to reproduce that?
@tkaiser
That’s the link I got: http://sprunge.us/FecS
@tkaiser
OK I know why now… I have connected a USB hub.. that happens to have the exact same PID and VID as the one used in other versions of Orange Pi H3…
@cnxsoft
That was also my assumption and using the 1st USB hub I found here lying around I was able to reproduce that problem. Thx, now I know why this happens (we had a few reports) and we’ll fix it with the next version (maybe removing all of the auto detection stuff and replacing it with a simple dialog)
Still no mainline kernel? The ethernet driver is still broken on mainline, I don’t know about GPIOs.
@zoobab
I’m running Armbian with 4.x since months but we refrain from publishing OS images unless Ethernet is ready. But the build system is ready and a few Armbian users already got stuff like I2C, SPI and so on in a working state with Mainline…
Having strange issues with the ethernet card of this OrangePi One. I’m trying to get AppleTalk working ( long story…check http://www.macip.net if you want to know…), but NO GO. It works OK with a USB network dongle.
Could this be something with the hardware of this device? Or just wait for better support in the mainline kernel?
If a 4.4 OS comes available I really would like to test if Netatalk with ddp will work!
Installing these work for me to have proper langauge keyboard:
sudo apt-get install console-data unicode-data language-pack-es-base
Hello !
I’m going to buy the Orange Pi One, and I don’t understand the ethernet problem people are talking about. Do I have to use a usb to ethernet adapter to connect it to the network ?
Could you please enlighten me ?
Thanks,
@Ibrahim
There are two versions of the Linux kernel:
* Legacy Linux 3.4 kernel where basically everything works including Ethernet (That’s what I used in the tutorial above)
* Vanilla (aka Mainline) Linux is the very latest version of the kernel (now 4.6 in development) where the Ethernet driver has not been fully implemented yet (but is getting close).
For most people the legacy kernel will do, and Ethernet will work out of the box.
@cnxsoft
Wow, that was quick ! Thanks a bunch !
Greetings from France 🙂
@cnxsoft
The funny thing is that the mainline Ethernet driver that is considered alpha quality already works better compared to Allwinner’s 3.4.x driver. The problem is somewhat exotic (AppleTalk multicasts get corrupted) but doesn’t occur with mainline kernel.
@Ibrahim: Choose legacy kernel (and consider spending the $5 more by upgrading to the PC or at least reading through the Armbian forums a bit) since vanilla will have issues for quite some time…
@tkaiser
Actually, I’ve already ordered the PC, and I’m waiting for it to arrive. I am now considering the OPi One as a secondary cheap device to play around with.
Maybe I’m mistaken, but legacy is the only kernel available on the OPi One download page ?
I browse the Armbian forums regularly, but since I’m a linux noob, I can’t wrap my head around it all 🙂
Thanks.
Some security issues had been found in Linux 3.4 kernel for Allwinner H3 & H83T (sun8i), so it’s recommend to upgrade to armbian 5.11 that fixes the isssue -> http://forum.armbian.com/index.php/topic/1108-security-alert-for-allwinner-sun8i-h3a83th8/
@cnxsoft
Oh, it’s just one nasty root exploit that works by simply doing this
on affected machines (most probably exploitable through network too). Fix is in Armbian 5.10 and upgrading is just the usual ‘sudo apt-get update/upgrade’.
Unfortunately many OS images for H3 boards aren’t maintained at all and other devices not supported by Armbian are also affected (Banana Pi M3 for example). More details in the security alert you linked to.
@tkaiser
Allwinner has issued a PR about that exploit:
@cnxsoft
Thx, Eva from Allwinner also contacted me directly. And for everyone concerned about the issue: please don’t believe the lurid headlines and be aware that this is neither a backdoor nor hidden (Allwinner provided the whole kernel code online and it has been found by accident 2 weeks ago since we’re able to look through the Android kernel sources!).
This reader comment on arstechnica sums it up perfectly: http://arstechnica.com/security/2016/05/chinese-arm-vendor-left-developer-backdoor-in-kernel-for-android-pi-devices/?comments=1&post=31168921
Help needed: We at Armbian currently try to improve THS settings for Orange Pi One/Lite, NanoPi M1 and Banana Pi M2+. In case anyone a bit more experienced owns such a board without heatsink applied to the SoC please read through http://forum.armbian.com/index.php/topic/1231-testers-wanted-improving-ths-settings/ and consider helping us improve the settings (every OS image and everyone might benefit from later!)
cant get past set cpu frequency top 1296MHz failed! waited for 1 hour. Not sure what is happening but i can still log in to the orange pi via ssh. So it has booted but cant get to desktop at all
Hi
I cant use my wirless keyboard to enter user name or password ?
i dont have uart serial conector any solution please ?
thanks.