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

Classic redesign #95

Closed jawn-smith closed 1 year ago

jawn-smith commented 1 year ago

This is done to source the initrd and kernel from the rootfs, removing duplication between the gadget and flash-kernel. This will only work with ubuntu-image >= 3.0.

waveform80 commented 1 year ago

I've tested this out now, but I'm rather confused:

vmlinuz and initrd.img appear on the boot partition; that's fine. But so do vmlinuz-5.19.0-1002-raspi and initrd.img-5.19.0-1002-raspi also appear on the boot partition? Is this what's meant by "removing duplication between the gadget and flash-kernel"?

My concern is that those files don't normally live there, no package will own them (so nothing will ever prune them as the kernel upgrades), flash-kernel will ignore them (so they're effectively useless), and they take up a significant amount of space on a space-limited partition. I do acknowledge this commit also bumps the size of the boot partition, that doesn't help upgraders.

waveform80 commented 1 year ago

Okay, this is close enough to go with. I've got one more change I'd like to see, but also a bunch of other changes to merge to handle cloud-init deprecations in kinetic, so I'm going to squash merge this (a lot of the commits are redundant at this point and the final diff is simple enough to be one commit), then I'll merge my stuff on top.

waveform80 commented 1 year ago

This is now merged and I've made the last changes I wanted to see on the top (I've tested these locally too with a kinetic build; haven't re-done the jammy test build yet but an earlier iteration worked nicely).

I've also pushed my latest changes to the classic branch and tested (locally) that the two still merge with zero conflicts (which they do). I haven't executed that merge on this repo though, just in case it steps on anything else you've got in the pipeline.