boot: make .hwids PE section more flexible to cover more than DT one day
authorLennart Poettering <lennart@poettering.net>
Thu, 14 Nov 2024 22:02:55 +0000 (23:02 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 15 Nov 2024 15:40:43 +0000 (15:40 +0000)
commitbe6e599935cd5206d830e6337881031308e890e2
treec393c66e3bdb7b51a9261d102bd1d72c4039e191
parentbae936b418e08063b68c95f4df53c3cd4f70e881
boot: make .hwids PE section more flexible to cover more than DT one day

The proposal in https://github.com/systemd/systemd/pull/35091 suggests
that there are going to be more resources sooner or later that shall be
embeddable in a UKI, but are specific to some machine. The .hwids logic
as it is implemented right now is conceptually flexible enough to cover
that too (as long as the system has SMBIOS and thus CHIDs). Hence, let's
prepare the ground for a future (that might possibly never come, but
let's keep the door open) where the section can be reused for this
purpose.

The patch is really dumb ultimately. it just changes the initial field
in the "Device" struct to carry not just the size of it (as before) but
also a type indicator, that is for now fixed to 1, indicating DT blobs.

This breaks compatibility, hence this should get merged before we do the
v257 release, so that this is done properly before the first release
with .hwids.
src/boot/chid.c
src/boot/chid.h