Issues with custom pi-gadget for UC20

Hey guys.
Can’t get the pi-gadget I built to load. Reverted basically to the same uc20 branch from github and built it and surprisingly it did not work again.

I unsquashfsed my snap and the one from the upstream and ran a diff on it. This is the result:

diff -r squashfs-root-canonical squashfs-root 
Binary files squashfs-root-canonical/boot-assets/boot.scr and squashfs-root/boot-assets/boot.scr differ
diff --color -r squashfs-root-canonical/boot-assets/config.txt squashfs-root/boot-assets/config.txt
4c4
< dtoverlay=vc4-fkms-v3d,cma-128
---
> dtoverlay=vc4-fkms-v3d,cma-256
33c33
< disable_splash=1
\ No newline at end of file
---
> disable_splash=1
Binary files squashfs-root-canonical/boot-assets/psplash.img and squashfs-root/boot-assets/psplash.img differ
Binary files squashfs-root-canonical/boot-assets/uboot_rpi_2.bin and squashfs-root/boot-assets/uboot_rpi_2.bin differ
Binary files squashfs-root-canonical/boot-assets/uboot_rpi_3_32b.bin and squashfs-root/boot-assets/uboot_rpi_3_32b.bin differ
Binary files squashfs-root-canonical/boot-assets/uboot_rpi_4_32b.bin and squashfs-root/boot-assets/uboot_rpi_4_32b.bin differ
Only in squashfs-root-canonical/snap: manifest.yaml
Only in squashfs-root-canonical/snap: snapcraft.yaml

The one from upstream has this file uboot_rpi_4_32b.bin dated 12 November with the binary size of 537072.
The one I have in my snap seems to be from February 11, 2020. And I thought maybe they are the reason. But after replacing them in my snap it still did not boot.

The other different file was boot.scr. I tried replacing it then in my snap with the one from upstream.
And it actually booted.
This is the diff output: https://hastebin.com/duzugisozu.bash

Another issue that is as severe - there is no splash screen (though maybe that’s because I copied boot.scr from the upstream pi-gadget and it has that disabled somewhere there Idk because it did not show ubuntu splash with the upstream gadget as well).

Any ideas what’s causing this? (building inside armhf ubuntu 20 docker image if that’s of any importance).

1 Like

Oh and now that image initialized my Qt app running with mesa v3d driver does not start. So I guess those bin files I have also need to be copied from the upstream version.

And when I flashed official image from Canonical (few weeks ago) there was no splash screen as well.

unfortunately until the pi gadget is fixed, you will need to manually add the snappy-dev/image PPA to your build system in order to get the right boot assets in place. As you noticed the one you built without the PPA got the wrong u-boot assets and thus won’t boot properly. I have a PR that will fix this so you can just build the gadget normally but I have not gotten around to addressing the feedback there, but will try to do so soon…

I believe this is expected, the work on adding a splash screen to uc20 has not been finished yet AIUI

Great, thanks! At this point, I was already trying to build directly on pi4 as well. But that did not work as well…

Great, I added the ppa to docker image and the image actually initializes and boots. Now the only thing left to find is why my app that’s using mesa v3d driver for displaying crashes. My snap just keeps crashing when it can’t create OpenGL surface.

It worked yesterday with my snap + copied binaries from the downloaded one.

unfortunately that’s a bit out of my line of expertise, perhaps someone like @ogra could comment (or ping the right people) who could comment on why this might be?

No problem, I actually just recently figured it out. Was kernel cmdline issue. One setting we used in 16 was breaking it.

Thanks for the help with getting the build done properly.

2 Likes

Hi. We have a uc20 project that requires a custom boot splash. Do we have a time frame for this? Thanks.

That’s a question for the foundations team, cc @xnox and @waveform

@xnox, @waveform, can you please comment. thanks.