Skip to content

Commit

Permalink
Updates from scarthgap
Browse files Browse the repository at this point in the history
-update from scarthgap
-resolves meta-flutter#538

Signed-off-by: Joel Winarske <[email protected]>
  • Loading branch information
jwinarske committed Oct 31, 2024
1 parent ae2576a commit 4b21100
Show file tree
Hide file tree
Showing 265 changed files with 5,341 additions and 3,258 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@

__pycache__
.pyc

.dart
archive

.idea
158 changes: 158 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,163 @@
# Changelog

Oct 30, 2024
1. Feature parity with scarthgap

Oct 17, 2024
1. Sony: roll + conditional libuv support
2. Sony: flutter-external-texture-plugin: patch added

Oct 16, 2024
1. flutter-engine: musl cleanup

Oct 15, 2024
1. aarch64 - freetype2 depend
2. Flutter 3.24.3
3. Dart SDK 3.5.3
4. Roll meta-flutter-apps

Oct 14, 2024
1. enable flutter-engine build without wayland
2. build with musl libc

Oct 3, 2024
1. retain partial sync on fetch error

Sep 28, 2024
1. Do not copy parent directories in archive_pub

Sep 10, 2024
1. fix for pub git fetching from secure repos

Sep 9, 2024
1. unique archive name using md5 of app root (directory)
2. APP_CONFIG variable. Installs string value as config.toml to bundle root.

Sep 8, 2024
1. Flutter SDK 3.24.2
2. dart SDK 3.5.2
3. ivi-homescreen/flutter-auto - rive-text plugin

Sep 6, 2024
1. Update ivi-homescreen-plugins for ivi-homescreen and flutter-auto
2. rive-text 0.4.11

Sep 3, 2024
1. Backout pubspec archiver
2. enforce lockfile
3. roll meta-flutter-apps
4. use PUBSPEC_IGNORE_LOCKFILE="1" as default for all rolled recipes
5. Add flutter sdk apps
6. revise flutter-sdk-native caching
7. roll ivi-homescreen/flutter-auto; filament-view updates

Aug 20, 2024
1. flutter-engine GPU symbol export patch
2. ivi-homescreen/flutter-auto set logging level to debug if !NDEBUG
3. Flutter SDK 3.24.1

Aug 16, 2024
1. ivi-homescreen EGL backend alpha transparency fix
2. env cleanup in common.inc
3. do_restore_pub_cache add --enforce-lockfile
4. improve concurrent archive fetch

Aug 15, 2024
1. add layer dependencies
2. file locking for DL_DIR write files

Aug 14, 2024
1. missing include python3-dir to common.inc

Aug 13. 2024
1. caching pub fetcher v1
2. auto-roll apps; known build breaks on gallery and super-dash

Aug 12, 2024
1. pubspec tool supports hosted and git sources

Aug 11, 2024
1. pubspec.py tool
Enable pre-populating DL_DIR via generic options
Walk folder specified by --input
Restore step if --restore used
2. tools folder linter updates
3. roll recipes

Aug 10, 2024
1. pubspec.py tool
pub cache package archiver functional unit test

Aug 9, 2024
1. flutter app build update - unique to 3.24.0
2. added missing app_root definitions in common.inc
3. tools/roll_meta_flutter.py - add support for `compiler_requires_network` key
4. remove non-building apps
5. ivi-homescreen/flutter-auto WDT phase I
6. remove pdf from ivi-homescreen default package config; due to riscv64
7. ivi-homescreen - add missing comma in build flags for pdf packageconfig
8. flutter aot generation version agnostic

Aug 8, 2024
1. add channel option to roll_meta_flutter.py
2. roll_meta_flutter.py now updates dart-sdk recipe

Aug 7, 2024
1. Flutter SDK 3.24.0
2. Dart SDK 3.5.0
3. Roll flutter-pi

Aug 6, 2024
1. flutter-engine
- riscv64 support - requires clang-layer or will be ignored
- uses external clang toolchain if clang-layer present
- link everything with ldd. Required for RISC-V
- Vulkan DRM support via dynamic "vulkan_header" config
- only check for x11 package if x11 is in DISTRO_FEATURES
- do_install refactor
- shared module .debug files install to -dbg package
2. flutter-auto/homescreen
- vulkan-headers submodule

Aug 4, 2024
1. Dart SDK 3.4.4

Aug 1, 2024
1. Roll to Flutter SDK 3.22.3
2. ivi-homescreen/flutter-auto v2 Notify Display Update support

Jul 30, 2024
1. ivi-homescreen/flutter-auto v2 fix bad_optional_access

Jul 29, 2024
1. Roll ivi-homescreen v2 and flutter-auto v2

