Code review comment for ~fisterra-team/fisterra/+git/nitrogen6x-gadget:18-classic

Revision history for this message
Ɓukasz Zemczak (sil2100) wrote :

I am slightly confused here.

First of all, and this regards both this 18-classic and the 18 branch of the gadget tree, but I was wondering if it was really needed to have different code for classic and core?
So currently we do something like that for the pi3, but this is a left-over from the times where the snappy team was working on the gadgets. Ideally we'd want to have one repository and branch for both core and classic. Meaning, one gadget code that could be built with `make` (or `snapcraft prime`) to get a compiled gadget tree to be used for building a classic image and, in the same way, just running `snapcraft` to build a gadget snap to be used for core. Currently we have those two separate branches because we're still working on 'integrating' those two into one code-base. It's a bit difficult with pi3 because we already have users using the old gadget snaps, and due to some design decisions, switching both core and classic to one common gadget requires some migration effort.

But for new platforms, I would prefer if we could do it the 'right way' and have just one gadget repository that would work for both core and classic cases. Would that be possible?

Also, it feels to me that these branches might be missing something! So for instance for a 'classic' gadget tree, I would expect to find a Makefile. In the best case I would like to see both the core and classic gadget code to provide a Makefile and use it to pull all the needed packages from the archives and install them in the right places. But this branch for instance has no Makefile. The snapcraft.yaml doesn't seem to have the 'gadget' target here for instance.

So basically, in the perfect scenario, we would want to have one gadget repository/branch that would work and have all that's needed for core and classic. Once one pulls the branch, as mentioned earlier, a `snapcraft` call on it should create a working snap and, for now, a call to `make` should result in a built gadget tree for ubuntu-image to consume. Basically `snapcraft` should use the Makefile as well + some additional steps that would be needed to get the snap prepared.
I understand the biggest challenge might be having one bootscript (uboot.env or boot.scr) that would support both core and classic. Dave from our team is working on that for pi3, so best if you could poke him for some advice. If it's not easily possible for some reason, I guess we could provide both boot.scr and uboot.env in the gadget repository and then just decide which one to use depending whether snapcraft is run or not.

review: Needs Information

« Back to merge proposal