This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bleeding Edge (2020) Pi 4, SSD boot, 64-bit, OC beta
This build is for anyone who wants to follow the bleeding edge. The Pi foundation released a 64-bit Pi OS in May 2020 (beta) followed by a beta kernel that supports booting from an SSD on a Pi 4. And OpenCPN was testing the 5.1.x betas at the same time. I wanted to see if I could make it all work. It does. This was done on a Pi 4 with 2GB RAM (not the newest 8GB version that caused the introduction of the 64-bit OS).

One reason I wanted to do this is because it opens up a whole world of ARM64 packages that were not readily available as ARMHF packages.

This how-to assumes you use the desktop version of OP, so some of the later installation stuff is not command line, easy enough to do but I didn’t do it that way.

Grab the 64-bit PiOS image:

Grab the Pi Imager:

Insert an empty SD card in your computer's slot and run the Pi Imager.

Select the "use custom" option at the bottom and select the 64-bit image you downloaded above.

Stick the SD card in your Pi and boot it up. Go through the initial setup process and connect your Pi to a network. This part will depend on your specific needs so I don’t detail it here.
Once on a network, update to make sure everything is current
sudo apt update
sudo apt-get upgrade -y
sudo rpi-update

Get the Pi ready for SSD boot:
sudo apt install rpi-eeprom -y

And tell it to use the beta eeprom:
sudo sed -i 's/critical/beta/g' /etc/default/rpi-eeprom-update

Find the latest beta firmware (it will have been downloaded when you updated above), go to the directory /lib/firmware/raspberrypi/bootloader/beta and look for the latest "pieeprom" file. In my case it was pieeprom-2020-06-03. Install the latest eeprom: 
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/beta/pieeprom-2020-06-03.bin

reboot. Check that the new bootloader is running:
vcgencmd bootloader_version

confirm that the date matches what you entered from the pieeprom file name.
Check to confirm SSD boot is supported:
vcgencmd bootloader_config

At the bottom of the return you should see “BOOT_ORDER=0xf41” which means try SD, then SSD.

So far we’ve been working on an SD card, to move to an SSD get yourself an SSD and a known good USB3 to SATA adapter (or a USB SSD). There are problems with some adapters and the Pi 4, I used the Startech USB3.1 to SSD adapter available for about $12. If you have one already (I had an Apricorn that didn't work) simply connect it to the USB3 port on the Pi. If it doesn’t mount automatically then there’s a problem. You can confirm by connecting to a USB2 port. If it mounts there then your adapter is not (yet) supported in the Pi USB3 ports. You can look around the web for USB quirks that might fix it, or get one known to work.

Attach the SSD to the Pi on a USB3 port and run the Pi SD Card Copier (Accessories). Copy the SD card to your SSD. The Pi copier should automatically expand the SSD partition, you can check the size of the drive in File Manager, it should match the size of your SSD, not your SD.

There are a bunch of sites that tell you the next step is to copy .elf and .dat files from the SD to the SSD, I did not have to do this (using the June 3 2020 bootloader).

Power down Pi. Remove SD card. Power back up, the Pi should boot from your SSD. My first boot didn’t complete, but another power cycle and it has booted ever since.

Depending on how you like to do things you may want to re-install the SD card and do the rest of this procedure on the SD, then re-image the SSD at the end – that way you’ll have an SD card backup of the whole installation.

Download the OpenPlotter “Advanced” Installation 

Once the download is complete install the deb (double-click).

When the installation is complete go to Raspberry-Other-Settings. This will open the OP setup menu. First step “Add Sources” to connect your OP installation to the tools it needs. Then “Update Candidates” to read from all of those sources.

Install the core OP components. For me that is Network (because I also use my OP as the boat’s AP) and Serial. At the time I did this SignalK, Can Bus, and OpenCPN beta would not install from the Settings app (I couldn’t get the canboat package to install, and since I don’t use it I went another way).

Go over to the OpenCPN repository and grab the latest beta.

For me this was OpenCPN-5.1.612.1.0~bionic1

Download the arm64 package.

Install the package, you now have the latest OpenCPN beta on the system.

I also wanted SignalK, but it wouldn’t install from the Settings app because it was missing a canboat dependency. I tried installing canboat manually and that didn’t work. I’m assuming it’s because of the ARM64 architecture, but since I don’t use is (no NMEA 2000 on our boat) I didn’t dig further. Back to the command line:
sudo apt install nodejs

This should install both node and npm. If you want to confirm they got installed:
node -v
npm version

For me there was a newer version of npm even though I had run an upgrade shortly before, so:
sudo npm install -g npm@latest

Install SignalK and configure it:
sudo npm install -g –unsafe-perm signalk-server
signalk-server –sample-nmea0183-data
sudo signalk-server-setup

Follow the prompts for the final SignalK configuration. 

That’s it, you’re done. You should now have OpenCPN beta running on the 64-bit Pi OS beta with the Pi beta kernel from an SSD. That’s an awful lot of beta, but it all works for me. I’m now using it for production, with a plain vanilla OP install on an SD card so that if I run into unrecoverable problems I can simply insert the SD card and reboot the PI (and since the configuration above boots from SD first I can leave the SSD attached so I can access any charts, routes, or other data I may have created in the bleeding edge version).

Just for grins, here's what the diagnostics look like running on an old Samsung 840 PRO 256GB SSD I had around:
Quote:Raspberry Pi Diagnostics - version 0.4
Sat Jun 13 08:38:26 2020

Test : SD Card Speed Test
Run 1
Sequential write speed 148271 KB/sec (target 10000) - PASS
Random write speed 18347 IOPS (target 500) - PASS
Random read speed 16141 IOPS (target 1500) - PASS
Good job. Do you have the Moitessier HAT? I have the HAT and when I updated my Pi, it froze because of the new firmware. I'm going to wait till all of this is out of beta.
No HAT. I saw in another thread that was in issue. Our system is pretty simple, a bunch of NMEA 0183, OpenCPN, and SignalK for some remote displays. Thinking about pypilot but that will probably be next winter.

Forum Jump:

Users browsing this thread: 1 Guest(s)