Jul 9, 2024
1. Discord Server

Jul 4, 2024
1. flutter-engine patch/patch rework for 3.22.2
2. remove unused patches from tools
3. set BBFILE_PRIORITY_meta-flutter correctly

Jul 3, 2024
1. roll_meta_flutter.py tool. See tools/README.md
2. correct ivi-homescreen executable name to `homescreen`

June 28, 2024
1. v2 - restore app_on_output callback assignment for AGL client
2. v2 - change ENABLE_AGL_CLIENT to ENABLE_AGL_SHELL_CLIENT

June 27, 2024
1. v2 - update package config flags
2. v2 - remove install of libwayland-gen.a from waypp
3. v2 - remove use of `find_package(OpenGL` in waypp.

June 26, 2024
1. Roll v2 - waypp/libliftoff + examples, plugin updates
2. v2 - remove file-selector from package cfg default as it depends on meta-gnome
3. v2 - add package config flag for v2 examples (waypp+libliftoff)

May 20, 2024
1. Roll v2 - cleanup plugin_common

Expand Down
74 changes: 43 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Yocto Layer for Google Flutter related projects.

### Discord Server https://discord.gg/cBkecwT65Q

### Recommended development flow

* Create a flutter workspace using [flutter_workspace.py](https://github.com/meta-flutter/workspace-automation/blob/main/flutter_workspace.py)
Expand All @@ -17,20 +19,20 @@ Yocto Layer for Google Flutter related projects.

### Flutter Application recipe variables

| Variable | Description |
| Variable | Description|
|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `FLUTTER_APPLICATION_PATH` | This is the path relative to the root of the repository. Override in your application recipe. |
| `FLUTTER_PREBUILD_CMD` | If set will run before Flutter build step. |
| `PUB_CACHE_EXTRA_ARCHIVE_CMD` | Command that is run prior to archive step of pub cache fetch. e.g. melos bootstrap. |
| `PUB_CACHE_EXTRA_ARCHIVE_PATH` | Appends a path to `$PATH` which affects `PUB_CACHE_EXTRA_ARCHIVE_CMD` |
| `APP_AOT_EXTRA` | Allows passing dart defines to AOT step. e.g. `-DFLUTTER_APP_FLAVOR=prod`. |
| `APP_AOT_ENTRY_FILE` | Allows overriding the entry file. Default is `main.dart`. |
| `APP_GEN_SNAPSHOT_FLAGS` | Additional flags to pass to gen_snapshot. Default is `--obfuscate`. |
| `FLUTTER_APP_RUNTIME_MODES` | Allows overriding modes that install app. Default is `release`. |
| `FLUTTER_APPLICATION_INSTALL_PREFIX` | Install prefix for flutter application install. Overriding enables installing into user directory. Default is `${datadir}/flutter`. |
| `FLUTTER_APPLICATION_INSTALL_SUFFIX` | Install suffix for flutter application install. Default is "${PUBSPEC_APPNAME}". |
| `PUBSPEC_IGNORE_LOCKFILE` | Delete the `pubspec.lock` file during the build process |
| `PUBSPEC_ENFORCE_LOCKFILE` | Run `flutter pub get` with the `--enforce-lockfile` flag, preventing dependencies from being upgraded during build` |
| `FLUTTER_APPLICATION_PATH` | This is the path relative to the root of the repository. Override in your application recipe.|
| `FLUTTER_PREBUILD_CMD` | If set will run before Flutter build step.|
| `PUB_CACHE_EXTRA_ARCHIVE_CMD` | Command that is run prior to archive step of pub cache fetch. e.g. melos bootstrap.|
| `PUB_CACHE_EXTRA_ARCHIVE_PATH` | Appends a path to `$PATH` which affects `PUB_CACHE_EXTRA_ARCHIVE_CMD`|
| `APP_AOT_EXTRA` | Allows passing dart defines to AOT step. e.g. `-DFLUTTER_APP_FLAVOR=prod`.|
| `APP_AOT_ENTRY_FILE` | Allows overriding the entry file. Default is `main.dart`.|
| `APP_GEN_SNAPSHOT_FLAGS` | Additional flags to pass to gen_snapshot. Default is `--obfuscate`.|
| `FLUTTER_APP_RUNTIME_MODES` | Allows overriding modes that install app. Default is `release`.|
| `FLUTTER_APPLICATION_INSTALL_PREFIX` | Install prefix for flutter application install. Overriding enables installing into user directory. Default is `${datadir}/flutter`.|
| `FLUTTER_APPLICATION_INSTALL_SUFFIX` | Install suffix for flutter application install. Default is "${PUBSPEC_APPNAME}".|
| `PUBSPEC_IGNORE_LOCKFILE` | Deletes pubspec.lock file if present. Used in case where lock file does not build.|
| `APP_CONFIG` | toml file to install into bundle folder. File will be installed as config.toml in the bundle root.|

### Supported Engine Variants

Expand All @@ -39,6 +41,14 @@ Yocto Layer for Google Flutter related projects.
* release
* jit_release

## Required Layers
* core
* meta-python
* openembedded-layer

## Recommended Layers
* clang-layer

## Dynamic Layers

* clang-layer
Expand All @@ -50,7 +60,7 @@ Zenity is used for fileselector plugin on ivi-homescreen. To enable this add me
## Overview

Target BSP is expected to have a GPU with OpenGLES v2.0+ support.
If you selecting a part go with v3.0+, ideally one with Vulkan support.
If you are selecting a part go with v3.0+, ideally one with Vulkan support.

## Notes

Expand Down Expand Up @@ -94,10 +104,13 @@ Note: when using SDK you may need to add the following after installation:

## General Yocto Notes

When building on systems with GCC version > than uninative in Yocto distro add the following to conf/local.conf
* When building on systems with GCC version > than uninative in Yocto distro add the following to conf/local.conf

INHERIT:remove = "uninative"


* The initial fetch with Flutter build will download over 14GB of source code. Running `bitbake -C cleanall flutter-engine` will clear the download cache. However, if an error occurs, the download cache remains intact, allowing you to resume the fetch later.

## Flutter Workspace Automation

Please visit [here](https://github.com/meta-flutter/workspace-automation).
Expand Down Expand Up @@ -132,31 +145,30 @@ Test gallery app
cd gallery
flutter run -d linux

## Process to Auto Roll Flutter Applications
## Process to Auto Roll Flutter Applications, Flutter SDK version, and Dart-SDK recipe

Origin of truth for Flutter Applications:
git clone https://github.com/meta-flutter/meta-flutter
cd meta-flutter

conf/include/flutter-apps.json
channel `stable`

Example roll
tools/roll_meta_flutter.py

cd /mnt/raid10
git clone https://github.com/meta-flutter/meta-flutter
git clone https://github.com/meta-flutter/workspace-automation
cd workspace-automation
./roll_meta_flutter.py --path /mnt/raid10/meta-flutter --json /mnt/raid10/meta-flutter/conf/include/flutter-apps.json --patch-dir=/mnt/raid10/workspace-automation/patches
channel `beta`

tools/roll_meta_flutter.py --channel=beta

channel `dev`

tools/roll_meta_flutter.py --channel=dev

## Process to update Flutter SDK version
specific version

1. Follow process to Auto Roll Flutter Applications. This step provides the latest `conf/include/releases_linux.json`
2. Review `conf/include/releases_linux.json` to determine the Flutter SDK stable version.
3. Update `conf/include/flutter-version.inc` with updated stable version.
4. Determine version of Dart SDK for stable channel and update recipe `recipes-devtools/dart/dart-sdk_x.x.x.bb`
5. Update `recipes-platform/images/app-container-user/dev_profile`
tools/roll_meta_flutter.py --version=2.40.0

## conf/include/flutter-apps.json

This file is the origin of truth for all of the Flutter Applications present in this layer, and is consumed by [roll_meta_flutter.py](https://github.com/meta-flutter/workspace-automation/blob/main/roll_meta_flutter.py).
This file is the origin of truth for all of the Flutter Applications present, and is used by tools/roll_meta_flutter.py.

roll_meta_flutter.py autogenerates all of the flutter application recipes.

Expand Down
2 changes: 1 addition & 1 deletion classes/cipd-fetcher.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DEPENDS += " \

CURL_CA_BUNDLE ??= "${STAGING_DIR_NATIVE}/etc/ssl/certs/ca-certificates.crt"
DEPOT_TOOLS ??= "${STAGING_DIR_NATIVE}/usr/share/depot_tools"
PYTHON3_PATH ??= "bootstrap-2@3.11.6.chromium.30_bin/python3/bin"
PYTHON3_PATH ??= ".cipd_bin/3.11/bin"
VPYTHON_VIRTUALENV_ROOT ??= "${WORKDIR}/vpython"
do_fetch[depends] += " \
ca-certificates-native:do_populate_sysroot \
Expand Down
2 changes: 1 addition & 1 deletion classes/gn-fetcher.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DEPENDS += " \
CURL_CA_BUNDLE ??= "${STAGING_DIR_NATIVE}/etc/ssl/certs/ca-certificates.crt"
DEPOT_TOOLS ??= "${STAGING_DIR_NATIVE}/usr/share/depot_tools"
VPYTHON_VIRTUALENV_ROOT ??= "${WORKDIR}/vpython"
PYTHON3_PATH ??= "bootstrap-2@3.11.6.chromium.30_bin/python3/bin"
PYTHON3_PATH ??= ".cipd_bin/3.11/bin"
EXTRA_GN_SYNC ??= ""
GN_CUSTOM_VARS ??= "{}"
GN_DEPS_FILE ??= "DEPS"
Expand Down
4 changes: 2 additions & 2 deletions conf/include/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def get_archive_pub_cache_environment(d, pub_cache, flutter_sdk):
Returns environment to use with archive pub caching
"""
PUB_CACHE_EXPORT_VARS = [
'HOME', 'PATH',
'PATH',
'HTTP_PROXY', 'http_proxy',
'HTTPS_PROXY', 'https_proxy',
'FTP_PROXY', 'ftp_proxy',
Expand Down Expand Up @@ -237,7 +237,7 @@ python do_archive_pub_cache() {
run_command(d, 'flutter pub get --enforce-lockfile', app_root, env)
run_command(d, 'flutter pub get --enforce-lockfile --offline', app_root, env)

cp_cmd = f'mkdir -p {pub_cache}/.project | true; cp -r .* {pub_cache}/.project/ | true;'
cp_cmd = f'mkdir -p {pub_cache}/.project | true; cp -rT . {pub_cache}/.project/ | true;'
run_command(d, cp_cmd, app_root, env)

bb_number_threads = d.getVar("BB_NUMBER_THREADS", multiprocessing.cpu_count()).strip()
Expand Down
2 changes: 2 additions & 0 deletions conf/include/dart-revision.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@
"3.24.0-0.2.pre": "3.5.0 (build 3.5.0-323.2.beta)",
"3.24.1": "3.5.1",
"3.24.2": "3.5.2",
"3.24.3": "3.5.3",
"3.25.0-0.1.pre": "3.6.0 (build 3.6.0-149.3.beta)",
"3.26.0-0.1.pre": "3.6.0 (build 3.6.0-216.1.beta)",
"3.3.0": "2.18.0",
"3.3.0-0.0.pre": "2.18.0 (build 2.18.0-271.2.beta)",
"3.3.0-0.1.pre": "2.18.0 (build 2.18.0-271.4.beta)",
Expand Down
4 changes: 3 additions & 1 deletion conf/include/engine-revision.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
"3.13.0-0.4.pre": "73d89ca7c5a20cbddde69ab1a6dff8fe3ecbfd70",
"3.13.1": "b20183e04096094bcc37d9cde2a4b96f5cc684cf",
"3.13.2": "b20183e04096094bcc37d9cde2a4b96f5cc684cf",
"3.13.3": "b8d35810e91ab8fc39ba5e7a41bff6f697e8e3a8",
"3.13.3": "17a711a7765a198264b20d8c4983f2f6f1271271",
"3.13.4": "9064459a8b0dcd32877107f6002cc429a71659d1",
"3.13.5": "bd986c5ed20a62dc34b7718c50abc782beae4c33",
"3.13.6": "a794cf2681c6c9fe7b260e0e84de96298dc9c18b",
Expand Down Expand Up @@ -252,7 +252,9 @@
"3.24.0-0.2.pre": "6e4deceb3802049388e167e3b14fda5843ad16e6",
"3.24.1": "c9b9d5780da342eb3f0f5e439a7db06f7d112575",
"3.24.2": "a6bd3f1de158bb61090e0c8053df93a10cb548e1",
"3.24.3": "36335019a8eab588c3c2ea783c618d90505be233",
"3.25.0-0.1.pre": "062b3a72fcbe76296ce19b02f58c03ba0cbb0dcf",
"3.26.0-0.1.pre": "059e4e6d8ff6de39c29441c53e949bfb0bf17972",
"3.3.0": "5e9e0e0aa8be4ff69facadd706b713f0bb54d5b3",
"3.3.0-0.0.pre": "1388adb442192ce155630eeb6806b74db07dd15e",
"3.3.0-0.1.pre": "fd131c385ee2a2d0484c49ed859911798e4e177b",
Expand Down
2 changes: 1 addition & 1 deletion conf/include/flutter-version.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2020-2023 Joel Winarske. All rights reserved.
#

FLUTTER_SDK_TAG ??= "3.24.2"
FLUTTER_SDK_TAG ??= "3.24.3"

def get_flutter_archive(d):
return _get_flutter_release_info(d, "archive")
Expand Down
Loading

0 comments on commit 4b21100

Please sign in to comment.