Refactor kernel configuration fragment handling 60/26460/2
authorScott Murray <scott.murray@konsulko.com>
Sun, 27 Jun 2021 18:36:00 +0000 (14:36 -0400)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 29 Jun 2021 21:31:01 +0000 (21:31 +0000)
commit74a7b60c94e21caa47334aeb975bb1af8fcb4efd
tree07355e73b63fc33afc5c43cb88f28862e9c93a55
parent820d8ac3e5c2ff3e110932e1ed08ea24ffad156c
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 <scott.murray@konsulko.com>
Change-Id: If6662fd36e26cec767b1d53b1188a74d01ef9dcf
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26460
Reviewed-by: Hiroyuki Ishii <ishii.hiroyuki002@jp.panasonic.com>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
43 files changed:
meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/hciattach.cfg [deleted file]
meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg [deleted file]
meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend [deleted file]
meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_agl.inc [deleted file]
meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend
meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend
meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_%.bbappend
meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg [deleted file]
meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend
meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend
meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend
meta-agl-bsp/meta-synopsys/recipes-kernel/linux-yocto_%.bbappend
meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend
meta-agl-core/recipes-kernel/linux/linux-agl-config.inc [new file with mode: 0644]
meta-agl-core/recipes-kernel/linux/linux-agl.inc
meta-agl-core/recipes-kernel/linux/linux-yocto-agl.inc [new file with mode: 0644]
meta-agl-core/recipes-kernel/linux/linux-yocto_%.bbappend [new file with mode: 0644]
meta-agl-core/recipes-kernel/linux/linux/btusb.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/can-bus.cfg
meta-agl-core/recipes-kernel/linux/linux/hid.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/i2c-led.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/iiodevice.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/joystick.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/netfilter.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/nfc.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/procevent.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/qemu-drm.cfg [moved from meta-agl-core/recipes-kernel/linux/linux/drm.cfg with 100% similarity]
meta-agl-core/recipes-kernel/linux/linux/qemu-virtio.cfg [moved from meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/virtio.cfg with 100% similarity]
meta-agl-core/recipes-kernel/linux/linux/qemuarm.cfg [moved from meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/qemuarm.cfg with 100% similarity]
meta-agl-core/recipes-kernel/linux/linux/rtc.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/rtl_sdr.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/scheddebug.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/uinput.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/usb.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/usbaudio.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/usbmodem.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/uvc.cfg [deleted file]
meta-agl-core/recipes-kernel/linux/linux/wifi.cfg [deleted file]
meta-app-framework/recipes-kernel/linux/linux-%.bbappend
meta-app-framework/recipes-kernel/linux/linux-appfw.inc
meta-app-framework/recipes-kernel/linux/linux/smack-default-lsm-old.cfg [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux/smack-default-lsm.cfg