summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-kernel
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2021-01-27 22:27:17 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2021-01-27 22:27:17 +0300
commit98cc5cd6483975b64d80e8323f7f659dd1337d75 (patch)
tree5fa64e93d57396bc4c76aa3537156205b4b424ac /meta-openembedded/meta-oe/recipes-kernel
parent82dbc15a05125a812c140a3c8cff81c366482229 (diff)
parent8fc454f9beebdd347403145c991697019a593cff (diff)
downloadopenbmc-98cc5cd6483975b64d80e8323f7f659dd1337d75.tar.xz
Merge tag '0.29' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-kernel')
-rw-r--r--meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch54
-rw-r--r--meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.9.bb (renamed from meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.8.bb)3
-rw-r--r--meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb4
-rw-r--r--meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch104
-rw-r--r--meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch26
-rw-r--r--meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch24
-rw-r--r--meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb (renamed from meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb)22
-rw-r--r--meta-openembedded/meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch132
-rw-r--r--meta-openembedded/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb17
9 files changed, 195 insertions, 191 deletions
diff --git a/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch b/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch
deleted file mode 100644
index c94644438..000000000
--- a/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 0dddb4e1158705345b7f4f71635d42c89e1b0c8f Mon Sep 17 00:00:00 2001
-From: Dave Anderson <anderson@redhat.com>
-Date: Fri, 31 Jan 2020 17:11:46 -0500
-Subject: [PATCH] Fix for an ARM64 gcc-10 compilation error. Without the
- patch, the build of the embedded gdb module fails with an error message that
- indicates "multiple definition of 'tdesc_aarch64'". (anderson@redhat.com)
-
-Upstream-Status: Backport [https://github.com/crash-utility/crash/commit/e770735200c02ac2414c394ea6ec5f7f033efe64]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gdb-7.6.patch | 30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
-
-diff --git a/gdb-7.6.patch b/gdb-7.6.patch
-index f6c311d..f64b55f 100644
---- a/gdb-7.6.patch
-+++ b/gdb-7.6.patch
-@@ -2471,3 +2471,33 @@ diff -up gdb-7.6/opcodes/configure.orig gdb-7.6/opcodes/configure
- #else
- # error "!__i386__ && !__x86_64__"
- #endif
-+--- gdb-7.6/gdb/features/aarch64.c.orig
-++++ gdb-7.6/gdb/features/aarch64.c
-+@@ -5,7 +5,6 @@
-+ #include "osabi.h"
-+ #include "target-descriptions.h"
-+
-+-struct target_desc *tdesc_aarch64;
-+ static void
-+ initialize_tdesc_aarch64 (void)
-+ {
-+--- gdb-7.6/gdb/aarch64-linux-nat.c.orig
-++++ gdb-7.6/gdb/aarch64-linux-nat.c
-+@@ -37,6 +37,7 @@
-+
-+ #include "gregset.h"
-+
-++extern struct target_desc *tdesc_aarch64;
-+ #include "features/aarch64.c"
-+
-+ /* Defines ps_err_e, struct ps_prochandle. */
-+--- gdb-7.6/gdb/aarch64-tdep.c.orig
-++++ gdb-7.6/gdb/aarch64-tdep.c
-+@@ -52,6 +52,7 @@
-+ #include "gdb_assert.h"
-+ #include "vec.h"
-+
-++struct target_desc *tdesc_aarch64;
-+ #include "features/aarch64.c"
-+ #include "features/aarch64-without-fpu.c"
-+
---
-2.28.0
-
diff --git a/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.8.bb b/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.9.bb
index 6e2533635..4394b6fc6 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.8.bb
+++ b/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.9.bb
@@ -25,9 +25,8 @@ SRC_URI = "git://github.com/crash-utility/${BPN}.git \
file://remove-unrecognized-gcc-option-m32-for-mips.patch \
file://0002-crash-fix-build-error-unknown-type-name-gdb_fpregset.patch \
file://0003-crash-detect-the-sysroot-s-glibc-header-file.patch \
- file://0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch \
"
-SRCREV = "24f4801f8c8871a2e3e660fe9fa8fdd86bb29876"
+SRCREV = "a25aa4b649d339dd25c20d5413d81b851a77e0b2"
SRC_URI[gdb.md5sum] = "a9836707337e5f7bf76a009a8904f470"
SRC_URI[gdb.sha256sum] = "8070389a5dcc104eb0be483d582729f98ed4d761ad19cedd3f17b5d2502faa36"
diff --git a/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
index 2b5ebcc27..7c36dfc60 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
+++ b/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
@@ -27,6 +27,10 @@ PACKAGECONFIG_remove_arm = "bpf vm"
# vm tests need libhugetlbfs starting 5.8+ (https://lkml.org/lkml/2020/4/22/1654)
PACKAGECONFIG_remove_qemumips = "bpf vm"
+# riscv does not support libhugetlbfs yet
+PACKAGECONFIG_remove_riscv64 = "vm"
+PACKAGECONFIG_remove_riscv32 = "vm"
+
PACKAGECONFIG[bpf] = ",,elfutils libcap libcap-ng rsync-native,"
PACKAGECONFIG[firmware] = ",,libcap, bash"
PACKAGECONFIG[vm] = ",,libcap libhugetlbfs,libgcc bash"
diff --git a/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch b/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch
deleted file mode 100644
index 49777bcee..000000000
--- a/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 399f2c9a3acd5bd913e50a4dde52dee6527b297e Mon Sep 17 00:00:00 2001
-From: Kairui Song <kasong@redhat.com>
-Date: Wed, 29 Jan 2020 13:37:13 +0800
-Subject: [PATCH] [PATCH] Remove duplicated variable definitions
-
-When building on Fedora 32 (with GCC 10), following error is observed:
-
-/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2010: multiple definition of
- `crash_reserved_mem_nr'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2010: first defined here
-/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2009: multiple definition of
- `crash_reserved_mem'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2009: first defined here
-/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1278: multiple definition of
- `parallel_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1278: first defined here
-/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1265: multiple definition of
- `splitting_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1265: first defined here
-...
-collect2: error: ld returned 1 exit status
-make: *** [Makefile:97: makedumpfile] Error 1
-
-These variables are wrongly defined multiple times. So remove the
-duplicated definitions.
-
-Upstream-Status: Backport [https://github.com/kraj/makedumpfile/commit/399f2c9a3acd5bd913e50a4dde52dee6527b297e]
-Signed-off-by: Kairui Song <kasong@redhat.com>
-Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
----
- makedumpfile.c | 8 ++++----
- makedumpfile.h | 8 ++++----
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/makedumpfile.c b/makedumpfile.c
-index e290fbd..ae7336a 100644
---- a/makedumpfile.c
-+++ b/makedumpfile.c
-@@ -10954,7 +10954,7 @@ check_param_for_reassembling_dumpfile(int argc, char *argv[])
- return FALSE;
-
- if ((info->splitting_info
-- = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
-+ = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
- == NULL) {
- MSG("Can't allocate memory for splitting_info.\n");
- return FALSE;
-@@ -11042,7 +11042,7 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
- return FALSE;
- }
- if ((info->splitting_info
-- = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
-+ = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
- == NULL) {
- MSG("Can't allocate memory for splitting_info.\n");
- return FALSE;
-@@ -11077,13 +11077,13 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
-
- if (info->num_threads) {
- if ((info->parallel_info =
-- malloc(sizeof(parallel_info_t) * info->num_threads))
-+ malloc(sizeof(struct parallel_info) * info->num_threads))
- == NULL) {
- MSG("Can't allocate memory for parallel_info.\n");
- return FALSE;
- }
-
-- memset(info->parallel_info, 0, sizeof(parallel_info_t)
-+ memset(info->parallel_info, 0, sizeof(struct parallel_info)
- * info->num_threads);
- }
-
-diff --git a/makedumpfile.h b/makedumpfile.h
-index 68d9691..7217407 100644
---- a/makedumpfile.h
-+++ b/makedumpfile.h
-@@ -1262,7 +1262,7 @@ struct splitting_info {
- mdf_pfn_t end_pfn;
- off_t offset_eraseinfo;
- unsigned long size_eraseinfo;
--} splitting_info_t;
-+};
-
- struct parallel_info {
- int fd_memory;
-@@ -1275,7 +1275,7 @@ struct parallel_info {
- #ifdef USELZO
- lzo_bytep wrkmem;
- #endif
--} parallel_info_t;
-+};
-
- struct ppc64_vmemmap {
- unsigned long phys;
-@@ -2006,8 +2006,8 @@ struct memory_range {
- };
-
- #define CRASH_RESERVED_MEM_NR 8
--struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
--int crash_reserved_mem_nr;
-+extern struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
-+extern int crash_reserved_mem_nr;
-
- unsigned long read_vmcoreinfo_symbol(char *str_symbol);
- int readmem(int type_addr, unsigned long long addr, void *bufptr, size_t size);
---
-2.28.0
-
diff --git a/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch b/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch
index ff093a72b..270cc3562 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch
+++ b/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch
@@ -17,10 +17,10 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Makefile | 45 +++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 22 deletions(-)
-diff --git a/Makefile b/Makefile
-index 1fdb628..5dce589 100644
---- a/Makefile
-+++ b/Makefile
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
@@ -8,12 +8,6 @@ ifeq ($(strip $CC),)
CC = gcc
endif
@@ -81,12 +81,12 @@ index 1fdb628..5dce589 100644
SRC_BASE = makedumpfile.c makedumpfile.h diskdump_mod.h sadump_mod.h sadump_info.h
SRC_PART = print_info.c dwarf_info.c elf_info.c erase_info.c sadump_info.c cache.c tools.c
OBJ_PART=$(patsubst %.c,%.o,$(SRC_PART))
-@@ -52,17 +53,17 @@ OBJ_ARCH=$(patsubst %.c,%.o,$(SRC_ARCH))
+@@ -52,12 +53,12 @@ OBJ_ARCH=$(patsubst %.c,%.o,$(SRC_ARCH))
LIBS = -ldw -lbz2 -ldl -lelf -lz
ifneq ($(LINKTYPE), dynamic)
--LIBS := -static $(LIBS)
-+LIBS := $(LIBS)
+-LIBS := -static $(LIBS) -llzma
++LIBS := $(LIBS) -llzma
endif
ifeq ($(USELZO), on)
@@ -96,13 +96,16 @@ index 1fdb628..5dce589 100644
endif
ifeq ($(USESNAPPY), on)
- LIBS := -lsnappy $(LIBS)
+@@ -65,7 +66,7 @@ LIBS := -lsnappy $(LIBS)
+ ifneq ($(LINKTYPE), dynamic)
+ LIBS := $(LIBS) -lstdc++
+ endif
-CFLAGS += -DUSESNAPPY
+CFLAGS_COMMON += -DUSESNAPPY
endif
LIBS := -lpthread $(LIBS)
-@@ -87,14 +88,14 @@ LIBS := $(LIBS) $(call try-run,\
+@@ -90,14 +91,14 @@ LIBS := $(LIBS) $(call try-run,\
all: makedumpfile
$(OBJ_PART): $(SRC_PART)
@@ -119,7 +122,7 @@ index 1fdb628..5dce589 100644
echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8
grep -v "^.TH MAKEDUMPFILE 8" $(VPATH)makedumpfile.8 >> temp.8
mv temp.8 makedumpfile.8
-@@ -105,7 +106,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(OBJ_ARCH)
+@@ -108,7 +109,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(
gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz
eppic_makedumpfile.so: extension_eppic.c
@@ -128,6 +131,3 @@ index 1fdb628..5dce589 100644
clean:
rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz
---
-2.21.0
-
diff --git a/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch b/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch
index 1707df3e3..85d883365 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch
+++ b/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch
@@ -28,11 +28,11 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
arch/ppc64.c | 38 ++------------------------------------
1 file changed, 2 insertions(+), 36 deletions(-)
-diff --git a/arch/ppc64.c b/arch/ppc64.c
-index 9d8f252..6f4860f 100644
---- a/arch/ppc64.c
-+++ b/arch/ppc64.c
-@@ -462,48 +462,14 @@ ppc64_vtop_level4(unsigned long vaddr)
+Index: git/arch/ppc64.c
+===================================================================
+--- git.orig/arch/ppc64.c
++++ git/arch/ppc64.c
+@@ -462,44 +462,6 @@ ppc64_vtop_level4(unsigned long vaddr)
return paddr;
}
@@ -40,6 +40,13 @@ index 9d8f252..6f4860f 100644
-set_ppc64_max_physmem_bits(void)
-{
- long array_len = ARRAY_LENGTH(mem_section);
+-
+- /* Check if we can get MAX_PHYSMEM_BITS from vmcoreinfo */
+- if (NUMBER(MAX_PHYSMEM_BITS) != NOT_FOUND_NUMBER) {
+- info->max_physmem_bits = NUMBER(MAX_PHYSMEM_BITS);
+- return TRUE;
+- }
+-
- /*
- * The older ppc64 kernels uses _MAX_PHYSMEM_BITS as 42 and the
- * newer kernels 3.7 onwards uses 46 bits.
@@ -67,10 +74,10 @@ index 9d8f252..6f4860f 100644
-
- return FALSE;
-}
--
+
int
get_machdep_info_ppc64(void)
- {
+@@ -507,10 +469,8 @@ get_machdep_info_ppc64(void)
unsigned long vmlist, vmap_area_list, vmalloc_start;
info->section_size_bits = _SECTION_SIZE_BITS;
@@ -83,6 +90,3 @@ index 9d8f252..6f4860f 100644
info->page_offset = __PAGE_OFFSET;
if (SYMBOL(_stext) == NOT_FOUND_SYMBOL) {
---
-2.21.0
-
diff --git a/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb b/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb
index 165e192cb..475465124 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb
+++ b/meta-openembedded/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb
@@ -5,12 +5,15 @@ DESCRIPTION = "\
images without extra uneeded information (zero pages, userspace programs, \
etc). \
"
-HOMEPAGE = "http://makedumpfile.sourceforge.net"
+HOMEPAGE = "https://github.com/makedumpfile/makedumpfile"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
LICENSE = "GPLv2.0"
-DEPENDS = "bzip2 zlib elfutils"
+SRCBRANCH ?= "master"
+SRCREV = "18e0cdba48feeccea2429b3b0b2691f4314d1062"
+
+DEPENDS = "bzip2 zlib elfutils xz"
RDEPENDS_${PN}-tools = "perl ${PN}"
# arm and aarch64 would compile but has never been tested upstream. mips would not compile.
@@ -21,16 +24,14 @@ PACKAGES =+ "${PN}-tools"
FILES_${PN}-tools = "${bindir}/*.pl"
SRC_URI = "\
- ${SOURCEFORGE_MIRROR}/makedumpfile/${BPN}-${PV}.tar.gz \
+ git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH} \
file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \
file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \
- file://0001-PATCH-Remove-duplicated-variable-definitions.patch \
"
-SRC_URI[md5sum] = "808ef840ca49ca6bfde77c097cf429f5"
-SRC_URI[sha256sum] = "e702fbdf62b4cd829a76e46f3e24eb3fc7501918b85ebdcd8baef4f53d6ee2c8"
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/makedumpfile/files/makedumpfile/"
-UPSTREAM_CHECK_REGEX = "makedumpfile/(?P<pver>\d+(\.\d+)+)/"
+S = "${WORKDIR}/git"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
SECTION = "base"
@@ -40,8 +41,13 @@ SECTION = "base"
EXTRA_OEMAKE = "\
LINKTYPE=static \
TARGET=${TARGET_ARCH} \
+ ${PACKAGECONFIG_CONFARGS} \
"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lzo] = "USELZO=on,USELZO=off,lzo"
+PACKAGECONFIG[snappy] = "USESNAPPY=on,USESNAPPY=off,snappy"
+
do_install () {
mkdir -p ${D}/usr/bin
install -m 755 ${S}/makedumpfile ${D}/usr/bin
diff --git a/meta-openembedded/meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch b/meta-openembedded/meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch
new file mode 100644
index 000000000..220991804
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch
@@ -0,0 +1,132 @@
+From b63f13d2df91ede45288653b21e0d30a6b45f2ac Mon Sep 17 00:00:00 2001
+From: Beniamin Sandu <beniaminsandu@gmail.com>
+Date: Mon, 30 Nov 2020 18:24:48 +0200
+Subject: [PATCH] trace-cmd: make it build with musl
+
+Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
+---
+ include/trace-cmd/trace-cmd.h | 1 +
+ lib/trace-cmd/trace-msg.c | 1 +
+ lib/trace-cmd/trace-plugin.c | 2 ++
+ lib/tracefs/tracefs-events.c | 1 +
+ tracecmd/trace-agent.c | 1 +
+ tracecmd/trace-setup-guest.c | 1 +
+ tracecmd/trace-tsync.c | 15 ++++++++++-----
+ 7 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h
+index f3c95f3..a697905 100644
+--- a/include/trace-cmd/trace-cmd.h
++++ b/include/trace-cmd/trace-cmd.h
+@@ -6,6 +6,7 @@
+ #ifndef _TRACE_CMD_H
+ #define _TRACE_CMD_H
+
++#include <sys/types.h>
+ #include "traceevent/event-parse.h"
+
+ #define TRACECMD_MAGIC { 23, 8, 68 }
+diff --git a/lib/trace-cmd/trace-msg.c b/lib/trace-cmd/trace-msg.c
+index 4a0bfa9..fc1f2c7 100644
+--- a/lib/trace-cmd/trace-msg.c
++++ b/lib/trace-cmd/trace-msg.c
+@@ -21,6 +21,7 @@
+ #include <arpa/inet.h>
+ #include <sys/types.h>
+ #include <linux/types.h>
++#include <byteswap.h>
+
+ #include "trace-write-local.h"
+ #include "trace-cmd-local.h"
+diff --git a/lib/trace-cmd/trace-plugin.c b/lib/trace-cmd/trace-plugin.c
+index 92f9edf..c2ef3dc 100644
+--- a/lib/trace-cmd/trace-plugin.c
++++ b/lib/trace-cmd/trace-plugin.c
+@@ -8,6 +8,8 @@
+ #include <dlfcn.h>
+ #include <sys/stat.h>
+ #include <libgen.h>
++#include <limits.h>
++
+ #include "trace-cmd.h"
+ #include "trace-local.h"
+
+diff --git a/lib/tracefs/tracefs-events.c b/lib/tracefs/tracefs-events.c
+index 8e825f5..a8d8560 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/trace-agent.c b/tracecmd/trace-agent.c
+index b581696..abfefac 100644
+--- a/tracecmd/trace-agent.c
++++ b/tracecmd/trace-agent.c
+@@ -20,6 +20,7 @@
+ #include <unistd.h>
+ #include <linux/vm_sockets.h>
+ #include <pthread.h>
++#include <limits.h>
+
+ #include "trace-local.h"
+ #include "trace-msg.h"
+diff --git a/tracecmd/trace-setup-guest.c b/tracecmd/trace-setup-guest.c
+index 899848c..99595a1 100644
+--- a/tracecmd/trace-setup-guest.c
++++ b/tracecmd/trace-setup-guest.c
+@@ -13,6 +13,7 @@
+ #include <string.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <limits.h>
+
+ #include "trace-local.h"
+ #include "trace-msg.h"
+diff --git a/tracecmd/trace-tsync.c b/tracecmd/trace-tsync.c
+index e639788..b8b5ac3 100644
+--- a/tracecmd/trace-tsync.c
++++ b/tracecmd/trace-tsync.c
+@@ -104,13 +104,15 @@ 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 +245,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);
+--
+2.25.1
+
diff --git a/meta-openembedded/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb b/meta-openembedded/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb
new file mode 100644
index 000000000..d39afff8e
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb
@@ -0,0 +1,17 @@
+SUMMARY = "User-space front-end command-line tool for ftrace"
+
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=873f48a813bded3de6ebc54e6880c4ac"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master \
+ file://0001-trace-cmd-make-it-build-with-musl.patch"
+
+SRCREV = "530b1a0caef39466e16bbd49de5afef89656f03f"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ oe_runmake etcdir=${sysconfdir} DESTDIR=${D} install
+}
+
+FILES_${PN} += "${libdir}/traceevent/plugins"