Ubuntu core support

Hi!

I am trying to use ubuntu core for the balenaFin, I didn’t see anything else on the web for that so I figured I would open a topic here to get some help and share my progress. I was able to boot the default image provided for raspberry pi on the core, but it only detects the eth0 interface so I guess it lacks some drivers for the wifi.
Any documentation or tip would be greatly appreciated!

Hi @sytten . Welcome to the forum! I don’t know of anyone else that has tried this, but I think the first thing to check is that you have the correct dt-blob for the fin in your /boot partition. I believe if you copy the one from here: https://github.com/balena-io/balena-fin/tree/master/software/dt-blob/cam0_disp0 over the default on in ubuntu core, then it will enable all the hardware. The dt-blob should pull down the right pins, etc to enable wifi, leds, etc. You should then be able to look at dmesg for any wifi kernel modules failures after rebooting and that will help us figure out which modules are missing.

To add to Shaun’s response you may find you need to look at making a custom snap for the kernel + wifi module if it’s not included by default. You will need to have the DT-blob loaded though, so try that route first :+1:

Not the OP, but working with him :

  • The dt-blob that was referenced here seems to be for the camera and display setup mostly.
  • After investigating it seems there’s already the sd8887 binaries in the kernel snap (/firmware/mrvl/sd8887_uapsta.bin)

I’ve tried building a gadget snap which adds the overlay (the one from here https://github.com/balena-io/balena-fin/tree/master/software/overlay). Am I doing something wrong? Is the dt-blob that was posted originaly needed too?

As to let anyone know about it, i’ve figured this out :

  • First use https://github.com/snapcore/pi-gadget as the base for your gadget - this is the most updated one and does it for all the the Pi boards (2, 3, CM3)
  • Add the balena-fin.dtbo from the github repo into the boot-assets/overlays folder and the dt-blob.bin file into boot-assets (use snapcraft.yaml step “devicetrees” step to copy or use anyother method you like)
  • Modify the config.txt file in configs to have the following line : dtoverlay=balena-fin
  • Build it with snapcraft --target-arch=armhf (from a desktop)
  • Build an image using this as a reference : Board Enablement
  • As a model assertion for the image building I used this :
{
  "type": "model",
  "authority-id": "<store-id>",
  "brand-id": "<store-id>",
  "series": "16",
  "base": "core18",
  "model": "balena",
  "architecture": "armhf",
  "gadget": "pi",
  "kernel": "pi-kernel=18-cm3",
  "timestamp": "<date-time>"
}

Hi @cheroukee,

Very nice finding and thanks for posting it here.

We created a custom gadget if someone needs it: https://github.com/girardlariviere/CAIDO-balena-gadget/tree/balena