Add meta-agl-flutter 16/30016/2 master
authorScott Murray <scott.murray@konsulko.com>
Tue, 25 Jun 2024 19:39:12 +0000 (15:39 -0400)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 26 Jun 2024 10:42:40 +0000 (10:42 +0000)
Add meta-agl-flutter layer as it is being moved from meta-agl-devel.
The files are copies of the state in meta-agl-devel as of commit
97310e35, with only a minor change to the feature template to adjust
the location of the layer for bblayers.conf.

Bug-AGL: SPEC-5184

Change-Id: I9a14e4ab3a1b1726b0ccc1dbc112d76864dd106c
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/30016
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
47 files changed:
meta-agl-bsp/conf/include/agl_raspberrypi5.inc
meta-agl-bsp/conf/include/agl_s4sk.inc
meta-agl-bsp/meta-python/recipes-devtools/python/python3-grpcio/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch [new file with mode: 0644]
meta-agl-bsp/meta-python/recipes-devtools/python/python3-grpcio_1.62.%.bbappend [new file with mode: 0644]
meta-agl-bsp/meta-rcar-gateway/recipes-kernel/linux/linux-renesas/0001-Porting-to-support-device-driver-Canfd-from-Control-.patch [new file with mode: 0644]
meta-agl-bsp/meta-rcar-gateway/recipes-kernel/linux/linux-renesas_%.bbappend
meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch [new file with mode: 0644]
meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bbappend [new file with mode: 0644]
meta-agl-core/conf/distro/poky-agl.conf
meta-agl-core/conf/templates/base/conf-notes.txt
meta-agl-core/conf/templates/base/local.conf.sample
meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Do-not-overwrite-CFLAGS.patch
meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Initialize-variables.patch
meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend
meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in [deleted file]
meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch
meta-agl-flutter/README.md [new file with mode: 0644]
meta-agl-flutter/conf/include/agl-flutter.inc [new file with mode: 0644]
meta-agl-flutter/conf/layer.conf [new file with mode: 0644]
meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery/flutter-gallery.service [new file with mode: 0644]
meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_%.bbappend [new file with mode: 0644]
meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_aglflutter.inc [new file with mode: 0644]
meta-agl-flutter/recipes-config/agl-flutter-env/agl-flutter-env_1.0.bb [new file with mode: 0644]
meta-agl-flutter/recipes-graphics/toyota/files/0001-Disable-on_frame_base_surface-wl_surface_commit.patch [new file with mode: 0644]
meta-agl-flutter/recipes-graphics/toyota/files/0001-activation_area-Add-missing-width-and-height.patch [new file with mode: 0644]
meta-agl-flutter/recipes-graphics/toyota/files/0001-display-Add-support-for-wl_output-version-4.patch [new file with mode: 0644]
meta-agl-flutter/recipes-graphics/toyota/files/0002-activation_area-Allow-x-and-y-values-be-zero-for-the.patch [new file with mode: 0644]
meta-agl-flutter/recipes-graphics/toyota/files/0002-display-Add-support-for-agl_shell-version-8.patch [new file with mode: 0644]
meta-agl-flutter/recipes-graphics/toyota/files/0003-activation_area-Remove-the-implicit-width-height-swa.patch [new file with mode: 0644]
meta-agl-flutter/recipes-graphics/toyota/flutter-auto_%.bbappend [new file with mode: 0644]
meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc [new file with mode: 0644]
meta-agl-flutter/recipes-platform/images/agl-image-flutter-debug.bb [new file with mode: 0644]
meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb [new file with mode: 0644]
meta-agl-flutter/tools/.gitignore [new file with mode: 0644]
meta-agl-flutter/tools/configs/_globals.json [new file with mode: 0644]
meta-agl-flutter/tools/configs/_repos.json [new file with mode: 0644]
meta-agl-flutter/tools/configs/agl-qemu-master.json [new file with mode: 0644]
meta-agl-flutter/tools/configs/agl-qemu-octopus.json [new file with mode: 0644]
meta-agl-flutter/tools/configs/desktop-auto.json [new file with mode: 0644]
meta-agl-flutter/tools/flutter_workspace.py [new symlink]
templates/feature/agl-ci/99_local.conf.inc
templates/feature/agl-flutter/50_bblayers.conf.inc [new file with mode: 0644]
templates/feature/agl-flutter/50_local.conf.inc [new file with mode: 0644]
templates/feature/agl-flutter/included.dep [new file with mode: 0644]
templates/feature/agl-prhash-public/99_local.conf.inc [new file with mode: 0644]
templates/feature/agl-weston-remoting/included.dep [deleted file]

index 212c9ff..4db5bb7 100644 (file)
@@ -7,14 +7,6 @@ OSTREE_KERNEL_ARGS:sota:append = " cma=256M"
 # use u-boot always
 RPI_USE_U_BOOT = "1"
 
-# Re-enable U-Boot for raspberrypi5 here until upstream is fixed.
-# Note that this assumes the use of scarthgap/u-boot meta-lts-mixins
-# branch.
-UBOOT_MACHINE = "rpi_arm64_config"
-COMPATIBLE_MACHINE:pn-u-boot:forcevariable = ""
-KERNEL_IMAGETYPE_UBOOT ?= "Image"
-KERNEL_BOOTCMD ?= "booti"
-
 # Use UART for serial console
 ENABLE_UART ?= "1"
 
index 8f4a91b..91a65d8 100644 (file)
@@ -7,3 +7,8 @@ WKS_FILE = "singlepart-noloader.wks"
 IMAGE_INSTALL:append = " \
     kernel-devicetree \
 "
