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 --- meta-agl-core/recipes-kernel/linux/linux/btusb.cfg | 32 -------------------- .../recipes-kernel/linux/linux/can-bus.cfg | 32 -------------------- meta-agl-core/recipes-kernel/linux/linux/drm.cfg | 2 -- meta-agl-core/recipes-kernel/linux/linux/hid.cfg | 1 - .../recipes-kernel/linux/linux/i2c-led.cfg | 3 -- .../recipes-kernel/linux/linux/iiodevice.cfg | 26 ----------------- .../recipes-kernel/linux/linux/joystick.cfg | 9 ------ .../recipes-kernel/linux/linux/netfilter.cfg | 1 - meta-agl-core/recipes-kernel/linux/linux/nfc.cfg | 34 ---------------------- .../recipes-kernel/linux/linux/procevent.cfg | 2 -- .../recipes-kernel/linux/linux/qemu-drm.cfg | 2 ++ .../recipes-kernel/linux/linux/qemu-virtio.cfg | 6 ++++ .../recipes-kernel/linux/linux/qemuarm.cfg | 8 +++++ meta-agl-core/recipes-kernel/linux/linux/rtc.cfg | 7 ----- .../recipes-kernel/linux/linux/rtl_sdr.cfg | 4 --- .../recipes-kernel/linux/linux/scheddebug.cfg | 1 - .../recipes-kernel/linux/linux/uinput.cfg | 3 -- meta-agl-core/recipes-kernel/linux/linux/usb.cfg | 8 ----- .../recipes-kernel/linux/linux/usbaudio.cfg | 2 -- .../recipes-kernel/linux/linux/usbmodem.cfg | 7 ----- meta-agl-core/recipes-kernel/linux/linux/uvc.cfg | 4 --- meta-agl-core/recipes-kernel/linux/linux/wifi.cfg | 6 ---- 22 files changed, 16 insertions(+), 184 deletions(-) delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/btusb.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/drm.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/hid.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/i2c-led.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/iiodevice.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/joystick.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/netfilter.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/nfc.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/procevent.cfg create mode 100644 meta-agl-core/recipes-kernel/linux/linux/qemu-drm.cfg create mode 100644 meta-agl-core/recipes-kernel/linux/linux/qemu-virtio.cfg create mode 100644 meta-agl-core/recipes-kernel/linux/linux/qemuarm.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/rtc.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/rtl_sdr.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/scheddebug.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/uinput.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/usb.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/usbaudio.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/usbmodem.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/uvc.cfg delete mode 100644 meta-agl-core/recipes-kernel/linux/linux/wifi.cfg (limited to 'meta-agl-core/recipes-kernel/linux/linux') diff --git a/meta-agl-core/recipes-kernel/linux/linux/btusb.cfg b/meta-agl-core/recipes-kernel/linux/linux/btusb.cfg deleted file mode 100644 index 4a4c35a05..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/btusb.cfg +++ /dev/null @@ -1,32 +0,0 @@ -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_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -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 index 2f24b7607..d7c7c7741 100644 --- a/meta-agl-core/recipes-kernel/linux/linux/can-bus.cfg +++ b/meta-agl-core/recipes-kernel/linux/linux/can-bus.cfg @@ -1,8 +1,3 @@ -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 @@ -12,31 +7,4 @@ 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 deleted file mode 100644 index 65fe71cd0..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/drm.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_DRM_BOCHS=y -CONFIG_DRM_VIRTIO_GPU=y diff --git a/meta-agl-core/recipes-kernel/linux/linux/hid.cfg b/meta-agl-core/recipes-kernel/linux/linux/hid.cfg deleted file mode 100644 index 327c753ae..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/hid.cfg +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 248b5118a..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/i2c-led.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# 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 deleted file mode 100644 index c5b8ff35e..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/iiodevice.cfg +++ /dev/null @@ -1,26 +0,0 @@ -# -# 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 deleted file mode 100644 index 2201bcb00..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/joystick.cfg +++ /dev/null @@ -1,9 +0,0 @@ -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/netfilter.cfg b/meta-agl-core/recipes-kernel/linux/linux/netfilter.cfg deleted file mode 100644 index 34be704c1..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/netfilter.cfg +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 6d863a075..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/nfc.cfg +++ /dev/null @@ -1,34 +0,0 @@ -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/procevent.cfg b/meta-agl-core/recipes-kernel/linux/linux/procevent.cfg deleted file mode 100644 index 6e08c25bc..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/procevent.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y diff --git a/meta-agl-core/recipes-kernel/linux/linux/qemu-drm.cfg b/meta-agl-core/recipes-kernel/linux/linux/qemu-drm.cfg new file mode 100644 index 000000000..65fe71cd0 --- /dev/null +++ b/meta-agl-core/recipes-kernel/linux/linux/qemu-drm.cfg @@ -0,0 +1,2 @@ +CONFIG_DRM_BOCHS=y +CONFIG_DRM_VIRTIO_GPU=y diff --git a/meta-agl-core/recipes-kernel/linux/linux/qemu-virtio.cfg b/meta-agl-core/recipes-kernel/linux/linux/qemu-virtio.cfg new file mode 100644 index 000000000..d042d7d64 --- /dev/null +++ b/meta-agl-core/recipes-kernel/linux/linux/qemu-virtio.cfg @@ -0,0 +1,6 @@ +# qemu need a virtio storage for rootfs +CONFIG_BLK_MQ_VIRTIO=y +CONFIG_VIRTIO=y +CONFIG_VIRTIO_BLK=y +# qemuarm need virtionet +CONFIG_VIRTIO_NET=y diff --git a/meta-agl-core/recipes-kernel/linux/linux/qemuarm.cfg b/meta-agl-core/recipes-kernel/linux/linux/qemuarm.cfg new file mode 100644 index 000000000..b3644b26f --- /dev/null +++ b/meta-agl-core/recipes-kernel/linux/linux/qemuarm.cfg @@ -0,0 +1,8 @@ +# Necessary configs for using the virt qemu machine +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARCH_VIRT=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_PCI_HOST_GENERIC=y +CONFIG_RTC_DRV_PL031=y +# SPEC-3976 we mimic real AGL ARM board and they dont have LPAE. This cause also HDA failure. +# CONFIG_ARM_LPAE is not set diff --git a/meta-agl-core/recipes-kernel/linux/linux/rtc.cfg b/meta-agl-core/recipes-kernel/linux/linux/rtc.cfg deleted file mode 100644 index 2641958a0..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/rtc.cfg +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index d4574700a..000000000 --- a/meta-agl-core/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-core/recipes-kernel/linux/linux/scheddebug.cfg b/meta-agl-core/recipes-kernel/linux/linux/scheddebug.cfg deleted file mode 100644 index e8b09aa7c..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/scheddebug.cfg +++ /dev/null @@ -1 +0,0 @@ -CONFIG_SCHED_DEBUG=y diff --git a/meta-agl-core/recipes-kernel/linux/linux/uinput.cfg b/meta-agl-core/recipes-kernel/linux/linux/uinput.cfg deleted file mode 100644 index 7996ef1dd..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/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-core/recipes-kernel/linux/linux/usb.cfg b/meta-agl-core/recipes-kernel/linux/linux/usb.cfg deleted file mode 100644 index 8e9e98ecb..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/usb.cfg +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 5961f43d3..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/usbaudio.cfg +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 3ded931e5..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/usbmodem.cfg +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 7c6556c11..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/uvc.cfg +++ /dev/null @@ -1,4 +0,0 @@ -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/wifi.cfg b/meta-agl-core/recipes-kernel/linux/linux/wifi.cfg deleted file mode 100644 index 00c2e06e4..000000000 --- a/meta-agl-core/recipes-kernel/linux/linux/wifi.cfg +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_WLAN_VENDOR_ATH=m -CONFIG_ATH9K_HTC=m -CONFIG_STAGING=y -CONFIG_R8188EU=m -- cgit 1.2.3-korg