specs/bls: Add devicetree-dir key #198
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similarly to #123 this PR introduces provisions for automatic DTB selection, this time for BLS#1 boot entries.
This PR documents a new key - "devicetree-dir" that is supposed to be used by the bootloader to construct a full path to the dtb file.
A generic OS that wishes to target DeviceTree platforms may want to be able to automatically select a correct devicetree for any of supported devices. This may be useful for multiple reasons such as the target device not having any DT loaded (i.e. because it's a Qualcomm WoA device with horrid useless ACPI) or the device having a DT loaded but outdated (i.e. if it's a device with "some" DTB baked into firmware).
Having a "devicetree-dir" key allows the distribution to install a [kernel/initramfs/dtbs dir] combination for each available kernel while making sure "mismatched" dtb/kernel combinations won't be used and the user will always get the appropriate version of the dtb when they pick a boot entry, which is especially important considering many of those devices are actively developed and the usual expectation of both-ways-compatibility of devicetrees may not always hold.
Similar key is already supported in u-boot's extlinux.conf /pxe implementation [1], with names "fdtdir" and "devicetreedir". I've decided that adding a dash to this key makes more sense to be in line with the naming of other keys in the specification.
Reference implementation: systemd/systemd#40077
[1] https://source.denx.de/u-boot/u-boot/-/blob/master/boot/pxe_utils.c#L899-900