Bump Buildroot to 2021.02-rc3 (#1260)
* Rebase patches to Buildroot 2021.02-rc3 * Update Buildroot to 2021.02-rc3 * Declare Kernel headers to be Linux version 5.10 (since they are, and new Buildroot knows about 5.10)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
||||
From c68c868b573acc73e144312326750be2ed96632f Mon Sep 17 00:00:00 2001
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Thu, 29 Jun 2017 14:43:19 +0300
|
||||
Subject: [PATCH] trace-listen: add missing header
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The PATH_MAX macro requires the limits.h header. This fixes build with musl
|
||||
libc:
|
||||
|
||||
.../trace-cmd-trace-cmd-v2.6.1/trace-listen.c: In function ‘make_pid_name’:
|
||||
.../trace-cmd-trace-cmd-v2.6.1/trace-listen.c:167:16: error: ‘PATH_MAX’ undeclared (first use in this function)
|
||||
snprintf(buf, PATH_MAX, VAR_RUN_DIR "/trace-cmd-net.pid");
|
||||
^~~~~~~~
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Upstream status: https://lkml.org/lkml/2017/6/29/286
|
||||
|
||||
trace-listen.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/trace-listen.c b/trace-listen.c
|
||||
index 17ff9d8c160c..838d6bcf3649 100644
|
||||
--- a/trace-listen.c
|
||||
+++ b/trace-listen.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include "trace-local.h"
|
||||
#include "trace-msg.h"
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
From 1a000636c1828eecdcec5360a51623ef4ffbff04 Mon Sep 17 00:00:00 2001
|
||||
From: Beniamin Sandu <beniaminsandu@gmail.com>
|
||||
Date: Mon, 30 Nov 2020 14:27:55 +0200
|
||||
Subject: [PATCH] trace-cmd: make it build against musl C library
|
||||
|
||||
* add some missing headers and macros
|
||||
* set pthread affinity using pthread_setaffinity_np after creating the thread
|
||||
instead of pthread_attr_setaffinity_np (which seems to not be implemented
|
||||
in musl)
|
||||
|
||||
Tested using https://musl.cc/x86_64-linux-musl-native.tgz
|
||||
|
||||
Link: https://lore.kernel.org/linux-trace-devel/20201130122755.31000-1-beniaminsandu@gmail.com
|
||||
|
||||
Reviewed-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
|
||||
Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
|
||||
[ Fixed a whitespace issue ]
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
[Retrieved from:
|
||||
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?id=1a000636c1828eecdcec5360a51623ef4ffbff04]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
.../include/private/trace-cmd-private.h | 1 +
|
||||
lib/trace-cmd/include/trace-cmd-local.h | 1 +
|
||||
lib/tracefs/include/tracefs-local.h | 12 ++++++++++++
|
||||
lib/tracefs/tracefs-events.c | 1 +
|
||||
tracecmd/include/trace-local.h | 1 +
|
||||
tracecmd/trace-tsync.c | 16 +++++++++++-----
|
||||
6 files changed, 27 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h
|
||||
index 458760e5..a0dac5da 100644
|
||||
--- a/lib/trace-cmd/include/private/trace-cmd-private.h
|
||||
+++ b/lib/trace-cmd/include/private/trace-cmd-private.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#ifndef _TRACE_CMD_PRIVATE_H
|
||||
#define _TRACE_CMD_PRIVATE_H
|
||||
|
||||
+#include <sys/types.h>
|
||||
#include "traceevent/event-parse.h"
|
||||
#include "trace-cmd/trace-cmd.h"
|
||||
|
||||
diff --git a/lib/trace-cmd/include/trace-cmd-local.h b/lib/trace-cmd/include/trace-cmd-local.h
|
||||
index d0a7365a..0cd27441 100644
|
||||
--- a/lib/trace-cmd/include/trace-cmd-local.h
|
||||
+++ b/lib/trace-cmd/include/trace-cmd-local.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#ifndef _TRACE_CMD_LOCAL_H
|
||||
#define _TRACE_CMD_LOCAL_H
|
||||
|
||||
+#include <byteswap.h>
|
||||
#include "trace-cmd-private.h"
|
||||
|
||||
/* Can be overridden */
|
||||
diff --git a/lib/tracefs/include/tracefs-local.h b/lib/tracefs/include/tracefs-local.h
|
||||
index 9cc371b4..bdbf89e8 100644
|
||||
--- a/lib/tracefs/include/tracefs-local.h
|
||||
+++ b/lib/tracefs/include/tracefs-local.h
|
||||
@@ -13,4 +13,16 @@ void warning(const char *fmt, ...);
|
||||
int str_read_file(const char *file, char **buffer);
|
||||
char *trace_append_file(const char *dir, const char *name);
|
||||
|
||||
+#ifndef ACCESSPERMS
|
||||
+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
|
||||
+#endif
|
||||
+
|
||||
+#ifndef ALLPERMS
|
||||
+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
|
||||
+#endif
|
||||
+
|
||||
+#ifndef DEFFILEMODE
|
||||
+#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /* 0666*/
|
||||
+#endif
|
||||
+
|
||||
#endif /* _TRACE_FS_LOCAL_H */
|
||||
diff --git a/lib/tracefs/tracefs-events.c b/lib/tracefs/tracefs-events.c
|
||||
index 80a25ee5..a4e5215f 100644
|
||||
--- a/lib/tracefs/tracefs-events.c
|
||||
+++ b/lib/tracefs/tracefs-events.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include "kbuffer.h"
|
||||
#include "tracefs.h"
|
||||
diff --git a/tracecmd/include/trace-local.h b/tracecmd/include/trace-local.h
|
||||
index 28d1b4e0..85c7e03e 100644
|
||||
--- a/tracecmd/include/trace-local.h
|
||||
+++ b/tracecmd/include/trace-local.h
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h> /* for DIR */
|
||||
+#include <limits.h>
|
||||
|
||||
#include "trace-cmd-private.h"
|
||||
#include "event-utils.h"
|
||||
diff --git a/tracecmd/trace-tsync.c b/tracecmd/trace-tsync.c
|
||||
index e639788d..8b9083ae 100644
|
||||
--- a/tracecmd/trace-tsync.c
|
||||
+++ b/tracecmd/trace-tsync.c
|
||||
@@ -104,13 +104,16 @@ int tracecmd_host_tsync(struct buffer_instance *instance,
|
||||
|
||||
pthread_attr_init(&attrib);
|
||||
pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE);
|
||||
- if (!get_first_cpu(&pin_mask, &mask_size))
|
||||
- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask);
|
||||
|
||||
ret = pthread_create(&instance->tsync_thread, &attrib,
|
||||
tsync_host_thread, &instance->tsync);
|
||||
- if (!ret)
|
||||
+
|
||||
+ if (!ret) {
|
||||
+ if (!get_first_cpu(&pin_mask, &mask_size))
|
||||
+ pthread_setaffinity_np(instance->tsync_thread, mask_size, pin_mask);
|
||||
instance->tsync_thread_running = true;
|
||||
+ }
|
||||
+
|
||||
if (pin_mask)
|
||||
CPU_FREE(pin_mask);
|
||||
pthread_attr_destroy(&attrib);
|
||||
@@ -243,11 +246,14 @@ unsigned int tracecmd_guest_tsync(char *tsync_protos,
|
||||
pthread_attr_init(&attrib);
|
||||
tsync->sync_proto = proto;
|
||||
pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE);
|
||||
- if (!get_first_cpu(&pin_mask, &mask_size))
|
||||
- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask);
|
||||
|
||||
ret = pthread_create(thr_id, &attrib, tsync_agent_thread, tsync);
|
||||
|
||||
+ if (!ret) {
|
||||
+ if (!get_first_cpu(&pin_mask, &mask_size))
|
||||
+ pthread_setaffinity_np(*thr_id, mask_size, pin_mask);
|
||||
+ }
|
||||
+
|
||||
if (pin_mask)
|
||||
CPU_FREE(pin_mask);
|
||||
pthread_attr_destroy(&attrib);
|
||||
@@ -0,0 +1,51 @@
|
||||
From 2f55ded528cfd8ef468bdd1f8bb82dcf1cfae04a Mon Sep 17 00:00:00 2001
|
||||
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
|
||||
Date: Wed, 16 Dec 2020 18:19:43 -0500
|
||||
Subject: [PATCH] trace-cmd: Move add_event_pid() out of #ifndef NO_PTRACE
|
||||
|
||||
When NO_PTRACE is defined, add_event_pid() is also not defined, but it is
|
||||
used outside of NO_PTRACE pre processor block. And this causes a
|
||||
"add_event_pid" not defined build failure.
|
||||
|
||||
Link: https://lore.kernel.org/linux-trace-devel/20201216232145.010165486@goodmis.org
|
||||
|
||||
Fixes: 0844cff1c ("trace-cmd: Fix "trace-cmd reset" command to restore the default value of set_event_pid")
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
[Retrieved from:
|
||||
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?id=2f55ded528cfd8ef468bdd1f8bb82dcf1cfae04a]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
tracecmd/trace-record.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
|
||||
index f8baed7d..e2d1cedf 100644
|
||||
--- a/tracecmd/trace-record.c
|
||||
+++ b/tracecmd/trace-record.c
|
||||
@@ -1312,8 +1312,13 @@ static int trace_wait_for_processes(struct buffer_instance *instance) {
|
||||
free(pidfds);
|
||||
return ret;
|
||||
}
|
||||
-#ifndef NO_PTRACE
|
||||
|
||||
+static void add_event_pid(struct buffer_instance *instance, const char *buf)
|
||||
+{
|
||||
+ tracefs_instance_file_write(instance->tracefs, "set_event_pid", buf);
|
||||
+}
|
||||
+
|
||||
+#ifndef NO_PTRACE
|
||||
/**
|
||||
* append_pid_filter - add a new pid to an existing filter
|
||||
* @curr_filter: the filter to append to. If NULL, then allocate one
|
||||
@@ -1369,11 +1374,6 @@ static void update_sched_events(struct buffer_instance *instance, int pid)
|
||||
static int open_instance_fd(struct buffer_instance *instance,
|
||||
const char *file, int flags);
|
||||
|
||||
-static void add_event_pid(struct buffer_instance *instance, const char *buf)
|
||||
-{
|
||||
- tracefs_instance_file_write(instance->tracefs, "set_event_pid", buf);
|
||||
-}
|
||||
-
|
||||
static void add_new_filter_child_pid(int pid, int child)
|
||||
{
|
||||
struct buffer_instance *instance;
|
||||
@@ -1,4 +1,6 @@
|
||||
# Locally computed
|
||||
sha256 3b3f564cc6ee30341051ccb7589b42f3abe4e676a21c029c7c127c7edf5bdcf0 trace-cmd-trace-cmd-v2.7.tar.gz
|
||||
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
|
||||
sha256 70f297763149e72306919c924e164f83041d5e512868d4c8c1826c171b3e49f9 COPYING.LIB
|
||||
sha256 8bab29530cd05272dccab48c9780644758e71ed990ce65c701b9095f7beae417 trace-cmd-trace-cmd-v2.9.1-br1.tar.gz
|
||||
sha256 b1d04b850c1c7471b0f0896f6c6f0fcfc9f07e2dd183a5f5826af269fe9e88fb COPYING
|
||||
sha256 70f297763149e72306919c924e164f83041d5e512868d4c8c1826c171b3e49f9 COPYING.LIB
|
||||
sha256 f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79 LICENSES/GPL-2.0
|
||||
sha256 0b9a4febcdee6de55872501d5c1a8f5d8b0d1650cd4d5351995ceb22e889f8ca LICENSES/LGPL-2.1
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TRACE_CMD_VERSION = trace-cmd-v2.7
|
||||
TRACE_CMD_SITE = https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
|
||||
TRACE_CMD_VERSION = trace-cmd-v2.9.1
|
||||
TRACE_CMD_SITE = https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git
|
||||
TRACE_CMD_SITE_METHOD = git
|
||||
TRACE_CMD_LICENSE = GPL-2.0, LGPL-2.1
|
||||
TRACE_CMD_LICENSE_FILES = COPYING COPYING.LIB
|
||||
TRACE_CMD_LICENSE_FILES = COPYING COPYING.LIB LICENSES/GPL-2.0 LICENSES/LGPL-2.1
|
||||
|
||||
TRACE_CMD_DEPENDENCIES = host-pkgconf
|
||||
TRACE_CMD_MAKE_OPTS = prefix=/usr etcdir=/etc
|
||||
|
||||
ifeq ($(BR2_PACKAGE_AUDIT),y)
|
||||
TRACE_CMD_DEPENDENCIES += audit
|
||||
@@ -18,10 +19,10 @@ endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PYTHON),y)
|
||||
TRACE_CMD_DEPENDENCIES += python host-swig
|
||||
TRACE_CMD_MAKE_OPTS = PYTHON_VERS=python
|
||||
TRACE_CMD_MAKE_OPTS += PYTHON_VERS=python
|
||||
else ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
TRACE_CMD_DEPENDENCIES += python3 host-swig
|
||||
TRACE_CMD_MAKE_OPTS = PYTHON_VERS=python3
|
||||
TRACE_CMD_MAKE_OPTS += PYTHON_VERS=python3
|
||||
else
|
||||
TRACE_CMD_MAKE_OPTS += NO_PYTHON=1
|
||||
endif
|
||||
@@ -36,17 +37,18 @@ TRACE_CMD_CFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS))
|
||||
TRACE_CMD_CPPFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CPPFLAGS))
|
||||
|
||||
define TRACE_CMD_BUILD_CMDS
|
||||
$(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(TRACE_CMD_CFLAGS)" \
|
||||
CPPFLAGS="$(TRACE_CMD_CPPFLAGS)" \
|
||||
$(TRACE_CMD_MAKE_OPTS) \
|
||||
-C $(@D) all
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(TRACE_CMD_CFLAGS)" \
|
||||
CPPFLAGS="$(TRACE_CMD_CPPFLAGS)" \
|
||||
$(MAKE) $(TRACE_CMD_MAKE_OPTS) -C $(@D)
|
||||
endef
|
||||
|
||||
define TRACE_CMD_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/trace-cmd $(TARGET_DIR)/usr/bin/trace-cmd
|
||||
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/trace-cmd/plugins
|
||||
$(INSTALL) -D -m 0755 $(@D)/plugin_*.so $(TARGET_DIR)/usr/lib/trace-cmd/plugins
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(TRACE_CMD_CFLAGS)" \
|
||||
CPPFLAGS="$(TRACE_CMD_CPPFLAGS)" \
|
||||
DESTDIR=$(TARGET_DIR) \
|
||||
$(MAKE) $(TRACE_CMD_MAKE_OPTS) -C $(@D) install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
Reference in New Issue
Block a user