From patchwork Wed Feb 9 17:46:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 3462 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88C33C433FE for ; Wed, 9 Feb 2022 17:46:22 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.29861.1644428781066970802 for ; Wed, 09 Feb 2022 09:46:21 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9CC05ED1 for ; Wed, 9 Feb 2022 09:46:20 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 36C743F73B for ; Wed, 9 Feb 2022 09:46:20 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/3] arm/ffa-debugfs-mod: remove redundant RPROVIDES Date: Wed, 9 Feb 2022 17:46:08 +0000 Message-Id: <20220209174610.3824795-1-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 09 Feb 2022 17:46:22 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2966 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 --- 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 From patchwork Wed Feb 9 17:46:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 3460 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D09EC433F5 for ; Wed, 9 Feb 2022 17:46:22 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.30017.1644428781791324310 for ; Wed, 09 Feb 2022 09:46:21 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4564B113E for ; Wed, 9 Feb 2022 09:46:21 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D49883F70D for ; Wed, 9 Feb 2022 09:46:20 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 2/3] arm/ffa-debugfs-mod: remove kernel image runtime dependency Date: Wed, 9 Feb 2022 17:46:09 +0000 Message-Id: <20220209174610.3824795-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220209174610.3824795-1-ross.burton@arm.com> References: <20220209174610.3824795-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 09 Feb 2022 17:46:22 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2967 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 --- .../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) +} From patchwork Wed Feb 9 17:46:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 3461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E202C4332F for ; Wed, 9 Feb 2022 17:46:23 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.30023.1644428782483310034 for ; Wed, 09 Feb 2022 09:46:22 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E9553ED1 for ; Wed, 9 Feb 2022 09:46:21 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 83A8E3F70D for ; Wed, 9 Feb 2022 09:46:21 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 3/3] arm-bsp/linux-yocto: remove redundant kernel hacking Date: Wed, 9 Feb 2022 17:46:10 +0000 Message-Id: <20220209174610.3824795-3-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220209174610.3824795-1-ross.burton@arm.com> References: <20220209174610.3824795-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 09 Feb 2022 17:46:23 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2968 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 --- .../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