Raspberry Compute Module 3 Plus - 8 GB eMMC

We have our own custom board based on the Raspberry Pi CM3 Plus module that will use 8GB of eMMC memory.
I would like to use BalenaOS as a main OS.
Does BalenaOS support CM3+ with eMMC?

Any help is appreciated.

Thanks

Any help?

Hi @rlev,

our board, balenaFin is based on the Raspberry Pi CM3, I can’t really say if your custom board will work with our balenaOS images, but I’ll route your question to the appropriate team and get back to you.

Best Regards,
Marios

I think that our balenaOS images for the balenaFin would boot but your board’s peripherals wouldn’t work. In order for balenaOS to fully work for your custom device a balenaOS integration should be implemented for this specific board. A repository that you might find interesting is this one https://github.com/balena-os/balena-raspberrypi/tree/master/layers/meta-balena-raspberrypi.

Also another case you might find interesting is the integration of community supported images for custom boards like this one https://github.com/balena-os/balena-raspberrypi/pull/303.

@mbalamat,

Thank you for help.
I will research your posted links.

Looking forward to hear from the rest of the Balena team on this matter.

Thanks

@mbalamat,

I have installed BalenaOS 2.43.0+rev1 for Raspberry Pi 3 B/B+ image in my Raspberry Compute Module 3 Plus and the custom board boots up. I have also added a usb to ethernet adapter to the custom board and I can see the eth0 interface gets up and I am able to get network connectivity.

My main goal is to add WiFi using a WiFi/BT CYW43455 module which will use SDIO to communicate with the RPi CM3 .
Using Raspian as main OS this can be done using overlays.
For example adding this line

dtoverlay=sdio,poll_once=off,sdio_overclock=25,gpios_34_39

to config.txt will set pins 34-39 to be used as SDIO interfaces and the wifi module will be recognized.

Is there any “overlay” approach like this supported in BalenaOS? or this kind of setting will require modifications at the kernel level?

Thank you.

Hi @rlev,

in balenaOS you can change device configuration options as such https://www.balena.io/docs/reference/OS/advanced/ .

Best Regards,
Marios

I have downloaded BalenaOS 2.43.0+rev1 Development version for Raspberry Pi 3 B/B+ image and burn it into a sd card.
Then I have mounted the sd card on a Linux machine and edited the config.txt file located at /resin-boot folder adding the next line :
dtoverlay=sdio,sdio_overclock=25,gpios_34_39

After this I have generated a new balena image file using the sd card just modified and using this new image file I have flashed the Compute Module 3 eMMC memory.

The system boots up normally but when I inspect the BalenaOS host using ssh I find that the file /resin-boot/config.txt was not modified and the line dtoverlay=sdio,sdio_overclock=25,gpios_34_39 was not added.

Any hints How to modify the BalenaOS config.txt file in the RPi Compute Module 3 eMMC?

ps: I have ssh into BalenaOS and tried to manually modify the /resin-boot/config.txt file directly using vi editor but the operation is not allowed because the file has Read-Only file system attributes :frowning:

Thanks you.

Hello,

The boot partition is mounted with read and write permissions in /mnt/boot, you should be able to edit /mnt/boot/config.txt.
I think your config.txt may have been overwritten.
You can use RESIN_HOST_CONFIG_dtoverlay to change the overlay settings from the dashboard in the “Device Configuration” section.
See https://www.balena.io/docs/reference/OS/advanced/#setting-device-tree-overlays-dtoverlay-and-parameters-dtparam

@zvin,

Thanks you for your response.

I have flashed the Compute Module 3 Plus with a BalenaOS 2.43.0+rev1 Development version for Raspberry Pi 3 B/B+ image.
The Compute Module is attached to the CM3IO Board.

Using a USB to ethernet adapter I can ssh into BalenaOS and modify the /mnt/boot/config.txt.
Before reboot I make sure the config.txt was indeed written and modified.
After reboot I see that the /mnt/boot/config.txt does not show any modification. Looks like is being rewritten to its previous values.

What is the proper way to modify in a persistant way the Compute Module config.txt file ?

