hi, please consider attached patch for fedora kernel.spec. It enables CONFIG_DEBUG_INFO_BTF options to export BTF info in /sys/kernel/btf/vmlinux file. I tested on x86_64/s390x/aarach64/ppc servers and the file /sys/kernel/btf/vmlinux shows correctly. I checked the armv7hl arch build.log and it containes the pahole execution, so I assume it's generated properly. brew: https://koji.fedoraproject.org/koji/taskinfo?taskID=38681853 thanks, jirka --- Plus adding dwarves build dependency which is needed for BTF debuginfo to be generated and attached to kernel. Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx> --- configs/fedora/generic/CONFIG_DEBUG_INFO_BTF | 2 +- kernel-aarch64-debug.config | 2 +- kernel-aarch64.config | 2 +- kernel-armv7hl-debug.config | 2 +- kernel-armv7hl-lpae-debug.config | 2 +- kernel-armv7hl-lpae.config | 2 +- kernel-armv7hl.config | 2 +- kernel-i686-debug.config | 2 +- kernel-i686.config | 2 +- kernel-ppc64le-debug.config | 2 +- kernel-ppc64le.config | 2 +- kernel-s390x-debug.config | 2 +- kernel-s390x.config | 2 +- kernel-x86_64-debug.config | 2 +- kernel-x86_64.config | 2 +- kernel.spec | 3 ++- 16 files changed, 17 insertions(+), 16 deletions(-) diff --git a/configs/fedora/generic/CONFIG_DEBUG_INFO_BTF b/configs/fedora/generic/CONFIG_DEBUG_INFO_BTF index 3b5ac748f282..39227b4511af 100644 --- a/configs/fedora/generic/CONFIG_DEBUG_INFO_BTF +++ b/configs/fedora/generic/CONFIG_DEBUG_INFO_BTF @@ -1 +1 @@ -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y diff --git a/kernel-aarch64-debug.config b/kernel-aarch64-debug.config index 25917ed7c0a2..f40220d5c179 100644 --- a/kernel-aarch64-debug.config +++ b/kernel-aarch64-debug.config @@ -1289,7 +1289,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-aarch64.config b/kernel-aarch64.config index aaa967b286df..55f21773af73 100644 --- a/kernel-aarch64.config +++ b/kernel-aarch64.config @@ -1289,7 +1289,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-armv7hl-debug.config b/kernel-armv7hl-debug.config index d7d7a9f0a485..d54ce8ceb0e9 100644 --- a/kernel-armv7hl-debug.config +++ b/kernel-armv7hl-debug.config @@ -1279,7 +1279,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-armv7hl-lpae-debug.config b/kernel-armv7hl-lpae-debug.config index adda1dc48d4e..e049ebdddacf 100644 --- a/kernel-armv7hl-lpae-debug.config +++ b/kernel-armv7hl-lpae-debug.config @@ -1239,7 +1239,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-armv7hl-lpae.config b/kernel-armv7hl-lpae.config index b3788525651d..e572f653140f 100644 --- a/kernel-armv7hl-lpae.config +++ b/kernel-armv7hl-lpae.config @@ -1239,7 +1239,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-armv7hl.config b/kernel-armv7hl.config index 6e8ea6ec9783..e840ac68c870 100644 --- a/kernel-armv7hl.config +++ b/kernel-armv7hl.config @@ -1279,7 +1279,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-i686-debug.config b/kernel-i686-debug.config index 7ef076f3646f..bd6a05f5004f 100644 --- a/kernel-i686-debug.config +++ b/kernel-i686-debug.config @@ -1047,7 +1047,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-i686.config b/kernel-i686.config index 597f8233c8af..a2e8941d433c 100644 --- a/kernel-i686.config +++ b/kernel-i686.config @@ -1046,7 +1046,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config index f3db93aef02c..bab3a555a9ad 100644 --- a/kernel-ppc64le-debug.config +++ b/kernel-ppc64le-debug.config @@ -975,7 +975,7 @@ CONFIG_DEBUGGER=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config index 0b421851571d..b2f334f4f818 100644 --- a/kernel-ppc64le.config +++ b/kernel-ppc64le.config @@ -974,7 +974,7 @@ CONFIG_DEBUGGER=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-s390x-debug.config b/kernel-s390x-debug.config index c5e323fc7534..3e6a04264f0b 100644 --- a/kernel-s390x-debug.config +++ b/kernel-s390x-debug.config @@ -985,7 +985,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-s390x.config b/kernel-s390x.config index e61d0d5888e6..6915b19b141d 100644 --- a/kernel-s390x.config +++ b/kernel-s390x.config @@ -984,7 +984,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-x86_64-debug.config b/kernel-x86_64-debug.config index c1cc5697b34b..86a8d050eecc 100644 --- a/kernel-x86_64-debug.config +++ b/kernel-x86_64-debug.config @@ -1082,7 +1082,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel-x86_64.config b/kernel-x86_64.config index 25e8456ada0a..6140186ea49c 100644 --- a/kernel-x86_64.config +++ b/kernel-x86_64.config @@ -1081,7 +1081,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set CONFIG_DEBUG_HIGHMEM=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set diff --git a/kernel.spec b/kernel.spec index 25ef410900c4..999efa25f81f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -501,7 +501,7 @@ Requires: kernel-modules-uname-r = %{KVERREL}%{?variant} BuildRequires: kmod, patch, bash, tar, git-core BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex -BuildRequires: net-tools, hostname, bc, elfutils-devel +BuildRequires: net-tools, hostname, bc, elfutils-devel, dwarves %if 0%{?fedora} # Used to mangle unversioned shebangs to be Python 3 BuildRequires: /usr/bin/pathfix.py @@ -530,6 +530,7 @@ BuildConflicts: rhbuildsys(DiskFree) < 500Mb %if %{with_debuginfo} BuildRequires: rpm-build, elfutils BuildConflicts: rpm < 4.13.0.1-19 +BuildConflicts: dwarves < 1.13 # Most of these should be enabled after more investigation %undefine _include_minidebuginfo %undefine _find_debuginfo_dwz_opts -- 2.21.0 _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx