Skip to content

main/devicepkg-utils: Add support for deviceinfo fragments

Nikita Travkin requested to merge TravMurav/pmaports:lk2nd-deviceinfod into master

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 combine kernel_cmdline_append values
  • Append collected kernel_cmdline_append values to the final kernel_cmdline
  • Source /etc/deviceinfo, completely overriding kernel_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)

Cc: @pabloyoyoista @Minecrell

Merge request reports