From: Yann Dirson <[email protected]>
Upstream looks for unversionned System.map file in kernel_build_tree,
and if this fails goes for versionned filename in $sysroot/boot/.
OTOH we have a versionned filename in kernel_build_tree.
---
.../systemtap/systemtap-native_git.bb | 6 +++++
.../systemtap/system-map-location.patch | 26 +++++++++++++++++++
2 files changed, 32 insertions(+)
create mode 100644
meta/recipes-kernel/systemtap/systemtap/system-map-location.patch
diff --git a/meta/recipes-kernel/systemtap/systemtap-native_git.bb
b/meta/recipes-kernel/systemtap/systemtap-native_git.bb
index 19cc1cf0f0..e24abcc2d6 100644
--- a/meta/recipes-kernel/systemtap/systemtap-native_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap-native_git.bb
@@ -3,4 +3,10 @@ require systemtap_git.bb
inherit native
+# don't look in /boot, and use kernel version to find proper
+# System.map-xxx in kernel build tree
+SRC_URI += "\
+ file://system-map-location.patch \
+"
+
addtask addto_recipe_sysroot after do_populate_sysroot before do_build
diff --git a/meta/recipes-kernel/systemtap/systemtap/system-map-location.patch
b/meta/recipes-kernel/systemtap/systemtap/system-map-location.patch
new file mode 100644
index 0000000000..61e477bf69
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/system-map-location.patch
@@ -0,0 +1,26 @@
+Index: git/session.cxx
+===================================================================
+--- git.orig/session.cxx
++++ git/session.cxx
+@@ -2021,20 +2021,12 @@ systemtap_session::parse_kernel_exports
+ int
+ systemtap_session::parse_kernel_functions ()
+ {
+- string system_map_path = kernel_build_tree + "/System.map";
++ string system_map_path = kernel_build_tree + "/System.map-" +
kernel_release;
+ ifstream system_map;
+
+ system_map.open(system_map_path.c_str(), ifstream::in);
+ if (! system_map.is_open())
+ {
+- if (verbose > 1)
+- clog << _F("Kernel symbol table %s unavailable, (%s)",
+- system_map_path.c_str(), strerror(errno)) << endl;
+-
+- system_map_path = sysroot + "/boot/System.map-" + kernel_release;
+- system_map.clear();
+- system_map.open(system_map_path.c_str(), ifstream::in);
+- if (! system_map.is_open())
+ {
+ if (verbose > 1)
+ clog << _F("Kernel symbol table %s unavailable, (%s)",
--
2.28.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142688):
https://lists.openembedded.org/g/openembedded-core/message/142688
Mute This Topic: https://lists.openembedded.org/mt/76990989/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-