aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2023-06-06 17:06:54 -0400
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-06-12 11:10:26 +0000
commit83bbf82c41de1d532a920fa42326c17f40ea172f (patch)
treefaadb04910185130d74f367cbb9407c77f7993c8
parent0ccbb175eb5efdb59d0231198b295a21e3c466db (diff)
meta-agl-flutter: update for meta-agl-core changes
Changes: - Pull in image .bb files instead of .inc files. - Use agl-image-compositor as the base image for agl-image-flutter. instead of the appending done to agl-image-weston and its packagegroup previously. - Rework flutter-gallery systemd unit to work again, and update our bbappend to install it as disabled as an option for starting up flutter-gallery in agl-image-flutter. It seems useful to keep it present to serve as an example of starting Flutter apps via systemd and using the agl-flutter-env package. - Some minor documentation updates in README.md. - Replace some :append usage with += to avoid creating problems for downstream users. Bug-AGL: SPEC-4813 Change-Id: I8a61d6365ce69ac50b88abc7bc451486b3e1b339 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-rw-r--r--meta-agl-flutter/README.md10
-rw-r--r--meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery/flutter-gallery.service9
-rw-r--r--meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery_aglflutter.inc28
-rw-r--r--meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb9
-rw-r--r--meta-agl-flutter/recipes-platform/images/agl-image-flutter.inc9
-rw-r--r--meta-agl-flutter/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bbappend1
-rw-r--r--meta-agl-flutter/recipes-platform/packagegroups/packagegroup-agl-graphical-weston_aglflutter.inc5
7 files changed, 24 insertions, 47 deletions
diff --git a/meta-agl-flutter/README.md b/meta-agl-flutter/README.md
index 84bbf260..ba017d15 100644
--- a/meta-agl-flutter/README.md
+++ b/meta-agl-flutter/README.md
@@ -1,14 +1,14 @@
# meta-agl-flutter
-## Steps to build `agl-demo-platform` image
+## Steps to build `agl-ivi-demo-platform-flutter` image
```
export AGL_TOP=$HOME/workspace_agl
mkdir -p $AGL_TOP && cd $AGL_TOP
repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo -b master
repo sync -j $(nproc)
- source meta-agl/scripts/aglsetup.sh -m qemux86-64 agl-demo agl-flutter
- bitbake agl-demo-platform
+ source meta-agl/scripts/aglsetup.sh -m qemux86-64 agl-demo
+ bitbake agl-ivi-demo-platform-flutter
```
This builds AGL demo image that includes Flutter runtime={debug,profile,release}.
@@ -57,9 +57,7 @@ Additional documentation available [here](https://github.com/meta-flutter/meta-f
## Startup Service
-If you include `flutter-gallery-init` it will install a systemd user service, which starts the Flutter Gallery on boot. This is not included in the minimal images.
-
-At runtime you can edit `/usr/share/flutter/default.json` to point to any Flutter bundle.
+This layer includes an example systemd user service for the Flutter Gallery application which is disabled by default. It can be used to start the application in the minimal image by doing 'systemctl start flutter-gallery'.
## `/usr/share/flutter/default.json`
diff --git a/meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery/flutter-gallery.service b/meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery/flutter-gallery.service
index 3d4ecbf1..80e31dda 100644
--- a/meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery/flutter-gallery.service
+++ b/meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery/flutter-gallery.service
@@ -3,8 +3,11 @@ Requires=agl-compositor.service
After=agl-compositor.service
[Service]
-ExecStart=/usr/bin/flutter-auto --j=/usr/share/flutter/default.json --b=/usr/share/flutter/gallery --f
-Restart=on-failure
+User=agl-driver
+EnvironmentFile=/etc/default/flutter
+EnvironmentFile=-/etc/default/flutter-gallery
+Environment=XDG_RUNTIME_DIR=/run/user/1001/
+ExecStart=/usr/bin/flutter-auto --b=/usr/share/flutter/gallery/${FLUTTER_VERSION}/${FLUTTER_RUNTIME} --f --window-type=BG
[Install]
-WantedBy=agl-session.target
+WantedBy=graphical.target
diff --git a/meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery_aglflutter.inc b/meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery_aglflutter.inc
index c618a2fe..61bcaa0e 100644
--- a/meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery_aglflutter.inc
+++ b/meta-agl-flutter/recipes-graphics/flutter-apps/flutter-gallery_aglflutter.inc
@@ -1,28 +1,18 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/flutter-gallery:"
-SRC_URI += " \
- file://flutter-gallery.service \
-"
+SRC_URI += "file://flutter-gallery.service"
-# To avoid conflicts with the systemd template scheme added via bbappend in
-# meta-agl-demo, package the standalone systemd unit separately. This is not
-# needed when meta-agl-flutter is used without meta-agl-demo, but that is not
-# going to be the default usecase for most users, so this still allows them to
-# build working agl-image-flutter images in the same build tree.
-#
-# This can be dropped if/when flutter-gallery is no longer packaged as a demo
-# in meta-agl-demo.
-
-#SYSTEMD_SERVICE:${PN}-init = "flutter-gallery.service"
+inherit systemd
do_install:append() {
- install -D -m 0644 ${WORKDIR}/flutter-gallery.service ${D}${systemd_user_unitdir}/flutter-gallery.service
- install -d ${D}${systemd_user_unitdir}/agl-session.target.wants
- ln -s ../flutter-gallery.service ${D}${systemd_user_unitdir}/agl-session.target.wants/flutter-gallery.service
+ install -D -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
}
-PACKAGE_BEFORE_PN += "${PN}-init"
+#FILES:${PN} += "${systemd_system_unitdir}"
-FILES:${PN}-init = "${systemd_user_unitdir}"
+RDEPENDS:${PN} += "agl-flutter-env"
-RDEPENDS:${PN}-init = "${PN}" \ No newline at end of file
+SYSTEMD_SERVICE:${PN} = "flutter-gallery.service"
+# Explicitly disable auto-start to avoid interferring with Toyota workspace
+# tooling usecase.
+SYSTEMD_AUTO_ENABLE:${PN} = "disable"
diff --git a/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb b/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb
index 37b0f4e6..8263c0ae 100644
--- a/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb
+++ b/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb
@@ -1,10 +1,11 @@
-SUMMARY = "Baseline Flutter Image for Development"
+require recipes-platform/images/agl-image-compositor.bb
+SUMMARY = "Baseline Flutter Image for Development"
LICENSE = "MIT"
-require agl-image-flutter.inc
+CLANGSDK = "1"
-IMAGE_INSTALL:append = "\
+IMAGE_INSTALL += "\
weston-ini-conf-landscape \
\
flutter-auto-with-logging \
@@ -17,6 +18,6 @@ IMAGE_INSTALL:append = "\
\
"
-IMAGE_FEATURES:append = "\
+IMAGE_FEATURES += "\
ssh-server-openssh \
"
diff --git a/meta-agl-flutter/recipes-platform/images/agl-image-flutter.inc b/meta-agl-flutter/recipes-platform/images/agl-image-flutter.inc
deleted file mode 100644
index defa5d27..00000000
--- a/meta-agl-flutter/recipes-platform/images/agl-image-flutter.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-require recipes-platform/images/agl-image-weston.inc
-
-IMAGE_INSTALL:append = "\
- agl-compositor \
- agl-compositor-init \
- packagegroup-agl-profile-graphical \
- "
-
-CLANGSDK = "1"
diff --git a/meta-agl-flutter/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bbappend b/meta-agl-flutter/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bbappend
deleted file mode 100644
index cd322729..00000000
--- a/meta-agl-flutter/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-require ${@bb.utils.contains('AGL_FEATURES', 'agl-flutter', 'packagegroup-agl-graphical-weston_aglflutter.inc', '', d)}
diff --git a/meta-agl-flutter/recipes-platform/packagegroups/packagegroup-agl-graphical-weston_aglflutter.inc b/meta-agl-flutter/recipes-platform/packagegroups/packagegroup-agl-graphical-weston_aglflutter.inc
deleted file mode 100644
index 2b91c177..00000000
--- a/meta-agl-flutter/recipes-platform/packagegroups/packagegroup-agl-graphical-weston_aglflutter.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-RDEPENDS:${PN}:remove = "weston-init"
-
-RDEPENDS:${PN} += " \
- agl-compositor-init \
- "