containers: add flutter demo profile
https://onedigi.atlassian.net/browse/DEL-10050 Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
parent
efb20ef387
commit
4dba2c617b
|
|
@ -74,7 +74,7 @@ Set profile and naming in `conf/local.conf`:
|
|||
|
||||
```conf
|
||||
DISTRO_FEATURES:append = " virtualization"
|
||||
CONTAINER_TYPE = "webkit" # or: lvgl, base, custom profile
|
||||
CONTAINER_TYPE = "webkit" # or: lvgl, flutter, base, custom profile
|
||||
CONTAINER_NAME = "webkit-example"
|
||||
# PODMAN_TAG defaults to "${CONTAINER_NAME}-tag"
|
||||
```
|
||||
|
|
@ -107,6 +107,7 @@ Profile-specific behavior is controlled with:
|
|||
Current built-in profile examples:
|
||||
|
||||
- `container-lvgl`
|
||||
- `container-flutter`
|
||||
- `container-webkit`
|
||||
|
||||
You can add new profiles by appending variables with `:container-<name>` overrides.
|
||||
|
|
@ -232,6 +233,10 @@ containers/
|
|||
rootfs_files/
|
||||
configs_lxc/
|
||||
artifact/
|
||||
flutter/
|
||||
rootfs_files/
|
||||
configs_lxc/
|
||||
artifact/
|
||||
webkit/
|
||||
rootfs_files/
|
||||
configs_lxc/
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Placeholder metadata for flutter container artifacts.
|
||||
|
|
@ -0,0 +1 @@
|
|||
Placeholder changelog for flutter container artifacts.
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# LXC config for Flutter on CCIMX95.
|
||||
# Placeholders are replaced by the image recipe.
|
||||
lxc.arch = @LXC_ARCH@
|
||||
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs
|
||||
lxc.uts.name = @CONTAINER_NAME@
|
||||
|
||||
lxc.mount.auto = cgroup:mixed proc:mixed
|
||||
lxc.mount.entry = /sys sys none bind,create=dir
|
||||
lxc.mount.entry = tmpfs run tmpfs rw,nosuid,nodev,mode=0755,create=dir
|
||||
|
||||
# custom prompt
|
||||
lxc.environment = 'PS1=flutter-ccimx95:\w$ '
|
||||
|
||||
# no network
|
||||
lxc.net.0.type = empty
|
||||
|
||||
lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@
|
||||
lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir
|
||||
lxc.mount.entry = /dev/dri dev/dri none bind,create=dir
|
||||
lxc.mount.entry = /dev/input dev/input none bind,create=dir
|
||||
lxc.mount.entry = /dev/mali0 dev/mali0 none bind,create=file
|
||||
lxc.mount.entry = /dev/tty dev/tty none bind,create=file
|
||||
lxc.mount.entry = /dev/tty0 dev/tty0 none bind,create=file
|
||||
lxc.mount.entry = /dev/tty1 dev/tty1 none bind,create=file
|
||||
lxc.mount.entry = /dev/tty7 dev/tty7 none bind,create=file
|
||||
lxc.mount.entry = /run/udev run/udev none bind,ro,create=dir
|
||||
lxc.pty.max = 1024
|
||||
lxc.mount.entry = devpts dev/pts devpts rw,nosuid,noexec,relatime,mode=0620,ptmxmode=0666,newinstance 0 0
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# LXC config for Flutter on CCMP25.
|
||||
# Placeholders are replaced by the image recipe.
|
||||
lxc.arch = @LXC_ARCH@
|
||||
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs
|
||||
lxc.uts.name = @CONTAINER_NAME@
|
||||
|
||||
lxc.mount.auto = cgroup:mixed proc:mixed
|
||||
lxc.mount.entry = /sys sys none bind,create=dir
|
||||
lxc.mount.entry = tmpfs run tmpfs rw,nosuid,nodev,mode=0755,create=dir
|
||||
|
||||
# custom prompt
|
||||
lxc.environment = 'PS1=flutter-ccmp25:\w$ '
|
||||
|
||||
# no network
|
||||
lxc.net.0.type = empty
|
||||
|
||||
lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@
|
||||
lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir
|
||||
lxc.mount.entry = /dev/dri dev/dri none bind,create=dir
|
||||
lxc.mount.entry = /dev/input dev/input none bind,create=dir
|
||||
lxc.mount.entry = /dev/galcore dev/galcore none bind,create=file
|
||||
lxc.mount.entry = /dev/tty dev/tty none bind,create=file
|
||||
lxc.mount.entry = /dev/tty0 dev/tty0 none bind,create=file
|
||||
lxc.mount.entry = /dev/tty1 dev/tty1 none bind,create=file
|
||||
lxc.mount.entry = /dev/tty7 dev/tty7 none bind,create=file
|
||||
lxc.mount.entry = /run/udev run/udev none bind,ro,create=dir
|
||||
lxc.pty.max = 1024
|
||||
lxc.mount.entry = devpts dev/pts devpts rw,nosuid,noexec,relatime,mode=0620,ptmxmode=0666,newinstance 0 0
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
/etc/flutter-demo-init start
|
||||
|
||||
# Keep one foreground process alive; the demo wrapper backgrounds flutter-pi.
|
||||
exec sleep infinity
|
||||
|
|
@ -21,7 +21,7 @@ NO_RECOMMENDATIONS = "1"
|
|||
########################
|
||||
# Container profile
|
||||
########################
|
||||
# Select profile in local.conf (e.g. CONTAINER_TYPE = "lvgl" or "webkit").
|
||||
# Select profile in local.conf (e.g. CONTAINER_TYPE = "lvgl", "webkit" or "flutter").
|
||||
CONTAINER_TYPE ?= "base"
|
||||
OVERRIDES:append = ":container-${CONTAINER_TYPE}"
|
||||
|
||||
|
|
@ -145,3 +145,45 @@ IMAGE_INSTALL:append:container-webkit:ccmp25 = " \
|
|||
libvulkan-driver-gcnano \
|
||||
packagegroup-dey-x-linux-ai \
|
||||
"
|
||||
|
||||
########################
|
||||
# Container type customizations flutter
|
||||
########################
|
||||
CONTAINER_INIT_SCRIPT:container-flutter = "/start-flutter-demo.sh"
|
||||
CONTAINER_CREATE_ARGS_PODMAN:container-flutter:ccmp25 = " \
|
||||
--privileged \
|
||||
--network none \
|
||||
--tmpfs /dev/shm:rw,nosuid,nodev,mode=1777 \
|
||||
--device /dev/dri \
|
||||
--device /dev/input \
|
||||
--device /dev/galcore \
|
||||
--device /dev/tty \
|
||||
--device /dev/tty0 \
|
||||
--device /dev/tty1 \
|
||||
--device /dev/tty7 \
|
||||
--volume /run/udev:/run/udev:ro \
|
||||
--tty \
|
||||
"
|
||||
CONTAINER_CREATE_ARGS_PODMAN:container-flutter:ccimx95 = " \
|
||||
--privileged \
|
||||
--network none \
|
||||
--tmpfs /dev/shm:rw,nosuid,nodev,mode=1777 \
|
||||
--device /dev/dri \
|
||||
--device /dev/input \
|
||||
--device /dev/mali0 \
|
||||
--device /dev/tty \
|
||||
--device /dev/tty0 \
|
||||
--device /dev/tty1 \
|
||||
--device /dev/tty7 \
|
||||
--volume /run/udev:/run/udev:ro \
|
||||
--tty \
|
||||
"
|
||||
IMAGE_INSTALL:append:container-flutter = " \
|
||||
liberation-fonts \
|
||||
packagegroup-dey-flutter \
|
||||
"
|
||||
IMAGE_INSTALL:append:container-flutter:ccmp25 = " \
|
||||
gcnano-userland-multi-binary-stm32mp \
|
||||
libgles2-gcnano \
|
||||
"
|
||||
DISTRO_FEATURES:remove:container-flutter = " wayland"
|
||||
|
|
|
|||
Loading…
Reference in New Issue