linuxboot / heads

A minimal Linux that runs as a coreboot or LinuxBoot ROM payload to provide a secure, flexible boot environment for laptops, workstations and servers.
https://osresearch.net/
GNU General Public License v2.0
1.42k stars 186 forks source link

Add more detailed maintainer notes under README.md (oldconfig->defconfig->oldconfig) #1724

Open tlaurion opened 3 months ago

tlaurion commented 3 months ago

Discussed off channel (again) :

As of today, both linux and coreboot configs under config/* are kept as oldconfigs. Helpers were added under both modules/linux and modules/coreboot to switch from oldconfig<->defconfig.

Those helpers can be used through:

Why we currently keep configs as oldconfig:


Real life example to show importance #1723 showed:

This shows that coreboot changes in defconfigs

JonathonHall-Purism commented 3 months ago

Every time I do a coreboot update, I do the following

My boards virtually always are best off reflecting changes to defaults in upstream. So storing oldconfigs here is really not helpful, it introduces possible errors (e.g. Mini v2 recently changed the SoC selected to support both CML v1 and v2, I knew to check for this change in Heads because I did the upstream change too).

Having oldconfigs in tree was originally intended to allow easy comparison of the actual config values used for different boards. We could possibly address that by emitting the full configs in CI logs, so you don't have to build all the boards to see the oldconfigs.

It's true though that in the case above, taking the new default from coreboot caused a brick (I'm not sure of the details, but I do see the RESOURCE_ALLOCATION_TOP_DOWN defaults flapping a bit in the history).

I think though that more often, we do want to take the defaults. In the same update, several other changes to configs were needed (https://github.com/linuxboot/heads/pull/1723/commits - see commit history) - I don't think anybody has checked whether those changes reflect the new defaults or not. In other words, would most of those commits have been unnecessary if we were storing defconfigs?

That's where I am on this. Next round of coreboot updates, I think we should try comparing both approaches.

tlaurion commented 3 months ago

Caused brick and build issues : removing Intel Wi-Fi support bricked dasharo coreboot fork nv41 and ns50 and needed urgent commit https://github.com/linuxboot/heads/pull/1735