linux-%: Tweak kernel configuration for KVM demo guests 95/28195/1
authorScott Murray <scott.murray@konsulko.com>
Wed, 23 Nov 2022 19:24:45 +0000 (14:24 -0500)
committerScott Murray <scott.murray@konsulko.com>
Wed, 23 Nov 2022 19:24:45 +0000 (14:24 -0500)
Rework the kernel configuration fragment application to prune out
a bunch of the configuration for physical hardware for the
virtio-aarch64 kernel.  As well, add a virtio guest kernel specific
fragment to enable a PCI CAN device driver that works with QEMU's
emulation.  That will provide a fallback until something can be
worked out with respect to virtio-can.

Bug-AGL: SPEC-4618

Change-Id: Ibb674d09c115ab5bbe454b665350a658c759e5f5
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
recipes-kernel/linux/linux/virtio-demo-can-devices.cfg [new file with mode: 0644]
recipes-kernel/linux/linux_agldemo.inc

diff --git a/recipes-kernel/linux/linux/virtio-demo-can-devices.cfg b/recipes-kernel/linux/linux/virtio-demo-can-devices.cfg
new file mode 100644 (file)
index 0000000..17cb166
--- /dev/null
@@ -0,0 +1,5 @@
+CONFIG_CAN_DEV=m
+CONFIG_CAN_CALC_BITTIMING=y
+CONFIG_CAN_SJA1000=y
+CONFIG_PCI=y
+CONFIG_CAN_KVASER_PCI=m
index 4021177..7274364 100644 (file)
@@ -1,7 +1,7 @@
 FILESEXTRAPATHS:prepend := "${THISDIR}/linux:"
 
 # Enable assorted USB device support for demo systems
-AGL_KCONFIG_FRAGMENTS += " \
+AGL_KCONFIG_FRAGMENTS_DEMO += " \
     usb.cfg \
     uvc.cfg \
     hid.cfg \
@@ -13,26 +13,35 @@ AGL_KCONFIG_FRAGMENTS += " \
 "
 
 # Enable CAN device support
-AGL_KCONFIG_FRAGMENTS += "can-devices.cfg"
+AGL_KCONFIG_FRAGMENTS_DEMO += "can-devices.cfg"
 
 # Enable NFC support
-AGL_KCONFIG_FRAGMENTS += "nfc.cfg"
+AGL_KCONFIG_FRAGMENTS_DEMO += "nfc.cfg"
 
 # Enable support for TP-Link TL-W722N USB Wifi adapter (rev 1 and 2)
-AGL_KCONFIG_FRAGMENTS += "wifi.cfg"
+AGL_KCONFIG_FRAGMENTS_DEMO += "wifi.cfg"
 
 # Enable support for RTLSDR
-AGL_KCONFIG_FRAGMENTS += "rtl_sdr.cfg"
+AGL_KCONFIG_FRAGMENTS_DEMO += "rtl_sdr.cfg"
 
 # iio-dummy-device support for test IIO device
-AGL_KCONFIG_FRAGMENTS += "iiodevice.cfg"
+AGL_KCONFIG_FRAGMENTS_DEMO += "iiodevice.cfg"
 
 # External rtc support via e.g. http://wiki.seeedstudio.com/Grove-RTC/
-AGL_KCONFIG_FRAGMENTS += "rtc.cfg"
+AGL_KCONFIG_FRAGMENTS_DEMO += "rtc.cfg"
 
 # Make sure in-kernel MOST drivers are disabled to avoid conflicting
 # with our externally built ones
-AGL_KCONFIG_FRAGMENTS += "disable_most.cfg"
+AGL_KCONFIG_FRAGMENTS_DEMO += "disable_most.cfg"
 
 # Enable some things on qemuarm64 so MOST drivers will build and load.
-AGL_KCONFIG_FRAGMENTS:append:qemuarm64 = " most_deps.cfg"
+AGL_KCONFIG_FRAGMENTS_DEMO:append:qemuarm64 = " most_deps.cfg"
+
+# We don't want most of the above for the virtio guest kernels,
+# use an explicit list
+AGL_KCONFIG_FRAGMENTS_DEMO:virtio-all = " \
+    virtio-demo-can-devices.cfg \
+    hid.cfg \
+"
+
+AGL_KCONFIG_FRAGMENTS += "${AGL_KCONFIG_FRAGMENTS_DEMO}"
\ No newline at end of file