August 5, 2020

Download and run Armbian on my Orange Pi PC 2

Armbian has a sharp looking website. It has a page devoted to the Orange Pi PC 2. It warns me that the board may be damaged if I don't have some kind of heatsink and cooling. I fuss around applying a copper heat plate and aluminum sink (sold for the Raspberry Pi, with stick on thermal tape. I also scrounge up a 12 volt fan and solder it to a small power supply for short term use.

My first question is Focal versus Buster. Both are offered to me, and I don't have a clue. Near as I can tell "focal" is ubuntu and "buster" is debian, so I opt for buster (with the 5.4.y kernel) and start the download using the "direct" rather than "torrent" option.

The download gives me a 980M file:

Armbian_20.05.2_Orangepipc2_buster_current_5.4.43_desktop.img.xz

Meanwhile, I locate a 16G micro SD card, fresh in the package, a SanDisk Ultra. The "unxz" command decompresses the image to a 4.2 G file, which I copy to my flash card via:

su
dd bs=4M if=Armbian_20.05.2_Orangepipc2_buster_current_5.4.43_desktop.img of=/dev/sdf
sync

Be very careful to select the correct output device. If you pick the wrong device, and it is your system disk, you will have done something terrible and painful.

So, in goes the card and we power up. It boots nicely and we are soon greeted (over a serial console) with a login prompt. I login as root using 1234 and change the password. I get the usual sudo scolding, which I will of course ignore and away I go.

uname -a
Linux orangepipc2 5.4.43-sunxi64 #20.05.2 SMP Tue Jun 2 17:20:17 CEST 2020 aarch64 GNU/Linux
armbianmonitor -m
17:39:17: 1368MHz  0.05   6%   1%   2%   0%   1%   0% 24.7°C  0/8
17:39:22:  480MHz  0.05   0%   0%   0%   0%   0%   0% 23.7°C  0/8
DHCP sets this up as 192.168.0.68 (an as yet unused IP on my local network). It seems to be running nicely cool to the touch.

I try armbianmonitor -r as suggested in the documentation page for the H5 and I get:

Installing RPi-Monitor. This can take up to 5 minutes. Be patient please.
..... long wait .....
Now you're able to enjoy RPi-Monitor at http://192.168.0.68:8888
This is all well and good, but it doesn't work.

Try downloading software

I type "armbian-config" and select "software"
I select "s" for kernel source.
I take the default (linux-source-5.4.43-current-sunxi64)
It decompresses to: /usr/src/linux-source-5.4.43-sunxi64

There is also an option to load kernel headers, but I am assuming I have all of that in the above directory.

After doing this I type:

df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              434060       0    434060   0% /dev
tmpfs             101172    4368     96804   5% /run
/dev/mmcblk0p1  15094960 4800884  10083424  33% /
/dev/zram0         49584    1560     44440   4% /var/log
This is nice because the filesystem seems to be using the entire 16G card. And I am quite surprise that there was enough space for the kernel sources.

I shutdown the system, pull the SD card and put it back into the card reader. My desktop mounts it as an ext4 file system, and it is an easy matter to pull that linux source directory off. I put it into a tar file and get:

-rw-r--r--  1 root root  1445939200 Aug  5 11:18 linux-source-armbian.tar
The files are 1.5 G total, so it makes sense that I could fit them onto the SD card. I could probably build the kernel there also. Indeed I can. Space is not the biggest problem. It just takes a while (on the order of 10 hours). Running make to use multiple cores might speed things up, at the risk of thermal issues. The real issue (I think) is simply the IO bandwidth talking to the SD card.

When the build finishes, and I pull the linux source directory off, I see:

-rw-rw-r--  1 tom  tom  2657740800 Aug  6 08:44 linux-source-armbian.tar
The the object files almost double the space required, but it is still under 3G and fits easily on the 16G SD card along with Armbian "Buster".


Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org