aboutsummaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-11-03 15:29:15 -0400
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-11-22 10:07:25 +0000
commit9691b89fd8a0014b7d57c9fc35cf75bfe8da1577 (patch)
tree0cbc41ae0a0c0d4a38e5952f4678c0831fbe6cb7 /meta-agl-bsp
parent5692de99c4e04d51a6c5da86fea1710d55420873 (diff)
Rework Linux Kernel fragment applications
- All kernel recipes must inherit linux-agl.inc - All kernel recipes for a given version (e.g. 4.9) should include linux-VER-agl.inc in order to avoid duplication (such as the SMACK label patch or security fixes) - We enforce having merge_config.sh be invoked at the end, in order to make sure fragments will be applied. - Add a new fragment for Raspberry Pi to ensure the Pi Touchscreen is still enabled. With all of the above, we fix a number of minor issues as well, such as platforms manually enabling NBD/RAMDISK for netboot as the previous logic was not working in all cases. Bug-AGL: SPEC-946 Change-Id: Ic688e899df5861d83712af12d8e1c6c3c9643300 Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/12063 Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> Reviewed-by: José Bollo <jobol@nonadev.net> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-bsp')
-rw-r--r--meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/btusb.cfg4
-rw-r--r--meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/hid.cfg3
-rw-r--r--meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/rtl_sdr.cfg5
-rw-r--r--meta-agl-bsp/meta-boundary/recipes-kernel/linux/linux-boundary_4.1.15.bbappend34
-rw-r--r--meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ath9k_htc.cfg6
-rw-r--r--meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/btusb.cfg6
-rw-r--r--meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ramblock_nbd.cfg2
-rw-r--r--meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/rtl_sdr.cfg5
-rw-r--r--meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend92
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9%.bbappend8
-rw-r--r--meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/ath9k_htc.cfg4
-rw-r--r--meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend36
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch49
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-panel.cfg1
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend95
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch49
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/ath9k_htc.cfg2
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend13
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend11
-rw-r--r--meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/ath9k_htc.cfg2
-rw-r--r--meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/rtl_sdr.cfg4
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch49
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/files/ath9k_htc.cfg4
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/files/btusb.cfg6
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/files/ramblock_nbd.cfg2
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/files/rtl_sdr.cfg5
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend41
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux-%.bbappend8
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux-4.9/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch (renamed from meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc (renamed from meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bbappend)4
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux-agl.inc71
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux-yocto/ath9k_htc.cfg4
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux-yocto/fanotify.cfg3
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux-yocto/hid.cfg1
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux-yocto/rtl_sdr.cfg4
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux-yocto/uinput.cfg3
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg (renamed from meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/ath9k_htc.cfg)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg (renamed from meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/bluetooth.cfg)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg (renamed from meta-agl-bsp/recipes-kernel/linux/linux-yocto/drm.cfg)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg (renamed from meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/fanotify.cfg)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg (renamed from meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/hid.cfg)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg (renamed from meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/nbd.cfg)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg (renamed from meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/ramdisk.cfg)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg (renamed from meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/rtl_sdr.cfg)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg (renamed from meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/uinput.cfg)0
-rw-r--r--meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg (renamed from meta-agl-bsp/recipes-kernel/linux/linux-yocto/vbox-vmware-sata.cfg)0
46 files changed, 83 insertions, 553 deletions
diff --git a/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/btusb.cfg b/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/btusb.cfg
deleted file mode 100644
index 9c2a82d99..000000000
--- a/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/btusb.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_BT_INTEL=m
-CONFIG_BT_BCM=m
-CONFIG_BT_HCIBTUSB=m
-CONFIG_BT_HCIBTUSB_BCM=y \ No newline at end of file
diff --git a/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/hid.cfg b/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/hid.cfg
deleted file mode 100644
index 95de5181e..000000000
--- a/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/hid.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-CONFIG_USB_HID=y
-# CONFIG_HID_PID is not set
-CONFIG_HID_MULTITOUCH=y
diff --git a/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/rtl_sdr.cfg b/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/rtl_sdr.cfg
deleted file mode 100644
index df5a871ef..000000000
--- a/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/rtl_sdr.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-CONFIG_I2C_MUX=y
-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-bsp/meta-boundary/recipes-kernel/linux/linux-boundary_4.1.15.bbappend b/meta-agl-bsp/meta-boundary/recipes-kernel/linux/linux-boundary_4.1.15.bbappend
index 5dbd457df..88ac94b15 100644
--- a/meta-agl-bsp/meta-boundary/recipes-kernel/linux/linux-boundary_4.1.15.bbappend
+++ b/meta-agl-bsp/meta-boundary/recipes-kernel/linux/linux-boundary_4.1.15.bbappend
@@ -1,33 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-DEPENDS += "kern-tools-native"
-
-# Enable support for AR9271
-SRC_URI_append = " file://ath9k_htc.cfg"
-
-# Enable support for Bluetooth HCI USB devices
-SRC_URI_append = " file://btusb.cfg"
-
-# Enable support for Bluetooth HCI USB devices
-SRC_URI_append = " file://btusb.cfg"
-
-# Enable support for HID multitouch
-SRC_URI_append = " file://hid.cfg"
-
-# Enable support for RTLSDR
-SRC_URI_append = " file://rtl_sdr.cfg"
-
-# 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_prepend () {
- cp -a ${WORKDIR}/defconfig .config
- merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
-} \ No newline at end of file
+require recipes-kernel/linux/linux-agl.inc
diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ath9k_htc.cfg b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ath9k_htc.cfg
deleted file mode 100644
index 001587bcd..000000000
--- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ath9k_htc.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-# build errors if built as module
-#CONFIG_CFG80211=m
-CONFIG_CFG80211=y
-CONFIG_MAC80211=m
-CONFIG_ATH_CARDS=m
-CONFIG_ATH9K_HTC=m
diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/btusb.cfg b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/btusb.cfg
deleted file mode 100644
index 5f18d8223..000000000
--- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/btusb.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-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
diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ramblock_nbd.cfg b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ramblock_nbd.cfg
deleted file mode 100644
index ef498669d..000000000
--- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ramblock_nbd.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_NBD=y
diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/rtl_sdr.cfg b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/rtl_sdr.cfg
deleted file mode 100644
index df5a871ef..000000000
--- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/rtl_sdr.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-CONFIG_I2C_MUX=y
-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-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend
index da6316a0a..5d5549f0a 100644
--- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend
+++ b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend
@@ -1,67 +1,8 @@
-# Borrowed fragments logic from linaro kernel configuration
-
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-KERNEL_CONFIG_FRAGMENTS ?= ""
-
-kernel_conf_variable() {
- CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
- if test "$2" = "n"
- then
- echo "# CONFIG_$1 is not set" >> ${B}/.config
- else
- echo "CONFIG_$1=$2" >> ${B}/.config
- fi
-}
-
-do_configure_append() {
-
- CONF_SED_SCRIPT=""
-
- # kernel_conf_variable NAME y/n lines here
- if [ -f '${WORKDIR}/defconfig' ]; then
- sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
- else
- sed -e "${CONF_SED_SCRIPT}" < '${KERNEL_DEFCONFIG}' >> '${B}/.config'
- fi
-
- # Check for kernel config fragments. The assumption is that the config
- # fragment will be specified with the absolute path. For example:
- # * ${WORKDIR}/config1.cfg
- # * ${S}/config2.cfg
- # Iterate through the list of configs and make sure that you can find
- # each one. If not then error out.
- # NOTE: If you want to override a configuration that is kept in the kernel
- # with one from the OE meta data then you should make sure that the
- # OE meta data version (i.e. ${WORKDIR}/config1.cfg) is listed
- # after the in kernel configuration fragment.
- # Check if any config fragments are specified.
- if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ]
- then
- for f in ${KERNEL_CONFIG_FRAGMENTS}
- do
- # Check if the config fragment was copied into the WORKDIR from
- # the OE meta data
- if [ ! -e "$f" ]
- then
- echo "Could not find kernel config fragment $f"
- exit 1
- fi
- done
-
-# # Now that all the fragments are located merge them.
-# ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
-#
-
- cat ${KERNEL_CONFIG_FRAGMENTS} >> ${B}/.config
- fi
-
- yes '' | oe_runmake -C ${S} O=${B} oldconfig
- oe_runmake -C ${S} O=${B} savedefconfig && cp ${B}/defconfig ${WORKDIR}/defconfig.saved
-}
+require recipes-kernel/linux/linux-agl.inc
# Make sure these are enabled so that AGL configurations work
-
SRC_URI_append = " file://tmpfs.cfg"
KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/tmpfs.cfg"
SRC_URI_append = " file://namespace.cfg"
@@ -69,40 +10,9 @@ KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/namespace.cfg"
SRC_URI_append = " file://cgroup.cfg"
KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cgroup.cfg"
-# Fragments common to AGL demo platform (make sure they are added)
-
-# Enable support for USB HID touch display
-SRC_URI_append = " file://touchscreen.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/touchscreen.cfg"
-
-# Enable support for TP-Link TL-W722N USB Wifi adapter
-SRC_URI_append = " file://ath9k_htc.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ath9k_htc.cfg"
-
-# Enable support for RTLSDR
-SRC_URI_append = " file://rtl_sdr.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg"
-
-# Enable support for Bluetooth HCI USB devices
-SRC_URI_append = " file://btusb.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/btusb.cfg"
-
#-------------------------------------------------------------------------
# smack patches for handling bluetooth
SRC_URI_append_smack = "\
file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \
"
-
-# Enable support for smack
-KERNEL_CONFIG_FRAGMENTS_append_smack = "\
- ${WORKDIR}/audit.cfg \
- ${WORKDIR}/smack.cfg \
- ${WORKDIR}/smack-default-lsm.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"
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9%.bbappend b/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9%.bbappend
index ce600f50c..361abad32 100644
--- a/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9%.bbappend
+++ b/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9%.bbappend
@@ -1,5 +1,7 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+require recipes-kernel/linux/linux-agl-4.9.inc
+
# adding most supported USB Bluetooth, Wifi, and Ethernet devices
SRC_URI_append = " file://usb-devices.cfg"
KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/usb-devices.cfg"
@@ -8,12 +10,6 @@ KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/usb-devices.cfg"
SRC_URI_append = " file://extra-graphic-devices.cfg"
KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/extra-graphic-devices.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"
-
# Ensure we have a startup.nsh file
SRC_URI_append = " file://startup.nsh"
diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/ath9k_htc.cfg b/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/ath9k_htc.cfg
deleted file mode 100644
index 6f7d49880..000000000
--- a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/ath9k_htc.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_CFG80211=m
-CONFIG_MAC80211=m
-CONFIG_ATH_CARDS=m
-CONFIG_ATH9K_HTC=m
diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend b/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend
index 8897805c7..17c8f3f0d 100644
--- a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend
+++ b/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend
@@ -1,36 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-# smack patches for handling bluetooth
-SRC_URI_append_smack = "\
- file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \
-"
-
-# Extra configuration options
-SRC_URI += "file://fanotify.cfg \
- file://uinput.cfg \
- file://hid.cfg "
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/fanotify.cfg ${WORKDIR}/uinput.cfg ${WORKDIR}/hid.cfg"
-
-# Enable support for TP-Link TL-W722N USB Wifi adapter
-SRC_URI += " file://ath9k_htc.cfg "
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ath9k_htc.cfg"
-
-# Enable support for RTLSDR
-SRC_URI += " file://rtl_sdr.cfg "
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg"
-
-# Enable support for smack
-KERNEL_CONFIG_FRAGMENTS_append_smack = "\
- ${WORKDIR}/audit.cfg \
- ${WORKDIR}/smack.cfg \
- ${WORKDIR}/smack-default-lsm.cfg \
-"
-
-# file comes out of meta-agl-bsp/recipes-kernel/linux/linux_%.bbappend
-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"
+require recipes-kernel/linux/linux-agl.inc
+require recipes-kernel/linux/linux-agl-4.9.inc
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch
deleted file mode 100644
index a1eeac3d7..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From c8bbb0f916de54610513e376070aea531af19dd6 Mon Sep 17 00:00:00 2001
-From: jooseong lee <jooseong.lee@samsung.com>
-Date: Thu, 3 Nov 2016 10:55:43 +0100
-Subject: [PATCH 4/4] Smack: Assign smack_known_web label for kernel thread's
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Assign smack_known_web label for kernel thread's socket in the sk_alloc_security hook
-
-Creating struct sock by sk_alloc function in various kernel subsystems
-like bluetooth dosen't call smack_socket_post_create(). In such case,
-received sock label is the floor('_') label and makes access deny.
-
-Refers-to: https://review.tizen.org/gerrit/#/c/80717/4
-
-Change-Id: I2e5c9359bfede84a988fd4d4d74cdb9dfdfc52d8
-Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
-Signed-off-by: José Bollo <jose.bollo@iot.bzh>
----
- security/smack/smack_lsm.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
-index cf8a93f..21651bc 100644
---- a/security/smack/smack_lsm.c
-+++ b/security/smack/smack_lsm.c
-@@ -2321,8 +2321,16 @@ static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags)
- if (ssp == NULL)
- return -ENOMEM;
-
-- ssp->smk_in = skp;
-- ssp->smk_out = skp;
-+ /*
-+ * Sockets created by kernel threads receive web label.
-+ */
-+ if (unlikely(current->flags & PF_KTHREAD)) {
-+ ssp->smk_in = &smack_known_web;
-+ ssp->smk_out = &smack_known_web;
-+ } else {
-+ ssp->smk_in = skp;
-+ ssp->smk_out = skp;
-+ }
- ssp->smk_packet = NULL;
-
- sk->sk_security = ssp;
---
-2.7.4
-
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-panel.cfg b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-panel.cfg
new file mode 100644
index 000000000..8c573578c
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-panel.cfg
@@ -0,0 +1 @@
+CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=y
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
index 37066068b..d9f843e9c 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
@@ -1,97 +1,12 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+require recipes-kernel/linux/linux-agl.inc
+require recipes-kernel/linux/linux-agl-4.9.inc
+
SRC_URI_append = "\
${@base_conditional('USE_FAYTECH_MONITOR', '1', 'file://0002-faytech-fix-rpi.patch', '', d)} \
"
-do_configure_append_smack() {
- # SMACK and Co
- kernel_configure_variable IP_NF_SECURITY m
- kernel_configure_variable IP6_NF_SECURITY m
- kernel_configure_variable EXT2_FS_SECURITY y
- kernel_configure_variable EXT3_FS_SECURITY y
- kernel_configure_variable EXT4_FS_SECURITY y
- kernel_configure_variable SECURITY y
- kernel_configure_variable SECURITY_SMACK y
- kernel_configure_variable TMPFS_XATTR y
- kernel_configure_variable DEFAULT_SECURITY "smack"
- kernel_configure_variable DEFAULT_SECURITY_SMACK y
- kernel_configure_variable FANOTIFY_ACCESS_PERMISSIONS y
-}
-
-do_configure_append_netboot() {
- # NBD for netboot
- kernel_configure_variable BLK_DEV_NBD y
- # ramblk for inird
- kernel_configure_variable BLK_DEV_RAM y
-}
-
-do_configure_append_sota() {
- # ramblk for inird
- kernel_configure_variable BLK_DEV_RAM y
-}
-
-# can
-do_configure_append() {
-
- kernel_configure_variable TASKSTATS y
- kernel_configure_variable TASK_DELAY_ACCT y
- kernel_configure_variable USER_RETURN_NOTIFIER y
- kernel_configure_variable PREEMPT_NOTIFIERS y
- kernel_configure_variable CAN m
- kernel_configure_variable CAN_RAW m
- kernel_configure_variable CAN_BCM m
- kernel_configure_variable CAN_GW m
- kernel_configure_variable CAN_VCAN m
- kernel_configure_variable CAN_SLCAN m
- kernel_configure_variable CAN_DEV m
- kernel_configure_variable CAN_CALC_BITTIMING y
- kernel_configure_variable CAN_MCP251X m
- kernel_configure_variable CAN_ESD_USB2 m
- kernel_configure_variable CAN_GS_USB m
- kernel_configure_variable CAN_KVASER_USB m
- kernel_configure_variable CAN_PEAK_USB m
- kernel_configure_variable CAN_8DEV_USB m
-
-# not enabled, yet ?
-# kernel_configure_variable CAN_LEDS is not set
-# kernel_configure_variable CAN_SJA1000 is not set
-# kernel_configure_variable CAN_C_CAN is not set
-# kernel_configure_variable CAN_M_CAN is not set
-# kernel_configure_variable CAN_CC770 is not set
-# kernel_configure_variable CAN_EMS_USB is not set
-# kernel_configure_variable CAN_SOFTING is not set
-# kernel_configure_variable CAN_DEBUG_DEVICES is not set
-}
-
-do_configure_append() {
-
- # VC4 Wayland/Weston
- kernel_configure_variable I2C_BCM2835 y
- kernel_configure_variable DRM y
- kernel_configure_variable DRM_PANEL_RASPBERRYPI_TOUCHSCREEN y
- kernel_configure_variable DRM_VC4 y
- kernel_configure_variable FB_BCM2708 n
-
- # Enable support for TP-Link TL-W722N USB Wifi adapter
- kernel_configure_variable ATH_CARDS m
- kernel_configure_variable ATH9K_HTC m
-
- # Enable support for RTLSDR
- kernel_configure_variable MEDIA_USB_SUPPORT y
- kernel_configure_variable MEDIA_DIGITAL_TV_SUPPORT y
- kernel_configure_variable DVB_USB_V2 m
- kernel_configure_variable DVB_USB_RTL28XXU m
-
- # KEEP until fixed upstream:
- # Keep this the last line
- # Remove all modified configs and add the rest to .config
- sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
-
- yes '' | oe_runmake oldconfig
- kernel_do_configure
-}
-
CMDLINE_DEBUG = ""
CMDLINE_append = " usbhid.mousepoll=0"
@@ -109,3 +24,7 @@ KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uvc.cfg"
# Enable support for joystick devices
KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/joystick.cfg"
+
+# Enable support for Pi foundation touchscreen
+SRC_URI_append = " file://raspberrypi-panel.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi-panel.cfg"
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch
deleted file mode 100644
index a1eeac3d7..000000000
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From c8bbb0f916de54610513e376070aea531af19dd6 Mon Sep 17 00:00:00 2001
-From: jooseong lee <jooseong.lee@samsung.com>
-Date: Thu, 3 Nov 2016 10:55:43 +0100
-Subject: [PATCH 4/4] Smack: Assign smack_known_web label for kernel thread's
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Assign smack_known_web label for kernel thread's socket in the sk_alloc_security hook
-
-Creating struct sock by sk_alloc function in various kernel subsystems
-like bluetooth dosen't call smack_socket_post_create(). In such case,
-received sock label is the floor('_') label and makes access deny.
-
-Refers-to: https://review.tizen.org/gerrit/#/c/80717/4
-
-Change-Id: I2e5c9359bfede84a988fd4d4d74cdb9dfdfc52d8
-Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
-Signed-off-by: José Bollo <jose.bollo@iot.bzh>
----
- security/smack/smack_lsm.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
-index cf8a93f..21651bc 100644
---- a/security/smack/smack_lsm.c
-+++ b/security/smack/smack_lsm.c
-@@ -2321,8 +2321,16 @@ static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags)
- if (ssp == NULL)
- return -ENOMEM;
-
-- ssp->smk_in = skp;
-- ssp->smk_out = skp;
-+ /*
-+ * Sockets created by kernel threads receive web label.
-+ */
-+ if (unlikely(current->flags & PF_KTHREAD)) {
-+ ssp->smk_in = &smack_known_web;
-+ ssp->smk_out = &smack_known_web;
-+ } else {
-+ ssp->smk_in = skp;
-+ ssp->smk_out = skp;
-+ }
- ssp->smk_packet = NULL;
-
- sk->sk_security = ssp;
---
-2.7.4
-
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/ath9k_htc.cfg b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/ath9k_htc.cfg
deleted file mode 100644
index 965dede65..000000000
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/ath9k_htc.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_ATH_CARDS=m
-CONFIG_ATH9K_HTC=m
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend
index 460fde34f..9bf8f8aa0 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend
@@ -1,15 +1,8 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+require recipes-kernel/linux/linux-agl.inc
+require recipes-kernel/linux/linux-agl-4.9.inc
+
SRC_URI_append = " file://namespace_fix.cfg \
- file://nbd.cfg \
- file://ramdisk.cfg \
- file://bluetooth.cfg \
- file://ath9k_htc.cfg \
file://disable_ipv6.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"
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend
index 634a91233..339e3b5bc 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend
@@ -1,18 +1,9 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
#-------------------------------------------------------------------------
-# smack patches for handling bluetooth
-
-SRC_URI_append_smack = "\
- file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \
-"
-
-
-#-------------------------------------------------------------------------
# Fix for CVE-2017-1000364 by backporting the upstream patches.
-
SRC_URI_append = "\
file://0001-mm-larger-stack-guard-gap-between-vmas.patch \
file://0002-Allow-stack-to-grow-up-to-address-space-limit.patch \
file://0003-mm-fix-new-crash-in-unmapped_area_topdown.patch \
-"
+ "
diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/ath9k_htc.cfg b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/ath9k_htc.cfg
deleted file mode 100644
index 965dede65..000000000
--- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/ath9k_htc.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_ATH_CARDS=m
-CONFIG_ATH9K_HTC=m
diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/rtl_sdr.cfg b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/rtl_sdr.cfg
deleted file mode 100644
index d4574700a..000000000
--- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/rtl_sdr.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-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-bsp/meta-ti/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch
deleted file mode 100644
index a1eeac3d7..000000000
--- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From c8bbb0f916de54610513e376070aea531af19dd6 Mon Sep 17 00:00:00 2001
-From: jooseong lee <jooseong.lee@samsung.com>
-Date: Thu, 3 Nov 2016 10:55:43 +0100
-Subject: [PATCH 4/4] Smack: Assign smack_known_web label for kernel thread's
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Assign smack_known_web label for kernel thread's socket in the sk_alloc_security hook
-
-Creating struct sock by sk_alloc function in various kernel subsystems
-like bluetooth dosen't call smack_socket_post_create(). In such case,
-received sock label is the floor('_') label and makes access deny.
-
-Refers-to: https://review.tizen.org/gerrit/#/c/80717/4
-
-Change-Id: I2e5c9359bfede84a988fd4d4d74cdb9dfdfc52d8
-Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
-Signed-off-by: José Bollo <jose.bollo@iot.bzh>
----
- security/smack/smack_lsm.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
-index cf8a93f..21651bc 100644
---- a/security/smack/smack_lsm.c
-+++ b/security/smack/smack_lsm.c
-@@ -2321,8 +2321,16 @@ static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags)
- if (ssp == NULL)
- return -ENOMEM;
-
-- ssp->smk_in = skp;
-- ssp->smk_out = skp;
-+ /*
-+ * Sockets created by kernel threads receive web label.
-+ */
-+ if (unlikely(current->flags & PF_KTHREAD)) {
-+ ssp->smk_in = &smack_known_web;
-+ ssp->smk_out = &smack_known_web;
-+ } else {
-+ ssp->smk_in = skp;
-+ ssp->smk_out = skp;
-+ }
- ssp->smk_packet = NULL;
-
- sk->sk_security = ssp;
---
-2.7.4
-
diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/ath9k_htc.cfg b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/ath9k_htc.cfg
deleted file mode 100644
index 6f7d49880..000000000
--- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/ath9k_htc.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_CFG80211=m
-CONFIG_MAC80211=m
-CONFIG_ATH_CARDS=m
-CONFIG_ATH9K_HTC=m
diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/btusb.cfg b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/btusb.cfg
deleted file mode 100644
index 5f18d8223..000000000
--- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/btusb.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-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
diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/ramblock_nbd.cfg b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/ramblock_nbd.cfg
deleted file mode 100644
index ef498669d..000000000
--- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/ramblock_nbd.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_NBD=y
diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/rtl_sdr.cfg b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/rtl_sdr.cfg
deleted file mode 100644
index df5a871ef..000000000
--- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/rtl_sdr.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-CONFIG_I2C_MUX=y
-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-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend b/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend
index 6a5f4f4d2..283e8b778 100644
--- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend
+++ b/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend
@@ -1,41 +1,4 @@
require recipes-kernel/linux/linux-dtb.inc
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-SRC_URI_append = " file://ramblock_nbd.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ramblock_nbd.cfg"
-
-# Enable support for TP-Link TL-W722N USB Wifi adapter
-SRC_URI_append = " file://ath9k_htc.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ath9k_htc.cfg"
-
-# Enable support for RTLSDR
-SRC_URI_append = " file://rtl_sdr.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg"
-
-# Enable support for Bluetooth HCI USB devices
-SRC_URI_append = " file://btusb.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/btusb.cfg"
-
-#-------------------------------------------------------------------------
-# smack patches for handling bluetooth
-
-SRC_URI_append_smack = "\
- file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \
-"
-
-# Enable support for smack
-KERNEL_CONFIG_FRAGMENTS_append_smack = "\
- ${WORKDIR}/audit.cfg \
- ${WORKDIR}/smack.cfg \
- ${WORKDIR}/smack-default-lsm.cfg \
-"
-
-# file comes out of meta-agl-bsp/recipes-kernel/linux/linux_%.bbappend
-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"
+require recipes-kernel/linux/linux-agl.inc
+require recipes-kernel/linux/linux-agl-4.9.inc
diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-%.bbappend b/meta-agl-bsp/recipes-kernel/linux/linux-%.bbappend
deleted file mode 100644
index f64e49ae0..000000000
--- a/meta-agl-bsp/recipes-kernel/linux/linux-%.bbappend
+++ /dev/null
@@ -1,8 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
-
-# Extra configuration options for the AGL kernel
-SRC_URI_append = " file://can-bus.cfg \
- file://usb.cfg \
- file://uvc.cfg \
- file://joystick.cfg \
- "
diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch b/meta-agl-bsp/recipes-kernel/linux/linux-4.9/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch
index a1eeac3d7..a1eeac3d7 100644
--- a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch
+++ b/meta-agl-bsp/recipes-kernel/linux/linux-4.9/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bbappend b/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc
index 3dc9a9561..3235ff4d1 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bbappend
+++ b/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc
@@ -1,8 +1,8 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}-4.9:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-4.9:"
#-------------------------------------------------------------------------
# smack patches for handling bluetooth
SRC_URI_append_smack = "\
file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \
-"
+ "
diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc b/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc
index fcd028062..2c8dab4ad 100644
--- a/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc
+++ b/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc
@@ -1,20 +1,71 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
-# Extra configuration options for the QEMU kernel
-SRC_URI += "file://fanotify.cfg \
+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
+ 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 \
"
+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 required features for the agl-netboot feature
+SRC_URI_append_netboot = " file://nbd.cfg \
+ file://ramdisk.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/nbd.cfg ${WORKDIR}/ramdisk.cfg"
# Enable support for TP-Link TL-W722N USB Wifi adapter
-SRC_URI += " file://ath9k_htc.cfg \
- "
+SRC_URI_append = " file://ath9k_htc.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ath9k_htc.cfg"
# Enable support for RTLSDR
-SRC_URI += " file://rtl_sdr.cfg \
- "
+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"
-# disk drivers for vmdk
-SRC_URI_append_qemux86 = " file://vbox-vmware-sata.cfg "
-SRC_URI_append_qemux86-64 = " file://vbox-vmware-sata.cfg "
+# Enable support for smack
+KERNEL_CONFIG_FRAGMENTS_append_smack = "\
+ ${WORKDIR}/audit.cfg \
+ ${WORKDIR}/smack.cfg \
+ ${WORKDIR}/smack-default-lsm.cfg \
+"
diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/ath9k_htc.cfg b/meta-agl-bsp/recipes-kernel/linux/linux-yocto/ath9k_htc.cfg
deleted file mode 100644
index 6f7d49880..000000000
--- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/ath9k_htc.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_CFG80211=m
-CONFIG_MAC80211=m
-CONFIG_ATH_CARDS=m
-CONFIG_ATH9K_HTC=m
diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/fanotify.cfg b/meta-agl-bsp/recipes-kernel/linux/linux-yocto/fanotify.cfg
deleted file mode 100644
index de5dd8d31..000000000
--- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/fanotify.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-# Enable the fanotify API (notification/interception of FS events)
-CONFIG_FANOTIFY=y
-CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/hid.cfg b/meta-agl-bsp/recipes-kernel/linux/linux-yocto/hid.cfg
deleted file mode 100644
index 327c753ae..000000000
--- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/hid.cfg
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_HID_MULTITOUCH=y
diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/rtl_sdr.cfg b/meta-agl-bsp/recipes-kernel/linux/linux-yocto/rtl_sdr.cfg
deleted file mode 100644
index d4574700a..000000000
--- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/rtl_sdr.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-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-bsp/recipes-kernel/linux/linux-yocto/uinput.cfg b/meta-agl-bsp/recipes-kernel/linux/linux-yocto/uinput.cfg
deleted file mode 100644
index 7996ef1dd..000000000
--- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/uinput.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-# Enable the User-level Input driver (required by "wayland-fits")
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_UINPUT=m
diff --git a/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/ath9k_htc.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg
index 6f7d49880..6f7d49880 100644
--- a/meta-agl-bsp/meta-boundary/recipes-kernel/linux/files/ath9k_htc.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/bluetooth.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg
index dd7c460bb..dd7c460bb 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/bluetooth.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg
diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/drm.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg
index 65fe71cd0..65fe71cd0 100644
--- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/drm.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg
diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/fanotify.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg
index de5dd8d31..de5dd8d31 100644
--- a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/fanotify.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg
diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/hid.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg
index 327c753ae..327c753ae 100644
--- a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/hid.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/nbd.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg
index af37685e4..af37685e4 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/nbd.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/ramdisk.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg
index 41530dd6e..41530dd6e 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/ramdisk.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg
diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/rtl_sdr.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg
index d4574700a..d4574700a 100644
--- a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/rtl_sdr.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg
diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/uinput.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg
index 7996ef1dd..7996ef1dd 100644
--- a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/uinput.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg
diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/vbox-vmware-sata.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg
index ce1eca1a7..ce1eca1a7 100644
--- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/vbox-vmware-sata.cfg
+++ b/meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg