Getting started with Pine64

UPDATE: see at the end for some problems that I encountered after the initial install.

The Pine64 is a single board computer that resembles the Raspberry Pi, but with a 64-bit CPU, up to 2GB of RAM and available for $15-$29. It was introduced with a Kickstarter campaign which I supported. My 2GB Pine64 has been lying on a shelf for quite some time, as I was waiting for the kernel, distribution and documentation to mature.

My first installation yesterday went fine (some slight troubles to get WiFi connected), but while updating the kernel, the root disk partition completely filled up and borked the installation. Hence I have to start again. Let me now document it, as I might need to repeat the installation more than a second time.

I primarily followed the instructions from https://www.pine64.pro/getting-started-linux/ with some additional information from http://forum.pine64.org/showthread.php?tid=982. I am working off an Apple MacBook Pro computer.

After downloading the Debian Base disk image, I used 7z to unzip it:

mbp> brew install p7zip
mbp> 7z x pine64-image-debianbase-310102bsp-2.img.xz

I inserted an empty Samsung 16 GB EVO UHS-I Class 10 micro SD card and followed up with:

mbp> diskutil unmountDisk /dev/disk1
mbp> sudo dd if=pine64-image-debianbase-310102bsp-2.img of=/dev/disk1 bs=1024k

and I unmounted it again:

mbp> diskutil unmountDisk /dev/disk1

In order to configure the WiFi connection of the Pine64, I connected it to a keyboard and to my LCD TV screen and powered it up with a 5V 2A micro USB power supply. I noticed that the HDMI connection is a bit flakey, the TV repeatedly reports “no connection”; wiggling the HDMI connector brought the boot sequence back on screen. I also connected the wired ethernet connection, which – without configuration changes- obtained an IP address using DHCP from my router.

I added the following to /etc/network/interfaces

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan1 inet manual

and the following to /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="Linksys-E900"
    psk="xxxx"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP
    group=CCMP
    auth_alg=OPEN
    priority=9
}

which I read-protected with

root@pine64# chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf

Then I restarted the wifi network

ifdown wlan0
ifup wlan0

and checked for the network:

root@pine64:~# ifconfig 
eth0      Link encap:Ethernet  HWaddr 36:c9:e3:f1:b8:05  
          inet addr:192.168.1.13  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fdeb:a2d5:862:0:34c9:e3ff:fef1:b805/64 Scope:Global
          inet6 addr: fe80::34c9:e3ff:fef1:b805/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2607 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1127 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:200040 (195.3 KiB)  TX bytes:236261 (230.7 KiB)
          Interrupt:114 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 34:c3:d2:71:90:16  
          inet addr:192.168.1.14  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::36c3:d2ff:fe71:9016/64 Scope:Link
          inet6 addr: fdeb:a2d5:862:0:36c3:d2ff:fe71:9016/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:505 errors:0 dropped:1 overruns:0 frame:0
          TX packets:12 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:99440 (97.1 KiB)  TX bytes:1969 (1.9 KiB)

As I ran into disk space problems yesterday – perhaps because I had done apt-get update && apt-get upgrade – I ran the update commands as follows:

resize_rootfs.sh
reboot

followed by

/usr/local/sbin/pine64_update_uboot.sh
/usr/local/sbin/pine64_update_kernel.sh
reboot

and finally

apt-get update
apt-get upgrade
timedatectl set-timezone Europe/Amsterdam

UPDATE (11 Feb 2017): My Pine64 board turns out to be quite unstable. Depending on how I plug in the HDMI cable, I get an image on my screen or not. Wiggling the HDMI connector sometimes helps, sometimes not.  Furthermore (and more serious, since I wanted to use it as headless server), if there is some serious network traffic, it crashes. Not once, but quite consistently. I read elsewhere that the build quality of the Pine64 is not very good. It might also be that the problem is in powering the board: I am using a 2A power adapter (which works fine on all my Raspberry Pi’s).

Leave a Reply

Your email address will not be published. Required fields are marked *