Quantcast
Channel: balena Blog
Viewing all articles
Browse latest Browse all 35

Introducing Full Raspberry Pi 5 Support in balenaOS

$
0
0

We can’t think of a more appropriate announcement for “Pi Day” than our compatibility with the full Raspberry Pi 5 family of devices in balenaOS and balenaCloud. This extends to all of the various formats of the Pi 5:

  • Raspberry Pi 5 (2GB / 4GB / 8GB / 16GB of RAM)
  • Compute Module 5 (18 standard variants) along with the Compute Module 5 IO Board
  • Compute Module 5 (18 standard variants) on the Compute Module 4 IO Board
  • Raspberry Pi 500

In addition, balenaOS also supports using an M.2 NVMe drive as either the boot storage or as additional storage. (Except on the Raspberry Pi 500 which does not support M.2 devices)

When you add in support for these two storage options, along with all of the Raspberry Pi 5 variants listed above, that comes to a mind-boggling 81 possible different configurations of this one device alone on balenaOS to meet your IoT and edgeAI needs!

Provisioning the Raspberry Pi 5 on balenaOS

The balena OS images for some of the earlier Raspberry Pi models (such as the Raspberry Pi 3 and Pi 4) were broken out into different images for different hardware variants. However, we now have one image that covers all of the variants of the Raspberry Pi 5. It’s shown as “Raspberry Pi 5” in the device drop down and the “machine name/device type” is raspberrypi5.

When adding a device to your balena fleet, the instructions are currently shown for the standard Pi 5. If you’re using a Compute Module 5 with a CM4 or CM5 IO Board, you can follow these steps to provision your device:

  1. Fit the jumper to disable eMMC boot on J2 and connect the Raspberry Pi CM4/CM5 IO Board’s microUSB port to your PC. Power the board and use the usbboot utility to put the eMMC in mass storage mode.
  2. Write the balenaOS file you downloaded to the Raspberry Pi CM4/CM5 IO Board. We recommend using Etcher.
  3. Wait for writing of balenaOS to complete, then disconnect the power source and eMMC boot jumper.
  4. Remove and re-connect power to the Raspberry Pi CM4/CM5 IO Board to boot the device. It should appear in your balenaCloud dashboard within a few minutes.

NVMe storage

Using NMVe as additional storage

Most Raspberry Pi 5 variants (except for a few of the compute modules) will boot via the microSD card by default. If you have an M.2 NVMe drive attached as well, you can use that as additional storage for your device. 

Once your NVMe drive is attached and formatted, it will be up to your application to mount the drive and make use of it. You can find more information about this in our documentation regarding external media.

Flashing NVMe as the boot drive

You can also use an NVMe drive as a boot drive by flashing it with your downloaded and provisioned balenaOS image file using an NVMe/USB adapter (such as this one) and our Etcher software.

Another option if you don’t have an adapter at hand is to start with your Raspberry Pi 5 running Raspberry Pi OS from an SD card. (You can use the Raspberry Pi Imager to flash that OS onto the SD card.) Then use Raspberry Pi Imager (which is included in newer versions of the Raspberry Pi OS) to flash your provisioned balenaOS image onto the attached NVMe drive.

You can download a provisioned version of balenaOS from your balenaCloud dashboard when adding a new device. Simply select “Download balenaOS” from the dropdown next to the “Flash” button and download the file. 

On the Pi 5, open the Raspberry Pi Imager, select the Raspberry Pi 5 using the “Choose Device” button, then click “Choose OS” and scroll to the bottom of the list and select “Use custom”. Then select the balenaOS file you downloaded from the dashboard. Click on “Choose storage” and select your NVMe drive.

Once the drive has completed flashing, power down the Raspberry Pi 5, remove the SD card, and turn the device back on. It should boot from the NVMe drive and soon show up in your balenaCloud dashboard.

Compatibility Changes

The Raspberry Pi 5 by default uses a 16kb page size kernel for improved performance, as opposed to earlier versions which used a 4kb page size. This should only be an issue for balena users that need to add a Raspberry Pi 5 to a fleet that requires ARMv7 32 bit compatibility such as for a Pi 3. 

Most 32-bit ARM binaries are aligned to 4kb and the 16kb kernel on the Pi5 is not able to run them. Raspberry Pi OS solves this problem by shipping two different kernels (4kb and 16kb) and lets you downgrade by editing the config.txt file. At this moment balenaOS only ships a single, 16K kernel for the Pi5 and does not support downgrading to 4kb by adding kernel=kernel8.img to the config.txt file. In the future, we hope to have a similar ship-both-kernels solution.

Going further

The Raspberry Pi 5 opens up many new options for edge computing and IoT applications. With all of the varied hardware configurations now available on the balena platform, you can concentrate on your IoT or edgeAI application and leave the fleet management to us! 

As always, feel free to reach out to us with any questions or comments below, in our forums, or at hello@balena.io.

The post Introducing Full Raspberry Pi 5 Support in balenaOS appeared first on balena Blog.


Viewing all articles
Browse latest Browse all 35

Trending Articles