Rigging up Raspbian Buster to run on a Pi-Top

Jan 06 2020

It doesn't seem that long ago that I put together a Pi-Top and started tricking it out to use as a backup system.  It was problematic in some important ways (the keyboard's a bit wonky), but most of all the supported respin of Raspbian for use with the Pi-Top was really, really slow and a bit fragile.  While Windbringer was busy doing a full backup last week I took my Pi-Top for a spin while out and about, and to be blunt it was too bloody slow to use.  At first I figured that the microSD card I was using for the boot device was one of the lower-quality ones that bogs down once in a while, but that turned out not to be the case.  Out of desperation I started looking into possibly upgrading the RasPi in that particular shell to the latest and greatest version, which I happen to have received as a Yule gift last year.  Lo and behold, I was not the only person to think along these lines. (local mirror)  While the article in question talked at some length about the hardware challenges involved (mostly due to the different arrangement of connectors) the software part was the most valuable to me because it answered, concretely and concisely, how to get unmodified Raspbian working with a Pi-Top's unusual control hardware.  So that this information doesn't get lost in the ether I'm going to write up what I did.

First things first - I grabbed the latest release of Raspbian (2019-09-26 build) which was built using Debian Buster.  Just in case, I pulled a faster microSD card out of my spare parts bin and burned the Raspbian disk image to it.  Rather than try to find a keyboard and monitor I copied Windbringer's wpa_supplicant.conf file to the boot partition of the microSD card so that the wifi would be configured automatically, and I took the extra step of creating an empty file called ssh right next to it, which would enable remove access via SSH.  Said microSD card went into my RasPi4 under my desk, where it booted up normally.  I SSH'd in from Windbringer and went through the raspi-config song-and-dance to set up the new OS image (Advanced Options -> Expand Filesystem is a must so that the entire microSD card will be used).  I do hasten to add, however, that I did have to turn on the I2C and SPI interfaces (raspi-config -> Interfacing Options -> Enable/Disable [SPI, I2C]); I turned on the 1-wire interface also, just in case some piece of laptop-y infrastructure requires it.  I also made sure that Raspbian would boot straight to the desktop (Boot Options -> Desktop Autologon) when it came up.

Reboot.

Log back in and fully update the system.

pi@raspberry:/home/pi$ sudo apt-get update
...
pi@raspberry:/home/pi$ sudo apt-get dist-upgrade
...
pi@raspberry:/home/pi$ 

Now, here's where things get interesting, but in a good way this time.  The Pi-Top secret sauce, all the systemware that interfaces with the Pi-Top Hub which drives the display, manages the power cell, and implements the system bus, is open source (pi-topPULSE, Device-Management, pi-topSPEAKER, pi-topHUB-v1) but until fairly recently it wasn't clear how to install any of it yourself.  It is now, because all of that secret sauce is now part of the default Raspbian package repositories, so you don't have to fight with it anymore.  Here's exactly what I did:

pi@raspberry:/home/pi$ sudo apt-get install -y pt-devices

That's it.  This pulls in all of the essential systemware, including pt-hub, pt-pulse, pt-speaker, pt-device-manager, and all of their dependencies.  At this time I shut down the RasPi4, pulled the microSD card and transplanted it into my Pi-Top.  When the Pi-Top comes back up all of that secret sauce will be running in the background, and you'll have a much faster Pi-Top to boot.  Not only does the desktop look good but the audio worked right off the bat.  It still requires a little bit of work (such as installing Firefox because I can't abide Chromium or Chrome anymore) but so far it's been really usable.  I need to do some more work to put it through its paces but it already runs significantly better than, well, it ever did before.