Comment 1 for bug 1910094

Revision history for this message
Dave Jones (waveform) wrote :

Tracked this down to the u-boot version currently used in the gadget snap having a limit of 16 args per hush command (hush being the intrepreter in u-boot). I have a nasty feeling I must've verified the original patch with a custom u-boot build accidentally as 16 is the default (sorry!).

I've uploaded patched builds of u-boot (which bump the arg limit to 64) to the following PPA (with variants for bionic, focal, groovy, and hirsute):

https://launchpad.net/~waveform/+archive/ubuntu/uboot/+packages

These also build on the recent patches for CM4, and the Pi4 8Gb patches which are currently in -proposed so I'll try and chase down an archive-admin to reject the current -proposed versions and get these sponsored. In the meantime, if you wish to verify the patch yourself, you can grab the u-boot-rpi package from the above PPA (the bionic release would be the one used in building the gadget), and replace uboot_rpi_*.bin on boot partition of your image with the corresponding usr/lib/u-boot/rpi_*/u-boot.bin.

I've done this locally and confirmed the resulting image still boots, is capable of serializing its state to uboot.env (excluding serial#, ethaddr, and usbethaddr), and successfully reboots afterward on several different pi models but obviously it'd good to verify this with your customized gadget too.