diff options
author | Joel Winarske <joel.winarske@gmail.com> | 2023-05-31 18:35:35 -0700 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2023-06-01 18:59:41 -0400 |
commit | 882eeb6a44b443ef13a4b3111330cd0b603d3f1b (patch) | |
tree | 0be68e27cf36bef0707767350123ef8520719ba8 /meta-agl-flutter/tools/configs | |
parent | 95e1b466426763d761b171677c86b36f925c9d88 (diff) |
Flutter bbclass refactor
-remove use of bbclass runtime modes
-use external automation-workspace repo
Scott Murray:
- update flutter-auto agl-shell platform channel plugin patch with
reworked version from Marius Vlad.
Bug-AGL: SPEC-4819
Change-Id: I7510f916ab70d8bab78fdb9ab235092f84c3713a
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'meta-agl-flutter/tools/configs')
-rw-r--r-- | meta-agl-flutter/tools/configs/_globals.json | 5 | ||||
-rw-r--r-- | meta-agl-flutter/tools/configs/_repos.json | 48 | ||||
-rw-r--r-- | meta-agl-flutter/tools/configs/agl-qemu-master.json | 114 | ||||
-rw-r--r-- | meta-agl-flutter/tools/configs/agl-qemu-octopus.json | 114 | ||||
-rw-r--r-- | meta-agl-flutter/tools/configs/desktop-auto.json | 136 |
5 files changed, 417 insertions, 0 deletions
diff --git a/meta-agl-flutter/tools/configs/_globals.json b/meta-agl-flutter/tools/configs/_globals.json new file mode 100644 index 00000000..1800c6bf --- /dev/null +++ b/meta-agl-flutter/tools/configs/_globals.json @@ -0,0 +1,5 @@ +{ + "flutter-version": "3.3.7", + "github_token": "", + "cookie_file": "" +}
\ No newline at end of file diff --git a/meta-agl-flutter/tools/configs/_repos.json b/meta-agl-flutter/tools/configs/_repos.json new file mode 100644 index 00000000..d1d42d42 --- /dev/null +++ b/meta-agl-flutter/tools/configs/_repos.json @@ -0,0 +1,48 @@ +[ + { + "uri": "https://github.com/toyota-connected/ivi-homescreen.git", + "branch": "agl" + }, + { + "uri": "https://github.com/flutter/packages.git", + "branch": "main" + }, + { + "uri": "https://github.com/gskinnerTeam/flutter-wonderous-app.git", + "branch": "main", + "pubspec_path": "flutter-wonderous-app" + }, + { + "uri": "https://github.com/flutter/pinball.git", + "branch": "main", + "pubspec_path": "pinball" + }, + { + "uri": "https://github.com/flutter/gallery.git", + "branch": "master", + "rev": "9eb785cb997ff56c46e933c1c591f0a6f31454f6", + "pubspec_path": "gallery" + }, + { + "uri": "https://github.com/mogol/flutter_secure_storage.git", + "branch": "develop", + "pubspec_path": "flutter_secure_storage/flutter_secure_storage/example" + }, + { + "uri": "https://github.com/meta-flutter/flutter_animated_background.git", + "branch": "meta-flutter", + "rev": "46f35ad2a323ab006813a3c4748163536b0fc332", + "pubspec_path": "flutter_animated_background/example" + }, + { + "uri": "https://github.com/felipeerias/flutter_homescreen.git", + "branch": "main", + "rev": "08bf271f7f1f14153a41005718a2090fa8e783f0", + "pubspec_path": "flutter_homescreen" + }, + { + "uri": "https://github.com/bernardpumped/ped.git", + "branch": "agl", + "pubspec_path": "ped" + } +] diff --git a/meta-agl-flutter/tools/configs/agl-qemu-master.json b/meta-agl-flutter/tools/configs/agl-qemu-master.json new file mode 100644 index 00000000..eba953f7 --- /dev/null +++ b/meta-agl-flutter/tools/configs/agl-qemu-master.json @@ -0,0 +1,114 @@ +{ + "id": "agl-qemu-master", + "load": true, + "supported_archs": [ + "x86_64", + "arm64" + ], + "supported_host_types": [ + "darwin", + "ubuntu", + "fedora" + ], + "flutter_runtime": "debug", + "type": "qemu", + "env": { + "RELEASE_NAME": "master", + "RELEASE_VERSION": "latest", + "FLUTTER_DEBUG_PORT": "1234", + "FLUTTER_OBSERVATORY_HOST": "0.0.0.0", + "CONTAINER_SSH_PORT": "2222", + "DEVICE_HOSTNAME": "localhost", + "FLUTTER_AUTO_EXE": "flutter-auto --j=/tmp/${appName}/default_config.json --b=/tmp/${appName}", + "PING_CMD": "(echo >/dev/tcp/localhost/${CONTAINER_SSH_PORT}) &>/dev/null && echo open || echo closed", + "DELETE_USER_PWD": "ssh -p ${CONTAINER_SSH_PORT} -t -oBatchMode=yes root@${DEVICE_HOSTNAME} passwd -d agl-driver", + "CREATE_BUNDLE_FOLDER": "ssh -p ${CONTAINER_SSH_PORT} -o BatchMode=yes agl-driver@${DEVICE_HOSTNAME} mkdir -p /tmp/${appName}/data", + "COPY_PLATFORM_ID_TO_DEVICE": "scp -P ${CONTAINER_SSH_PORT} -r ${PLATFORM_ID_DIR}/default_config.json agl-driver@${DEVICE_HOSTNAME}:/tmp/${appName}/", + "COPY_ASSETS_TO_DEVICE": "scp -P ${CONTAINER_SSH_PORT} -r ${localPath}/* agl-driver@${DEVICE_HOSTNAME}:/tmp/${appName}/data/flutter_assets", + "DELETE_APP_FOLDER": "ssh -p ${CONTAINER_SSH_PORT} -o BatchMode=yes agl-driver@${DEVICE_HOSTNAME} rm -rf /tmp/${appName}" + }, + "runtime": { + "config": { + "view": [ + { + "window_type": "BG", + "width": 1920, + "height": 1080 + } + ] + }, + "pre-requisites": { + "arm64": { + "darwin": { + "cmds": [ + "bash -c \"arch -arm64 brew install xz\"", + "bash -c \"arch -arm64 brew install qemu\"" + ] + } + } + }, + "artifacts": { + "http": { + "url": "https://download.automotivelinux.org/AGL/snapshots/${RELEASE_NAME}/${RELEASE_VERSION}", + "artifacts": { + "x86_64": [ + { + "endpoint": "/qemux86-64/deploy/images/qemux86-64/agl-ivi-demo-platform-flutter-qemux86-64.wic.vmdk.xz" + } + ], + "arm64": [ + { + "endpoint": "/qemuarm64/deploy/images/qemuarm64/agl-demo-platform-crosssdk-qemuarm64.ext4.xz" + }, + { + "endpoint": "/qemuarm64/deploy/images/qemuarm64/Image-qemuarm64.bin" + } + ] + } + } + }, + "qemu": { + "cmd": "qemu-system-${FORMAL_MACHINE_ARCH}", + "x86_64": { + "image": "agl-ivi-demo-platform-flutter-qemux86-64.wic.vmdk", + "args": "-m 2048 ${QEMU_EXTRA} -hda ${QEMU_IMAGE} -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -vga virtio -device virtio-rng-pci -serial mon:stdio -serial null -device intel-hda -device hda-duplex -device virtio-net-pci,netdev=net0,mac=${RANDOM_MAC} -netdev user,id=net0,hostfwd=tcp::${CONTAINER_SSH_PORT}-:22,hostfwd=tcp::${FLUTTER_DEBUG_PORT}-:${FLUTTER_DEBUG_PORT}" + }, + "arm64": { + "kernel": "Image-qemuarm64.bin", + "image": "agl-demo-platform-crosssdk-qemuarm64.ext4", + "args": "-accel hvf -cpu host -M virt ${QEMU_EXTRA} -m 4096 -device virtio-gpu-pci -nographic -display cocoa,show-cursor=on -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 -device qemu-xhci -device usb-tablet -device usb-mouse -device usb-kbd -device virtio-net-pci,netdev=vnet -netdev user,id=vnet,hostfwd=tcp::${CONTAINER_SSH_PORT}-:22,hostfwd=tcp::${FLUTTER_DEBUG_PORT}-:${FLUTTER_DEBUG_PORT} -kernel ${QEMU_KERNEL} -drive file=${QEMU_IMAGE},format=raw,if=virtio -append root=/dev/vda" + }, + "extra": { + "darwin": "-smp cpus=8,sockets=1,cores=8,threads=1", + "ubuntu": "-bios OVMF.fd", + "fedora": "-bios /usr/share/edk2/ovmf/OVMF_CODE.fd" + } + }, + "post_cmds": [ + { + "cwd": "${PLATFORM_ID_DIR}", + "cmds": [ + "bash -c \"rm ${QEMU_IMAGE}|true\"", + "unxz --keep ${QEMU_IMAGE}.xz" + ] + } + ] + }, + "overwrite-existing": true, + "custom-device": { + "id": "agl-qemu-${RELEASE_NAME}", + "label": "AGL ${RELEASE_NAME}-${RELEASE_VERSION} QEMU Image", + "sdkNameAndVersion": "qemu-${RELEASE_NAME} ${RELEASE_VERSION}", + "platform": "linux-x64", + "enabled": true, + "ping": "bash -c \"${PING_CMD}\"", + "pingSuccessRegex": "open", + "postBuild": "bash -c \"${DELETE_USER_PWD}\"", + "install": "bash -c \"${CREATE_BUNDLE_FOLDER} && ${COPY_PLATFORM_ID_TO_DEVICE} && ${COPY_ASSETS_TO_DEVICE}\"", + "uninstall": "bash -c \"${DELETE_APP_FOLDER}\"", + "runDebug": "bash -c \"ssh -t -t -o BatchMode=yes agl-driver@${DEVICE_HOSTNAME} ${FLUTTER_AUTO_EXE}\"", + "forwardPort": null, + "forwardPortSuccessRegex": null, + "screenshot": null + } +}
\ No newline at end of file diff --git a/meta-agl-flutter/tools/configs/agl-qemu-octopus.json b/meta-agl-flutter/tools/configs/agl-qemu-octopus.json new file mode 100644 index 00000000..dba5a882 --- /dev/null +++ b/meta-agl-flutter/tools/configs/agl-qemu-octopus.json @@ -0,0 +1,114 @@ +{ + "id": "agl-qemu-octopus", + "load": true, + "supported_archs": [ + "x86_64", + "arm64" + ], + "supported_host_types": [ + "darwin", + "ubuntu", + "fedora" + ], + "flutter_runtime": "debug", + "type": "qemu", + "env": { + "RELEASE_NAME": "octopus", + "RELEASE_VERSION": "latest", + "FLUTTER_DEBUG_PORT": "1234", + "FLUTTER_OBSERVATORY_HOST": "0.0.0.0", + "CONTAINER_SSH_PORT": "2222", + "DEVICE_HOSTNAME": "localhost", + "FLUTTER_AUTO_EXE": "flutter-auto --j=/tmp/${appName}/default_config.json --b=/tmp/${appName}", + "PING_CMD": "(echo >/dev/tcp/localhost/${CONTAINER_SSH_PORT}) &>/dev/null && echo open || echo closed", + "DELETE_USER_PWD": "ssh -p ${CONTAINER_SSH_PORT} -t -oBatchMode=yes root@${DEVICE_HOSTNAME} passwd -d agl-driver", + "CREATE_BUNDLE_FOLDER": "ssh -p ${CONTAINER_SSH_PORT} -o BatchMode=yes agl-driver@${DEVICE_HOSTNAME} mkdir -p /tmp/${appName}/data", + "COPY_PLATFORM_ID_TO_DEVICE": "scp -P ${CONTAINER_SSH_PORT} -r ${PLATFORM_ID_DIR}/default_config.json agl-driver@${DEVICE_HOSTNAME}:/tmp/${appName}/", + "COPY_ASSETS_TO_DEVICE": "scp -P ${CONTAINER_SSH_PORT} -r ${localPath}/* agl-driver@${DEVICE_HOSTNAME}:/tmp/${appName}/data/flutter_assets", + "DELETE_APP_FOLDER": "ssh -p ${CONTAINER_SSH_PORT} -o BatchMode=yes agl-driver@${DEVICE_HOSTNAME} rm -rf /tmp/${appName}" + }, + "runtime": { + "config": { + "view": [ + { + "window_type": "BG", + "width": 1920, + "height": 1080 + } + ] + }, + "pre-requisites": { + "arm64": { + "darwin": { + "cmds": [ + "bash -c \"arch -arm64 brew install xz\"", + "bash -c \"arch -arm64 brew install qemu\"" + ] + } + } + }, + "artifacts": { + "http": { + "url": "https://download.automotivelinux.org/AGL/release/${RELEASE_NAME}/${RELEASE_VERSION}", + "artifacts": { + "x86_64": [ + { + "endpoint": "/qemux86-64/deploy/images/qemux86-64/agl-ivi-demo-platform-flutter-qemux86-64.wic.vmdk.xz" + } + ], + "arm64": [ + { + "endpoint": "/qemuarm64/deploy/images/qemuarm64/agl-demo-platform-crosssdk-qemuarm64.ext4.xz" + }, + { + "endpoint": "/qemuarm64/deploy/images/qemuarm64/Image-qemuarm64.bin" + } + ] + } + } + }, + "qemu": { + "cmd": "qemu-system-${FORMAL_MACHINE_ARCH}", + "x86_64": { + "image": "agl-ivi-demo-platform-flutter-qemux86-64.wic.vmdk", + "args": "-m 2048 ${QEMU_EXTRA} -hda ${QEMU_IMAGE} -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -vga virtio -device virtio-rng-pci -serial mon:stdio -serial null -device intel-hda -device hda-duplex -device virtio-net-pci,netdev=net0,mac=${RANDOM_MAC} -netdev user,id=net0,hostfwd=tcp::${CONTAINER_SSH_PORT}-:22,hostfwd=tcp::${FLUTTER_DEBUG_PORT}-:${FLUTTER_DEBUG_PORT}" + }, + "arm64": { + "kernel": "Image-qemuarm64.bin", + "image": "agl-demo-platform-crosssdk-qemuarm64.ext4", + "args": "-accel hvf -cpu host -M virt ${QEMU_EXTRA} -m 4096 -device virtio-gpu-pci -nographic -display cocoa,show-cursor=on -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 -device qemu-xhci -device usb-tablet -device usb-mouse -device usb-kbd -device virtio-net-pci,netdev=vnet -netdev user,id=vnet,hostfwd=tcp::${CONTAINER_SSH_PORT}-:22,hostfwd=tcp::${FLUTTER_DEBUG_PORT}-:${FLUTTER_DEBUG_PORT} -kernel ${QEMU_KERNEL} -drive file=${QEMU_IMAGE},format=raw,if=virtio -append root=/dev/vda" + }, + "extra": { + "darwin": "-smp cpus=8,sockets=1,cores=8,threads=1", + "ubuntu": "-bios OVMF.fd", + "fedora": "-bios /usr/share/edk2/ovmf/OVMF_CODE.fd" + } + }, + "post_cmds": [ + { + "cwd": "${PLATFORM_ID_DIR}", + "cmds": [ + "bash -c \"rm ${QEMU_IMAGE}|true\"", + "unxz --keep ${QEMU_IMAGE}.xz" + ] + } + ] + }, + "overwrite-existing": true, + "custom-device": { + "id": "agl-qemu-${RELEASE_NAME}", + "label": "AGL ${RELEASE_NAME}-${RELEASE_VERSION} QEMU Image", + "sdkNameAndVersion": "qemu-${RELEASE_NAME} ${RELEASE_VERSION}", + "platform": "linux-x64", + "enabled": true, + "ping": "bash -c \"${PING_CMD}\"", + "pingSuccessRegex": "open", + "postBuild": "bash -c \"${DELETE_USER_PWD}\"", + "install": "bash -c \"${CREATE_BUNDLE_FOLDER} && ${COPY_PLATFORM_ID_TO_DEVICE} && ${COPY_ASSETS_TO_DEVICE}\"", + "uninstall": "bash -c \"${DELETE_APP_FOLDER}\"", + "runDebug": "bash -c \"ssh -t -t -o BatchMode=yes agl-driver@${DEVICE_HOSTNAME} ${FLUTTER_AUTO_EXE}\"", + "forwardPort": null, + "forwardPortSuccessRegex": null, + "screenshot": null + } +}
\ No newline at end of file diff --git a/meta-agl-flutter/tools/configs/desktop-auto.json b/meta-agl-flutter/tools/configs/desktop-auto.json new file mode 100644 index 00000000..66cec712 --- /dev/null +++ b/meta-agl-flutter/tools/configs/desktop-auto.json @@ -0,0 +1,136 @@ +{ + "id": "desktop-auto", + "load": true, + "supported_archs": [ + "x86_64" + ], + "supported_host_types": [ + "ubuntu", + "fedora" + ], + "flutter_runtime": "debug", + "type": "host", + "env": { + "FLUTTER_AUTO_SRC_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen", + "FLUTTER_AUTO_BUILD_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen/build", + "FLUTTER_AUTO_CMAKE_ARGS": "-DCMAKE_BUILD_TYPE=Debug -DBUILD_PLUGIN_SECURE_STORAGE=ON", + "COMP_SURF_PBR_SRC_DIR": "${FLUTTER_WORKSPACE}/app/comp_surf_pbr", + "COMP_SURF_PBR_BUILD_DIR": "${FLUTTER_WORKSPACE}/app/comp_surf_pbr/build", + "COMP_SURF_PBR_CMAKE_ARGS": "-DCMAKE_BUILD_TYPE=Debug", + "FLUTTER_AUTO_EXE": "LD_LIBRARY_PATH=${COMP_SURF_PBR_BUILD_DIR} ${FLUTTER_AUTO_BUILD_DIR}/shell/flutter-auto --j=${PLATFORM_ID_DIR_RELATIVE}/default_config.json --b=${PLATFORM_ID_DIR_RELATIVE}", + "PING_CMD": "loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type", + "CREATE_BUNDLE_FOLDER": "mkdir -p ${PLATFORM_ID_DIR_RELATIVE}/data", + "COPY_PLATFORM_ID_TO_BUNDLE_FOLDER": "cp -r ${PLATFORM_ID_DIR}/default_config.json ${PLATFORM_ID_DIR_RELATIVE}/", + "COPY_BUNDLE_FOLDER_TO_PLATOFRM_ID": "cp -r ${BUNDLE_FOLDER}/* ${PLATFORM_ID_DIR_RELATIVE}/", + "CREATE_ASSET_SYMLINK": "ln -rsf build/flutter_assets ${PLATFORM_ID_DIR_RELATIVE}/data/flutter_assets", + "STAGE_BUNDLE_FOLDER": "${CREATE_BUNDLE_FOLDER} && ${COPY_PLATFORM_ID_TO_BUNDLE_FOLDER} && ${COPY_BUNDLE_FOLDER_TO_PLATOFRM_ID} && ${CREATE_ASSET_SYMLINK}" + }, + "runtime": { + "config": { + "view": [ + { + "width": 1920, + "height": 1080, + "cursor_theme": "DMZ-White", + "fullscreen": false + } + ] + }, + "pre-requisites": { + "x86_64": { + "ubuntu": { + "cmds": [ + "sudo snap install cmake --classic", + "sudo add-apt-repository -y ppa:kisak/kisak-mesa", + "sudo apt update -y", + "sudo apt install lsb-release wget software-properties-common gnupg apt-file", + "sudo apt-file update", + "wget https://apt.llvm.org/llvm.sh", + "chmod +x ./llvm.sh", + "sed -i 's|add-apt-repository \"${REPO_NAME}\"|add-apt-repository -y \"${REPO_NAME}\"|g' ./llvm.sh", + "sudo ./llvm.sh 14", + "rm ./llvm.sh", + "sudo apt install -y clang-14 lldb-14 lld-14 clangd-14 clang-tidy-14 clang-format-14 clang-tools-14 llvm-14-dev lld-14 lldb-14 llvm-14-tools libomp-14-dev libc++-14-dev libc++abi-14-dev libclang-common-14-dev libclang-14-dev libclang-cpp14-dev libunwind-14-dev", + "sudo apt install -y libwayland-dev wayland-protocols mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev mesa-utils libxkbcommon-dev ninja-build", + "sudo apt install -y build-essential libvulkan-dev vulkan-tools vulkan-validationlayers vulkan-utils libtool", + "sudo apt autoremove -y", + "sudo apt clean -y", + "cmake --version", + "clang++ --version", + "apt-file search cmake", + "apt-file search clang++" + ] + }, + "fedora": { + "cmds": [ + "sudo dnf -y update", + "sudo dnf -y upgrade", + "sudo dnf -y install wayland-devel wayland-protocols-devel libxkbcommon-devel cmake ninja-build mesa-dri-drivers mesa-filesystem mesa-libEGL-devel mesa-libGL-devel mesa-libGLU-devel mesa-libgbm-devel mesa-libglapi mesa-libxatracker mesa-vulkan-drivers vulkan-tools libunwind-devel clang clang-analyzer clang-devel clang-libs clang-resource-filesystem llvm-devel clang-tools-extra lld lld-libs lldb libcxx libcxx-devel libcxx-static libcxxabi libcxxabi-devel libcxxabi-static gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras gstreamer1-plugins-base-tools gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly-free libtool", + "sudo dnf -y autoremove", + "cmake --version", + "clang++ --version", + "dnf provides cmake", + "dnf provides clang++" + ] + } + } + }, + "post_cmds": [ + { + "ubuntu": { + "env": { + "CC": "/usr/bin/clang", + "CXX": "/usr/bin/clang++" + } + }, + "fedora": { + "env": { + "CC": "/usr/lib64/ccache/clang", + "CXX": "/usr/lib64/ccache/clang++" + } + }, + "cwd": "${FLUTTER_AUTO_BUILD_DIR}", + "cmds": [ + "cmake ${FLUTTER_AUTO_SRC_DIR} ${FLUTTER_AUTO_CMAKE_ARGS}", + "make flutter-auto -j" + ] + }, + { + "ubuntu": { + "env": { + "CC": "/usr/bin/clang", + "CXX": "/usr/bin/clang++" + } + }, + "fedora": { + "env": { + "CC": "/usr/lib64/ccache/clang", + "CXX": "/usr/lib64/ccache/clang++" + } + }, + "cwd": "${COMP_SURF_PBR_BUILD_DIR}", + "cmds": [ + "cmake ${COMP_SURF_PBR_SRC_DIR} ${COMP_SURF_PBR_CMAKE_ARGS}", + "make comp_surf_pbr -j" + ] + } + ] + }, + "overwrite-existing": true, + "custom-device": { + "id": "desktop-auto", + "label": "Toyota flutter-auto", + "sdkNameAndVersion": "flutter-auto x86_64", + "platform": "linux-x64", + "enabled": true, + "ping": "bash -c \"${PING_CMD}\"", + "pingSuccessRegex": "Type=wayland", + "postBuild": "bash -c \"rm -rf ${PLATFORM_ID_DIR_RELATIVE}\"", + "install": "bash -c \"${STAGE_BUNDLE_FOLDER}\"", + "uninstall": "bash -c \"rm -rf ${PLATFORM_ID_DIR_RELATIVE}\"", + "runDebug": "bash -c \"${FLUTTER_AUTO_EXE}\"", + "forwardPort": null, + "forwardPortSuccessRegex": null, + "screenshot": null + } +}
\ No newline at end of file |