From: Bruce Ashfield <bruce.ashfi...@gmail.com>

It was mentioned that when developing a BSP, the information about what
definition was used, or what fragments have been applied is not obvious
and requires looking at the code.

With this change, we can trigger a full summary of the meta data gathering
phase when KCONF_AUDIT_LEVEL > 0.

Sample output follows:

   NOTE: do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 0
   NOTE: kernel meta data summary for qemux86-64 (standard):
   NOTE:
   ======================================================================
   NOTE: BSP entry point / definition:
   
/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.34+gitAUTOINC+bca3bfbc74_85c17ad073-r0/kernel-meta/bsp/common-pc-64/common-pc-64-standard.scc
   NOTE: Fragments from SRC_URI:
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/kubernetes.scc
   NOTE: KERNEL_FEATURES:  features/nfsd/nfsd-enable.scc
   features/debug/printk.scc features/kernel-sample/kernel-sample.scc
   features/netfilter/netfilter.scc cfg/virtio.scc
   features/drm-bochs/drm-bochs.scc cfg/sound.scc cfg/paravirt_kvm.scc
   features/scsi/scsi-debug.scc features/gpio/mockup.scc
   features/aufs/aufs-enable.scc cfg/fs/flash_fs.scc cfg/virtio.scc
   NOTE: Final scc/cfg list:
   
/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.34+gitAUTOINC+bca3bfbc74_85c17ad073-r0/kernel-meta/bsp/common-pc-64/common-pc-64-standard.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.scc
   /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/kubernetes.scc
   features/nfsd/nfsd-enable.scc features/debug/printk.scc
   features/kernel-sample/kernel-sample.scc
   features/netfilter/netfilter.scc cfg/virtio.scc
   features/drm-bochs/drm-bochs.scc cfg/sound.scc cfg/paravirt_kvm.scc
   features/scsi/scsi-debug.scc features/gpio/mockup.scc
   features/aufs/aufs-enable.scc cfg/fs/flash_fs.scc cfg/virtio.scc

Signed-off-by: Bruce Ashfield <bruce.ashfi...@gmail.com>
Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
(cherry picked from commit b95b11e130e91cb7c5e65f0f9a1c655bcbcbc919)
Signed-off-by: Steve Sakoman <st...@sakoman.com>
---
 meta/classes/kernel-yocto.bbclass | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/meta/classes/kernel-yocto.bbclass 
b/meta/classes/kernel-yocto.bbclass
index ec5fb7b1de..66cce92362 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -105,6 +105,8 @@ do_kernel_metadata() {
        cd ${S}
        export KMETA=${KMETA}
 
+       bbnote "do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 
0"
+
        # if kernel tools are available in-tree, they are preferred
        # and are placed on the path before any external tools. Unless
        # the external tools flag is set, in that case we do nothing.
@@ -252,6 +254,21 @@ do_kernel_metadata() {
                        bbfatal_log "Could not generate configuration queue for 
${KMACHINE}."
                fi
        fi
+
+       if [ ${KCONF_AUDIT_LEVEL} -gt 0 ]; then
+               bbnote "kernel meta data summary for ${KMACHINE} 
(${LINUX_KERNEL_TYPE}):"
+               bbnote 
"======================================================================"
+               if [ -n "${KMETA_EXTERNAL_BSPS}" ]; then
+                       bbnote "Non kernel-cache (external) bsp"
+               fi
+               bbnote "BSP entry point / definition: $bsp_definition"
+               if [ -n "$in_tree_defconfig" ]; then
+                       bbnote "KBUILD_DEFCONFIG: ${KBUILD_DEFCONFIG}"
+               fi
+               bbnote "Fragments from SRC_URI: $sccs_from_src_uri"
+               bbnote "KERNEL_FEATURES: $KERNEL_FEATURES_FINAL"
+               bbnote "Final scc/cfg list: $sccs_defconfig $bsp_definition 
$sccs $KERNEL_FEATURES_FINAL"
+       fi
 }
 
 do_patch() {
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152503): 
https://lists.openembedded.org/g/openembedded-core/message/152503
Mute This Topic: https://lists.openembedded.org/mt/83233816/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to