All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES
@ 2022-02-09 17:46 Ross Burton
  2022-02-09 17:46 ` [PATCH 2/3] arm/ffa-debugfs-mod: remove kernel image runtime dependency Ross Burton
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ross Burton @ 2022-02-09 17:46 UTC (permalink / raw)
  To: meta-arm

There's no need for ffa-debugfs-mod to RPROVIDE
kernel-module-arm-ffa-user, as this is provided by a sub-package of this
recipe already.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-arm/recipes-kernel/ffa-debugfs/ffa-debugfs-mod_2.1.0.bb | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta-arm/recipes-kernel/ffa-debugfs/ffa-debugfs-mod_2.1.0.bb b/meta-arm/recipes-kernel/ffa-debugfs/ffa-debugfs-mod_2.1.0.bb
index 2db8afc1..4fedad1c 100644
--- a/meta-arm/recipes-kernel/ffa-debugfs/ffa-debugfs-mod_2.1.0.bb
+++ b/meta-arm/recipes-kernel/ffa-debugfs/ffa-debugfs-mod_2.1.0.bb
@@ -21,8 +21,6 @@ SRC_URI:append = " \
 FILES:${PN} += "${bindir}/load_ffa_debugfs.sh"
 FILES:${PN}-dev += "${includedir}/arm_ffa_user.h"
 
-RPROVIDES:${PN} += "kernel-module-arm-ffa-user"
-
 do_install:append() {
   install -D -p -m 0755 ${B}/load_ffa_debugfs.sh ${D}/${bindir}/load_ffa_debugfs.sh
   install -m 0644 ${S}/arm_ffa_user.h ${D}/${includedir}/arm_ffa_user.h
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] arm/ffa-debugfs-mod: remove kernel image runtime dependency
  2022-02-09 17:46 [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES Ross Burton
@ 2022-02-09 17:46 ` Ross Burton
  2022-02-09 17:46 ` [PATCH 3/3] arm-bsp/linux-yocto: remove redundant kernel hacking Ross Burton
  2022-02-10  0:59 ` [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES Jon Mason
  2 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2022-02-09 17:46 UTC (permalink / raw)
  To: meta-arm

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(+)

diff --git a/meta-arm/recipes-kernel/ffa-debugfs/ffa-debugfs-mod_2.1.0.bb b/meta-arm/recipes-kernel/ffa-debugfs/ffa-debugfs-mod_2.1.0.bb
index 4fedad1c..03ce0135 100644
--- a/meta-arm/recipes-kernel/ffa-debugfs/ffa-debugfs-mod_2.1.0.bb
+++ b/meta-arm/recipes-kernel/ffa-debugfs/ffa-debugfs-mod_2.1.0.bb
@@ -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)
+}
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] arm-bsp/linux-yocto: remove redundant kernel hacking
  2022-02-09 17:46 [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES Ross Burton
  2022-02-09 17:46 ` [PATCH 2/3] arm/ffa-debugfs-mod: remove kernel image runtime dependency Ross Burton
@ 2022-02-09 17:46 ` Ross Burton
  2022-02-10  0:59 ` [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES Jon Mason
  2 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2022-02-09 17:46 UTC (permalink / raw)
  To: meta-arm

The CS1K kernel used overrides to empty the kernel-image package, so
the initramfs didn't contain a kernel image.

The initramfs contained a kernel via a bad dependency in ffa-debugfs-mod,
but now that has been worked around we can remove the CS1K workaround.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../linux/linux-arm-platforms.inc              | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc b/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc
index 0f62011c..a8d12841 100644
--- a/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc
+++ b/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc
@@ -91,24 +91,6 @@ SRC_URI:append:corstone1000 = " ${@bb.utils.contains('MACHINE_FEATURES', \
 # corstone1000 has limited flash memory constraints
 KERNEL_EXTRA_FEATURES:corstone1000 = ""
 KERNEL_FEATURES:corstone1000 = ""
-# No need to include the kernel image in the rootfs
-# So, let's delete the package doing that and uninstalling the initial
-# kernel binary.
-# The kernel binary needed is the initramfs bundle
-
-FILES:kernel-image-image:corstone1000=""
-
-# Uninstalling the initial kernel binary
-
-do_install:append:corstone1000() {
-    if [ -e "${D}/${KERNEL_IMAGEDEST}/$imageType-${KERNEL_VERSION}" ]; then
-        rm ${D}/${KERNEL_IMAGEDEST}/$imageType-${KERNEL_VERSION}
-    fi
-
-    if [ -e "${D}/${KERNEL_IMAGEDEST}/$imageType" ]; then
-        rm ${D}/${KERNEL_IMAGEDEST}/$imageType
-    fi
-}
 
 #
 # FVP BASE KMACHINE
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES
  2022-02-09 17:46 [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES Ross Burton
  2022-02-09 17:46 ` [PATCH 2/3] arm/ffa-debugfs-mod: remove kernel image runtime dependency Ross Burton
  2022-02-09 17:46 ` [PATCH 3/3] arm-bsp/linux-yocto: remove redundant kernel hacking Ross Burton
@ 2022-02-10  0:59 ` Jon Mason
  2 siblings, 0 replies; 4+ messages in thread
From: Jon Mason @ 2022-02-10  0:59 UTC (permalink / raw)
  To: meta-arm, Ross Burton

On Wed, 9 Feb 2022 17:46:08 +0000, Ross Burton wrote:
> There's no need for ffa-debugfs-mod to RPROVIDE
> kernel-module-arm-ffa-user, as this is provided by a sub-package of this
> recipe already.

Applied, thanks!

[1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES
      commit: fee71931f4fb708de2e3f8b5bc9e14c8db89b74b
[2/3] arm/ffa-debugfs-mod: remove kernel image runtime dependency
      commit: a82df9187d6e10bb05964042be6ab6c2fc42fe6f
[3/3] arm-bsp/linux-yocto: remove redundant kernel hacking
      commit: 7fc51c7c08bbc034d269a09fb2e170e293db9ae9

Best regards,
-- 
Jon Mason <jon.mason@arm.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-10  0:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 17:46 [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES Ross Burton
2022-02-09 17:46 ` [PATCH 2/3] arm/ffa-debugfs-mod: remove kernel image runtime dependency Ross Burton
2022-02-09 17:46 ` [PATCH 3/3] arm-bsp/linux-yocto: remove redundant kernel hacking Ross Burton
2022-02-10  0:59 ` [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES Jon Mason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.