I solicited and received a Pine64 board quite a while back. They were promoted as a cool 64-bit replacement for the Raspberry Pi. It would run Android or Linux and had all the same awesome general purpose I/O pins. The cost was listed as between about $15 and $40, depending on features.
As soon as it arrived, I hooked it up to the big screen, a keyboard/mousepad and a 5-volt wall wart. After a minute or two, nothing. No lights, no text on the screen, nothing.
It turns out, the default operating system, Android, takes a little while to boot. Not only that, the designers apparently didn’t see the need for the usual onboard power-indicating LEDs. Eventually, Android came up, and I was able to try out a couple of applications and the web browser.
Recon on the web showed that there really wasn’t a viable Linux distro, much less a 64-bit version, that ran on the Pine yet. So, the board was placed at the back of my workbench, until a stable Linux release materialized.
When Will It Work?
Bleeding-edge hardware hacking tip #1: New hardware almost always has software problems.
This is particularly true in the off-the-shelf hacker world. Face it, embrace it, love it. And, don’t forget, “if were that easy, a fifth grader could do it!”.
Don’t be grumpy or annoyed that everything isn’t fully “developed” when the device shows up on your doorstep. It’s just reality, these days. All is not lost, though, which brings us to the next point.
Bleeding-edge hardware hacking tip #2: Wait a month or two and somebody will get it working.
No Linux on the Pine64. No problem. Just wait a month or two. That’s about the normal time somebody in the hacker and maker movement community steps up and puts out an initial sort-of working release. That’s what I’ve seen. And, without these generous, dedicated souls, I certainly wouldn’t be able to write about hardware hacker topics. So, thank you. If you know people that do these jobs, let them know you appreciate their efforts or buy them a cold one, if you have a chance.
Sure enough, a few days ago while just doing a weekly ping on the topic…what do you know? I could choose between half a dozen versions of Linux for the Pine. They’re even 64-bit.
As an influential tech media figure, I frequently receive gear that isn’t very far from the prototype shop. Getting some of that stuff working is a challenge.
From an off-the-shelf hacker perspective, remember my discussions on MVP (minimum viable prototype). The same applies to minimum viable products. Vendors want to get that hardware out there so customers can start learning, tweaking, adapting and BUYING more. You recall how anxious you were to order that new gadget off of Kickstarter or from one of the hardware foundations. Believe me, hardware vendors are moving Heaven and Earth to get the parts to you.
Bleeding-edge hardware hacking tip #3: Physical hardware equals project moving to reality.
Without the core physical hardware, in your hot little hands, your project is still just your grandiose Utopian vision. My point is that as long as you need parts, the project is not getting done. Order them now. Go across town and buy them, now. Just because the software isn’t quite there, doesn’t mean that you can’t get the physical part of the physical computing project well underway. Tangible objects matter and it helps your motivation, to see things you can actually touch. Hardware vendors want your projects to move along as fast as possible as well.
Why? They want to sell you more parts so that you can build more projects.
If you are still worried about the software part of your bleeding-edge hardware, refer to tip number 2.
Putting Linux On The Pine64 Board
Once I discovered a so-called working Linux image, on the Pine64 wiki page, getting it on the board was pretty straightforward.
I downloaded the latest “xenial” version (ZIP file) to my Xubuntu notebook.
The release uses the Xubuntu (Xfce) desktop, has the Midori browser, Thunderbird email, the LibreOffice suite and Gnome Mplayer. With the exception of the Chrome browser, everything else is the same as my production Xubuntu Intel-based notebook.
After the download, I just unzipped and burned the image onto a 32 Gb Samsung EVO+ micro-SD card. These cards are fast and are around $11 at Best Buy, every couple of weeks.
I brought up a terminal and entered these commands:
robnotebook% mkdir pine64
robnotebook% cd pine64
robnotebook% cp /home/rob/Downloads/xubuntu-xenial-20160502-longsleep-pine64-8GB.zip .
robnotebook% unzip xubuntu-xenial-20160502-longsleep-pine64-8GB.zip
Then it was off to put the .img file onto the micro-SD card using the dd command.
robnotebook% sudo dd bs=4M if=xubuntu-xenial-20160502-longsleep-pine64-8GB.img of=/dev/mmcblk0
The dd command ran for a little while and didn’t give any status information. It took about 5 minutes to complete.
Once it finished, I popped the SD card out and inserted it into the Pine’s SD card slot. The HDMI cable was plugged in along with the keyboard/mousepad. I then plugged in the power. My Pine had the optional WiFi module. If you don’t have that device on-board, just plug in a network connected CAT 5 cable for Internet access.
Soon, the traditional Linux boot-up text scrolled by then went blank. After a few seconds, the Xfce desktop appeared with a login screen. “ubuntu” for the user and password put me in control of the desktop.
One time the boot-up text went by, the screen went blank, and then the machine restarted. I switched to a more powerful 5-volt power supply and higher quality power/USB cable, to solve the problem.
Things I Added
Overall, the Pine64 works similarly to a regular Raspberry Pi. If you had them side by side, you probably couldn’t tell the difference. The desktop is the same, applications are the same; the system tray is the same.
I first wanted to turn up the throttle, so I downloaded and installed the cpufreq utilities using apt-get. This gives you the cpufreq-set and cpufreq-info commands. The “set” command lets you set the clock speed of a processor core, of which the Pine64 has four. The command “info” tells you the speed of the cores and various other performance information.
I used the following to set the speed to maximum on the number zero core. The others are named 1 through 3 and use a similar line.
pine64% sudo cpufreq-set -g performance -c 0
Running up the speed on the cores made a noticeable difference in performance. Opening applications, browsing Web pages and switching between apps was actually pleasant. After running for a half hour or so, unfortunately the Pine rebooted. Investigation showed that running in performance mode caused the A20 chip to heat up to around 150 degrees F. That’s a little warm and likely caused the reboot. Note for future projects, we probably need a little heat sink for stability, if you turn everything up.
I also attempted to get the “wired clicker” working from my Steampunk Conference Presentation and Manipulation Apparatus. The wired clicker uses a Python program to read the digital input/outputs connected to the clicker buttons, then move up or down through a LibreOffice Impress slide stack.
Sadly, after a couple of hours of work, I just couldn’t get it going before my article deadline.
I installed several different Python RPi-GPIO libraries and was unable to get past the “you have to run this on a Raspberry Pi” message. Hmmm? That makes sense, I guess. It’s a Pine64.
As you can see, we’re back to the bleeding-edge hardware, not having software issue again. Linux clearly works on the Pine64 and pretty well. Now if we can just get the GPIO pins to read and write data, we’ll be golden.
Maybe that won’t take a month.