{"id":18965379,"url":"https://github.com/sony/meta-flutter","last_synced_at":"2025-05-08T22:14:05.595Z","repository":{"id":38040567,"uuid":"375935529","full_name":"sony/meta-flutter","owner":"sony","description":"Yocto recipes for Flutter Engine and custom embedders","archived":false,"fork":false,"pushed_at":"2024-12-19T21:24:27.000Z","size":131,"stargazers_count":98,"open_issues_count":4,"forks_count":22,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-05-08T22:13:53.013Z","etag":null,"topics":["bitbake","flutter","flutter-engine","yocto","yocto-layer","yocto-meta"],"latest_commit_sha":null,"homepage":"","language":"BitBake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sony.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-11T07:06:09.000Z","updated_at":"2025-04-24T16:02:28.000Z","dependencies_parsed_at":"2023-12-02T06:25:02.795Z","dependency_job_id":"48a8d789-dcee-4284-9444-fb4c40d60afc","html_url":"https://github.com/sony/meta-flutter","commit_stats":null,"previous_names":[],"tags_count":78,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sony%2Fmeta-flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sony%2Fmeta-flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sony%2Fmeta-flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sony%2Fmeta-flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sony","download_url":"https://codeload.github.com/sony/meta-flutter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154977,"owners_count":21862623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbake","flutter","flutter-engine","yocto","yocto-layer","yocto-meta"],"created_at":"2024-11-08T14:29:08.181Z","updated_at":"2025-05-08T22:14:05.573Z","avatar_url":"https://github.com/sony.png","language":"BitBake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meta-flutter for Yocto Project\n\nThis project was created to build the [Embedded Linux (eLinux) embedding for Flutter](https://github.com/sony/flutter-embedded-linux) and [Flutter Engine](https://github.com/flutter/engine) for Yocto Project based distributions.\n\n### Repositories\n\n- [flutter-elinux](https://github.com/sony/flutter-elinux): Flutter tools for eLinux\n- [flutter-elinux-plugins](https://github.com/sony/flutter-elinux-plugins): Flutter plugins for eLinux\n- [flutter-embedded-linux](https://github.com/sony/flutter-embedded-linux): eLinux embedding for Flutter\n\n### Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Setup\n\nIn this README, we explain how to build for Arm64 using `core-image-weston` which is one of Yocto Images, and `kirkstone` which is one of LTS Yocto versions. See also: https://docs.yoctoproject.org/\n\n### Install requred tools\n\n```Shell:\n$ sudo apt install chrpath diffstat gawk lz4\n```\n\n### Setup Yocto\n\nThere are two ways to build using Yocto. One is [builds using bitbake](#build-using-bitbake) and the other is [builds using Yocto SDK](#build-using-yocto-sdk).\n\nDownloading `Poky`, `meta-clang`, and `meta-flutter`:\n\n```Shell\n$ git clone git://git.yoctoproject.org/poky.git -b kirkstone\n$ git clone https://github.com/kraj/meta-clang -b kirkstone\n$ git clone https://github.com/sony/meta-flutter.git\n```\n\nSetup the build environment using `oe-init-build-env` script in Poky:\n```Shell\n$ source poky/oe-init-build-env build\n```\n\nSet the target machine in `conf/local.conf`:\n```\nMACHINE ?= \"qemuarm64\"\n```\n\nAdd `meta-clang` layer to `conf/bblayers.conf`:\n```Shell\n$ bitbake-layers add-layer ../meta-clang\n```\n\nAdd `meta-flutter` layer to `conf/bblayers.conf`:\n```Shell\n$ bitbake-layers add-layer ../meta-flutter\n```\n\n### Build Yocto SDK (Only when using cross-building with Yocto SDK)\n\nAdd the following in your `conf/local.conf`:\n```\nCLANGSDK = \"1\"\n```\nSee also: [Adding clang in generated SDK toolchain](https://github.com/kraj/meta-clang/blob/master/README.md#adding-clang-in-generated-sdk-toolchain)\n\nBuild Yocto SDK for cross-building:\n```Shell\n$ bitbake core-image-weston -c populate_sdk\n```\nSee also: [SDK building an sdk installer](https://www.yoctoproject.org/docs/2.1/sdk-manual/sdk-manual.html#sdk-building-an-sdk-installer)\n\nInstall Yocto SDK:\n```Shell\n$ ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-qemuarm64-toolchain-3.1.7.sh\n```\n\n## Build using bitbake\n\n### Flutter Engine (libflutter_engine.so)\n\nThe default build targets are fixed to Linux, Arm64, and the following Flutter Engine version in the config file.\n\n```\nENGINE_VERSION ?= \"cb4b5fff73850b2e42bd4de7cb9a4310a78ac40d\"\n```\n\nWhen creating a Flutter project, you will need to use the following version of the Flutter SDK.\n\n| Engine version | Flutter SDK version |\n| :-------------: | :-------------: |\n| [cb4b5fff73850b2e42bd4de7cb9a4310a78ac40d](https://github.com/flutter/engine/commit/cb4b5fff73850b2e42bd4de7cb9a4310a78ac40d) | [3.27.1 (stable channel)](https://github.com/flutter/flutter/releases/tag/3.27.1) |\n\nIf you want to change the version of the Flutter engine, change \u003cengine_version\u003e to the appropriate version of the Flutter SDK and add the following to `conf/local.conf`:\n```\nENGINE_VERSION_pn-flutter-engine = \"\u003cengine_version\u003e\"\n```\n\n#### Flutter Engine mode\n\nFlutter Engine is built with release mode by default. If you want to change the build mode, you can change it to add the following in your `conf/local.conf`:\n\n```\n# e.g. debug mode\nPACKAGECONFIG_pn-flutter-engine = \"debug-mode\"\n```\n\n### Wayland backend\n\n```Shell\n$ bitbake flutter-wayland-client\n```\n\n### DRM-GBM backend\n\n`libsystemd` is required to build this backend. Put the following in your `conf/local.conf`: \n\n```\nDISTRO_FEATURES:append = \" systemd\"\n```\nSee also: [Using systemd for the Main Image and Using SysVinit for the Rescue Image](https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#using-systemd-for-the-main-image-and-using-sysvinit-for-the-rescue-image)\n\n```Shell\n$ bitbake flutter-drm-gbm-backend\n```\n\n### DRM-EGLStream backend\nYou need to install libsystemd in the same way with the DRM-GBM backend.\n\n```Shell\n$ bitbake flutter-drm-eglstream-backend\n```\n\n## Build using Yocto SDK\n\nSetup the cross-building toolchain environment using a script that you built and installed:\n```Shell\n$ source /opt/poky/3.1.7/environment-setup-aarch64-poky-linux\n```\n\nSet the following environment vars to cross-build using clang:\n```Shell\n$ export CC=${CLANGCC}\n$ export CXX=${CLANGCXX}\n```\n\nAfter doing that, you can build the embedder as normal like self-building on hosts. It means you don't need to be aware of cross-building. See: [self-build](https://github.com/sony/flutter-embedded-linux/wiki/Building-Embedded-Linux-embedding-for-Flutter#self-build)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsony%2Fmeta-flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsony%2Fmeta-flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsony%2Fmeta-flutter/lists"}