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.md21
-rw-r--r--meta-agl-core/classes/cloc.bbclass33
-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.inc13
-rw-r--r--meta-agl-core/conf/distro/include/arc-tune.inc3
-rw-r--r--meta-agl-core/conf/distro/include/arm-tune.inc23
-rw-r--r--meta-agl-core/conf/distro/include/riscv64-tune.inc7
-rw-r--r--meta-agl-core/conf/distro/include/x86_64-tune.inc55
-rw-r--r--meta-agl-core/conf/distro/poky-agl.conf208
-rw-r--r--meta-agl-core/conf/include/agl-devel.inc20
-rw-r--r--meta-agl-core/conf/include/agl-gplv2.inc8
-rw-r--r--meta-agl-core/conf/include/base-agl.inc22
-rw-r--r--meta-agl-core/conf/layer.conf17
-rw-r--r--meta-agl-core/conf/local.conf.sample277
-rw-r--r--meta-agl-core/files/group92
-rw-r--r--meta-agl-core/files/passwd62
-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_git.bb27
-rw-r--r--meta-agl-core/recipes-connectivity/connman/connman_%.bbappend1
-rw-r--r--meta-agl-core/recipes-connectivity/connman/connman_aglcore.inc20
-rw-r--r--meta-agl-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch10
-rw-r--r--meta-agl-core/recipes-connectivity/connman/files/main.conf3
-rw-r--r--meta-agl-core/recipes-core/systemd/.appends.core0
-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/0001-fix-udevd-seclabel-parsing.patch34
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd/0002-network-add-CAN-Termination-tristate-option.patch107
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd/canbus-can.network6
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd/e2fsck.conf3
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd/wired.network5
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd_%.bbappend1
-rw-r--r--meta-agl-core/recipes-core/systemd/systemd_aglcore.inc34
-rw-r--r--meta-agl-core/recipes-devtools/cmake/cmake_%.bbappend1
-rw-r--r--meta-agl-core/recipes-devtools/cmake/cmake_aglcore.inc9
-rw-r--r--meta-agl-core/recipes-devtools/cmake/files/environment.d-cmake-agl.sh1
-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-extended/gperf/.appends.core0
-rw-r--r--meta-agl-core/recipes-extended/gperf/gperf_%.bbappend1
-rw-r--r--meta-agl-core/recipes-extended/gperf/gperf_aglcore.inc1
-rw-r--r--meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf34
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb28
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham-transmitter_git.bb34
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch51
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch55
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch70
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend7
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham_git.bb16
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb41
-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.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/remote-output.cfg5
-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.cfg18
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-init.bbappend1
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch30
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch106
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch37
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend1
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc11
-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/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch40
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch109
-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.inc14
-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.inc132
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/btusb.cfg37
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/can-bus.cfg42
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/drm.cfg2
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/fanotify.cfg3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/hid.cfg1
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/i2c-led.cfg3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/iiodevice.cfg26
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/joystick.cfg9
-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/netfilter.cfg1
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/nfc.cfg34
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/overlayfs.cfg7
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/procevent.cfg2
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/ramdisk.cfg2
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/rtc.cfg7
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/rtl_sdr.cfg4
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/scheddebug.cfg1
-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/systemtap.cfg9
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/uinput.cfg3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/usb.cfg8
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/usbaudio.cfg2
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/usbmodem.cfg7
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/uvc.cfg4
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/vbox-vmware-sata.cfg19
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/wifi.cfg6
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/x86-extra-graphic-devices.cfg40
-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.cfg82
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/xen_domu.cfg25
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-boot.bb9
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-boot.inc10
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-core-autobuilder.bb18
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.bb18
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.inc24
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-minimal.bb9
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-minimal.inc10
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-weston.bb9
-rw-r--r--meta-agl-core/recipes-platform/images/agl-image-weston.inc7
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb50
-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.bb31
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-os-commonlibs.bb14
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-security.bb14
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bb16
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb17
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-boot.bb18
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb24
-rw-r--r--meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb22
-rw-r--r--meta-agl-core/recipes-support/libsoup/libsoup-2.4_%.bbappend1
-rw-r--r--meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch140
-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-feature-enabled.sh50
-rwxr-xr-xmeta-agl-core/scripts/run-yocto-check-layer.sh48
139 files changed, 3621 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..c7fc029e7
--- /dev/null
+++ b/meta-agl-core/README-AGL.md
@@ -0,0 +1,21 @@
+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
+ ```
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/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..553bb5a64
--- /dev/null
+++ b/meta-agl-core/conf/distro/include/aarch64-tune.inc
@@ -0,0 +1,13 @@
+# 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
+
+DEFAULTTUNE_poky-agl := "aarch64"
+# 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..fa68e05a7
--- /dev/null
+++ b/meta-agl-core/conf/distro/include/arm-tune.inc
@@ -0,0 +1,23 @@
+# 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)
+AGLDEFAULTTUNE = "armv7vethf-neon-vfpv4"
+
+# for cortex-a8, cortex-a9, cortex-a7 (=rpi 2/3)
+AGLDEFAULTTUNE := "${@bb.utils.contains('DISTRO_FEATURES', 'agl-medium-arm-compiler', 'armv7athf-neon', '${AGLDEFAULTTUNE}', d)}"
+
+# for armv6 (=rpi0/1)
+AGLDEFAULTTUNE := "${@bb.utils.contains('DISTRO_FEATURES', 'agl-low-arm-compiler', 'arm1176jzfshf', '${AGLDEFAULTTUNE}', d)}"
+DEFAULTTUNE := "${AGLDEFAULTTUNE}"
+
+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..f8118dec3
--- /dev/null
+++ b/meta-agl-core/conf/distro/include/riscv64-tune.inc
@@ -0,0 +1,7 @@
+# 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
+
+DEFAULTTUNE = "riscv64"
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..9f2bdc867
--- /dev/null
+++ b/meta-agl-core/conf/distro/include/x86_64-tune.inc
@@ -0,0 +1,55 @@
+# 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
+DEFAULTTUNE = "corei7-64"
+
+# 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 -show-cursor -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..63a1960af
--- /dev/null
+++ b/meta-agl-core/conf/distro/poky-agl.conf
@@ -0,0 +1,208 @@
+require conf/distro/poky.conf
+
+# AGL specific derivations
+DISTRO = "poky-agl"
+DISTRO_NAME = "Automotive Grade Linux"
+
+
+# Release flags
+DISTRO_CODENAME = "koi"
+AGL_BRANCH = "master"
+AGLVERSION = "10.90.0"
+# switch devel/release
+AGLRELEASETYPE ?= "agldevelopment"
+#AGLRELEASETYPE ?= "aglrelease"
+OVERRIDES .= ":${AGLRELEASETYPE}"
+#
+
+#for development
+DISTRO_VERSION_agldevelopment := "${AGLVERSION}+snapshot-${DATE}"
+AGL_APP_REVISION_agldevelopment = "${AUTOREV}"
+AGL_DEFAULT_REVISION_agldevelopment = "${AUTOREV}"
+
+#for release
+DISTRO_VERSION_aglrelease := "${AGLVERSION}"
+DISTRO_BRANCH_VERSION_TAG = "${DISTRO_CODENAME}/${@'${DISTRO_VERSION}'.replace('+snapshot-${DATE}','')}"
+AGL_APP_REVISION_aglrelease := "refs/tags/${DISTRO_BRANCH_VERSION_TAG}"
+AGL_DEFAULT_REVISION_aglrelease := "refs/tags/${DISTRO_BRANCH_VERSION_TAG}"
+
+# reproducible builds:
+# enable the flag
+BUILD_REPRODUCIBLE_BINARIES = "1"
+# Set the desired timestamps
+export SOURCE_DATE_EPOCH = "1593400000"
+REPRODUCIBLE_TIMESTAMP_ROOTFS = "1593400000"
+# inherit the class
+INHERIT += "reproducible_build"
+
+
+# SDK
+SDK_VENDOR = "-aglsdk"
+SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
+
+# SDKPATH 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.
+SDKPATH = "/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 = "largefile systemd opengl wayland pam bluetooth bluez5 3g polkit"
+POKY_DEFAULT_DISTRO_FEATURES := "${AGL_DEFAULT_DISTRO_FEATURES}"
+OVERRIDES .= ":${DISTRO_CODENAME}"
+
+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 ?= ""
+
+PREFERRED_PROVIDER_udev ?= "systemd"
+PREFERRED_PROVIDER_udev-utils ?= "systemd"
+
+VIRTUAL-RUNTIME_init_manager = "systemd"
+VIRTUAL-RUNTIME_initscripts = ""
+
+# network manager to use (possible values: systemd, connman)
+VIRTUAL-RUNTIME_net_manager = "connman"
+
+DISTRO_FEATURES_APPEND = " "
+DISTRO_FEATURES_remove = "x11"
+DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit pulseaudio"
+
+# Prefer GStreamer 1.16.x by default
+PREFERRED_VERSION_gstreamer1.0 ?= "1.16.%"
+PREFERRED_VERSION_gstreamer1.0-plugins-bad ?= "1.16.%"
+PREFERRED_VERSION_gstreamer1.0-plugins-base ?= "1.16.%"
+PREFERRED_VERSION_gstreamer1.0-plugins-good ?= "1.16.%"
+PREFERRED_VERSION_gstreamer1.0-plugins-ugly ?= "1.16.%"
+PREFERRED_VERSION_gstreamer1.0-libav ?= "1.16.%"
+PREFERRED_VERSION_gstreamer1.0-omx ?= "1.16.%"
+
+# Prefer libjpeg-turbo
+PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"
+
+# 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}"
+
+#Redefined USER_CLASSES
+#Disable prelink. It is unmaintained and likely will go away.
+#default: USER_CLASSES ?= "buildstats image-mklibs image-prelink"
+USER_CLASSES = "buildstats image-mklibs"
+
+# 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 = "-soundhw hda"
+
+# 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('DISTRO_FEATURES', 'AGLCI', 'ext4.xz', 'ext4', d)}"
+AGL_DEFAULT_IMAGE_FSTYPES_append_netboot = " ${@bb.utils.contains('DISTRO_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}"
+#
+# THE FUTURE is 'wic'
+# IMAGE_FSTYPES_append = " wic"
+
+# enable the packagemanagement
+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}"
+
+# Complementary package definitions for agl-test-wgt and agl-devel-wgt
+# image features
+COMPLEMENTARY_GLOB[agl-test-wgt] = '*-test'
+COMPLEMENTARY_GLOB[agl-devel-wgt] = '*-coverage *-debug'
+
+# Fix for rpm metadata clash between nativesdk-cmake and nativesdk-qtbase-tools
+# (revalidate after 2017-10-15, 2018-06-12: still required)
+DIRFILES_pn-nativesdk-cmake = "1"
+
+# For https://jira.automotivelinux.org/browse/SPEC-1629 :
+# We exclude the conflicting vars from the sstate task hash.
+# This needs to be verified.
+do_package_write_rpm[vardepsexclude] += "ARCHIVER_TOPDIR PF"
+
+# Set preferred provider to new navi application
+PREFERRED_RPROVIDER_virtual/navigation ?= "ondemandnavi"
+
+# Set preferred provider for low-can device mapping configuration
+PREFERRED_RPROVIDER_virtual/low-can-dev-mapping ?= "dev-mapping"
+
+# Mask upstream meta-security bbappend that interferes with non-linux-yocto
+# kernels due to the bug of having two wildcards, which bitbake does not
+# support. Not having it is not an issue, since there is also explicit
+# enabling of required security features done by meta-agl/meta-security.
+BBMASK += "meta-security/recipes-kernel/linux/linux-%_5.%.bbappend"
+
+# Workaround for https://jira.automotivelinux.org/browse/SPEC-3621
+# TLDR: do_image_wic will modify the target's /etc/fstab while
+# do_image_tar and do_image_ext4 can run in parallel
+# This needs to be fixed upstream:
+# See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13994
+# For convenience restricted to ext4 and tar image types.
+AGL_FORBID_FSTAB_UPDATE ?= "${@bb.utils.contains_any('IMAGE_FSTYPES', 'ext4 ext4.xz tar tar.gz tar.bz2 tar.xz', '--no-fstab-update', '', d)}"
+WIC_CREATE_EXTRA_ARGS_append = " ${AGL_FORBID_FSTAB_UPDATE}"
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..6ecd6a075
--- /dev/null
+++ b/meta-agl-core/conf/include/agl-devel.inc
@@ -0,0 +1,20 @@
+IMAGE_FEATURES =+ "debug-tweaks tools-debug tools-profile"
+
+IMAGE_INSTALL_append = " \
+ packagegroup-agl-core-devel \
+"
+
+IMAGE_INSTALL_append = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic.vmdk wic.vmdk.xz', ' open-vm-tools vboxguestdrivers', '', d)}"
+
+# Install libdrm-test, including modetest, to images with GUI
+IMAGE_INSTALL_append = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' libdrm-tests', '', d)}"
+
+IMAGE_FEATURES_append = " agl-devel-wgt"
+
+# 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 .= ":agl-devel"
+DISTRO_FEATURES_append = " agl-devel"
diff --git a/meta-agl-core/conf/include/agl-gplv2.inc b/meta-agl-core/conf/include/agl-gplv2.inc
new file mode 100644
index 000000000..fc9a4072b
--- /dev/null
+++ b/meta-agl-core/conf/include/agl-gplv2.inc
@@ -0,0 +1,8 @@
+# GPLv3 Compliance
+PREFERRED_VERSION_bash = "3.2.%"
+PREFERRED_VERSION_gawk = "3.1.%"
+PREFERRED_VERSION_gdbm = "1.8.%"
+PREFERRED_VERSION_gnupg = "1.4.7"
+PREFERRED_VERSION_gnutls = "3.3.%"
+PREFERRED_VERSION_mc = "4.7.5.%"
+PREFERRED_VERSION_readline = "5.2"
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..5ca723a10
--- /dev/null
+++ b/meta-agl-core/conf/include/base-agl.inc
@@ -0,0 +1,22 @@
+# AGL includes all kernel modules here for ease-of-use during development.
+# Comment this out to be able to select the kernel modules yourself.
+IMAGE_INSTALL_append = " kernel-modules"
+
+# Likewise as we included all kernel modules by default in the filesystem,
+# we do not need a separate tarball stored.
+# 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..2218e3d49
--- /dev/null
+++ b/meta-agl-core/conf/layer.conf
@@ -0,0 +1,17 @@
+# 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"
+
+LAYERSERIES_COMPAT_aglcore = "dunfell"
+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..82c9dddc1
--- /dev/null
+++ b/meta-agl-core/conf/local.conf.sample
@@ -0,0 +1,277 @@
+#
+# 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
+# - 'image-mklibs' to reduce shared library files size for an image
+# - 'image-prelink' in order to prelink the filesystem image
+# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
+# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
+USER_CLASSES ?= "buildstats image-mklibs image-prelink"
+
+#
+# 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 abort
+# 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 \
+ ABORT,${TMPDIR},100M,1K \
+ ABORT,${DL_DIR},100M,1K \
+ ABORT,${SSTATE_DIR},100M,1K \
+ ABORT,/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 = "1"
+
+# 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/files/group b/meta-agl-core/files/group
new file mode 100644
index 000000000..c309f6a05
--- /dev/null
+++ b/meta-agl-core/files/group
@@ -0,0 +1,92 @@
+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:
+display::200:
+agl-driver::1001:
+agl-passenger::1002:
+systemd-network::1005:
+systemd-resolve::1006:
+mosquitto::1007:
diff --git a/meta-agl-core/files/passwd b/meta-agl-core/files/passwd
new file mode 100644
index 000000000..ac70c0f9b
--- /dev/null
+++ b/meta-agl-core/files/passwd
@@ -0,0 +1,62 @@
+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:::
+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:::
+display::200:200:::
+systemd-network::1005:1005:::
+systemd-resolve::1006:1006:::
+mosquitto::1007:1007:::
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..babf0261f
--- /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_git.bb b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb
new file mode 100644
index 000000000..61086dfe7
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb
@@ -0,0 +1,27 @@
+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 = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8c16666ae6c159876a0ba63099614381"
+
+SRC_URI = "git://gitlab.com/iotbzh/connman-json-client.git;protocol=https"
+SRCREV = "2b0f93ec9518c978c04807fe52e95315d6d80e6b"
+
+inherit autotools pkgconfig
+
+EXTRA_AUTORECONF += " -i"
+EXTRA_OECONF += " --disable-optimization --enable-debug"
+
+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_%.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..469345880
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman/connman_aglcore.inc
@@ -0,0 +1,20 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://0001-disable-when-booting-over-nfs.patch \
+ file://main.conf \
+"
+
+FILES_${PN} += "${sysconfdir}/connman/main.conf"
+
+PACKAGECONFIG[session-policy-local] = "--enable-session-policy-local,--disable-session-policy-local,"
+PACKAGECONFIG_append = " session-policy-local"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/connman
+ install -m 0644 ${WORKDIR}/main.conf ${D}${sysconfdir}/connman
+
+ # Need to ignore eth1 in cluster demo setup
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'agl-cluster-demo-support', 'true', 'false', d)}; then
+ sed -i 's/^\(NetworkInterfaceBlacklist=.*\)/\1,eth1/' ${D}${sysconfdir}/connman/main.conf
+ fi
+}
diff --git a/meta-agl-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch b/meta-agl-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch
new file mode 100644
index 000000000..f129a6580
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch
@@ -0,0 +1,10 @@
+--- 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/files/main.conf b/meta-agl-core/recipes-connectivity/connman/files/main.conf
new file mode 100644
index 000000000..4dba25b70
--- /dev/null
+++ b/meta-agl-core/recipes-connectivity/connman/files/main.conf
@@ -0,0 +1,3 @@
+[General]
+FallbackTimeservers=pool.ntp.org
+NetworkInterfaceBlacklist=vmnet,vboxnet,virbr,ifb,meth
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_%.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..6661eab6c
--- /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/0001-fix-udevd-seclabel-parsing.patch b/meta-agl-core/recipes-core/systemd/systemd/0001-fix-udevd-seclabel-parsing.patch
new file mode 100644
index 000000000..29165b58e
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd/0001-fix-udevd-seclabel-parsing.patch
@@ -0,0 +1,34 @@
+Fix udevd SECLABEL token parsing
+
+The udevd rules parsing rewrite in v243 broke SECLABEL parsing,
+with the result being that udevd crashes when it parses a line
+containing a SECLABEL token. Fix the handling of the attribute
+of SECLABEL tokens when parsing, and add a check to prevent
+crashes if the attribute is missing.
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
+index efea16e5c5..3e757ccb06 100644
+--- a/src/udev/udev-rules.c
++++ b/src/udev/udev-rules.c
+@@ -918,7 +918,7 @@ static int parse_token(UdevRules *rules, const char *key, char *attr, UdevRuleOp
+ op = OP_ASSIGN;
+ }
+
+- r = rule_line_add_token(rule_line, TK_A_SECLABEL, op, value, NULL);
++ r = rule_line_add_token(rule_line, TK_A_SECLABEL, op, value, attr);
+ } else if (streq(key, "RUN")) {
+ if (is_match || op == OP_REMOVE)
+ return log_token_invalid_op(rules, key);
+@@ -1927,6 +1927,8 @@ static int udev_rule_apply_token_to_event(
+ _cleanup_free_ char *name = NULL, *label = NULL;
+ char label_str[UTIL_LINE_SIZE] = {};
+
++ if (!token->data)
++ break;
+ name = strdup((const char*) token->data);
+ if (!name)
+ return log_oom();
diff --git a/meta-agl-core/recipes-core/systemd/systemd/0002-network-add-CAN-Termination-tristate-option.patch b/meta-agl-core/recipes-core/systemd/systemd/0002-network-add-CAN-Termination-tristate-option.patch
new file mode 100644
index 000000000..feaff2736
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd/0002-network-add-CAN-Termination-tristate-option.patch
@@ -0,0 +1,107 @@
+From 1e6ffb3129340291027d2690631f62eb7d0e0a78 Mon Sep 17 00:00:00 2001
+From: Matt Ranostay <matt.ranostay@konsulko.com>
+Date: Tue, 11 Feb 2020 18:13:45 -0800
+Subject: [PATCH] network: add CAN Termination tristate option
+
+Upstream-Status: Submitted
+Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
+---
+ src/libsystemd/sd-netlink/netlink-types.c | 1 +
+ src/network/networkd-can.c | 13 +++++++++++++
+ src/network/networkd-network-gperf.gperf | 1 +
+ src/network/networkd-network.c | 1 +
+ src/network/networkd-network.h | 1 +
+ test/fuzz/fuzz-network-parser/directives.network | 1 +
+ 6 files changed, 18 insertions(+)
+
+diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
+index a55460f034..96e211dcf0 100644
+--- a/src/libsystemd/sd-netlink/netlink-types.c
++++ b/src/libsystemd/sd-netlink/netlink-types.c
+@@ -316,6 +316,7 @@ static const NLType rtnl_link_info_data_can_types[] = {
+ [IFLA_CAN_BITTIMING] = { .size = sizeof(struct can_bittiming) },
+ [IFLA_CAN_RESTART_MS] = { .type = NETLINK_TYPE_U32 },
+ [IFLA_CAN_CTRLMODE] = { .size = sizeof(struct can_ctrlmode) },
++ [IFLA_CAN_TERMINATION] = { .type = NETLINK_TYPE_U16 },
+ };
+
+ static const NLType rtnl_link_info_data_macsec_types[] = {
+diff --git a/src/network/networkd-can.c b/src/network/networkd-can.c
+index 5755df57bd..3abe8ae2ed 100644
+--- a/src/network/networkd-can.c
++++ b/src/network/networkd-can.c
+@@ -9,6 +9,8 @@
+ #include "networkd-manager.h"
+ #include "string-util.h"
+
++#define CAN_TERMINATION_OHM_VALUE 120
++
+ static int link_up_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
+ int r;
+
+@@ -152,6 +154,17 @@ static int link_set_can(Link *link) {
+ return log_link_error_errno(link, r, "Could not append IFLA_CAN_CTRLMODE attribute: %m");
+ }
+
++ if (link->network->can_termination >= 0) {
++
++ log_link_debug(link, "%sabling can-termination", link->network->can_termination ? "En" : "Dis");
++
++ r = sd_netlink_message_append_u16(m, IFLA_CAN_TERMINATION,
++ link->network->can_termination ? CAN_TERMINATION_OHM_VALUE : 0);
++ if (r < 0)
++ return log_link_error_errno(link, r, "Could not append IFLA_CAN_TERMINATION attribute: %m");
++
++ }
++
+ r = sd_netlink_message_close_container(m);
+ if (r < 0)
+ return log_link_error_errno(link, r, "Failed to close netlink container: %m");
+diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
+index f7e68be181..b3df4f3960 100644
+--- a/src/network/networkd-network-gperf.gperf
++++ b/src/network/networkd-network-gperf.gperf
+@@ -245,6 +245,7 @@ CAN.BitRate, config_parse_si_size,
+ CAN.SamplePoint, config_parse_permille, 0, offsetof(Network, can_sample_point)
+ CAN.RestartSec, config_parse_sec, 0, offsetof(Network, can_restart_us)
+ CAN.TripleSampling, config_parse_tristate, 0, offsetof(Network, can_triple_sampling)
++CAN.Termination, config_parse_tristate, 0, offsetof(Network, can_termination)
+ TrafficControlQueueingDiscipline.Parent, config_parse_tc_qdiscs_parent, 0, 0
+ TrafficControlQueueingDiscipline.NetworkEmulatorDelaySec, config_parse_tc_network_emulator_delay, 0, 0
+ TrafficControlQueueingDiscipline.NetworkEmulatorDelayJitterSec, config_parse_tc_network_emulator_delay, 0, 0
+diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
+index 6e443975f1..0ea5c05db7 100644
+--- a/src/network/networkd-network.c
++++ b/src/network/networkd-network.c
+@@ -448,6 +448,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
+ .keep_configuration = _KEEP_CONFIGURATION_INVALID,
+
+ .can_triple_sampling = -1,
++ .can_termination = -1,
+ .ip_service_type = -1,
+ };
+
+diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
+index aa74bb4ae7..6a1f094156 100644
+--- a/src/network/networkd-network.h
++++ b/src/network/networkd-network.h
+@@ -193,6 +193,7 @@ struct Network {
+ unsigned can_sample_point;
+ usec_t can_restart_us;
+ int can_triple_sampling;
++ int can_termination;
+
+ AddressFamily ip_forward;
+ bool ip_masquerade;
+diff --git a/test/fuzz/fuzz-network-parser/directives.network b/test/fuzz/fuzz-network-parser/directives.network
+index 5bd80dece8..781269d960 100644
+--- a/test/fuzz/fuzz-network-parser/directives.network
++++ b/test/fuzz/fuzz-network-parser/directives.network
+@@ -194,6 +194,7 @@ SamplePoint=
+ BitRate=
+ RestartSec=
+ TripleSampling=
++Termination=
+ [Address]
+ DuplicateAddressDetection=
+ AutoJoin=
diff --git a/meta-agl-core/recipes-core/systemd/systemd/canbus-can.network b/meta-agl-core/recipes-core/systemd/systemd/canbus-can.network
new file mode 100644
index 000000000..ae5514bca
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd/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/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/wired.network b/meta-agl-core/recipes-core/systemd/systemd/wired.network
new file mode 100644
index 000000000..3559b0155
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd/wired.network
@@ -0,0 +1,5 @@
+[Match]
+Name=eth* en*
+
+[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..feca107a8
--- /dev/null
+++ b/meta-agl-core/recipes-core/systemd/systemd_aglcore.inc
@@ -0,0 +1,34 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/systemd:"
+
+SRC_URI += "\
+ file://0002-network-add-CAN-Termination-tristate-option.patch \
+ file://e2fsck.conf \
+ file://canbus-can.network \
+ ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','systemd','file://wired.network','',d)} \
+"
+
+# enable networkd/resolved support
+PACKAGECONFIG_append_pn-systemd = " \
+ ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','systemd','networkd resolved','',d)} \
+"
+
+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
+
+ # Install canbus network script
+ install -m 0644 ${WORKDIR}/canbus-can.network ${D}${nonarch_base_libdir}/systemd/network/60-canbus-can.network
+
+ if ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','systemd','true','false',d)}; then
+ # Install DHCP configuration for Ethernet adapters
+ install -m 644 ${WORKDIR}/wired.network ${D}${sysconfdir}/systemd/network
+ fi
+}
+
+FILES_${PN} += "${sysconfdir}/e2fsck.conf "
+
+# 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"
diff --git a/meta-agl-core/recipes-devtools/cmake/cmake_%.bbappend b/meta-agl-core/recipes-devtools/cmake/cmake_%.bbappend
new file mode 100644
index 000000000..980783236
--- /dev/null
+++ b/meta-agl-core/recipes-devtools/cmake/cmake_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-devtools/cmake/cmake_aglcore.inc b/meta-agl-core/recipes-devtools/cmake/cmake_aglcore.inc
new file mode 100644
index 000000000..2de1e6836
--- /dev/null
+++ b/meta-agl-core/recipes-devtools/cmake/cmake_aglcore.inc
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/files"
+
+SRC_URI_append_class-nativesdk = " \
+ file://environment.d-cmake-agl.sh \
+"
+
+do_install_append_class-nativesdk() {
+ install -m 644 ${WORKDIR}/environment.d-cmake-agl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake-agl.sh
+}
diff --git a/meta-agl-core/recipes-devtools/cmake/files/environment.d-cmake-agl.sh b/meta-agl-core/recipes-devtools/cmake/files/environment.d-cmake-agl.sh
new file mode 100644
index 000000000..64b6cf3c6
--- /dev/null
+++ b/meta-agl-core/recipes-devtools/cmake/files/environment.d-cmake-agl.sh
@@ -0,0 +1 @@
+export OE_CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
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..7cba933af
--- /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-extended/gperf/.appends.core b/meta-agl-core/recipes-extended/gperf/.appends.core
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/meta-agl-core/recipes-extended/gperf/.appends.core
diff --git a/meta-agl-core/recipes-extended/gperf/gperf_%.bbappend b/meta-agl-core/recipes-extended/gperf/gperf_%.bbappend
new file mode 100644
index 000000000..980783236
--- /dev/null
+++ b/meta-agl-core/recipes-extended/gperf/gperf_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-extended/gperf/gperf_aglcore.inc b/meta-agl-core/recipes-extended/gperf/gperf_aglcore.inc
new file mode 100644
index 000000000..2a590838b
--- /dev/null
+++ b/meta-agl-core/recipes-extended/gperf/gperf_aglcore.inc
@@ -0,0 +1 @@
+BBCLASSEXTEND += "nativesdk"
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..bbd5a80c4
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf
@@ -0,0 +1,34 @@
+##Generate a weston.ini file:
+
+To modify any of the default sections (core, shell, ivi-shell), add a
+do_configure() function to your bbappend:
+
+'''
+do_configure() {
+ echo repaint-window=34 >> ${WORKDIR}/core.cfg
+
+ echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg
+ echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg
+}
+'''
+or:
+'''
+do_configure() {
+ sed -i -e 's/drm-backend/fbdev-backend/' ${WORKDIR}/core.cfg
+}
+'''
+
+To change the display from the default assumption of an HDMI-1-A connected
+screen that needs to be rotated 270 degrees:
+
+'''
+SRC_URI_remove = "file://hdmi-a-1-270.cfg"
+SRC_URI += "file://hdmi-a-1-90.cfg"
+'''
+
+To add new sections just list them in SRC_URI:
+'''
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://dsi.cfg"
+'''
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..553f3a6bf
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
@@ -0,0 +1,28 @@
+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 = "bdd8dd718496dc8e4330209c46c196442bcf7d3e"
+
+PV = "0.0.10+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG[policy-deny-all] = "-Dpolicy-default=deny-all,,"
+
+inherit meson pkgconfig python3native
+
+FILES_${PN} = " \
+ ${bindir}/agl-compositor \
+ ${bindir}/agl-screenshooter \
+ ${datadir}/${PN}/protocols/agl-shell.xml \
+ ${datadir}/${PN}/protocols/agl-shell-desktop.xml \
+ "
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham-transmitter_git.bb b/meta-agl-core/recipes-graphics/wayland/waltham-transmitter_git.bb
new file mode 100644
index 000000000..85f760709
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham-transmitter_git.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "Waltham is a network IPC library designed to resemble Wayland both protocol and protocol-API wise"
+HOMEPAGE = "https://github.com/waltham/waltham"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://waltham-transmitter/COPYING;md5=f21c9af4de068fb53b83f0b37d262ec3"
+
+DEPENDS += "libdrm virtual/kernel wayland wayland-native waltham weston gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad wayland-ivi-extension"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/weston-ivi-plugins.git;protocol=https;branch=${AGL_BRANCH}"
+SRCREV = "5287483228fa1e28f3217a54606cfe760c6582bd"
+
+S = "${WORKDIR}/git/"
+
+WALTHAM_PIPELINE_TRANSMITTER ?= "waltham-transmitter/waltham-renderer/pipeline_example_general.cfg"
+WALTHAM_PIPELINE_RECEIVER ?= "waltham-receiver/receiver_pipeline_example_general.cfg"
+WALTHAM_RECIEVER_IP ?= "192.168.1.2"
+WALTHAM_RECEIVER_PORT ?= "3440"
+
+inherit pkgconfig cmake
+
+do_install_append () {
+ install -d ${D}/etc/xdg/weston/
+ install ${S}/${WALTHAM_PIPELINE_TRANSMITTER} ${D}/etc/xdg/weston/transmitter_pipeline.cfg
+ install ${S}/${WALTHAM_PIPELINE_RECEIVER} ${D}/etc/xdg/weston/receiver_pipeline.cfg
+
+ sed -i -e "s/YOUR_RECIEVER_IP/${WALTHAM_RECIEVER_IP}/g" ${D}/etc/xdg/weston/transmitter_pipeline.cfg
+ sed -i -e "s/YOUR_RECIEVER_PORT/${WALTHAM_RECEIVER_PORT}/g" ${D}/etc/xdg/weston/transmitter_pipeline.cfg
+ sed -i -e "s/YOUR_RECIEVER_PORT/${WALTHAM_RECEIVER_PORT}/g" ${D}/etc/xdg/weston/receiver_pipeline.cfg
+
+}
+
+FILES_${PN} += "/etc/xdg/weston/*.cfg"
+FILES_${PN} += "${libdir}/*"
+FILES_${PN} += "${bindir}/*"
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch b/meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch
new file mode 100644
index 000000000..32c2df3c4
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch
@@ -0,0 +1,51 @@
+From 6ecdf10a10929164f3cbdb754ae91d27576e5036 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Fri, 16 Oct 2020 18:57:38 +0300
+Subject: [PATCH] Use python3 instead of 2
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ configure.ac | 2 +-
+ tools/gen.py | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5f65a6b..94b8644 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,7 +32,7 @@ AC_SUBST(VERSION_INFO)
+ # Check for programs
+ AC_PROG_CC
+ AC_PROG_CC_STDC
+-AC_CHECK_PROGS([PYTHON2], [python2 python])
++AC_CHECK_PROGS([PYTHON3], [python3 python])
+ PKG_PROG_PKG_CONFIG()
+
+ AC_ARG_ENABLE(gprof,
+diff --git a/tools/gen.py b/tools/gen.py
+index 19e8baa..64c5870 100755
+--- a/tools/gen.py
++++ b/tools/gen.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python2
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ # Copyright © 2013-2014 Collabora, Ltd.
+@@ -562,11 +562,11 @@ try:
+ opts, args = getopt.getopt(sys.argv[1:], "hp:i:o:t:m:",
+ ["preamble=", "input=", "output=", "type=", "mode="])
+ except getopt.GetoptError:
+- print 'gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>'
++ print('gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>')
+ sys.exit(2)
+ for opt, arg in opts:
+ if opt == '-h':
+- print 'gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>'
++ print('gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>')
+ sys.exit()
+ elif opt in ("-p", "--preamble"):
+ preamble_files.append(arg)
+--
+2.28.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch b/meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch
new file mode 100644
index 000000000..354bcbc15
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch
@@ -0,0 +1,55 @@
+From cc87dddc2cdc0c20b053e3da1197efd671b4f50c Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Wed, 23 Sep 2020 22:33:50 +0300
+Subject: [PATCH 1/2] waltham: Fix compile build error
+
+Newer compilers will complain about the fact debug_message is declared
+multiple times:
+
+multiple definition of `debug_message';
+.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
+first defined here multiple definition of `debug_message';
+.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
+first defined here /usr/bin/ld:
+.libs/client-serialice.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
+multiple definition of `debug_message';
+.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
+first defined here
+
+Bug-AGL: SPEC-3649
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ src/waltham/marshaller_log.h | 2 +-
+ src/waltham/waltham-util.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/waltham/marshaller_log.h b/src/waltham/marshaller_log.h
+index 8254914..ffa87c1 100644
+--- a/src/waltham/marshaller_log.h
++++ b/src/waltham/marshaller_log.h
+@@ -32,7 +32,7 @@
+ /* Comment/uncomment to disable/enable debugging log */
+ #define DEBUG
+ //#define PROFILE
+-int debug_message;
++extern int debug_message;
+
+ #ifdef DEBUG
+ static inline void DEBUG_STAMP (void) {
+diff --git a/src/waltham/waltham-util.c b/src/waltham/waltham-util.c
+index 410b114..8f898f8 100644
+--- a/src/waltham/waltham-util.c
++++ b/src/waltham/waltham-util.c
+@@ -34,7 +34,7 @@
+ #include "waltham-connection.h"
+ #include "waltham-private.h"
+
+-int debug_message;
++extern int debug_message;
+
+ static void
+ wth_pfx_print(const char *pfx, const char *fmt, va_list argp)
+--
+2.28.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch b/meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch
new file mode 100644
index 000000000..5aefb922b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch
@@ -0,0 +1,70 @@
+From d30005429fe92daa14151c2a6175d5cf19506cac Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Wed, 7 Oct 2020 16:36:38 +0300
+Subject: [PATCH 2/2] commandxml: Add support wthp_app_id interface
+
+With it, we hang off the app_id which we can use to pass it to the
+receiver side.
+
+Bug-AGL: SPEC-3601
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ data/command.xml | 29 +++++++++++++++++++++++++++++
+ src/waltham/header-preamble.txt | 1 +
+ 2 files changed, 30 insertions(+)
+
+diff --git a/data/command.xml b/data/command.xml
+index a03082b..cb53f75 100644
+--- a/data/command.xml
++++ b/data/command.xml
+@@ -1814,6 +1814,35 @@
+
+ </interface>
+
++ <interface name="wthp_ivi_app_id" version="1">
++ <description summary="create ivi-style surfaces">
++ This interface is exposed as a global singleton.
++ This interface is implemented by servers that provide IVI-style user interfaces.
++ It allows clients to associate an ivi_surface with wthp_surface.
++ </description>
++
++ <enum name="error">
++ <entry name="role" value="0" summary="given wthp_surface has another role"/>
++ </enum>
++
++ <request name="surface_create">
++ <description summary="create ivi_surface with app_id in ivi compositor">
++ This request gives the wthp_surface the role of an IVI Surface. Creating more than
++ one ivi_surface for a wthp_surface is not allowed. Note, that this still allows the
++ following example:
++
++ 1. create a wthp_surface
++ 2. create ivi_surface for the wthp_surface
++ 3. destroy the ivi_surface
++
++ </description>
++ <arg name="app_id" type="string"/>
++ <arg name="surface" type="object" interface="wthp_surface"/>
++ <arg name="id" type="new_id" interface="wthp_ivi_surface"/>
++ </request>
++
++ </interface>
++
+ <interface name="dummy" version="1">
+ <request name="dummy_request">
+ </request>
+diff --git a/src/waltham/header-preamble.txt b/src/waltham/header-preamble.txt
+index df765cc..2409859 100644
+--- a/src/waltham/header-preamble.txt
++++ b/src/waltham/header-preamble.txt
+@@ -50,5 +50,6 @@ struct wthp_touch;
+
+ struct wthp_ivi_surface;
+ struct wthp_ivi_application;
++struct wthp_ivi_app_id;
+
+ struct dummy;
+--
+2.28.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend b/meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend
new file mode 100644
index 000000000..8d0436a3b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append = "\
+ file://0001-waltham-Fix-compile-build-error.patch \
+ file://0002-commandxml-Add-support-wthp_app_id-interface.patch \
+ file://0001-Use-python3-instead-of-2.patch \
+ "
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham_git.bb b/meta-agl-core/recipes-graphics/wayland/waltham_git.bb
new file mode 100644
index 000000000..01023a1f2
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham_git.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Waltham is a network IPC library designed to resemble Wayland both protocol and protocol-API wise"
+HOMEPAGE = "https://github.com/waltham/waltham"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = " \
+ file://LICENSE;md5=e8ad01a5182f2c1b3a2640e9ea268264 \
+"
+SRCREV = "1de58c3ff746ddaba7584d760c5454243723d3ca"
+SRC_URI = "git://github.com/wmizuno/waltham.git \
+ "
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+DEPENDS += "libdrm virtual/kernel wayland"
+RDEPENDS_${PN} += "libdrm" \ No newline at end of file
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..16c0f046d
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "file://core.cfg \
+ file://shell.cfg \
+ file://hdmi-a-1-270.cfg \
+ "
+
+# cluster and html5-landscape
+# core, shell, hdmi-a-1-180.cfg, virtual-landscape.cfg
+SRC_URI_remove_landscape = " \
+ file://hdmi-a-1-270.cfg \
+ file://hdmi-a-1-90.cfg \
+ file://virtual.cfg \
+"
+SRC_URI_append_landscape = " \
+ file://hdmi-a-1-180.cfg \
+ file://virtual-landscape.cfg \
+"
+
+
+S = "${WORKDIR}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_compile() {
+ # Put all of our cfg files together.
+ rm -f ${WORKDIR}/weston.ini
+ for F in ${WORKDIR}/*.cfg; do
+ cat $F >> ${WORKDIR}/weston.ini
+ echo >> ${WORKDIR}/weston.ini
+ done
+ sed -i -e '$ d' ${WORKDIR}/weston.ini
+}
+
+do_install_append() {
+ WESTON_INI_CONFIG=${sysconfdir}/xdg/weston
+ install -d ${D}${WESTON_INI_CONFIG}
+ install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini
+}
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..179004094
--- /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}"
+
+SRC_URI += "${@bb.utils.contains("DISTRO_FEATURES", "weston-remoting", "file://remote-output.cfg", "",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.
+SRC_URI_append_qemuall = " file://virtual.cfg"
+SRC_URI_append_intel-corei7-64 = " file://virtual.cfg"
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..90774ed79
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg
@@ -0,0 +1,4 @@
+[core]
+backend=drm-backend.so
+require-input=false
+modules=systemd-notify.so
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..dffc2b6dd
--- /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=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..88a692a1b
--- /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=90
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg
new file mode 100644
index 000000000..f69a2e096
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg
@@ -0,0 +1,5 @@
+[remote-output]
+name=remote-1
+mode=640x720@30
+host=192.168.20.99
+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..975e539e6
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg
@@ -0,0 +1,3 @@
+[shell]
+locking=true
+panel-position=none
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual.cfg
new file mode 100644
index 000000000..25a8fae94
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual.cfg
@@ -0,0 +1,18 @@
+[output]
+name=Virtual-1
+transform=270
+mode=1920x1080
+#mode=1600x1200
+#mode=1680x1050
+#mode=1400x1050
+#mode=1600x900
+#mode=1280x1024
+#mode=1440x900
+#mode=1280x960
+#mode=1360x768
+#mode=1280x800
+#mode=1280x768
+#mode=1280x720
+#mode=800x600
+#mode=848x480
+#mode=640x480
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..51c59ae4d
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc
@@ -0,0 +1,6 @@
+do_install_append() {
+ # Remove upstream weston.ini to avoid conflict with weston-ini-conf package
+ rm -f ${D}${sysconfdir}/xdg/weston/weston.ini
+}
+
+SYSTEMD_AUTO_ENABLE = "enable"
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch
new file mode 100644
index 000000000..32755c4b3
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch
@@ -0,0 +1,30 @@
+From 7e5fb58591a29d60657158262a0772796bfd3461 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Wed, 12 Feb 2020 13:18:19 +0200
+Subject: [PATCH] libweston: Expose weston_output_damage() in libweston
+
+We have weston_compositor_damage_all() exported and declared but users
+might need weston_output_damage() to refer to an individual output. The
+symbol already exported so just declare it.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ include/libweston/libweston.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h
+index 1439775e..9fac5be0 100644
+--- a/include/libweston/libweston.h
++++ b/include/libweston/libweston.h
+@@ -1604,6 +1604,8 @@ weston_compositor_schedule_repaint(struct weston_compositor *compositor);
+ void
+ weston_compositor_damage_all(struct weston_compositor *compositor);
+ void
++weston_output_damage(struct weston_output *woutput);
++void
+ weston_compositor_wake(struct weston_compositor *compositor);
+ void
+ weston_compositor_sleep(struct weston_compositor *compositor);
+--
+2.20.1
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch
new file mode 100644
index 000000000..02af7cbaf
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch
@@ -0,0 +1,106 @@
+From 4534fcab54409b08faf4445ed6780136b58afb63 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Mon, 28 Sep 2020 22:51:00 +0300
+Subject: [PATCH 1/2] libweston: Migrate weston_seat_init/release to public
+ headers
+
+weston_seat_init/release needed for creating weston plug-ins that want
+manage seat/input on their own.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ include/libweston/libweston.h | 25 +++++++++++++++++++++++++
+ libweston/libweston-internal.h | 31 +++----------------------------
+ 2 files changed, 28 insertions(+), 28 deletions(-)
+
+diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h
+index 54ea008..59541f2 100644
+--- a/include/libweston/libweston.h
++++ b/include/libweston/libweston.h
+@@ -2053,6 +2053,31 @@ void
+ weston_timeline_refresh_subscription_objects(struct weston_compositor *wc,
+ void *object);
+
++/* input, seat */
++void
++weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec,
++ const char *seat_name);
++void
++weston_seat_release(struct weston_seat *seat);
++
++void
++weston_seat_init_pointer(struct weston_seat *seat);
++
++int
++weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap);
++
++void
++weston_seat_init_touch(struct weston_seat *seat);
++
++void
++weston_seat_release_keyboard(struct weston_seat *seat);
++
++void
++weston_seat_release_pointer(struct weston_seat *seat);
++
++void
++weston_seat_release_touch(struct weston_seat *seat);
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff --git a/libweston/libweston-internal.h b/libweston/libweston-internal.h
+index 66c38e8..f5c4c2c 100644
+--- a/libweston/libweston-internal.h
++++ b/libweston/libweston-internal.h
+@@ -168,44 +168,19 @@ weston_plane_init(struct weston_plane *plane,
+ void
+ weston_plane_release(struct weston_plane *plane);
+
+-/* weston_seat */
+-
+ struct clipboard *
+ clipboard_create(struct weston_seat *seat);
+
+-void
+-weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec,
+- const char *seat_name);
+-
+-void
+-weston_seat_repick(struct weston_seat *seat);
++/* weston_seat */
+
+ void
+-weston_seat_release(struct weston_seat *seat);
++weston_seat_update_keymap(struct weston_seat *seat, struct xkb_keymap *keymap);
+
+ void
+ weston_seat_send_selection(struct weston_seat *seat, struct wl_client *client);
+
+ void
+-weston_seat_init_pointer(struct weston_seat *seat);
+-
+-int
+-weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap);
+-
+-void
+-weston_seat_init_touch(struct weston_seat *seat);
+-
+-void
+-weston_seat_release_keyboard(struct weston_seat *seat);
+-
+-void
+-weston_seat_release_pointer(struct weston_seat *seat);
+-
+-void
+-weston_seat_release_touch(struct weston_seat *seat);
+-
+-void
+-weston_seat_update_keymap(struct weston_seat *seat, struct xkb_keymap *keymap);
++weston_seat_repick(struct weston_seat *seat);
+
+ void
+ wl_data_device_set_keyboard_focus(struct weston_seat *seat);
+--
+2.28.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch b/meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch
new file mode 100644
index 000000000..cb122590b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch
@@ -0,0 +1,37 @@
+commit 5130a8c21a9deea54e8f7c96a3a5049e2d60a210
+Author: Marius Vlad <marius.vlad@collabora.com>
+Date: Thu Jul 30 14:47:32 2020 +0300
+
+backend-drm: Correctly tear down the DRM backend
+
+It seem that we skipped to put back in TEXT mode the tty, in case a DRM
+device node wasn't present at that time, or it isn't present at all. This
+orders the destroy part correctly as to handle that case as well.
+
+As a side effect, as the tty will still be set to GRAPHICS mode we will
+require a manual change of the tty number, which might be not possible
+on all systems. Properly putting back the tty to TEXT mode should avoid
+that, and allows to re-use the same tty no in case the DRM device has
+been created at a later point in time.
+
+Upstream-Status: Backport
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c
+index 980a12da..1cf61a33 100644
+--- a/libweston/backend-drm/drm.c
++++ b/libweston/backend-drm/drm.c
+@@ -3031,10 +3031,10 @@ err_sprite:
+ destroy_sprites(b);
+ err_udev_dev:
+ udev_device_unref(drm_device);
+-err_launcher:
+- weston_launcher_destroy(compositor->launcher);
+ err_udev:
+ udev_unref(b->udev);
++err_launcher:
++ weston_launcher_destroy(compositor->launcher);
+ err_compositor:
+ weston_compositor_shutdown(compositor);
+ free(b);
diff --git a/meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend b/meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend
new file mode 100644
index 000000000..f627f5cb2
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston_8.0_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc
new file mode 100644
index 000000000..c2495465b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/weston"
+
+SRC_URI_append = "\
+ file://0001-libweston-Expose-weston_output_damage-in-libweston.patch \
+ file://0001-libweston-Migrate-weston_seat_init-release-to-public.patch \
+ file://0005-correctly-tear-down-drm-backend.patch \
+ "
+
+# Workaround for incorrect upstream definition
+PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
+PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}"
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..52fe69d24
--- /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/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch b/meta-agl-core/recipes-kernel/linux/linux-4.14/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch
new file mode 100644
index 000000000..c595dfdf5
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-4.14/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch
@@ -0,0 +1,40 @@
+From 63f5acdf097b7baca8d0f7056a037f8811b48aaa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh>
+Date: Tue, 27 Feb 2018 17:06:21 +0100
+Subject: [PATCH] Smack: Handle CGROUP2 in the same way that CGROUP
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The new file system CGROUP2 isn't actually handled
+by smack. This changes makes Smack treat equally
+CGROUP and CGROUP2 items.
+
+Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+---
+ security/smack/smack_lsm.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
+index 03fdecba93bb..5d77ed04422c 100644
+--- a/security/smack/smack_lsm.c
++++ b/security/smack/smack_lsm.c
+@@ -3431,6 +3431,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
+ if (opt_dentry->d_parent == opt_dentry) {
+ switch (sbp->s_magic) {
+ case CGROUP_SUPER_MAGIC:
++ case CGROUP2_SUPER_MAGIC:
+ /*
+ * The cgroup filesystem is never mounted,
+ * so there's no opportunity to set the mount
+@@ -3474,6 +3475,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
+ switch (sbp->s_magic) {
+ case SMACK_MAGIC:
+ case CGROUP_SUPER_MAGIC:
++ case CGROUP2_SUPER_MAGIC:
+ /*
+ * Casey says that it's a little embarrassing
+ * that the smack file system doesn't do
+--
+2.14.3
+
diff --git a/meta-agl-core/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch b/meta-agl-core/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch
new file mode 100644
index 000000000..4100bb8fd
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch
@@ -0,0 +1,109 @@
+Smack: Privilege check on key operations
+
+Operations on key objects are subjected to Smack policy
+even if the process is privileged. This is inconsistent
+with the general behavior of Smack and may cause issues
+with authentication by privileged daemons. This patch
+allows processes with CAP_MAC_OVERRIDE to access keys
+even if the Smack rules indicate otherwise.
+
+Reported-by: Jose Bollo <jobol@nonadev.net>
+Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
+---
+ security/smack/smack.h | 1 +
+ security/smack/smack_access.c | 40 +++++++++++++++++++++++++++++-----------
+ security/smack/smack_lsm.c | 4 ++++
+ 3 files changed, 34 insertions(+), 11 deletions(-)
+
+diff --git a/security/smack/smack.h b/security/smack/smack.h
+index 6a71fc7..f7db791 100644
+--- a/security/smack/smack.h
++++ b/security/smack/smack.h
+@@ -321,6 +321,7 @@ struct smack_known *smk_import_entry(const char *, int);
+ void smk_insert_entry(struct smack_known *skp);
+ struct smack_known *smk_find_entry(const char *);
+ bool smack_privileged(int cap);
++bool smack_privileged_cred(int cap, const struct cred *cred);
+ void smk_destroy_label_list(struct list_head *list);
+
+ /*
+diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c
+index 1a30041..141ffac 100644
+--- a/security/smack/smack_access.c
++++ b/security/smack/smack_access.c
+@@ -623,26 +623,24 @@ struct smack_known *smack_from_secid(const u32 secid)
+ LIST_HEAD(smack_onlycap_list);
+ DEFINE_MUTEX(smack_onlycap_lock);
+
+-/*
++/**
++ * smack_privileged_cred - are all privilege requirements met by cred
++ * @cap: The requested capability
++ * @cred: the credential to use
++ *
+ * Is the task privileged and allowed to be privileged
+ * by the onlycap rule.
+ *
+ * Returns true if the task is allowed to be privileged, false if it's not.
+ */
+-bool smack_privileged(int cap)
++bool smack_privileged_cred(int cap, const struct cred *cred)
+ {
+- struct smack_known *skp = smk_of_current();
++ struct task_smack *tsp = cred->security;
++ struct smack_known *skp = tsp->smk_task;
+ struct smack_known_list_elem *sklep;
+ int rc;
+
+- /*
+- * All kernel tasks are privileged
+- */
+- if (unlikely(current->flags & PF_KTHREAD))
+- return true;
+-
+- rc = cap_capable(current_cred(), &init_user_ns, cap,
+- SECURITY_CAP_AUDIT);
++ rc = cap_capable(cred, &init_user_ns, cap, SECURITY_CAP_AUDIT);
+ if (rc)
+ return false;
+
+@@ -662,3 +660,23 @@ bool smack_privileged(int cap)
+
+ return false;
+ }
++
++/**
++ * smack_privileged - are all privilege requirements met
++ * @cap: The requested capability
++ *
++ * Is the task privileged and allowed to be privileged
++ * by the onlycap rule.
++ *
++ * Returns true if the task is allowed to be privileged, false if it's not.
++ */
++bool smack_privileged(int cap)
++{
++ /*
++ * All kernel tasks are privileged
++ */
++ if (unlikely(current->flags & PF_KTHREAD))
++ return true;
++
++ return smack_privileged_cred(cap, current_cred());
++}
+diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
+index 30f2c3d..03fdecb 100644
+--- a/security/smack/smack_lsm.c
++++ b/security/smack/smack_lsm.c
+@@ -4369,6 +4369,10 @@ static int smack_key_permission(key_ref_t key_ref,
+ */
+ if (tkp == NULL)
+ return -EACCES;
++
++ if (smack_privileged_cred(CAP_MAC_OVERRIDE, cred))
++ return 0;
++
+ #ifdef CONFIG_AUDIT
+ smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_KEY);
+ ad.a.u.key_struct.key = keyp->serial;
+
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..6d5c67021
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-agl-4.14.inc
@@ -0,0 +1,14 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-4.14:"
+
+#-------------------------------------------------------------------------
+# smack patches for kernels keys
+
+SRC_URI_append_with-lsm-smack = "\
+ file://Smack-Privilege-check-on-key-operations.patch \
+ file://Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch \
+ "
+
+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..da4e0c067
--- /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.inc b/meta-agl-core/recipes-kernel/linux/linux-agl.inc
new file mode 100644
index 000000000..cd960ef6d
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-agl.inc
@@ -0,0 +1,132 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
+
+DEPENDS += "kern-tools-native"
+
+# 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 () {
+ [ ! -f .config ] && cp -a ${WORKDIR}/defconfig .config
+ # Need to clear CONFIG_LSM for 5.1+ kernels to ensure it'll get
+ # regenerated to reflect configuration changes (e.g. SMACK).
+ sed -i '/^CONFIG_LSM/d' .config
+ merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
+ yes '' | make oldconfig
+}
+
+# Extra configuration options for the AGL kernel
+SRC_URI_append = "\
+ file://can-bus.cfg \
+ file://usb.cfg \
+ file://uvc.cfg \
+ file://joystick.cfg \
+ file://fanotify.cfg \
+ file://uinput.cfg \
+ file://hid.cfg \
+ file://drm.cfg \
+ file://btusb.cfg \
+ file://usbaudio.cfg \
+ file://usbmodem.cfg \
+ file://i2c-led.cfg \
+ file://nfc.cfg \
+ file://overlayfs.cfg \
+ "
+
+SRC_URI_append = " ${@bb.utils.contains('AGL_XEN_GUEST_WANTED','1','file://xen_domu.cfg','',d)}"
+
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/can-bus.cfg"
+# Enable support for usb video class for usb camera devices
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uvc.cfg"
+# Enable support for joystick devices
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/joystick.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/fanotify.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uinput.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/hid.cfg"
+# Enable DRM support for graphics
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/drm.cfg"
+# Enable Bluetooth USB devices
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/btusb.cfg"
+# Enable USB audio devices
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/usbaudio.cfg"
+# Enable I2C and LED for demontrator
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/i2c-led.cfg"
+# Enable NFC devices
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/nfc.cfg"
+# Enable overlayfs filesystem support
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/overlayfs.cfg"
+# Enable XEN support of the guest
+KERNEL_CONFIG_FRAGMENTS_append = " ${@bb.utils.contains('AGL_XEN_GUEST_WANTED','1','${WORKDIR}/xen_domu.cfg','',d)}"
+
+# Enable required features for the agl-netboot feature
+SRC_URI_append_netboot = " file://nbd.cfg \
+ file://ramdisk.cfg"
+KERNEL_CONFIG_FRAGMENTS_append_netboot = " ${WORKDIR}/nbd.cfg ${WORKDIR}/ramdisk.cfg"
+
+# Enable support for TP-Link TL-W722N USB Wifi adapter (rev 1 and 2)
+SRC_URI_append = " file://wifi.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/wifi.cfg"
+
+# Enable support for RTLSDR
+SRC_URI_append = " file://rtl_sdr.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg"
+
+# Additional drivers for virtual machines
+# OVERRIDES save us some c'n'p below ...
+OVERRIDES_prepend_qemux86 = "virtualmachine:"
+OVERRIDES_prepend_qemux86-64 = "virtualmachine:"
+SRC_URI_append_virtualmachine = " file://vbox-vmware-sata.cfg"
+KERNEL_CONFIG_FRAGMENTS_append_virtualmachine = " ${WORKDIR}/vbox-vmware-sata.cfg"
+
+# Extra configuration for using qemux86-64 image on physical hardware
+SRC_URI_append_qemux86-64 = "\
+ file://x86-extra-graphic-devices.cfg \
+ file://x86-net-devices.cfg \
+ file://x86-security-tpm.cfg \
+ file://x86-usb-devices.cfg \
+ file://x86-upsquare.cfg \
+"
+KERNEL_CONFIG_FRAGMENTS_append_qemux86-64 = "\
+ ${WORKDIR}/x86-extra-graphic-devices.cfg \
+ ${WORKDIR}/x86-net-devices.cfg \
+ ${WORKDIR}/x86-security-tpm.cfg \
+ ${WORKDIR}/x86-usb-devices.cfg \
+ ${WORKDIR}/x86-upsquare.cfg \
+"
+
+# Enable support for smack
+KERNEL_CONFIG_FRAGMENTS_append_with-lsm-smack = "\
+ ${WORKDIR}/audit.cfg \
+ ${WORKDIR}/smack.cfg \
+ ${WORKDIR}/smack-default-lsm.cfg \
+"
+
+# ALSA support and other sound related configuration
+SRC_URI_append = " file://sound.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/sound.cfg"
+
+# add hda audio for qemu
+SRC_URI_append_qemuall = " file://sound-hda.cfg"
+KERNEL_CONFIG_FRAGMENTS_append_qemuall = " ${WORKDIR}/sound-hda.cfg"
+
+# iio-dummy-device support for test iiodevice
+SRC_URI_append = " file://iiodevice.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/iiodevice.cfg"
+
+# external rtc support via e.g. http://wiki.seeedstudio.com/Grove-RTC/
+SRC_URI_append = " file://rtc.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtc.cfg"
+
+# netfilter options
+SRC_URI_append = " file://netfilter.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/netfilter.cfg"
+
+# Enable support for SystemTap
+SRC_URI_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'file://systemtap.cfg', '', d)}"
+KERNEL_CONFIG_FRAGMENTS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '${WORKDIR}/systemtap.cfg', '', d)}"
diff --git a/meta-agl-core/recipes-kernel/linux/linux/btusb.cfg b/meta-agl-core/recipes-kernel/linux/linux/btusb.cfg
new file mode 100644
index 000000000..dd7c460bb
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/btusb.cfg
@@ -0,0 +1,37 @@
+CONFIG_BT=m
+CONFIG_BT_BREDR=y
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+CONFIG_BT_HS=y
+CONFIG_BT_LE=y
+CONFIG_BT_LEDS=y
+# CONFIG_BT_SELFTEST is not set
+CONFIG_BT_DEBUGFS=y
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_INTEL=m
+CONFIG_BT_BCM=m
+CONFIG_BT_RTL=m
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIBTUSB_BCM=y
+CONFIG_BT_HCIBTUSB_RTL=y
+# CONFIG_BT_HCIBTSDIO is not set
+# CONFIG_BT_HCIUART is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBFUSB=m
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_BT_MRVL is not set
+# CONFIG_BT_ATH3K is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CMAC=m
+
+#
+# Bluetooth AVRCP support
+#
+CONFIG_INPUT_UINPUT=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..2f24b7607
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/can-bus.cfg
@@ -0,0 +1,42 @@
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+# CONFIG_TASK_XACCT is not set
+CONFIG_USER_RETURN_NOTIFIER=y
+CONFIG_PREEMPT_NOTIFIERS=y
+CONFIG_CAN=m
+CONFIG_CAN_RAW=m
+CONFIG_CAN_BCM=m
+CONFIG_CAN_GW=m
+CONFIG_CAN_J1939=m
+
+#
+# CAN Device Drivers
+#
+CONFIG_CAN_C_CAN=m
+CONFIG_CAN_C_CAN_PLATFORM=m
+CONFIG_CAN_VCAN=m
+CONFIG_CAN_SLCAN=m
+CONFIG_CAN_DEV=m
+CONFIG_CAN_CALC_BITTIMING=y
+# CONFIG_CAN_LEDS is not set
+# CONFIG_CAN_SJA1000 is not set
+# CONFIG_CAN_M_CAN is not set
+# CONFIG_CAN_CC770 is not set
+
+#
+# CAN SPI interfaces
+#
+CONFIG_CAN_MCP251X=m
+
+#
+# CAN USB interfaces
+#
+# CONFIG_CAN_EMS_USB is not set
+CONFIG_CAN_ESD_USB2=m
+CONFIG_CAN_GS_USB=m
+CONFIG_CAN_KVASER_USB=m
+CONFIG_CAN_PEAK_USB=m
+CONFIG_CAN_8DEV_USB=m
+CONFIG_CAN_MCBA_USB=m
+# CONFIG_CAN_SOFTING is not set
+# CONFIG_CAN_DEBUG_DEVICES is not set
diff --git a/meta-agl-core/recipes-kernel/linux/linux/drm.cfg b/meta-agl-core/recipes-kernel/linux/linux/drm.cfg
new file mode 100644
index 000000000..65fe71cd0
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/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/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/hid.cfg b/meta-agl-core/recipes-kernel/linux/linux/hid.cfg
new file mode 100644
index 000000000..327c753ae
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/hid.cfg
@@ -0,0 +1 @@
+CONFIG_HID_MULTITOUCH=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/i2c-led.cfg b/meta-agl-core/recipes-kernel/linux/linux/i2c-led.cfg
new file mode 100644
index 000000000..248b5118a
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/i2c-led.cfg
@@ -0,0 +1,3 @@
+# enabling I2C and LED for demonstrator
+CONFIG_I2C_TINY_USB=y
+CONFIG_LEDS_BLINKM=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/iiodevice.cfg b/meta-agl-core/recipes-kernel/linux/linux/iiodevice.cfg
new file mode 100644
index 000000000..c5b8ff35e
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/iiodevice.cfg
@@ -0,0 +1,26 @@
+#
+# Extcon Device Drivers
+#
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_BUFFER_CB=y
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_CONFIGFS=m
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
+CONFIG_IIO_SW_DEVICE=m
+CONFIG_IIO_SW_TRIGGER=m
+
+#
+# IIO dummy driver
+#
+CONFIG_IIO_DUMMY_EVGEN=m
+CONFIG_IIO_SIMPLE_DUMMY=m
+CONFIG_IIO_SIMPLE_DUMMY_EVENTS=y
+CONFIG_IIO_SIMPLE_DUMMY_BUFFER=y
+
+#
+# Triggers - standalone
+#
+CONFIG_IIO_HRTIMER_TRIGGER=m
+CONFIG_IIO_TRIGGERED_BUFFER=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/joystick.cfg b/meta-agl-core/recipes-kernel/linux/linux/joystick.cfg
new file mode 100644
index 000000000..2201bcb00
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/joystick.cfg
@@ -0,0 +1,9 @@
+CONFIG_INPUT_JOYDEV=y
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ADI=y
+CONFIG_GAMEPORT=y
+CONFIG_HID_LOGITECH=y
+CONFIG_LOGIWHEELS_FF=y
+CONFIG_HID_LOGITECH_HIDPP=y
+CONFIG_LOGITECH_FF=y
+CONFIG_LOGIG940_FF=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/netfilter.cfg b/meta-agl-core/recipes-kernel/linux/linux/netfilter.cfg
new file mode 100644
index 000000000..34be704c1
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/netfilter.cfg
@@ -0,0 +1 @@
+CONFIG_NETFILTER_XT_MATCH_OWNER=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/nfc.cfg b/meta-agl-core/recipes-kernel/linux/linux/nfc.cfg
new file mode 100644
index 000000000..6d863a075
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/nfc.cfg
@@ -0,0 +1,34 @@
+CONFIG_NFC=m
+CONFIG_NFC_DIGITAL=m
+CONFIG_NFC_NCI=m
+CONFIG_NFC_NCI_SPI=m
+CONFIG_NFC_HCI=m
+CONFIG_NFC_SHDLC=y
+CONFIG_NFC_TRF7970A=m
+CONFIG_NFC_MEI_PHY=m
+CONFIG_NFC_PORT100=m
+CONFIG_NFC_FDP=m
+CONFIG_NFC_FDP_I2C=m
+CONFIG_NFC_PN544=m
+CONFIG_NFC_PN544_I2C=m
+CONFIG_NFC_PN544_MEI=m
+CONFIG_NFC_PN533=m
+CONFIG_NFC_PN533_USB=m
+CONFIG_NFC_PN533_I2C=m
+CONFIG_NFC_MICROREAD=m
+CONFIG_NFC_MICROREAD_I2C=m
+CONFIG_NFC_MICROREAD_MEI=m
+CONFIG_NFC_MRVL=m
+CONFIG_NFC_MRVL_USB=m
+CONFIG_NFC_MRVL_I2C=m
+CONFIG_NFC_MRVL_SPI=m
+CONFIG_NFC_ST21NFCA=m
+CONFIG_NFC_ST21NFCA_I2C=m
+CONFIG_NFC_ST_NCI=m
+CONFIG_NFC_ST_NCI_I2C=m
+CONFIG_NFC_ST_NCI_SPI=m
+CONFIG_NFC_NXP_NCI=m
+CONFIG_NFC_NXP_NCI_I2C=m
+CONFIG_NFC_S3FWRN5=m
+CONFIG_NFC_S3FWRN5_I2C=m
+CONFIG_NFC_ST95HF=m
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/procevent.cfg b/meta-agl-core/recipes-kernel/linux/linux/procevent.cfg
new file mode 100644
index 000000000..6e08c25bc
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/procevent.cfg
@@ -0,0 +1,2 @@
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
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/rtc.cfg b/meta-agl-core/recipes-kernel/linux/linux/rtc.cfg
new file mode 100644
index 000000000..2641958a0
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/rtc.cfg
@@ -0,0 +1,7 @@
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_LIB=y
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+CONFIG_RTC_DRV_DS1307=m
+CONFIG_RTC_DRV_DS3232=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/rtl_sdr.cfg b/meta-agl-core/recipes-kernel/linux/linux/rtl_sdr.cfg
new file mode 100644
index 000000000..d4574700a
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/rtl_sdr.cfg
@@ -0,0 +1,4 @@
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
+CONFIG_DVB_USB_V2=m
+CONFIG_DVB_USB_RTL28XXU=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/scheddebug.cfg b/meta-agl-core/recipes-kernel/linux/linux/scheddebug.cfg
new file mode 100644
index 000000000..e8b09aa7c
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/scheddebug.cfg
@@ -0,0 +1 @@
+CONFIG_SCHED_DEBUG=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/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/uinput.cfg b/meta-agl-core/recipes-kernel/linux/linux/uinput.cfg
new file mode 100644
index 000000000..7996ef1dd
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/uinput.cfg
@@ -0,0 +1,3 @@
+# Enable the User-level Input driver (required by "wayland-fits")
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/usb.cfg b/meta-agl-core/recipes-kernel/linux/linux/usb.cfg
new file mode 100644
index 000000000..8e9e98ecb
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/usb.cfg
@@ -0,0 +1,8 @@
+CONFIG_USB_SERIAL=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_ACM=m
+CONFIG_CRC_CCITT=y
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_PCI=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/usbaudio.cfg b/meta-agl-core/recipes-kernel/linux/linux/usbaudio.cfg
new file mode 100644
index 000000000..5961f43d3
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/usbaudio.cfg
@@ -0,0 +1,2 @@
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/usbmodem.cfg b/meta-agl-core/recipes-kernel/linux/linux/usbmodem.cfg
new file mode 100644
index 000000000..3ded931e5
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/usbmodem.cfg
@@ -0,0 +1,7 @@
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_CDC_MBIM=m
+CONFIG_USB_NET_QMI_WWAN=m
+CONFIG_USB_SIERRA_NET=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+CONFIG_USB_SERIAL_QUALCOMM=m
diff --git a/meta-agl-core/recipes-kernel/linux/linux/uvc.cfg b/meta-agl-core/recipes-kernel/linux/linux/uvc.cfg
new file mode 100644
index 000000000..7c6556c11
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/uvc.cfg
@@ -0,0 +1,4 @@
+CONFIG_VIDEOBUF2_VMALLOC=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=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..ce1eca1a7
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/vbox-vmware-sata.cfg
@@ -0,0 +1,19 @@
+# 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_DRM_VMWGFX_FBCON=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/wifi.cfg b/meta-agl-core/recipes-kernel/linux/linux/wifi.cfg
new file mode 100644
index 000000000..00c2e06e4
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/wifi.cfg
@@ -0,0 +1,6 @@
+CONFIG_CFG80211=m
+CONFIG_MAC80211=m
+CONFIG_WLAN_VENDOR_ATH=m
+CONFIG_ATH9K_HTC=m
+CONFIG_STAGING=y
+CONFIG_R8188EU=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..d2b64de67
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/x86-extra-graphic-devices.cfg
@@ -0,0 +1,40 @@
+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=m
+CONFIG_DRM_VMWGFX_FBCON=y
+CONFIG_DRM_GMA500=m
+CONFIG_DRM_GMA600=y
+CONFIG_DRM_GMA3600=y
+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..19c57796e
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/x86-usb-devices.cfg
@@ -0,0 +1,82 @@
+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_WILINK_PLATFORM_DATA=y
+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-platform/images/agl-image-boot.bb b/meta-agl-core/recipes-platform/images/agl-image-boot.bb
new file mode 100644
index 000000000..84cdbcf31
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-boot.bb
@@ -0,0 +1,9 @@
+SUMMARY = "An AGL small image just capable of allowing a device to boot."
+
+require agl-image-boot.inc
+
+LICENSE = "MIT"
+
+IMAGE_INSTALL_append = "\
+ packagegroup-agl-image-boot \
+ "
diff --git a/meta-agl-core/recipes-platform/images/agl-image-boot.inc b/meta-agl-core/recipes-platform/images/agl-image-boot.inc
new file mode 100644
index 000000000..825393978
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-boot.inc
@@ -0,0 +1,10 @@
+IMAGE_LINGUAS = " "
+
+inherit core-image
+
+IMAGE_INSTALL = "${CORE_IMAGE_EXTRA_INSTALL}"
+
+IMAGE_ROOTFS_SIZE ?= "8192"
+
+# Allow extra IMAGE_FSTYPES to be added by boards configs
+IMAGE_FSTYPES += "${AGL_EXTRA_IMAGE_FSTYPES}"
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..3855b3c23
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-core-autobuilder.bb
@@ -0,0 +1,18 @@
+SUMMARY = "A very basic Wayland image with a terminal"
+
+require agl-image-weston.inc
+
+LICENSE = "MIT"
+
+IMAGE_INSTALL_append = "\
+ packagegroup-agl-profile-graphical \
+ busybox \
+ psplash \
+ gdb \
+ gperf \
+ weston \
+ weston-examples \
+ curl \
+ ptest-runner \
+ libsoup-2.4 \
+ "
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..8c5aae1bf
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Cross SDK of Full AGL Distribution for core profile"
+
+DESCRIPTION = "SDK image for full AGL Distribution for IVI profile. \
+It includes the full meta-toolchain, plus developement headers and libraries \
+to form a standalone cross SDK."
+
+require agl-image-minimal.bb
+
+LICENSE = "MIT"
+
+require agl-image-minimal-crosssdk.inc
+
+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/recipes-platform/images/agl-image-minimal-crosssdk.inc b/meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.inc
new file mode 100644
index 000000000..a69e698a1
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.inc
@@ -0,0 +1,24 @@
+IMAGE_FEATURES_append = " dev-pkgs"
+IMAGE_INSTALL_append = " kernel-dev kernel-devsrc"
+
+
+
+
+
+
+# FIXME:
+# Always include the test widgets
+#IMAGE_FEATURES_append = " agl-test-wgt"
+#
+# Required dependencies for app and test builds
+#TOOLCHAIN_HOST_TASK += " \
+# nativesdk-lua \
+# "
+#
+# Required dependencies for app and test builds
+#TOOLCHAIN_TARGET_TASK += " \
+# lua-dev \
+# lua-staticdev \
+# libafb-helpers-staticdev \
+# libappcontroller-staticdev \
+# "
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..1fd213d0f
--- /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."
+
+require agl-image-minimal.inc
+
+LICENSE = "MIT"
+
+IMAGE_INSTALL_append = "\
+ packagegroup-agl-image-minimal \
+ "
diff --git a/meta-agl-core/recipes-platform/images/agl-image-minimal.inc b/meta-agl-core/recipes-platform/images/agl-image-minimal.inc
new file mode 100644
index 000000000..825393978
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-minimal.inc
@@ -0,0 +1,10 @@
+IMAGE_LINGUAS = " "
+
+inherit core-image
+
+IMAGE_INSTALL = "${CORE_IMAGE_EXTRA_INSTALL}"
+
+IMAGE_ROOTFS_SIZE ?= "8192"
+
+# Allow extra IMAGE_FSTYPES to be added by boards configs
+IMAGE_FSTYPES += "${AGL_EXTRA_IMAGE_FSTYPES}"
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..bbb61c922
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-weston.bb
@@ -0,0 +1,9 @@
+SUMMARY = "A very basic Wayland image with a terminal"
+
+require agl-image-weston.inc
+
+LICENSE = "MIT"
+
+IMAGE_INSTALL_append = "\
+ packagegroup-agl-profile-graphical \
+ "
diff --git a/meta-agl-core/recipes-platform/images/agl-image-weston.inc b/meta-agl-core/recipes-platform/images/agl-image-weston.inc
new file mode 100644
index 000000000..cef3bf64e
--- /dev/null
+++ b/meta-agl-core/recipes-platform/images/agl-image-weston.inc
@@ -0,0 +1,7 @@
+require recipes-platform/images/agl-image-minimal.inc
+
+IMAGE_FEATURES += "splash package-management ssh-server-dropbear"
+
+inherit features_check
+
+REQUIRED_DISTRO_FEATURES = "wayland"
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..5ffa4cfff
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb
@@ -0,0 +1,50 @@
+#
+# 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
+
+#
+# Set by the machine configuration with packages essential for device bootup
+#
+MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
+MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
+
+# Distro can override the following VIRTUAL-RUNTIME providers:
+VIRTUAL-RUNTIME_dev_manager ?= "udev"
+VIRTUAL-RUNTIME_login_manager ?= "busybox"
+VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
+VIRTUAL-RUNTIME_initscripts ?= "initscripts"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
+
+SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', 'busybox-hwclock', '', d)} \
+ modutils-initscripts \
+ init-ifupdown \
+ ${VIRTUAL-RUNTIME_initscripts} \
+ "
+
+RDEPENDS_${PN} = "\
+ base-files \
+ base-passwd \
+ busybox \
+ rng-tools \
+ ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
+ ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
+ netbase \
+ ${VIRTUAL-RUNTIME_login_manager} \
+ ${VIRTUAL-RUNTIME_init_manager} \
+ ${VIRTUAL-RUNTIME_dev_manager} \
+ ${VIRTUAL-RUNTIME_update-alternatives} \
+ ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
+
+RRECOMMENDS_${PN} = "\
+ tzdata \
+ ${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"
+
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..0d7bbb58b
--- /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} += "\
+ dhcp-server \
+ ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','connman','connman connman-client connman-tests \
+ connman-tools connman-ncurses connman-plugin-session-policy-local','',d)} \
+ ${@bb.utils.contains('AGL_FEATURES', 'agl-devel', '${PKGGROUP_ZEROCONF}', '', d)} \
+ "
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..72fec3ff0
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-devel.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Provides a set of tools for development for AGL DISTRO"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+RDEPENDS_${PN} = "\
+ strace \
+ ldd \
+ less \
+ vim \
+ lsof \
+ gdb \
+ valgrind \
+ perf \
+ powertop \
+ screen \
+ usbutils \
+ rsync \
+ pstree \
+ procps \
+ libxslt-bin \
+ gcc-sanitizers \
+ pciutils \
+ "
+
+# needs meta-oe present
+#RRECOMMENDS_${PN} = "\
+# jq \
+# htop \
+# tree \
+#"
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-os-commonlibs.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-os-commonlibs.bb
new file mode 100644
index 000000000..aef732838
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-os-commonlibs.bb
@@ -0,0 +1,14 @@
+SUMMARY = "The packages of middlewares for AGL IVI profile"
+DESCRIPTION = "The set of packages required by Operating System and Common libraries Subsystem"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-core-os-commonlibs \
+ "
+
+ALLOW_EMPTY_${PN} = "1"
+
+RDEPENDS_${PN} += "\
+ "
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-security.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-security.bb
new file mode 100644
index 000000000..0ae5c77a3
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-security.bb
@@ -0,0 +1,14 @@
+SUMMARY = "The packages of middlewares for AGL IVI profile"
+DESCRIPTION = "The set of packages required by Operating System and Common libraries Subsystem"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-core-security \
+ "
+
+ALLOW_EMPTY_${PN} = "1"
+
+RDEPENDS_${PN} += "\
+ "
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bb
new file mode 100644
index 000000000..cd37cb7d5
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bb
@@ -0,0 +1,16 @@
+SUMMARY = "The software for application framework of AGL IVI profile"
+DESCRIPTION = "A set of packages belong to AGL application framework which required by \
+Multimedia Subsystem"
+
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-graphical-multimedia \
+ "
+
+RDEPENDS_${PN} += "\
+ alsa-utils \
+ gstreamer1.0-meta-base \
+ "
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..6d3435d99
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "The minimal set of packages required for Wayland support"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-graphical-weston \
+ "
+
+ALLOW_EMPTY_${PN} = "1"
+
+RDEPENDS_${PN} += " \
+ weston \
+ weston-init \
+ weston-examples \
+ "
+
diff --git a/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-boot.bb b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-boot.bb
new file mode 100644
index 000000000..afa04e7a1
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-boot.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "The minimal set of packages required by AGL"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-image-boot \
+ "
+
+ALLOW_EMPTY_${PN} = "1"
+
+RDEPENDS_${PN} += "\
+ packagegroup-agl-core-boot \
+ packagegroup-machine-base \
+ "
+
+RDEPENDS_${PN} += "\
+ "
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..45107ed9c
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb
@@ -0,0 +1,24 @@
+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-machine-base \
+ "
+
+RDEPENDS_${PN} += "\
+ packagegroup-agl-core-connectivity \
+ packagegroup-agl-core-os-commonlibs \
+ packagegroup-agl-core-security \
+ "
+
+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..bfc5e19e8
--- /dev/null
+++ b/meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb
@@ -0,0 +1,22 @@
+SUMMARY = "The middleware for AGL IVI profile"
+DESCRIPTION = "The set of packages required for AGL IVI Distribution"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-profile-graphical \
+ profile-graphical \
+ "
+
+ALLOW_EMPTY_${PN} = "1"
+
+RDEPENDS_${PN} += "\
+ packagegroup-agl-image-minimal \
+ packagegroup-agl-graphical-weston \
+ packagegroup-agl-graphical-multimedia \
+"
+# FIXME: Removed due to issues building against weston 5.0.0:
+# waltham-transmitter
+
+RDEPENDS_profile-graphical = "${PN}"
diff --git a/meta-agl-core/recipes-support/libsoup/libsoup-2.4_%.bbappend b/meta-agl-core/recipes-support/libsoup/libsoup-2.4_%.bbappend
new file mode 100644
index 000000000..06651fc11
--- /dev/null
+++ b/meta-agl-core/recipes-support/libsoup/libsoup-2.4_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OECONF_append_class-native = " --disable-tls-check"
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..6232c4fa4
--- /dev/null
+++ b/meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch
@@ -0,0 +1,140 @@
+From 11b29ce444610a07067a89b38e9e85c2162bbf67 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 7/7] [WIP] 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.
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+[updated for ptest-runner 2.3.2]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+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 01d60f7..165370f 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"
+@@ -74,8 +75,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.directory);
+@@ -122,6 +124,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 a8ba190..19f9efa 100644
+--- a/utils.c
++++ b/utils.c
+@@ -47,6 +47,7 @@
+
+ #include "ptest_list.h"
+ #include "utils.h"
++#include "flags.h"
+
+ #define GET_STIME_BUF_SIZE 1024
+ #define WAIT_CHILD_POLL_TIMEOUT_MS 200
+@@ -439,6 +440,7 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+ fprintf(fp, "START: %s\n", progname);
+ PTEST_LIST_ITERATE_START(head, p)
+ char *ptest_dir = strdup(p->run_ptest);
++ char *ptest = strdup(p->ptest);
+ if (ptest_dir == NULL) {
+ rc = -1;
+ break;
+@@ -480,11 +482,15 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
+ int status;
+ int fds[2]; fds[0] = pipefd_stdout[0]; fds[1] = pipefd_stderr[0];
+ FILE *fps[2]; fps[0] = fp; fps[1] = fp_stderr;
++ char result[5]; // pass\0, fail\0, skip\0
+
+ if (setpgid(child, pgid) == -1) {
+ fprintf(fp, "ERROR: setpgid() failed, %s\n", strerror(errno));
+ }
+
++ if (opts.flags & LAVA_SIGNAL_ENABLE) {
++ fprintf(stdout, "<LAVA_SIGNAL_STARTTC %s>\n", ptest);
++ }
+ sttime = time(NULL);
+ fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, sttime));
+ fprintf(fp, "BEGIN: %s\n", ptest_dir);
+@@ -506,6 +512,14 @@ 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, entime));
++ if (opts.flags & LAVA_SIGNAL_ENABLE) {
++ 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);
++ }
+ }
+ PTEST_LIST_ITERATE_END
+ fprintf(fp, "STOP: %s\n", progname);
+diff --git a/utils.h b/utils.h
+index aa53707..df11e24 100644
+--- a/utils.h
++++ b/utils.h
+@@ -39,9 +39,9 @@ struct ptest_options {
+ 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 *);
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..1dcbe0b7b
--- /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-feature-enabled.sh b/meta-agl-core/scripts/run-yocto-check-layer-feature-enabled.sh
new file mode 100755
index 000000000..93403b974
--- /dev/null
+++ b/meta-agl-core/scripts/run-yocto-check-layer-feature-enabled.sh
@@ -0,0 +1,50 @@
+#!/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 do not import
+DISTRO_FEATURES_append = " systemd smack"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
+VIRTUAL-RUNTIME_init_manager = "systemd"
+
+# workaround:
+# ERROR: Nothing PROVIDES 'smack' (but /home/dl9pf/AGL/master-newlayout/external/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2020.3.bb DEPENDS on or otherwise requires it)
+BBMASK += "meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2020.3.bb"
+
+AGL_FEATURES += "aglcore"
+
+EOF
+
+
+yocto-check-layer \
+ --dependency \
+ $AGLROOT/external/meta-openembedded/meta-oe \
+ -- \
+ $AGLROOT/meta-agl/meta-agl-core
+
+
+[ $? = 0 ] && rm -rf ${TMPROOT}/testbuild-ycl
+
+exit 0
+
+ --dependency \
+ $AGLROOT/external/meta-openembedded/meta-oe \
+ $AGLROOT/external/meta-openembedded/meta-python \
+ $AGLROOT/external/meta-openembedded/meta-networking \
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..9082be920
--- /dev/null
+++ b/meta-agl-core/scripts/run-yocto-check-layer.sh
@@ -0,0 +1,48 @@
+#!/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 do not import
+DISTRO_FEATURES_append = " systemd smack"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
+VIRTUAL-RUNTIME_init_manager = "systemd"
+
+# workaround:
+# ERROR: Nothing PROVIDES 'smack' (but /home/dl9pf/AGL/master-newlayout/external/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2020.3.bb DEPENDS on or otherwise requires it)
+BBMASK += "meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2020.3.bb"
+
+EOF
+
+
+yocto-check-layer \
+ --dependency \
+ $AGLROOT/external/meta-openembedded/meta-oe \
+ -- \
+ $AGLROOT/meta-agl/meta-agl-core
+
+
+[ $? = 0 ] && rm -rf ${TMPROOT}/testbuild-ycl
+
+exit 0
+
+ --dependency \
+ $AGLROOT/external/meta-openembedded/meta-oe \
+ $AGLROOT/external/meta-openembedded/meta-python \
+ $AGLROOT/external/meta-openembedded/meta-networking \