+
+# For systemd CAN bus configuration
+#MACHINE_FEATURES:append = " canfd"
+CANBUS_NETWORK_CONFIG = "canbus-can-fd.network"
+
diff --git a/meta-agl-bsp/meta-python/recipes-devtools/python/python3-grpcio/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch b/meta-agl-bsp/meta-python/recipes-devtools/python/python3-grpcio/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch
new file mode 100644 (file)
index 0000000..82f15f8
--- /dev/null
@@ -0,0 +1,82 @@
+From 7335a36d0b5c1c597566f9aa3f458a5b6817c3b4 Mon Sep 17 00:00:00 2001
+From: aurel32 <aurelien@aurel32.net>
+Date: Fri, 22 Mar 2024 14:21:13 -0700
+Subject: [PATCH] PR #1644: unscaledcycleclock: remove RISC-V support
+
+Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1644
+
+Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on RISC-V and can't be used directly from userland. There is a sysctl option to change that as a transition period, but it will eventually disappear.
+
+The RDTIME instruction is another less accurate alternative, however its frequency varies from board to board, and there is currently now way to get its frequency from userland [2].
+
+Therefore this patch just removes the code for unscaledcycleclock on RISC-V. Without processor specific implementation, abseil relies on std::chrono::steady_clock::now().time_since_epoch() which is basically a wrapper around clock_gettime (CLOCK_MONOTONIC), which in turns use __vdso_clock_gettime(). On RISC-V this VDSO is just a wrapper around RDTIME correctly scaled to use nanoseconds units.
+
+This fixes the testsuite on riscv64, tested on a VisionFive 2 board.
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3
+[2] https://github.com/abseil/abseil-cpp/pull/1631
+Merge 43356a2548cfde76e164d446cb69004b488c6a71 into 76f8011beabdaee872b5fde7546e02407b220cb1
+
+Merging this change closes #1644
+
+COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1644 from aurel32:rv64-no-unscaledcycleclock 43356a2548cfde76e164d446cb69004b488c6a71
+PiperOrigin-RevId: 618286262
+Change-Id: Ie4120a727e7d0bb185df6e06ea145c780ebe6652
+
+Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/7335a36d]
+[Adapted to apply on top of meta-oe's patch stack]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ .../absl/base/internal/unscaledcycleclock.cc         | 12 ------------
+ .../absl/base/internal/unscaledcycleclock_config.h   |  5 ++---
+ 2 files changed, 2 insertions(+), 15 deletions(-)
+
+diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
+index f11fecb..103b4f6 100644
+--- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
++++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
+@@ -121,18 +121,6 @@ double UnscaledCycleClock::Frequency() {
+   return aarch64_timer_frequency;
+ }
+-#elif defined(__riscv)
+-
+-int64_t UnscaledCycleClock::Now() {
+-  int64_t virtual_timer_value;
+-  asm volatile("rdcycle %0" : "=r"(virtual_timer_value));
+-  return virtual_timer_value;
+-}
+-
+-double UnscaledCycleClock::Frequency() {
+-  return base_internal::NominalCPUFrequency();
+-}
+-
+ #elif defined(_M_IX86) || defined(_M_X64)
+ #pragma intrinsic(__rdtsc)
+diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
+index 5e232c1..83552fc 100644
+--- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
++++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
+@@ -22,7 +22,6 @@
+ // The following platforms have an implementation of a hardware counter.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
+     ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
+-    defined(__riscv) ||     \
+     defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
+ #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
+ #else
+@@ -54,8 +53,8 @@
+ #if ABSL_USE_UNSCALED_CYCLECLOCK
+ // This macro can be used to test if UnscaledCycleClock::Frequency()
+ // is NominalCPUFrequency() on a particular platform.
+-#if (defined(__i386__) || defined(__x86_64__) || defined(__riscv) || \
+-     defined(_M_IX86) || defined(_M_X64))
++#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \
++     defined(_M_X64))
+ #define ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY
+ #endif
+ #endif
+-- 
+2.44.0
+
diff --git a/meta-agl-bsp/meta-python/recipes-devtools/python/python3-grpcio_1.62.%.bbappend b/meta-agl-bsp/meta-python/recipes-devtools/python/python3-grpcio_1.62.%.bbappend
new file mode 100644 (file)
index 0000000..2bf4712
--- /dev/null
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI += "file://0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch"
diff --git a/meta-agl-bsp/meta-rcar-gateway/recipes-kernel/linux/linux-renesas/0001-Porting-to-support-device-driver-Canfd-from-Control-.patch b/meta-agl-bsp/meta-rcar-gateway/recipes-kernel/linux/linux-renesas/0001-Porting-to-support-device-driver-Canfd-from-Control-.patch
new file mode 100644 (file)
index 0000000..69fb1ac
--- /dev/null
@@ -0,0 +1,1388 @@
+From a7e7a8317d5b150a97a08270ddfb711a88168add Mon Sep 17 00:00:00 2001
+From: Phat Pham <phat.pham.zg@renesas.com>
+Date: Wed, 2 Aug 2023 17:12:09 +0700
+Subject: [PATCH] Porting to support device driver Canfd from Control Domain to
+ Application Domain
+
+- Update pinctrl support for 15 canfd channels in file pfc-r8a779f0.c.
+- Update device tree to support GPIO Group 4-7 on CA55 in file r8a779f0.dtsi and r8a779f0-spider.dts,
+r8a779f0-s4sk.dts.
+- Update Canfd device nodes in device tree R9A779F0.
+- Update Source code support canfd device in rcar-canfd.c.
+
+Signed-off-by: Phat Pham <phat.pham.zg@renesas.com>
+Signed-off-by: Duy Dang <duy.dang.yw@renesas.com>
+---
+ arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts |  28 ++
+ .../boot/dts/renesas/r8a779f0-spider.dts      | 160 ++++++++++++
+ arch/arm64/boot/dts/renesas/r8a779f0.dtsi     | 170 +++++++++++-
+ drivers/net/can/rcar/rcar_can.c               |  28 +-
+ drivers/net/can/rcar/rcar_canfd.c             | 211 +++++++++++----
+ drivers/pinctrl/renesas/pfc-r8a779f0.c        | 246 ++++++++++++++++++
+ 6 files changed, 780 insertions(+), 63 deletions(-)
+
+diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts b/arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts
+index b6c61a20cd0d..1288285b5a9d 100644
+--- a/arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts
++++ b/arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts
+@@ -109,6 +109,24 @@ &mmc0 {
+       status = "okay";
+ };
++&canfd0 {
++      pinctrl-0 = <&canfd0_pins>, <&canfd1_pins>;
++      pinctrl-names = "default";
++      status = "okay";
++
++      channel0 {
++              status = "okay";
++      };
++
++      channel1 {
++              status = "okay";
++      };
++};
++
++&canfd1 {
++      status = "disabled";
++};
++
+ &pfc {
+       pinctrl-0 = <&scif_clk_pins>;
+       pinctrl-names = "default";
+@@ -203,6 +221,16 @@ pins_mdio {
+                       power-source = <3300>;
+               };
+       };
++
++      canfd0_pins: canfd0 {
++              groups = "canfd0_data";
++              function = "canfd0";
++      };
++
++    canfd1_pins: canfd1 {
++        groups = "canfd1_data";
++        function = "canfd1";
++    };
+ };
+ &rwdt {
+diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts b/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts
+index 538f413fbffd..0d6b21fe0c07 100644
+--- a/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts
++++ b/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts
+@@ -27,6 +27,86 @@ eeprom@51 {
+       };
+ };
++&canfd0 {
++      pinctrl-0 = <&canfd0_pins>, <&canfd1_pins>, <&canfd2_pins>,
++                              <&canfd3_pins>, <&canfd4_pins>, <&canfd5_pins>,
++                              <&canfd6_pins>, <&canfd7_pins>;
++      pinctrl-names = "default";
++      status = "okay";
++
++      channel0 {
++              status = "okay";
++      };
++
++      channel1 {
++              status = "okay";
++      };
++
++      channel2 {
++              status = "okay";
++      };
++
++      channel3 {
++              status = "okay";
++      };
++
++      channel4 {
++              status = "okay";
++      };
++
++      channel5 {
++              status = "okay";
++      };
++
++      channel6 {
++              status = "okay";
++      };
++
++      channel7 {
++              status = "okay";
++      };
++};
++
++&canfd1 {
++      pinctrl-0 = <&canfd8_pins>,<&canfd9_pins>, <&canfd10_pins>, 
++                              <&canfd11_pins>, <&canfd12_pins>, <&canfd13_pins>, 
++                              <&canfd14_pins>, <&canfd15_pins>;
++      pinctrl-names = "default";
++      status = "okay";
++
++      channel0 {
++              status = "okay";
++      };
++
++      channel1 {
++              status = "okay";
++      };
++
++      channel2 {
++              status = "okay";
++      };
++
++      channel3 {
++              status = "okay";
++      };
++
++      channel4 {
++              status = "okay";
++      };
++
++      channel5 {
++              status = "okay";
++      };
++
++      channel6 {
++              status = "okay";
++      };
++
++      channel7 {
++              status = "okay";
++      };
++};
++
+ &pfc {
+       tsn0_pins: tsn0 {
+               mux {
+@@ -73,6 +153,86 @@ pins_mdio {
+               };
+       };
++      canfd0_pins: canfd0 {
++              groups = "canfd0_data";
++              function = "canfd0";
++      };
++
++      canfd1_pins: canfd1 {
++              groups = "canfd1_data";
++              function = "canfd1";
++      };
++
++      canfd2_pins: canfd2 {
++              groups = "canfd2_data";
++              function = "canfd2";
++      };
++
++      canfd3_pins: canfd3 {
++              groups = "canfd3_data";
++              function = "canfd3";
++      };
++
++      canfd4_pins: canfd4 {
++              groups = "canfd4_data";
++              function = "canfd4";
++      };
++
++      canfd5_pins: canfd5 {
++              groups = "canfd5_data";
++              function = "canfd5";
++      };
++
++      canfd6_pins: canfd6 {
++              groups = "canfd6_data";
++              function = "canfd6";
++      };
++
++      canfd7_pins: canfd7 {
++              groups = "canfd7_data";
++              function = "canfd7";
++      };
++
++      canfd8_pins: canfd8 {
++              groups = "canfd8_data";
++              function = "canfd8";
++      };
++
++      canfd9_pins: canfd9 {
++              groups = "canfd9_data";
++              function = "canfd9";
++      };
++
++      canfd10_pins: canfd10 {
++              groups = "canfd10_data";
++              function = "canfd10";
++      };
++
++      canfd11_pins: canfd11 {
++              groups = "canfd11_data";
++              function = "canfd11";
++      };
++
++      canfd12_pins: canfd12 {
++              groups = "canfd12_data";
++              function = "canfd12";
++      };
++
++      canfd13_pins: canfd13 {
++              groups = "canfd13_data";
++              function = "canfd13";
++      };
++
++      canfd14_pins: canfd14 {
++              groups = "canfd14_data";
++              function = "canfd14";
++      };
++
++      canfd15_pins: canfd15 {
++              groups = "canfd15_data";
++              function = "canfd15";
++      };
++
+       pcie0_pins: pcie0 {
+               groups = "pcie0_clkreq_n";
+               function = "pcie";
+diff --git a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
+index ddda2fc3acd0..b930b93ab3f7 100644
+--- a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
++++ b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
+@@ -23,6 +23,13 @@ aliases {
+               i2c5 = &i2c5;
+       };
++      /* External CAN clock - to be overridden by boards that provide it */
++      can_clk: can {
++              compatible = "fixed-clock";
++              #clock-cells = <0>;
++              clock-frequency = <40000000>;
++      };
++
+       cluster1_opp: opp_table10 {
+               compatible = "operating-points-v2";
+               opp-shared;
+@@ -329,7 +336,7 @@ pfc: pin-controller@e6050000 {
+                       compatible = "renesas,pfc-r8a779f0";
+                       reg = <0 0xe6050000 0 0x16c>, <0 0xe6050800 0 0x16c>,
+                             <0 0xe6051000 0 0x16c>, <0 0xe6051800 0 0x16c>,
+-                            <0 0xdfd90000 0 0x16c>, <0 0xdfd90800 0 0x16c>,
++                                <0 0xdfd90000 0 0x16c>, <0 0xdfd90800 0 0x16c>,
+                             <0 0xdfd91000 0 0x16c>, <0 0xdfd91800 0 0x16c>;
+               };
+@@ -389,6 +396,63 @@ gpio3: gpio@e6051980 {
+                       resets = <&cpg 915>;
+               };
++              /* Porting GPIO GP 4~7 from Control Domain to Application Domain */
++              gpio4: gpio@dfd90180 {
++                      compatible = "renesas,gpio-r8a779f0";
++                      reg = <0 0xdfd90180 0 0x54>;
++                      interrupts = <GIC_SPI 826 IRQ_TYPE_LEVEL_HIGH>;
++                      #gpio-cells = <2>;
++                      gpio-controller;
++                      gpio-ranges = <&pfc 0 128 31>;
++                      #interrupt-cells = <2>;
++                      interrupt-controller;
++                      clocks = <&cpg CPG_MOD 915>;
++                      power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
++                      resets = <&cpg 915>;
++              };
++
++              gpio5: gpio@dfd90980 {
++                      compatible = "renesas,gpio-r8a779f0";
++                      reg = <0 0xdfd90980 0 0x54>;
++                      interrupts = <GIC_SPI 827 IRQ_TYPE_LEVEL_HIGH>;
++                      #gpio-cells = <2>;
++                      gpio-controller;
++                      gpio-ranges = <&pfc 0 160 20>;
++                      #interrupt-cells = <2>;
++                      interrupt-controller;
++                      clocks = <&cpg CPG_MOD 915>;
++                      power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
++                      resets = <&cpg 915>;
++              };
++
++              gpio6: gpio@dfd91180 {
++                      compatible = "renesas,gpio-r8a779f0";
++                      reg = <0 0xdfd91180 0 0x54>;
++                      interrupts = <GIC_SPI 828 IRQ_TYPE_LEVEL_HIGH>;
++                      #gpio-cells = <2>;
++                      gpio-controller;
++                      gpio-ranges = <&pfc 0 192 24>;
++                      #interrupt-cells = <2>;
++                      interrupt-controller;
++                      clocks = <&cpg CPG_MOD 915>;
++                      power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
++                      resets = <&cpg 915>;
++              };
++
++              gpio7: gpio@dfd91980 {
++                      compatible = "renesas,gpio-r8a779f0";
++                      reg = <0 0xdfd91980 0 0x54>;
++                      interrupts = <GIC_SPI 829 IRQ_TYPE_LEVEL_HIGH>;
++                      #gpio-cells = <2>;
++                      gpio-controller;
++                      gpio-ranges = <&pfc 0 224 32>;
++                      #interrupt-cells = <2>;
++                      interrupt-controller;
++                      clocks = <&cpg CPG_MOD 915>;
++                      power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
++                      resets = <&cpg 915>;
++              };
++
+               cpg: clock-controller@e6150000 {
+                       compatible = "renesas,r8a779f0-cpg-mssr";
+                       reg = <0 0xe6150000 0 0x4000>;
+@@ -410,6 +474,110 @@ sysc: system-controller@e6180000 {
+                       #power-domain-cells = <1>;
+               };
++              canfd0: can@dff50000 {  
++                      compatible = "renesas,r8a779f0-canfd";
++                      reg = <0 0xdff50000 0 0x8600>;
++                      interrupts = <GIC_SPI 534 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 535 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 536 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 537 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 538 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 539 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 540 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 541 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 542 IRQ_TYPE_LEVEL_HIGH>;
++                      clocks = <&can_clk>;
++                      clock-names = "can_clk";
++                      assigned-clocks = <&can_clk>;
++                      assigned-clock-rates = <40000000>;
++                      power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
++                      status = "okay";
++
++                      channel0 {
++                              status = "disabled";
++                      };
++
++                      channel1 {
++                              status = "disabled";
++                      };
++
++                      channel2 {
++                              status = "disabled";
++                      };
++
++                      channel3 {
++                              status = "disabled";
++                      };
++
++                      channel4 {
++                              status = "disabled";
++                      };
++
++                      channel5 {
++                              status = "disabled";
++                      };
++
++                      channel6 {
++                              status = "disabled";
++                      };
++
++                      channel7 {
++                              status = "disabled";
++                      };              
++              };
++
++              canfd1: can@dfd00000 {  
++                      compatible = "renesas,r8a779f0-canfd";
++                      reg = <0 0xdfd00000 0 0x8600>;
++                      interrupts = <GIC_SPI 543 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 544 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 545 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 546 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 547 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 548 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 549 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 550 IRQ_TYPE_LEVEL_HIGH>,
++                                       <GIC_SPI 551 IRQ_TYPE_LEVEL_HIGH>;
++                      clocks = <&can_clk>;
++                      clock-names = "can_clk";
++                      assigned-clocks = <&can_clk>;
++                      assigned-clock-rates = <40000000>;
++                      power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
++                      status = "okay";
++
++                      channel0 {
++                              status = "disabled";
++                      };
++
++                      channel1 {
++                              status = "disabled";
++                      };
++
++                      channel2 {
++                              status = "disabled";
++                      };
++
++                      channel3 {
++                              status = "disabled";
++                      };
++
++                      channel4 {
++                              status = "disabled";
++                      };
++
++                      channel5 {
++                              status = "disabled";
++                      };
++
++                      channel6 {
++                              status = "disabled";
++                      };
++
++                      channel7 {
++                              status = "disabled";
++                      };                      
++              };
++
+               i2c0: i2c@e6500000 {
+                       compatible = "renesas,i2c-r8a779f0",
+                                    "renesas,rcar-gen4-i2c";
+diff --git a/drivers/net/can/rcar/rcar_can.c b/drivers/net/can/rcar/rcar_can.c
+index 48575900adb7..134eda66f0dc 100644
+--- a/drivers/net/can/rcar/rcar_can.c
++++ b/drivers/net/can/rcar/rcar_can.c
+@@ -235,11 +235,8 @@ static void rcar_can_error(struct net_device *ndev)
+       if (eifr & (RCAR_CAN_EIFR_EWIF | RCAR_CAN_EIFR_EPIF)) {
+               txerr = readb(&priv->regs->tecr);
+               rxerr = readb(&priv->regs->recr);
+-              if (skb) {
++              if (skb)
+                       cf->can_id |= CAN_ERR_CRTL;
+-                      cf->data[6] = txerr;
+-                      cf->data[7] = rxerr;
+-              }
+       }
+       if (eifr & RCAR_CAN_EIFR_BEIF) {
+               int rx_errors = 0, tx_errors = 0;
+@@ -339,6 +336,9 @@ static void rcar_can_error(struct net_device *ndev)
+               can_bus_off(ndev);
+               if (skb)
+                       cf->can_id |= CAN_ERR_BUSOFF;
++      } else if (skb) {
++              cf->data[6] = txerr;
++              cf->data[7] = rxerr;
+       }
+       if (eifr & RCAR_CAN_EIFR_ORIF) {
+               netdev_dbg(priv->ndev, "Receive overrun error interrupt\n");
+@@ -846,10 +846,12 @@ static int __maybe_unused rcar_can_suspend(struct device *dev)
+       struct rcar_can_priv *priv = netdev_priv(ndev);
+       u16 ctlr;
+-      if (netif_running(ndev)) {
+-              netif_stop_queue(ndev);
+-              netif_device_detach(ndev);
+-      }
++      if (!netif_running(ndev))
++              return 0;
++
++      netif_stop_queue(ndev);
++      netif_device_detach(ndev);
++
+       ctlr = readw(&priv->regs->ctlr);
+       ctlr |= RCAR_CAN_CTLR_CANM_HALT;
+       writew(ctlr, &priv->regs->ctlr);
+@@ -868,6 +870,9 @@ static int __maybe_unused rcar_can_resume(struct device *dev)
+       u16 ctlr;
+       int err;
++      if (!netif_running(ndev))
++              return 0;
++
+       err = clk_enable(priv->clk);
+       if (err) {
+               netdev_err(ndev, "clk_enable() failed, error %d\n", err);
+@@ -881,10 +886,9 @@ static int __maybe_unused rcar_can_resume(struct device *dev)
+       writew(ctlr, &priv->regs->ctlr);
+       priv->can.state = CAN_STATE_ERROR_ACTIVE;
+-      if (netif_running(ndev)) {
+-              netif_device_attach(ndev);
+-              netif_start_queue(ndev);
+-      }
++      netif_device_attach(ndev);
++      netif_start_queue(ndev);
++
+       return 0;
+ }
+diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
+index b458b5fd7900..e4f820308954 100644
+--- a/drivers/net/can/rcar/rcar_canfd.c
++++ b/drivers/net/can/rcar/rcar_canfd.c
+@@ -203,7 +203,7 @@
+ #define RCANFD_FDCFG_FDOE             BIT(28)
+ #define RCANFD_FDCFG_TDCE             BIT(9)
+ #define RCANFD_FDCFG_TDCOC            BIT(8)
+-#define RCANFD_FDCFG_TDCO(x)          (((x) & 0x7f) >> 16)
++#define RCANFD_FDCFG_TDCO(x)          (((x) & 0xff) << 16)
+ /* RSCFDnCFDRFCCx */
+ #define RCANFD_RFCC_RFIM              BIT(12)
+@@ -506,6 +506,7 @@
+ /* R-Car V3U Classical and CAN FD mode specific register map */
+ #define RCANFD_V3U_CFDCFG             (0x1314)
+ #define RCANFD_V3U_DCFG(m)            (0x1400 + (0x20 * (m)))
++#define RCANFD_V3U_FDCFG(m)           (0x1404 + (0x20 * (m)))
+ #define RCANFD_V3U_GAFL_OFFSET                (0x1800)
+@@ -574,6 +575,7 @@ struct rcar_canfd_channel {
+ enum rcar_canfd_chip_id {
+       R8A779G0,
++      R8A779F0,
+       R8A779A0,
+       GEN3,
+ };
+@@ -734,13 +736,17 @@ static int rcar_canfd_reset_controller(struct rcar_canfd_global *gpriv)
+       rcar_canfd_write(gpriv->base, RCANFD_GERFL, 0x0);
+       /* Set the controller into appropriate mode */
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+               if (gpriv->fdmode)
+-                      rcar_canfd_set_bit(gpriv->base, RCANFD_V3U_CFDCFG,
+-                                         RCANFD_FDCFG_FDOE);
++              {
++                      for_each_set_bit(ch, &gpriv->channels_mask, gpriv->max_channels)
++                              rcar_canfd_set_bit(gpriv->base, RCANFD_V3U_FDCFG(ch),
++                                                 RCANFD_FDCFG_FDOE);
++              }
+               else
+-                      rcar_canfd_set_bit(gpriv->base, RCANFD_V3U_CFDCFG,
+-                                         RCANFD_FDCFG_CLOE);
++                      for_each_set_bit(ch, &gpriv->channels_mask, gpriv->max_channels)
++                              rcar_canfd_set_bit(gpriv->base, RCANFD_V3U_FDCFG(ch),
++                                                 RCANFD_FDCFG_CLOE);
+       } else {
+               if (gpriv->fdmode)
+                       rcar_canfd_set_bit(gpriv->base, RCANFD_GRMCFG,
+@@ -801,7 +807,7 @@ static void rcar_canfd_configure_controller(struct rcar_canfd_global *gpriv)
+ }
+ static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv,
+-                                         u32 ch)
++                                         u32 ch, int num_ch_enabled)
+ {
+       u32 cfg;
+       int offset, start, page, num_rules = RCANFD_CHANNEL_NUMRULES;
+@@ -812,7 +818,7 @@ static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv,
+       } else {
+               /* Get number of Channel 0 rules and adjust */
+               cfg = rcar_canfd_read(gpriv->base, RCANFD_V3U_GAFLCFG(ch));
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
+                       start = ch * num_rules;
+               else
+                       start = RCANFD_GAFLCFG_GETRNC(0, cfg);
+@@ -821,24 +827,28 @@ static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv,
+       /* Enable write access to entry */
+       page = RCANFD_GAFL_PAGENUM(start);
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
++      {
+               rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLECTR,
+                                  (RCANFD_V3U_GAFLECTR_AFLPN(page) |
+                                       RCANFD_GAFLECTR_AFLDAE));
++      }
+       else
+               rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLECTR,
+                                  (RCANFD_GAFLECTR_AFLPN(page) |
+                                       RCANFD_GAFLECTR_AFLDAE));
+       /* Write number of rules for channel */
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
++      {
+               rcar_canfd_set_bit(gpriv->base, RCANFD_V3U_GAFLCFG(ch),
+                                  RCANFD_V3U_GAFLCFG_SETRNC(ch, num_rules));
++      }
+       else
+               rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLCFG0,
+                                  RCANFD_GAFLCFG_SETRNC(ch, num_rules));
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+               offset = RCANFD_V3U_GAFL_OFFSET;
+       } else {
+               if (gpriv->fdmode)
+@@ -848,13 +858,13 @@ static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv,
+       }
+       /* Accept all IDs */
+-      rcar_canfd_write(gpriv->base, RCANFD_GAFLID(offset, start), 0);
++      rcar_canfd_write(gpriv->base, RCANFD_GAFLID(offset, num_ch_enabled), 0);
+       /* IDE or RTR is not considered for matching */
+-      rcar_canfd_write(gpriv->base, RCANFD_GAFLM(offset, start), 0);
++      rcar_canfd_write(gpriv->base, RCANFD_GAFLM(offset, num_ch_enabled), 0);
+       /* Any data length accepted */
+-      rcar_canfd_write(gpriv->base, RCANFD_GAFLP0(offset, start), 0);
++      rcar_canfd_write(gpriv->base, RCANFD_GAFLP0(offset, num_ch_enabled), 0);
+       /* Place the msg in corresponding Rx FIFO entry */
+-      rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLP1(offset, start),
++      rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLP1(offset, num_ch_enabled),
+                          RCANFD_GAFLP1_GAFLFDP(ridx));
+       /* Disable write access to page */
+@@ -879,10 +889,14 @@ static void rcar_canfd_configure_rx(struct rcar_canfd_global *gpriv, u32 ch)
+       cfg = (RCANFD_RFCC_RFIM | RCANFD_RFCC_RFDC(rfdc) |
+               RCANFD_RFCC_RFPLS(rfpls) | RCANFD_RFCC_RFIE);
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
++      {
+               rcar_canfd_write(gpriv->base, RCANFD_V3U_RFCC(ridx), cfg);
++      }
+       else
++      {
+               rcar_canfd_write(gpriv->base, RCANFD_RFCC(ridx), cfg);
++      }
+ }
+ static void rcar_canfd_configure_tx(struct rcar_canfd_global *gpriv, u32 ch)
+@@ -904,7 +918,7 @@ static void rcar_canfd_configure_tx(struct rcar_canfd_global *gpriv, u32 ch)
+       else
+               cfpls = 0;      /* b000 - Max 8 bytes payload */
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+               cfg = (RCANFD_V3U_CFCC_CFTML(cftml) | RCANFD_V3U_CFCC_CFM(cfm) |
+                       RCANFD_V3U_CFCC_CFIM | RCANFD_V3U_CFCC_CFDC(cfdc) |
+                       RCANFD_V3U_CFCC_CFPLS(cfpls) | RCANFD_V3U_CFCC_CFTXIE);
+@@ -919,8 +933,10 @@ static void rcar_canfd_configure_tx(struct rcar_canfd_global *gpriv, u32 ch)
+       }
+       if (gpriv->fdmode) {
+               /* Clear FD mode specific control/status register */
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
++              {
+                       addr = RCANFD_V3U_CFFDCSTS(ch, RCANFD_CFFIFO_IDX);
++              }
+               else
+                       addr = RCANFD_F_CFFDCSTS(ch, RCANFD_CFFIFO_IDX);
+@@ -938,7 +954,9 @@ static void rcar_canfd_enable_global_interrupts(struct rcar_canfd_global *gpriv)
+       /* Global interrupts setup */
+       ctr = RCANFD_GCTR_MEIE;
+       if (gpriv->fdmode)
++      {
+               ctr |= RCANFD_GCTR_CFMPOFIE;
++      }
+       rcar_canfd_set_bit(gpriv->base, RCANFD_GCTR, ctr);
+ }
+@@ -1005,7 +1023,7 @@ static void rcar_canfd_global_error(struct net_device *ndev)
+               stats->tx_dropped++;
+       }
+       if (gerfl & RCANFD_GERFL_MES) {
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
+                       addr = RCANFD_V3U_CFSTS(ch, RCANFD_CFFIFO_IDX);
+               else
+                       addr = RCANFD_CFSTS(ch, RCANFD_CFFIFO_IDX);
+@@ -1018,7 +1036,7 @@ static void rcar_canfd_global_error(struct net_device *ndev)
+                       rcar_canfd_write(priv->base, addr,
+                                        sts & ~RCANFD_CFSTS_CFMLT);
+               }
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
+                       addr = RCANFD_V3U_RFSTS(ridx);
+               else
+                       addr = RCANFD_RFSTS(ridx);
+@@ -1171,8 +1189,10 @@ static void rcar_canfd_tx_done(struct net_device *ndev)
+       u32 ch = priv->channel;
+       struct rcar_canfd_global *gpriv = priv->gpriv;
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
++      {
+               addr = RCANFD_V3U_CFSTS(ch, RCANFD_CFFIFO_IDX);
++      }
+       else
+               addr = RCANFD_CFSTS(ch, RCANFD_CFFIFO_IDX);
+@@ -1227,7 +1247,7 @@ static irqreturn_t rcar_canfd_global_interrupt(int irq, void *dev_id)
+               /* Global error interrupts */
+               gerfl = rcar_canfd_read(priv->base, RCANFD_GERFL);
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+                       if (unlikely(RCANFD_V3U_GERFL_ERR(gpriv, gerfl)))
+                               rcar_canfd_global_error(ndev);
+               } else {
+@@ -1235,7 +1255,7 @@ static irqreturn_t rcar_canfd_global_interrupt(int irq, void *dev_id)
+                               rcar_canfd_global_error(ndev);
+               }
+               /* Handle Rx interrupts */
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+                       addr1 = RCANFD_V3U_RFSTS(ridx);
+                       addr2 = RCANFD_V3U_RFCC(ridx);
+               } else {
+@@ -1307,6 +1327,7 @@ static irqreturn_t rcar_canfd_channel_interrupt(int irq, void *dev_id)
+               sts = rcar_canfd_read(priv->base, RCANFD_CSTS(ch));
+               txerr = RCANFD_CSTS_TECCNT(sts);
+               rxerr = RCANFD_CSTS_RECCNT(sts);
++              
+               if (unlikely(RCANFD_CERFL_ERR(cerfl)))
+                       rcar_canfd_error(ndev, cerfl, txerr, rxerr);
+@@ -1316,19 +1337,57 @@ static irqreturn_t rcar_canfd_channel_interrupt(int irq, void *dev_id)
+                       rcar_canfd_state_change(ndev, txerr, rxerr);
+               /* Handle Tx interrupts */
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
++              {
+                       addr = RCANFD_V3U_CFSTS(ch, RCANFD_CFFIFO_IDX);
++              }
+               else
++              {
+                       addr = RCANFD_CFSTS(ch, RCANFD_CFFIFO_IDX);
++              }
+               sts = rcar_canfd_read(priv->base, addr);
+               if (likely(sts & RCANFD_CFSTS_CFTXIF))
++              {
+                       rcar_canfd_tx_done(ndev);
++              }
+       }
+       return IRQ_HANDLED;
+ }
++static void rcar_canfd_set_samplepoint(struct net_device *dev)
++{
++      struct rcar_canfd_channel *priv = netdev_priv(dev);
++      u32 ch = priv->channel;
++      u16 tdco;
++      u32 cfg;
++      struct rcar_canfd_global *gpriv = priv->gpriv;
++
++      /* Sample point settings */
++      tdco = 2; /* TDCO = 2Tq */
++
++      /* Transceiver Delay Compensation Offset Configuration */
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
++              cfg = (RCANFD_FDCFG_TDCE |
++                         RCANFD_FDCFG_TDCO(tdco));
++              rcar_canfd_set_bit(priv->base, RCANFD_V3U_FDCFG(ch), cfg);
++      }
++}
++
++static void rcar_canfd_unset_samplepoint(struct net_device *dev)
++{
++      struct rcar_canfd_channel *priv = netdev_priv(dev);
++      u32 ch = priv->channel;
++      u32 cfg;
++      struct rcar_canfd_global *gpriv = priv->gpriv;
++
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
++              cfg = RCANFD_FDCFG_TDCE; /* Disable TDC */
++              rcar_canfd_clear_bit(priv->base, RCANFD_V3U_FDCFG(ch), cfg);
++      }
++}
++
+ static void rcar_canfd_set_bittiming(struct net_device *dev)
+ {
+       struct rcar_canfd_channel *priv = netdev_priv(dev);
+@@ -1342,12 +1401,12 @@ static void rcar_canfd_set_bittiming(struct net_device *dev)
+       /* Nominal bit timing settings */
+       brp = bt->brp - 1;
+       sjw = bt->sjw - 1;
+-      tseg1 = bt->prop_seg + bt->phase_seg1 + 1;
++      tseg1 = bt->prop_seg + bt->phase_seg1 - 1;
+       tseg2 = bt->phase_seg2 - 1;
+       if (priv->can.ctrlmode & CAN_CTRLMODE_FD) {
+               /* CAN FD only mode */
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
+                       cfg = (RCANFD_V3U_NCFG_NTSEG1(tseg1) |
+                              RCANFD_V3U_NCFG_NBRP(brp) |
+                              RCANFD_V3U_NCFG_NSJW(sjw) |
+@@ -1365,10 +1424,16 @@ static void rcar_canfd_set_bittiming(struct net_device *dev)
+               /* Data bit timing settings */
+               brp = dbt->brp - 1;
+               sjw = dbt->sjw - 1;
+-              tseg1 = dbt->prop_seg + dbt->phase_seg1 + 1;
++              tseg1 = dbt->prop_seg + dbt->phase_seg1 - 1;
+               tseg2 = dbt->phase_seg2 - 1;
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++              /* Set Secondary Sample Point for high baud rate */
++              if (brp == 0 && tseg1 <= 5 && tseg2 == 1)
++                      rcar_canfd_set_samplepoint(dev);
++              else
++                      rcar_canfd_unset_samplepoint(dev);
++
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+                       cfg = (RCANFD_V3U_DCFG_DTSEG1(tseg1) |
+                              RCANFD_V3U_DCFG_DBRP(brp) |
+                              RCANFD_V3U_DCFG_DSJW(sjw) |
+@@ -1387,7 +1452,7 @@ static void rcar_canfd_set_bittiming(struct net_device *dev)
+                          brp, sjw, tseg1, tseg2);
+       } else {
+               /* Classical CAN only mode */
+-              if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++              if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
+                       cfg = (RCANFD_V3U_NCFG_NTSEG1(tseg1) |
+                              RCANFD_V3U_NCFG_NBRP(brp) |
+                              RCANFD_V3U_NCFG_NSJW(sjw) |
+@@ -1430,7 +1495,7 @@ static int rcar_canfd_start(struct net_device *ndev)
+       }
+       /* Enable Common & Rx FIFO */
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+               addr1 = RCANFD_V3U_CFCC(ch, RCANFD_CFFIFO_IDX);
+               addr2 = RCANFD_V3U_RFCC(ridx);
+       } else {
+@@ -1505,7 +1570,7 @@ static void rcar_canfd_stop(struct net_device *ndev)
+       rcar_canfd_disable_channel_interrupts(priv);
+       /* Disable Common & Rx FIFO */
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+               addr1 = RCANFD_V3U_CFCC(ch, RCANFD_CFFIFO_IDX);
+               addr2 = RCANFD_V3U_RFCC(ridx);
+       } else {
+@@ -1544,7 +1609,9 @@ static netdev_tx_t rcar_canfd_start_xmit(struct sk_buff *skb,
+       struct rcar_canfd_global *gpriv = priv->gpriv;
+       if (can_dropped_invalid_skb(ndev, skb))
++      {
+               return NETDEV_TX_OK;
++      }
+       if (cf->can_id & CAN_EFF_FLAG) {
+               id = cf->can_id & CAN_EFF_MASK;
+@@ -1554,11 +1621,13 @@ static netdev_tx_t rcar_canfd_start_xmit(struct sk_buff *skb,
+       }
+       if (cf->can_id & CAN_RTR_FLAG)
++      {
+               id |= RCANFD_CFID_CFRTR;
++      }
+       dlc = RCANFD_CFPTR_CFDLC(can_len2dlc(cf->len));
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+               rcar_canfd_write(priv->base,
+                                RCANFD_V3U_CFID(ch, RCANFD_CFFIFO_IDX), id);
+               rcar_canfd_write(priv->base,
+@@ -1622,7 +1691,7 @@ static netdev_tx_t rcar_canfd_start_xmit(struct sk_buff *skb,
+       /* Start Tx: Write 0xff to CFPC to increment the CPU-side
+        * pointer for the Common FIFO
+        */
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
+               addr = RCANFD_V3U_CFPCTR(ch, RCANFD_CFFIFO_IDX);
+       else
+               addr = RCANFD_CFPCTR(ch, RCANFD_CFFIFO_IDX);
+@@ -1630,6 +1699,7 @@ static netdev_tx_t rcar_canfd_start_xmit(struct sk_buff *skb,
+       rcar_canfd_write(priv->base, addr, 0xff);
+       spin_unlock_irqrestore(&priv->tx_lock, flags);
++
+       return NETDEV_TX_OK;
+ }
+@@ -1643,7 +1713,7 @@ static void rcar_canfd_rx_pkt(struct rcar_canfd_channel *priv)
+       u32 ridx = ch + RCANFD_RFFIFO_IDX;
+       struct rcar_canfd_global *gpriv = priv->gpriv;
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+               id = rcar_canfd_read(priv->base, RCANFD_V3U_RFID(ridx));
+               dlc = rcar_canfd_read(priv->base, RCANFD_V3U_RFPTR(ridx));
+               if (priv->can.ctrlmode & CAN_CTRLMODE_FD) {
+@@ -1707,7 +1777,7 @@ static void rcar_canfd_rx_pkt(struct rcar_canfd_channel *priv)
+                       if (sts & RCANFD_RFFDSTS_RFBRS)
+                               cf->flags |= CANFD_BRS;
+-                      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++                      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
+                               rcar_canfd_get_data(priv, cf,
+                                                   RCANFD_V3U_RFDF(ridx, 0));
+                       else
+@@ -1719,7 +1789,7 @@ static void rcar_canfd_rx_pkt(struct rcar_canfd_channel *priv)
+               if (id & RCANFD_RFID_RFRTR)
+                       cf->can_id |= CAN_RTR_FLAG;
+               else
+-                      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++                      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
+                               rcar_canfd_get_data(priv, cf,
+                                                   RCANFD_V3U_RFDF(ridx, 0));
+                       else
+@@ -1730,7 +1800,7 @@ static void rcar_canfd_rx_pkt(struct rcar_canfd_channel *priv)
+       /* Write 0xff to RFPC to increment the CPU-side
+        * pointer of the Rx FIFO
+        */
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0))
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0)
+               rcar_canfd_write(priv->base, RCANFD_V3U_RFPCTR(ridx), 0xff);
+       else
+               rcar_canfd_write(priv->base, RCANFD_RFPCTR(ridx), 0xff);
+@@ -1752,7 +1822,7 @@ static int rcar_canfd_rx_poll(struct napi_struct *napi, int quota)
+       u32 ridx = ch + RCANFD_RFFIFO_IDX, addr1, addr2;
+       struct rcar_canfd_global *gpriv = priv->gpriv;
+-      if ((gpriv->chip_id == R8A779A0) || (gpriv->chip_id == R8A779G0)) {
++      if (gpriv->chip_id == R8A779A0 || gpriv->chip_id == R8A779G0 || gpriv->chip_id == R8A779F0) {
+               addr1 = RCANFD_V3U_RFSTS(ridx);
+               addr2 = RCANFD_V3U_RFCC(ridx);
+       } else {
+@@ -1867,15 +1937,15 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
+       netif_napi_add(ndev, &priv->napi, rcar_canfd_rx_poll,
+                      RCANFD_NAPI_WEIGHT);
++      spin_lock_init(&priv->tx_lock);
++      devm_can_led_init(ndev);
++      gpriv->ch[priv->channel] = priv;
+       err = register_candev(ndev);
+       if (err) {
+               dev_err(&pdev->dev,
+                       "register_candev() failed, error %d\n", err);
+               goto fail_candev;
+       }
+-      spin_lock_init(&priv->tx_lock);
+-      devm_can_led_init(ndev);
+-      gpriv->ch[priv->channel] = priv;
+       dev_info(&pdev->dev, "device registered (channel %u)\n", priv->channel);
+       return 0;
+@@ -1904,7 +1974,8 @@ static int rcar_canfd_probe(struct platform_device *pdev)
+       struct rcar_canfd_global *gpriv;
+       struct device_node *of_child;
+       unsigned long channels_mask = 0;
+-      int err, ch_irq, g_irq, i;
++      int err, g_irq, ch_irq, i, num_ch_enabled = 0;
++      int ch_irq_s4[RCANFD_NUM_CHANNELS] = {0, 0, 0, 0, 0, 0, 0, 0};
+       bool fdmode = true;                     /* CAN FD only mode - default */
+       const struct rcar_canfd_of_data *of_data;
+       char *name[RCANFD_NUM_CHANNELS] = {
+@@ -1925,13 +1996,28 @@ static int rcar_canfd_probe(struct platform_device *pdev)
+                       channels_mask |= BIT(i);        /* Channel i */
+       }
+-      ch_irq = platform_get_irq(pdev, 0);
++      /*      ch_irq = platform_get_irq(pdev, 0);
+       if (ch_irq < 0) {
+               err = ch_irq;
+               goto fail_dev;
+       }
+       g_irq = platform_get_irq(pdev, 1);
++      if (g_irq < 0) {
++              err = g_irq;
++              goto fail_dev;
++      } */
++      
++      /* Porting for R8A779F0 */
++      for (i = 0; i < RCANFD_NUM_CHANNELS; i++) {
++              ch_irq_s4[i] = platform_get_irq(pdev, i + 1);
++              if (ch_irq_s4[i] < 0) {
++                      err = ch_irq_s4[i];
++                      goto fail_dev;
++              }
++      }
++
++      g_irq = platform_get_irq(pdev, 0);
+       if (g_irq < 0) {
+               err = g_irq;
+               goto fail_dev;
+@@ -1950,13 +2036,14 @@ static int rcar_canfd_probe(struct platform_device *pdev)
+       gpriv->max_channels = of_data->max_channels;
+       /* Peripheral clock */
+-      gpriv->clkp = devm_clk_get(&pdev->dev, "fck");
++      /* Porting for R8A779F0, not use fck */
++      /* gpriv->clkp = devm_clk_get(&pdev->dev, "fck");
+       if (IS_ERR(gpriv->clkp)) {
+               err = PTR_ERR(gpriv->clkp);
+               dev_err(&pdev->dev, "cannot get peripheral clock, error %d\n",
+                       err);
+               goto fail_dev;
+-      }
++      } */
+       /* fCAN clock: Pick External clock. If not available fallback to
+        * CANFD clock
+@@ -1971,15 +2058,16 @@ static int rcar_canfd_probe(struct platform_device *pdev)
+                       goto fail_dev;
+               }
+               gpriv->fcan = RCANFD_CANFDCLK;
+-
+       } else {
+               gpriv->fcan = RCANFD_EXTCLK;
+       }
+       fcan_freq = clk_get_rate(gpriv->can_clk);
+       if (gpriv->fcan == RCANFD_CANFDCLK)
++      {
+               /* CANFD clock is further divided by (1/2) within the IP */
+               fcan_freq /= 2;
++      }
+       addr = devm_platform_ioremap_resource(pdev, 0);
+       if (IS_ERR(addr)) {
+@@ -1989,14 +2077,27 @@ static int rcar_canfd_probe(struct platform_device *pdev)
+       gpriv->base = addr;
+       /* Request IRQ that's common for both channels */
+-      err = devm_request_irq(&pdev->dev, ch_irq,
+-                             rcar_canfd_channel_interrupt, 0,
+-                             "canfd.chn", gpriv);
++      /*      err = devm_request_irq(&pdev->dev, ch_irq,
++                              rcar_canfd_channel_interrupt, 0,
++                              "canfd.chn", gpriv);
+       if (err) {
+               dev_err(&pdev->dev, "devm_request_irq(%d) failed, error %d\n",
+                       ch_irq, err);
+               goto fail_dev;
++      } */
++
++      /* Porting for R8A779F0 */
++      for (i = 0; i < RCANFD_NUM_CHANNELS; i++) {
++              err = devm_request_irq(&pdev->dev, ch_irq_s4[i],
++                                      rcar_canfd_channel_interrupt, 0,
++                                      "canfd.chn", gpriv);
++              if (err) {
++                      dev_err(&pdev->dev, "devm_request_irq(%d) failed, error %d\n",
++                              ch_irq_s4[i], err);
++                      goto fail_dev;
++              }
+       }
++
+       err = devm_request_irq(&pdev->dev, g_irq,
+                              rcar_canfd_global_interrupt, 0,
+                              "canfd.gbl", gpriv);
+@@ -2032,7 +2133,8 @@ static int rcar_canfd_probe(struct platform_device *pdev)
+               rcar_canfd_configure_tx(gpriv, ch);
+               /* Configure receive rules */
+-              rcar_canfd_configure_afl_rules(gpriv, ch);
++              rcar_canfd_configure_afl_rules(gpriv, ch, num_ch_enabled);
++              num_ch_enabled++;
+       }
+       /* Configure common interrupts */
+@@ -2109,6 +2211,11 @@ static const struct rcar_canfd_of_data of_rcanfd_v4h_compatible = {
+       .max_channels = 8,
+ };
++static const struct rcar_canfd_of_data of_rcanfd_s4_compatible = {
++      .chip_id = R8A779F0,
++      .max_channels = 8,
++};
++
+ static const struct rcar_canfd_of_data of_rcanfd_v3u_compatible = {
+       .chip_id = R8A779A0,
+       .max_channels = 8,
+@@ -2124,6 +2231,10 @@ static const struct of_device_id rcar_canfd_of_table[] = {
+               .compatible = "renesas,r8a779g0-canfd",
+               .data = &of_rcanfd_v4h_compatible,
+       },
++      {
++              .compatible = "renesas,r8a779f0-canfd",
++              .data = &of_rcanfd_s4_compatible,
++      },
+       {
+               .compatible = "renesas,r8a779a0-canfd",
+               .data = &of_rcanfd_v3u_compatible,
+diff --git a/drivers/pinctrl/renesas/pfc-r8a779f0.c b/drivers/pinctrl/renesas/pfc-r8a779f0.c
+index de01d4d6b1b1..822b4f7e450f 100644
+--- a/drivers/pinctrl/renesas/pfc-r8a779f0.c
++++ b/drivers/pinctrl/renesas/pfc-r8a779f0.c
+@@ -11,8 +11,10 @@
+ #include <linux/io.h>
+ #include <linux/kernel.h>
++#include "core.h"
+ #include "sh_pfc.h"
++#define ENABLE_ACCESS_TO_CONTROL_DOMAIN
+ #define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN)
+ #define CPU_ALL_GP(fn, sfx)   \
+@@ -1170,6 +1172,150 @@ static const struct sh_pfc_pin pinmux_pins[] = {
+       PINMUX_GPIO_GP_ALL(),
+ };
++/* - CANFD0 ----------------------------------------------------------------- */
++static const unsigned int canfd0_data_pins[] = {
++      /* CANFD0_TX, CANFD0_RX */
++      RCAR_GP_PIN(7, 0), RCAR_GP_PIN(7, 1),
++};
++static const unsigned int canfd0_data_mux[] = {
++      CAN0TX_MARK, CAN0RX_INTP0_MARK,
++};
++
++/* - CANFD1 ----------------------------------------------------------------- */
++static const unsigned int canfd1_data_pins[] = {
++      /* CANFD1_TX, CANFD1_RX */
++      RCAR_GP_PIN(7, 2), RCAR_GP_PIN(7, 3),
++};
++static const unsigned int canfd1_data_mux[] = {
++      CAN1TX_MARK, CAN1RX_INTP1_MARK,
++};
++
++/* - CANFD2 ----------------------------------------------------------------- */
++static const unsigned int canfd2_data_pins[] = {
++      /* CANFD2_TX, CANFD2_RX */
++      RCAR_GP_PIN(7, 4), RCAR_GP_PIN(7, 5),
++};
++static const unsigned int canfd2_data_mux[] = {
++      CAN2TX_MARK, CAN2RX_INTP2_MARK,
++};
++
++/* - CANFD3 ----------------------------------------------------------------- */
++static const unsigned int canfd3_data_pins[] = {
++      /* CANFD2_TX, CANFD2_RX */
++      RCAR_GP_PIN(7, 6), RCAR_GP_PIN(7, 7),
++};
++static const unsigned int canfd3_data_mux[] = {
++      CAN3TX_MARK, CAN3RX_INTP3_MARK,
++};
++
++/* - CANFD4 ----------------------------------------------------------------- */
++static const unsigned int canfd4_data_pins[] = {
++      /* CANFD4_TX, CANFD4_RX */
++      RCAR_GP_PIN(7, 8), RCAR_GP_PIN(7, 9),
++};
++static const unsigned int canfd4_data_mux[] = {
++      CAN4TX_MARK, CAN4RX_INTP4_MARK,
++};
++
++/* - CANFD5 ----------------------------------------------------------------- */
++static const unsigned int canfd5_data_pins[] = {
++      /* CANFD5_TX, CANFD5_RX */
++      RCAR_GP_PIN(7, 10), RCAR_GP_PIN(7, 11),
++};
++static const unsigned int canfd5_data_mux[] = {
++      CAN5TX_MARK, CAN5RX_INTP5_MARK,
++};
++
++/* - CANFD6 ----------------------------------------------------------------- */
++static const unsigned int canfd6_data_pins[] = {
++      /* CANFD6_TX, CANFD6_RX */
++      RCAR_GP_PIN(7, 12), RCAR_GP_PIN(7, 13),
++};
++static const unsigned int canfd6_data_mux[] = {
++      CAN6TX_MARK, CAN6RX_INTP6_MARK,
++};
++
++/* - CANFD7 ----------------------------------------------------------------- */
++static const unsigned int canfd7_data_pins[] = {
++      /* CANFD7_TX, CANFD7_RX */
++      RCAR_GP_PIN(7, 14), RCAR_GP_PIN(7, 15),
++};
++static const unsigned int canfd7_data_mux[] = {
++      CAN7TX_MARK, CAN7RX_INTP7_MARK,
++};
++
++/* - CANFD8 ----------------------------------------------------------------- */
++static const unsigned int canfd8_data_pins[] = {
++      /* CANFD8_TX, CANFD8_RX */
++      RCAR_GP_PIN(7, 16), RCAR_GP_PIN(7, 17),
++};
++static const unsigned int canfd8_data_mux[] = {
++      CAN8TX_MARK, CAN8RX_INTP8_MARK,
++};
++
++/* - CANFD9 ----------------------------------------------------------------- */
++static const unsigned int canfd9_data_pins[] = {
++      /* CANFD9_TX, CANFD9_RX */
++      RCAR_GP_PIN(7, 18), RCAR_GP_PIN(7, 19),
++};
++static const unsigned int canfd9_data_mux[] = {
++      CAN9TX_MARK, CAN9RX_INTP9_MARK,
++};
++
++/* - CANFD10 ----------------------------------------------------------------- */
++static const unsigned int canfd10_data_pins[] = {
++      /* CANFD10_TX, CANFD10_RX */
++      RCAR_GP_PIN(7, 20), RCAR_GP_PIN(7, 21),
++};
++static const unsigned int canfd10_data_mux[] = {
++      CAN10TX_MARK, CAN10RX_INTP10_MARK,
++};
++
++/* - CANFD11 ----------------------------------------------------------------- */
++static const unsigned int canfd11_data_pins[] = {
++      /* CANFD11_TX, CANFD11_RX */
++      RCAR_GP_PIN(7, 22), RCAR_GP_PIN(7, 23),
++};
++static const unsigned int canfd11_data_mux[] = {
++      CAN11TX_MARK, CAN11RX_INTP11_MARK,
++};
++
++/* - CANFD12 ----------------------------------------------------------------- */
++static const unsigned int canfd12_data_pins[] = {
++      /* CANFD12_TX, CANFD12_RX */
++      RCAR_GP_PIN(7, 24), RCAR_GP_PIN(7, 25),
++};
++static const unsigned int canfd12_data_mux[] = {
++      CAN12TX_MARK, CAN12RX_INTP12_MARK,
++};
++
++/* - CANFD13 ----------------------------------------------------------------- */
++static const unsigned int canfd13_data_pins[] = {
++      /* CANFD13_TX, CANFD13_RX */
++      RCAR_GP_PIN(7, 26), RCAR_GP_PIN(7, 27),
++};
++static const unsigned int canfd13_data_mux[] = {
++      CAN13TX_MARK, CAN13RX_INTP13_MARK,
++};
++
++/* - CANFD14 ----------------------------------------------------------------- */
++static const unsigned int canfd14_data_pins[] = {
++      /* CANFD14_TX, CANFD14_RX */
++      RCAR_GP_PIN(7, 28), RCAR_GP_PIN(7, 29),
++};
++static const unsigned int canfd14_data_mux[] = {
++      CAN14TX_MARK, CAN14RX_INTP14_MARK,
++};
++
++/* - CANFD15 ----------------------------------------------------------------- */
++static const unsigned int canfd15_data_pins[] = {
++      /* CANFD15_TX, CANFD15_RX */
++      RCAR_GP_PIN(7, 30), RCAR_GP_PIN(7, 31),
++};
++static const unsigned int canfd15_data_mux[] = {
++      CAN15TX_MARK, CAN15RX_INTP15_MARK,
++};
++
+ /* - TSN0 ------------------------------------------------ */
+ static const unsigned int tsn0_link_pins[] = {
+       /* TSN0_LINK */
+@@ -1893,6 +2039,88 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
+       SH_PFC_PIN_GROUP(taud1_pwm5),
+       SH_PFC_PIN_GROUP(taud1_pwm6),
+       SH_PFC_PIN_GROUP(taud1_pwm7),
++
++      SH_PFC_PIN_GROUP(canfd0_data),
++      SH_PFC_PIN_GROUP(canfd1_data),
++      SH_PFC_PIN_GROUP(canfd2_data),
++      SH_PFC_PIN_GROUP(canfd3_data),
++      SH_PFC_PIN_GROUP(canfd4_data),
++      SH_PFC_PIN_GROUP(canfd5_data),
++      SH_PFC_PIN_GROUP(canfd6_data),
++      SH_PFC_PIN_GROUP(canfd7_data),
++
++      SH_PFC_PIN_GROUP(canfd8_data),
++      SH_PFC_PIN_GROUP(canfd9_data),
++      SH_PFC_PIN_GROUP(canfd10_data),
++      SH_PFC_PIN_GROUP(canfd11_data),
++      SH_PFC_PIN_GROUP(canfd12_data),
++      SH_PFC_PIN_GROUP(canfd13_data),
++      SH_PFC_PIN_GROUP(canfd14_data),
++      SH_PFC_PIN_GROUP(canfd15_data),
++};
++
++static const char * const canfd0_groups[] = {
++      "canfd0_data",
++};
++
++static const char * const canfd1_groups[] = {
++      "canfd1_data",
++};
++
++static const char * const canfd2_groups[] = {
++      "canfd2_data",
++};
++
++static const char * const canfd3_groups[] = {
++      "canfd3_data",
++};
++
++static const char * const canfd4_groups[] = {
++      "canfd4_data",
++};
++
++static const char * const canfd5_groups[] = {
++      "canfd5_data",
++};
++
++static const char * const canfd6_groups[] = {
++      "canfd6_data",
++};
++
++static const char * const canfd7_groups[] = {
++      "canfd7_data",
++};
++
++static const char * const canfd8_groups[] = {
++      "canfd8_data",
++};
++
++static const char * const canfd9_groups[] = {
++      "canfd9_data",
++};
++
++static const char * const canfd10_groups[] = {
++      "canfd10_data",
++};
++
++static const char * const canfd11_groups[] = {
++      "canfd11_data",
++};
++
++static const char * const canfd12_groups[] = {
++      "canfd12_data",
++};
++
++static const char * const canfd13_groups[] = {
++      "canfd13_data",
++};
++
++static const char * const canfd14_groups[] = {
++      "canfd14_data",
++};
++
++static const char * const canfd15_groups[] = {
++      "canfd15_data",
+ };
+ static const char * const tsn0_groups[] = {
+@@ -2050,6 +2278,24 @@ static const char * const taud1_pwm_groups[] = {
+ };
+ static const struct sh_pfc_function pinmux_functions[] = {
++      SH_PFC_FUNCTION(canfd0),
++      SH_PFC_FUNCTION(canfd1),
++      SH_PFC_FUNCTION(canfd2),
++      SH_PFC_FUNCTION(canfd3),
++      SH_PFC_FUNCTION(canfd4),
++      SH_PFC_FUNCTION(canfd5),
++      SH_PFC_FUNCTION(canfd6),
++      SH_PFC_FUNCTION(canfd7),
++
++      SH_PFC_FUNCTION(canfd8),
++      SH_PFC_FUNCTION(canfd9),
++      SH_PFC_FUNCTION(canfd10),
++      SH_PFC_FUNCTION(canfd11),
++      SH_PFC_FUNCTION(canfd12),
++      SH_PFC_FUNCTION(canfd13),
++      SH_PFC_FUNCTION(canfd14),
++      SH_PFC_FUNCTION(canfd15),
++      
+       SH_PFC_FUNCTION(tsn0),
+       SH_PFC_FUNCTION(tsn1),
+       SH_PFC_FUNCTION(tsn2),
+-- 
+2.25.1
+
index d565da8..4baf075 100644 (file)
@@ -1,3 +1,9 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = " \
+    ${@bb.utils.contains('MACHINE_FEATURES', 'canfd', 'file://0001-Porting-to-support-device-driver-Canfd-from-Control-.patch', '', d)} \
+"
+
 do_install:append () {
 
     # Remove firmware file that is not packaged in the kernel.
diff --git a/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch b/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch
new file mode 100644 (file)
index 0000000..461df7a
--- /dev/null
@@ -0,0 +1,82 @@
+From 7335a36d0b5c1c597566f9aa3f458a5b6817c3b4 Mon Sep 17 00:00:00 2001
+From: aurel32 <aurelien@aurel32.net>
+Date: Fri, 22 Mar 2024 14:21:13 -0700
+Subject: [PATCH] PR #1644: unscaledcycleclock: remove RISC-V support
+
+Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1644
+
+Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on RISC-V and can't be used directly from userland. There is a sysctl option to change that as a transition period, but it will eventually disappear.
+
+The RDTIME instruction is another less accurate alternative, however its frequency varies from board to board, and there is currently now way to get its frequency from userland [2].
+
+Therefore this patch just removes the code for unscaledcycleclock on RISC-V. Without processor specific implementation, abseil relies on std::chrono::steady_clock::now().time_since_epoch() which is basically a wrapper around clock_gettime (CLOCK_MONOTONIC), which in turns use __vdso_clock_gettime(). On RISC-V this VDSO is just a wrapper around RDTIME correctly scaled to use nanoseconds units.
+
+This fixes the testsuite on riscv64, tested on a VisionFive 2 board.
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3
+[2] https://github.com/abseil/abseil-cpp/pull/1631
+Merge 43356a2548cfde76e164d446cb69004b488c6a71 into 76f8011beabdaee872b5fde7546e02407b220cb1
+
+Merging this change closes #1644
+
+COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1644 from aurel32:rv64-no-unscaledcycleclock 43356a2548cfde76e164d446cb69004b488c6a71
+PiperOrigin-RevId: 618286262
+Change-Id: Ie4120a727e7d0bb185df6e06ea145c780ebe6652
+
+Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/7335a36d]
+[Adapted to apply on top of meta-oe's patch stack]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ absl/base/internal/unscaledcycleclock.cc       | 12 ------------
+ absl/base/internal/unscaledcycleclock_config.h |  5 ++---
+ 2 files changed, 2 insertions(+), 15 deletions(-)
+
+diff --git a/absl/base/internal/unscaledcycleclock.cc b/absl/base/internal/unscaledcycleclock.cc
+index f11fecb3..103b4f6a 100644
+--- a/absl/base/internal/unscaledcycleclock.cc
++++ b/absl/base/internal/unscaledcycleclock.cc
+@@ -121,18 +121,6 @@ double UnscaledCycleClock::Frequency() {
+   return aarch64_timer_frequency;
+ }
+-#elif defined(__riscv)
+-
+-int64_t UnscaledCycleClock::Now() {
+-  int64_t virtual_timer_value;
+-  asm volatile("rdcycle %0" : "=r"(virtual_timer_value));
+-  return virtual_timer_value;
+-}
+-
+-double UnscaledCycleClock::Frequency() {
+-  return base_internal::NominalCPUFrequency();
+-}
+-
+ #elif defined(_M_IX86) || defined(_M_X64)
+ #pragma intrinsic(__rdtsc)
+diff --git a/absl/base/internal/unscaledcycleclock_config.h b/absl/base/internal/unscaledcycleclock_config.h
+index 5e232c1a..83552fc5 100644
+--- a/absl/base/internal/unscaledcycleclock_config.h
++++ b/absl/base/internal/unscaledcycleclock_config.h
+@@ -22,7 +22,6 @@
+ // The following platforms have an implementation of a hardware counter.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
+     ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
+-    defined(__riscv) ||     \
+     defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
+ #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
+ #else
+@@ -54,8 +53,8 @@
+ #if ABSL_USE_UNSCALED_CYCLECLOCK
+ // This macro can be used to test if UnscaledCycleClock::Frequency()
+ // is NominalCPUFrequency() on a particular platform.
+-#if (defined(__i386__) || defined(__x86_64__) || defined(__riscv) || \
+-     defined(_M_IX86) || defined(_M_X64))
++#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \
++     defined(_M_X64))
+ #define ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY
+ #endif
+ #endif
+-- 
+2.44.0
+
diff --git a/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bbappend b/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bbappend
new file mode 100644 (file)
index 0000000..2bf4712
--- /dev/null
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI += "file://0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch"
index 266a06d..cd18f4c 100644 (file)
@@ -11,7 +11,7 @@ DISTRO_NAME = "Automotive Grade Linux"
 # Release flags
 DISTRO_CODENAME = "ricefish"
 AGL_BRANCH = "master"
-AGLVERSION = "17.90.0"
+AGLVERSION = "17.92.0"
 
 # switch  devel/release
 #AGLRELEASETYPE ?= "agldevelopment"
@@ -29,8 +29,8 @@ DISTRO_BRANCH_VERSION_TAG = "${DISTRO_CODENAME}/${@'${DISTRO_VERSION}'.replace('
 # reproducible builds:
 # Set the desired timestamps
 # E.g. update for (major) releases
-export SOURCE_DATE_EPOCH = "1706800000"
-REPRODUCIBLE_TIMESTAMP_ROOTFS = "1706800000"
+export SOURCE_DATE_EPOCH = "1718892136"
+REPRODUCIBLE_TIMESTAMP_ROOTFS = "1718892136"
 
 
 # SDK
index 09ae726..2e77ae5 100644 (file)
@@ -6,30 +6,21 @@ Common targets are:
     * agl-image-minimal-crosssdk    (crosssdk for ^^)
 
     * agl-image-weston              (minimal filesystem with weston)
+    * agl-image-compositor          (minimal filesystem with AGL compositor)
 
 - meta-agl-demo:                    (IVI demo with UI)
   - with 'agl-demo'
-    * agl-image-ivi                 (base for IVI targets)
-    * agl-image-ivi-crosssdk        (sdk for ^^)
+    * agl-ivi-image                 (base for IVI targets)
+    * agl-ivi-image-crosssdk        (sdk for ^^)
 
-    * agl-image-graphical-qt5       (weston plus qt5 framework libs)
-    * agl-image-graphical-qt5-crosssdk  (sdk for ^^)
+    * agl-ivi-demo-qt               (IVI Qt demo image)
+    * agl-ivi-demo-qt-crosssdk      (sdk for ^^)
+    * agl-ivi-demo-flutter          (IVI Flutter demo image)
+    * agl-ivi-demo-html5            (IVI HTML5 demo image)
 
-    * agl-image-graphical-html5     (weston plus chromium for html5)
-
-    * agl-image-cluster             (minimal image with APIs for cluster)
-    * agl-image-cluster-qt5         (image with QT5 and APIs for cluster)
-
-    * agl-image-telematics          (image with APIs for telematics)
-
-    * agl-demo-platform             (* default IVI demo target *)
-    * agl-demo-platform-crosssdk    (sdk for ^^)
-
-    * agl-cluster-demo-platform     (cluster demo image)
-    * agl-cluster-demo-platform-crosssdk  (sdk for ^^)
-    * agl-cluster-demo-qtcompositor (cluster demo using own compositor)
-
-    * agl-telematics-demo-platform  (telematics demo image)
-    * agl-telematics-demo-platform-crosssdk  (sdk for ^^)
+    * agl-cluster-demo-qt           (cluster Qt demo image)
+    * agl-cluster-demo-flutter      (cluster Flutter demo image)
 
+    * agl-telematics-demo           (telematics demo image)
 
+    * agl-gateway-demo              (gateway demo image)
index be49ed0..5e9de61 100644 (file)
@@ -279,9 +279,15 @@ PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
 #
 # A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format
 #
+# local only
 #BB_HASHSERVE = "auto"
 #BB_SIGNATURE_HANDLER = "OEEquivHash"
-
+#
+# online/upstream r/o
+#AGL_HOST_HASHSERV = "prserv.automotivelinux.org"
+#BB_SIGNATURE_HANDLER = "OEEquivHash"
+#BB_HASHSERVE = "auto"
+#BB_HASHSERVE_UPSTREAM = "${AGL_HOST_HASHSERV}:8888"
 
 # The network based PR service host and port
 # Uncomment the following lines to enable PRservice.
@@ -289,6 +295,10 @@ PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
 # start local PRService.
 # Set to other values to use remote PRService.
 #PRSERV_HOST = "localhost:0"
+#
+# r/o upstream prserv
+#AGL_HOST_PRSERV = "prserv.automotivelinux.org"
+#PRSERV_HOST = "prserv.automotivelinux.org:8686"
 
 
 # Archive the source and put them to ${DEPLOY_DIR}/sources/.
index 4a86e6c..479e5c1 100644 (file)
@@ -3,6 +3,8 @@ From: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
 Date: Tue, 19 Jul 2022 23:28:21 +0200
 Subject: [PATCH] Do not overwrite CFLAGS
 
+Upstream-Status: Pending
+
 Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
 ---
  configure.ac | 16 ++++++++--------
index 0611ec5..f6b27a1 100644 (file)
@@ -13,7 +13,6 @@ SRC_URI = " \
        file://hdmi-a-2-90.cfg \
        file://hdmi-a-2-180.cfg \
        file://hdmi-a-2-270.cfg \
-       file://remote-output.cfg.in \
        file://virtual-0.cfg \
        file://virtual-90.cfg \
        file://virtual-180.cfg \
@@ -31,23 +30,12 @@ WESTON_DISPLAYS ?= "hdmi-a-1-90"
 # Configuration fragments to use in weston.ini.*
 # Note that some may be replaced/removed when building the landscape
 # configuration.
-WESTON_FRAGMENTS = "core shell grpc-proxy ${WESTON_DISPLAYS}"
+WESTON_FRAGMENTS_BASE = "core shell"
+WESTON_FRAGMENTS = "${WESTON_FRAGMENTS_BASE} ${WESTON_DISPLAYS}"
 
 # On-target weston.ini directory
 weston_ini_dir = "${sysconfdir}/xdg/weston"
 
-# Options for the user to change in local.conf
-# e.g. REMOTING_OUTPUT_MODE = "1080x1488"
-REMOTING_OUTPUT_MODE ??= "640x720@30"
-REMOTING_OUTPUT_HOST ??= "192.168.10.3"
-REMOTING_OUTPUT_PORT ??= "5005"
-
-do_configure() {
-    sed -e "s#host=.*#host=${REMOTING_OUTPUT_HOST}#" \
-        -e "s#port=.*#port=${REMOTING_OUTPUT_PORT}#" \
-        ${WORKDIR}/remote-output.cfg.in  > ${WORKDIR}/remote-output.cfg
-}
-
 do_compile() {
     # Put all of our cfg files together for a default portrait
     # orientation configuration
@@ -109,47 +97,42 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 ALTERNATIVE_LINK_NAME[weston.ini] = "${weston_ini_dir}/weston.ini"
 
 RPROVIDES:${PN} = "weston-ini"
-RCONFLICTS:${PN} = "${PN}-landscape"
 ALTERNATIVE:${PN} = "weston.ini"
 ALTERNATIVE_TARGET_${PN} = "${weston_ini_dir}/weston.ini.default"
 
-PACKAGE_BEFORE_PN += "${PN}-landscape"
+# landscape
 
+PACKAGE_BEFORE_PN += "${PN}-landscape"
 FILES:${PN}-landscape = "${weston_ini_dir}/weston.ini.landscape"
-
 RPROVIDES:${PN}-landscape = "weston-ini"
-RCONFLICTS:${PN}-landscape = "${PN}"
 ALTERNATIVE:${PN}-landscape = "weston.ini"
 ALTERNATIVE_TARGET_${PN}-landscape = "${weston_ini_dir}/weston.ini.landscape"
+ALTERNATIVE_PRIORITY_${PN}-landscape = "20"
 
-PACKAGE_BEFORE_PN += "${PN}-landscape-inverted"
+# landscape-inverted
 
+PACKAGE_BEFORE_PN += "${PN}-landscape-inverted"
 FILES:${PN}-landscape-inverted = "${weston_ini_dir}/weston.ini.landscape-inverted"
-
 RPROVIDES:${PN}-landscape-inverted = "weston-ini"
-RCONFLICTS:${PN}-landscape-inverted = "${PN}"
 ALTERNATIVE:${PN}-landscape-inverted = "weston.ini"
 ALTERNATIVE_TARGET_${PN}-landscape-inverted = "${weston_ini_dir}/weston.ini.landscape-inverted"
+ALTERNATIVE_PRIORITY_${PN}-landscape-inverted = "25"
 
-# no activation by default
+# no-activate, no activation by default
 PACKAGE_BEFORE_PN += "${PN}-no-activate"
-
 FILES:${PN}-no-activate = "${weston_ini_dir}/weston.ini.default-no-activate"
-
 RPROVIDES:${PN}-no-activate = "weston-ini"
-RCONFLICTS:${PN}-no-activate = "${PN}"
 ALTERNATIVE:${PN}-no-activate = "weston.ini"
 ALTERNATIVE_TARGET_${PN}-no-activate = "${weston_ini_dir}/weston.ini.default-no-activate"
+ALTERNATIVE_PRIORITY_${PN}-no-activate = "21"
 
-# landscape, no activation by default
+# landscape-no-activate, no activation by default
 PACKAGE_BEFORE_PN += "${PN}-landscape-no-activate"
-
 FILES:${PN}-landscape-no-activate = "${weston_ini_dir}/weston.ini.landscape-no-activate"
-
 RPROVIDES:${PN}-landscape-no-activate = "weston-ini"
-RCONFLICTS:${PN}-landscape-no-activate = "${PN}"
 ALTERNATIVE:${PN}-landscape-no-activate = "weston.ini"
 ALTERNATIVE_TARGET_${PN}-landscape-no-activate = "${weston_ini_dir}/weston.ini.landscape-no-activate"
+ALTERNATIVE_PRIORITY_${PN}-landscape-no-activate = "26"
 
 # This is a settings-only package, we do not need a development package
 # (and its fixed dependency to ${PN} being installed)
index 746bde3..b6095f2 100644 (file)
@@ -2,8 +2,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-WESTON_DISPLAYS:append = "${@bb.utils.contains("DISTRO_FEATURES", "weston-remoting", " remote-output", "", d)}"
-
 # For virtual machines and intel-corei7-64 we want to support both the HDMI-A-1
 # and Virtual-1 outputs. This allows us to run virtual images on real hardware
 # and vice versa.
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in
deleted file mode 100644 (file)
index 940cbdd..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-[remote-output]
-name=remote-1
-mode=640x720@30
-host=192.168.10.3
-port=5005
index 11c6fd2..3757fe0 100644 (file)
@@ -23,13 +23,14 @@ Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
 [updated for ptest-runner 2.3.2]
 [updated for ptest-runner 2.4.1]
 [updated for ptest-runner 2.4.2]
+[updated for ptest-runner 2.4.4]
 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
 ---
  flags.h | 10 ++++++++++
  main.c  |  9 ++++++++-
- utils.c | 17 ++++++++++++++++-
+ utils.c | 20 +++++++++++++++++++-
  utils.h |  2 +-
- 4 files changed, 35 insertions(+), 3 deletions(-)
+ 4 files changed, 38 insertions(+), 3 deletions(-)
  create mode 100644 flags.h
 
 diff --git a/flags.h b/flags.h
@@ -84,7 +85,7 @@ index 31e4dd5..f12d6d6 100644
                                print_usage(stdout, argv[0]);
                                exit(1);
 diff --git a/utils.c b/utils.c
-index 59b8b77..30423c4 100644
+index 6cf7705..f6a3a2a 100644
 --- a/utils.c
 +++ b/utils.c
 @@ -49,6 +49,7 @@
@@ -95,17 +96,19 @@ index 59b8b77..30423c4 100644
  
  #define GET_STIME_BUF_SIZE 1024
  #define WAIT_CHILD_BUF_MAX_SIZE 1024
-@@ -425,6 +426,7 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
-                       }
+@@ -369,6 +370,9 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+                       strcpy(ptest_dir, p->run_ptest);
+                       dirname(ptest_dir);
  
-                       char *ptest_dir = strdup(p->run_ptest);
 +                      char *ptest = strdup(p->ptest);
-                       if (ptest_dir == NULL) {
++                      CHECK_ALLOCATION(ptest, 1, 1);
++
+                       if (pipe2(pipefd_stdout, 0) == -1) {
+                               fprintf(fp, "ERROR: pipe2() failed with: %s.\n", strerror(errno));
                                rc = -1;
-                               break;
-@@ -477,7 +479,10 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
-                                       fprintf(fp, "ERROR: setpgid() failed, %s\n", strerror(errno));
-                               }
+@@ -425,7 +429,10 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+                               do_close(&pipefd_stdout[PIPE_WRITE]);
+                               do_close(&pipefd_stderr[PIPE_WRITE]);
  
 -                              time_t start_time= time(NULL);
 +                              if (opts.flags & LAVA_SIGNAL_ENABLE) {
@@ -115,7 +118,7 @@ index 59b8b77..30423c4 100644
                                fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, start_time));
                                fprintf(fp, "BEGIN: %s\n", ptest_dir);
  
-@@ -594,6 +599,16 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+@@ -542,6 +549,16 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
  
                                fprintf(fp, "END: %s\n", ptest_dir);
                                fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, end_time));
@@ -130,8 +133,16 @@ index 59b8b77..30423c4 100644
 +                                      fprintf(stdout, "<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=%s RESULT=%s>\n", ptest, result);
 +                              }
                        }
-                       free(ptest_dir);
-                       do_close(&pipefd_stdout[PIPE_READ]);
+ ptest_list_fail4:
+@@ -556,6 +573,7 @@ ptest_list_fail2:
+                       do_close(&pipefd_stdout[PIPE_WRITE]);
+ ptest_list_fail1:
++                      free(ptest);
+                       fflush(fp);
+                       fflush(fp_stderr);
 diff --git a/utils.h b/utils.h
 index 04fc666..ad702d8 100644
 --- a/utils.h
@@ -148,5 +159,5 @@ index 04fc666..ad702d8 100644
  extern struct ptest_list *get_available_ptests(const char *);
  extern int print_ptests(struct ptest_list *, FILE *);
 -- 
-2.37.3
+2.44.0
 
diff --git a/meta-agl-flutter/README.md b/meta-agl-flutter/README.md
new file mode 100644 (file)
index 0000000..24929cc
--- /dev/null
@@ -0,0 +1,252 @@
+# meta-agl-flutter
+
+## 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
+    bitbake agl-ivi-demo-platform-flutter
+```
+
+This builds AGL demo image that includes Flutter runtime={debug,profile,release}.
+
+
+## Steps to build a minimal 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 `grep -c ^processor /proc/cpuinfo`
+    source meta-agl/scripts/aglsetup.sh -m qemux86-64 agl-devel agl-flutter
+    bitbake agl-image-flutter
+```
+  * 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
+
+If recipe `flutter-engine-sdk-dev` is included in your AGL image, `engine_sdk.zip` will be present in `/usr/share/flutter/`.
+
+engine_sdk.zip contains
+* sdk/flutter_sdk.version - The Flutter SDK version
+* sdk/engine.version - The git commit of the Flutter Engine
+* sdk/clang_x64/gen_snapshot - used for creating release/profile AOT image
+
+This recipe should be excluded from image in a production release.
+
+
+## Flutter Workspace Automation
+
+    cd $AGL
+    cd $AGL_TOP
+    ln -sf external/workspace-automation/flutter_workspace.py meta-agl-devel/meta-agl-flutter/tools/flutter_workspace.py
+    cd meta-agl-devel/meta-agl-flutter/tools
+    export FLUTTER_WORKSPACE=`pwd`
+    flutter_workspace.py
+    source setup_env.sh
+
+Additional documentation available [here](https://github.com/meta-flutter/meta-flutter/tree/kirkstone/tools#flutter-workspace-automation)
+
+
+## Startup Service
+
+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`
+
+For more JSON key value options see [here](https://github.com/toyota-connected/ivi-homescreen/blob/agl/README.md#json-configuration-keys)
+
+
+## Custom Devices
+
+### desktop-auto
+
+This is a desktop build of flutter-auto.  The default configuration for backend is set to `egl` backend.  To change this to use the `vulkan` backend, change the `backend` key value in `meta-agl-flutter/tools/flutter_workspace_config.json` from `egl` to `vulkan`.  If you use the workspace configuration from meta-flutter it defaults to `vulkan`.
+
+If you are running a Gnome Display Manager (GDM) Wayland session, then it will be an available custom-device platform.  To enable a Wayland session, you select the gear icon at the login window.  If you don't have a gear icon available on your login screen, then you will need to adjust your system settings to enable a Wayland session.
+
+Append `--device-id=desktop-auto` to `flutter <cmd>` to select this device.
+
+### QEMU-agl
+
+This is a QEMU minimal Flutter image as referenced [here](#steps-to-build-a-minimal-flutter-image).  The required runtime packages are installed as part of setup_flutter_workspace.py.
+
+If qemu_run was sucessfully invoked, then this platform will be an available `custom-device`.  If QEMU instance is not running on port 2222, then this custom-device platform will not be available.
+
+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
+
+### Debug
+
+1. Set up Flutter Workspace per [Flutter Workspace Automation](#flutter-workspace-automation).
+
+2. Run the following commands on the host's terminal, a QEMU window and a new terminal for AGL will be brought up.
+
+```
+    cd $FLUTTER_WORKSPACE
+    source ./setup_env.sh
+    qemu_run
+```
+
+3. If running an updated QEMU image, edit `~/.ssh/known_hosts` and remove previous connection.
+
+4. Wait for QEMU image to boot to idle the run
+```
+    ssh -p 2222 root@localhost who
+```
+_Answering with `y` appends QEMU connection to `~/.ssh/known_hosts`_
+
+5.  From the same host terminal open Visual Studio Code Select
+   * **Run and Debug**
+   * **gallery(AGL-qemu)** from the drop down combo box
+   * **run** - this launches the Flutter gallery app in the QEMU window​
+
+6.  Or run from the same terminal as qemu_run was executed via
+```
+    cd $FLUTTER_WORKSPACE/app/gallery
+    flutter run --device-id=AGL-qemu
+```
+
+
+### Working with QEMU images
+
+1.  Setup the flutter workspace.
+
+    source ${FLUTTER_WORKSPACE}/setup_env.sh
+
+The stdout tail should look similar to:
+
+    ********************************************
+    * Type 'run-agl-qemu-master' to start
+    ********************************************
+    ********************************************
+    * Type 'run-agl-qemu-octopus' to start
+    ********************************************
+
+3. Select image to run using one of above commands.
+
+```
+    run-agl-qemu-octopus
+```
+
+4. If running an updated QEMU image, edit `~/.ssh/known_hosts` and remove previous connection.
+
+5.  Login AGL as `root`, and execute `passwd -d agl-driver`.  Type `exit` and login as `agl-driver`.  Run the Flutter Gallery example with the command in AGL's terminal.
+
+```
+       cd $FLUTTER_WORKSPACE/app/gallery
+    flutter run -d agl-qemu-octopus
+```
+
+
+### Profile
+
+1.  Setup the flutter workspace.
+
+    source ${FLUTTER_WORKSPACE}/setup_env.sh
+
+The stdout tail should look similar to:
+
+    ********************************************
+    * Type 'run-agl-qemu-master' to start
+    ********************************************
+    ********************************************
+    * Type 'run-agl-qemu-octopus' to start
+    ********************************************
+
+3. Select image to run using one of above commands.
+
+```
+    run-agl-qemu-octopus
+```
+
+4. If running an updated QEMU image, edit `~/.ssh/known_hosts` and remove previous connection.
+
+5. After waiting for QEMU image to boot to idle issue
+```
+    ssh -p 2222 root@localhost who
+```
+Answering with `y` appends QEMU connection to `~/.ssh/known_hosts`
+
+6.  Login AGL as `agl-driver`, and issue the following command
+```
+       flutter-auto --window-type="BG" --b=/usr/share/flutter/gallery/3.3.7/profile --f --observatory-host=0.0.0.0 --observatory-port=1234
+```
+
+The last line of the output message should look similar to this:
+```
+    flutter: The Dart VM service is listening on http://0.0.0.0:1234/xxxxxxxxxxx=/
+```
+
+7. Run the following command in the host terminal, using the correct hash suffix.
+```
+       flutter attach --device-id=AGL-qemu --debug-url=http://127.0.0.1:1234/xxxxxxxxxxx=/
+```
+​
+8. Then you should see the output as below. It tells us the URL of the Flutter DevTools debugger and profiler on AGL x86_64 QEMU Image.
+`An Observatory debugger and profiler on AGL x86_64 QEMU Image is available at: http://127.0.0.1:37383/xxxxxxxxxxx=/`
+​
+9. in the terminal type `v` to launch the debugger.
diff --git a/meta-agl-flutter/conf/include/agl-flutter.inc b/meta-agl-flutter/conf/include/agl-flutter.inc
new file mode 100644 (file)
index 0000000..38db25e
--- /dev/null
@@ -0,0 +1,3 @@
+AGL_FEATURES += "agl-flutter"
+
+FLUTTER_SDK_TAG = "3.19.3"
diff --git a/meta-agl-flutter/conf/layer.conf b/meta-agl-flutter/conf/layer.conf
new file mode 100644 (file)
index 0000000..e21f9bc
--- /dev/null
@@ -0,0 +1,19 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+            ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "agl-flutter-layer"
+BBFILE_PATTERN_agl-flutter-layer = "^${LAYERDIR}/"
+BBFILE_PRIORITY_agl-flutter-layer = "61"
+
+LAYERVERSION_agl-flutter-layer = "1"
+LAYERDEPENDS_agl-flutter-layer = "core flutter-layer"
+LAYERRECOMMENDS_agl-flutter-layer = "flutter-apps-layer"
+LAYERSERIES_COMPAT_agl-flutter-layer = "scarthgap"
+
+BBFILES_DYNAMIC += " \
+    flutter-apps-layer:${LAYERDIR}/dynamic-layers/flutter-apps-layer/*/*/*/*.bbappend \
+"
diff --git a/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery/flutter-gallery.service b/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery/flutter-gallery.service
new file mode 100644 (file)
index 0000000..28b9678
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Requires=agl-compositor.service
+After=agl-compositor.service
+
+[Service]
+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/flutter-gallery/${FLUTTER_VERSION}/${FLUTTER_RUNTIME} --f --window-type=BG
+
+[Install]
+WantedBy=graphical.target
diff --git a/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_%.bbappend b/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_%.bbappend
new file mode 100644 (file)
index 0000000..835e86e
--- /dev/null
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'agl-flutter', 'flutter-gallery_aglflutter.inc', '', d)}
diff --git a/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_aglflutter.inc b/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_aglflutter.inc
new file mode 100644 (file)
index 0000000..68c07f1
--- /dev/null
@@ -0,0 +1,13 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/flutter-gallery:"
+
+SRC_URI += "file://flutter-gallery.service"
+
+inherit systemd
+
+do_install:append() {
+    install -D -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
+}
+
+RDEPENDS:${PN} += "agl-flutter-env"
+
+SYSTEMD_SERVICE:${PN} = "flutter-gallery.service"
diff --git a/meta-agl-flutter/recipes-config/agl-flutter-env/agl-flutter-env_1.0.bb b/meta-agl-flutter/recipes-config/agl-flutter-env/agl-flutter-env_1.0.bb
new file mode 100644 (file)
index 0000000..aaff166
--- /dev/null
@@ -0,0 +1,15 @@
+SUMMARY = "AGL Flutter environment file"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+inherit allarch
+
+AGL_FLUTTER_DEFAULT_RUNTIME ?= "release"
+
+do_compile[noexec] = "1"
+
+do_install() {
+    install -d ${D}${sysconfdir}/default
+    echo "FLUTTER_VERSION=${FLUTTER_SDK_TAG}" > ${D}${sysconfdir}/default/flutter
+    echo "FLUTTER_RUNTIME=${AGL_FLUTTER_DEFAULT_RUNTIME}" >> ${D}${sysconfdir}/default/flutter
+}
diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0001-Disable-on_frame_base_surface-wl_surface_commit.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0001-Disable-on_frame_base_surface-wl_surface_commit.patch
new file mode 100644 (file)
index 0000000..a37233b
--- /dev/null
@@ -0,0 +1,26 @@
+From fda28bbd6718bf113061292d8cec15084060c923 Mon Sep 17 00:00:00 2001
+From: Joel Winarske <joel.winarske@gmail.com>
+Date: Wed, 19 Jul 2023 15:21:46 -0700
+Subject: [PATCH] Disable on_frame_base_surface wl_surface_commit
+
+Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
+---
+ shell/wayland/window.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/shell/wayland/window.cc b/shell/wayland/window.cc
+index c74b438..f244f08 100644
+--- a/shell/wayland/window.cc
++++ b/shell/wayland/window.cc
+@@ -257,7 +257,7 @@ void WaylandWindow::on_frame_base_surface(void* data,
+   window->m_fps_counter++;
+   window->m_fps_counter++;
+-  wl_surface_commit(window->m_base_surface);
++  //wl_surface_commit(window->m_base_surface);
+ }
+ uint32_t WaylandWindow::GetFpsCounter() {
+-- 
+2.41.0
+
diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0001-activation_area-Add-missing-width-and-height.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0001-activation_area-Add-missing-width-and-height.patch
new file mode 100644 (file)
index 0000000..fb3a5b3
--- /dev/null
@@ -0,0 +1,190 @@
+From 2c55093cda17dd16d98a8fb0d26717b29d5d0e75 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Thu, 28 Dec 2023 19:20:31 +0200
+Subject: [PATCH 1/2] activation_area: Add missing width and height
+
+Setting up an activation area can also require a different rectangle
+size, so allow to set-up one.
+
+Note that there's no actual check if the values are invalid, for
+instance like exceeding the output's dimensions.
+
+Bug-AGL: SPEC-5038
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ shell/configuration/configuration.cc |  8 ++++++++
+ shell/configuration/configuration.h  |  2 ++
+ shell/view/flutter_view.cc           |  3 ++-
+ shell/wayland/display.cc             | 10 +++++-----
+ shell/wayland/display.h              |  8 +++++++-
+ shell/wayland/window.cc              | 13 +++++++++----
+ shell/wayland/window.h               |  4 ++++
+ 7 files changed, 37 insertions(+), 11 deletions(-)
+
+diff --git a/shell/configuration/configuration.cc b/shell/configuration/configuration.cc
+index 2cec924..63b7a82 100644
+--- a/shell/configuration/configuration.cc
++++ b/shell/configuration/configuration.cc
+@@ -104,9 +104,17 @@ void Configuration::getViewParameters(
+     instance.view.activation_area_x = static_cast<uint32_t>(val["x"].GetInt());
+     instance.view.activation_area_y = static_cast<uint32_t>(val["y"].GetInt());
++    instance.view.activation_area_width =
++        static_cast<uint32_t>(val["width"].GetInt());
++    instance.view.activation_area_height =
++        static_cast<uint32_t>(val["height"].GetInt());
+     SPDLOG_DEBUG("activation area x {}", instance.view.activation_area_x);
+     SPDLOG_DEBUG("activation area y {}", instance.view.activation_area_y);
++    SPDLOG_DEBUG("activation area width {}",
++                 instance.view.activation_area_width);
++    SPDLOG_DEBUG("activation area height {}",
++                 instance.view.activation_area_height);
+   }
+ }
+diff --git a/shell/configuration/configuration.h b/shell/configuration/configuration.h
+index 0e3d721..b0ccbc9 100644
+--- a/shell/configuration/configuration.h
++++ b/shell/configuration/configuration.h
+@@ -44,6 +44,8 @@ class Configuration {
+       uint32_t height;
+       uint32_t activation_area_x;
+       uint32_t activation_area_y;
++      uint32_t activation_area_width;
++      uint32_t activation_area_height;
+       bool fullscreen;
+       bool fullscreen_set;
+       double pixel_ratio;
+diff --git a/shell/view/flutter_view.cc b/shell/view/flutter_view.cc
+index ca51f4e..7b48b85 100644
+--- a/shell/view/flutter_view.cc
++++ b/shell/view/flutter_view.cc
+@@ -67,9 +67,10 @@ FlutterView::FlutterView(Configuration::Config config,
+   m_wayland_window = std::make_shared<WaylandWindow>(
+       m_index, display, m_config.view.window_type,
+       m_wayland_display->GetWlOutput(m_config.view.wl_output_index),
+-      m_config.view.wl_output_index, m_config.app_id, m_config.view.fullscreen, 
++      m_config.view.wl_output_index, m_config.app_id, m_config.view.fullscreen,
+       m_config.view.width, m_config.view.height, m_config.view.pixel_ratio,
+       m_config.view.activation_area_x, m_config.view.activation_area_y,
++      m_config.view.activation_area_width, m_config.view.activation_area_height,
+       m_backend.get(), m_config.view.ivi_surface_id);
+ }
+diff --git a/shell/wayland/display.cc b/shell/wayland/display.cc
+index aba050a..0b97954 100644
+--- a/shell/wayland/display.cc
++++ b/shell/wayland/display.cc
+@@ -857,16 +857,16 @@ void Display::AglShellDoReady() const {
+ void Display::AglShellDoSetupActivationArea(uint32_t x,
+                                             uint32_t y,
++                                            uint32_t width,
++                                            uint32_t height,
+                                             uint32_t index) {
+-  uint32_t width = m_all_outputs[index]->width;
+-  uint32_t height = m_all_outputs[index]->height - (2 * y);
+-
+   if (!m_agl.shell)
+     return;
+   if (m_all_outputs[index]->transform == WL_OUTPUT_TRANSFORM_90) {
+-    width = m_all_outputs[index]->height;
+-    height = m_all_outputs[index]->width - (2 * y);
++    uint32_t tmp_width = width;
++    width = height;
++    height = tmp_width;
+   }
+   SPDLOG_DEBUG("Using custom rectangle [{}x{}+{}x{}] for activation", width,
+diff --git a/shell/wayland/display.h b/shell/wayland/display.h
+index b919047..a792ad7 100644
+--- a/shell/wayland/display.h
++++ b/shell/wayland/display.h
+@@ -172,6 +172,8 @@ class Display {
+    * @return void
+    * @param[in] x the x position for the activation rectangle
+    * @param[in] y the y position for the activation rectangle
++   * @param[in] width the width position for the activation rectangle
++   * @param[in] height the height position for the activation rectangle
+    * @param[index] the output, as a number
+    * @relation
+    *
+@@ -193,7 +195,11 @@ class Display {
+    * |                        |
+    * --------------------
+    */
+-  void AglShellDoSetupActivationArea(uint32_t x, uint32_t y, uint32_t index);
++  void AglShellDoSetupActivationArea(uint32_t x,
++                                     uint32_t y,
++                                     uint32_t width,
++                                     uint32_t height,
++                                     uint32_t index);
+   /**
+    * @brief Set Engine
+diff --git a/shell/wayland/window.cc b/shell/wayland/window.cc
+index 373b0a2..f816e58 100644
+--- a/shell/wayland/window.cc
++++ b/shell/wayland/window.cc
+@@ -31,6 +31,8 @@ WaylandWindow::WaylandWindow(size_t index,
+                              double pixel_ratio,
+                              uint32_t activation_area_x,
+                              uint32_t activation_area_y,
++                             uint32_t activation_area_width,
++                             uint32_t activation_area_height,
+                              Backend* backend,
+                              uint32_t ivi_surface_id)
+     : m_index(index),
+@@ -42,7 +44,8 @@ WaylandWindow::WaylandWindow(size_t index,
+       m_geometry({width, height}),
+       m_window_size({width, height}),
+       m_pixel_ratio(pixel_ratio),
+-      m_activation_area({activation_area_x, activation_area_y}),
++      m_activation_area({activation_area_x, activation_area_y,
++                         activation_area_width, activation_area_height}),
+       m_type(get_window_type(type)),
+       m_app_id(std::move(app_id)),
+       m_ivi_surface_id(ivi_surface_id),
+@@ -98,10 +101,12 @@ WaylandWindow::WaylandWindow(size_t index,
+     case WINDOW_BG:
+       m_display->AglShellDoBackground(m_base_surface, 0);
+       if (m_activation_area.x > 0 && m_activation_area.y > 0)
+-        m_display->AglShellDoSetupActivationArea(m_activation_area.x,
+-                                                 m_activation_area.y, 0);
++        m_display->AglShellDoSetupActivationArea(
++            m_activation_area.x, m_activation_area.y, m_activation_area.width,
++            m_activation_area.height, 0);
+       else
+-        m_display->AglShellDoSetupActivationArea(0, 160, 0);
++        m_display->AglShellDoSetupActivationArea(0, 160, m_activation_area.width,
++                                                 m_activation_area.height, 0);
+       break;
+     case WINDOW_PANEL_TOP:
+       m_display->AglShellDoPanel(m_base_surface, AGL_SHELL_EDGE_TOP, 0);
+diff --git a/shell/wayland/window.h b/shell/wayland/window.h
+index 998a1c8..f66f70a 100644
+--- a/shell/wayland/window.h
++++ b/shell/wayland/window.h
+@@ -67,6 +67,8 @@ class WaylandWindow {
+                 double pixel_ratio,
+                 uint32_t activation_area_x,
+                 uint32_t activation_area_y,
++                uint32_t activation_area_width,
++                uint32_t activation_area_height,
+                 Backend* backend,
+                 uint32_t ivi_surface_id);
+@@ -166,6 +168,8 @@ class WaylandWindow {
+   struct {
+     uint32_t x;
+     uint32_t y;
++    uint32_t width;
++    uint32_t height;
+   } m_activation_area;
+   struct {
+     int32_t width;
+-- 
+2.35.1
+
diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0001-display-Add-support-for-wl_output-version-4.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0001-display-Add-support-for-wl_output-version-4.patch
new file mode 100644 (file)
index 0000000..6b1b3e4
--- /dev/null
@@ -0,0 +1,117 @@
+From 10d1d855a0ce4557cb710e73e3e7c9ab0dd0e734 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Mon, 4 Dec 2023 14:16:36 +0200
+Subject: [PATCH 1/2] display: Add support for wl_output version 4
+
+This allows support for wl_output.name and wl_output.desc be sent out
+by the compositor that supports it.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ shell/wayland/display.cc | 34 ++++++++++++++++++++++++++++++----
+ shell/wayland/display.h  | 28 ++++++++++++++++++++++++++++
+ 2 files changed, 58 insertions(+), 4 deletions(-)
+
+diff --git a/shell/wayland/display.cc b/shell/wayland/display.cc
+index 8e309ef..3ee814a 100644
+--- a/shell/wayland/display.cc
++++ b/shell/wayland/display.cc
+@@ -191,9 +191,16 @@ void Display::registry_handle_global(void* data,
+     auto oi = std::make_shared<output_info_t>();
+     std::fill_n(oi.get(), 1, output_info_t{});
+     oi->global_id = name;
+-    oi->output = static_cast<struct wl_output*>(
+-        wl_registry_bind(registry, name, &wl_output_interface,
+-                         std::min(static_cast<uint32_t>(2), version)));
++    // be compat with v2 as well
++    if (version >= WL_OUTPUT_NAME_SINCE_VERSION &&
++        version >= WL_OUTPUT_DESCRIPTION_SINCE_VERSION)
++      oi->output = static_cast<struct wl_output*>(
++          wl_registry_bind(registry, name, &wl_output_interface,
++                           std::min(static_cast<uint32_t>(4), version)));
++    else
++      oi->output = static_cast<struct wl_output*>(
++          wl_registry_bind(registry, name, &wl_output_interface,
++                           std::min(static_cast<uint32_t>(2), version)));
+     wl_output_add_listener(oi->output, &output_listener, oi.get());
+     SPDLOG_DEBUG("Wayland: Output [{}]", d->m_all_outputs.size());
+     d->m_all_outputs.push_back(oi);
+@@ -299,9 +306,28 @@ void Display::display_handle_done(void* data,
+   oi->done = true;
+ }
++void Display::display_handle_name(void* data,
++                                  struct wl_output* /* wl_output */,
++                                  const char* name) {
++  auto* oi = static_cast<output_info_t*>(data);
++  oi->name = std::string(name);
++}
++
++void Display::display_handle_desc(void* data,
++                                  struct wl_output* /* wl_output */,
++                                  const char* desc) {
++  auto* oi = static_cast<output_info_t*>(data);
++  oi->desc = std::string(desc);
++}
++
+ const struct wl_output_listener Display::output_listener = {
+     display_handle_geometry, display_handle_mode, display_handle_done,
+-    display_handle_scale};
++    display_handle_scale
++#if defined(WL_OUTPUT_NAME_SINCE_VERSION) && \
++    defined(WL_OUTPUT_DESCRIPTION_SINCE_VERSION)
++    , display_handle_name,     display_handle_desc
++#endif
++};
+ void Display::shm_format(void* /* data */,
+                          struct wl_shm* /* wl_shm */,
+diff --git a/shell/wayland/display.h b/shell/wayland/display.h
+index cc3f4be..a0756f0 100644
+--- a/shell/wayland/display.h
++++ b/shell/wayland/display.h
+@@ -329,6 +329,8 @@ class Display {
+     int32_t scale;
+     MAYBE_UNUSED bool done;
+     int transform;
++    std::string name;
++    std::string desc;
+   } output_info_t;
+   struct pointer_event {
+@@ -520,6 +522,32 @@ class Display {
+    */
+   static void display_handle_done(void* data, struct wl_output* wl_output);
++  /**
++   * @brief Set the display output name
++   * @param[in,out] data Data of type output_info_t*
++   * @param[in] wl_output No use
++   * @param[in] output_name Display name
++   * @return void
++   * @relation
++   * wayland - since @v4 of wl_output
++   */
++  static void display_handle_name(void* data,
++                                  struct wl_output* wl_output,
++                                  const char* output_name);
++
++  /**
++   * @brief Set the display description
++   * @param[in,out] data Data of type output_info_t*
++   * @param[in] wl_output No use
++   * @param[in] desc_name Display description name
++   * @return void
++   * @relation
++   * wayland - since @v4 of wl_output
++   */
++  static void display_handle_desc(void* data,
++                                  struct wl_output* wl_output,
++                                  const char* desc_name);
++
+   static const struct wl_shm_listener shm_listener;
+   /**
+-- 
+2.35.1
+
diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0002-activation_area-Allow-x-and-y-values-be-zero-for-the.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0002-activation_area-Allow-x-and-y-values-be-zero-for-the.patch
new file mode 100644 (file)
index 0000000..f0cf9dd
--- /dev/null
@@ -0,0 +1,28 @@
+From 641ca7ca26c1bfc11e7d0c0f30b731f53467bf1f Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Thu, 28 Dec 2023 20:28:12 +0200
+Subject: [PATCH 2/2] activation_area: Allow x and y values be zero for the
+ activation area
+
+Bug-AGL: SPEC-5038
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ shell/wayland/window.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/shell/wayland/window.cc b/shell/wayland/window.cc
+index f816e58..929b9af 100644
+--- a/shell/wayland/window.cc
++++ b/shell/wayland/window.cc
+@@ -100,7 +100,7 @@ WaylandWindow::WaylandWindow(size_t index,
+       break;
+     case WINDOW_BG:
+       m_display->AglShellDoBackground(m_base_surface, 0);
+-      if (m_activation_area.x > 0 && m_activation_area.y > 0)
++      if (m_activation_area.x >= 0 && m_activation_area.y >= 0)
+         m_display->AglShellDoSetupActivationArea(
+             m_activation_area.x, m_activation_area.y, m_activation_area.width,
+             m_activation_area.height, 0);
+-- 
+2.35.1
+
diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0002-display-Add-support-for-agl_shell-version-8.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0002-display-Add-support-for-agl_shell-version-8.patch
new file mode 100644 (file)
index 0000000..7928117
--- /dev/null
@@ -0,0 +1,477 @@
+From d44f07a0c2cc410414bfd7b338ee071c17422a0a Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Mon, 4 Dec 2023 18:17:00 +0200
+Subject: [PATCH 2/2] display: Add support for agl_shell version 8
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ shell/wayland/display.cc               | 156 ++++++++++++++++++++++--
+ shell/wayland/display.h                |  58 +++++++++
+ third_party/agl/protocol/agl-shell.xml | 160 ++++++++++++++++++++++++-
+ 3 files changed, 366 insertions(+), 8 deletions(-)
+
+diff --git a/shell/wayland/display.cc b/shell/wayland/display.cc
+index 3ee814a..aba050a 100644
+--- a/shell/wayland/display.cc
++++ b/shell/wayland/display.cc
+@@ -220,7 +220,7 @@ void Display::registry_handle_global(void* data,
+     if (version >= 2) {
+       d->m_agl.shell = static_cast<struct agl_shell*>(
+           wl_registry_bind(registry, name, &agl_shell_interface,
+-                           std::min(static_cast<uint32_t>(4), version)));
++                           std::min(static_cast<uint32_t>(8), version)));
+       agl_shell_add_listener(d->m_agl.shell, &agl_shell_listener, data);
+     } else {
+       d->m_agl.shell = static_cast<struct agl_shell*>(
+@@ -980,6 +980,148 @@ void Display::agl_shell_bound_fail(void* data, struct agl_shell* shell) {
+   d->m_agl.bound_ok = false;
+ }
++void Display::addAppToStack(std::string app_id) {
++  if (app_id == "homescreen")
++    return;
++
++  bool found_app = false;
++  for (auto& i : apps_stack) {
++    if (i == app_id) {
++      found_app = true;
++      break;
++    }
++  }
++
++  if (!found_app) {
++    apps_stack.push_back(app_id);
++  } else {
++    // fixme
++  }
++}
++
++int Display::find_output_by_name(std::string output_name) {
++  int index = 0;
++  for (auto& i : m_all_outputs) {
++    if (i->name == output_name) {
++      return index;
++    }
++    index++;
++  }
++
++  return -1;
++}
++
++void Display::activateApp(std::string app_id) {
++  int default_output_index = 0;
++
++  FML_LOG(INFO) << "got app_id " << app_id;
++
++  // search for a pending application which might have a different output
++  auto iter = pending_app_list.begin();
++  bool found_pending_app = false;
++  while (iter != pending_app_list.end()) {
++    auto app_to_search = iter->first;
++    FML_LOG(INFO) << "searching for " << app_to_search;
++
++    if (app_to_search == app_id) {
++      found_pending_app = true;
++      break;
++    }
++
++    iter++;
++  }
++
++  if (found_pending_app) {
++    auto output_name = iter->second;
++    default_output_index = find_output_by_name(output_name);
++
++    FML_LOG(INFO) << "Found app_id " << app_id << " at all";
++
++    if (default_output_index < 0) {
++      // try with remoting-remote-X which is the streaming
++      std::string new_remote_output = "remoting-" + output_name;
++
++      default_output_index = find_output_by_name(new_remote_output);
++      if (default_output_index < 0) {
++        FML_LOG(INFO) << "Not activating app_id " << app_id << " at all";
++        return;
++      }
++    }
++
++    pending_app_list.erase(iter);
++  }
++
++  FML_LOG(INFO) << "Activating app_id " << app_id << " on output "
++                << default_output_index;
++  agl_shell_activate_app(m_agl.shell, app_id.c_str(),
++                         m_all_outputs[default_output_index]->output);
++  wl_display_flush(m_display);
++}
++
++void Display::deactivateApp(std::string app_id) {
++  for (auto& i : apps_stack) {
++    if (i == app_id) {
++      // remove it from apps_stack
++      apps_stack.remove(i);
++      if (!apps_stack.empty())
++        activateApp(apps_stack.back());
++      break;
++    }
++  }
++}
++
++void Display::processAppStatusEvent(const char* app_id,
++                                    const std::string event_type) {
++  if (!m_agl.shell)
++    return;
++
++  if (event_type == "started") {
++    activateApp(std::string(app_id));
++  } else if (event_type == "terminated") {
++    deactivateApp(std::string(app_id));
++  } else if (event_type == "deactivated") {
++    // not handled
++  }
++}
++
++void Display::agl_shell_app_on_output(void* data,
++                                      struct agl_shell* agl_shell,
++                                      const char* app_id,
++                                      const char* output_name) {
++  auto* d = static_cast<Display*>(data);
++
++  FML_LOG(INFO) << "Gove event app_on_out app_id " << app_id << " output name "
++                << output_name;
++
++  // a couple of use-cases, if there is no app_id in the app_list then it
++  // means this is a request to map the application, from the start to a
++  // different output that the default one. We'd get an
++  // AGL_SHELL_APP_STATE_STARTED which will handle activation.
++  //
++  // if there's an app_id then it means we might have gotten an event to
++  // move the application to another output; so we'd need to process it
++  // by explicitly calling processAppStatusEvent() which would ultimately
++  // activate the application on other output. We'd have to pick-up the
++  // last activated window and activate the default output.
++  //
++  // finally if the outputs are identical probably that's an user-error -
++  // but the compositor won't activate it again, so we don't handle that.
++  std::pair new_pending_app =
++      std::pair(std::string(app_id), std::string(output_name));
++  d->pending_app_list.push_back(new_pending_app);
++
++  auto iter = d->apps_stack.begin();
++  while (iter != d->apps_stack.end()) {
++    if (*iter == std::string(app_id)) {
++      FML_LOG(INFO) << "Gove event to move " << app_id << " to another output "
++                    << output_name;
++      d->processAppStatusEvent(app_id, std::string("started"));
++      break;
++    }
++    iter++;
++  }
++}
++
+ void Display::agl_shell_app_state(void* data,
+                                   struct agl_shell* /* agl_shell */,
+                                   const char* app_id,
+@@ -991,12 +1133,7 @@ void Display::agl_shell_app_state(void* data,
+       FML_DLOG(INFO) << "Got AGL_SHELL_APP_STATE_STARTED for app_id " << app_id;
+       if (d->m_agl.shell) {
+-        // we always assume the first output advertised by the wl_output
+-        // interface
+-        unsigned int default_output_index = 0;
+-
+-        agl_shell_activate_app(d->m_agl.shell, app_id,
+-                               d->m_all_outputs[default_output_index]->output);
++        d->processAppStatusEvent(app_id, std::string("started"));
+       }
+       break;
+@@ -1007,6 +1144,10 @@ void Display::agl_shell_app_state(void* data,
+     case AGL_SHELL_APP_STATE_ACTIVATED:
+       FML_DLOG(INFO) << "Got AGL_SHELL_APP_STATE_ACTIVATED for app_id "
+                      << app_id;
++      d->addAppToStack(std::string(app_id));
++      break;
++    case AGL_SHELL_APP_STATE_DEACTIVATED:
++      d->processAppStatusEvent(app_id, std::string("deactivated"));
+       break;
+     default:
+       break;
+@@ -1017,6 +1158,7 @@ const struct agl_shell_listener Display::agl_shell_listener = {
+     .bound_ok = agl_shell_bound_ok,
+     .bound_fail = agl_shell_bound_fail,
+     .app_state = agl_shell_app_state,
++    .app_on_output = agl_shell_app_on_output,
+ };
+ void Display::ivi_wm_surface_visibility(void* /* data */,
+diff --git a/shell/wayland/display.h b/shell/wayland/display.h
+index a0756f0..b919047 100644
+--- a/shell/wayland/display.h
++++ b/shell/wayland/display.h
+@@ -18,6 +18,7 @@
+ #pragma once
+ #include <chrono>
++#include <list>
+ #include <memory>
+ #include <mutex>
+ #include <string>
+@@ -271,6 +272,44 @@ class Display {
+    */
+   std::pair<int32_t, int32_t> GetVideoModeSize(uint32_t index);
++  /**
++   * @brief deactivate/hide the application pointed by app_id
++   * @param[in] app_id the app_id
++   * @relation
++   * agl_shell
++   */
++  void deactivateApp(std::string app_id);
++  /**
++   * @brief activate/show the application pointed by app_id
++   * @param[in] app_id the app_id
++   * @relation
++   * agl_shell
++   */
++  void activateApp(std::string app_id);
++  /**
++   * @brief Add app_id to a list of list applications
++   * @param[in] app_id the app_id
++   * @relation
++   * agl_shell
++   */
++  void addAppToStack(std::string app_id);
++  /**
++   * @brief Helper to retrieve the output using its output_name
++   * @param[in] output_name a std::string representing the output
++   * @retval an integer that can used to get the proper output
++   * @relation
++   * agl_sell
++   */
++  int find_output_by_name(std::string output_name);
++  /**
++   * @brief helper to process the application status
++   * @param[in] app_id an array of char
++   * @param[in] event_type a std::string representing the type of event (started/stopped/terminated)
++   * @relation
++   * agl_shell
++   */
++  void processAppStatusEvent(const char* app_id, const std::string event_type);
++
+  private:
+   std::shared_ptr<Engine> m_flutter_engine;
+@@ -300,6 +339,9 @@ class Display {
+     uint32_t version = 0;
+   } m_agl;
++  std::list<std::string> apps_stack;
++  std::list<std::pair<const std::string, const std::string>> pending_app_list;
++
+   struct ivi_shell {
+     struct ivi_application* application = nullptr;
+     struct ivi_wm* ivi_wm = nullptr;
+@@ -982,6 +1024,22 @@ class Display {
+                                   const char* app_id,
+                                   uint32_t state);
++  /**
++   * @brief AGL app_app_on_output event
++   * @param[in,out] data Data of type Display
++   * @param[in] shell No use
++   * @param[in] app_id the application id for which this event was sent
++   * @param[in] state the state: CREATED/TERMINATED/ACTIVATED/DEACTIVATED
++   * @return void
++   * @relation
++   * wayland, agl-shell
++   * @note Do nothing
++   */
++  static void agl_shell_app_on_output(void* data,
++                                      struct agl_shell* agl_shell,
++                                      const char* app_id,
++                                      const char* output_name);
++
+   static const struct agl_shell_listener agl_shell_listener;
+   /**
+diff --git a/third_party/agl/protocol/agl-shell.xml b/third_party/agl/protocol/agl-shell.xml
+index bf5ab02..e010a80 100644
+--- a/third_party/agl/protocol/agl-shell.xml
++++ b/third_party/agl/protocol/agl-shell.xml
+@@ -22,7 +22,7 @@
+     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+     DEALINGS IN THE SOFTWARE.
+   </copyright>
+-  <interface name="agl_shell" version="4">
++  <interface name="agl_shell" version="8">
+     <description summary="user interface for Automotive Grade Linux platform">
+       Starting with version 2 of the protocol, the client is required to wait
+       for the 'bound_ok' or 'bound_fail' events in order to proceed further.
+@@ -200,5 +200,163 @@
+       <arg name="width" type="int" summary="width of rectangle"/>
+       <arg name="height" type="int" summary="height of rectangle"/>
+     </request>
++
++    <request name="deactivate_app" since="5">
++      <description summary="de-activate/hide window identified by app_id">
++        Ask the compositor to hide the toplevel window for window
++        management purposes. Depending on the window role, this request
++        will either display the previously active window (or the background
++        in case there's no previously active surface) or temporarily (or
++        until a 'activate_app' is called upon) hide the surface.
++
++        All the surfaces are identifiable by using the app_id, and no actions
++        are taken in case the app_id is not/was not present.
++
++        See xdg_toplevel.set_app_id from the xdg-shell protocol for a
++        description of app_id.
++      </description>
++      <arg name="app_id" type="string"/>
++    </request>
++
++    <request name="set_app_float" since="6">
++      <description summary="set the window identified by app_id as float">
++        Makes the application identified by app_id as floating. If the
++        application's window is already mapped, in a maximized, normal state,
++        it would transition to the float state.
++
++        For applications that want to modify their own state, this request
++        must be done before the initial surface commit in order to take effect.
++
++        If the application is already in floating state, this request wouldn't
++        do anything.
++
++        There's no persistence of this request, once the application terminated
++        you'll to issue this request again for that particular app_id.
++
++        The x, and y values would be initial position of the window where the
++        window surface will be placed.
++
++        See xdg_toplevel.set_app_id from the xdg-shell protocol for a
++        description of app_id.
++      </description>
++      <arg name="app_id" type="string"/>
++      <arg name="x" type="int" summary="x position"/>
++      <arg name="y" type="int" summary="y position"/>
++    </request>
++
++    <request name="set_app_normal" since="6">
++      <description summary="set the window identified by app_id as normally started">
++      Returns the application identified by app_id as it was in the normal state.
++      This is useful to come back from other states to the maximized state, the
++      normal state applications are started.
++      </description>
++      <arg name="app_id" type="string"/>
++    </request>
++
++    <request name="set_app_fullscreen" since="7">
++      <description summary="">
++        Makes the application identified by app_id as fullscreen. If the
++        application's window is already mapped, in a maximized, normal state,
++        it would transition to the fullscreen state.
++
++        For applications that want to modify their own state, this request
++        must be done before the initial surface commit in order to take effect.
++
++        If the application is already in fullscreen state, this request wouldn't
++        do anything.
++
++        There's no persistence of this request, once the application terminated
++        you'll to issue this request again for that particular app_id.
++
++        See xdg_toplevel.set_app_id from the xdg-shell protocol for a
++        description of app_id.
++      </description>
++      <arg name="app_id" type="string"/>
++    </request>
++
++    <request name="set_app_output" since="8">
++      <description summary="Assign an application to a particular output">
++        This would allow the compositor to place an application on a particular
++        output, if that output is indeed available. This can happen before
++        application is started which would make the application start on that
++        particular output. If the application is already started it would
++        move the application to that output.
++
++        There's no persistence of this request, once the application terminated
++        you'll need to issue this request again for that particular app_id.
++
++        See xdg_toplevel.set_app_id from the xdg-shell protocol for a
++        description of app_id.
++      </description>
++      <arg name="app_id" type="string"/>
++      <arg name="output" type="object" interface="wl_output"/>
++    </request>
++
++    <event name="app_on_output" since="8">
++      <description summary="Event sent as a reponse to set_app_output">
++        Clients can use this event to be notified when an application
++        wants to be displayed on a certain output. This event is sent in
++        response to the set_app_output request.
++
++        See xdg_toplevel.set_app_id from the xdg-shell protocol for a
++        description of app_id.
++      </description>
++      <arg name="app_id" type="string"/>
++      <arg name="output_name" type="string"/>
++    </event>
++  </interface>
++
++  <interface name="agl_shell_ext" version="1">
++    <description summary="extended user interface for Automotive Grade Linux platform">
++      This interface allows another client bind to the agl_shell interface,
++      while there's another shell client already present.
++
++      The client should first bind to this interface and then inform the
++      compositor with the 'doas_shell_client' request and it wants to bind to
++      the agl_shell interface. The client is still expected, if using a new
++      version of the agl_shell interface, to wait for the 'bound_ok' and
++      'bound_fail' events before issueing any other requests/events.
++
++      Note that this interface has its limitations, and the compositor would
++      still refuse the act for 'set_panel' or 'set_background' requests
++      of the agl_shell interface if there's already a client that used them.
++
++      Any other requests or events should be delievered and handled as it would
++      a client bound to the agl_shell interface.
++    </description>
++
++    <enum name="doas_shell_client_status">
++      <entry name="success" value="0"/>
++      <entry name="failed" value="1"/>
++    </enum>
++
++    <request name="destroy" type="destructor">
++      <description summary="destroys the factory object">
++        Call the destructor once you're ready with agl_shell_ext interface.
++        This would reset the state and would make any requests made
++        on the agl_shell interface be terminated. The client would need 
++        to bind again the agl_shell_ext and issue a 'doas_shell_client'
++        request.
++      </description>
++    </request>
++
++    <request name="doas_shell_client">
++      <description summary="Informs the compositor it wants to bind to the
++      agl_shell interface">
++        Prior to binding to agl_shell interface, this request would inform
++        the compositor that it wants to gain access the agl_shell interface.
++        The client is expected to wait for 'doas_shell_client_done' event and 
++        check for a successful status before going further with binding to
++        the agl_shell interface.
++      </description>
++    </request>
++
++    <event name="doas_done">
++      <description summary="event sent as a reply to doas_shell_client">
++        The client should check the status event to verify that the
++        compositor was able to handle the request.
++      </description>
++      <arg name="status" type="uint" enum="doas_shell_client_status"/>
++    </event>
+   </interface>
+ </protocol>
+-- 
+2.35.1
+
diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0003-activation_area-Remove-the-implicit-width-height-swa.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0003-activation_area-Remove-the-implicit-width-height-swa.patch
new file mode 100644 (file)
index 0000000..f59add5
--- /dev/null
@@ -0,0 +1,33 @@
+From b247f63441f75c47cebd6edd00ecc0c5f94728b6 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Tue, 2 Jan 2024 15:00:13 +0200
+Subject: [PATCH 3/3] activation_area: Remove the implicit width/height swap
+
+This does more harm than being useful so remove it.
+
+Bug-AGL: SPEC-5038
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ shell/wayland/display.cc | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/shell/wayland/display.cc b/shell/wayland/display.cc
+index 0b97954..9452dbf 100644
+--- a/shell/wayland/display.cc
++++ b/shell/wayland/display.cc
+@@ -863,12 +863,6 @@ void Display::AglShellDoSetupActivationArea(uint32_t x,
+   if (!m_agl.shell)
+     return;
+-  if (m_all_outputs[index]->transform == WL_OUTPUT_TRANSFORM_90) {
+-    uint32_t tmp_width = width;
+-    width = height;
+-    height = tmp_width;
+-  }
+-
+   SPDLOG_DEBUG("Using custom rectangle [{}x{}+{}x{}] for activation", width,
+                height, x, y);
+-- 
+2.35.1
+
diff --git a/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_%.bbappend b/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_%.bbappend
new file mode 100644 (file)
index 0000000..dbc82bc
--- /dev/null
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'agl-flutter', 'flutter-auto_aglflutter.inc', '', d)}
diff --git a/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc b/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc
new file mode 100644 (file)
index 0000000..c75cdc0
--- /dev/null
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI:append:use-nxp-bsp = " file://0001-Disable-on_frame_base_surface-wl_surface_commit.patch"
+SRC_URI:append: = " file://0001-display-Add-support-for-wl_output-version-4.patch \
+                  file://0002-display-Add-support-for-agl_shell-version-8.patch \
+                  file://0001-activation_area-Add-missing-width-and-height.patch \
+                  file://0002-activation_area-Allow-x-and-y-values-be-zero-for-the.patch \
+                  file://0003-activation_area-Remove-the-implicit-width-height-swa.patch \
+                  "
diff --git a/meta-agl-flutter/recipes-platform/images/agl-image-flutter-debug.bb b/meta-agl-flutter/recipes-platform/images/agl-image-flutter-debug.bb
new file mode 100644 (file)
index 0000000..c9c1f29
--- /dev/null
@@ -0,0 +1,29 @@
+require recipes-platform/images/agl-image-compositor.bb
+
+SUMMARY = "Example Flutter application debug image for development"
+LICENSE = "MIT"
+
+CLANGSDK = "1"
+
+# NOTES:
+# - the package-management IMAGE_FEATURE and packagegroup-agl-core-devel
+#   are explicitly added here to cover the usecase of building without
+#   passing agl-devel to aglsetup.sh.  This is explicitly a debug image
+#   where those are are always desired.
+# - Getting the debug version of the application requires changing
+#   the value of FLUTTER_APP_RUNTIME_MODES to include "debug",
+#   which is outside the scope of this image recipe.
+
+IMAGE_FEATURES += "ssh-server-openssh package-management dbg-pkgs"
+
+IMAGE_INSTALL += "\
+    packagegroup-agl-core-devel \
+    \
+    weston-ini-conf-landscape \
+    \
+    flutter-auto-verbose-logs \
+    \
+    flutter-engine-sdk-dev \
+    \
+    flutter-gallery \
+"
diff --git a/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb b/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb
new file mode 100644 (file)
index 0000000..0fdb7da
--- /dev/null
@@ -0,0 +1,16 @@
+require recipes-platform/images/agl-image-compositor.bb
+
+SUMMARY = "Example Flutter application image"
+LICENSE = "MIT"
+
+CLANGSDK = "1"
+
+IMAGE_FEATURES += "ssh-server-openssh"
+
+IMAGE_INSTALL += "\
+    weston-ini-conf-landscape \
+    \
+    flutter-auto \
+    \
+    flutter-gallery \
+"
diff --git a/meta-agl-flutter/tools/.gitignore b/meta-agl-flutter/tools/.gitignore
new file mode 100644 (file)
index 0000000..abda9b6
--- /dev/null
@@ -0,0 +1,151 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+#  Usually these files are written by a python script from a template
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# pipenv
+#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+#   However, in case of collaboration, if having platform-specific dependencies or dependencies
+#   having no cross-platform support, pipenv may install dependencies that don't work, or not
+#   install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# IDEA
+.idea
+
+# Flutter Workspace generated
+.agl
+.config
+.flutter-auto
+.pub_cache
+.tmp
+.vscode
+setup_env.sh
+flutter
+app
+flutter_*.log
+qemu_run.scpt
+
+dart-revision.json
+engine-revision.json
+
+*.scpt
+
diff --git a/meta-agl-flutter/tools/configs/_globals.json b/meta-agl-flutter/tools/configs/_globals.json
new file mode 100644 (file)
index 0000000..4caf9e8
--- /dev/null
@@ -0,0 +1,5 @@
+{
+    "flutter-version": "3.19.3",
+    "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 (file)
index 0000000..7002d41
--- /dev/null
@@ -0,0 +1,11 @@
+[
+    {
+        "uri": "https://github.com/toyota-connected/ivi-homescreen.git",
+        "rev": "ee49745485a88f23c32b8e3a62da40d4102c4623",
+        "branch": "agl"
+    },
+    {
+        "uri": "https://chromium.googlesource.com/chromium/tools/depot_tools.git",
+        "branch": "main"
+    }
+]
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 (file)
index 0000000..eba953f
--- /dev/null
@@ -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 (file)
index 0000000..dba5a88
--- /dev/null
@@ -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 (file)
index 0000000..cb3b9e6
--- /dev/null
@@ -0,0 +1,92 @@
+{
+  "id": "desktop-auto",
+  "load": true,
+  "supported_archs": [
+    "x86_64"
+  ],
+  "supported_host_types": [
+    "ubuntu",
+    "fedora"
+  ],
+  "flutter_runtime": "debug",
+  "type": "host",
+  "env": {
+    "HOMESCREEN_SRC_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen",
+    "HOMESCREEN_BUILD_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen/build",
+    "HOMESCREEN_CMAKE_ARGS": "-DCMAKE_BUILD_TYPE=Debug -DENABLE_DLT=OFF",
+    "HOMESCREEN_EXE": "${HOMESCREEN_BUILD_DIR}/shell/homescreen --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",
+            "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",
+            "apt-file search cmake"
+          ]
+        },
+        "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 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",
+            "dnf provides cmake"
+          ]
+        }
+      }
+    },
+    "post_cmds": [
+      {
+        "cwd": "${HOMESCREEN_BUILD_DIR}",
+        "cmds": [
+          "cmake ${HOMESCREEN_SRC_DIR}  ${HOMESCREEN_CMAKE_ARGS}",
+          "make homescreen -j"
+        ]
+      }
+    ]
+  },
+  "overwrite-existing": true,
+  "custom-device": {
+    "id": "desktop-auto",
+    "label": "Toyota Homescreen for AGL",
+    "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 \"${HOMESCREEN_EXE}\"",
+    "forwardPort": null,
+    "forwardPortSuccessRegex": null,
+    "screenshot": null
+  }
+}
\ No newline at end of file
diff --git a/meta-agl-flutter/tools/flutter_workspace.py b/meta-agl-flutter/tools/flutter_workspace.py
new file mode 120000 (symlink)
index 0000000..faacf59
--- /dev/null
@@ -0,0 +1 @@
+external/workspace-automation/flutter_workspace.py
\ No newline at end of file
index c12cd17..5f60ed0 100644 (file)
@@ -21,13 +21,15 @@ INHERIT += "buildstats"
 INHERIT += "buildstats-summary"
 
 # setup for PRSERV and HASHSERV
-#AGL_HOST_PRSERV ?= "10.30.72.18"
-#AGL_HOST_HASHSERV ?= "10.30.72.18"
+AGL_HOST_PRSERV ?= "10.30.72.18"
+AGL_HOST_HASHSERV ?= "10.30.72.18"
 
-#BB_HASHSERVE = "${AGL_HOST_HASHSERV}:8383"
-#BB_SIGNATURE_HANDLER = "OEEquivHash"
+# r/w hashserv
+BB_HASHSERVE = "${AGL_HOST_HASHSERV}:8787"
+BB_SIGNATURE_HANDLER = "OEEquivHash"
 
-#PRSERV_HOST = "${AGL_HOST_PRSERV}:8181"
+# r/w prserv
+PRSERV_HOST = "${AGL_HOST_PRSERV}:8585"
 
 IMAGE_INSTALL:append = " curl"
 
diff --git a/templates/feature/agl-flutter/50_bblayers.conf.inc b/templates/feature/agl-flutter/50_bblayers.conf.inc
new file mode 100644 (file)
index 0000000..807a46b
--- /dev/null
@@ -0,0 +1,7 @@
+AGL_META_CLANG = " ${METADIR}/external/meta-clang "
+
+BBLAYERS =+ " \
+   ${METADIR}/meta-agl/meta-agl-flutter \
+   ${METADIR}/external/meta-flutter \
+   ${METADIR}/external/meta-flutter/meta-flutter-apps \
+"
diff --git a/templates/feature/agl-flutter/50_local.conf.inc b/templates/feature/agl-flutter/50_local.conf.inc
new file mode 100644 (file)
index 0000000..6ca86b0
--- /dev/null
@@ -0,0 +1,5 @@
+# Include Flutter SDK in SDK
+TOOLCHAIN_HOST_TASK:append = " nativesdk-flutter-sdk"
+
+# Include agl-specific defaults
+require conf/include/agl-flutter.inc
diff --git a/templates/feature/agl-flutter/included.dep b/templates/feature/agl-flutter/included.dep
new file mode 100644 (file)
index 0000000..4f4e49e
--- /dev/null
@@ -0,0 +1 @@
+agl-pipewire agl-app-framework
diff --git a/templates/feature/agl-prhash-public/99_local.conf.inc b/templates/feature/agl-prhash-public/99_local.conf.inc
new file mode 100644 (file)
index 0000000..e64c8e2
--- /dev/null
@@ -0,0 +1,13 @@
+# setup for PRSERV and HASHSERV
+AGL_HOST_PRSERV ?= "prserv.automotivelinux.org"
+AGL_HOST_HASHSERV ?= "prserv.automotivelinux.org"
+
+# r/o hashserv
+BB_HASHSERVE = "auto"
+BB_HASHSERVE_UPSTREAM = "${AGL_HOST_HASHSERV}:8888"
+BB_SIGNATURE_HANDLER = "OEEquivHash"
+
+# r/o prserv
+PRSERV_HOST = "${AGL_HOST_PRSERV}:8686"
+
+IMAGE_INSTALL:append = " curl"
diff --git a/templates/feature/agl-weston-remoting/included.dep b/templates/feature/agl-weston-remoting/included.dep
deleted file mode 100644 (file)
index 82639da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-agl-demo