Thank you.

Hi,
Is your device registered in balenaCloud or are you just using BalenaOS?

@afitzek,

For now I am just using BalenaOS as a Host OS but plan to create an app and register it on BalenaCloud.

Hi,
It might be the case that the supervisor is overwriting the config.txt, with the values the device had on it’s first boot. We will need to try to replicate this and will get back to you.

Hi,

I just tried to reproduce this on my own Fin/CM3 combo and the data persists fine. I used balenaOS 2.46.1+rev1 for the Pi 3 as my OS since 2.43 was pulled due to some other unrelated issues. I suggest that you try again with this newer version and see if it has any effect.

For the record, this is what I performed:

  • booted the device
  • SSH into the host from my LAN
  • changed #dtparam=spi=off to dtparam=spi=on
  • reboot
  • check; value is as I changed it

Hi @richbayliss,

For hardware I am using a Raspberry Pi Compute Module 3+ with 8 Gb of eMMC attached to a CM3 IO carrier board.

I am also planning to use a Cypress CYW43455 to add WiFi/Bluetooth.
This module will communicate with the CM3 module using :

  1. WIFI using SDIO interface Pins 34 to 39
  2. BLUETOOTH using UART0 interface pins 30 to 33 (tx,rx,cts,rts)

Using Raspian Lite
Point 1 can be accomplished adding dtoverlay=sdio,sdio_overclock=25,gpios_34_39 to /boot/config.txt
Point 2 will need a custom overlay dts file to compiled into a .dtbo

This method works on Raspian Lite. But our final goal is to use BalenaOS together with BalenaCloud.

I have tried balenaOS 2.46.1+rev1 for the Pi 3 as you suggested :

  • Flash balenaOS 2.46.1+rev1 using Etcher.
  • ssh into BalenaOS Host using a usb to ethernet adapter.
  • Modify /mnt/boot/config.txt adding the next line : dtoverlay=sdio,sdio_overclock=25,gpios_34_39
  • Make sure the /mnt/boot/config.txt was written before reboot.
  • Reboot.
  • cat /mnt/boot/config.txt shows no new setting being added. The config.txt was not modified at all :frowning:

Using Raspian I use “raspi-gpio” application to see the pins mapping after modifying config.txt
How can I do the same on balenaOS Host?

Thank you.

Just to confirm, did you try with balenaOS 2.46.1+rev1 as Rich suggested with your custom board, and if that works?

@sradevski,

Yes. I have tried balenaOS 2.46.1+rev1 for RPi3.
The board boots. But I am not able to modify persistently the “/mnt/boot/config.txt” file using SSH.
Each time I add a new line to the “config.txt” the new additions disappears after reboot.

I managed to reproduce the issue of changes not being persisted when remotely making changes, but making changes before the initial boot does work. Here are the detailed steps I took:

  1. Download balenaOS 2.46.1+rev1 from https://www.balena.io/os/ for RPI3
  2. Unzip the archive, and mount the image.
  3. Open config.txt inside the mounted image in an editor, and add dtoverlay=sdio,sdio_overclock=25,gpios_34_39 at the end of it, save the changes
  4. Add a connection file to system-connections for my WiFi
  5. After confirming the changes were saved correctly, flash the modified image using Etcher to an sd card
  6. Plug the SD card in my RPI3, and SSH into the device using balena ssh <ip-address>
  7. Check /mnt/boot/config.txt, confirming that the overlay line was present.
  8. Reboot the device, confirm the dtoverlay line was present.
  9. Change one of the config.txt values (disable_splash), save, confirm the change was preserved
  10. Reboot the device
  11. The disable_splash change was not preserved.

I would suggest downloading 2.46.1+rev1, mount it, and do the overlay changes before you boot the image, and let us know if that solves the issue.

@sradevski

After create a device (CM3) in the balenaCloud and downloaded and flashed balenaOS 2.46.1+rev1
I created a custom variable using the Dashboard. This approach works.

I will try your suggested approach of making changes in the overlay before booting the image, and let you know.

Thanks for your help.