From 9691b89fd8a0014b7d57c9fc35cf75bfe8da1577 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 3 Nov 2017 15:29:15 -0400 Subject: Rework Linux Kernel fragment applications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/12063 Tested-by: Jenkins Job builder account Reviewed-by: José Bollo Reviewed-by: Jan-Simon Moeller --- .../recipes-kernel/linux/files/ath9k_htc.cfg | 6 -- .../recipes-kernel/linux/files/btusb.cfg | 6 -- .../recipes-kernel/linux/files/ramblock_nbd.cfg | 2 - .../recipes-kernel/linux/files/rtl_sdr.cfg | 5 -- .../recipes-kernel/linux/linux-fslc-imx_%.bbappend | 92 +--------------------- 5 files changed, 1 insertion(+), 110 deletions(-) delete mode 100644 meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ath9k_htc.cfg delete mode 100644 meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/btusb.cfg delete mode 100644 meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/ramblock_nbd.cfg delete mode 100644 meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/rtl_sdr.cfg (limited to 'meta-agl-bsp/meta-freescale-layer') 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" -- cgit 1.2.3-korg