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>
-## 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)
```
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}.
```
This builds AGL demo image that includes Flutter runtime={debug,profile,release}.
-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`
## `/usr/share/flutter/default.json`
After=agl-compositor.service
[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
-WantedBy=agl-session.target
+WantedBy=graphical.target
FILESEXTRAPATHS:prepend := "${THISDIR}/flutter-gallery:"
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"
- 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"
-SUMMARY = "Baseline Flutter Image for Development"
+require recipes-platform/images/agl-image-compositor.bb
+SUMMARY = "Baseline Flutter Image for Development"
-require agl-image-flutter.inc
-IMAGE_INSTALL:append = "\
weston-ini-conf-landscape \
\
flutter-auto-with-logging \
weston-ini-conf-landscape \
\
flutter-auto-with-logging \
-IMAGE_FEATURES:append = "\
+++ /dev/null
-require recipes-platform/images/agl-image-weston.inc
-
-IMAGE_INSTALL:append = "\
- agl-compositor \
- agl-compositor-init \
- packagegroup-agl-profile-graphical \
- "
-
-CLANGSDK = "1"
+++ /dev/null
-require ${@bb.utils.contains('AGL_FEATURES', 'agl-flutter', 'packagegroup-agl-graphical-weston_aglflutter.inc', '', d)}
+++ /dev/null
-RDEPENDS:${PN}:remove = "weston-init"
-
-RDEPENDS:${PN} += " \
- agl-compositor-init \
- "