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 66112CF854F for ; Thu, 3 Oct 2024 01:21:10 +0000 (UTC) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by mx.groups.io with SMTP id smtpd.web11.1678.1727918462379965348 for ; Wed, 02 Oct 2024 18:21:02 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: kernel.crashing.org, ip: 63.228.1.57, mailfrom: mark.hatle@kernel.crashing.org) Received: from kernel.crashing.org (70-99-78-136.nuveramail.net [70.99.78.136] (may be forged)) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 4931L1YG029413 for ; Wed, 2 Oct 2024 20:21:01 -0500 Received: from [192.168.2.122] ([192.168.2.122]) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 4931KD7I024815 for ; Wed, 2 Oct 2024 20:21:00 -0500 Message-ID: <469526aa-06f3-4e97-bbcf-0bb233027a8f@kernel.crashing.org> Date: Wed, 2 Oct 2024 20:21:00 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Mark Hatle Subject: [meta-virtualization][scarthgap][PATCH] linux-yocto_virtualization.inc: If using externalsrc adjust dependency References: <169112f3-874a-44fb-9898-98330b4a9d07@kernel.crashing.org> Content-Language: en-US Reply-To: Mark Hatle To: "meta-virtualization@lists.yoctoproject.org" In-Reply-To: <169112f3-874a-44fb-9898-98330b4a9d07@kernel.crashing.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 ; Thu, 03 Oct 2024 01:21:10 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-virtualization/message/8914 On 10/2/24 8:11 PM, Peter Kjellerstedt wrote: >> -----Original Message----- >> From: meta-virtualization@lists.yoctoproject.org On Behalf Of Mark Hatle >> Sent: den 3 oktober 2024 00:39 >> To: meta-virtualization@lists.yoctoproject.org >> Subject: [meta-virtualization][scarthgap][PATCH] linux-yocto_virtualization.inc: If using externalsrc adjust dependency >> >> From: Mark Hatle >> >> When using externalsrc, the system will disable a number of tasks such as >> do_validate_branches, do_unpack and do_patch. The do_kernel_metadata task >> is configured to run after do_validate_branches do_unpack and before >> do_patch. Since all of these have been removed, the task will never >> run. >> >> The do_kernel_metadata task is responsible for populating the >> recipe-sysroot-native/kcfg directory via it's own dependency to >> yocto-cfg-fragments-native:do_populate_sysroot. >> >> Without do_kernel_metadata running, do_kernel_configme will fail to run >> with errors like: >> ERROR: linux-xlnx-6.6.40+git-r0 do_kernel_configme: Feature '../recipe-sysroot-native/kcfg/cfg/virtio.scc' not found, this will cause configuration failures. >> ERROR: linux-xlnx-6.6.40+git-r0 do_kernel_configme: Check the SRC_URI for meta-data repositories or directories that may be missing >> ERROR: linux-xlnx-6.6.40+git-r0 do_kernel_configme: Set KERNEL_DANGLING_FEATURES_WARN_ONLY to ignore this issue >> >> Fix this issue by detecting if we're running with externalsrc, and then >> adding the task do_kernel_metadata (from the current recipe) as a >> dependency of do_kernel_configme. >> >> To reproduce th original issue: >> >> $ . ./oe-initbuild-env >> $ bitbake linux-yocto -c patch >> $ cp -r tmp/work-shared//kernel-source linux-yocto >> >> edit the conf/local.conf adding: >> DISTRO_FEATURES:append = " virtualization" >> INHERIT += "externalsrc" >> EXTERNALSRC:pn-linux-yocto = "${TOPDIR}/linux-yocto" >> >> $ rm -rf tmp >> $ bitbake linux-yocto -c menuconfig >> >> Signed-off-by: Mark Hatle >> --- >> recipes-kernel/linux/linux-yocto_virtualization.inc | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/recipes-kernel/linux/linux-yocto_virtualization.inc b/recipes-kernel/linux/linux-yocto_virtualization.inc >> index 9a6554d..f0ec80c 100644 >> --- a/recipes-kernel/linux/linux-yocto_virtualization.inc >> +++ b/recipes-kernel/linux/linux-yocto_virtualization.inc >> @@ -49,6 +49,12 @@ KERNEL_FEATURES:append = " ${KERNEL_CACHE_FEATURES}" >> # features can be enabled via the fragments >> do_kernel_metadata[depends] += "${@['', 'yocto-cfg-fragments-native:do_populate_sysroot'][(bb.data.inherits_class('kernel-yocto', d))]}" >> >> +# if externalsrc is enabled, do_kernel_metadata dependency on >> +# yocto-cfg-fragments-native won't be run to populate >> +# recipe-sysroot-native/kcfg because do_patch is not run. Manully add > > Typo: Manully -> Manually > >> +# the dependency to do_kernel_configme for this special case >> +do_kernel_configme[depends] += "${@['', d.getVar('PN') + ':do_kernel_metadata'][(bb.data.inherits_class('externalsrc', d))]}" > > This can be written more readable as: > > do_kernel_configme[depends] += "${@d.getVar('PN') + ':do_kernel_metadata' if bb.data.inherits_class('externalsrc', d) else ''}" I followed the existing style in the recipe of the other [depends] line above. --Mark >> + >> # xen kernel support >> # SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}" >> KERNEL_FEATURES:append = "${@distro_cond_feature('cfg/xen.scc', 'xen', d)}" >> -- >> 2.34.1 > > //Peter > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#8913): https://lists.yoctoproject.org/g/meta-virtualization/message/8913 > Mute This Topic: https://lists.yoctoproject.org/mt/108789783/3616948 > Group Owner: meta-virtualization+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [mark.hatle@kernel.crashing.org] > -=-=-=-=-=-=-=-=-=-=-=- >