main/devicepkg-utils: Add support for deviceinfo fragments
This change introduces support for optional /etc/deviceinfo.d/ dir that can contain deviceinfo fragments. Those fragments are assembled by source_deviceinfo script.
Proposed behaviour is as follows:
- source
/usr/share/deviceinfo/deviceinfo
as-is - source files in
/etc/deviceinfo.d/*
and combinekernel_cmdline_append
values - Append collected
kernel_cmdline_append
values to the finalkernel_cmdline
- Source
/etc/deviceinfo
, completely overridingkernel_cmdline
, if present.
This approach allows the user-controlled /etc/deviceinfo
to either append new
cmdline keys to the collection created by base deviceinfo and fragments, or
override everything, including fragment values, by setting new kernel_cmdline
.
As an example of the usage, extend the soc-qcom-msm8916 package to add a fragment that would pass the rproc-mode value to lk2nd via cmdline. This approach will be used by the future lk2nd release.
See also: boot-deploy!48 (merged)