Update meta-flutter
[AGL/meta-agl-devel.git] / meta-agl-flutter / README.md
index 84bbf26..24929cc 100644 (file)
@@ -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}.
@@ -24,11 +24,59 @@ This builds AGL demo image that includes Flutter runtime={debug,profile,release}
     source meta-agl/scripts/aglsetup.sh -m qemux86-64 agl-devel agl-flutter
     bitbake agl-image-flutter
 ```
-  * include Flutter engine runtime={debug,release,profile}
+  * includes Flutter engine runtime={debug,release,profile}
   * includes Flutter Engine SDK
   * includes SSH server
   * live debugging/profiling with target via host
 
+## Useful Notes
+
+flutter-auto runs as user `agl-driver`.  After logging in as root you can delete password for `agl-driver`:
+```
+# passwd -d agl-driver
+```
+
+To track flutter-auto output:
+```
+# journalctl -ex -u flutter-homescreen -f
+```
+
+To view available Flutter programs in OS image:
+```
+ls -la /usr/share/flutter
+```
+
+To change Flutter program that runs on boot edit this file:
+```
+# vi /usr/lib/systemd/system/flutter-homescreen.service
+```
+
+To change device to run Gallery on reboot edit flutter-homescreen.service to:
+```
+ExecStart=/usr/bin/flutter-auto --b=/usr/share/flutter/gallery/${FLUTTER_VERSION}/${FLUTTER_RUNTIME} --j=/usr/share/flutter/flutter-homescreen.json --xdg-shell-app-id=homescreen
+```
+To enable experimental impeller support edit flutter-homescreen.service adding --enable-impeller:
+```
+ExecStart=/usr/bin/flutter-auto --b=/usr/share/flutter/gallery/${FLUTTER_VERSION}/${FLUTTER_RUNTIME} --j=/usr/share/flutter/flutter-homescreen.json --xdg-shell-app-id=homescreen --enable-impeller
+```
+
+After edits either run:
+```
+# systemctl daemon-reload
+# systemctl restart flutter-homescreen
+```
+or
+```
+# reboot
+```
+
+Collecting a stack trace for flutter-auto
+```
+# systemctl stop flutter-auto
+# export SPDLOG_LEVEL=trace
+# export XDG_RUNTIME_DIR=/run/user/1001/
+# gdb --args flutter-auto --b=/usr/share/flutter/gallery/<flutter version>/release/ --j=/usr/share/flutter/flutter-homescreen.json --xdg-shell-app-id=homescreen
+```
 
 ## Flutter Engine SDK
 
@@ -57,9 +105,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`
@@ -85,6 +131,11 @@ If qemu_run was sucessfully invoked, then this platform will be an available `cu
 
 Append `--device-id=AGL-qemu` to `flutter <cmd>` to select this device.
 
+### Flutter Engine
+
+To enable local build of Flutter Engine set `tools/configs/flutter-engine.json` load key to true.
+
+This enables debugging as custom engine development.
 
 ## Steps to Test Flutter Images