From 74a7b60c94e21caa47334aeb975bb1af8fcb4efd Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Sun, 27 Jun 2021 14:36:00 -0400 Subject: Refactor kernel configuration fragment handling Refactor the kernel configuration fragment handling to shift all AGL applied configuration fragments into a new AGL_KCONFIG_FRAGMENTS variable that is used to generate SRC_URI and KERNEL_CONFIG_FRAGMENTS additions for the various BSPs. The intent is to make it simple to disable AGL provided configuration in downstream builds as the IC EG has expressed as a requirement. Additionally, the rework has allowed for some clean up of accumulated cruft. In practice, clearing AGL_KCONFIG_FRAGMENTS drops all non-BSP provided kernel configuration with the exception of some qemu BSP related additions required for AGL CI and some explicitly configurable things like netboot support. Notable changes: - Instead of always using AGL's own fragment merging logic on top of the BSP kernel recipe, an effort is now made to leverage the BSP recipes' own merging schemes, so there are now separate include files for kernel-yocto.bbclass and plain kernel.bbclass based kernel recipes, as well as a common include file that defines the AGL_KCONFIG_FRAGMENTS variable and its derivations. That file can be included directly in bbappends for BSP kernel recipes that use the KERNEL_CONFIG_FRAGMENTS scheme (e.g. meta-ti, meta-qcom). - The SMACK enabling configuration in meta-app-framework has been updated to supply different fragments for enabling SMACK by default for 4.x and 5.x kernels. This removes a warning from always supplying the old configuration, and allows providing a CONFIG_LSM definition to ensure over-riding any BSP modifications. This allows removing the previous hack to handle CONFIG_LSM being set in the defconfigs in linux-raspberrypi. - By request, the linux-yocto support from meta-agl-bsp/meta-core has been rationalized into meta-agl-core to improve the experience when using meta-agl-core standalone for testing. - All demo supporting kernel configuration has been removed, a subsequent change to meta-agl-demo will add it there by leveraging AGL_KCONFIG_FRAGMENTS. - The hardware device support has been split out of the can-bus.cfg fragment, in favor of shifting it to meta-agl-demo. A few other stray non-CAN configuration options have also been removed from can-bus.cfg, as they do not seem to be required. Bug-AGL: SPEC-3983 Signed-off-by: Scott Murray Change-Id: If6662fd36e26cec767b1d53b1188a74d01ef9dcf Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26460 Reviewed-by: Hiroyuki Ishii Reviewed-by: Jan-Simon Moeller Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account --- .../linux/linux-raspberrypi_%.bbappend | 40 +++++++++------------- 1 file changed, 16 insertions(+), 24 deletions(-) (limited to 'meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend') 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 5069e1ee1..75ef03bdf 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,24 +1,33 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" -require recipes-kernel/linux/linux-agl.inc +require recipes-kernel/linux/linux-yocto-agl.inc -SRC_URI_append = "\ +SRC_URI_append = " \ ${@oe.utils.conditional('USE_FAYTECH_MONITOR', '1', 'file://0002-faytech-fix-rpi.patch', '', d)} \ file://0001-mconf-menuconfig.patch \ " +# Enable support for Pi foundation touchscreen +AGL_KCONFIG_FRAGMENTS += "raspberrypi-panel.cfg" + +# Enable bt hci uart +AGL_KCONFIG_FRAGMENTS += "raspberrypi-hciuart.cfg" + +# ENABLE NETWORK (built-in) +AGL_KCONFIG_FRAGMENTS += "raspberrypi_network.cfg" + # For Xen -SRC_URI_append = "\ - ${@bb.utils.contains('AGL_XEN_WANTED','1','file://xen-be.cfg','',d)} \ +AGL_KCONFIG_FRAGMENTS += " \ + ${@bb.utils.contains('AGL_XEN_WANTED','1','xen-be.cfg','',d)} \ " -#take in account that linux under xen should use the hvc0 console +# Take in account that linux under Xen should use the hvc0 console SERIAL_OPTION = "${@bb.utils.contains('AGL_XEN_WANTED','1','hvc0','ttyS0,115200',d)}" SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=${SERIAL_OPTION}", "", d)}" CMDLINE_DEBUG = "" -# XEN related option +# Xen related option CMDLINE_append = ' ${@bb.utils.contains('AGL_XEN_WANTED','1','clk_ignore_unused','',d)}' # Workaround for crash during brcmfmac loading. Disable it at this moment @@ -32,23 +41,6 @@ CMDLINE_append = '${@oe.utils.conditional("ENABLE_CMA", "1", " coherent_pool=6M KERNEL_MODULE_AUTOLOAD += "snd-bcm2835" KERNEL_MODULE_AUTOLOAD += "hid-multitouch" -RDEPENDS_${PN} += "kernel-module-snd-bcm2835" PACKAGES += "kernel-module-snd-bcm2835" -# 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" - -# Enable support for Pi foundation touchscreen -SRC_URI_append = " file://raspberrypi-panel.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi-panel.cfg" - -# Enable bt hci uart -SRC_URI_append = " file://raspberrypi-hciuart.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi-hciuart.cfg" - -# ENABLE NETWORK (built-in) -SRC_URI_append = " file://raspberrypi_network.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi_network.cfg" +RDEPENDS_${PN} += "kernel-module-snd-bcm2835" -- cgit 1.2.3-korg