updating raspberry pi 4 8gib to raspberry pi os

It’s been a good eighteen months since I worked with anything other than Pycom and Arduino in support of my paying project. I’ve certainly benefited from this effort, both intellectually and financially, but right now heading into Christmas and 2022, I need a diversion to help recharge the creative battery, and I need to go back and check the state of a number of my older projects. I combined the two efforts into one by checking on my Raspberry Pi 4 systems.

First thing to note is that the last time I logged into the Pi was back in June 2020. As soon as the Pi powered up and I logged in I tried the usual sudo apt update && sudo apt upgrade dance. And it failed. To make a long story short, I did manage to do a full upgrade to the latest 64-bit version of Raspberry Pi OS, the version built with Debian 11/bullseye. But it was seriously squirrelly in operation.

I backed up the pi account and development areas from the older card to a thumb drive, downloaded the latest image from  https://downloads.raspberrypi.org/raspios_arm64/images/ , performed a clean install of Raspberry Pi OS 64-bit using balenaEtcher ( https://www.balena.io/etcher/ ) onto a Sandisk Extreme 128GB micro SDXC card, rebooted with the new card, then copied everything back over, and carried on from there.

In the middle of doing all of that I took some additional time to try a few new distributions aimed squarely at the Raspberry Pi 4. They were Ubuntu 21.10 for IoT, Fedora 35 for IoT, and Pop!_Pi for Raspberry Pi 4. Here’s what happened with each to keep me still on Raspbian.

  1. Ubuntu 21.10 for IoT was perhaps the cleanest install of the three. It was no problem to flash and boot into Ubuntu. The critical feature on boot is for the OS to automatically resize the boot partition. Raspbian does it, and so does Ubuntu for IoT. My problem with Ubuntu on the RPi 4 8GiB is sloppy performance. At one point I attempted to drag-and-drop an application icon onto the Ubuntu dock. It’s a habit I developed using macOS and Windows (10 and earlier). Under Ubuntu you have to right-click on the app icon and select on the resultant menu to add the icon to the dock. My drag-and-drop attempt locked the Ubuntu desktop up solidly. After waiting a few minutes to see if it would ever come back, I pulled power and then the card and wiped it clean for the next experiment.
  2. Fedora 35 for IoT wouldn’t boot into a graphical desktop. I have a feeling that Fedora 35 for IoT hasn’t a decent driver to use my LG 34UM61-P, a 34″ diagonal 21:9 UltraWide® monitor. All the other distributions can find and use this monitor, but apparently Fedora 35 for IoT can’t. Once again, wipe and reload.
  3. Pop!_Pi for Raspberry Pi 4 was an interesting alternative I hoped would work out. It booted just fine, had reasonable performance, but it lacked one vital feature. It currently won’t resize the boot partition and it has no tool like raspi_config to allow you to manually do it yourself. I liked the way it looked and worked. I would have loved to have kept it, but it was not to be.

I’m back to doing some personal work on the current Raspberry Pi OS. The tools are up-to-date, especially Python3, and Python2 is not completely gone. I’ve got the last Go and Rust, and between those three I’m keeping busy. In fact, right now I’m moving all my little Go work over to modules. So far I’ve not hit any roadblocks. Once done I’ll check that in, and then move on to more physical computing.

moving back to raspbian 64 bit, dropping work on wiringpi

Moving Back to Raspbian 64 bit

On several occasions I’ve written about moving from Raspbian Buster 64 bit to Ubuntu 20.10. I was never completely comfortable with using Ubuntu 20.10 on a Raspberry Pi 4B, not even the version with 8GiB of RAM. But I stuck with it because I thought it would reward my usage over time, with fixes and updates. That all disappeared when I tried to run my physical computing tools under Ubuntu.

I wrote all my tools with Google’s Go and GoBot ( https://github.com/hybridgroup/gobot/ ). I don’t remember what version of Go I started with, but my tools build and work with the latest version of Go, 1.15.3. Or they do under Raspbian. When I set up my build environment under Ubuntu and attempted to run my tools, nothing worked.  When I set up the same under Raspbian Buster 64 bit, they all worked just fine. The key to understanding how my tools work is that they drive everything on the Raspberry Pi’s I2C bus. For an example look at /2018/06/24/golang-on-the-raspberry-pi-part-4/ . The GPIO pin functionality may still work, but for me I’ve got shift registers and intelligent peripherals on I2C, and I need it to work. It doesn’t under Ubuntu 20.10, but it does under Raspbian Buster 64 bit.

At this point I’m back on Raspbian, and will stay there for the foreseeable future.

Leaving WiringPi

I’m going to stop working with WiringPi. Gordon Henderson stopped working on it in August 2019. I managed to fork a copy here ( https://github.com/wbeebe/WiringPi ) from a group that made a copy of the code and then started their own work on it. I fixed a minor coding problem that kept the shared library from linking under Ubuntu. It seemed to work (gpio readall), what with the very little testing I did. After spending about a week of evenings just looking at how the code is written and organized, I’ve decided to leave well enough alone. For physical computing I have my Golang work, and there are other tools, especially in Rust, that I can turn to if I need them.

I’m back to a general state of calm and comfort with Raspbian 64 bit and Golang. I’ll just take that and move along.