snapcore / pi-gadget

Universal pi (pi2,pi3,pi4,cm3,cm4 and future) gadget snap for Ubuntu Core and classic systems.
30 stars 60 forks source link

Device tree in gadget.yaml #61

Open rodmaz opened 3 years ago

rodmaz commented 3 years ago

We are having difficulties getting this image to run on Raspberry Pi 3 B. We haven't narrowed down the issue completely but something has caught our attention. Why does the gadget.yaml is referencing an old device tree (bcm2709-rpi-3-b-plus)? We expected to see a valid device tree in gadget.yaml, as defined here.

RuhanSA079 commented 3 years ago

@rodmaz I tracked down the issue to the kernel being pulled from the internet with the bug in the linux-raspi2 package, you can try specifying a kernel file in the model file, and getting the pi-kernel snap file from the official Ubuntu Core image (extracted, kpartx mount), and provide the snap file with --snap as a parameter of ubuntu-image.

As for the gadget, I think you just substitute the dtb name in the device tree. bcm2709-rpi-2-b: Pi 2B bcm2710-rpi-3-b: Pi 3B bcm2710-rpi-3-b-plus: Pi 3B+ and 3A+ bcm2710-rpi-cm3: Compute Module 3

I compiled the gadget with the bcm2710-rpi-3-b-plus device tree, and it was booting on a CM3+. (No idea why) I will change that to the cm3 dtb and build/flash.

Meulengracht commented 2 years ago

If this issue still persists, can you retry with latest pi-kernel and see if this still is an issue? The DTB is now updated when the kernel is updated.