-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Add CDI generator for Wayland displays in (x)wayland images #1518
base: main
Are you sure you want to change the base?
Conversation
The Container Device Interface(CDI) is a specification supported by tools like Docker and Podman to more easily access hardware. Given the hardware-specific nature of our platform, this feature is generically useful to our users and should be enabled. Signed-off-by: Andy Doan <[email protected]>
This change introduces logic to generate a CDI definition for the Weston display created at boot. With CDI enabled in a container runtime like Docker, you could run Wayland apps with a command like: running: ``` docker run --rm -it --device=org.wayland/display=wayland-1 ubuntu ``` Signed-off-by: Andy Doan <[email protected]>
@ricardosalveti @EmbeddedAndroid - This is a rough idea of how we could start to use CDI to make accessing hardware inside containers easier. There are a couple of ways this could be done by I've chosen an approach that is:
We could totally change this, but I wanted to get a dialog started. |
@@ -5,3 +5,4 @@ DISTROOVERRIDES = "lmp:lmp-wayland" | |||
DISTRO_NAME = "Linux-microPlatform Wayland" | |||
|
|||
DISTRO_FEATURES:append = " wayland opengl vulkan" | |||
IMAGE_INSTALL:append:lmp-wayland = " wayland-cdi" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably move this to meta-lmp-base/recipes-samples/images/lmp-feature-docker.inc, and have it conditional to wayland (via DISTRO_FEATURES):
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland-cdi, '', d)}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Andy Doan <[email protected]>
We have a hard-to-remember way of running wayland applications inside Docker. By leveraging CDI we can make this much easier for users so that you could simply run:
and have all the correct bind-mounts and environment variables set inside the container.