From patchwork Fri Sep 9 22:04:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 12551 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 9767AECAAD3 for ; Fri, 9 Sep 2022 22:04:46 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mx.groups.io with SMTP id smtpd.web10.1912.1662761081099628219 for ; Fri, 09 Sep 2022 15:04:41 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gherzan.com header.s=fm3 header.b=WdtKvr4A; spf=pass (domain: gherzan.com, ip: 66.111.4.28, mailfrom: andrei@gherzan.com) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0F3AE5C0111; Fri, 9 Sep 2022 18:04:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 09 Sep 2022 18:04:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gherzan.com; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1662761080; x=1662847480; bh=uFnFnkNBLPrINKIPQ/Tolb3Lj WFHL7SiDXlhN1wEYM8=; b=WdtKvr4AVqku+0Wls7qAWo9lcsAGXE932FVsHmS+X Y6x+W1hogJV0GyS8wYfGB6F62RfetYtyF+hKB+uWnYLNDgzvhQhIhDUds3SsUgvg HRDFP9xBTyuq9pC0GkzFK5J27Cc9W9+SwFofLMKJ66UnDNBglOPrHHiosUXbEcbT bmEN7DuU+tchBm4qDKe/WDb5dKiczC68OqK6fu/xAkrBk/lJV7cgzf23bO62GFcD 6+l14qgF9ohyYZCvLGNr6v0hd95WQbhXKQFwmdAk7W3SoEQsouzJ9WFQBPA8UKIE iw9XSCK7zvsp9WKBzcGVsFJSRv5UwLbPAJEpKAnUAeyUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1662761080; x=1662847480; bh=uFnFnkNBLPrINKIPQ/Tolb3LjWFHL7SiDXl hN1wEYM8=; b=ZLXfSA+Chn1PS5sH1j2hX1nETJtytqooPKUxxAk6uav6SXTmgL+ CYbZPn8py+6SdpJBb7aLRx9KDjXRDplbZ/tx6VnqKByETTJetJdanpea67bsfDvE usQY2hnA7J+0D3ctifLalumTdczOW/wOFgJxE5nf27irXbKA387m9vz4GxRIuJzV adVyRGQRQpSbKFnOSMVIIMdDLo84XuQ9lGY4yjcsC3x/6bzgwRZnVqK1o3MmS0kt IM02TF4sLdxtP0Ph0sn4O7smAzymzmFe/uQVafiSHebjcSSp9seBhfcaf3/O06x1 aHKNBzYvudW55yYOXjVxHsLYNw09B8Ohs6Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedtiedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvihcuifhhvghriigrnhcuoegrnhgurhgvihesghhh vghriigrnhdrtghomheqnecuggftrfgrthhtvghrnhepieejlefhveevleffveegfeetle ejtedvgeejtddthefhhfdtiefhveegffeggeeknecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghisehghhgvrhiirghnrdgtohhm X-ME-Proxy: Feedback-ID: i68994715:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Sep 2022 18:04:39 -0400 (EDT) From: Andrei Gherzan To: openembedded-core@lists.openembedded.org Cc: andrei@gherzan.com, Andrei Gherzan Subject: [PATCH 1/4] depmodwrapper-cross: Take into consideration kernel package name Date: Sat, 10 Sep 2022 00:04:22 +0200 Message-Id: <20220909220425.2737985-1-andrei@gherzan.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 ; Fri, 09 Sep 2022 22:04:46 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170505 From: Andrei Gherzan depmodwrapper assumes that the kernel package name is "kernel". Since this is configurable via KERNEL_PACKAGE_NAME variable, the wrapper can easily look in the wrong place. This change adds an optional positional argument that can be used to provide the kernel package name - when not provided, it defaults to "kernel" (current behaviour). Signed-off-by: Andrei Gherzan --- .../kmod/depmodwrapper-cross_1.0.bb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb index 303026ad78..6c0739d64f 100644 --- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb +++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb @@ -21,13 +21,17 @@ do_install() { #!/bin/sh # Expected to be called as: depmodwrapper -a KERNEL_VERSION if [ "\$1" != "-a" -o "\$2" != "-b" ]; then - echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2 + echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION [KERNEL_PACKAGE_NAME]" >&2 exit 1 fi +kernelpkgname="kernel" +# If no KERNEL_PACKAGE_NAME, assume "kernel". +[ -z "\$5" ] || kernelpkgname="\$5" + kernelabi="" -if [ -r "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" ]; then - kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion") +if [ -r "${PKGDATA_DIR}/\${kernelpkgname}-depmod/\${kernelpkgname}-abiversion" ]; then + kernelabi=\$(cat "${PKGDATA_DIR}/\${kernelpkgname}-depmod/\${kernelpkgname}-abiversion") fi if [ ! -e "\$3${nonarch_base_libdir}/depmod.d/exclude.conf" ]; then @@ -35,11 +39,11 @@ if [ ! -e "\$3${nonarch_base_libdir}/depmod.d/exclude.conf" ]; then echo "exclude .debug" > "\$3${nonarch_base_libdir}/depmod.d/exclude.conf" fi -if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then - echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2 +if [ ! -r ${PKGDATA_DIR}/\${kernelpkgname}-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then + echo "Unable to read: ${PKGDATA_DIR}/\${kernelpkgname}-depmod/System.map-\$4" >&2 exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" "\$4" else - exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4" + exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/\${kernelpkgname}-depmod/System.map-\$4" "\$4" fi EOF chmod +x ${D}${bindir_crossscripts}/depmodwrapper From patchwork Fri Sep 9 22:04:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 12552 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 73527C6FA86 for ; Fri, 9 Sep 2022 22:04:56 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mx.groups.io with SMTP id smtpd.web12.1917.1662761089218652578 for ; Fri, 09 Sep 2022 15:04:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gherzan.com header.s=fm3 header.b=pKOpJn8M; spf=pass (domain: gherzan.com, ip: 66.111.4.28, mailfrom: andrei@gherzan.com) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 83FE55C00C8; Fri, 9 Sep 2022 18:04:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 09 Sep 2022 18:04:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gherzan.com; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1662761088; x=1662847488; bh=Jd tBRA3D1VkV0s2yVyatoW1Bw3ecwfMpkhy+8e4AhHY=; b=pKOpJn8MVCSKjUI3un JvrG83rs2xQY/3EbO0ZHFUEWOVz3Wcf93KkFa1TPtIb92S+s0WB4ZZiYq9Sh/5x7 hw303wSEQ2YoMdzD8JnQrfuYKpCx/eAmeyP7/DGuEQap8+7Zzf9q0zIdJAIjiXG5 8LTTQ4BGKqP0vtsXUd3uPNwi6QbGEAGO4Kl+aRuH4abdJD73vCL7ru1OLPkVhGqZ UGX5KgUDlV4bsKDfeuTGSmuJjaVYw8S67WZ55f24DVpOMrCPznn15s8MI7Y6nf2E WzlgdPK6qjBc1pbyQ7ntpuryxw66VgFKPGfgdyLJRsRgn2A5bUDOCkfYcfT7fVc1 K4nA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1662761088; x=1662847488; bh=JdtBRA3D1VkV0 s2yVyatoW1Bw3ecwfMpkhy+8e4AhHY=; b=n3a6tWsB9PZA4Y32eiuZLgJDv72GN nnQem39tRFspHP5VFR/xDCiNol10aZsgFCfqmMRoI5/PjS1aVZW15mF+NtI2HjWX +UoUgBZ+XiKVRqeDwLSAMyZesc6t+cQMb+ey0obGpbsywVmK/UtzFsuCESQZMDpe 6Q3iBiA7m2aE8wwGszCmmXMfXx3vyYqW14c1Pe8NgEKfr6E5MnS09mhv7F04EhwV TlZ8YYyLX3YlsWoXMNy9HvmYb+K31/FAyAgZltPO7DmrL5SGhekBnk7FO1WDyQP6 8dQ+8oOEHwIOPnD1/RGeTlGC+RnPVIB/dv/aLc3hh1Pqhq/JbiYMzxC+g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedtiedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeetnhgurhgvihcuifhhvghriigrnhcuoegrnhgurhgvihes ghhhvghriigrnhdrtghomheqnecuggftrfgrthhtvghrnhepjefhvefhgefgffejgeelke ejleeiffejgffgkeeggfffgfffieeffeeghefhtdffnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghisehghhgvrhiirghnrdgtoh hm X-ME-Proxy: Feedback-ID: i68994715:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Sep 2022 18:04:47 -0400 (EDT) From: Andrei Gherzan To: openembedded-core@lists.openembedded.org Cc: andrei@gherzan.com, Andrei Gherzan Subject: [PATCH 2/4] kernel.bbclass: Pass the kernel package name to depmodwrapper Date: Sat, 10 Sep 2022 00:04:23 +0200 Message-Id: <20220909220425.2737985-2-andrei@gherzan.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220909220425.2737985-1-andrei@gherzan.com> References: <20220909220425.2737985-1-andrei@gherzan.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 ; Fri, 09 Sep 2022 22:04:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170506 From: Andrei Gherzan This makes sure that the postinstall script it using the right kernel paths. Signed-off-by: Andrei Gherzan --- meta/classes-recipe/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index de1b80d0ae..e4e69e0763 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass @@ -677,7 +677,7 @@ pkg_postinst:${KERNEL_PACKAGE_NAME}-base () { mkdir -p $D/lib/modules/${KERNEL_VERSION} fi if [ -n "$D" ]; then - depmodwrapper -a -b $D ${KERNEL_VERSION} + depmodwrapper -a -b $D ${KERNEL_VERSION} ${KERNEL_PACKAGE_NAME} else depmod -a ${KERNEL_VERSION} fi From patchwork Fri Sep 9 22:04:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 12554 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 76C37C6FA8A for ; Fri, 9 Sep 2022 22:04:56 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mx.groups.io with SMTP id smtpd.web11.1827.1662761090791194241 for ; Fri, 09 Sep 2022 15:04:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gherzan.com header.s=fm3 header.b=oeN1ZIFl; spf=pass (domain: gherzan.com, ip: 66.111.4.28, mailfrom: andrei@gherzan.com) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2437E5C00C0; Fri, 9 Sep 2022 18:04:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 09 Sep 2022 18:04:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gherzan.com; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1662761090; x=1662847490; bh=q/ eD6OzjBf3eaZAzMtimNRXMR6jlVnVd/6r+lG2htMM=; b=oeN1ZIFlhmsnXWwIEQ pgbBqzPDzpUZQbWdkZGO7DSWjWVlVfe5EorC4ibldBI1uZOW5BG94hBW4yjhPtLc 7qRIcC6qjJgAW8lSnuBuMhcx8GvUeWBJ/LABlAb1LgkptMaHTGLLQ+sc+1yJob5H B4xDwud5wWSi4+Lyz+Uw6PTQBniP+MR/JmRA6I3b3ixLWVImKKuiCEblGe66V505 smqd7mVNUp5ncmtnZ1CYLAVvGjeimKUUT+JHMmDm2wzPG0UsQX0lr1RNmNB5ytv5 VXjIsMky7y398J0VCHX4m1xwCXSlO0UirzMBLLR4DsP1LgEcqIAh8Y2JuTeEVkE+ u5bQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1662761090; x=1662847490; bh=q/eD6OzjBf3ea ZAzMtimNRXMR6jlVnVd/6r+lG2htMM=; b=fIhxINRjwQd/P/3mVdlUSXjqRZvR/ YVFGaA/YwM9J97cqz8l3IPllloxUWJ/kYQ8zorHd79MXN68WXrgOjdIgMKvfd1EW AkjQsWDCbocMxV6Y8ujR+4kE2l54C8cg8M1vOu7a2Sv6hfwlfybXdexS4dUDVHT/ xCKx0w6wHn5Bv0Ct6mOGa9xj1LfFweNyCwxS1O09N+EVE7qITyFhHn9xR748bLoG DHynAdDqkr6YFQuWFbKTZzSaGWF9z7VyL5t9Pvu/SJIaFBWnSItchiGJpEXIQvp0 lkWzfnppsAFi6YfJki4ZpxDiOpaYnIWqe9XYsbasQm1AblOixvBrRC2Dw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedtiedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeetnhgurhgvihcuifhhvghriigrnhcuoegrnhgurhgvihes ghhhvghriigrnhdrtghomheqnecuggftrfgrthhtvghrnhepjefhvefhgefgffejgeelke ejleeiffejgffgkeeggfffgfffieeffeeghefhtdffnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghisehghhgvrhiirghnrdgtoh hm X-ME-Proxy: Feedback-ID: i68994715:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Sep 2022 18:04:49 -0400 (EDT) From: Andrei Gherzan To: openembedded-core@lists.openembedded.org Cc: andrei@gherzan.com, Andrei Gherzan Subject: [PATCH 3/4] kernel-module-split.bbclass: Pass the kernel package name to depmodwrapper Date: Sat, 10 Sep 2022 00:04:24 +0200 Message-Id: <20220909220425.2737985-3-andrei@gherzan.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220909220425.2737985-1-andrei@gherzan.com> References: <20220909220425.2737985-1-andrei@gherzan.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 ; Fri, 09 Sep 2022 22:04:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170507 From: Andrei Gherzan This makes sure that the postrm script it using the right kernel paths. Signed-off-by: Andrei Gherzan --- meta/classes-recipe/kernel-module-split.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/kernel-module-split.bbclass b/meta/classes-recipe/kernel-module-split.bbclass index 1b4c864a63..08c2e54e86 100644 --- a/meta/classes-recipe/kernel-module-split.bbclass +++ b/meta/classes-recipe/kernel-module-split.bbclass @@ -18,7 +18,7 @@ pkg_postrm:modules () { if [ -z "$D" ]; then depmod -a ${KERNEL_VERSION} else - depmodwrapper -a -b $D ${KERNEL_VERSION} + depmodwrapper -a -b $D ${KERNEL_VERSION} ${KERNEL_PACKAGE_NAME} fi } From patchwork Fri Sep 9 22:04:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 12553 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 72A3BECAAA1 for ; Fri, 9 Sep 2022 22:04:56 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mx.groups.io with SMTP id smtpd.web09.1844.1662761094118589692 for ; Fri, 09 Sep 2022 15:04:54 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gherzan.com header.s=fm3 header.b=l3Xp9ebG; spf=pass (domain: gherzan.com, ip: 66.111.4.28, mailfrom: andrei@gherzan.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 992285C00F7; Fri, 9 Sep 2022 18:04:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 09 Sep 2022 18:04:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gherzan.com; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1662761091; x=1662847491; bh=CD U0VDdSa6Cki/cPLSH2NZRjhMuZ2t6g0GaG/DSATIQ=; b=l3Xp9ebGvSo89WERB0 p36FlxgXuk1AF5F73GWaEzYaq23SnHftbticjG9fYPp/2c7iYrzd4o7Aov1D6r/x FWnzVFhIHw5j9SDw2kDPK63HU1QpyX7UHQyA2ikB8/gnG64+F7fnVXAU5dWWzn+J /Qc+3YNxbmVx1ABbry+v8fPwvqKzJ8qcryvqXSJqp+j96ub92Gcn25oEC8ff9n5p rTiEY07BlIv31LroeaEBVOuA7+HrqasTfpVqloZtpw74d6oR3IN8FBhq9lR3pzcq OtPW1gJSpX92NC1j+464z7tYSqwI1Ii3u9ymoXYoSNfgebxGdpQxb2e9gspwz/uk Graw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1662761091; x=1662847491; bh=CDU0VDdSa6Cki /cPLSH2NZRjhMuZ2t6g0GaG/DSATIQ=; b=cHDm+a6JwBw+OHm6ibNj+8oGgCKL9 GX+8iX5++WW+6ydyVFKxqdB4kQYlpWsh12PH+hF6Azxk8VrOHhOmLMh1fMZZIu61 KXquFap7Q7HFKo9lYaDzoPUReVE3rmiN2HyWTFuOw0ToCnHRPZSx4LXxQRe42oyP IaBuRgWePg6qwWb+1QI/slN+91c+UHBvzT+C6HvtTrzQbqGkhIi7RpRS0842c0Nz GZ3lLMUHE4hdHTLjdPNNgtYLiR89p3QmKBKKlTSM3Ac6wmIifIfkuGjmgqmTo5pj tGcVYLIDaFyzeIpY0lejJi0I8T7wzHbN7T/YbA5sxO0vGXRI7jC8R6iaw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedtiedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeetnhgurhgvihcuifhhvghriigrnhcuoegrnhgurhgvihes ghhhvghriigrnhdrtghomheqnecuggftrfgrthhtvghrnhepjefhvefhgefgffejgeelke ejleeiffejgffgkeeggfffgfffieeffeeghefhtdffnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghisehghhgvrhiirghnrdgtoh hm X-ME-Proxy: Feedback-ID: i68994715:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Sep 2022 18:04:50 -0400 (EDT) From: Andrei Gherzan To: openembedded-core@lists.openembedded.org Cc: andrei@gherzan.com, Andrei Gherzan Subject: [PATCH 4/4] rootfs.py: Run depmod(wrapper) against each compiled kernel Date: Sat, 10 Sep 2022 00:04:25 +0200 Message-Id: <20220909220425.2737985-4-andrei@gherzan.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220909220425.2737985-1-andrei@gherzan.com> References: <20220909220425.2737985-1-andrei@gherzan.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 ; Fri, 09 Sep 2022 22:04:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/170508 From: Andrei Gherzan We run depmod (through depmodwrapper) at the end of the rootfs generation process. This part of the process assumes in its current implementation that the kernel package name is always 'kernel' and that there is only one set of kernel modules for which we need to generate the modules.dep and map files. The kernel package name can be configured via a variable (KERNEL_PACKAGE_NAME) and becomes a namespace that enables the build system to deal with multiple compiled kernel recipes. This patch checks for all the depmod pkgdata and runs depmod for each of the detected kernel versions/kernel package name. Signed-off-by: Andrei Gherzan --- meta/lib/oe/rootfs.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 0b9911e3a6..a02dddf23d 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -325,19 +325,29 @@ class Rootfs(object, metaclass=ABCMeta): bb.note("No Kernel Modules found, not running depmod") return - kernel_abi_ver_file = oe.path.join(self.d.getVar('PKGDATA_DIR'), "kernel-depmod", - 'kernel-abiversion') - if not os.path.exists(kernel_abi_ver_file): - bb.fatal("No kernel-abiversion file found (%s), cannot run depmod, aborting" % kernel_abi_ver_file) + pkgdatadir = self.d.getVar('PKGDATA_DIR') - with open(kernel_abi_ver_file) as f: - kernel_ver = f.read().strip(' \n') + # PKGDATA_DIR can include multiple kernels so we run depmod for each + # one of them. + for direntry in os.listdir(pkgdatadir): + match = re.match('(.*)-depmod', direntry) + if not match: + continue + kernel_package_name = match.group(1) + + kernel_abi_ver_file = oe.path.join(pkgdatadir, direntry, kernel_package_name + '-abiversion') + if not os.path.exists(kernel_abi_ver_file): + bb.fatal("No kernel-abiversion file found (%s), cannot run depmod, aborting" % kernel_abi_ver_file) + + with open(kernel_abi_ver_file) as f: + kernel_ver = f.read().strip(' \n') - versioned_modules_dir = os.path.join(self.image_rootfs, modules_dir, kernel_ver) + versioned_modules_dir = os.path.join(self.image_rootfs, modules_dir, kernel_ver) - bb.utils.mkdirhier(versioned_modules_dir) + bb.utils.mkdirhier(versioned_modules_dir) - self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver]) + bb.note("Running depmodwrapper for %s ..." % versioned_modules_dir) + self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver, kernel_package_name]) """ Create devfs: