@@ -27,3 +27,13 @@ do_install:append() {
}
COMPATIBLE_HOST = "(arm|aarch64).*-linux"
+
+# Kernel modules currently RDEPEND on the kernel, which is troublesome when you want to put a
+# kernel module into a initramfs without pulling the kernel into the initramfs, which would be
+# silly. Until this is a recommends the easiest way to handle this is to remove the dependency
+# in this recipe.
+PACKAGESPLITFUNCS:append = " remove_kernel_dependency"
+python remove_kernel_dependency() {
+ key = "RDEPENDS:kernel-module-arm-ffa-user-" + d.getVar("KERNEL_VERSION")
+ d.delVar(key)
+}
CS1K wants to put the ffa-debugfs kernel module into the initramfs, but this pulls in the kernel image too because kernel modules depend on the kernel image (via kernel-module-split.bbclass). Arguably this should be controllable somehow, as it's not mandatory to have an image on the same file system as the modules: initramfs or separate /boot partitions being notable cases. Until this is resolved upstream[1] we can work around it by removing the RDEPENDS on the kernel from the kernel module. As the package is generated during do_package this can't be a simple RDEPENDS:remove, but has to be another package split function which runs after the module splitting function. [1] https://lore.kernel.org/openembedded-core/20220209173036.3823144-1-ross.burton@arm.com/T/#t Signed-off-by: Ross Burton <ross.burton@arm.com> --- .../ffa-debugfs/ffa-debugfs-mod_2.1.0.bb | 10 ++++++++++ 1 file changed, 10 insertions(+)