linux-yocto_virtualization.inc: If using externalsrc adjust dependency
PATCH 1/1 linux-yocto_virtualization.inc: If using externalsrc adjust dependency
From: Mark Hatle <[email protected]>
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/<machine>/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
--- recipes-kernel/linux/linux-yocto_virtualization.inc | 6 ++++++ 1 file changed, 6 insertions(+)
recipes-kernel/linux/linux-yocto_virtualization.inc +6 -0
@@ -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 +# 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))]}" + # 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 )}"
Signature · 1 line
2.34.1
Quoted 52 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Mark Hatle
Sent: den 3 oktober 2024 00:39
To: [email protected]
Subject: [meta-virtualization][scarthgap][PATCH] linux-yocto_virtualization.inc: If using externalsrc adjust dependencyFrom: Mark Hatle <[email protected]>
When using externalsrc, the system will disable a number of tasks such as
do_validate_branches,do_unpackanddo_patch. Thedo_kernel_metadatatask is configured to run afterdo_validate_branchesdo_unpackand beforedo_patch. Since all of these have been removed, the task will never run.The
do_kernel_metadatatask 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_metadatarunning,do_kernel_configmewill fail to run
with errors like:
ERROR: linux-xlnx-6.6.40+git-r0do_kernel_configme: Feature '../recipe-sysroot-native/kcfg/cfg/virtio.scc' not found, this will cause configuration failures.
ERROR: linux-xlnx-6.6.40+git-r0do_kernel_configme: Check theSRC_URIfor meta-data repositories or directories that may be missing
ERROR: linux-xlnx-6.6.40+git-r0do_kernel_configme: SetKERNEL_DANGLING_FEATURES_WARN_ONLYto ignore this issueFix 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 ofdo_kernel_configme.To reproduce th original issue:
$ . ./oe-initbuild-env $ bitbake linux-yocto -c patch $ cp -r tmp/work-shared/<machine>/kernel-source linux-yoctoedit the
conf/local.confadding:
DISTRO_FEATURES:append = " virtualization" INHERIT += "externalsrc" EXTERNALSRC:pn-linux-yocto = "${TOPDIR}/linux-yocto"$ rm -rf tmp $ bitbake linux-yocto -c menuconfigSigned-off-by Mark Hatle <[email protected]>--- recipes-kernel/linux/linux-yocto_virtualization.inc | 6 ++++++ 1 file changed, 6 insertions(+)recipes-kernel/linux/linux-yocto_virtualization.inc +0
-0
recipes-kernel/linux/linux-yocto_virtualization.inc KERNEL_FEATURES:append = " ${KERNEL_CACHE_FEATURES}" · line 54
Quoted 6 lines
recipes-kernel/linux/linux-yocto_virtualization.inc +3
-0@@ -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
recipes-kernel/linux/linux-yocto_virtualization.inc KERNEL_FEATURES:append = " ${KERNEL_CACHE_FEATURES}" · line 56
Quoted 2 lines
recipes-kernel/linux/linux-yocto_virtualization.inc +2
-0+# 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 ''}"
Quoted 6 lines
recipes-kernel/linux/linux-yocto_virtualization.inc +1
-1+ # 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
Quoted 56 lines · Peter Kjellerstedt via lists.yoctoproject.org
Quoted 56 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Mark Hatle
Sent: den 3 oktober 2024 00:39
To: [email protected]
Subject: [meta-virtualization][scarthgap][PATCH] linux-yocto_virtualization.inc: If using externalsrc adjust dependencyFrom: Mark Hatle <[email protected]>
When using externalsrc, the system will disable a number of tasks such as
do_validate_branches,do_unpackanddo_patch. Thedo_kernel_metadatatask is configured to run afterdo_validate_branchesdo_unpackand beforedo_patch. Since all of these have been removed, the task will never run.The
do_kernel_metadatatask 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_metadatarunning,do_kernel_configmewill fail to run
with errors like:
ERROR: linux-xlnx-6.6.40+git-r0do_kernel_configme: Feature '../recipe-sysroot-native/kcfg/cfg/virtio.scc' not found, this will cause configuration failures.
ERROR: linux-xlnx-6.6.40+git-r0do_kernel_configme: Check theSRC_URIfor meta-data repositories or directories that may be missing
ERROR: linux-xlnx-6.6.40+git-r0do_kernel_configme: SetKERNEL_DANGLING_FEATURES_WARN_ONLYto ignore this issueFix 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 ofdo_kernel_configme.To reproduce th original issue:
$ . ./oe-initbuild-env $ bitbake linux-yocto -c patch $ cp -r tmp/work-shared/<machine>/kernel-source linux-yoctoedit the
conf/local.confadding:
DISTRO_FEATURES:append = " virtualization" INHERIT += "externalsrc" EXTERNALSRC:pn-linux-yocto = "${TOPDIR}/linux-yocto"$ rm -rf tmp $ bitbake linux-yocto -c menuconfigSigned-off-by Mark Hatle <[email protected]>--- recipes-kernel/linux/linux-yocto_virtualization.inc | 6 ++++++ 1 file changed, 6 insertions(+)recipes-kernel/linux/linux-yocto_virtualization.inc +0
-0@@ -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))]}"
Quoted 5 lines
recipes-kernel/linux/linux-yocto_virtualization.inc KERNEL_FEATURES:append = " ${KERNEL_CACHE_FEATURES}" · line 54
Quoted 3 lines
recipes-kernel/linux/linux-yocto_virtualization.inc +3
-0+# 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 addTypo: Manully -> Manually
I'll fix this on the way into the tree.
Quoted 8 lines
recipes-kernel/linux/linux-yocto_virtualization.inc KERNEL_FEATURES:append = " ${KERNEL_CACHE_FEATURES}" · line 56
Quoted 3 lines
recipes-kernel/linux/linux-yocto_virtualization.inc +2
-0+# 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 agree that the index-style of conditionals is a bit strange, but for now, I'm going to
go with consistency in the file, and will make a note to revisit this in a month or so
(once I've released meta-virt).
Thanks for the review Peter, it is most appreciated.
Bruce
Quoted 18 lines
Quoted 6 lines
recipes-kernel/linux/linux-yocto_virtualization.inc +1
-1+ # 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/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
merged (and typo fixed)
Bruce
In message: [meta-virtualization][scarthgap][PATCH] linux-yocto_virtualization.inc: If using externalsrc adjust dependency
Quoted 71 lines · on 02/10/2024 Mark Hatle via lists.yoctoproject.org wrote:
From: Mark Hatle <[email protected]>
When using externalsrc, the system will disable a number of tasks such as
do_validate_branches,do_unpackanddo_patch. Thedo_kernel_metadatatask is configured to run afterdo_validate_branchesdo_unpackand beforedo_patch. Since all of these have been removed, the task will never run.The
do_kernel_metadatatask 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_metadatarunning,do_kernel_configmewill fail to run
with errors like:
ERROR: linux-xlnx-6.6.40+git-r0do_kernel_configme: Feature '../recipe-sysroot-native/kcfg/cfg/virtio.scc' not found, this will cause configuration failures.
ERROR: linux-xlnx-6.6.40+git-r0do_kernel_configme: Check theSRC_URIfor meta-data repositories or directories that may be missing
ERROR: linux-xlnx-6.6.40+git-r0do_kernel_configme: SetKERNEL_DANGLING_FEATURES_WARN_ONLYto ignore this issueFix 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 ofdo_kernel_configme.To reproduce th original issue:
$ . ./oe-initbuild-env $ bitbake linux-yocto -c patch $ cp -r tmp/work-shared/<machine>/kernel-source linux-yoctoedit the
conf/local.confadding:
DISTRO_FEATURES:append = " virtualization" INHERIT += "externalsrc" EXTERNALSRC:pn-linux-yocto = "${TOPDIR}/linux-yocto"$ rm -rf tmp $ bitbake linux-yocto -c menuconfigSigned-off-by Mark Hatle <[email protected]>--- recipes-kernel/linux/linux-yocto_virtualization.inc | 6 ++++++ 1 file changed, 6 insertions(+)recipes-kernel/linux/linux-yocto_virtualization.inc +6
-0@@ -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 +# 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))]}" + # 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 )}"Signature · 11 lines
2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8912): https://lists.yoctoproject.org/g/meta-virtualization/message/8912 Mute This Topic: https://lists.yoctoproject.org/mt/108789783/1050810 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-