From 8592bcedc9d942bde6d73003c04d525431348d7a Mon Sep 17 00:00:00 2001
From: Qiyang Sun <qs2g22@soton.ac.uk>
Date: Thu, 1 Aug 2024 00:01:15 +0100
Subject: [PATCH] Bugfix kernel config not applied

---
 .../linux-yocto-custom.bb                              |  0
 .../myconfig.cfg                                       | 10 ++++++++++
 recipes-kernel/linux/linux-raspberrypi_%.bbappend      |  3 +++
 recipes-kernel/linux/linux-yocto_%.bbappend            |  3 ---
 4 files changed, 13 insertions(+), 3 deletions(-)
 rename recipes-kernel/linux/{linux-yocto-custom => linux-raspberrypi-custom}/linux-yocto-custom.bb (100%)
 rename recipes-kernel/linux/{linux-yocto-custom => linux-raspberrypi-custom}/myconfig.cfg (90%)
 create mode 100644 recipes-kernel/linux/linux-raspberrypi_%.bbappend
 delete mode 100644 recipes-kernel/linux/linux-yocto_%.bbappend

diff --git a/recipes-kernel/linux/linux-yocto-custom/linux-yocto-custom.bb b/recipes-kernel/linux/linux-raspberrypi-custom/linux-yocto-custom.bb
similarity index 100%
rename from recipes-kernel/linux/linux-yocto-custom/linux-yocto-custom.bb
rename to recipes-kernel/linux/linux-raspberrypi-custom/linux-yocto-custom.bb
diff --git a/recipes-kernel/linux/linux-yocto-custom/myconfig.cfg b/recipes-kernel/linux/linux-raspberrypi-custom/myconfig.cfg
similarity index 90%
rename from recipes-kernel/linux/linux-yocto-custom/myconfig.cfg
rename to recipes-kernel/linux/linux-raspberrypi-custom/myconfig.cfg
index 9823474..d2d3b83 100644
--- a/recipes-kernel/linux/linux-yocto-custom/myconfig.cfg
+++ b/recipes-kernel/linux/linux-raspberrypi-custom/myconfig.cfg
@@ -1,10 +1,20 @@
+# Disable IPv6
+
 CONFIG_IPV6=n
 
+# Enable USB gadget
+
 CONFIG_USB_SERIAL_CONSOLE=y
 CONFIG_USB_SERIAL_GENERIC=y
 CONFIG_USB_G_SERIAL=y
 CONFIG_USB_SERIAL=y
 
+# Enable GPIO sys fs
+
+CONFIG_EXPERT=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_AGGREGATOR=y
+CONFIG_GPIO_VIRTIO=y
 
 # Disable bluetooth, copied from diff of menuconfig
 
diff --git a/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/recipes-kernel/linux/linux-raspberrypi_%.bbappend
new file mode 100644
index 0000000..7c4f1b3
--- /dev/null
+++ b/recipes-kernel/linux/linux-raspberrypi_%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/linux-raspberrypi-custom:"
+SRC_URI:append = " file://myconfig.cfg"
+
diff --git a/recipes-kernel/linux/linux-yocto_%.bbappend b/recipes-kernel/linux/linux-yocto_%.bbappend
deleted file mode 100644
index 271fe8f..0000000
--- a/recipes-kernel/linux/linux-yocto_%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto-custom:"
-SRC_URI:append = " file://myconfig.cfg"
-
-- 
GitLab