Skip to content

Split the asteroid-launcher environment config into 3 files - #294

Open
FlorentRevest wants to merge 2 commits into
masterfrom
splitasteroidconfig
Open

Split the asteroid-launcher environment config into 3 files#294
FlorentRevest wants to merge 2 commits into
masterfrom
splitasteroidconfig

Conversation

@FlorentRevest

Copy link
Copy Markdown
Member

For now, the asteroid-launcher envvars are defined in /var/lib/environment/compositor/default.env and this file is overridden by all smartwatch layers.

This has caused some maintenance overhead because there are values which we would like to put in the environment of asteroid-launcher no matter the watch so those would have to be copied into each smartwatch layers. (that could be for features such as qtvirtualkeyboard and it's really awkward to modify smartwatch layers to make a new nistro feature work). Also, this has caused a lot of duplication, for example all hybris watches set a hwcomposer QPA which had to be copied 30 times when we could simply write it once in meta-asteroid based on whether the MACHINE inherits hybris-watch.

This change splits the environment into three files:

  • 00-default.conf: which applies to all watches
  • 10-platform.conf: which is either setting eglfs as QPA or hwcomposer, depending on whether the watch inherits hybrid-watch or not
  • 20-device.conf: which sets additional watch-specific envvars only if necessary

Additionally, to reduce the number of watch specific changes required, it uses a new syntax for the evdevtouch plugin such that Qt auto-discovers touch screens and therefore we don't need to manually find the evdev file backing the touchscreen on every port. This may cause some surprises and would be good to test on a few watches.

…-ins

Merge the single default.conf into three orthogonal drop-ins that
systemd reads in name order: 00-default.conf holds keys shared by every
device, 10-platform.conf selects the QPA platform (eglfs by default,
swapped to hwcomposer for hybris-machine watches), and machines override
the placeholder 20-device.conf with their port specifics via
FILESEXTRAPATHS. This removes the value duplication that came from every
device shipping a full copy of the shared and platform settings.
Move the touchscreen input plugin out of every device's LIPSTICK_OPTIONS
and into the service's ExecStart with no explicit event node: Qt's
evdevtouch plugin auto-discovers the touchscreen. Watches now list only
their extra input plugins (keyboard/mouse) in LIPSTICK_OPTIONS.
@FlorentRevest

Copy link
Copy Markdown
Member Author

This goes hand in hand with AsteroidOS/meta-smartwatch#331

@MagneFire

Copy link
Copy Markdown
Member

This should probably be checked but minnow uses the fbdev backend. This PR changes that to hwcomposer.

@FlorentRevest

Copy link
Copy Markdown
Member Author

Have you checked meta-minnow/recipes-asteroid/asteroid-launcher/asteroid-launcher-configs/20-device.conf in AsteroidOS/meta-smartwatch#331 ? Variables from 10-platform.conf can be overridden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants