Skip to content

Commit

Permalink
Merge pull request #515 from amartinz/device-info/halium-porting
Browse files Browse the repository at this point in the history
porting: configuring: DeviceInfo: explain how to override using bind-mount
  • Loading branch information
amartinz committed Jul 16, 2022
2 parents 29e4442 + d895670 commit aaa8124
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions porting/configure_test_fix/device_info/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ DeviceInfo

DeviceInfo allows to set device specific configuration, which can be accessed in an uniform way using `libdeviceinfo <https://gitlab.com/ubports/development/core/deviceinfo>`_.

Device specific overrides
-------------------------

Configuration files per device are located at ``/etc/deviceinfo/devices/[device].yaml``.
It will try to autodetect the correct configuration to load based on model of the device,
using android props for halium/android devices and dtb for native linux devices.
Expand All @@ -22,6 +25,9 @@ For example, the file for the Nexus 7 tablet (flo) would be located at ``/etc/de
PrimaryOrientation: Landscape
...

In case you can not add a new file to the rootfs, you can bind-mount ``/etc/deviceinfo/devices/halium.yaml``.
For a reference, see the `configuration bringup for bonito/sargo <https://github.com/fredldotme/android_device_google_bonito/commit/d0ca48aadcde0b74840c3394ac86042033d7f846>`_.

If no device specific configuration exists or a key is not specified for the device config, DeviceInfo will fallback to ``/etc/deviceinfo/default.yaml``.
Keep your configuration simple and try to not duplicate any entries, which are already defined in ``default.yaml``.

Expand Down

0 comments on commit aaa8124

Please sign in to comment.