summaryrefslogtreecommitdiffstats
path: root/meta-agl-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-core')
-rw-r--r--meta-agl-core/LICENSE20
-rw-r--r--meta-agl-core/LICENSE.GPL-2.0-only288
-rw-r--r--meta-agl-core/LICENSE.MIT25
l---------meta-agl-core/README1
-rw-r--r--meta-agl-core/README-AGL.md33
-rw-r--r--meta-agl-core/classes/agl-core-image.bbclass32
-rw-r--r--meta-agl-core/classes/agl-crosssdk.bbclass9
-rw-r--r--meta-agl-core/classes/cloc.bbclass33
-rw-r--r--meta-agl-core/classes/image_types_wic_workaround.bbclass32
-rw-r--r--meta-agl-core/classes/sanity-meta-agl-core.bbclass10
-rw-r--r--meta-agl-core/conf/bblayers.conf.sample12
-rw-r--r--meta-agl-core/conf/distro/include/aarch64-tune.inc15
-rw-r--r--meta-agl-core/conf/distro/include/arc-tune.inc3
-rw-r--r--meta-agl-core/conf/distro/include/arm-tune.inc25
-rw-r--r--meta-agl-core/conf/distro/include/riscv64-tune.inc8
-rw-r--r--meta-agl-core/conf/distro/include/x86_64-tune.inc56
-rw-r--r--meta-agl-core/conf/distro/poky-agl.conf143
-rw-r--r--meta-agl-core/conf/include/agl-create-spdx.inc1
-rw-r--r--meta-agl-core/conf/include/agl-devel.inc16
-rw-r--r--meta-agl-core/conf/include/agl-package-management.inc6
-rw-r--r--meta-agl-core/conf/include/agl-selinux.inc20
-rw-r--r--meta-agl-core/conf/include/base-agl.inc18
-rw-r--r--meta-agl-core/conf/layer.conf28
-rw-r--r--meta-agl-core/conf/local.conf.sample273
-rw-r--r--meta-agl-core/conf/templates/base/bblayers.conf.sample73
-rw-r--r--meta-agl-core/conf/templates/base/conf-notes.txt35
-rw-r--r--meta-agl-core/conf/templates/base/local.conf.sample339
-rw-r--r--meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init.bbappend1
-rw-r--r--meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init_aglcore.inc1
-rw-r--r--meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-shell-activator_git.bb22
-rw-r--r--meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/common-init.inc6
-rw-r--r--meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init.bbappend1
-rw-r--r--meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init_aglcore.inc1
-rw-r--r--meta-agl-core/dynamic-layers/meta-oe/recipes-platform/images/agl-image-compositor.bbappend3
-rw-r--r--meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_%.bbappend1
-rw-r--r--meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_aglcore.inc10
-rw-r--r--meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation/0001-mapbox-update-API-url-to-match-new-schema.patch47
-rw-r--r--meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_%.bbappend1
-rw-r--r--meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_aglcore.inc14
-rw-r--r--meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.service12
-rw-r--r--meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.sh12
-rw-r--r--meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/systemd-selinux-relabel_1.0.bb25
-rw-r--r--meta-agl-core/dynamic-layers/meta-selinux/recipes-platform/packagegroups/packagegroup-agl-core-selinux.bb57
-rw-r--r--meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_0.1.bbappend1
-rw-r--r--meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_aglcore.inc4
-rw-r--r--meta-agl-core/files/group102
-rw-r--r--meta-agl-core/files/passwd68
-rw-r--r--meta-agl-core/recipes-config/agl-users/agl-users.inc14
-rw-r--r--meta-agl-core/recipes-config/agl-users/agl-users_1.0.bb9
-rw-r--r--meta-agl-core/recipes-connectivity/busybox/busybox_%.bbappend1
-rw-r--r--meta-agl-core/recipes-connectivity/busybox/busybox_aglcore.inc3
-rw-r--r--meta-agl-core/recipes-connectivity/busybox/files/enable-wget-https.cfg3
-rw-r--r--meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Do-not-overwrite-CFLAGS.patch37
-rw-r--r--meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Initialize-variables.patch39
-rw-r--r--meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/stdbool-fixes.patch53
-rw-r--r--meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb30
-rw-r--r--meta-agl-core/recipes-connectivity/connman/connman-conf.bbappend1
-rw-r--r--meta-agl-core/recipes-connectivity/connman/connman-conf/main.conf3
-rw-r--r--meta-agl-core/recipes-connectivity/connman/connman-conf_aglcore.inc9
-rw-r--r--meta-agl-core/recipes-connectivity/connman/connman/0001-disable-when-booting-over-nfs.patch14
-rw-r--r--meta-agl-core/recipes-connectivity/connman/connman_%.bbappend1
-rw-r--r--meta-agl-core/recipes-connectivity/connman/connman_aglcore.inc3
-rw-r--r--meta-agl-core/recipes-core/systemd/.appends.core0
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can-fd.network12
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.link11
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.network6
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-virtio.network5
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd-conf-canbus_1.0.bb32
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd-conf_%.bbappend1
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd-conf_aglcore.inc4
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd/e2fsck.conf3
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd/wait-disable.conf3
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd/wired.network8
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd_%.bbappend1
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd_aglcore.inc36
-rw-r--r--meta-agl-core/recipes-devtools/gdb/.appends.core0
-rw-r--r--meta-agl-core/recipes-devtools/gdb/gdb_%.bbappend1
-rw-r--r--meta-agl-core/recipes-devtools/gdb/gdb_aglcore.inc1
-rw-r--r--meta-agl-core/recipes-devtools/qemu/qemu_%.bbappend1
-rw-r--r--meta-agl-core/recipes-devtools/qemu/qemu_aglcore.inc5
-rw-r--r--meta-agl-core/recipes-graphics/libsdl2/libsdl2_%.bbappend1
-rw-r--r--meta-agl-core/recipes-graphics/libsdl2/libsdl2_aglcore.inc3
-rw-r--r--meta-agl-core/recipes-graphics/rba/librba_1.0.bb24
-rw-r--r--meta-agl-core/recipes-graphics/rba/rba-config.bb15
-rw-r--r--meta-agl-core/recipes-graphics/rba/rba-config/RBAModel.json320
-rw-r--r--meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf43
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb61
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-autologin11
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.conf.in3
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.service72
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.socket10
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb57
-rw-r--r--meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb16
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb156
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend12
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/grpc-proxy.cfg4
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-0.cfg3
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg4
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-0.cfg5
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-180.cfg6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-270.cfg6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-90.cfg6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in5
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg3
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-0.cfg3
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-180.cfg4
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-270.cfg4
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-90.cfg4
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-init.bbappend1
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc8
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch30
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch60
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_13.0.%.bbappend1
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc29
-rw-r--r--meta-agl-core/recipes-kernel/linux/kernel-devsrc.bbappend1
-rw-r--r--meta-agl-core/recipes-kernel/linux/kernel-devsrc_agl.inc6
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch25
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-agl-4.14.inc6
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-agl-4.19.inc5
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-agl-config.inc94
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-agl.inc24
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-yocto-agl.inc12
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-yocto_%.bbappend1
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/audit.cfg2
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/can-bus.cfg10
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/fanotify.cfg3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/lttng.cfg1
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/nbd.cfg3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch75
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/overlayfs.cfg7
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/qemu-drm.cfg2
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/qemu-virtio.cfg6
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/qemuarm.cfg8
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/ramdisk.cfg2
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/selinux.cfg14
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/sound-hda.cfg20
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/sound.cfg7
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/systemd-required.cfg42
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/systemd-sandbox.cfg9
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/systemtap.cfg9
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/vbox-vmware-sata.cfg18
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/x86-extra-graphic-devices.cfg37
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/x86-net-devices.cfg3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/x86-security-tpm.cfg3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/x86-upsquare.cfg11
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/x86-usb-devices.cfg81
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/xen_domu.cfg25
-rw-r--r--meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/files/0001-Added-appid-and-title-support.patch169
-rw-r--r--meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_%.bbappend1
-rw-r--r--meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_aglcore.inc9
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-boot.bb5
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-compositor.bb15
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-core-autobuilder.bb15
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.bb9
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-minimal.bb9
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-weston.bb15
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb26
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb19
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-devel.bb23
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-compositor.bb9
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb9
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb18
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb17
-rw-r--r--meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch152
-rw-r--r--meta-agl-core/recipes-support/ptest-runner/ptest-runner_2.%.bbappend2
-rw-r--r--meta-agl-core/recipes-support/ptest-runner/ptest-runner_agl.inc3
-rwxr-xr-xmeta-agl-core/scripts/oe-depends-dot121
-rwxr-xr-xmeta-agl-core/scripts/run-yocto-check-layer.sh40
171 files changed, 4559 insertions, 0 deletions
diff --git a/meta-agl-core/LICENSE b/meta-agl-core/LICENSE
new file mode 100644
index 000000000..e8758f89c
--- /dev/null
+++ b/meta-agl-core/LICENSE
@@ -0,0 +1,20 @@
+Different components of the AGL layers are under different licenses (a mix
+of MIT and GPLv2). See LICENSE.GPL-2.0-only and LICENSE.MIT for further
+details of the individual licenses.
+
+All metadata (e.g. .bb, .bbappend, .bbclass, .inc, templates/* and similar)
+is MIT licensed unless otherwise stated.
+Source code included in tree for individual recipes (e.g. patches) are under
+the LICENSE stated in the associated recipe (.bb file) unless otherwise stated.
+
+License information for any other files (scripts) is either explicitly stated
+or defaults to GPL version 2 only.
+
+Individual files can contain the following style tags instead of the full
+license text to identify their license:
+
+ SPDX-License-Identifier: GPL-2.0-only
+ SPDX-License-Identifier: MIT
+
+This enables machine processing of license information based on the SPDX
+License Identifiers that are here available: http://spdx.org/licenses/
diff --git a/meta-agl-core/LICENSE.GPL-2.0-only b/meta-agl-core/LICENSE.GPL-2.0-only
new file mode 100644
index 000000000..5db3c0a21
--- /dev/null
+++ b/meta-agl-core/LICENSE.GPL-2.0-only
@@ -0,0 +1,288 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+Note:
+Individual files contain the following tag instead of the full license text.
+
+ SPDX-License-Identifier: GPL-2.0-only
+
+This enables machine processing of license information based on the SPDX
+License Identifiers that are here available: http://spdx.org/licenses/
diff --git a/meta-agl-core/LICENSE.MIT b/meta-agl-core/LICENSE.MIT
new file mode 100644
index 000000000..a6919eb7e
--- /dev/null
+++ b/meta-agl-core/LICENSE.MIT
@@ -0,0 +1,25 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+Note:
+Individual files contain the following tag instead of the full license text.
+
+ SPDX-License-Identifier: MIT
+
+This enables machine processing of license information based on the SPDX
+License Identifiers that are here available: http://spdx.org/licenses/
diff --git a/meta-agl-core/README b/meta-agl-core/README
new file mode 120000
index 000000000..4a7a1a175
--- /dev/null
+++ b/meta-agl-core/README
@@ -0,0 +1 @@
+README-AGL.md \ No newline at end of file
diff --git a/meta-agl-core/README-AGL.md b/meta-agl-core/README-AGL.md
new file mode 100644
index 000000000..e410de29a
--- /dev/null
+++ b/meta-agl-core/README-AGL.md
@@ -0,0 +1,33 @@
+Overview
+========
+
+The
+[AGL Project](https://www.automotivelinux.org/) is an automotive-specific
+development environment that provides a Linux distribution
+[AGL UCB](https://www.automotivelinux.org/software/unified-code-base).
+
+AGL uses layers designed to be compatible with the
+[Yocto Project](https://www.yoctoproject.org) and the
+[OpenEmbedded Project (OE)](https://www.openembedded.org/wiki/Main_Page).
+
+This section provides information about the layers used by the AGL Project:
+
+* **`meta-agl/meta-agl-core`**: Minimal set of software needed to create an AGL distribution
+ used to boot a system.
+ AGL profiles are built on top of this minimal set of software.
+
+ ```
+ $ git clone https://gerrit.automotivelinux.org/gerrit/AGL/meta-agl
+ ```
+
+Maintenance
+-----------
+
+All patches must be submitted via the AGL Gerrit instance at
+<https://gerrit.automotivelinux.org>. See this wiki page for
+details:
+
+<https://wiki.automotivelinux.org/agl-distro/contributing>
+
+Layer maintainers:
+* Jan-Simon Möller <jsmoeller@linuxfoundation.org>
diff --git a/meta-agl-core/classes/agl-core-image.bbclass b/meta-agl-core/classes/agl-core-image.bbclass
new file mode 100644
index 000000000..bb5580391
--- /dev/null
+++ b/meta-agl-core/classes/agl-core-image.bbclass
@@ -0,0 +1,32 @@
+# AGL base image class
+#
+# As opposed to using core-image directly, this class:
+# - does not pull in packagegroup-base-extended by default to minimize images.
+# This does mean that many of the oe-core / poky MACHINE and DISTRO features
+# (e.g. 3g, nfs, etc.) will not result in packages being automatically pulled
+# into images since that is driven via packagegroup-base.
+# - includes hooks for integrating SELinux via meta-selinux
+# - disables locale installation by default
+#
+
+# Disable locales
+IMAGE_LINGUAS = ""
+
+# Hook to allow inheriting e.g. selinux-image by default.
+# Any bbclass used as a value should ultimately inherit core-image
+AGL_BASE_IMAGE ?= "core-image"
+
+inherit ${AGL_BASE_IMAGE}
+
+FEATURE_PACKAGES_selinux = " \
+ packagegroup-agl-core-selinux \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'packagegroup-agl-core-selinux-devel', '', d)} \
+"
+
+IMAGE_FEATURES:append = " ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
+
+CORE_IMAGE_BASE_INSTALL = " \
+ packagegroup-agl-core-boot \
+ \
+ ${CORE_IMAGE_EXTRA_INSTALL} \
+"
diff --git a/meta-agl-core/classes/agl-crosssdk.bbclass b/meta-agl-core/classes/agl-crosssdk.bbclass
new file mode 100644
index 000000000..5f6dbf303
--- /dev/null
+++ b/meta-agl-core/classes/agl-crosssdk.bbclass
@@ -0,0 +1,9 @@
+IMAGE_FEATURES += "dev-pkgs"
+IMAGE_INSTALL += "kernel-dev kernel-devsrc"
+
+inherit populate_sdk
+
+# Task do_populate_sdk and do_rootfs can't be exec simultaneously.
+# Both exec "createrepo" on the same directory, and so one of them
+# can failed (randomly).
+addtask do_populate_sdk after do_rootfs
diff --git a/meta-agl-core/classes/cloc.bbclass b/meta-agl-core/classes/cloc.bbclass
new file mode 100644
index 000000000..9b73704e8
--- /dev/null
+++ b/meta-agl-core/classes/cloc.bbclass
@@ -0,0 +1,33 @@
+# (C) 2017 Jan-Simon Möller <dl9pf@gmx.de>
+#
+# License: GPLv2
+#
+# summary with
+# cloc --sum-reports `find . -name "*clocreport" | grep -v "\-native" ` --out summary.report
+
+# cloc needs to be installed on the host
+# FIXME: create a cloc-native
+HOSTTOOLS += "cloc"
+
+CLOC_DIRECTORY ??= "${DEPLOY_DIR}/cloc/"
+CLOCSTATEDIR = "${WORKDIR}/cloc-destdir/"
+
+python do_cloc() {
+
+ import subprocess
+
+ source_dir = d.getVar('S', True)
+ pn = d.getVar('PN', True)
+
+ destdir = d.expand('${CLOCSTATEDIR}')
+ bb.utils.mkdirhier(destdir)
+
+ cloc_cmd = 'cloc %s -q --out=%s/%s.clocreport' % (source_dir, destdir, pn )
+ subprocess.call(cloc_cmd, shell=True)
+
+}
+
+
+addtask cloc before do_configure after do_patch
+
+EXPORT_FUNCTIONS do_cloc
diff --git a/meta-agl-core/classes/image_types_wic_workaround.bbclass b/meta-agl-core/classes/image_types_wic_workaround.bbclass
new file mode 100644
index 000000000..1a287ff7c
--- /dev/null
+++ b/meta-agl-core/classes/image_types_wic_workaround.bbclass
@@ -0,0 +1,32 @@
+# This is a workaround for the race condition between do_image_wic and other
+# do_image_* tasks. It ensures that no other do_image_* task can be running and
+# reading the rootfs directory at the same time as do_image_wic is modifying
+# the /etc/fstab file in the rootfs directory.
+#
+# A much better fix has been submitted upstream [1], but we can't carry those
+# modifications to `scripts/lib/wic` from poky easily in meta-agl. So instead
+# we have this workaround until the upstream fix is accepted and backported.
+#
+# Serializing the image functions as done here impacts build speed but it's
+# better to be slow and correct than to be fast and wrong.
+#
+# [1]: https://lists.openembedded.org/g/openembedded-core/topic/patch_5_6_wic_copy_rootfs/79592787,
+# https://lists.openembedded.org/g/openembedded-core/topic/patch_6_6_wic_optimise/79592788
+# and related patches.
+#
+# Bug-AGL: SPEC-3621
+
+def get_workaround_wic_typedeps(d):
+ if d.getVar('USING_WIC'):
+ fstypes = d.getVar('IMAGE_FSTYPES').split()
+ basetypes = set()
+ for fs in fstypes:
+ # Add the basetype to our set of basetypes in use
+ t = fs.split('.')[0]
+ if t != "wic":
+ basetypes.add(t)
+ return ' '.join(basetypes)
+ else:
+ return ''
+
+IMAGE_TYPEDEP:wic += "${@get_workaround_wic_typedeps(d)}"
diff --git a/meta-agl-core/classes/sanity-meta-agl-core.bbclass b/meta-agl-core/classes/sanity-meta-agl-core.bbclass
new file mode 100644
index 000000000..93df587f4
--- /dev/null
+++ b/meta-agl-core/classes/sanity-meta-agl-core.bbclass
@@ -0,0 +1,10 @@
+addhandler aglcore_bbappend_distrocheck
+aglcore_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck"
+python aglcore_bbappend_distrocheck() {
+ skip_check = e.data.getVar('SKIP_META_AGL_CORE_SANITY_CHECK') == "1"
+ if 'aglcore' not in e.data.getVar('AGL_FEATURES').split() and not skip_check:
+ bb.warn("You have included the meta-agl-core layer, but \
+'aglcore' has not been enabled in your AGL_FEATURES. Some bbappend files \
+may not take effect. See the meta-agl-core README for details on enabling \
+meta-agl-core support.")
+}
diff --git a/meta-agl-core/conf/bblayers.conf.sample b/meta-agl-core/conf/bblayers.conf.sample
new file mode 100644
index 000000000..8b1cbdfc5
--- /dev/null
+++ b/meta-agl-core/conf/bblayers.conf.sample
@@ -0,0 +1,12 @@
+# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+POKY_BBLAYERS_CONF_VERSION = "2"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+ ##OEROOT##/meta \
+ ##OEROOT##/meta-poky \
+ ##OEROOT##/meta-yocto-bsp \
+ "
diff --git a/meta-agl-core/conf/distro/include/aarch64-tune.inc b/meta-agl-core/conf/distro/include/aarch64-tune.inc
new file mode 100644
index 000000000..4628fcaf2
--- /dev/null
+++ b/meta-agl-core/conf/distro/include/aarch64-tune.inc
@@ -0,0 +1,15 @@
+# DEFAULTTUNE overrides for AGL on aarch64
+
+# We should not need the tuning include below as the BSP should include the right set already.
+# A double inclusion would produce a warning. This include line is just for reference
+# include conf/machine/include/arm/arch-armv8.inc
+
+AGL_DEFAULTTUNE ?= "aarch64"
+DEFAULTTUNE:agldefaulttune = "${AGL_DEFAULTTUNE}"
+
+# not yet ready
+#QB_SYSTEM_NAME ?= "qemu-system-aarch"
+#QB_DEFAULT_KERNEL ?= "zImage"
+#QB_DEFAULT_FSTYPE ?= "ext4"
+#QB_MACHINE ?= "-machine foo"
+#QB_CPU ?= "-cpu bar"
diff --git a/meta-agl-core/conf/distro/include/arc-tune.inc b/meta-agl-core/conf/distro/include/arc-tune.inc
new file mode 100644
index 000000000..43dabd5a9
--- /dev/null
+++ b/meta-agl-core/conf/distro/include/arc-tune.inc
@@ -0,0 +1,3 @@
+# DEFAULTTUNE overrides for AGL on arc
+
+# DEFAULTTUNE ?= "archs"
diff --git a/meta-agl-core/conf/distro/include/arm-tune.inc b/meta-agl-core/conf/distro/include/arm-tune.inc
new file mode 100644
index 000000000..b3ad64ad7
--- /dev/null
+++ b/meta-agl-core/conf/distro/include/arm-tune.inc
@@ -0,0 +1,25 @@
+# DEFAULTTUNE overrides for AGL on ARM 32bit
+
+# We should not need the tuning include below as the BSP should include the right set already.
+# A double inclusion would produce a warning. This include line is just for reference
+# include conf/machine/include/arm/arch-armv7ve.inc
+# medium profile boards need to
+# include conf/machine/include/arch/arm-armv7-a.inc
+
+# Standard target for 32bit ARM (newer than cortex-a15)
+ARM_DEFAULTTUNE = "armv7vethf-neon-vfpv4"
+
+# for cortex-a8, cortex-a9, cortex-a7 (=rpi 2/3)
+ARM_DEFAULTTUNE := "${@bb.utils.contains('DISTRO_FEATURES', 'agl-medium-arm-compiler', 'armv7athf-neon', '${ARM_DEFAULTTUNE}', d)}"
+
+# for armv6 (=rpi0/1)
+ARM_DEFAULTTUNE := "${@bb.utils.contains('DISTRO_FEATURES', 'agl-low-arm-compiler', 'arm1176jzfshf', '${ARM_DEFAULTTUNE}', d)}"
+
+AGL_DEFAULTTUNE ?= "${ARM_DEFAULTTUNE}"
+DEFAULTTUNE:agldefaulttune := "${AGL_DEFAULTTUNE}"
+
+QB_SYSTEM_NAME ?= "qemu-system-arm"
+QB_DEFAULT_KERNEL ?= "zImage"
+QB_DEFAULT_FSTYPE ?= "ext4"
+QB_MACHINE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'agl-medium-arm-compiler', '-machine vexpress-a9', '-machine vexpress-a15', d)}"
+QB_CPU ?= "${@bb.utils.contains('DISTRO_FEATURES', 'agl-medium-arm-compiler', '-cpu cortex-a9', '-cpu cortex-a15', d)}"
diff --git a/meta-agl-core/conf/distro/include/riscv64-tune.inc b/meta-agl-core/conf/distro/include/riscv64-tune.inc
new file mode 100644
index 000000000..981fc4283
--- /dev/null
+++ b/meta-agl-core/conf/distro/include/riscv64-tune.inc
@@ -0,0 +1,8 @@
+# DEFAULTTUNE overrides for AGL on riscv64
+
+# We should not need the tuning include below as the BSP should include the right set already.
+# A double inclusion would produce a warning. This include line is just for reference
+# include conf/machine/include/arm/arch-armv8.inc
+
+AGL_DEFAULTTUNE ?= "riscv64"
+DEFAULTTUNE:agldefaulttune = "${AGL_DEFAULTTUNE}"
diff --git a/meta-agl-core/conf/distro/include/x86_64-tune.inc b/meta-agl-core/conf/distro/include/x86_64-tune.inc
new file mode 100644
index 000000000..541b729b6
--- /dev/null
+++ b/meta-agl-core/conf/distro/include/x86_64-tune.inc
@@ -0,0 +1,56 @@
+# DEFAULTTUNE overrides for AGL on x86-64
+
+# We should not need the tuning include below as the BSP should include the right set already.
+# A double inclusion would produce a warning. This include line is just for reference
+#include conf/machine/include/tune-corei7.inc
+AGL_DEFAULTTUNE ?= "corei7-64"
+DEFAULTTUNE:agldefaulttune = "${AGL_DEFAULTTUNE}"
+
+# shortened copy of tune-corei7.inc due to bug in inclusion for tune-core2.inc
+# TUNE_ARCH is using .= x86-64 , if done twice, you get x86-64x86-64 as TUNE_ARCH :/
+# we should have at least the core2 tunings by default (=qemux86-64)
+
+# Extra tune features
+TUNEVALID[corei7] = "Enable corei7 specific processor optimizations"
+TUNE_CCARGS = "${@bb.utils.contains('TUNE_FEATURES', 'corei7', ' -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2', '', d)}"
+
+# Extra tune selections
+AVAILTUNES += "corei7-32"
+TUNE_FEATURES:tune-corei7-32 = "${TUNE_FEATURES:tune-x86} corei7"
+BASE_LIB:tune-corei7-32 = "lib"
+TUNE_PKGARCH:tune-corei7-32 = "corei7-32"
+PACKAGE_EXTRA_ARCHS:tune-corei7-32 = "${PACKAGE_EXTRA_ARCHS:tune-core2-32} corei7-32"
+QEMU_EXTRAOPTIONS_corei7-32 = " -cpu Nehalem,check=false"
+
+AVAILTUNES += "corei7-64"
+TUNE_FEATURES:tune-corei7-64 = "${TUNE_FEATURES:tune-x86-64} corei7"
+BASE_LIB:tune-corei7-64 = "lib64"
+TUNE_PKGARCH:tune-corei7-64 = "corei7-64"
+PACKAGE_EXTRA_ARCHS:tune-corei7-64 = "${PACKAGE_EXTRA_ARCHS:tune-core2-64} corei7-64"
+QEMU_EXTRAOPTIONS_corei7-64 = " -cpu Nehalem,check=false"
+
+AVAILTUNES += "corei7-64-x32"
+TUNE_FEATURES:tune-corei7-64-x32 = "${TUNE_FEATURES:tune-x86-64-x32} corei7"
+BASE_LIB:tune-corei7-64-x32 = "libx32"
+TUNE_PKGARCH:tune-corei7-64-x32 = "corei7-64-x32"
+PACKAGE_EXTRA_ARCHS:tune-corei7-64-x32 = "${PACKAGE_EXTRA_ARCHS:tune-core2-64-x32} corei7-64-x32"
+QEMU_EXTRAOPTIONS_corei7-64-x32 = " -cpu Nehalem,check=false"
+
+TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'm64', '${X86ARCH64}', '' ,d)}"
+
+# Bump qemux86-64 up to corei7
+AVAILTUNES += "qemux86-64"
+TUNE_FEATURES:tune-qemux86-64 = "${TUNE_FEATURES:tune-x86-64} corei7"
+BASE_LIB:tune-qemux86-64 = "lib64"
+TUNE_PKGARCH:tune-qemux86-64 = "corei7-64"
+PACKAGE_EXTRA_ARCHS:tune-qemux86-64 = "${PACKAGE_EXTRA_ARCHS:tune-core2-64} corei7-64"
+QEMU_EXTRAOPTIONS:qemux86-64 = " -cpu Nehalem,check=false"
+
+# QEMU / runqemu options (partly overrides qemuboot-x86.inc)
+QB_MACHINE = "-machine q35"
+QB_SYSTEM_NAME:x86-64 = "qemu-system-x86_64"
+QB_CPU:x86-64 = "-cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt"
+QB_CPU_KVM:x86-64 = "-cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt"
+
+# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
+QB_OPT_APPEND = "-vga vmware -display default,show-cursor=on -usb -device usb-tablet -device virtio-rng-pci"
diff --git a/meta-agl-core/conf/distro/poky-agl.conf b/meta-agl-core/conf/distro/poky-agl.conf
new file mode 100644
index 000000000..266a06d70
--- /dev/null
+++ b/meta-agl-core/conf/distro/poky-agl.conf
@@ -0,0 +1,143 @@
+require conf/distro/poky.conf
+
+# Insert overrides "agldefaulttune" and "forcedefaulttune" before forcevariable
+OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}${LIBCOVERRIDE}:agldefaulttune:forcedefaulttune:forcevariable"
+
+# AGL specific derivations
+DISTRO = "poky-agl"
+DISTRO_NAME = "Automotive Grade Linux"
+
+
+# Release flags
+DISTRO_CODENAME = "ricefish"
+AGL_BRANCH = "master"
+AGLVERSION = "17.90.0"
+
+# switch devel/release
+#AGLRELEASETYPE ?= "agldevelopment"
+AGLRELEASETYPE := "aglrelease"
+
+OVERRIDES .= ":${AGLRELEASETYPE}"
+
+#for development
+DISTRO_VERSION:agldevelopment := "${AGLVERSION}+snapshot-${METADATA_REVISION}"
+
+#for release
+DISTRO_VERSION:aglrelease := "${AGLVERSION}"
+DISTRO_BRANCH_VERSION_TAG = "${DISTRO_CODENAME}/${@'${DISTRO_VERSION}'.replace('+snapshot-${METADATA_REVISION}','')}"
+
+# reproducible builds:
+# Set the desired timestamps
+# E.g. update for (major) releases
+export SOURCE_DATE_EPOCH = "1706800000"
+REPRODUCIBLE_TIMESTAMP_ROOTFS = "1706800000"
+
+
+# SDK
+SDK_VENDOR = "-aglsdk"
+
+# SDKPATHINSTALL is the folder where the SDK is going to be installed
+# Due to an issue with the qt5 environment (see SPEC-1667),
+# we add DEFAULTTUNE to the SDKPATH to mitigate the issue.
+SDKPATHINSTALL = "/opt/agl-sdk/${SDK_VERSION}-${DEFAULTTUNE}"
+
+
+MAINTAINER = "AGL https://lists.automotivelinux.org/g/agl-dev-community"
+
+TARGET_VENDOR = "-agl"
+
+# Override these in poky based distros
+AGL_DEFAULT_DISTRO_FEATURES = "usrmerge largefile opengl wayland pam bluetooth bluez5 3g polkit"
+POKY_DEFAULT_DISTRO_FEATURES := "${AGL_DEFAULT_DISTRO_FEATURES}"
+OVERRIDES .= ":${DISTRO_CODENAME}"
+
+DISTRO_FEATURES:remove = "x11"
+DISTRO_FEATURES_BACKFILL_CONSIDERED = "pulseaudio"
+
+INIT_MANAGER = "systemd"
+# Override default of "systemd-compat-units"
+VIRTUAL-RUNTIME_initscripts = ""
+# Override default of "busybox-syslog"
+VIRTUAL-RUNTIME_base-utils-syslog = ""
+
+# network manager to use (possible values: systemd, connman)
+VIRTUAL-RUNTIME_net_manager = "connman"
+
+
+QEMU_TARGETS ?= "arm aarch64 i386 x86_64 riscv64"
+# Other QEMU_TARGETS "mips mips64 mips64el ppc sh4"
+
+MIRRORS =+ "\
+bzr://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+cvs://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+git://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+gitsm://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+hg://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+osc://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+p4://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+svn://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+bzr://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+cvs://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+git://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+gitsm://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+hg://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+osc://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+p4://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+svn://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+ \
+ftp://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+http://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+https://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \
+ftp://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+http://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+https://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \
+"
+
+# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
+# fetch from the network (and warn you if not). To disable the test set
+# the variable to be empty.
+# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD
+CONNECTIVITY_CHECK_URIS ?= ""
+
+# using multiple BSP layers causes dangling bbappends in meta-agl-bsp
+# turn it into a warning
+#BB_DANGLINGAPPENDS_WARNONLY = "1"
+
+# Not yet upstreamed; should be submitted.
+SECURITY_CFLAGS:pn-qtwebengine = "${SECURITY_NO_PIE_CFLAGS}"
+
+# AGL uses 4 optimization levels
+# 2 for ARM 32bit
+# - a high and a medium setting for the CCARGS
+# - the high setting is default (needs >= cortex-a15)
+# - the medium setting is enabled with: DISTRO_FEATURES:append = " agl-medium-arm-compiler "
+# 1 for ARM 64bit / AARCH64
+# 1 for x86-64
+# 1 for RISC-V 64-bit
+require conf/distro/include/${TARGET_ARCH}-tune.inc
+
+# Generic qemu and qemuboot (runqemu) enhancements
+# check qemuboot.bbclass
+# - use 2G RAM by default
+QB_MEM ?= "-m 2048"
+# use pulseaudio on the host side - off as qemu-native is built with alsa
+#QB_AUDIO_DRV = "pa"
+# expose a virtual 'hda' sound card to the guest (arm/aarch64/x86-64)
+QB_AUDIO_OPT = "-device intel-hda -device hda-duplex -audiodev alsa,id=agl"
+
+# Board templates can add extra IMAGE_FSTYPES through this.
+# It is added (late) through the AGL image recipes.
+AGL_EXTRA_IMAGE_FSTYPES ??= ""
+AGL_EXTRA_INITRAMFS_FSTYPES ??= ""
+#
+# Default IMAGE FSTYPES wic.xz
+AGL_DEFAULT_IMAGE_FSTYPES ?= "wic.xz wic.bmap wic.xz.sha256sum"
+AGL_DEFAULT_IMAGE_FSTYPES:qemuall ?= "${@bb.utils.contains('AGL_FEATURES', 'AGLCI', 'ext4.xz', 'ext4', d)}"
+AGL_DEFAULT_IMAGE_FSTYPES:append:netboot = " ${@bb.utils.contains('AGL_FEATURES', 'AGLCI', 'ext4.xz', 'ext4', d)}"
+AGL_DEFAULT_INITRAMFS_FSTYPES ?= "ext4.gz"
+
+# DEFAULT IMAGE_FSTYPES for AGL (no - BSPs should not set this)
+#
+IMAGE_FSTYPES = "${AGL_DEFAULT_IMAGE_FSTYPES} ${AGL_EXTRA_IMAGE_FSTYPES}"
+INITRAMFS_FSTYPES = "${AGL_DEFAULT_INITRAMFS_FSTYPES} ${AGL_EXTRA_INITRAMFS_FSTYPES}"
+#
diff --git a/meta-agl-core/conf/include/agl-create-spdx.inc b/meta-agl-core/conf/include/agl-create-spdx.inc
new file mode 100644
index 000000000..8d71013e3
--- /dev/null
+++ b/meta-agl-core/conf/include/agl-create-spdx.inc
@@ -0,0 +1 @@
+INHERIT += " create-spdx "
diff --git a/meta-agl-core/conf/include/agl-devel.inc b/meta-agl-core/conf/include/agl-devel.inc
new file mode 100644
index 000000000..055fa61e3
--- /dev/null
+++ b/meta-agl-core/conf/include/agl-devel.inc
@@ -0,0 +1,16 @@
+IMAGE_FEATURES =+ "debug-tweaks tools-debug tools-profile"
+
+IMAGE_INSTALL:append = " \
+ packagegroup-agl-core-devel \
+"
+
+# Install libdrm-test, including modetest, to images with GUI
+IMAGE_INSTALL:append = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' libdrm-tests', '', d)}"
+
+# disable install of debug files in SDK
+# initial value: SDKIMAGE_FEATURES="dev-pkgs dbg-pkgs staticdev-pkgs"
+SDKIMAGE_FEATURES="dev-pkgs"
+
+# allows insertion of code or items specific to developement
+OVERRIDES:append = ":agl-devel"
+DISTRO_FEATURES:append = " agl-devel"
diff --git a/meta-agl-core/conf/include/agl-package-management.inc b/meta-agl-core/conf/include/agl-package-management.inc
new file mode 100644
index 000000000..9acf439c2
--- /dev/null
+++ b/meta-agl-core/conf/include/agl-package-management.inc
@@ -0,0 +1,6 @@
+# Enable package management
+IMAGE_FEATURES =+ "package-management"
+PACKAGE_FEED_URIS = "http://192.168.7.1:8000/tmp/deploy/"
+PACKAGE_FEED_BASE_PATHS = "rpm"
+PACKAGE_FEED_ARCHS = ""
+#${PACKAGE_ARCHS}"
diff --git a/meta-agl-core/conf/include/agl-selinux.inc b/meta-agl-core/conf/include/agl-selinux.inc
new file mode 100644
index 000000000..aeb26e33d
--- /dev/null
+++ b/meta-agl-core/conf/include/agl-selinux.inc
@@ -0,0 +1,20 @@
+DISTRO_FEATURES:append = " acl xattr selinux"
+
+# Reiterate the upstream default of targeted policy since that
+# is the mostly widely used model, and it will likely be easier
+# to pull policy from other distributions for it.
+# Having an explicit setting here seems useful for documentation
+# purposes, and it is still possible that using one of the other
+# refpolicy package options as the AGL default desirable, and it
+# would be set here.
+PREFERRED_PROVIDER_virtual/refpolicy ?= "refpolicy-targeted"
+
+# Default to permissive mode
+DEFAULT_ENFORCING ?= "permissive"
+
+# Override the base image class to get the SELinux labeling hook
+AGL_BASE_IMAGE ?= "selinux-image"
+
+# Mask out meta-selinux's linux-yocto kernel config bbappend to
+# avoid collision with AGL's own more universal scheme.
+BBMASK += "meta-selinux/recipes-kernel/linux/" \ No newline at end of file
diff --git a/meta-agl-core/conf/include/base-agl.inc b/meta-agl-core/conf/include/base-agl.inc
new file mode 100644
index 000000000..30bfc93d3
--- /dev/null
+++ b/meta-agl-core/conf/include/base-agl.inc
@@ -0,0 +1,18 @@
+# Disable kernel module tarballs by default on the assumption that
+# desired modules will already be present in images.
+# Comment this out to receive the separate modules tarball again.
+MODULE_TARBALL_DEPLOY ?= "0"
+
+# Comment out below if want to use QtWebkit
+PACKAGECONFIG:remove:pn-qtquick1 = "webkit"
+
+
+ASSUME_PROVIDED:remove = "tar-native"
+
+# Use static IDs to enable full-filesystem updates
+USERADDEXTENSION = "useradd-staticids"
+USERADD_ERROR_DYNAMIC = "error"
+USERADD_GID_TABLES = "files/group"
+USERADD_UID_TABLES = "files/passwd"
+
+AGL_FEATURES += "aglcore"
diff --git a/meta-agl-core/conf/layer.conf b/meta-agl-core/conf/layer.conf
new file mode 100644
index 000000000..8047df519
--- /dev/null
+++ b/meta-agl-core/conf/layer.conf
@@ -0,0 +1,28 @@
+# 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 += "aglcore"
+BBFILE_PATTERN_aglcore = "^${LAYERDIR}/"
+BBFILE_PRIORITY_aglcore = "60"
+
+BBFILES_DYNAMIC += " \
+ openembedded-layer:${LAYERDIR}/dynamic-layers/meta-oe/*/*/*.bb \
+ openembedded-layer:${LAYERDIR}/dynamic-layers/meta-oe/*/*/*.bbappend \
+ \
+ selinux:${LAYERDIR}/dynamic-layers/meta-selinux/*/*/*.bb \
+ selinux:${LAYERDIR}/dynamic-layers/meta-selinux/*/*/*.bbappend \
+ \
+ qt5-layer:${LAYERDIR}/dynamic-layers/meta-qt5/*/*/*.bb \
+ qt5-layer:${LAYERDIR}/dynamic-layers/meta-qt5/*/*/*.bbappend \
+"
+
+LAYERSERIES_COMPAT_aglcore = "scarthgap"
+LAYERDEPENDS_aglcore = "core"
+
+# Sanity check for meta-virtualization layer.
+# Setting SKIP_META_VIRT_SANITY_CHECK to "1" would skip the bbappend files check.
+#INHERIT += "sanity-meta-agl-core"
diff --git a/meta-agl-core/conf/local.conf.sample b/meta-agl-core/conf/local.conf.sample
new file mode 100644
index 000000000..4cfae4ceb
--- /dev/null
+++ b/meta-agl-core/conf/local.conf.sample
@@ -0,0 +1,273 @@
+#
+# This file is your local configuration file and is where all local user settings
+# are placed. The comments in this file give some guide to the options a new user
+# to the system might want to change but pretty much any configuration option can
+# be set in this file. More adventurous users can look at local.conf.extended
+# which contains other examples of configuration which can be placed in this file
+# but new users likely won't need any of them initially.
+#
+# Lines starting with the '#' character are commented out and in some cases the
+# default values are provided as comments to show people example syntax. Enabling
+# the option is a question of removing the # character and making any change to the
+# variable as required.
+
+#
+# Machine Selection
+#
+# You need to select a specific machine to target the build with. There are a selection
+# of emulated machines available which can boot and run in the QEMU emulator:
+#
+#MACHINE ?= "qemuarm"
+#MACHINE ?= "qemuarm64"
+#MACHINE ?= "qemumips"
+#MACHINE ?= "qemumips64"
+#MACHINE ?= "qemuppc"
+#MACHINE ?= "qemux86"
+#MACHINE ?= "qemux86-64"
+#
+# There are also the following hardware board target machines included for
+# demonstration purposes:
+#
+#MACHINE ?= "beaglebone-yocto"
+#MACHINE ?= "genericx86"
+#MACHINE ?= "genericx86-64"
+#MACHINE ?= "edgerouter"
+#
+# This sets the default machine to be qemux86-64 if no other machine is selected:
+MACHINE ??= "qemux86-64"
+
+#
+# Where to place downloads
+#
+# During a first build the system will download many different source code tarballs
+# from various upstream projects. This can take a while, particularly if your network
+# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
+# can preserve this directory to speed up this part of subsequent builds. This directory
+# is safe to share between multiple builds on the same machine too.
+#
+# The default is a downloads directory under TOPDIR which is the build directory.
+#
+#DL_DIR ?= "${TOPDIR}/downloads"
+
+#
+# Where to place shared-state files
+#
+# BitBake has the capability to accelerate builds based on previously built output.
+# This is done using "shared state" files which can be thought of as cache objects
+# and this option determines where those files are placed.
+#
+# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
+# from these files if no changes were made to the configuration. If changes were made
+# to the configuration, only shared state files where the state was still valid would
+# be used (done using checksums).
+#
+# The default is a sstate-cache directory under TOPDIR.
+#
+#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
+
+#
+# Where to place the build output
+#
+# This option specifies where the bulk of the building work should be done and
+# where BitBake should place its temporary files and output. Keep in mind that
+# this includes the extraction and compilation of many applications and the toolchain
+# which can use Gigabytes of hard disk space.
+#
+# The default is a tmp directory under TOPDIR.
+#
+#TMPDIR = "${TOPDIR}/tmp"
+
+#
+# Default policy config
+#
+# The distribution setting controls which policy settings are used as defaults.
+# The default value is fine for general Yocto project use, at least initially.
+# Ultimately when creating custom policy, people will likely end up subclassing
+# these defaults.
+#
+DISTRO ?= "poky"
+# As an example of a subclass there is a "bleeding" edge policy configuration
+# where many versions are set to the absolute latest code from the upstream
+# source control systems. This is just mentioned here as an example, its not
+# useful to most new users.
+# DISTRO ?= "poky-bleeding"
+
+#
+# Package Management configuration
+#
+# This variable lists which packaging formats to enable. Multiple package backends
+# can be enabled at once and the first item listed in the variable will be used
+# to generate the root filesystems.
+# Options are:
+# - 'package_deb' for debian style deb files
+# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
+# - 'package_rpm' for rpm style packages
+# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
+# We default to rpm:
+PACKAGE_CLASSES ?= "package_rpm"
+
+#
+# SDK target architecture
+#
+# This variable specifies the architecture to build SDK items for and means
+# you can build the SDK packages for architectures other than the machine you are
+# running the build on (i.e. building i686 packages on an x86_64 host).
+# Supported values are i686 and x86_64
+#SDKMACHINE ?= "i686"
+
+#
+# Extra image configuration defaults
+#
+# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
+# images. Some of these options are added to certain image types automatically. The
+# variable can contain the following options:
+# "dbg-pkgs" - add -dbg packages for all installed packages
+# (adds symbol information for debugging/profiling)
+# "src-pkgs" - add -src packages for all installed packages
+# (adds source code for debugging)
+# "dev-pkgs" - add -dev packages for all installed packages
+# (useful if you want to develop against libs in the image)
+# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
+# (useful if you want to run the package test suites)
+# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
+# "tools-debug" - add debugging tools (gdb, strace)
+# "eclipse-debug" - add Eclipse remote debugging support
+# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
+# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
+# "debug-tweaks" - make an image suitable for development
+# e.g. ssh root access has a blank password
+# There are other application targets that can be used here too, see
+# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
+# We default to enabling the debugging tweaks.
+EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
+
+#
+# Additional image features
+#
+# The following is a list of additional classes to use when building images which
+# enable extra features. Some available options which can be included in this variable
+# are:
+# - 'buildstats' collect build statistics
+USER_CLASSES ?= "buildstats"
+
+#
+# Runtime testing of images
+#
+# The build system can test booting virtual machine images under qemu (an emulator)
+# after any root filesystems are created and run tests against those images. It can also
+# run tests against any SDK that are built. To enable this uncomment these lines.
+# See classes/test{image,sdk}.bbclass for further details.
+#IMAGE_CLASSES += "testimage testsdk"
+#TESTIMAGE_AUTO:qemuall = "1"
+
+#
+# Interactive shell configuration
+#
+# Under certain circumstances the system may need input from you and to do this it
+# can launch an interactive shell. It needs to do this since the build is
+# multithreaded and needs to be able to handle the case where more than one parallel
+# process may require the user's attention. The default is iterate over the available
+# terminal types to find one that works.
+#
+# Examples of the occasions this may happen are when resolving patches which cannot
+# be applied, to use the devshell or the kernel menuconfig
+#
+# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
+# Note: currently, Konsole support only works for KDE 3.x due to the way
+# newer Konsole versions behave
+#OE_TERMINAL = "auto"
+# By default disable interactive patch resolution (tasks will just fail instead):
+PATCHRESOLVE = "noop"
+
+#
+# Disk Space Monitoring during the build
+#
+# Monitor the disk space during the build. If there is less that 1GB of space or less
+# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
+# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard halt
+# of the build. The reason for this is that running completely out of space can corrupt
+# files and damages the build in ways which may not be easily recoverable.
+# It's necesary to monitor /tmp, if there is no space left the build will fail
+# with very exotic errors.
+BB_DISKMON_DIRS ??= "\
+ STOPTASKS,${TMPDIR},1G,100K \
+ STOPTASKS,${DL_DIR},1G,100K \
+ STOPTASKS,${SSTATE_DIR},1G,100K \
+ STOPTASKS,/tmp,100M,100K \
+ HALT,${TMPDIR},100M,1K \
+ HALT,${DL_DIR},100M,1K \
+ HALT,${SSTATE_DIR},100M,1K \
+ HALT,/tmp,10M,1K"
+
+#
+# Shared-state files from other locations
+#
+# As mentioned above, shared state files are prebuilt cache data objects which can
+# used to accelerate build time. This variable can be used to configure the system
+# to search other mirror locations for these objects before it builds the data itself.
+#
+# This can be a filesystem directory, or a remote url such as http or ftp. These
+# would contain the sstate-cache results from previous builds (possibly from other
+# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
+# cache locations to check for the shared objects.
+# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
+# at the end as shown in the examples below. This will be substituted with the
+# correct path within the directory structure.
+#SSTATE_MIRRORS ?= "\
+#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
+#file://.* file:///some/local/dir/sstate/PATH"
+
+#
+# Yocto Project SState Mirror
+#
+# The Yocto Project has prebuilt artefacts available for its releases, you can enable
+# use of these by uncommenting the following line. This will mean the build uses
+# the network to check for artefacts at the start of builds, which does slow it down
+# equally, it will also speed up the builds by not having to build things if they are
+# present in the cache. It assumes you can download something faster than you can build it
+# which will depend on your network.
+#
+#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH"
+
+#
+# Qemu configuration
+#
+# By default native qemu will build with a builtin VNC server where graphical output can be
+# seen. The line below enables the SDL UI frontend too.
+PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
+# By default libsdl2-native will be built, if you want to use your host's libSDL instead of
+# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
+#ASSUME_PROVIDED += "libsdl2-native"
+
+# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds
+# a handy set of menus for controlling the emulator.
+#PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"
+
+#
+# Hash Equivalence
+#
+# Enable support for automatically running a local hash equivalence server and
+# instruct bitbake to use a hash equivalence aware signature generator. Hash
+# equivalence improves reuse of sstate by detecting when a given sstate
+# artifact can be reused as equivalent, even if the current task hash doesn't
+# match the one that generated the artifact.
+#
+# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format
+#
+#BB_HASHSERVE = "auto"
+#BB_SIGNATURE_HANDLER = "OEEquivHash"
+
+# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
+# track the version of this file when it was generated. This can safely be ignored if
+# this doesn't mean anything to you.
+CONF_VERSION = "2"
+
+# meta-agl-core uses these variables
+AGL_FEATURES ?= ""
+AGL_EXTRA_IMAGE_FSTYPES ?= ""
+
+DISTRO_FEATURES:append = " systemd "
+DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " sysvinit"
+VIRTUAL-RUNTIME_init_manager = "systemd"
+
+# soon: INIT_MANAGER = "systemd"
diff --git a/meta-agl-core/conf/templates/base/bblayers.conf.sample b/meta-agl-core/conf/templates/base/bblayers.conf.sample
new file mode 100644
index 000000000..c6a37a0b0
--- /dev/null
+++ b/meta-agl-core/conf/templates/base/bblayers.conf.sample
@@ -0,0 +1,73 @@
+# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+LCONF_VERSION = "6"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+# Convenience variables usable in various configuration fragments
+#----------------------------------
+BCONFDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)))}"
+METADIR := "${@os.path.abspath('##OEROOT##/../..')}"
+
+# These are the core OE + YP Layers
+#----------------------------------
+YOCTO_LAYERS = " \
+ ${METADIR}/external/poky/meta \
+ ${METADIR}/external/poky/meta-poky \
+ "
+# this is added for the boards where necessary, not globally
+# ${METADIR}/external/poky/meta-yocto-bsp \
+#
+# These are the AGL CORE Layers that make up the basis
+# - they create a minimal bootable filesystem
+# with some automotive tools/libraries
+#-----------------------------------------------------
+AGL_CORE_LAYERS = " \
+ ${METADIR}/meta-agl/meta-agl-core \
+ ${METADIR}/meta-agl/meta-agl-bsp \
+ "
+
+# These are the direct dependencies of the AGL CORE Layers
+#---------------------------------------------------------
+AGL_CORE_DEPENDENCY_LAYERS = " \
+ ${METADIR}/external/meta-openembedded/meta-oe \
+ "
+
+# Indirection to avoid duplicate inclusions of the same folder into BBLAYERS
+# the evaluation is in the bblayers.conf.sample in meta-agl/meta-agl-core/conf/templates/base
+AGL_META_NETWORKING ?= ""
+AGL_META_PYTHON ?= ""
+AGL_META_FILESYSTEMS ?= ""
+AGL_META_MULTIMEDIA ?= ""
+AGL_META_VIRTUALIZATION ?= ""
+AGL_META_CLANG ?= ""
+AGL_META_QT5 ?= ""
+
+AGL_OTHER_DEPENDENCY_LAYERS = " \
+ ${AGL_META_NETWORKING} \
+ ${AGL_META_PYTHON} \
+ ${AGL_META_FILESYSTEMS} \
+ ${AGL_META_MULTIMEDIA} \
+ ${AGL_META_VIRTUALIZATION} \
+ ${AGL_META_CLANG} \
+ ${AGL_META_QT5} \
+ "
+
+####################
+# Combine the layers
+BBLAYERS ?= " \
+ ${AGL_OTHER_DEPENDENCY_LAYERS} \
+ ${AGL_CORE_DEPENDENCY_LAYERS} \
+ ${AGL_CORE_LAYERS} \
+ ${YOCTO_LAYERS} \
+ "
+
+BBLAYERS_NON_REMOVABLE ?= " \
+ ${METADIR}/external/poky/meta \
+ ${METADIR}/external/poky/meta-poky \
+ ${METADIR}/meta-agl/meta-agl-core \
+ "
+
+
+
diff --git a/meta-agl-core/conf/templates/base/conf-notes.txt b/meta-agl-core/conf/templates/base/conf-notes.txt
new file mode 100644
index 000000000..09ae72647
--- /dev/null
+++ b/meta-agl-core/conf/templates/base/conf-notes.txt
@@ -0,0 +1,35 @@
+Common targets are:
+- meta-agl layer:
+ - included by default
+ * agl-image-boot (just enough to boot)
+ * agl-image-minimal (minimal filesystem with APIs)
+ * agl-image-minimal-crosssdk (crosssdk for ^^)
+
+ * agl-image-weston (minimal filesystem with weston)
+
+- meta-agl-demo: (IVI demo with UI)
+ - with 'agl-demo'
+ * agl-image-ivi (base for IVI targets)
+ * agl-image-ivi-crosssdk (sdk for ^^)
+
+ * agl-image-graphical-qt5 (weston plus qt5 framework libs)
+ * agl-image-graphical-qt5-crosssdk (sdk for ^^)
+
+ * 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 ^^)
+
+
diff --git a/meta-agl-core/conf/templates/base/local.conf.sample b/meta-agl-core/conf/templates/base/local.conf.sample
new file mode 100644
index 000000000..be49ed00d
--- /dev/null
+++ b/meta-agl-core/conf/templates/base/local.conf.sample
@@ -0,0 +1,339 @@
+#
+# This file is your local configuration file and is where all local user settings
+# are placed. The comments in this file give some guide to the options a new user
+# to the system might want to change but pretty much any configuration option can
+# be set in this file. More adventurous users can look at local.conf.extended
+# which contains other examples of configuration which can be placed in this file
+# but new users likely won't need any of them initially.
+#
+# Lines starting with the '#' character are commented out and in some cases the
+# default values are provided as comments to show people example syntax. Enabling
+# the option is a question of removing the # character and making any change to the
+# variable as required.
+
+#
+# Machine Selection
+#
+# You need to select a specific machine to target the build with. There are a selection
+# of emulated machines available which can boot and run in the QEMU emulator:
+#
+#MACHINE ?= "qemuarm"
+#MACHINE ?= "qemuarm64"
+#MACHINE ?= "qemumips"
+#MACHINE ?= "qemumips64"
+#MACHINE ?= "qemuppc"
+#MACHINE ?= "qemux86"
+#MACHINE ?= "qemux86-64"
+#
+# There are also the following hardware board target machines included for
+# demonstration purposes:
+#
+#MACHINE ?= "beaglebone-yocto"
+#MACHINE ?= "genericx86"
+#MACHINE ?= "genericx86-64"
+#MACHINE ?= "mpc8315e-rdb"
+#MACHINE ?= "edgerouter"
+#
+# This sets the default machine to be qemux86-64 if no other machine is selected:
+MACHINE ??= "qemux86-64"
+
+#
+# Where to place downloads
+#
+# During a first build the system will download many different source code tarballs
+# from various upstream projects. This can take a while, particularly if your network
+# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
+# can preserve this directory to speed up this part of subsequent builds. This directory
+# is safe to share between multiple builds on the same machine too.
+#
+# The default is a downloads directory under TOPDIR which is the build directory.
+#
+#DL_DIR ?= "${TOPDIR}/downloads"
+
+#
+# Where to place shared-state files
+#
+# BitBake has the capability to accelerate builds based on previously built output.
+# This is done using "shared state" files which can be thought of as cache objects
+# and this option determines where those files are placed.
+#
+# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
+# from these files if no changes were made to the configuration. If changes were made
+# to the configuration, only shared state files where the state was still valid would
+# be used (done using checksums).
+#
+# The default is a sstate-cache directory under TOPDIR.
+#
+#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
+
+#
+# Where to place the build output
+#
+# This option specifies where the bulk of the building work should be done and
+# where BitBake should place its temporary files and output. Keep in mind that
+# this includes the extraction and compilation of many applications and the toolchain
+# which can use Gigabytes of hard disk space.
+#
+# The default is a tmp directory under TOPDIR.
+#
+#TMPDIR = "${TOPDIR}/tmp"
+
+#
+# Default policy config
+#
+# The distribution setting controls which policy settings are used as defaults.
+# The default value is fine for general Yocto project use, at least initially.
+# Ultimately when creating custom policy, people will likely end up subclassing
+# these defaults.
+#
+DISTRO ?= "poky"
+# As an example of a subclass there is a "bleeding" edge policy configuration
+# where many versions are set to the absolute latest code from the upstream
+# source control systems. This is just mentioned here as an example, its not
+# useful to most new users.
+# DISTRO ?= "poky-bleeding"
+
+#
+# Package Management configuration
+#
+# This variable lists which packaging formats to enable. Multiple package backends
+# can be enabled at once and the first item listed in the variable will be used
+# to generate the root filesystems.
+# Options are:
+# - 'package_deb' for debian style deb files
+# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
+# - 'package_rpm' for rpm style packages
+# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
+# We default to rpm:
+PACKAGE_CLASSES ?= "package_rpm"
+
+#
+# SDK target architecture
+#
+# This variable specifies the architecture to build SDK items for and means
+# you can build the SDK packages for architectures other than the machine you are
+# running the build on (i.e. building i686 packages on an x86_64 host).
+# Supported values are i686 and x86_64
+#SDKMACHINE ?= "i686"
+
+#
+# Extra image configuration defaults
+#
+# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
+# images. Some of these options are added to certain image types automatically. The
+# variable can contain the following options:
+# "dbg-pkgs" - add -dbg packages for all installed packages
+# (adds symbol information for debugging/profiling)
+# "src-pkgs" - add -src packages for all installed packages
+# (adds source code for debugging)
+# "dev-pkgs" - add -dev packages for all installed packages
+# (useful if you want to develop against libs in the image)
+# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
+# (useful if you want to run the package test suites)
+# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
+# "tools-debug" - add debugging tools (gdb, strace)
+# "eclipse-debug" - add Eclipse remote debugging support
+# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
+# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
+# "debug-tweaks" - make an image suitable for development
+# e.g. ssh root access has a blank password
+# There are other application targets that can be used here too, see
+# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
+# We default to enabling the debugging tweaks.
+EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
+
+#
+# Additional image features
+#
+# The following is a list of additional classes to use when building images which
+# enable extra features. Some available options which can be included in this variable
+# are:
+# - 'buildstats' collect build statistics
+USER_CLASSES ?= "buildstats"
+
+#
+# Runtime testing of images
+#
+# The build system can test booting virtual machine images under qemu (an emulator)
+# after any root filesystems are created and run tests against those images. It can also
+# run tests against any SDK that are built. To enable this uncomment these lines.
+# See classes/test{image,sdk}.bbclass for further details.
+#IMAGE_CLASSES += "testimage testsdk"
+#TESTIMAGE_AUTO:qemuall = "1"
+
+#
+# Interactive shell configuration
+#
+# Under certain circumstances the system may need input from you and to do this it
+# can launch an interactive shell. It needs to do this since the build is
+# multithreaded and needs to be able to handle the case where more than one parallel
+# process may require the user's attention. The default is iterate over the available
+# terminal types to find one that works.
+#
+# Examples of the occasions this may happen are when resolving patches which cannot
+# be applied, to use the devshell or the kernel menuconfig
+#
+# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
+# Note: currently, Konsole support only works for KDE 3.x due to the way
+# newer Konsole versions behave
+#OE_TERMINAL = "auto"
+# By default disable interactive patch resolution (tasks will just fail instead):
+PATCHRESOLVE = "noop"
+
+#
+# Disk Space Monitoring during the build
+#
+# Monitor the disk space during the build. If there is less that 1GB of space or less
+# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
+# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard halt
+# of the build. The reason for this is that running completely out of space can corrupt
+# files and damages the build in ways which may not be easily recoverable.
+# It's necesary to monitor /tmp, if there is no space left the build will fail
+# with very exotic errors.
+BB_DISKMON_DIRS ??= "\
+ STOPTASKS,${TMPDIR},1G,100K \
+ STOPTASKS,${DL_DIR},1G,100K \
+ STOPTASKS,${SSTATE_DIR},1G,100K \
+ STOPTASKS,/tmp,100M,100K \
+ HALT,${TMPDIR},100M,1K \
+ HALT,${DL_DIR},100M,1K \
+ HALT,${SSTATE_DIR},100M,1K \
+ HALT,/tmp,10M,1K"
+
+#
+# Shared-state files from other locations
+#
+# As mentioned above, shared state files are prebuilt cache data objects which can
+# used to accelerate build time. This variable can be used to configure the system
+# to search other mirror locations for these objects before it builds the data itself.
+#
+# This can be a filesystem directory, or a remote url such as http or ftp. These
+# would contain the sstate-cache results from previous builds (possibly from other
+# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
+# cache locations to check for the shared objects.
+# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
+# at the end as shown in the examples below. This will be substituted with the
+# correct path within the directory structure.
+#SSTATE_MIRRORS ?= "\
+#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
+#file://.* file:///some/local/dir/sstate/PATH"
+
+#
+# AGL Project SState Mirror
+#
+# The AGL Project has prebuilt artefacts available for its releases, you can enable
+# use of these by uncommenting the following line. This will mean the build uses
+# the network to check for artefacts at the start of builds, which does slow it down
+# equally, it will also speed up the builds by not having to build things if they are
+# present in the cache. It assumes you can download something faster than you can build it
+# which will depend on your network.
+#
+#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH"
+# For AGL:
+#SSTATE_MIRRORS += "file://.* http://download.automotivelinux.org/sstate-mirror/${AGL_BRANCH}/${DEFAULTTUNE}/PATH;downloadfilename=PATH"
+
+#
+# Qemu configuration
+#
+# By default native qemu will build with a builtin VNC server where graphical output can be
+# seen. The line below enables the SDL UI frontend too.
+PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
+# By default libsdl2-native will be built, if you want to use your host's libSDL instead of
+# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
+#ASSUME_PROVIDED += "libsdl2-native"
+
+# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds
+# a handy set of menus for controlling the emulator.
+#PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"
+
+#
+# Parallelism Options
+#
+# These two options control how much parallelism BitBake should use. The first
+# option determines how many tasks bitbake should run in parallel:
+#
+#BB_NUMBER_THREADS ?= "4"
+#
+# Default to setting automatically based on cpu count
+#BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+#
+# The second option controls how many processes make should run in parallel when
+# running compile tasks:
+#
+#PARALLEL_MAKE ?= "-j 4"
+#
+# Default to setting automatically based on cpu count
+#PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
+#
+# For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
+# be appropriate for example.
+
+#
+# Hash Equivalence
+#
+# Enable support for automatically running a local hash equivalence server and
+# instruct bitbake to use a hash equivalence aware signature generator. Hash
+# equivalence improves reuse of sstate by detecting when a given sstate
+# artifact can be reused as equivalent, even if the current task hash doesn't
+# match the one that generated the artifact.
+#
+# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format
+#
+#BB_HASHSERVE = "auto"
+#BB_SIGNATURE_HANDLER = "OEEquivHash"
+
+
+# The network based PR service host and port
+# Uncomment the following lines to enable PRservice.
+# Set PRSERV_HOST to 'localhost:0' to automatically
+# start local PRService.
+# Set to other values to use remote PRService.
+#PRSERV_HOST = "localhost:0"
+
+
+# Archive the source and put them to ${DEPLOY_DIR}/sources/.
+#
+#INHERIT += "archiver"
+#
+# The tarball for the patched source will be created by default, and you
+# can configure the archiver as follow:
+#
+# Create archive for:
+# 1) original (or unpacked) source:
+#ARCHIVER_MODE[src] = "original"
+# 2) patched source: (default)
+#ARCHIVER_MODE[src] = "patched"
+# 3) configured source:
+#ARCHIVER_MODE[src] = "configured"
+#
+# 4) the patches between do_unpack and do_patch:
+#ARCHIVER_MODE[diff] = "1"
+# set the files that you'd like to exclude from the diff:
+#ARCHIVER_MODE[diff-exclude] ?= ".pc autom4te.cache patches"
+#
+# 5) the environment data, similar to 'bitbake -e recipe':
+#ARCHIVER_MODE[dumpdata] = "1"
+#
+# 6) the recipe (.bb and .inc):
+#ARCHIVER_MODE[recipe] = "1"
+#
+# 7) Whether output the .src.rpm package:
+#ARCHIVER_MODE[srpm] = "1"
+#
+# 8) Filter the license, the recipe whose license in
+# COPYLEFT_LICENSE_INCLUDE will be included, and in
+# COPYLEFT_LICENSE_EXCLUDE will be excluded.
+#COPYLEFT_LICENSE_INCLUDE = 'GPL* LGPL*'
+#COPYLEFT_LICENSE_EXCLUDE = 'CLOSED Proprietary'
+#
+# 9) Config the recipe type that will be archived, the type can be
+# target, native, nativesdk, cross, crosssdk and cross-canadian,
+# you can set one or more types. Archive all types by default.
+#COPYLEFT_RECIPE_TYPES = 'target'
+#
+
+
+# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
+# track the version of this file when it was generated. This can safely be ignored if
+# this doesn't mean anything to you.
+CONF_VERSION = "2"
diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init.bbappend b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init.bbappend
new file mode 100644
index 000000000..4b6deffdf
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'agl-compositor-init_aglcore.inc', '', d)}
diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init_aglcore.inc b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init_aglcore.inc
new file mode 100644
index 000000000..b7d346d39
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init_aglcore.inc
@@ -0,0 +1 @@
+require common-init.inc
diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-shell-activator_git.bb b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-shell-activator_git.bb
new file mode 100644
index 000000000..38725c1bd
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-shell-activator_git.bb
@@ -0,0 +1,22 @@
+SUMMARY = " Application that switches/activates other application's windows "
+DESCRIPTION = " A wayland client and a script that talks with the agl-compositor \
+an tells it to display a specific application. Relies on the appid being \
+started (already) by afm-util or the client shell (homescreen/WAM)"
+
+HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/q/project:src%252Fagl-shell-activator"
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e978448a0d41d826d73890d9c22caf75"
+
+DEPENDS = "wayland wayland-protocols wayland-native agl-compositor grpc grpc-native"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-shell-activator.git;protocol=https;branch=${AGL_BRANCH}"
+SRCREV = "027d6f814f3d1f2e6b4b4071365b28dadec34109"
+
+PV = "0.0.10+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+
+inherit meson pkgconfig python3native
+
+FILES:${PN} = " ${bindir}/agl-shell-activator"
diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/common-init.inc b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/common-init.inc
new file mode 100644
index 000000000..47f7d8b1d
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/common-init.inc
@@ -0,0 +1,6 @@
+# If weston's PACKAGECONFIG contains systemd + pam + polkit, polkit
+# ends up a hard requirement for start up due to the pam + systemd
+# configuration that is being installed. For now, keep things simple
+# and assume that polkit should be a dependency if it is in
+# DISTRO_FEATURES.
+RDEPENDS:${PN} += "${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)}"
diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init.bbappend b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init.bbappend
new file mode 100644
index 000000000..c09d7ccd3
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston-init_aglcore.inc', '', d)}
diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init_aglcore.inc b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init_aglcore.inc
new file mode 100644
index 000000000..b7d346d39
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init_aglcore.inc
@@ -0,0 +1 @@
+require common-init.inc
diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-platform/images/agl-image-compositor.bbappend b/meta-agl-core/dynamic-layers/meta-oe/recipes-platform/images/agl-image-compositor.bbappend
new file mode 100644
index 000000000..1e0e66f01
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-platform/images/agl-image-compositor.bbappend
@@ -0,0 +1,3 @@
+IMAGE_INSTALL += " \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'agl-shell-activator', '', d)} \
+"
diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_%.bbappend b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_%.bbappend
new file mode 100644
index 000000000..aab944c2f
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'qtbase_aglcore.inc', '', d)}
diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_aglcore.inc b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_aglcore.inc
new file mode 100644
index 000000000..581f5de99
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_aglcore.inc
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/qtbase:"
+
+PACKAGECONFIG_WAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
+
+PACKAGECONFIG_GL = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}"
+
+PACKAGECONFIG:append = " ${PACKAGECONFIG_WAYLAND}"
+
+# '-qpa wayland-egl' set wayland-egl as default of platform plugins
+PACKAGECONFIG[wayland]="-qpa wayland-egl -no-qpa-platform-guard"
diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation/0001-mapbox-update-API-url-to-match-new-schema.patch b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation/0001-mapbox-update-API-url-to-match-new-schema.patch
new file mode 100644
index 000000000..ba8a991ed
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation/0001-mapbox-update-API-url-to-match-new-schema.patch
@@ -0,0 +1,47 @@
+From 58197439eade86e7efc6fe98116c0092ea429d29 Mon Sep 17 00:00:00 2001
+From: Matt Ranostay <matt.ranostay@konsulko.com>
+Date: Tue, 10 Mar 2020 13:59:58 -0700
+Subject: [PATCH] mapbox: update API url to match new schema
+
+---
+ src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp | 7 ++++---
+ src/plugins/geoservices/mapbox/qmapboxcommon.h | 2 +-
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp b/src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp
+index 0b128556..bd2be6b6 100644
+--- a/src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp
++++ b/src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp
+@@ -88,12 +88,13 @@ QGeoTiledMapReply *QGeoTileFetcherMapbox::getTileImage(const QGeoTileSpec &spec)
+ request.setRawHeader("User-Agent", m_userAgent);
+
+ request.setUrl(QUrl(mapboxTilesApiPath +
+- ((spec.mapId() >= m_mapIds.size()) ? QStringLiteral("mapbox.streets") : m_mapIds[spec.mapId() - 1]) + QLatin1Char('/') +
++ m_mapIds[m_mapIds.size() - 1] +
++ QStringLiteral("/tiles/256/") +
+ QString::number(spec.zoom()) + QLatin1Char('/') +
+ QString::number(spec.x()) + QLatin1Char('/') +
+ QString::number(spec.y()) +
+- ((m_scaleFactor > 1) ? (QLatin1Char('@') + QString::number(m_scaleFactor) + QLatin1String("x.")) : QLatin1String(".")) +
+- m_format + QLatin1Char('?') +
++ ((m_scaleFactor > 1) ? (QLatin1Char('@') + QString::number(m_scaleFactor) + QLatin1String("x")) : QLatin1String("")) +
++ QLatin1Char('?') +
+ QStringLiteral("access_token=") + m_accessToken));
+
+ QNetworkReply *reply = m_networkManager->get(request);
+diff --git a/src/plugins/geoservices/mapbox/qmapboxcommon.h b/src/plugins/geoservices/mapbox/qmapboxcommon.h
+index e60c4e83..4b2ea98d 100644
+--- a/src/plugins/geoservices/mapbox/qmapboxcommon.h
++++ b/src/plugins/geoservices/mapbox/qmapboxcommon.h
+@@ -46,7 +46,7 @@
+
+ QT_BEGIN_NAMESPACE
+
+-static const QString mapboxTilesApiPath = QStringLiteral("http://api.tiles.mapbox.com/v4/");
++static const QString mapboxTilesApiPath = QStringLiteral("https://api.mapbox.com/");
+
+ // https://www.mapbox.com/api-documentation/#geocoding
+ static const QString mapboxGeocodingApiPath = QStringLiteral("https://api.mapbox.com/geocoding/v5/mapbox.places/");
+--
+2.25.0
+
diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_%.bbappend b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_%.bbappend
new file mode 100644
index 000000000..a0d80075a
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'qtlocation_aglcore.inc', '', d)}
diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_aglcore.inc b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_aglcore.inc
new file mode 100644
index 000000000..60867aef0
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_aglcore.inc
@@ -0,0 +1,14 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/qtlocation:"
+
+SRC_URI += "\
+ file://0001-mapbox-update-API-url-to-match-new-schema.patch \
+ "
+
+# Need to explicitly enable the various plugins
+PACKAGECONFIG += " \
+ geoservices_osm \
+ geoservices_here \
+ geoservices_itemsoverlay \
+ geoservices_mapbox \
+ geoservices_mapboxgl \
+"
diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.service b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.service
new file mode 100644
index 000000000..b8d394068
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Generated file SELinux relabeling
+DefaultDependencies=no
+After=local-fs.target systemd-machine-id-commit.service
+Before=sysinit.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/systemd-selinux-relabel.sh
+
+[Install]
+WantedBy=sysinit.target
diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.sh b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.sh
new file mode 100644
index 000000000..b2557a8d6
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Update labels on files generated on first boot.
+/usr/sbin/restorecon -FRi /etc/systemd /etc/machine-id
+if [ $? -eq 0 ]; then
+ # Disable parent service
+ # NOTE: The service does not use the first boot functionality
+ # in systemd as /etc/machine-id is not writeable until
+ # after it is complete.
+ systemctl disable systemd-selinux-relabel.service
+fi
+exit 0
diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/systemd-selinux-relabel_1.0.bb b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/systemd-selinux-relabel_1.0.bb
new file mode 100644
index 000000000..7e4f9783c
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/systemd-selinux-relabel_1.0.bb
@@ -0,0 +1,25 @@
+SUMMARY = "System unit to relabel systemd generated files"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "file://systemd-selinux-relabel.service \
+ file://systemd-selinux-relabel.sh \
+"
+
+inherit systemd allarch features_check
+
+SYSTEMD_SERVICE:${PN} = "${BPN}.service"
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/systemd-selinux-relabel.service ${D}${systemd_system_unitdir}/
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/systemd-selinux-relabel.sh ${D}${sbindir}/
+}
+
+FILES:${PN} += "${systemd_system_unitdir}"
diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-platform/packagegroups/packagegroup-agl-core-selinux.bb b/meta-agl-core/dynamic-layers/meta-selinux/recipes-platform/packagegroups/packagegroup-agl-core-selinux.bb
new file mode 100644
index 000000000..493a46f25
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-platform/packagegroups/packagegroup-agl-core-selinux.bb
@@ -0,0 +1,57 @@
+SUMMARY = "SELinux packages"
+DESCRIPTION = "SELinux packages required for AGL"
+LICENSE = "MIT"
+
+inherit packagegroup features_check
+
+REQUIRED_DISTRO_FEATURES = "selinux"
+
+PACKAGES = " \
+ packagegroup-agl-core-selinux \
+ packagegroup-agl-core-selinux-devel \
+"
+
+#
+# meta-selinux's packagegroup-core-selinux includes a lot of
+# policy development tools with its inclusion of the layer's
+# packagegroup-selinux-policycoreutils, which is not really
+# desirable for a production image. Create our own base
+# packagegroup and an accompanying devel packagegroup that
+# agl-devel can trigger pulling in.
+#
+# NOTES:
+# - It seems likely we will always want auditd, so include
+# it in the base packagegroup.
+# - selinux-autorelabel seems required to handle both the
+# edge case of builds done on non-xattr capable filesystems,
+# and to allow driving relabeling after potential package
+# installation during runtime.
+# - packagegroup-selinux-policycoreutils includes a lot of
+# things that seem not useful in a lot of systems (e.g.
+# the gtk dependent selinux-gui), so for now the devel
+# packagegroup aims to include a more minimal set of tools
+# aimed at enabling checkpolicy and audit2allow use.
+# - Some thought needs to go into whether the relabeling
+# fixup packages should be handled separately, as they
+# ideally should not go into images using read-only or
+# stateless rootfs, but those are image features so we
+# cannot check for them here.
+#
+
+RDEPENDS:${PN} = " \
+ packagegroup-selinux-minimal \
+ auditd \
+ selinux-autorelabel \
+ systemd-selinux-relabel \
+"
+
+RDEPENDS:${PN}-devel = " \
+ ${BPN} \
+ libsepol-bin \
+ checkpolicy \
+ policycoreutils-loadpolicy \
+ policycoreutils-setsebool \
+ policycoreutils-hll \
+ semodule-utils-semodule-package \
+ selinux-python-audit2allow \
+"
diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_0.1.bbappend b/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_0.1.bbappend
new file mode 100644
index 000000000..793b049e5
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_0.1.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'selinux-autorelabel_aglcore.inc', '', d)}
diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_aglcore.inc b/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_aglcore.inc
new file mode 100644
index 000000000..67d3843f4
--- /dev/null
+++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_aglcore.inc
@@ -0,0 +1,4 @@
+do_install:append() {
+ # Do not force auto relabeling just from the package getting installed
+ rm -f ${D}/.autorelabel
+}
diff --git a/meta-agl-core/files/group b/meta-agl-core/files/group
new file mode 100644
index 000000000..a7e0cd17f
--- /dev/null
+++ b/meta-agl-core/files/group
@@ -0,0 +1,102 @@
+root::0:
+daemon::1:
+bin::2:
+sys::3:
+adm::4:
+tty::5:
+disk::6:
+lp::7:
+mail::8:
+news::9:
+uucp::10:
+man::12:
+proxy::13:
+kmem::15:
+input::19:
+dialout::20:
+fax::21:
+voice::22:
+cdrom::24:
+floppy::25:
+tape::26:
+sudo::27:
+audio::29:
+dip::30:
+www-data::33:
+backup::34:
+operator::37:
+list::38:
+irc::39:
+src::40:
+gnats::41:
+shadow::42:
+utmp::43:
+video::44:
+sasl::45:
+plugdev::46:
+staff::50:
+games::60:
+shutdown::70:
+users::100:
+nogroup::65534:
+cynagora::999:
+dhcp::998:
+avahi::997:
+tracing::1000:
+sshd::996:
+systemd-bus-proxy::995:
+netdev::993:
+messagebus::994:
+afm::992:
+weston-launch::986:
+lock::990:
+systemd-journal::989:
+systemd-timesync::988:
+systemd-coredump::888:
+pulse::991:
+bind::987:
+trinity::985:
+mpd::984:
+mysql::983:
+polkitd::982:
+datetime::981:
+network::980:
+zabbix::979:
+nm-openvpn::978:
+xuser::2002:
+builder::977:
+rpc::976:
+crontab::975:
+lpadmin::974:
+_apt::972:
+rpcuser::970:
+avahi-autoipd::969:
+ntp::968:
+dovecot::967:
+dovenull::966:
+quagga::965:
+quaggavty::964:
+rwhod::963:
+ftp::962:
+squid::960:
+postfix::959:
+vmail::958:
+opensaf::957:
+lldpd::956:
+postdrop::954:
+weston::200:
+wayland::201:
+display::202:
+agl-driver::1001:
+agl-passenger::1002:
+applaunchd::1003:
+systemd-network::1005:
+systemd-resolve::1006:
+mosquitto::1007:
+pipewire::1008:
+render::1009:
+sgx::1010:
+kuksa::900:
+qemu::901:
+kvm::902:
+ptest::2001:
diff --git a/meta-agl-core/files/passwd b/meta-agl-core/files/passwd
new file mode 100644
index 000000000..ea54d06e4
--- /dev/null
+++ b/meta-agl-core/files/passwd
@@ -0,0 +1,68 @@
+root::0:0:::
+daemon::1:1:::
+bin::2:2:::
+sys::3:3:::
+sync::4:65534:::
+games::5:60:::
+man::6:12:::
+lp::7:7:::
+mail::8:8:::
+news::9:9:::
+uucp::10:10:::
+proxy::13:13:::
+www-data::33:33:::
+backup::34:34:::
+list::38:38:::
+irc::39:39:::
+gnats::41:41:::
+nobody::65534:65534:::
+cynagora::999:999:::
+dhcp::998:998:::
+avahi::997:997:::
+sshd::996:996:::
+systemd-bus-proxy::995:995:::
+agl-driver::1001:1001:::
+agl-passenger::1002:1002:::
+applaunchd::1003:1003:::
+messagebus::994:994:::
+afm::992:992:::
+systemd-timesync::988:988:::
+systemd-coredump::888:888:::
+pulse::991:991:::
+bind::987:987:::
+trinity::985:985:::
+mpd::984:984:::
+mysql::983:983:::
+polkitd::982:982:::
+zabbix::979:979:::
+nm-openvpn::978:978:::
+xuser::2002:2002:::
+builder::977:977:::
+rpc::976:976:::
+distcc::973:65534:::
+_apt::972:972:::
+ppp::971:65534:::
+rpcuser::970:970:::
+avahi-autoipd::969:969:::
+ntp::968:968:::
+dovecot::967:967:::
+dovenull::966:966:::
+quagga::965:965:::
+rwhod::963:963:::
+ftp::962:962:::
+radvd::961:65534:::
+squid::960:960:::
+postfix::959:959:::
+vmail::958:958:::
+opensaf::957:957:::
+lldpd::956:956:::
+cyrus::955:8:::
+weston::200:200:::
+systemd-network::1005:1005:::
+systemd-resolve::1006:1006:::
+mosquitto::1007:1007:::
+pipewire::1008:1008:::
+kuksa::900:900:::
+qemu::901:901:::
+user::1004:100:::
+ptest::2001:2001:::
diff --git a/meta-agl-core/recipes-config/agl-users/agl-users.inc b/meta-agl-core/recipes-config/agl-users/agl-users.inc
new file mode 100644
index 000000000..428af3806
--- /dev/null
+++ b/meta-agl-core/recipes-config/agl-users/agl-users.inc
@@ -0,0 +1,14 @@
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+USERADDEXTENSION = "useradd-staticids"
+
+GROUPADD_PARAM:${PN} = "\
+ --system video ; \
+ --system pipewire ; \
+ -g 1001 agl-driver ; \
+"
+
+USERADD_PARAM:${PN} = "\
+ -g 1001 -u 1001 -G video,pipewire -o -d /home/agl-driver -m -K PASS_MAX_DAYS=-1 agl-driver ; \
+"
diff --git a/meta-agl-core/recipes-config/agl-users/agl-users_1.0.bb b/meta-agl-core/recipes-config/agl-users/agl-users_1.0.bb
new file mode 100644
index 000000000..18f25e4be
--- /dev/null
+++ b/meta-agl-core/recipes-config/agl-users/agl-users_1.0.bb
@@ -0,0 +1,9 @@
+SUMMARY = "AGL Users"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+inherit allarch
+
+require agl-users.inc
+
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta-agl-core/recipes-connectivity/busybox/busybox_%.bbappend b/meta-agl-core/recipes-connectivity/busybox/busybox_%.bbappend
new file mode 100644
index 000000000..980783236
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/busybox/busybox_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-connectivity/busybox/busybox_aglcore.inc b/meta-agl-core/recipes-connectivity/busybox/busybox_aglcore.inc
new file mode 100644
index 000000000..88ff7daec
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/busybox/busybox_aglcore.inc
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+SRC_URI:append = " file://enable-wget-https.cfg"
+
diff --git a/meta-agl-core/recipes-connectivity/busybox/files/enable-wget-https.cfg b/meta-agl-core/recipes-connectivity/busybox/files/enable-wget-https.cfg
new file mode 100644
index 000000000..e92006bef
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/busybox/files/enable-wget-https.cfg
@@ -0,0 +1,3 @@
+# Thu Jun 8 17:32:07 2017
+CONFIG_FEATURE_WGET_OPENSSL=y
+CONFIG_FEATURE_WGET_SSL_HELPER=y
diff --git a/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Do-not-overwrite-CFLAGS.patch b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Do-not-overwrite-CFLAGS.patch
new file mode 100644
index 000000000..4a86e6c57
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Do-not-overwrite-CFLAGS.patch
@@ -0,0 +1,37 @@
+From 50ca6e010c3ca3f7cb06dfdf5dbdfaacd4f4749a Mon Sep 17 00:00:00 2001
+From: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
+Date: Tue, 19 Jul 2022 23:28:21 +0200
+Subject: [PATCH] Do not overwrite CFLAGS
+
+Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
+---
+ configure.ac | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7e3307f..c385bc0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -24,14 +24,14 @@ AC_PROG_CC
+ AC_PROG_CC_C99
+ AM_PROG_CC_C_O
+
+-CFLAGS=""
+-
+-AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
+- [disable code optimization through compiler]), [
+- if (test "${enableval}" = "no"); then
+- CFLAGS="$CFLAGS -O0 -U_FORTIFY_SOURCE"
+- fi
+-])
++#CFLAGS=""
++#
++#AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
++# [disable code optimization through compiler]), [
++# if (test "${enableval}" = "no"); then
++# CFLAGS="$CFLAGS -O0 -U_FORTIFY_SOURCE"
++# fi
++#])
+
+ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
+ [enable compiling with debugging information]), [
diff --git a/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Initialize-variables.patch b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Initialize-variables.patch
new file mode 100644
index 000000000..9a1078426
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/0001-Initialize-variables.patch
@@ -0,0 +1,39 @@
+From 0389a80796d3ae31d8f60659f0638660a00157b2 Mon Sep 17 00:00:00 2001
+From: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
+Date: Tue, 19 Jul 2022 23:58:05 +0200
+Subject: [PATCH] Initialize variables
+
+This fixes compiler warnings.
+
+Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
+---
+ main.c | 2 +-
+ renderers.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/main.c b/main.c
+index f0354f9..1fa9ab1 100644
+--- a/main.c
++++ b/main.c
+@@ -159,7 +159,7 @@ static void report_error()
+ */
+ static void get_help_window()
+ {
+- char *msg;
++ char *msg = "";
+
+ if (win_help)
+ return;
+diff --git a/renderers.c b/renderers.c
+index c531a1e..d9d0414 100644
+--- a/renderers.c
++++ b/renderers.c
+@@ -153,7 +153,7 @@ static void renderers_technologies(struct json_object *jobj)
+ int i;
+ char *desc_base = "%-20s Powered %-5s Connected %-5s";
+ char desc_base_sub[30];
+- const char *k_name, *k_type, *k_powered, *k_connected;
++ const char *k_name = "" , *k_type = "" , *k_powered = "", *k_connected = "";
+ char *desc, *tech_short_name;
+ struct json_object *sub_array, *dbus_tech_name, *tech_dict;
+ struct userptr_data *data;
diff --git a/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/stdbool-fixes.patch b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/stdbool-fixes.patch
new file mode 100644
index 000000000..4e858e3c4
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses/stdbool-fixes.patch
@@ -0,0 +1,53 @@
+Replace some TRUE/FALSE usage with stdbool.h definitions
+
+Newer versions of json-c dropped its previous #defines for TRUE and
+FALSE, update affected code to use the stdbool.h boolean definitions
+to fix compilation.
+
+Upstream-Status: Pending
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+---
+diff --git a/json_regex.c b/json_regex.c
+index 2524c18..cdb6801 100644
+--- a/json_regex.c
++++ b/json_regex.c
+@@ -24,6 +24,7 @@
+ #endif
+
+ #include <json.h>
++#include <stdbool.h>
+
+ #include "json_regex.h"
+ #include "keys.h"
+@@ -64,7 +65,7 @@ void generate_trusted_json(void)
+ json_object_object_add(jregex_agent_response, "Username", json_object_new_string("^([[:print:]]*)$"));
+ json_object_object_add(jregex_agent_response, "Password", json_object_new_string("^([[:print:]]*)$"));
+
+- jregex_agent_retry_response = json_object_new_boolean(TRUE);
++ jregex_agent_retry_response = json_object_new_boolean(true);
+
+ // See commands.c __cmd_config_service for a better idea of the format.
+ jregex_config_service = json_object_new_object();
+@@ -94,7 +95,7 @@ void generate_trusted_json(void)
+ json_object_array_add(arr, json_object_new_string("^([[:print:]]*)$"));
+ json_object_object_add(tmp, key_serv_proxy_excludes, arr);
+ json_object_object_add(opt, key_serv_proxy_config, tmp);
+- json_object_object_add(opt, key_serv_autoconnect, json_object_new_boolean(TRUE));
++ json_object_object_add(opt, key_serv_autoconnect, json_object_new_boolean(true));
+ arr = json_object_new_array();
+ json_object_array_add(arr, json_object_new_string("^([[:print:]]*)$"));
+ json_object_object_add(opt, key_serv_domains_config, arr);
+diff --git a/json_utils.c b/json_utils.c
+index f66d08a..8f2c195 100644
+--- a/json_utils.c
++++ b/json_utils.c
+@@ -83,7 +83,7 @@ static bool json_match_object(struct json_object *jobj,
+ key_is_trusted = json_object_object_get_ex(jtrusted, key,
+ &tmp_trusted);
+
+- if (key_is_trusted == FALSE)
++ if (key_is_trusted == false)
+ return false;
+
+ res = __json_type_dispatch(val, tmp_trusted);
diff --git a/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb
new file mode 100644
index 000000000..7b6d50531
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb
@@ -0,0 +1,30 @@
+SUMMARY = "A simple ncurses interface for connman"
+DESCRIPTION = "A simple ncurses interface for connman"
+HOMEPAGE = "https://gitlab.com/iotbzh/connman-json-client"
+
+SECTION = "console/network"
+
+DEPENDS = "dbus ncurses connman json-c"
+
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8c16666ae6c159876a0ba63099614381"
+
+SRC_URI = "git://gitlab.com/iotbzh/connman-json-client.git;protocol=https;branch=master \
+ file://stdbool-fixes.patch \
+ file://0001-Do-not-overwrite-CFLAGS.patch \
+ file://0001-Initialize-variables.patch \
+ "
+SRCREV = "2b0f93ec9518c978c04807fe52e95315d6d80e6b"
+
+inherit autotools pkgconfig
+
+EXTRA_AUTORECONF += " -vfi"
+
+S = "${WORKDIR}/git"
+
+do_install () {
+ install -dm755 ${D}${bindir}
+ install -Dm755 connman_ncurses ${D}${bindir}
+}
+
+FILES:${PN} = "${bindir}/connman_ncurses"
diff --git a/meta-agl-core/recipes-connectivity/connman/connman-conf.bbappend b/meta-agl-core/recipes-connectivity/connman/connman-conf.bbappend
new file mode 100644
index 000000000..bd6e7b75c
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman/connman-conf.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'connman-conf_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-connectivity/connman/connman-conf/main.conf b/meta-agl-core/recipes-connectivity/connman/connman-conf/main.conf
new file mode 100644
index 000000000..be9fd0ed2
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman/connman-conf/main.conf
@@ -0,0 +1,3 @@
+[General]
+FallbackTimeservers=pool.ntp.org
+NetworkInterfaceBlacklist=vmnet,vboxnet,virbr,tap,ifb,meth
diff --git a/meta-agl-core/recipes-connectivity/connman/connman-conf_aglcore.inc b/meta-agl-core/recipes-connectivity/connman/connman-conf_aglcore.inc
new file mode 100644
index 000000000..30a250e1e
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman/connman-conf_aglcore.inc
@@ -0,0 +1,9 @@
+# Pick up our version of main.conf
+FILESEXTRAPATHS:prepend := "${THISDIR}/connman-conf:"
+
+# Upstream connman-conf only installs configuration for qemu targets
+# but we need it in all our BSP
+do_install:append() {
+ mkdir -p ${D}${sysconfdir}/connman
+ cp ${S}/main.conf ${D}${sysconfdir}/connman/main.conf
+}
diff --git a/meta-agl-core/recipes-connectivity/connman/connman/0001-disable-when-booting-over-nfs.patch b/meta-agl-core/recipes-connectivity/connman/connman/0001-disable-when-booting-over-nfs.patch
new file mode 100644
index 000000000..7cc92e2c4
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman/connman/0001-disable-when-booting-over-nfs.patch
@@ -0,0 +1,14 @@
+Exempt when nfs is in use.
+
+Upstream-Status: Pending
+
+--- connman-1.36.orig/src/connman.service.in 2019-02-18 18:02:07.034947373 -0500
++++ connman-1.36/src/connman.service.in 2019-02-18 18:07:24.689959219 -0500
+@@ -7,6 +7,7 @@
+ Before=network.target multi-user.target shutdown.target
+ Wants=network.target
+ Conflicts=systemd-resolved.service
++ConditionKernelCommandLine=!root=/dev/nfs
+
+ [Service]
+ Type=dbus
diff --git a/meta-agl-core/recipes-connectivity/connman/connman_%.bbappend b/meta-agl-core/recipes-connectivity/connman/connman_%.bbappend
new file mode 100644
index 000000000..8078f3d34
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman/connman_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'connman_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-connectivity/connman/connman_aglcore.inc b/meta-agl-core/recipes-connectivity/connman/connman_aglcore.inc
new file mode 100644
index 000000000..e372e9186
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman/connman_aglcore.inc
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/connman:"
+
+SRC_URI += "file://0001-disable-when-booting-over-nfs.patch"
diff --git a/meta-agl-core/recipes-core/systemd/.appends.core b/meta-agl-core/recipes-core/systemd/.appends.core
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/.appends.core
diff --git a/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can-fd.network b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can-fd.network
new file mode 100644
index 000000000..86042bd90
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can-fd.network
@@ -0,0 +1,12 @@
+[Match]
+Name=can*
+
+[CAN]
+BitRate=500K
+SamplePoint=75%
+DataBitRate=4M
+DataSamplePoint=80%
+FDMode=yes
+
+[Link]
+ActivationPolicy=up
diff --git a/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.link b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.link
new file mode 100644
index 000000000..61fb4d575
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.link
@@ -0,0 +1,11 @@
+[Match]
+Type=can
+OriginalName=can*
+
+[Link]
+TransmitQueueLength=1000
+# Need to duplicate default configuration here, since only first
+# matching .link is applied
+NamePolicy=keep kernel database onboard slot path
+AlternativeNamesPolicy=database onboard slot path
+MACAddressPolicy=persistent
diff --git a/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.network b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.network
new file mode 100644
index 000000000..ae5514bca
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.network
@@ -0,0 +1,6 @@
+[Match]
+Name=can*
+
+[CAN]
+BitRate=500K
+RestartSec=0.1
diff --git a/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-virtio.network b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-virtio.network
new file mode 100644
index 000000000..cc33d86d6
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-virtio.network
@@ -0,0 +1,5 @@
+[Match]
+Name=can*
+
+[CAN]
+RestartSec=0.1
diff --git a/meta-agl-core/recipes-core/systemd/systemd-conf-canbus_1.0.bb b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus_1.0.bb
new file mode 100644
index 000000000..a23cd839a
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus_1.0.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Systemd canbus configuration"
+DESCRIPTION = "Systemd may require slightly different configuration for \
+different machines. This injects configuration for the CAN bus."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PE = "1"
+
+SRC_URI = "\
+ file://canbus-can.network \
+ file://canbus-can-fd.network \
+ file://canbus-virtio.network \
+ file://canbus-can.link \
+"
+
+CANBUS_NETWORK_CONFIG ??= "canbus-can.network"
+CANBUS_NETWORK_CONFIG:virtio-all ?= "canbus-virtio.network"
+
+do_install() {
+ # Install CAN bus network configuration
+ install -d ${D}${nonarch_base_libdir}/systemd/network/
+ install -m 0644 ${WORKDIR}/${CANBUS_NETWORK_CONFIG} ${D}${nonarch_base_libdir}/systemd/network/60-canbus-can.network
+
+ # Install link configuration to bump queue size on physical CAN bus devices
+ install -m 0644 ${WORKDIR}/canbus-can.link ${D}${nonarch_base_libdir}/systemd/network/60-canbus-can.link
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES:${PN} = " \
+ ${nonarch_base_libdir}/systemd/network/ \
+"
diff --git a/meta-agl-core/recipes-core/systemd/systemd-conf_%.bbappend b/meta-agl-core/recipes-core/systemd/systemd-conf_%.bbappend
new file mode 100644
index 000000000..980783236
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd-conf_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-core/systemd/systemd-conf_aglcore.inc b/meta-agl-core/recipes-core/systemd/systemd-conf_aglcore.inc
new file mode 100644
index 000000000..a539d1826
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd-conf_aglcore.inc
@@ -0,0 +1,4 @@
+do_install:append() {
+ # Remove ethernet script deployed by upstream unconditionally (SPEC-3221)
+ rm -rf ${D}${systemd_unitdir}/network/80-wired.network || true
+} \ No newline at end of file
diff --git a/meta-agl-core/recipes-core/systemd/systemd/e2fsck.conf b/meta-agl-core/recipes-core/systemd/systemd/e2fsck.conf
new file mode 100644
index 000000000..b774f9ebf
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd/e2fsck.conf
@@ -0,0 +1,3 @@
+[options]
+# This will prevent e2fsck from stopping boot just because the clock is wrong
+broken_system_clock = 1
diff --git a/meta-agl-core/recipes-core/systemd/systemd/wait-disable.conf b/meta-agl-core/recipes-core/systemd/systemd/wait-disable.conf
new file mode 100644
index 000000000..e5d4f4b28
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd/wait-disable.conf
@@ -0,0 +1,3 @@
+[Service]
+ExecStart=
+ExecStart=/usr/bin/true
diff --git a/meta-agl-core/recipes-core/systemd/systemd/wired.network b/meta-agl-core/recipes-core/systemd/systemd/wired.network
new file mode 100644
index 000000000..425610a3f
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd/wired.network
@@ -0,0 +1,8 @@
+[Match]
+Name=eth* en*
+KernelCommandLine=!nbdroot
+KernelCommandLine=!nfsroot
+KernelCommandLine=!ip
+
+[Network]
+DHCP=yes
diff --git a/meta-agl-core/recipes-core/systemd/systemd_%.bbappend b/meta-agl-core/recipes-core/systemd/systemd_%.bbappend
new file mode 100644
index 000000000..980783236
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-core/systemd/systemd_aglcore.inc b/meta-agl-core/recipes-core/systemd/systemd_aglcore.inc
new file mode 100644
index 000000000..9681329be
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd_aglcore.inc
@@ -0,0 +1,36 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/systemd:"
+
+SRC_URI += "\
+ file://e2fsck.conf \
+ file://wait-disable.conf \
+ file://wired.network \
+"
+
+# Enable networkd/resolved support if using systemd for network management
+PACKAGECONFIG:append = " \
+ ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','systemd','networkd resolved','',d)} \
+ iptc \
+"
+
+# SPEC-737: connmand also has a NTP client which races with systemd-timesyncd
+PACKAGECONFIG:remove = "timesyncd"
+
+# Enable systemd-coredump when agl-devel is set on
+PACKAGECONFIG:append:agl-devel = " coredump"
+
+do_install:append() {
+ # Install /etc/e2fsck.conf to avoid boot stuck by wrong clock time
+ install -m 644 -p -D ${WORKDIR}/e2fsck.conf ${D}${sysconfdir}/e2fsck.conf
+
+ if [ "${VIRTUAL-RUNTIME_net_manager}" = "systemd" ]; then
+ # Install DHCP configuration for Ethernet adapters
+ install -m 644 ${WORKDIR}/wired.network ${D}${sysconfdir}/systemd/network
+ elif [ "${VIRTUAL-RUNTIME_net_manager}" = "connman" ]; then
+ # Disable systemd-networkd-wait-online by default
+ install -d ${D}${systemd_system_unitdir}/systemd-networkd-wait-online.service.d
+ install -m 0644 ${WORKDIR}/wait-disable.conf ${D}${systemd_system_unitdir}/systemd-networkd-wait-online.service.d/
+ fi
+}
+
+FILES:${PN} += "${sysconfdir}/e2fsck.conf "
+
diff --git a/meta-agl-core/recipes-devtools/gdb/.appends.core b/meta-agl-core/recipes-devtools/gdb/.appends.core
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/meta-agl-core/recipes-devtools/gdb/.appends.core
diff --git a/meta-agl-core/recipes-devtools/gdb/gdb_%.bbappend b/meta-agl-core/recipes-devtools/gdb/gdb_%.bbappend
new file mode 100644
index 000000000..980783236
--- /dev/null
+++ b/meta-agl-core/recipes-devtools/gdb/gdb_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-devtools/gdb/gdb_aglcore.inc b/meta-agl-core/recipes-devtools/gdb/gdb_aglcore.inc
new file mode 100644
index 000000000..213542ec5
--- /dev/null
+++ b/meta-agl-core/recipes-devtools/gdb/gdb_aglcore.inc
@@ -0,0 +1 @@
+PACKAGECONFIG:remove = "readline"
diff --git a/meta-agl-core/recipes-devtools/qemu/qemu_%.bbappend b/meta-agl-core/recipes-devtools/qemu/qemu_%.bbappend
new file mode 100644
index 000000000..980783236
--- /dev/null
+++ b/meta-agl-core/recipes-devtools/qemu/qemu_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-devtools/qemu/qemu_aglcore.inc b/meta-agl-core/recipes-devtools/qemu/qemu_aglcore.inc
new file mode 100644
index 000000000..77d461a7f
--- /dev/null
+++ b/meta-agl-core/recipes-devtools/qemu/qemu_aglcore.inc
@@ -0,0 +1,5 @@
+PACKAGECONFIG:append = " \
+ aio \
+ libusb \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
+"
diff --git a/meta-agl-core/recipes-graphics/libsdl2/libsdl2_%.bbappend b/meta-agl-core/recipes-graphics/libsdl2/libsdl2_%.bbappend
new file mode 100644
index 000000000..48e50788e
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/libsdl2/libsdl2_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'libsdl2_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-graphics/libsdl2/libsdl2_aglcore.inc b/meta-agl-core/recipes-graphics/libsdl2/libsdl2_aglcore.inc
new file mode 100644
index 000000000..7652e1843
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/libsdl2/libsdl2_aglcore.inc
@@ -0,0 +1,3 @@
+# Make sure opengl is disabled, as using wayland implies gles2 in the
+# libsdl2 PACKAGECONFIG definitions.
+PACKAGECONFIG:remove = "opengl"
diff --git a/meta-agl-core/recipes-graphics/rba/librba_1.0.bb b/meta-agl-core/recipes-graphics/rba/librba_1.0.bb
new file mode 100644
index 000000000..e8b1e0dbc
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/rba/librba_1.0.bb
@@ -0,0 +1,24 @@
+SUMMARY = "RBA"
+DESCRIPTION = "Rule Based Arbitrator decides which of the content to display \
+when a large number of contents to be displayed on the cockpit display device \
+(CID, meter, HUD, etc.) occur simultaneously under a certain rule (arbitration)"
+
+SECTION = "libs"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=13afa517927767fe9b7a65818a02bd8f"
+
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/rba;protocol=https;branch=master"
+SRCREV = "87c0278dfbcf0953330330c28a8d48636dd4df7e"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig cmake
+
+FILES:${PN} = "${libdir}/"
+FILES:${PN}-dev = "${libdir}/pkgconfig/librba.pc \
+ ${includedir}/ \
+ "
+INSANE_SKIP:${PN} += "dev-so"
+INSANE_SKIP:${PN}-dev += "dev-elf"
diff --git a/meta-agl-core/recipes-graphics/rba/rba-config.bb b/meta-agl-core/recipes-graphics/rba/rba-config.bb
new file mode 100644
index 000000000..cbed9df0c
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/rba/rba-config.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Rule Based Arbitrator Model required for RBA policy compositor."
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+SRC_URI = "file://RBAModel.json"
+
+S = "${WORKDIR}"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install:append() {
+ install -d ${D}/${sysconfdir}/rba
+ install -m 0644 ${WORKDIR}/RBAModel.json ${D}/${sysconfdir}/rba
+}
diff --git a/meta-agl-core/recipes-graphics/rba/rba-config/RBAModel.json b/meta-agl-core/recipes-graphics/rba/rba-config/RBAModel.json
new file mode 100644
index 000000000..753a9ed86
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/rba/rba-config/RBAModel.json
@@ -0,0 +1,320 @@
+{
+ "root":{
+ "model":"",
+ "template":"02.00.00",
+ "areas":[
+ {
+ "name":"ApplicationArea",
+ "visibility":-1,
+ "arbitrationPolicy":"DEFAULT",
+ "zorder":1,
+ "size":[
+ {
+ "name":"ApplicationSize",
+ "width":1080,
+ "height":1488
+ }
+ ]
+ },
+ {
+ "name":"ShortcutIconArea",
+ "visibility":-1,
+ "arbitrationPolicy":"DEFAULT",
+ "zorder":0,
+ "size":[
+ {
+ "name":"ShortcutIconSize",
+ "width":1080,
+ "height":216
+ }
+ ]
+ }
+ ],
+ "viewcontents":[
+ {
+ "name":"launcher",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"dashboard",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"hvac",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"mediaplayer",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"messaging",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"mixer",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"navigation",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"phone",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"poi",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"radio",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"settings",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"taskmanager",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ },
+ {
+ "name":"unknown_app",
+ "loserType":"NEVER_GIVEUP",
+ "size":[
+ {
+ "name":"ApplicationSize:Area",
+ "width":1080,
+ "height":1488
+ }
+ ],
+ "states":[
+ {
+ "name":"NORMAL",
+ "priority":10
+ }
+ ],
+ "allocatable":[
+ "ApplicationArea:Area"
+ ]
+ }
+ ],
+ "displays":[
+ {
+ "name":"SampleDisplay",
+ "size":{
+ "name":"FULLSCREEN",
+ "width":1080,
+ "height":1920
+ },
+ "PositionContainer":[
+ {
+ "x":0,
+ "y":0,
+ "basePoint":"LEFT_TOP",
+ "areaReference":"ShortcutIconArea"
+ },
+ {
+ "x":0,
+ "y":216,
+ "basePoint":"LEFT_TOP",
+ "areaReference":"ApplicationArea"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf b/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf
new file mode 100644
index 000000000..ee75c7335
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf
@@ -0,0 +1,43 @@
+##Generate a weston.ini file:
+
+To modify any of the default sections (core, shell), add a
+do_configure() function to your bbappend, using machine (e.g. h3ulcb)
+overrides (i.e. use the MACHINE name where "machine" is used below):
+
+'''
+do_configure:machine() {
+ echo repaint-window=34 >> ${WORKDIR}/core.cfg
+
+ echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg
+ echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg
+}
+'''
+or:
+'''
+do_configure:machine() {
+ sed -i -e 's/drm-backend/fbdev-backend/' ${WORKDIR}/core.cfg
+}
+'''
+
+To add new non-display sections, just list them in SRC_URI and WESTON_FRAGMENTS:
+'''
+FILESEXTRAPATHS:prepend:machine := "${THISDIR}/${PN}:"
+
+SRC_URI:append:machine = " file://foo.cfg"
+WESTON_FRAGMENTS:append:machine = " foo"
+
+'''
+
+To change the display, for example from the default assumption of an
+HDMI-1-A connected screen that needs to be rotated 270 degrees to one
+that is rotated 90 degrees, redefine the WESTON_DISPLAYS variable:
+
+'''
+WESTON_DISPLAYS:machine = "hdmi-a-1-90"
+'''
+
+Note that the weston-ini-conf recipe automatically generates a landscape
+orientation version of weston.ini by replacing 90/270 degree rotation
+fragments for HDMI-A-1 and the virtual output into 180 and 0 degrees,
+respectively. This landscape configuration can be used in an image by
+pulling in weston-ini-conf-landscape instead of weston-ini-conf.
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb
new file mode 100644
index 000000000..d8baf91f9
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb
@@ -0,0 +1,61 @@
+SUMMARY = "Startup systemd unit for the AGL Wayland compositor"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+inherit systemd
+
+# Reuse include file from upstream weston since we have the same requirements
+require recipes-graphics/wayland/required-distro-features.inc
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI = "file://agl-compositor.service \
+ file://agl-compositor.socket \
+ file://agl-compositor-autologin \
+ file://agl-compositor.conf.in \
+"
+
+S = "${WORKDIR}"
+
+AGL_COMPOSITOR_ARGS ?= " --config ${sysconfdir}/xdg/weston/weston.ini --idle-time=0"
+AGL_COMPOSITOR_USE_PIXMAN ??= "0"
+
+AGL_COMPOSITOR_ARGS:append = " ${@bb.utils.contains("DISTRO_FEATURES", "agl-devel", " --debug", "",d)}"
+AGL_COMPOSITOR_ARGS:append = " ${@bb.utils.contains("WESTON_USE_PIXMAN", "1", " --use-pixman", "",d)}"
+
+do_install() {
+ # Install systemd service
+ install -D -p -m0644 ${WORKDIR}/agl-compositor.service ${D}${systemd_system_unitdir}/agl-compositor.service
+ install -D -p -m0644 ${WORKDIR}/agl-compositor.socket ${D}${systemd_system_unitdir}/agl-compositor.socket
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+ install -D -p -m0644 ${WORKDIR}/agl-compositor-autologin ${D}${sysconfdir}/pam.d/agl-compositor-autologin
+ fi
+
+ # Install systemd service drop-in with extra configuration
+ files=agl-compositor.conf.in
+ for f in ${files}; do
+ g=${f%.in}
+ if [ "${f}" != "${g}" ]; then
+ sed -e "s,@AGL_COMPOSITOR_ARGS@,${AGL_COMPOSITOR_ARGS},g" \
+ ${WORKDIR}/${f} > ${WORKDIR}/${g}
+ fi
+ done
+ install -d ${D}${systemd_system_unitdir}/agl-compositor.service.d
+ install -m644 ${WORKDIR}/agl-compositor.conf ${D}/${systemd_system_unitdir}/agl-compositor.service.d/agl-compositor.conf
+}
+
+FILES:${PN} += "\
+ ${systemd_system_unitdir}/agl-compositor.service \
+ ${systemd_system_unitdir}/agl-compositor.socket \
+ ${systemd_system_unitdir}/agl-compositor.service.d \
+ ${sysconfdir}/default/agl-compositor \
+ ${sysconfdir}/pam.d/ \
+ "
+
+CONFFILES:${PN} += "${sysconfdir}/default/agl-compositor"
+
+RDEPENDS:${PN} = "agl-users agl-compositor weston-ini"
+
+RCONFLICTS:${PN} = "weston-init"
+
+SYSTEMD_SERVICE:${PN} = "agl-compositor.service agl-compositor.socket"
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-autologin b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-autologin
new file mode 100644
index 000000000..f6e6d106d
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-autologin
@@ -0,0 +1,11 @@
+auth required pam_nologin.so
+auth required pam_unix.so try_first_pass nullok
+
+account required pam_nologin.so
+account required pam_unix.so
+
+session required pam_env.so
+session required pam_unix.so
+-session optional pam_systemd.so type=wayland class=user desktop=weston
+-session optional pam_loginuid.so
+
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.conf.in b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.conf.in
new file mode 100644
index 000000000..2918c410c
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.conf.in
@@ -0,0 +1,3 @@
+[Service]
+ExecStart=
+ExecStart=/usr/bin/agl-compositor @AGL_COMPOSITOR_ARGS@
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.service b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.service
new file mode 100644
index 000000000..4ee14de27
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.service
@@ -0,0 +1,72 @@
+# This is a system unit for launching AGL compositor with auto-login as the
+# user configured here.
+#
+# AGL compositor and Weston must be built with systemd support, and your
+# weston.ini must load the plugin systemd-notify.so.
+#
+# Attention:
+# If you will add new tty dependency setting, you need to update
+# agl-compositor-guest.conf.
+[Unit]
+Description=AGL compositor
+Documentation=man:weston(1) man:weston.ini(5)
+Documentation=http://wayland.freedesktop.org/
+
+# Make sure we are started after logins are permitted.
+Requires=systemd-user-sessions.service
+After=systemd-user-sessions.service
+
+# D-Bus is necessary for contacting logind. Logind is required.
+Wants=dbus.socket
+After=dbus.socket
+
+# Ensure the socket is present
+Requires=agl-compositor.socket
+
+# Since we are part of the graphical session, make sure we are started before
+# it is complete.
+Before=graphical.target
+
+# Prevent starting on systems without virtual consoles, Weston requires one
+# for now.
+ConditionPathExists=/dev/tty0
+
+[Service]
+# Requires systemd-notify.so Weston plugin.
+Type=notify
+EnvironmentFile=-/etc/default/agl-compositor
+ExecStart=/usr/bin/agl-compositor --modules=systemd-notify.so
+
+# Watchdog setup
+TimeoutStartSec=60
+WatchdogSec=20
+
+# The user to run as.
+User=agl-driver
+Group=agl-driver
+
+# Make sure the working directory is the users home directory
+WorkingDirectory=/home/agl-driver
+
+# Set up a full user session for the user
+PAMName=agl-compositor-autologin
+
+# A virtual terminal is needed.
+TTYPath=/dev/tty7
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=yes
+
+# Fail to start if not controlling the tty.
+StandardInput=tty-fail
+StandardOutput=journal
+StandardError=journal
+
+# Log this user with utmp, letting it show up with commands 'w' and 'who'.
+UtmpIdentifier=tty7
+UtmpMode=user
+
+[Install]
+# Note: If you only want weston to start on-demand, remove this line with a
+# service drop file
+WantedBy=graphical.target
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.socket b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.socket
new file mode 100644
index 000000000..ef9769ff7
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.socket
@@ -0,0 +1,10 @@
+#
+# Weston must be built with systemd support, and your weston.ini must load
+# the plugin systemd-notify.so.
+
+[Unit]
+Description=agl-compositor, a Wayland compositor, as a systemd user service
+Documentation=https://docs.automotivelinux.org/en/master/#5_Component_Documentation/1_agl-compositor/
+
+[Socket]
+ListenStream=%t/wayland-0
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
new file mode 100644
index 000000000..41240309b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
@@ -0,0 +1,57 @@
+SUMMARY = "Reference Wayland compositor for AGL"
+DESCRIPTION = "The AGL compositor is a reference Wayland server for Automotive \
+Grade Linux, using libweston as a base to provide a graphical environment for \
+the automotive environment."
+
+HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/q/project:src%252Fagl-compositor"
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fac6abe0003c4d142ff8fa1f18316df0"
+
+DEPENDS = "wayland wayland-protocols wayland-native weston"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-compositor.git;protocol=https;branch=${AGL_BRANCH}"
+SRCREV = "18e93caca8ad397d504215d673765871b2c88f25"
+AGL_BRANCH:aglnext = "next"
+SRCREV:aglnext = "${AUTOREV}"
+
+AGL_COMPOSITOR_VERSION = "0.0.24"
+
+PV = "${AGL_COMPOSITOR_VERSION}+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[policy-rba] = "-Dpolicy-default=rba,,librba,librba rba-config"
+PACKAGECONFIG[policy-deny-all] = "-Dpolicy-default=deny-all,,"
+PACKAGECONFIG[grpc-proxy] = "-Dgrpc-proxy=true,-Dgrpc-proxy=false,grpc grpc-native,grpc agl-shell-grpc-server"
+
+inherit meson pkgconfig python3native
+
+# Reuse include file from upstream weston since we have the same requirements
+require recipes-graphics/wayland/required-distro-features.inc
+
+PACKAGES =+ "agl-shell-grpc-server"
+
+LDFLAGS:append:riscv64 = " -Wl,--no-as-needed -latomic -Wl,--as-needed"
+
+FILES:${PN} = " \
+ ${bindir}/agl-compositor \
+ ${bindir}/agl-screenshooter \
+ ${libdir}/agl-compositor/libexec_compositor.so.0 \
+ ${libdir}/agl-compositor/libexec_compositor.so.${AGL_COMPOSITOR_VERSION} \
+"
+
+FILES:agl-shell-grpc-server = " \
+ ${libdir}/agl-compositor/agl-shell-grpc-server \
+"
+
+RDEPENDS:${PN} += " \
+ agl-compositor-init \
+ xkeyboard-config \
+"
+
+FILES:${PN}-dev += " \
+ ${datadir}/agl-compositor/protocols/agl-shell.xml \
+ ${datadir}/agl-compositor/protocols/agl-shell-desktop.xml \
+ ${libdir}/agl-compositor/libexec_compositor.so \
+"
diff --git a/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb b/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb
new file mode 100644
index 000000000..c0c31e029
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Minimal agl-shell Wayland protocol client"
+
+HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/q/project:src%252Fnative-shell-client"
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3b90ee643ce04400848a8f0deb492a4a"
+
+DEPENDS = "wayland wayland-protocols wayland-native agl-compositor"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/native-shell-client.git;protocol=https;branch=${AGL_BRANCH}"
+SRCREV = "099e06f532eff7c56bf00eb58420f14c95a8e554"
+
+PV = "0.0.1+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
new file mode 100644
index 000000000..0611ec5b4
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
@@ -0,0 +1,156 @@
+SUMMARY = "Configuration file for the Weston and AGL Wayland compositors"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = " \
+ file://core.cfg \
+ file://shell.cfg \
+ file://hdmi-a-1-0.cfg \
+ file://hdmi-a-1-90.cfg \
+ file://hdmi-a-1-180.cfg \
+ file://hdmi-a-1-270.cfg \
+ file://hdmi-a-2-0.cfg \
+ 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 \
+ file://virtual-270.cfg \
+ file://grpc-proxy.cfg \
+"
+
+S = "${WORKDIR}"
+
+inherit update-alternatives
+
+# Default primary display/orientation fragment
+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}"
+
+# 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
+ rm -f ${WORKDIR}/weston.ini.default
+ for F in ${WESTON_FRAGMENTS}; do
+ cat ${WORKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.default
+ echo >> ${WORKDIR}/weston.ini.default
+ done
+ sed -i -e '$ d' ${WORKDIR}/weston.ini.default
+
+ cat ${WORKDIR}/weston.ini.default > ${WORKDIR}/weston.ini.default-no-activate
+
+ # Do it again, but filter fragments to configure for landscape
+ # and a corresponding landscape-inverted that is 180 degrees
+ # rotated.
+ rm -f ${WORKDIR}/weston.ini.landscape
+ rm -f ${WORKDIR}/weston.ini.landscape-inverted
+ for F in ${WESTON_FRAGMENTS}; do
+ INVF=$F
+ if echo $F | grep '^hdmi-a-1-\(90\|270\)$'; then
+ F="hdmi-a-1-0"
+ INVF="hdmi-a-1-180"
+ elif echo $F | grep '^hdmi-a-2-\(90\|270\)$'; then
+ F="hdmi-a-2-0"
+ INVF="hdmi-a-2-180"
+ elif echo $F | grep '^virtual-90$'; then
+ F="virtual-0"
+ INVF="virtual-180"
+ fi
+ cat ${WORKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.landscape
+ cat ${WORKDIR}/${INVF}.cfg >> ${WORKDIR}/weston.ini.landscape-inverted
+ echo >> ${WORKDIR}/weston.ini.landscape
+ echo >> ${WORKDIR}/weston.ini.landscape-inverted
+ done
+ sed -i -e '$ d' ${WORKDIR}/weston.ini.landscape
+ sed -i -e '$ d' ${WORKDIR}/weston.ini.landscape-inverted
+
+ cat ${WORKDIR}/weston.ini.landscape > ${WORKDIR}/weston.ini.landscape-no-activate
+}
+
+do_install:append() {
+ install -d ${D}${weston_ini_dir}
+ install -m 0644 ${WORKDIR}/weston.ini.default ${D}${weston_ini_dir}/
+ install -m 0644 ${WORKDIR}/weston.ini.default-no-activate ${D}${weston_ini_dir}/
+ install -m 0644 ${WORKDIR}/weston.ini.landscape-no-activate ${D}${weston_ini_dir}/
+ install -m 0644 ${WORKDIR}/weston.ini.landscape ${D}${weston_ini_dir}/
+ install -m 0644 ${WORKDIR}/weston.ini.landscape-inverted ${D}${weston_ini_dir}/
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+# Use the alternative mechanism to handle multiple packages providing
+# weston.ini. This seems simpler than other possible approaches.
+# Note that for now the generated packages are being marked as
+# incompatible with each other for simplicity, that can be changed if
+# a usecase where switching between alternatives at runtime is desirable
+# appears.
+
+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"
+
+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"
+
+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"
+
+# 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"
+
+# landscape, 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"
+
+# This is a settings-only package, we do not need a development package
+# (and its fixed dependency to ${PN} being installed)
+PACKAGES:remove = "${PN}-dev ${PN}-staticdev"
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend
new file mode 100644
index 000000000..746bde339
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend
@@ -0,0 +1,12 @@
+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.
+WESTON_DISPLAYS:append:qemuall = " virtual-90"
+WESTON_DISPLAYS:append:intel-corei7-64 = " virtual-90"
+WESTON_DISPLAYS:append:virtio-aarch64 = " virtual-90"
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg
new file mode 100644
index 000000000..28f90752d
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg
@@ -0,0 +1,6 @@
+[core]
+backend=drm-backend.so
+require-input=false
+idle-time=0
+modules=systemd-notify.so
+activate-by-default=false
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/grpc-proxy.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/grpc-proxy.cfg
new file mode 100644
index 000000000..14805b969
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/grpc-proxy.cfg
@@ -0,0 +1,4 @@
+
+[shell-client-ext]
+command=/usr/lib/agl-compositor/agl-shell-grpc-server
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-0.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-0.cfg
new file mode 100644
index 000000000..f82570790
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-0.cfg
@@ -0,0 +1,3 @@
+# A display is connected to HDMI-A-1
+[output]
+name=HDMI-A-1
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg
new file mode 100644
index 000000000..b6f4329ef
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg
@@ -0,0 +1,4 @@
+# A display is connected to HDMI-A-1
+[output]
+name=HDMI-A-1
+transform=rotate-180
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg
new file mode 100644
index 000000000..187f2c7bd
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg
@@ -0,0 +1,6 @@
+# A display is connected to HDMI-A-1 and needs to be rotated 270 degrees
+# to have a proper orientation of the homescreen. For example the various sizes
+# of the GeChic display or the Dell display.
+[output]
+name=HDMI-A-1
+transform=rotate-270
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg
new file mode 100644
index 000000000..5ee9c1904
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg
@@ -0,0 +1,6 @@
+# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees
+# to have a proper orientation of the homescreen. For example, the 'eGalax'
+# display used in some instances.
+[output]
+name=HDMI-A-1
+transform=rotate-90
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-0.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-0.cfg
new file mode 100644
index 000000000..4d5d51c03
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-0.cfg
@@ -0,0 +1,5 @@
+# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees
+# to have a proper orientation of the homescreen. For example, the 'eGalax'
+# display used in some instances.
+[output]
+name=HDMI-A-2
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-180.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-180.cfg
new file mode 100644
index 000000000..ffdc5fe60
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-180.cfg
@@ -0,0 +1,6 @@
+# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees
+# to have a proper orientation of the homescreen. For example, the 'eGalax'
+# display used in some instances.
+[output]
+name=HDMI-A-2
+transform=rotate-180
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-270.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-270.cfg
new file mode 100644
index 000000000..76fc77acd
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-270.cfg
@@ -0,0 +1,6 @@
+# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees
+# to have a proper orientation of the homescreen. For example, the 'eGalax'
+# display used in some instances.
+[output]
+name=HDMI-A-2
+transform=rotate-270
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-90.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-90.cfg
new file mode 100644
index 000000000..9172a1c6a
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-90.cfg
@@ -0,0 +1,6 @@
+# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees
+# to have a proper orientation of the homescreen. For example, the 'eGalax'
+# display used in some instances.
+[output]
+name=HDMI-A-2
+transform=rotate-90
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
new file mode 100644
index 000000000..940cbdd0c
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in
@@ -0,0 +1,5 @@
+[remote-output]
+name=remote-1
+mode=640x720@30
+host=192.168.10.3
+port=5005
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg
new file mode 100644
index 000000000..8d16ba5d7
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg
@@ -0,0 +1,3 @@
+[shell]
+locking=false
+panel-position=none
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-0.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-0.cfg
new file mode 100644
index 000000000..d69253639
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-0.cfg
@@ -0,0 +1,3 @@
+[output]
+name=Virtual-1
+mode=1920x1080
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-180.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-180.cfg
new file mode 100644
index 000000000..0363b6339
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-180.cfg
@@ -0,0 +1,4 @@
+[output]
+name=Virtual-1
+mode=1920x1080
+transform=rotate-180
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-270.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-270.cfg
new file mode 100644
index 000000000..c3f72f495
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-270.cfg
@@ -0,0 +1,4 @@
+[output]
+name=Virtual-1
+mode=1920x1080
+transform=rotate-270
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-90.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-90.cfg
new file mode 100644
index 000000000..96d9c3a04
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-90.cfg
@@ -0,0 +1,4 @@
+[output]
+name=Virtual-1
+mode=1920x1080
+transform=rotate-90
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-init.bbappend b/meta-agl-core/recipes-graphics/wayland/weston-init.bbappend
new file mode 100644
index 000000000..c09d7ccd3
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-init.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston-init_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc
new file mode 100644
index 000000000..896f1eafb
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc
@@ -0,0 +1,8 @@
+SYSTEMD_AUTO_ENABLE = "enable"
+
+do_install:append() {
+ # Remove upstream weston.ini to avoid conflict with weston-ini-conf package
+ rm -f ${D}${sysconfdir}/xdg/weston/weston.ini
+}
+
+RDEPENDS:${PN} += "weston-ini"
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch
new file mode 100644
index 000000000..202333a5e
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch
@@ -0,0 +1,30 @@
+From 6a847464de9e773f6d1490916d0df48a0f90eeba Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Thu, 5 Oct 2023 16:27:34 +0300
+Subject: [PATCH] clients: Handle missing pointer_surface is there's no pointer
+ event
+
+Upstream-Status: Pending
+
+Bug-AGL: SPEC-4916
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ clients/window.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/clients/window.c b/clients/window.c
+index 30f6410..882e9d5 100644
+--- a/clients/window.c
++++ b/clients/window.c
+@@ -3818,7 +3818,7 @@ pointer_surface_frame_callback(void *data, struct wl_callback *callback,
+ force_frame = false;
+ }
+
+- if (!input->pointer)
++ if (!input->pointer || !input->pointer_surface)
+ return;
+
+ if (input_set_pointer_special(input))
+--
+2.35.1
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch
new file mode 100644
index 000000000..19eadcf7f
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch
@@ -0,0 +1,60 @@
+From cfde02d47a503cbfd0629bbfe0cb776686af8a91 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Tue, 9 Apr 2024 18:34:22 +0300
+Subject: [PATCH] libweston: Add paint node destruction into
+ weston_layer_entry_remove()
+
+This prevents a potential crash where users of
+weston_layer_entry_insert/layer_entry_remove() would see when moving
+views into a NULL layer (effectively unmapping the surface/view).
+
+Users that have migrated to the weston_view_move_to_layer() are immune
+to this issue because that takes care paint node destruction.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ libweston/compositor.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/libweston/compositor.c b/libweston/compositor.c
+index bb29b83b5..ea257bb90 100644
+--- a/libweston/compositor.c
++++ b/libweston/compositor.c
+@@ -3980,17 +3980,10 @@ weston_view_move_to_layer(struct weston_view *view,
+ struct weston_layer_entry *layer)
+ {
+ bool was_mapped = view->is_mapped;
+- struct weston_paint_node *pnode, *pntmp;
+
+ if (layer == &view->layer_link)
+ return;
+
+- /* Remove all paint nodes because we have no idea what a layer change
+- * does to view visibility on any output.
+- */
+- wl_list_for_each_safe(pnode, pntmp, &view->paint_node_list, view_link)
+- weston_paint_node_destroy(pnode);
+-
+ view->surface->compositor->view_list_needs_rebuild = true;
+
+ /* Damage the view's old region, and remove it from the layer. */
+@@ -4020,6 +4013,16 @@ weston_view_move_to_layer(struct weston_view *view,
+ WL_EXPORT void
+ weston_layer_entry_remove(struct weston_layer_entry *entry)
+ {
++ struct weston_paint_node *pnode, *pntmp;
++ struct weston_view *view;
++
++ /* Remove all paint nodes because we have no idea what a layer change
++ * does to view visibility on any output.
++ */
++ view = container_of(entry, struct weston_view, layer_link);
++ wl_list_for_each_safe(pnode, pntmp, &view->paint_node_list, view_link)
++ weston_paint_node_destroy(pnode);
++
+ wl_list_remove(&entry->link);
+ wl_list_init(&entry->link);
+ entry->layer = NULL;
+--
+2.43.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston_13.0.%.bbappend b/meta-agl-core/recipes-graphics/wayland/weston_13.0.%.bbappend
new file mode 100644
index 000000000..87cad12a0
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston_13.0.%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston_13.0_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
new file mode 100644
index 000000000..843a068b4
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
@@ -0,0 +1,29 @@
+FILESEXTRAPATHS:append := ":${THISDIR}/weston"
+
+PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}"
+
+SRC_URI:append = " \
+ file://0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch \
+ file://0001-libweston-Add-paint-node-destruction-into-weston_lay.patch \
+"
+
+
+# Split weston-terminal out of the main package to allow installing it
+# separately for use with other compositors. The icons, etc. that end
+# up in /usr/share/weston are also split out into a separate package
+# since they are required for weston-terminal and some of the programs
+# packaged in weston-examples in addition to ivi-shell in the main
+# package.
+
+PACKAGE_BEFORE_PN += "${PN}-data ${PN}-terminal"
+
+FILES:${PN}-data = "${datadir}/weston"
+
+FILES:${PN}-terminal = "${bindir}/weston-terminal"
+RDEPENDS:${PN}-terminal += "weston-data liberation-fonts"
+
+RDEPENDS:${PN}-examples += "weston-data"
+
+FILES:${PN}:remove = "weston-terminal"
+RDEPENDS:${PN}:remove = "liberation-fonts"
+RDEPENDS:${PN} += "weston-data weston-terminal"
diff --git a/meta-agl-core/recipes-kernel/linux/kernel-devsrc.bbappend b/meta-agl-core/recipes-kernel/linux/kernel-devsrc.bbappend
new file mode 100644
index 000000000..3d5903d85
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/kernel-devsrc.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_agl.inc', '', d)}
diff --git a/meta-agl-core/recipes-kernel/linux/kernel-devsrc_agl.inc b/meta-agl-core/recipes-kernel/linux/kernel-devsrc_agl.inc
new file mode 100644
index 000000000..39289fef7
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/kernel-devsrc_agl.inc
@@ -0,0 +1,6 @@
+# fix for kernel using hardcoded awk while our filesystem only provides gawk
+do_install:append() {
+ # enforce all scripts to use /usr/bin/awk . This fixes the rpm dependency failure on install of kernel-devsrc
+ cd ${D} || true
+ ( for i in `grep -srI "\!/bin/awk" | cut -d":" -f1 ` ; do sed -i -e "s#\!/bin/awk#\!/usr/bin/env awk#g" $i ; done ) || true
+} \ No newline at end of file
diff --git a/meta-agl-core/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch b/meta-agl-core/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch
new file mode 100644
index 000000000..7c34fb306
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch
@@ -0,0 +1,25 @@
+From 17d0075d95b5087d5df553444cca390fa479bad9 Mon Sep 17 00:00:00 2001
+From: Matt Ranostay <matt.ranostay@konsulko.com>
+Date: Tue, 10 Mar 2020 22:27:28 -0700
+Subject: [PATCH] net: sch_generic: add if_afp.h header to get ARPHRD_CAN macro
+
+Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
+---
+ net/sched/sch_generic.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
+index bf8c81e07c70..1845ef8c7dbd 100644
+--- a/net/sched/sch_generic.c
++++ b/net/sched/sch_generic.c
+@@ -25,6 +25,7 @@
+ #include <linux/rcupdate.h>
+ #include <linux/list.h>
+ #include <linux/slab.h>
++#include <linux/if_arp.h>
+ #include <linux/if_vlan.h>
+ #include <net/sch_generic.h>
+ #include <net/pkt_sched.h>
+--
+2.25.0
+
diff --git a/meta-agl-core/recipes-kernel/linux/linux-agl-4.14.inc b/meta-agl-core/recipes-kernel/linux/linux-agl-4.14.inc
new file mode 100644
index 000000000..9ab3d34af
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-agl-4.14.inc
@@ -0,0 +1,6 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/linux-4.14:"
+
+SRC_URI:append = "\
+ file://net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch \
+ file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch \
+ "
diff --git a/meta-agl-core/recipes-kernel/linux/linux-agl-4.19.inc b/meta-agl-core/recipes-kernel/linux/linux-agl-4.19.inc
new file mode 100644
index 000000000..1ea476426
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-agl-4.19.inc
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/linux-4.19:"
+
+SRC_URI:append = "\
+ file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch \
+ "
diff --git a/meta-agl-core/recipes-kernel/linux/linux-agl-config.inc b/meta-agl-core/recipes-kernel/linux/linux-agl-config.inc
new file mode 100644
index 000000000..4799a6180
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-agl-config.inc
@@ -0,0 +1,94 @@
+# Common include file that defines AGL's variables for kernel
+# configuration.
+#
+# Can be included directly for kernel.bbclass based recipes that
+# use their own config fragment merging scheme, or use the
+# KERNEL_CONFIG_FRAGMENTS variable (e.g. meta-ti, meta-qcom).
+#
+# Fragments should be added to AGL_KCONFIG_FRAGMENTS as just the
+# .cfg filename with +=. Appending to AGL_KCONFIG_FRAGMENTS (i.e.
+# using _append) should only be done for:
+# - Specific AGL features that set an override in their feature
+# template, e.g. agl-netboot.
+# - To add essential configuration for core target machines like
+# qemu. Note that appending fragments directly to SRC_URI
+# would work for qemu targets since they use linux-yocto, but
+# the AGL_KCONFIG_FRAGMENTS mechanism is recommended for
+# consistency and to preserve the option of disabling all AGL
+# additions by overriding AGL_KERNEL_SRC.
+#
+# In general, care shoud be taken to preserve the ability to set
+# AGL_KCONFIG_FRAGMENTS to "" to disable non-essential (from a build
+# perspective) AGL additions.
+#
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/linux:"
+
+# NOTE: AGL_KERNEL_SRC is explicitly intended as an intermediate variable
+# that can be used as a last resort to completely disable all AGL
+# additions, modifying or appending it is not recommended.
+AGL_KERNEL_SRC ?= "${@' '.join(['file://' + x for x in d.getVar('AGL_KCONFIG_FRAGMENTS').split()])}"
+
+SRC_URI:append = " ${AGL_KERNEL_SRC}"
+
+# For meta-ti and meta-qcom
+KERNEL_CONFIG_FRAGMENTS ?= "${@' '.join(['${WORKDIR}/' + x for x in d.getVar('AGL_KCONFIG_FRAGMENTS').split()])}"
+
+# Extra configuration options for the AGL kernel
+AGL_KCONFIG_FRAGMENTS += " \
+ can-bus.cfg \
+ fanotify.cfg \
+ overlayfs.cfg \
+ audit.cfg \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux.cfg', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-required.cfg', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-sandbox.cfg', '', d)} \
+ lttng.cfg \
+"
+
+AGL_KCONFIG_FRAGMENTS += " ${@bb.utils.contains('AGL_XEN_GUEST_WANTED','1','xen_domu.cfg','',d)}"
+
+# Base ALSA support and other sound related configuration
+AGL_KCONFIG_FRAGMENTS += "sound.cfg"
+
+# Enable support for SystemTap
+AGL_KCONFIG_FRAGMENTS += "${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'systemtap.cfg', '', d)}"
+
+#
+# Feature override and qemu specific appends:
+#
+
+# Enable required features for the agl-netboot feature
+AGL_KCONFIG_FRAGMENTS:append:netboot = " \
+ nbd.cfg \
+ ramdisk.cfg \
+"
+
+# Add hda audio and required virtio device support for qemu
+AGL_KCONFIG_FRAGMENTS:append:qemuall = " \
+ sound-hda.cfg \
+ qemu-virtio.cfg \
+ qemu-drm.cfg \
+"
+
+AGL_KCONFIG_FRAGMENTS:append:virtio-all = " \
+ sound-hda.cfg \
+"
+
+# Configuration for using the ARM virt machine (and not versatilepb)
+AGL_KCONFIG_FRAGMENTS:append:qemuarm = " qemuarm.cfg"
+
+# Additional drivers for virtual machines
+# OVERRIDES save us some c'n'p below ...
+OVERRIDES:prepend:qemux86 = "virtualmachine:"
+OVERRIDES:prepend:qemux86-64 = "virtualmachine:"
+AGL_KCONFIG_FRAGMENTS:append:virtualmachine = " vbox-vmware-sata.cfg"
+
+# Extra configuration for using qemux86-64 image on physical hardware
+AGL_KCONFIG_FRAGMENTS:append:qemux86-64 = " \
+ x86-extra-graphic-devices.cfg \
+ x86-net-devices.cfg \
+ x86-security-tpm.cfg \
+ x86-usb-devices.cfg \
+ x86-upsquare.cfg \
+"
diff --git a/meta-agl-core/recipes-kernel/linux/linux-agl.inc b/meta-agl-core/recipes-kernel/linux/linux-agl.inc
new file mode 100644
index 000000000..c318716fe
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-agl.inc
@@ -0,0 +1,24 @@
+# Include file intended for kernel.bbclass based recipes that do not
+# have their own config fragment merging scheme.
+
+DEPENDS += "kern-tools-native"
+
+include linux-agl-config.inc
+
+# returns all the elements from the src uri that are .cfg files
+def find_cfgs(d):
+ sources=src_patches(d, True)
+ sources_list=[]
+ for s in sources:
+ if s.endswith('.cfg'):
+ sources_list.append(s)
+
+ return sources_list
+
+do_configure:append () {
+ if [ -n "${AGL_KCONFIG_FRAGMENTS}" ]; then
+ [ ! -f .config ] && cp -a ${WORKDIR}/defconfig .config
+ merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
+ yes '' | make oldconfig
+ fi
+}
diff --git a/meta-agl-core/recipes-kernel/linux/linux-yocto-agl.inc b/meta-agl-core/recipes-kernel/linux/linux-yocto-agl.inc
new file mode 100644
index 000000000..8628731cb
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-yocto-agl.inc
@@ -0,0 +1,12 @@
+# Include file intended for kernel-yocto.bbclass based recipes.
+
+include linux-agl-config.inc
+
+# For qemuarm, build a generic v7 kernel instead of the arm926j one that
+# upstream qemuarm defaults to.
+KBUILD_DEFCONFIG:qemuarm = "multi_v7_defconfig"
+
+# Use alldefconfig for the qemu targets, but let other kernel-yocto
+# based BSPs use their own defaults (note that linux-renesas and
+# linux-raspberrypi also default to alldefconfig).
+KCONFIG_MODE:qemuall = "--alldefconfig"
diff --git a/meta-agl-core/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-agl-core/recipes-kernel/linux/linux-yocto_%.bbappend
new file mode 100644
index 000000000..808df2d09
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}-agl.inc', '', d)}
diff --git a/meta-agl-core/recipes-kernel/linux/linux/audit.cfg b/meta-agl-core/recipes-kernel/linux/linux/audit.cfg
new file mode 100644
index 000000000..7decc799c
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/audit.cfg
@@ -0,0 +1,2 @@
+CONFIG_AUDIT=y
+CONFIG_AUDIT_GENERIC=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/can-bus.cfg b/meta-agl-core/recipes-kernel/linux/linux/can-bus.cfg
new file mode 100644
index 000000000..d7c7c7741
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/can-bus.cfg
@@ -0,0 +1,10 @@
+CONFIG_CAN=m
+CONFIG_CAN_RAW=m
+CONFIG_CAN_BCM=m
+CONFIG_CAN_GW=m
+CONFIG_CAN_J1939=m
+
+#
+# CAN Device Drivers
+#
+CONFIG_CAN_VCAN=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/fanotify.cfg b/meta-agl-core/recipes-kernel/linux/linux/fanotify.cfg
new file mode 100644
index 000000000..de5dd8d31
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/fanotify.cfg
@@ -0,0 +1,3 @@
+# Enable the fanotify API (notification/interception of FS events)
+CONFIG_FANOTIFY=y
+CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/lttng.cfg b/meta-agl-core/recipes-kernel/linux/linux/lttng.cfg
new file mode 100644
index 000000000..e5f6b9c69
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/lttng.cfg
@@ -0,0 +1 @@
+CONFIG_KALLSYMS_ALL=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/nbd.cfg b/meta-agl-core/recipes-kernel/linux/linux/nbd.cfg
new file mode 100644
index 000000000..e5d897556
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/nbd.cfg
@@ -0,0 +1,3 @@
+CONFIG_BLK_DEV_NBD=y
+# for CI use enable CONFIG_VETH=y
+CONFIG_VETH=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch b/meta-agl-core/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch
new file mode 100644
index 000000000..37ace5a58
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch
@@ -0,0 +1,75 @@
+From 546b85bb0aadb5a928b49b53dc02911996169c0b Mon Sep 17 00:00:00 2001
+From: Vincent Prince <vincent.prince.fr@gmail.com>
+Date: Wed, 23 Oct 2019 15:44:20 +0200
+Subject: [PATCH] net: sch_generic: Use pfifo_fast as fallback scheduler for
+ CAN hardware
+
+There is networking hardware that isn't based on Ethernet for layers 1 and 2.
+
+For example CAN.
+
+CAN is a multi-master serial bus standard for connecting Electronic Control
+Units [ECUs] also known as nodes. A frame on the CAN bus carries up to 8 bytes
+of payload. Frame corruption is detected by a CRC. However frame loss due to
+corruption is possible, but a quite unusual phenomenon.
+
+While fq_codel works great for TCP/IP, it doesn't for CAN. There are a lot of
+legacy protocols on top of CAN, which are not build with flow control or high
+CAN frame drop rates in mind.
+
+When using fq_codel, as soon as the queue reaches a certain delay based length,
+skbs from the head of the queue are silently dropped. Silently meaning that the
+user space using a send() or similar syscall doesn't get an error. However
+TCP's flow control algorithm will detect dropped packages and adjust the
+bandwidth accordingly.
+
+When using fq_codel and sending raw frames over CAN, which is the common use
+case, the user space thinks the package has been sent without problems, because
+send() returned without an error. pfifo_fast will drop skbs, if the queue
+length exceeds the maximum. But with this scheduler the skbs at the tail are
+dropped, an error (-ENOBUFS) is propagated to user space. So that the user
+space can slow down the package generation.
+
+On distributions, where fq_codel is made default via CONFIG_DEFAULT_NET_SCH
+during compile time, or set default during runtime with sysctl
+net.core.default_qdisc (see [1]), we get a bad user experience. In my test case
+with pfifo_fast, I can transfer thousands of million CAN frames without a frame
+drop. On the other hand with fq_codel there is more then one lost CAN frame per
+thousand frames.
+
+As pointed out fq_codel is not suited for CAN hardware, so this patch changes
+attach_one_default_qdisc() to use pfifo_fast for "ARPHRD_CAN" network devices.
+
+During transition of a netdev from down to up state the default queuing
+discipline is attached by attach_default_qdiscs() with the help of
+attach_one_default_qdisc(). This patch modifies attach_one_default_qdisc() to
+attach the pfifo_fast (pfifo_fast_ops) if the network device type is
+"ARPHRD_CAN".
+
+[1] https://github.com/systemd/systemd/issues/9194
+
+Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
+Acked-by: Dave Taht <dave.taht@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ net/sched/sch_generic.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
+index ed5b0e9fd395..4c5dfcb01e00 100644
+--- a/net/sched/sch_generic.c
++++ b/net/sched/sch_generic.c
+@@ -1038,6 +1038,8 @@ static void attach_one_default_qdisc(struct net_device *dev,
+
+ if (dev->priv_flags & IFF_NO_QUEUE)
+ ops = &noqueue_qdisc_ops;
++ else if(dev->type == ARPHRD_CAN)
++ ops = &pfifo_fast_ops;
+
+ qdisc = qdisc_create_dflt(dev_queue, ops, TC_H_ROOT, NULL);
+ if (!qdisc) {
+--
+2.25.0
+
diff --git a/meta-agl-core/recipes-kernel/linux/linux/overlayfs.cfg b/meta-agl-core/recipes-kernel/linux/linux/overlayfs.cfg
new file mode 100644
index 000000000..025118ed6
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/overlayfs.cfg
@@ -0,0 +1,7 @@
+CONFIG_OVERLAY_FS=y
+CONFIG_OVERLAY_FS_REDIRECT_DIR=y
+CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=n
+CONFIG_OVERLAY_FS_INDEX=y
+CONFIG_OVERLAY_FS_NFS_EXPORT=n
+CONFIG_OVERLAY_FS_XINO_AUTO=y
+CONFIG_OVERLAY_FS_METACOPY=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/qemu-drm.cfg b/meta-agl-core/recipes-kernel/linux/linux/qemu-drm.cfg
new file mode 100644
index 000000000..65fe71cd0
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/qemu-drm.cfg
@@ -0,0 +1,2 @@
+CONFIG_DRM_BOCHS=y
+CONFIG_DRM_VIRTIO_GPU=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/qemu-virtio.cfg b/meta-agl-core/recipes-kernel/linux/linux/qemu-virtio.cfg
new file mode 100644
index 000000000..d042d7d64
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/qemu-virtio.cfg
@@ -0,0 +1,6 @@
+# qemu need a virtio storage for rootfs
+CONFIG_BLK_MQ_VIRTIO=y
+CONFIG_VIRTIO=y
+CONFIG_VIRTIO_BLK=y
+# qemuarm need virtionet
+CONFIG_VIRTIO_NET=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/qemuarm.cfg b/meta-agl-core/recipes-kernel/linux/linux/qemuarm.cfg
new file mode 100644
index 000000000..b3644b26f
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/qemuarm.cfg
@@ -0,0 +1,8 @@
+# Necessary configs for using the virt qemu machine
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_VIRT=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_PCI_HOST_GENERIC=y
+CONFIG_RTC_DRV_PL031=y
+# SPEC-3976 we mimic real AGL ARM board and they dont have LPAE. This cause also HDA failure.
+# CONFIG_ARM_LPAE is not set
diff --git a/meta-agl-core/recipes-kernel/linux/linux/ramdisk.cfg b/meta-agl-core/recipes-kernel/linux/linux/ramdisk.cfg
new file mode 100644
index 000000000..3d44de805
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/ramdisk.cfg
@@ -0,0 +1,2 @@
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=65536
diff --git a/meta-agl-core/recipes-kernel/linux/linux/selinux.cfg b/meta-agl-core/recipes-kernel/linux/linux/selinux.cfg
new file mode 100644
index 000000000..d49283158
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/selinux.cfg
@@ -0,0 +1,14 @@
+CONFIG_NETWORK_SECMARK=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_JFS_SECURITY=y
+CONFIG_REISERFS_FS_SECURITY=y
+CONFIG_JFFS2_FS_SECURITY=y
+CONFIG_SECURITY=y
+CONFIG_SECURITYFS=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+CONFIG_SECURITY_SELINUX_AVC_STATS=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/sound-hda.cfg b/meta-agl-core/recipes-kernel/linux/linux/sound-hda.cfg
new file mode 100644
index 000000000..115504c39
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/sound-hda.cfg
@@ -0,0 +1,20 @@
+# make sure HDA sound modules are on
+# this is required for CI tests
+CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_GENERIC=m
+CONFIG_SND_HDA_CODEC_REALTEK=m
+CONFIG_SND_HDA_CODEC_ANALOG=m
+CONFIG_SND_HDA_CODEC_SIGMATEL=m
+CONFIG_SND_HDA_CODEC_VIA=m
+CONFIG_SND_HDA_CODEC_HDMI=m
+CONFIG_SND_HDA_CODEC_CIRRUS=m
+CONFIG_SND_HDA_CODEC_CONEXANT=m
+CONFIG_SND_HDA_CODEC_CA0110=m
+CONFIG_SND_HDA_CODEC_CA0132=m
+CONFIG_SND_HDA_CODEC_CMEDIA=m
+CONFIG_SND_HDA_CODEC_SI3054=m
+CONFIG_SND_HDA_RECONFIG=y
+CONFIG_SND_HDA_PATCH_LOADER=y
+
+# enable dummy sound for special cases in CI
+CONFIG_SND_DUMMY=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/sound.cfg b/meta-agl-core/recipes-kernel/linux/linux/sound.cfg
new file mode 100644
index 000000000..ad34ea680
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/sound.cfg
@@ -0,0 +1,7 @@
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_MAX_CARDS=32
+CONFIG_SND_ALOOP=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/systemd-required.cfg b/meta-agl-core/recipes-kernel/linux/linux/systemd-required.cfg
new file mode 100644
index 000000000..3424c80b9
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/systemd-required.cfg
@@ -0,0 +1,42 @@
+CONFIG_TMPFS=y
+CONFIG_TMPFS_XATTR=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_AUTOFS_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_BLK_DEV_BSG=y
+CONFIG_BLK_CGROUP=y
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_PERF=y
+CONFIG_CGROUP_PIDS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_RT_GROUP_SCHED=n
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCHEDSTATS=y
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_INOTIFY_USER=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EPOLL=y
+CONFIG_NET=y
+CONFIG_UNIX=y
+CONFIG_PROC_FS=y
+CONFIG_SYSFS=y
+CONFIG_FHANDLE=y
+CONFIG_CRYPTO_USER_API_HASH=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_UEVENT_HELPER_PATH=""
+CONFIG_FW_LOADER_USER_HELPER=n
+CONFIG_DMIID=y
+CONFIG_NAMESPACES=y
+CONFIG_NET_NS=y
+CONFIG_USER_NS=y
+CONFIG_SECCOMP=y
+CONFIG_SECCOMP_FILTER=y
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_CFS_BANDWIDTH=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/systemd-sandbox.cfg b/meta-agl-core/recipes-kernel/linux/linux/systemd-sandbox.cfg
new file mode 100644
index 000000000..d451d554c
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/systemd-sandbox.cfg
@@ -0,0 +1,9 @@
+CONFIG_BPF=y
+CONFIG_BPF_SYSCALL=y
+CONFIG_NET_CLS_BPF=m
+CONFIG_NET_ACT_BPF=m
+CONFIG_BPF_JIT=y
+CONFIG_HAVE_EBPF_JIT=y
+CONFIG_BPF_EVENTS=y
+CONFIG_BPF_LSM=y
+CONFIG_CGROUP_BPF=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/systemtap.cfg b/meta-agl-core/recipes-kernel/linux/linux/systemtap.cfg
new file mode 100644
index 000000000..4886c27f1
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/systemtap.cfg
@@ -0,0 +1,9 @@
+CONFIG_KPROBES=y
+CONFIG_UPROBES=y
+CONFIG_UPROBE_EVENTS=y
+CONFIG_FTRACE=y
+CONFIG_KPROBE_EVENTS=y
+CONFIG_RELAY=y
+CONFIG_DEBUG_FS=y
+CONFIG_DEBUG_INFO=y
+
diff --git a/meta-agl-core/recipes-kernel/linux/linux/vbox-vmware-sata.cfg b/meta-agl-core/recipes-kernel/linux/linux/vbox-vmware-sata.cfg
new file mode 100644
index 000000000..a37f07d1f
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/vbox-vmware-sata.cfg
@@ -0,0 +1,18 @@
+# enable harddrive driver for vmware/virtualbox
+CONFIG_ATA_PIIX=y
+CONFIG_SATA_AHCI=y
+CONFIG_ATA_SFF=y
+CONFIG_ATA_BMDMA=y
+CONFIG_ATA_GENERIC=y
+CONFIG_ATA_ACPI=y
+
+# needed for VMWare
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_FUSION=y
+CONFIG_FUSION_SPI=y
+CONFIG_DRM_VMWGFX=y
+CONFIG_VMWARE_BALLOON=m
+CONFIG_VMWARE_VMCI=m
+CONFIG_VMWARE_VMCI_VSOCKETS=m
+CONFIG_SND_ENS1371=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/x86-extra-graphic-devices.cfg b/meta-agl-core/recipes-kernel/linux/linux/x86-extra-graphic-devices.cfg
new file mode 100644
index 000000000..9c8e240e9
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/x86-extra-graphic-devices.cfg
@@ -0,0 +1,37 @@
+CONFIG_MWIFIEX_PCIE=m
+CONFIG_MWIFIEX_USB=m
+CONFIG_RSI_91X=m
+CONFIG_RSI_DEBUGFS=y
+CONFIG_RSI_SDIO=m
+CONFIG_RSI_USB=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_RADEON_USERPTR=y
+CONFIG_DRM_NOUVEAU=m
+CONFIG_NOUVEAU_DEBUG=5
+CONFIG_NOUVEAU_DEBUG_DEFAULT=3
+CONFIG_DRM_NOUVEAU_BACKLIGHT=y
+CONFIG_DRM_VGEM=m
+CONFIG_DRM_VMWGFX=y
+CONFIG_DRM_GMA500=m
+CONFIG_DRM_UDL=m
+CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_BACKLIGHT=y
+CONFIG_IRQ_BYPASS_MANAGER=m
+CONFIG_ACPI_WMI=m
+CONFIG_MXM_WMI=m
+CONFIG_SCHED_INFO=y
+CONFIG_HAVE_KVM_IRQCHIP=y
+CONFIG_HAVE_KVM_IRQFD=y
+CONFIG_HAVE_KVM_IRQ_ROUTING=y
+CONFIG_HAVE_KVM_EVENTFD=y
+CONFIG_KVM_MMIO=y
+CONFIG_KVM_ASYNC_PF=y
+CONFIG_HAVE_KVM_MSI=y
+CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
+CONFIG_KVM_VFIO=y
+CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
+CONFIG_KVM_COMPAT=y
+CONFIG_HAVE_KVM_IRQ_BYPASS=y
+CONFIG_KVM=m
+CONFIG_KVM_INTEL=m
+CONFIG_CRC7=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/x86-net-devices.cfg b/meta-agl-core/recipes-kernel/linux/linux/x86-net-devices.cfg
new file mode 100644
index 000000000..6c5b698a9
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/x86-net-devices.cfg
@@ -0,0 +1,3 @@
+CONFIG_IGB=y
+CONFIG_IGB_DCA=y
+CONFIG_R8169=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/x86-security-tpm.cfg b/meta-agl-core/recipes-kernel/linux/linux/x86-security-tpm.cfg
new file mode 100644
index 000000000..b66b1b9b1
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/x86-security-tpm.cfg
@@ -0,0 +1,3 @@
+CONFIG_TCG_TPM=y
+CONFIG_TCG_TIS=y
+CONFIG_TCG_CRB=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/x86-upsquare.cfg b/meta-agl-core/recipes-kernel/linux/linux/x86-upsquare.cfg
new file mode 100644
index 000000000..d2bed63fa
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/x86-upsquare.cfg
@@ -0,0 +1,11 @@
+CONFIG_X86_INTEL_LPSS=y
+CONFIG_EXPERT=y
+CONFIG_SERIAL_8250_DMA=y
+CONFIG_SERIAL_8250_DW=y
+CONFIG_MFD_CORE=y
+CONFIG_MFD_INTEL_LPSS=y
+CONFIG_MFD_INTEL_LPSS_ACPI=y
+CONFIG_MFD_INTEL_LPSS_PCI=y
+CONFIG_IWLWIFI=m
+CONFIG_IWLMVM=m
+CONFIG_IWLDVM=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/x86-usb-devices.cfg b/meta-agl-core/recipes-kernel/linux/linux/x86-usb-devices.cfg
new file mode 100644
index 000000000..d74d4afd8
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/x86-usb-devices.cfg
@@ -0,0 +1,81 @@
+CONFIG_BT_QCA=m
+CONFIG_BT_HCIBTSDIO=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_ATH3K=y
+CONFIG_BT_HCIUART_LL=y
+CONFIG_BT_HCIUART_3WIRE=y
+CONFIG_BT_HCIUART_BCM=y
+CONFIG_BT_HCIUART_QCA=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_BT_MRVL=m
+CONFIG_BT_MRVL_SDIO=m
+CONFIG_BT_ATH3K=m
+CONFIG_WIRELESS_EXT=y
+CONFIG_WEXT_SPY=y
+CONFIG_WEXT_PRIV=y
+CONFIG_CFG80211_WEXT_EXPORT=y
+CONFIG_LIB80211=m
+CONFIG_LIB80211_CRYPT_WEP=m
+CONFIG_LIB80211_CRYPT_CCMP=m
+CONFIG_LIB80211_CRYPT_TKIP=m
+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_VHOST_NET=m
+CONFIG_VHOST_RING=m
+CONFIG_VHOST=m
+CONFIG_MICROCHIP_PHY=m
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8152=m
+CONFIG_USB_LAN78XX=m
+CONFIG_USB_NET_SR9800=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_HSO=m
+CONFIG_USB_IPHETH=m
+CONFIG_USB_ZD1201=m
+CONFIG_USB_NET_RNDIS_WLAN=m
+CONFIG_RTL8180=m
+CONFIG_RTL8187=m
+CONFIG_RTL8187_LEDS=y
+CONFIG_MWL8K=m
+# CONFIG_B43_BUSES_BCMA_AND_SSB is not set
+# CONFIG_B43_BUSES_BCMA is not set
+# CONFIG_B43_BUSES_SSB is not set
+CONFIG_BRCMFMAC_PROTO_MSGBUF=y
+CONFIG_BRCMFMAC_PCIE=y
+CONFIG_IPW2100=m
+CONFIG_IPW2100_MONITOR=y
+CONFIG_IPW2100_DEBUG=y
+CONFIG_IPW2200=m
+CONFIG_IPW2200_MONITOR=y
+CONFIG_IPW2200_RADIOTAP=y
+CONFIG_IPW2200_PROMISCUOUS=y
+CONFIG_IPW2200_QOS=y
+CONFIG_IPW2200_DEBUG=y
+CONFIG_LIBIPW=m
+CONFIG_LIBIPW_DEBUG=y
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+CONFIG_LIBERTAS_SDIO=m
+CONFIG_LIBERTAS_SPI=m
+# CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_LIBERTAS_MESH is not set
+CONFIG_RTL8XXXU=m
+CONFIG_RTL8XXXU_UNTESTED=y
+CONFIG_WLAN_VENDOR_TI=y
+CONFIG_WL1251=m
+# CONFIG_WL1251_SPI is not set
+# CONFIG_WL1251_SDIO is not set
+CONFIG_WL12XX=m
+CONFIG_WL18XX=m
+CONFIG_WLCORE=m
+CONFIG_WLCORE_SPI=m
+CONFIG_WLCORE_SDIO=m
+CONFIG_ZD1211RW=m
+CONFIG_ZD1211RW_DEBUG=y
+CONFIG_MWIFIEX=m
+# CONFIG_MWIFIEX_SDIO is not set
diff --git a/meta-agl-core/recipes-kernel/linux/linux/xen_domu.cfg b/meta-agl-core/recipes-kernel/linux/linux/xen_domu.cfg
new file mode 100644
index 000000000..8bc59eb1e
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/xen_domu.cfg
@@ -0,0 +1,25 @@
+CONFIG_XEN=y
+CONFIG_XEN_BLKDEV_FRONTEND=y
+CONFIG_XEN_SCSI_FRONTEND=y
+CONFIG_XEN_NETDEV_FRONTEND=y
+CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
+CONFIG_HVC_XEN=y
+CONFIG_HVC_XEN_FRONTEND=y
+CONFIG_XEN_FBDEV_FRONTEND=y
+CONFIG_MMC_SDHCI_XENON=y
+CONFIG_XEN_BALLOON=y
+CONFIG_XEN_SCRUB_PAGES_DEFAULT=y
+CONFIG_XEN_DEV_EVTCHN=y
+CONFIG_XEN_BACKEND=y
+CONFIG_XENFS=y
+CONFIG_XEN_COMPAT_XENFS=y
+CONFIG_XEN_SYS_HYPERVISOR=y
+CONFIG_XEN_XENBUS_FRONTEND=y
+CONFIG_XEN_GNTDEV=y
+CONFIG_XEN_GNTDEV_DMABUF=y
+CONFIG_XEN_GRANT_DEV_ALLOC=y
+CONFIG_XEN_GRANT_DMA_ALLOC=y
+CONFIG_SWIOTLB_XEN=y
+CONFIG_XEN_PVCALLS_FRONTEND=y
+CONFIG_XEN_PRIVCMD=y
+CONFIG_XEN_AUTO_XLATE=y \ No newline at end of file
diff --git a/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/files/0001-Added-appid-and-title-support.patch b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/files/0001-Added-appid-and-title-support.patch
new file mode 100644
index 000000000..685f80c7b
--- /dev/null
+++ b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/files/0001-Added-appid-and-title-support.patch
@@ -0,0 +1,169 @@
+From b8bbab864a1367ac47bcc0998b4c07d20020965a Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Thu, 5 Oct 2023 18:23:52 +0300
+Subject: [PATCH] ext/wayland: Add title/appid support
+
+Upstream-Status: Pending
+
+Bug-AGL: SPEC-4870
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ ext/wayland/gstwaylandsink.c | 41 +++++++++++++++++++++++++++++-
+ ext/wayland/gstwaylandsink.h | 2 ++
+ gst-libs/gst/wayland/gstwlwindow.c | 12 ++++++++-
+ gst-libs/gst/wayland/gstwlwindow.h | 3 ++-
+ 4 files changed, 55 insertions(+), 3 deletions(-)
+
+diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c
+index 2f116bf..69f4a00 100644
+--- a/ext/wayland/gstwaylandsink.c
++++ b/ext/wayland/gstwaylandsink.c
+@@ -61,6 +61,8 @@ enum
+ PROP_DISPLAY,
+ PROP_FULLSCREEN,
+ PROP_ROTATE_METHOD,
++ PROP_APP_ID,
++ PROP_TITLE,
+ PROP_LAST
+ };
+
+@@ -177,6 +179,16 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass)
+ GST_TYPE_VIDEO_ORIENTATION_METHOD, GST_VIDEO_ORIENTATION_IDENTITY,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
++ g_object_class_install_property (gobject_class, PROP_APP_ID,
++ g_param_spec_string ("appid", "Top-level application id", "Wayland "
++ "appid, as xdg_shell::set_app_id",
++ NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
++ g_object_class_install_property (gobject_class, PROP_TITLE,
++ g_param_spec_string ("title", "Top-level title", "Wayland "
++ "title, xdg_shell::set_title",
++ NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
+ /**
+ * waylandsink:render-rectangle:
+ *
+@@ -266,6 +278,16 @@ gst_wayland_sink_get_property (GObject * object,
+ g_value_set_enum (value, self->current_rotate_method);
+ GST_OBJECT_UNLOCK (self);
+ break;
++ case PROP_APP_ID:
++ GST_OBJECT_LOCK (self);
++ g_value_set_string (value, self->app_id);
++ GST_OBJECT_UNLOCK (self);
++ break;
++ case PROP_TITLE:
++ GST_OBJECT_LOCK (self);
++ g_value_set_string (value, self->title);
++ GST_OBJECT_UNLOCK (self);
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+@@ -289,6 +311,16 @@ gst_wayland_sink_set_property (GObject * object,
+ gst_wayland_sink_set_fullscreen (self, g_value_get_boolean (value));
+ GST_OBJECT_UNLOCK (self);
+ break;
++ case PROP_APP_ID:
++ GST_OBJECT_LOCK (self);
++ self->app_id = g_value_dup_string (value);
++ GST_OBJECT_UNLOCK (self);
++ break;
++ case PROP_TITLE:
++ GST_OBJECT_LOCK (self);
++ self->title = g_value_dup_string (value);
++ GST_OBJECT_UNLOCK (self);
++ break;
+ case PROP_ROTATE_METHOD:
+ gst_wayland_sink_set_rotate_method (self, g_value_get_enum (value),
+ FALSE);
+@@ -310,12 +342,18 @@ gst_wayland_sink_finalize (GObject * object)
+ gst_buffer_unref (self->last_buffer);
+ if (self->display)
+ g_object_unref (self->display);
++ if (self->title)
++ g_object_unref (self->title);
++ if (self->app_id)
++ g_object_unref (self->app_id);
+ if (self->window)
+ g_object_unref (self->window);
+ if (self->pool)
+ gst_object_unref (self->pool);
+
+ g_free (self->display_name);
++ g_free (self->title);
++ g_free (self->app_id);
+
+ g_mutex_clear (&self->display_lock);
+ g_mutex_clear (&self->render_lock);
+@@ -761,7 +799,8 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer)
+ if (!self->window) {
+ /* if we were not provided a window, create one ourselves */
+ self->window = gst_wl_window_new_toplevel (self->display,
+- &self->video_info, self->fullscreen, &self->render_lock);
++ &self->video_info, self->fullscreen, &self->app_id, &self->title,
++ &self->render_lock);
+ g_signal_connect_object (self->window, "closed",
+ G_CALLBACK (on_window_closed), self, 0);
+ gst_wl_window_set_rotate_method (self->window,
+diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h
+index 3243d8c..6aee19d 100644
+--- a/ext/wayland/gstwaylandsink.h
++++ b/ext/wayland/gstwaylandsink.h
+@@ -58,6 +58,8 @@ struct _GstWaylandSink
+ gboolean fullscreen;
+
+ gchar *display_name;
++ gchar *app_id;
++ gchar *title;
+
+ gboolean redraw_pending;
+ GMutex render_lock;
+diff --git a/gst-libs/gst/wayland/gstwlwindow.c b/gst-libs/gst/wayland/gstwlwindow.c
+index 6004993..de0a81e 100644
+--- a/gst-libs/gst/wayland/gstwlwindow.c
++++ b/gst-libs/gst/wayland/gstwlwindow.c
+@@ -270,7 +270,7 @@ gst_wl_window_ensure_fullscreen (GstWlWindow * self, gboolean fullscreen)
+
+ GstWlWindow *
+ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info,
+- gboolean fullscreen, GMutex * render_lock)
++ gboolean fullscreen, gchar *app_id, gchar *title, GMutex * render_lock)
+ {
+ GstWlWindow *self;
+ GstWlWindowPrivate *priv;
+@@ -307,6 +307,16 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info,
+
+ gst_wl_window_ensure_fullscreen (self, fullscreen);
+
++ if (app_id)
++ xdg_toplevel_set_app_id (priv->xdg_toplevel, app_id);
++ else
++ xdg_toplevel_set_app_id (priv->xdg_toplevel, "ext.wayland.waylandsink");
++ if (title)
++ xdg_toplevel_set_title (priv->xdg_toplevel, title);
++ else
++ xdg_toplevel_set_title (priv->xdg_toplevel, "ext.wayland.waylandsink");
++
++
+ /* Finally, commit the xdg_surface state as toplevel */
+ priv->configured = FALSE;
+ wl_surface_commit (priv->area_surface);
+diff --git a/gst-libs/gst/wayland/gstwlwindow.h b/gst-libs/gst/wayland/gstwlwindow.h
+index 06c4001..e102052 100644
+--- a/gst-libs/gst/wayland/gstwlwindow.h
++++ b/gst-libs/gst/wayland/gstwlwindow.h
+@@ -39,7 +39,8 @@ void gst_wl_window_ensure_fullscreen (GstWlWindow * self,
+
+ GST_WL_API
+ GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
+- const GstVideoInfo * info, gboolean fullscreen, GMutex * render_lock);
++ const GstVideoInfo * info, gboolean fullscreen, gchar * app_id,
++ gchar *title, GMutex * render_lock);
+
+ GST_WL_API
+ GstWlWindow *gst_wl_window_new_in_surface (GstWlDisplay * display,
+--
+2.35.1
+
diff --git a/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_%.bbappend b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_%.bbappend
new file mode 100644
index 000000000..96bbdc34b
--- /dev/null
+++ b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'gstreamer1.0-plugins-bad_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_aglcore.inc b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_aglcore.inc
new file mode 100644
index 000000000..97a0c1688
--- /dev/null
+++ b/meta-agl-core/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_aglcore.inc
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+AGL_PATCHES = "file://0001-Added-appid-and-title-support.patch"
+
+# Above patch fails to apply against NXP's forked version, disable
+# for now
+AGL_PATCHES:use-nxp-bsp = ""
+
+SRC_URI:append = " ${AGL_PATCHES}"
diff --git a/meta-agl-core/recipes-platform/images/agl-image-boot.bb b/meta-agl-core/recipes-platform/images/agl-image-boot.bb
new file mode 100644
index 000000000..dde6a18db
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-boot.bb
@@ -0,0 +1,5 @@
+SUMMARY = "A small image just capable of allowing a device to boot."
+LICENSE = "MIT"
+
+inherit agl-core-image
+
diff --git a/meta-agl-core/recipes-platform/images/agl-image-compositor.bb b/meta-agl-core/recipes-platform/images/agl-image-compositor.bb
new file mode 100644
index 000000000..b78536be8
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-compositor.bb
@@ -0,0 +1,15 @@
+SUMMARY = "A very basic Wayland image with agl-compositor"
+LICENSE = "MIT"
+
+require agl-image-minimal.bb
+
+inherit features_check
+
+REQUIRED_DISTRO_FEATURES = "wayland"
+
+SYSTEMD_DEFAULT_TARGET = "graphical.target"
+
+IMAGE_INSTALL += " \
+ packagegroup-agl-graphical-compositor \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'weston-examples', '', d)} \
+"
diff --git a/meta-agl-core/recipes-platform/images/agl-image-core-autobuilder.bb b/meta-agl-core/recipes-platform/images/agl-image-core-autobuilder.bb
new file mode 100644
index 000000000..eec1cf54c
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-core-autobuilder.bb
@@ -0,0 +1,15 @@
+SUMMARY = "A very basic Wayland image with a terminal"
+LICENSE = "MIT"
+
+require agl-image-weston.bb
+
+IMAGE_FEATURES += "splash"
+
+IMAGE_INSTALL += " \
+ busybox \
+ gdb \
+ gperf \
+ weston-examples \
+ curl \
+ ptest-runner \
+ "
diff --git a/meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.bb b/meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.bb
new file mode 100644
index 000000000..6aa308273
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.bb
@@ -0,0 +1,9 @@
+require agl-image-minimal.bb
+
+SUMMARY = "Cross SDK of minimal AGL Distribution for core profile"
+DESCRIPTION = "SDK image for AGL core distribution. \
+It includes the full toolchain, plus developement headers and libraries \
+to form a standalone cross SDK."
+LICENSE = "MIT"
+
+inherit agl-crosssdk
diff --git a/meta-agl-core/recipes-platform/images/agl-image-minimal.bb b/meta-agl-core/recipes-platform/images/agl-image-minimal.bb
new file mode 100644
index 000000000..4e54e93ed
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-minimal.bb
@@ -0,0 +1,9 @@
+SUMMARY = "An AGL small image just capable of allowing a device to boot."
+LICENSE = "MIT"
+
+inherit agl-core-image
+
+IMAGE_INSTALL = "packagegroup-agl-image-minimal ${CORE_IMAGE_EXTRA_INSTALL}"
+
+IMAGE_ROOTFS_SIZE ?= "8192"
+IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "", d)}"
diff --git a/meta-agl-core/recipes-platform/images/agl-image-weston.bb b/meta-agl-core/recipes-platform/images/agl-image-weston.bb
new file mode 100644
index 000000000..d902020cc
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-weston.bb
@@ -0,0 +1,15 @@
+SUMMARY = "A very basic Wayland image with a terminal"
+LICENSE = "MIT"
+
+require agl-image-minimal.bb
+
+inherit features_check
+
+REQUIRED_DISTRO_FEATURES = "wayland"
+
+SYSTEMD_DEFAULT_TARGET = "graphical.target"
+
+IMAGE_INSTALL += " \
+ packagegroup-agl-graphical-weston \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'weston-examples', '', d)} \
+"
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb
new file mode 100644
index 000000000..28a734548
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2007 OpenedHand Ltd.
+#
+# derived from oe-core: meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+
+SUMMARY = "Minimal boot requirements"
+DESCRIPTION = "The minimal set of packages required to boot the system"
+LICENSE = "MIT"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit packagegroup
+
+# Disto can override
+VIRTUAL-RUNTIME_rngd ?= "rng-tools"
+
+RDEPENDS:${PN} = "\
+ packagegroup-core-boot \
+ packagegroup-machine-base \
+ ${VIRTUAL-RUNTIME_rngd} \
+"
+
+RRECOMMENDS:${PN} = "\
+ tzdata \
+"
+
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb
new file mode 100644
index 000000000..aeee0f8d3
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "The minimal set of packages for Connectivity Subsystem"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-core-connectivity \
+ "
+
+ALLOW_EMPTY:${PN} = "1"
+
+PKGGROUP_ZEROCONF = "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'packagegroup-base-zeroconf', '', d)}"
+
+RDEPENDS:${PN} += "\
+ ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','connman','connman connman-client connman-conf \
+ connman-wait-online connman-tests connman-tools connman-ncurses' ,'',d)} \
+ ${@bb.utils.contains('AGL_FEATURES', 'agl-devel', '${PKGGROUP_ZEROCONF}', '', d)} \
+ systemd-conf-canbus \
+ "
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-devel.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-devel.bb
new file mode 100644
index 000000000..887604ec3
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-devel.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Provides a set of tools for development for AGL DISTRO"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+RDEPENDS:${PN} = "\
+ strace \
+ ldd \
+ less \
+ vim \
+ lsof \
+ gdb \
+ screen \
+ usbutils \
+ rsync \
+ pstree \
+ procps \
+ libxslt-bin \
+ pciutils \
+ openssh-sftp-server \
+ zstd \
+"
+
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-compositor.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-compositor.bb
new file mode 100644
index 000000000..b2c7d8ec8
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-compositor.bb
@@ -0,0 +1,9 @@
+DESCRIPTION = "The minimal set of packages required for the AGL compositor"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+RDEPENDS:${PN} += " \
+ agl-compositor \
+ agl-compositor-init \
+"
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb
new file mode 100644
index 000000000..96f09d5ab
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb
@@ -0,0 +1,9 @@
+DESCRIPTION = "The minimal set of packages required for the Weston compositor"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+RDEPENDS:${PN} += " \
+ weston \
+ weston-init \
+"
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb
new file mode 100644
index 000000000..a60cbab21
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "The minimal set of packages required by AGL"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-image-minimal \
+ profile-agl-minimal \
+ "
+
+ALLOW_EMPTY:${PN} = "1"
+
+RDEPENDS:${PN} += "\
+ packagegroup-agl-core-boot \
+ packagegroup-agl-core-connectivity \
+ "
+
+RDEPENDS:profile-agl-minimal = "${PN}"
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb
new file mode 100644
index 000000000..b92e760ae
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb
@@ -0,0 +1,17 @@
+SUMMARY = "The middleware for AGL IVI profile"
+DESCRIPTION = "The base set of packages required for a AGL IVI Distribution"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-profile-graphical \
+ profile-graphical \
+"
+
+RDEPENDS:${PN} += "\
+ packagegroup-agl-image-minimal \
+ packagegroup-agl-graphical-compositor \
+"
+
+RDEPENDS:profile-graphical = "${PN}"
diff --git a/meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch b/meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch
new file mode 100644
index 000000000..11c6fd27b
--- /dev/null
+++ b/meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch
@@ -0,0 +1,152 @@
+From bdcbb0e78bbffe45719d0a27954544120f37442a Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Mon, 15 Oct 2018 18:30:42 -0700
+Subject: [PATCH] Initial LAVA support
+
+Linaro Automated Validation Architecture (LAVA) launches a test suite
+on the target but thereafter only observes stdout.
+
+LAVA knows that a test case has started or ended based on signals
+emitted to stdout:
+(setup)
+<LAVA_SIGNAL_STARTTC test_case_name>
+(teardown)
+<LAVA_SIGNAL_ENDTC test_case_name>
+<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=test_case_name RESULT=pass|fail \
+ [[ MEASUREMENT=numeric_measurement ][ UNITS=units_string]]>
+
+It is valid to have a measurement without units, but not units without a measurement.
+
+Upstream-Status: Pending
+
+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]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ flags.h | 10 ++++++++++
+ main.c | 9 ++++++++-
+ utils.c | 17 ++++++++++++++++-
+ utils.h | 2 +-
+ 4 files changed, 35 insertions(+), 3 deletions(-)
+ create mode 100644 flags.h
+
+diff --git a/flags.h b/flags.h
+new file mode 100644
+index 0000000..0dac223
+--- /dev/null
++++ b/flags.h
+@@ -0,0 +1,10 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++
++/* Flag bit definitions */
++
++#ifndef __FLAGS_H__
++#define __FLAGS_H__
++
++#define LAVA_SIGNAL_ENABLE (0x0001)
++
++#endif /* __FLAGS_H__ */
+diff --git a/main.c b/main.c
+index 31e4dd5..f12d6d6 100644
+--- a/main.c
++++ b/main.c
+@@ -38,6 +38,7 @@
+ #endif
+
+ #include "utils.h"
++#include "flags.h"
+
+ #ifndef DEFAULT_DIRECTORY
+ #define DEFAULT_DIRECTORY "/usr/lib"
+@@ -130,8 +131,9 @@ main(int argc, char *argv[])
+ opts.timeout = DEFAULT_TIMEOUT;
+ opts.ptests = NULL;
+ opts.xml_filename = NULL;
++ opts.flags = 0;
+
+- while ((opt = getopt(argc, argv, "d:e:lt:x:h")) != -1) {
++ while ((opt = getopt(argc, argv, "d:e:lt:x:Lh")) != -1) {
+ switch (opt) {
+ case 'd':
+ free(opts.dirs[0]);
+@@ -156,6 +158,11 @@ main(int argc, char *argv[])
+ opts.xml_filename = strdup(optarg);
+ CHECK_ALLOCATION(opts.xml_filename, 1, 1);
+ break;
++ case 'L':
++ // set LAVA signal mode
++ opts.flags |= LAVA_SIGNAL_ENABLE;
++ fprintf(stdout, "LAVA_SIGNAL_ENABLE == %d\n", opts.flags);
++ break;
+ default:
+ print_usage(stdout, argv[0]);
+ exit(1);
+diff --git a/utils.c b/utils.c
+index 59b8b77..30423c4 100644
+--- a/utils.c
++++ b/utils.c
+@@ -49,6 +49,7 @@
+
+ #include "ptest_list.h"
+ #include "utils.h"
++#include "flags.h"
+
+ #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,
+ }
+
+ char *ptest_dir = strdup(p->run_ptest);
++ char *ptest = strdup(p->ptest);
+ if (ptest_dir == NULL) {
+ 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));
+ }
+
+- time_t start_time= time(NULL);
++ if (opts.flags & LAVA_SIGNAL_ENABLE) {
++ fprintf(stdout, "<LAVA_SIGNAL_STARTTC %s>\n", ptest);
++ }
++ time_t start_time = time(NULL);
+ 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,
+
+ fprintf(fp, "END: %s\n", ptest_dir);
+ fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, end_time));
++ if (opts.flags & LAVA_SIGNAL_ENABLE) {
++ char result[5]; // pass\0, fail\0, skip\0
++
++ if (status)
++ sprintf(result, "fail");
++ else
++ sprintf(result, "pass");
++ fprintf(stdout, "<LAVA_SIGNAL_ENDTC %s>\n", ptest);
++ fprintf(stdout, "<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=%s RESULT=%s>\n", ptest, result);
++ }
+ }
+ free(ptest_dir);
+ do_close(&pipefd_stdout[PIPE_READ]);
+diff --git a/utils.h b/utils.h
+index 04fc666..ad702d8 100644
+--- a/utils.h
++++ b/utils.h
+@@ -42,9 +42,9 @@ struct ptest_options {
+ unsigned int timeout;
+ char **ptests;
+ char *xml_filename;
++ unsigned int flags;
+ };
+
+-
+ extern void check_allocation1(void *, size_t, char *, int, int);
+ extern struct ptest_list *get_available_ptests(const char *);
+ extern int print_ptests(struct ptest_list *, FILE *);
+--
+2.37.3
+
diff --git a/meta-agl-core/recipes-support/ptest-runner/ptest-runner_2.%.bbappend b/meta-agl-core/recipes-support/ptest-runner/ptest-runner_2.%.bbappend
new file mode 100644
index 000000000..5033ed7f6
--- /dev/null
+++ b/meta-agl-core/recipes-support/ptest-runner/ptest-runner_2.%.bbappend
@@ -0,0 +1,2 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_agl.inc', '', d)}
+
diff --git a/meta-agl-core/recipes-support/ptest-runner/ptest-runner_agl.inc b/meta-agl-core/recipes-support/ptest-runner/ptest-runner_agl.inc
new file mode 100644
index 000000000..593ad13a6
--- /dev/null
+++ b/meta-agl-core/recipes-support/ptest-runner/ptest-runner_agl.inc
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/ptest-runner:"
+SRC_URI += "file://0007-WIP-Initial-LAVA-support.patch"
+
diff --git a/meta-agl-core/scripts/oe-depends-dot b/meta-agl-core/scripts/oe-depends-dot
new file mode 100755
index 000000000..5cec23bf0
--- /dev/null
+++ b/meta-agl-core/scripts/oe-depends-dot
@@ -0,0 +1,121 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2018 Wind River Systems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+import os
+import sys
+import argparse
+import logging
+import re
+
+class Dot(object):
+ def __init__(self):
+ parser = argparse.ArgumentParser(
+ description="Analyse recipe-depends.dot generated by bitbake -g",
+ epilog="Use %(prog)s --help to get help")
+ parser.add_argument("dotfile",
+ help = "Specify the dotfile", nargs = 1, action='store', default='')
+ parser.add_argument("-k", "--key",
+ help = "Specify the key, e.g., recipe name",
+ action="store", default='')
+ parser.add_argument("-d", "--depends",
+ help = "Print the key's dependencies",
+ action="store_true", default=False)
+ parser.add_argument("-w", "--why",
+ help = "Print why the key is built",
+ action="store_true", default=False)
+ parser.add_argument("-r", "--remove",
+ help = "Remove duplicated dependencies to reduce the size of the dot files."
+ " For example, A->B, B->C, A->C, then A->C can be removed.",
+ action="store_true", default=False)
+
+ self.args = parser.parse_args()
+
+ if len(sys.argv) != 3 and len(sys.argv) < 5:
+ print('ERROR: Not enough args, see --help for usage')
+
+ def main(self):
+ #print(self.args.dotfile[0])
+ # The format is {key: depends}
+ depends = {}
+ with open(self.args.dotfile[0], 'r') as f:
+ for line in f.readlines():
+ if ' -> ' not in line:
+ continue
+ line_no_quotes = line.replace('"', '')
+ m = re.match("(.*) -> (.*)", line_no_quotes)
+ if not m:
+ print('WARNING: Found unexpected line: %s' % line)
+ continue
+ key = m.group(1)
+ if key == "meta-world-pkgdata":
+ continue
+ dep = m.group(2)
+ if key in depends:
+ if not key in depends[key]:
+ depends[key].add(dep)
+ else:
+ print('WARNING: Fonud duplicated line: %s' % line)
+ else:
+ depends[key] = set()
+ depends[key].add(dep)
+
+ if self.args.remove:
+ reduced_depends = {}
+ for k, deps in depends.items():
+ child_deps = set()
+ added = set()
+ # Both direct and indirect depends are already in the dict, so
+ # we don't have to do this recursively.
+ for dep in deps:
+ if dep in depends:
+ child_deps |= depends[dep]
+
+ reduced_depends[k] = deps - child_deps
+ outfile= '%s-reduced%s' % (self.args.dotfile[0][:-4], self.args.dotfile[0][-4:])
+ with open(outfile, 'w') as f:
+ print('Saving reduced dot file to %s' % outfile)
+ f.write('digraph depends {\n')
+ for k, v in reduced_depends.items():
+ for dep in v:
+ f.write('"%s" -> "%s"\n' % (k, dep))
+ f.write('}\n')
+ sys.exit(0)
+
+ if self.args.key not in depends:
+ print("ERROR: Can't find key %s in %s" % (self.args.key, self.args.dotfile[0]))
+ sys.exit(1)
+
+ if self.args.depends:
+ if self.args.key in depends:
+ print('Depends: %s' % ' '.join(depends[self.args.key]))
+
+ reverse_deps = []
+ if self.args.why:
+ for k, v in depends.items():
+ if self.args.key in v and not k in reverse_deps:
+ reverse_deps.append(k)
+ print('Because: %s' % ' '.join(reverse_deps))
+
+if __name__ == "__main__":
+ try:
+ dot = Dot()
+ ret = dot.main()
+ except Exception as esc:
+ ret = 1
+ import traceback
+ traceback.print_exc()
+ sys.exit(ret)
diff --git a/meta-agl-core/scripts/run-yocto-check-layer.sh b/meta-agl-core/scripts/run-yocto-check-layer.sh
new file mode 100755
index 000000000..cd9364682
--- /dev/null
+++ b/meta-agl-core/scripts/run-yocto-check-layer.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+#set -x
+
+SCRIPTPATH="$( cd $(dirname $0) >/dev/null 2>&1 ; pwd -P )"
+echo $SCRIPTPATH
+AGLROOT="$SCRIPTPATH/../../.."
+POKYDIR="$AGLROOT/external/poky"
+TMPROOT=`mktemp -d`
+
+rm -rf ${TMPROOT}/testbuild-ycl || true
+mkdir -p ${TMPROOT}/testbuild-ycl
+cd ${TMPROOT}/testbuild-ycl
+
+source $POKYDIR/oe-init-build-env .
+
+cat << EOF >> conf/local.conf
+# just define defaults
+AGL_FEATURES ?= ""
+AGL_EXTRA_IMAGE_FSTYPES ?= ""
+
+# important settings imported from poky-agl.conf
+# we cannot import the distro config right away
+# as the initial values are poky only till the layer
+# is added in
+# no polkit !
+AGL_DEFAULT_DISTRO_FEATURES = "usrmerge largefile opengl wayland pam bluetooth bluez5 3g"
+DISTRO_FEATURES:append = " systemd wayland pam \${AGL_DEFAULT_DISTRO_FEATURES}"
+DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " sysvinit"
+VIRTUAL-RUNTIME_init_manager = "systemd"
+
+EOF
+
+yocto-check-layer --no-auto-dependency \
+ -- \
+ $AGLROOT/meta-agl/meta-agl-core
+
+
+[ $? = 0 ] && rm -rf ${TMPROOT}/testbuild-ycl
+
+exit 0