Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,44 @@
SUMMARY = "Generates traces of I/O traffic on block devices"
DESCRIPTION = "blktrace is a block layer IO tracing mechanism which provides \
detailed information about request queue operations up to user space. There \
are three major components: a kernel component, a utility to record the i/o \
trace information for the kernel to user space, and utilities to analyse and \
view the trace information."
HOMEPAGE = "http://brick.kernel.dk/snaps/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
DEPENDS = "libaio"
SRCREV = "366d30b9cdb20345c5d064af850d686da79b89eb"
PV = "1.3.0+git${SRCPV}"
SRC_URI = "git://git.kernel.dk/blktrace.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
EXTRA_OEMAKE = "\
'CC=${CC}' \
'CFLAGS=${CFLAGS}' \
'LDFLAGS=${LDFLAGS}' \
"
# There are a few parallel issues:
# 1) ../rbtree.o: error adding symbols: Invalid operation
# collect2: error: ld returned 1 exit status
# Makefile:42: recipe for target 'btt' failed
# 2) git/blkiomon.c:216: undefined reference to `rb_insert_color'
# collect2: error: ld returned 1 exit status
# Makefile:27: recipe for target 'blkparse' failed
# 3) ld: rbtree.o: invalid string offset 128 >= 125 for section `.strtab'
# 4) btreplay.o: file not recognized: File truncated
# collect2: error: ld returned 1 exit status
# btreplay/btreplay.c:47:18: fatal error: list.h: No such file or directory
PARALLEL_MAKE = ""
do_install() {
oe_runmake ARCH="${ARCH}" prefix=${prefix} \
mandir=${mandir} DESTDIR=${D} install
}
@@ -0,0 +1,13 @@
require cryptodev.inc
SUMMARY = "A /dev/crypto device driver header file"
do_compile[noexec] = "1"
# Just install cryptodev.h which is the only header file needed to be exported
do_install() {
install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h
}
ALLOW_EMPTY:${PN} = "1"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,16 @@
require cryptodev.inc
SUMMARY = "A /dev/crypto device driver kernel module"
inherit module
# Header file provided by a separate package
DEPENDS += "cryptodev-linux"
SRC_URI += "file://0001-Disable-installing-header-file-provided-by-another-p.patch \
"
EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
RCONFLICTS:${PN} = "ocf-linux"
RREPLACES:${PN} = "ocf-linux"
@@ -0,0 +1,21 @@
require cryptodev.inc
SUMMARY = "A test suite for /dev/crypto device driver"
DEPENDS += "openssl"
SRC_URI += " \
file://0001-tests-Makefile-do-not-use-Werror.patch \
"
EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" PREFIX="${D}"'
do_compile() {
oe_runmake tests
}
do_install() {
oe_runmake install_tests
}
FILES:${PN} = "${bindir}/*"
@@ -0,0 +1,17 @@
HOMEPAGE = "http://cryptodev-linux.org/"
DESCRIPTION = "Cryptodev-linux is a device that allows access to Linux kernel \
cryptographic drivers; thus allowing of userspace applications to take advantage \
of hardware accelerators. Cryptodev-linux is implemented as a standalone \
module that requires no dependencies other than a stock linux kernel. Its \
API is compatible with OpenBSD's cryptodev userspace API (/dev/crypto)."
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux;branch=master;protocol=https \
"
SRCREV = "795f5fda1485d447cdbad342e8304be317d4f7e8"
S = "${WORKDIR}/git"
CLEANBROKEN = "1"
@@ -0,0 +1,25 @@
From 66d85d3f26e21cf7c38b27de0dcc42376f5d853e Mon Sep 17 00:00:00 2001
From: Denys Dmytriyenko <denys@ti.com>
Date: Sun, 6 Apr 2014 19:51:39 -0400
Subject: [PATCH] Disable installing header file provided by another package
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Upstream-Status: Inappropriate [ OE specific ]
---
Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index d83aee6..c8d8ae5 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,6 @@ install: modules_install
modules_install:
$(MAKE) $(KERNEL_MAKE_OPTS) modules_install
- install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h
install_tests: tests
$(MAKE) -C tests install DESTDIR=$(PREFIX)
@@ -0,0 +1,25 @@
From 47438e53e1156db0916c0f4683a24fe4d82152f2 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Fri, 10 Sep 2021 10:44:42 +0200
Subject: [PATCH] tests/Makefile: do not use -Werror
Otherwise, openssl 3 deprecation warnings become errors.
Reported at https://github.com/cryptodev-linux/cryptodev-linux/issues/67
Upstream-Status: Inappropriate [upstream needs to update the code]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
tests/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile b/tests/Makefile
index 2fb7a9a..e94f80e 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,4 +1,4 @@
-CFLAGS += -I.. $(CRYPTODEV_CFLAGS) -Wall -Werror
+CFLAGS += -I.. $(CRYPTODEV_CFLAGS) -Wall
comp_progs := cipher_comp hash_comp hmac_comp
+30
View File
@@ -0,0 +1,30 @@
SUMMARY = "Device Tree Compiler"
HOMEPAGE = "https://devicetree.org/"
DESCRIPTION = "The Device Tree Compiler is a toolchain for working with device tree source and binary files."
SECTION = "bootloader"
LICENSE = "GPL-2.0-only | BSD-2-Clause"
LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://BSD-2-Clause;md5=5d6306d1b08f8df623178dfd81880927 \
file://README.license;md5=a1eb22e37f09df5b5511b8a278992d0e"
SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=main;protocol=https"
SRCREV = "039a99414e778332d8f9c04cbd3072e1dcc62798"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
inherit meson pkgconfig
EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
PACKAGECONFIG ??= "tools"
PACKAGECONFIG[tools] = "-Dtools=true,-Dtools=false,flex-native bison-native"
PACKAGECONFIG[yaml] = "-Dyaml=enabled,-Dyaml=disabled,libyaml"
PACKAGES =+ "${PN}-misc"
FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
RDEPENDS:${PN}-misc += "${@bb.utils.contains('PACKAGECONFIG', 'tools', 'bash diffutils', '', d)}"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,20 @@
#!/bin/sh
# dt-doc-validate wrapper to allow kernel dt-validation to pass
#
# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
# License: MIT (see COPYING.MIT at the root of the repository for terms)
for arg; do
case "$arg" in
--version)
echo "v2021.10"
;;
esac
done
# TBD: left for future consideration
# exec dt-doc-validate.real "$@"
# we always succeed
exit 0
@@ -0,0 +1,20 @@
#!/bin/sh
# dt-mk-schema wrapper to allow kernel dt-validation to pass
#
# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
# License: MIT (see COPYING.MIT at the root of the repository for terms)
for arg; do
case "$arg" in
--version)
echo "v2021.10"
;;
esac
done
# TBD: left for future consideration
# exec dt-mk-schema.real "$@"
# we always succeed
exit 0
@@ -0,0 +1,20 @@
#!/bin/sh
# dt-validate wrapper to allow kernel dt-validation to pass
#
# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
# License: MIT (see COPYING.MIT at the root of the repository for terms)
for arg; do
case "$arg" in
--version)
echo "v2021.10"
;;
esac
done
# TBD: left for future consideration
# exec dt-validate.real "$@"
# we always succeed
exit 0
@@ -0,0 +1,17 @@
SUMMARY = "Wrapper for tooling for devicetree validation using YAML and jsonschema"
HOMEPAGE = "https://yoctoproject.org"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://dt-doc-validate \
file://dt-mk-schema \
file://dt-validate"
do_install() {
install -d ${D}${bindir}/
install -m 755 ${WORKDIR}/dt-doc-validate ${D}${bindir}/
install -m 755 ${WORKDIR}/dt-mk-schema ${D}${bindir}/
install -m 755 ${WORKDIR}/dt-validate ${D}${bindir}/
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,32 @@
SUMMARY = "Tools for managing Yocto Project style branched kernels"
DESCRIPTION = "Powerful set of tools or managing Yocto Linux kernel sources \
and configuration data. You can use these tools to make a single configuration \
change, apply multiple patches, or work with your own kernel sources."
HOMEPAGE = "https://www.yoctoproject.org/"
LICENSE = "GPL-2.0-only & MIT"
LIC_FILES_CHKSUM = "\
file://tools/kgit;beginline=5;endline=9;md5=9c30e971d435e249624278c3e343e501 \
file://Kconfiglib/LICENSE.txt;md5=712177a72a3937909543eda3ad1bfb7c \
"
DEPENDS = "git-native"
SRCREV = "2d01f24bc78256c709728eb3f204491bce13e0e5"
PV = "0.3+git${SRCPV}"
inherit native
SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
do_configure() {
:
}
do_compile() {
:
}
do_install() {
oe_runmake DESTDIR=${D}${bindir} install
}
@@ -0,0 +1,70 @@
From d48ec5e1a5fb7907520dee71b1d94045486a0c29 Mon Sep 17 00:00:00 2001
From: Alexander Kamensky <alexander.kamensky42@gmail.com>
Date: Thu, 12 Nov 2020 12:56:46 -0800
Subject: [PATCH] arm64: kexec: disabled check if kaslr-seed dtb property was
wiped
Kexec when loading arm64 kernel checks if chosen/kaslr-seed dtb property is
wiped. It's a good assertion to verify proper behavior of kernel. However,
if bootloader creates and fills kaslr-seed property and kernel is not
configured with CONFIG_RANDOMIZE_BASE then logic of reading and wiping
kaslr-seed does not run. As a result kaslr-seed property is not zero and when
kexec tries to load secondary kernel it fails with the following message:
setup_2nd_dtb: kaslr-seed is not wiped to 0.
kexec: setup_2nd_dtb failed.
kexec: load failed.
This was observed on Yocto Project on qemuarm64 machine with 5.8 kernel,
qemu 5.1.0. Qemu created kaslr-seed property but kernel was not configured
with CONFIG_RANDOMIZE_BASE.
Although check has some value, there is a use-case where it breaks kexec,
this patch removes it.
Note in described use-case the fact that kaslr-seed is not wiped and user
readable through /sys/firmware/fdt or
/sys/firmware/devicetree/base/chosen/kaslr-seed is not a security problem
as kaslr is disabled anyway.
Signed-off-by: Alexander Kamensky <alexander.kamensky42@gmail.com>
Upstream-Status: Submitted [http://lists.infradead.org/pipermail/kexec/2020-November/021740.html]
---
kexec/arch/arm64/kexec-arm64.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
index ec6df4b..10238d9 100644
--- a/kexec/arch/arm64/kexec-arm64.c
+++ b/kexec/arch/arm64/kexec-arm64.c
@@ -503,7 +503,7 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash)
int len, range_len;
int nodeoffset;
int new_size;
- int i, result, kaslr_seed;
+ int i, result;
result = fdt_check_header(dtb->buf);
@@ -576,18 +576,6 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash)
return result;
}
} else {
- kaslr_seed = fdt64_to_cpu(*prop);
-
- /* kaslr_seed must be wiped clean by primary
- * kernel during boot
- */
- if (kaslr_seed != 0) {
- dbgprintf("%s: kaslr-seed is not wiped to 0.\n",
- __func__);
- result = -EINVAL;
- goto on_error;
- }
-
/*
* Invoke the getrandom system call with
* GRND_NONBLOCK, to make sure we
--
2.25.1
@@ -0,0 +1,35 @@
From 211cae4b6a02a4d9d37bfcd76f3702696e095fc3 Mon Sep 17 00:00:00 2001
From: Quanyang Wang <quanyang.wang@windriver.com>
Date: Tue, 16 Jun 2015 12:59:57 +0800
Subject: [PATCH] powerpc: change the memory size limit
When run "kexec" in powerpc board, the kexec has a limit that
the kernel text and bss size must be less than 24M. But now
some kernel size exceed the limit. So we need to change the limit,
else will get the error log as below:
my_load:669: do
Could not find a free area of memory of 0x12400 bytes...
Could not find a free area of memory of 0x13000 bytes...
locate_hole failed
Upstream-Status: Pending
Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
---
kexec/arch/ppc/kexec-ppc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kexec/arch/ppc/kexec-ppc.h b/kexec/arch/ppc/kexec-ppc.h
index 04e728e..6bae9ec 100644
--- a/kexec/arch/ppc/kexec-ppc.h
+++ b/kexec/arch/ppc/kexec-ppc.h
@@ -44,7 +44,7 @@ void dol_ppc_usage(void);
* During inital setup the kernel does not map the whole memory but a part of
* it. On Book-E that is 64MiB, 601 24MiB or 256MiB (if possible).
*/
-#define KERNEL_ACCESS_TOP (24 * 1024 * 1024)
+#define KERNEL_ACCESS_TOP (36 * 1024 * 1024)
/* boot block version 17 as defined by the linux kernel */
struct bootblock {
@@ -0,0 +1,29 @@
From a04bcf8f683c1a5a7d015920124457ad56fb7cf0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 7 Sep 2015 07:59:45 +0000
Subject: [PATCH] purgatory: Pass -r directly to linker
This helps compiling with clang since -r is not a known option for clang
where as gcc knows how to deal with it and passes it down to linker
unfiltered
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
---
purgatory/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/purgatory/Makefile b/purgatory/Makefile
index 2dd6c47..416e6b9 100644
--- a/purgatory/Makefile
+++ b/purgatory/Makefile
@@ -60,7 +60,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
-I$(shell $(CC) -print-file-name=include)
$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
-Wl,--no-undefined -nostartfiles -nostdlib \
- -nodefaultlibs -e purgatory_start -r \
+ -nodefaultlibs -e purgatory_start -Wl,-r \
-Wl,-Map=$(PURGATORY_MAP)
$(PURGATORY): $(PURGATORY_OBJS)
@@ -0,0 +1,49 @@
From 55e583d20651e829afbbc8dba0f8ec3017cda2d5 Mon Sep 17 00:00:00 2001
From: Haiqing Bai <Haiqing.Bai@windriver.com>
Date: Mon, 9 Jan 2017 15:26:29 +0800
Subject: [PATCH] kexec: ARM: Fix add_buffer_phys_virt() align issue
When "CONFIG_ARM_LPAE" is enabled,3 level page table
is used by MMU, the "SECTION_SIZE" is defined with
(1 << 21), but 'add_buffer_phys_virt()' hardcode this
to (1 << 20).
Upstream-Status: Pending
Suggested-By:fredrik.markstrom@gmail.com
Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
---
kexec/arch/arm/crashdump-arm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
index daa4788..3f72b38 100644
--- a/kexec/arch/arm/crashdump-arm.c
+++ b/kexec/arch/arm/crashdump-arm.c
@@ -240,6 +240,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
void *buf;
int err;
int last_ranges;
+ unsigned short align_bit_shift = 20;
/*
* First fetch all the memory (RAM) ranges that we are going to pass to
@@ -281,6 +282,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
/* for support LPAE enabled kernel*/
elf_info.class = ELFCLASS64;
+ align_bit_shift = 21;
err = crash_create_elf64_headers(info, &elf_info,
usablemem_rgns.ranges,
@@ -302,8 +304,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
* 1MB) so that available memory passed in kernel command line will be
* aligned to 1MB. This is because kernel create_mapping() wants memory
* regions to be aligned to SECTION_SIZE.
+ * The SECTION_SIZE of LPAE kernel is '1UL << 21' defined in pgtable-3level.h
*/
- elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
+ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << align_bit_shift,
crash_kernel_mem.start,
crash_kernel_mem.end, -1, 0);
@@ -0,0 +1,28 @@
From c54488ad5fd657e0f154d76d7456d9080be24836 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 10 Jun 2017 11:18:49 -0700
Subject: [PATCH] Disable PIE during link
We have explcitly disabled PIE during compile so we
just need to match it with linker flags
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
purgatory/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/purgatory/Makefile b/purgatory/Makefile
index 416e6b9..f00edb4 100644
--- a/purgatory/Makefile
+++ b/purgatory/Makefile
@@ -59,7 +59,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
-Iinclude \
-I$(shell $(CC) -print-file-name=include)
$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
- -Wl,--no-undefined -nostartfiles -nostdlib \
+ -Wl,--no-undefined -no-pie -nostartfiles -nostdlib \
-nodefaultlibs -e purgatory_start -Wl,-r \
-Wl,-Map=$(PURGATORY_MAP)
+145
View File
@@ -0,0 +1,145 @@
#! /bin/sh
#
# kdump
#
# Description: The kdump script provides the support:
# 1. Load a kdump kernel image into memory;
# 2. Copy away vmcore when system panic.
#
#default
KEXEC=/usr/sbin/kexec
KEXEC_ARGS="-p"
MAKEDUMPFILE=/usr/bin/makedumpfile
MAKEDUMPFILE_ARGS="-E -d 1"
LOGGER="logger -p info -t kdump"
if [ -f /etc/sysconfig/kdump.conf ]; then
. /etc/sysconfig/kdump.conf
else
echo "no /etc/sysconfig/kdump.conf"
exit 1;
fi
do_check()
{
#check makedumpfile
if [ ! -e ${MAKEDUMPFILE} -o ! -x ${MAKEDUMPFILE} ] ;then
echo "No makedumpfile found."
exit 0
fi
#check kexec
if [ ! -e ${KEXEC} -o ! -x ${KEXEC} ] ;then
echo "No kexec found."
exit 0
fi
#check whether kdump kernel image exists on the system
if [ -z "${KDUMP_KIMAGE}" -o ! -f "${KDUMP_KIMAGE}" ]; then
echo "No kdump kernel image found."
exit 0
fi
if [ "${KDUMP_CMDLINE}"x = "x" ] ; then
echo "KDUMP_CMDLINE is not configured"
exit 0
fi
}
do_save_vmcore()
{
if [ ${KDUMP_VMCORE_PATH}x = x ]; then
KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`"
fi
mkdir -p ${KDUMP_VMCORE_PATH}
echo "Saving a vmcore to ${KDUMP_VMCORE_PATH}."
${MAKEDUMPFILE} ${MAKEDUMPFILE_ARGS} /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`"
# cp --sparse=always /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`"
rc=$?
if [ ${rc} == 0 ]; then
${LOGGER} "Saved a vmcore to ${KDUMP_VMCORE_PATH}."
else
${LOGGER} "Failed to save vmcore!"
fi
return ${rc}
}
do_start()
{
#check file
do_check
#check whether the running kernel supports kdump.
if [ ! -e /sys/kernel/kexec_crash_loaded ]; then
echo "Kdump isn't supported on the running kernel!!!"
${LOGGER} "Kdump isn't supported on the running kernel!!!"
return 1
fi
#check whether kdump kernel image has been loaded
rc=`cat /sys/kernel/kexec_crash_loaded`
if [ ${rc} != 0 ]; then
echo "Kdump is already running.";
${LOGGER} "Kdump is already running."
return 0
fi
#check the running kernel cmdline option,insure "crashkernel=" always set.
grep -q crashkernel= /proc/cmdline
if [ $? != 0 ]; then
echo "Kdump isn't supported on the running kernel,please check boot option!!!"
${LOGGER} "Kdump isn't supported on the running kernel,please check boot option!!!"
return 1
fi
#Load the kdump kernel image
${KEXEC} ${KEXEC_ARGS} "${KDUMP_KIMAGE}" --append="${KDUMP_CMDLINE}"
if [ $? != 0 ]; then
echo "Failed to load kdump kernel!"
${LOGGER} "Failed to load kdump kernel!"
return 1
fi
echo "Kdump started up."
${LOGGER} "Kdump started up."
}
do_stop()
{
${KEXEC} -p -u 2>/dev/null
if [ $? == 0 ]; then
echo "Kdump has been stopped."
${LOGGER} "Kdump has been stopped."
else
echo "Failed to stop kdump!"
${LOGGER} "Failed to stop kdump!"
fi
}
case "$1" in
start)
if [ -s /proc/vmcore ]; then
do_save_vmcore
reboot
else
do_start
fi
;;
restart)
do_stop
do_start
;;
stop)
do_stop
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
@@ -0,0 +1,14 @@
#the kdump kernel version string.
#KDUMP_KVER="`uname -r`"
#this will be passed to the kdump kernel as kdump kernel command line
#KDUMP_CMDLINE="`cat /proc/cmdline`"
#the kernel image for kdump
#KDUMP_KIMAGE="/boot/bzImage-${KDUMP_KVER}"
#Where to save the vmcore
#KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`"
#the arguments to makedumpfile
MAKEDUMPFILE_ARGS="--dump-dmesg -x /boot/vmlinux-`uname -r`"
@@ -0,0 +1,14 @@
[Unit]
Description=Reboot and dump vmcore via kexec
DefaultDependencies=no
Requires=sysinit.target
After=sysinit.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=@LIBEXECDIR@/kdump-helper start
ExecStop=@LIBEXECDIR@/kdump-helper stop
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,86 @@
SUMMARY = "Kexec fast reboot tools"
DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
AUTHOR = "Eric Biederman"
HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
SECTION = "kernel/userland"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
DEPENDS = "zlib xz"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
file://kdump \
file://kdump.conf \
file://kdump.service \
file://0001-powerpc-change-the-memory-size-limit.patch \
file://0002-purgatory-Pass-r-directly-to-linker.patch \
file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
file://0005-Disable-PIE-during-link.patch \
file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \
"
SRC_URI[sha256sum] = "89bdd941542c64fec16311858df304ed3a3908c1a60874d69df5d9bf1611e062"
inherit autotools update-rc.d systemd
export LDFLAGS = "-L${STAGING_LIBDIR}"
EXTRA_OECONF = " --with-zlib=yes"
do_compile:prepend() {
# Remove the prepackaged config.h from the source tree as it overrides
# the same file generated by configure and placed in the build tree
rm -f ${S}/include/config.h
# Remove the '*.d' file to make sure the recompile is OK
for dep in `find ${B} -type f -name '*.d'`; do
dep_no_d="`echo $dep | sed 's#.d$##'`"
# Remove file.d when there is a file.o
if [ -f "$dep_no_d.o" ]; then
rm -f $dep
fi
done
}
do_install:append () {
install -d ${D}${sysconfdir}/sysconfig
install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
fi
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper
install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_system_unitdir}/kdump.service
sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_system_unitdir}/kdump.service
fi
}
PACKAGES =+ "kexec kdump vmcore-dmesg"
ALLOW_EMPTY:${PN} = "1"
RRECOMMENDS:${PN} = "kexec kdump vmcore-dmesg"
FILES:kexec = "${sbindir}/kexec"
FILES:kdump = "${sbindir}/kdump \
${sysconfdir}/sysconfig/kdump.conf \
${sysconfdir}/init.d/kdump \
${libexecdir}/kdump-helper \
${systemd_system_unitdir}/kdump.service \
"
FILES:vmcore-dmesg = "${sbindir}/vmcore-dmesg"
INITSCRIPT_PACKAGES = "kdump"
INITSCRIPT_NAME:kdump = "kdump"
INITSCRIPT_PARAMS:kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
SYSTEMD_PACKAGES = "kdump"
SYSTEMD_SERVICE:kdump = "kdump.service"
SECURITY_PIE_CFLAGS:remove = "-fPIE -pie"
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
INSANE_SKIP:${PN} = "arch"
@@ -0,0 +1,55 @@
SUMMARY = "Wrapper script for the Linux kernel module dependency indexer"
LICENSE = "MIT"
S = "${WORKDIR}"
INHIBIT_DEFAULT_DEPS = "1"
# The kernel and the staging dir for it is machine specific
PACKAGE_ARCH = "${MACHINE_ARCH}"
# We need the following for the sstate code to process the wrapper
SSTATE_SCAN_FILES += "depmodwrapper"
EXTRA_STAGING_FIXMES += "PKGDATA_DIR"
DEPENDS += "kmod-native"
do_populate_sysroot[depends] = ""
do_install() {
install -d ${D}${bindir_crossscripts}/
cat > ${D}${bindir_crossscripts}/depmodwrapper << EOF
#!/bin/sh
# Expected to be called as: depmodwrapper -a KERNEL_VERSION
if [ "\$1" != "-a" -o "\$2" != "-b" ]; then
echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION [KERNEL_PACKAGE_NAME]" >&2
exit 1
fi
kernelpkgname="kernel"
# If no KERNEL_PACKAGE_NAME, assume "kernel".
[ -z "\$5" ] || kernelpkgname="\$5"
kernelabi=""
if [ -r "${PKGDATA_DIR}/\${kernelpkgname}-depmod/\${kernelpkgname}-abiversion" ]; then
kernelabi=\$(cat "${PKGDATA_DIR}/\${kernelpkgname}-depmod/\${kernelpkgname}-abiversion")
fi
if [ ! -e "\$3${nonarch_base_libdir}/depmod.d/exclude.conf" ]; then
mkdir -p "\$3${nonarch_base_libdir}/depmod.d"
echo "exclude .debug" > "\$3${nonarch_base_libdir}/depmod.d/exclude.conf"
fi
if [ ! -r ${PKGDATA_DIR}/\${kernelpkgname}-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then
echo "Unable to read: ${PKGDATA_DIR}/\${kernelpkgname}-depmod/System.map-\$4" >&2
exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" "\$4"
else
exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/\${kernelpkgname}-depmod/System.map-\$4" "\$4"
fi
EOF
chmod +x ${D}${bindir_crossscripts}/depmodwrapper
}
SYSROOT_DIRS += "${bindir_crossscripts}"
PACKAGES = ""
inherit nopackages
@@ -0,0 +1,32 @@
From be6f82c54f694617c646ca1f8b5bcf93694e20ad Mon Sep 17 00:00:00 2001
From: Tudor Florea <tudor.florea@enea.com>
Date: Fri, 6 Sep 2013 21:11:57 +0000
Subject: [PATCH] kmod: avoid parallel-tests
Avoid parallel-tests as it remove
buildtest-TESTS and runtest-TESTS targets required by ptest.
In automake 1.13.4 parallel-tests is assumed by defauls.
In order to have buildtest-TESTS and runtest-TESTS targets
serial-tests is now required
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Inappropriate (disable feature incompatible with ptest)
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ee72283..60980c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,8 +14,8 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PREFIX_DEFAULT([/usr])
AM_MAINTAINER_MODE([enable])
-AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests])
+AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests serial-tests])
AM_SILENT_RULES([yes])
LT_INIT([disable-static pic-only])
AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by kmod])])
@@ -0,0 +1,6 @@
#
# /etc/depmod.d/depmod.conf
#
search updates extramodules built-in
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
touch testsuite/stamp-rootfs
tar xf testmodule.tar
make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL
find testsuite -name *.ko -exec rm -f {} \;
+89
View File
@@ -0,0 +1,89 @@
# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "Tools for managing Linux kernel modules"
DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \
insert, remove, list, check properties, resolve dependencies and aliases."
HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kmod/"
LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
LICENSE:libkmod = "LGPL-2.1-or-later"
SECTION = "base"
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \
"
inherit autotools bash-completion gtk-doc pkgconfig manpages update-alternatives
SRCREV = "5d46434a63ae0160150a0efdde1914873697e273"
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git;branch=master;protocol=https \
file://depmod-search.conf \
file://avoid_parallel_tests.patch \
"
S = "${WORKDIR}/git"
EXTRA_OECONF += "--enable-tools"
PACKAGECONFIG ??= "zlib xz openssl"
PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz"
PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
GTKDOC_DOCDIR = "${S}/libkmod/docs"
PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
RPROVIDES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
RCONFLICTS:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
RREPLACES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
# to force user to remove old module-init-tools and replace them with kmod variants
RCONFLICTS:libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
# autotools set prefix to /usr, however we want them in /bin and /sbin
EXTRA_OECONF += "--bindir=${base_bindir} --sbindir=${base_sbindir}"
do_install:append () {
install -dm755 ${D}${base_bindir}
install -dm755 ${D}${base_sbindir}
# add symlinks to kmod
ln -rs ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod
for tool in insmod rmmod depmod modinfo modprobe; do
ln -rs ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool}
done
# configuration directories
install -dm755 ${D}${nonarch_base_libdir}/depmod.d
install -dm755 ${D}${nonarch_base_libdir}/modprobe.d
install -dm755 ${D}${sysconfdir}/depmod.d
install -dm755 ${D}${sysconfdir}/modprobe.d
# install depmod.d file for search/ dir
install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${nonarch_base_libdir}/depmod.d/search.conf"
# Add .debug to the exclude path for depmod
echo "exclude .debug" > ${D}${nonarch_base_libdir}/depmod.d/exclude.conf
}
ALTERNATIVE_PRIORITY = "70"
ALTERNATIVE:kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod"
ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod"
ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod"
ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe"
ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod"
ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo"
ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod"
ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod"
ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}"
PACKAGES =+ "libkmod"
FILES:libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}"
FILES:${PN} += "${nonarch_base_libdir}/depmod.d ${nonarch_base_libdir}/modprobe.d"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,40 @@
From ed0a31000305d937abe47c44d705b5b52bb36f79 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 22 Dec 2022 18:32:17 -0800
Subject: [PATCH] makefile: Do not preserve ownership in cp command
Fixes
ERROR: libtraceevent-1.7.0-r0 do_package_qa: QA Issue: libtraceevent: /usr/lib/libtraceevent.a is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 965ff47..0e782cb 100644
--- a/Makefile
+++ b/Makefile
@@ -287,7 +287,7 @@ $(BUILD_PREFIX): force
$(Q)$(call build_prefix,$(prefix))
define do_make_pkgconfig_file
- cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \
+ install -m 0644 ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \
sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \
sed -i "s|LIB_VERSION|${EVENT_PARSE_VERSION}|g" ${PKG_CONFIG_FILE}; \
sed -i "s|LIB_DIR|${libdir_relative}|g" ${PKG_CONFIG_FILE}; \
@@ -335,7 +335,7 @@ install: install_libs install_plugins
install_libs: libs install_headers install_pkgconfig
$(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)); \
- cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
+ cp --no-preserve=ownership --recursive $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
$(Q)$(call install_ld_config)
install_pkgconfig: $(PKG_CONFIG_FILE)
--
2.39.0
@@ -0,0 +1,27 @@
# Copyright (C) 2022 Khem Raj <raj.khem@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "API to access the kernel tracefs directory"
HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \
file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd"
SECTION = "libs"
SRCREV = "dd148189b74da3e2f45c7e536319fec97cb71213"
SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=${BPN};protocol=https \
file://0001-makefile-Do-not-preserve-ownership-in-cp-command.patch"
S = "${WORKDIR}/git"
export EXTRA_CFLAGS = "${CFLAGS}"
inherit pkgconfig
do_install() {
oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig
}
PACKAGES += "${PN}-plugins"
FILES:${PN}-plugins += "${libdir}/traceevent/plugins"
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,112 @@
SUMMARY = "Sanitized set of kernel headers for the C library's use"
HOMEPAGE = "https://www.kernel.org/"
DESCRIPTION = "Designed to maintain an Application Programming Interface (API) stable version of the Linux headers"
SECTION = "devel"
LICENSE = "GPL-2.0-only"
#########################################################################
#### PLEASE READ
#########################################################################
#
# You're probably looking here thinking you need to create some new copy
# of linux-libc-headers since you have your own custom kernel. To put
# this simply, you DO NOT.
#
# Why? These headers are used to build the libc. If you customise the
# headers you are customising the libc and the libc becomes machine
# specific. Most people do not add custom libc extensions to the kernel
# and have a machine specific libc.
#
# But you have some kernel headers you need for some driver? That is fine
# but get them from STAGING_KERNEL_BUILDDIR where the kernel installs itself.
# This will make the package using them machine specific but this is much
# better than having a machine specific C library. This does mean your
# recipe needs a
# do_configure[depends] += "virtual/kernel:do_shared_workdir"
# but again, that is fine and makes total sense.
#
# There can also be a case where your kernel extremely old and you want
# an older libc ABI for that old kernel. The headers installed by this
# recipe should still be a standard mainline kernel, not your own custom
# one.
#
# -- RP
LIC_FILES_CHKSUM ?= "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
RECIPE_NO_UPDATE_REASON = "Recipe is updated through a separate process"
python __anonymous () {
major = d.getVar("PV").split('.')[0]
if major == "3":
d.setVar("HEADER_FETCH_VER", "3.0")
elif major == "4":
d.setVar("HEADER_FETCH_VER", "4.x")
elif major == "5":
d.setVar("HEADER_FETCH_VER", "5.x")
elif major == "6":
d.setVar("HEADER_FETCH_VER", "6.x")
else:
d.setVar("HEADER_FETCH_VER", "2.6")
}
MAJ_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[0]}"
MIN_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[1]}"
inherit kernel-arch pkgconfig multilib_header
KORG_ARCHIVE_COMPRESSION ?= "xz"
SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.${KORG_ARCHIVE_COMPRESSION}"
UPSTREAM_CHECK_URI = "https://www.kernel.org/"
S = "${WORKDIR}/linux-${PV}"
EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}""
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install() {
oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}
# Kernel should not be exporting this header
rm -f ${D}${exec_prefix}/include/scsi/scsi.h
# The ..install.cmd conflicts between various configure runs
find ${D}${includedir} -name ..install.cmd | xargs rm -f
}
do_install:append:aarch64 () {
do_install_armmultilib
}
do_install:append:arm () {
do_install_armmultilib
}
do_install:append:armeb () {
do_install_armmultilib
}
do_install_armmultilib () {
if [ ${MAJ_VER} -gt 5 ]; then
ARM_KVM_HEADER=""
else
if [ ${MAJ_VER} -eq 5 ] && [ ${MIN_VER} -ge 8 ]; then
ARM_KVM_HEADER=""
else
ARM_KVM_HEADER="asm/kvm.h"
fi
fi
oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h $ARM_KVM_HEADER asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h
oe_multilib_header asm/posix_types.h asm/ptrace.h asm/setup.h asm/sigcontext.h asm/siginfo.h asm/signal.h asm/stat.h asm/statfs.h asm/swab.h asm/types.h asm/unistd.h
}
BBCLASSEXTEND = "nativesdk"
DEV_PKG_DEPENDENCY = ""
RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS += "unifdef-native bison-native rsync-native"
@@ -0,0 +1,38 @@
From 9ca6c6a510bda90954aa2532711200b89dd1df89 Mon Sep 17 00:00:00 2001
From: Dave Martin <Dave.Martin@arm.com>
Date: Tue, 11 Dec 2018 19:26:45 +0000
Subject: [PATCH 1/3] kbuild: install_headers.sh: Strip _UAPI from
#if-defined() guards
install_headers.sh knows how to strip the _UAPI prefix from #ifdef/
ifndef and #define directives used to guard headers against multiple
or inappropriate inclusion. Currently this does not work for guards
in the "#if defined()" style, which may be needed for non-trivial
cases.
This patch adds similar logic so that the _UAPI prefix is also
stripped from guard directives written using "#if defined()" etc.
This is not completely foolproof, but will work for simple cases of
using #if defined() to guard against inappropriate header inclusion.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Upstream-Status: Submitted [https://www.spinics.net/lists/arm-kernel/msg694800.html]
---
scripts/headers_install.sh | 1 +
1 file changed, 1 insertion(+)
Index: linux-5.4/scripts/headers_install.sh
===================================================================
--- linux-5.4.orig/scripts/headers_install.sh
+++ linux-5.4/scripts/headers_install.sh
@@ -36,6 +36,7 @@
s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g
s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g
s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @
+ :1;s/(#(if|elif)(.*[^A-Za-z0-9_])defined\([[:space:]]*)_UAPI/\1/;t1
' $INFILE > $TMPFILE || exit 1
scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE
@@ -0,0 +1,90 @@
From 2872f5d8bcef84e62b15b37ba4ffeccfb6402dad Mon Sep 17 00:00:00 2001
From: rofl0r <retnyg@gmx.net>
Date: Wed, 22 Jan 2014 00:48:28 +0100
Subject: [PATCH 1/3] libc-compat.h: fix some issues arising from in6.h
namely redefinition of some structs provided by netinet/in.h.
---
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Submitted
include/uapi/linux/libc-compat.h | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
Index: linux-4.15/include/uapi/linux/libc-compat.h
===================================================================
--- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:37:44.724314379 -0500
+++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:38:02.148913820 -0500
@@ -49,13 +49,12 @@
#ifndef _UAPI_LIBC_COMPAT_H
#define _UAPI_LIBC_COMPAT_H
-/* We have included glibc headers... */
-#if defined(__GLIBC__)
+#ifndef __KERNEL__ /* we're used from userspace */
-/* Coordinate with glibc net/if.h header. */
-#if defined(_NET_IF_H) && defined(__USE_MISC)
+/* Coordinate with libc net/if.h header. */
+#if defined(_NET_IF_H)
-/* GLIBC headers included first so don't define anything
+/* LIBC headers included first so don't define anything
* that would already be defined. */
#define __UAPI_DEF_IF_IFCONF 0
@@ -99,15 +98,7 @@
#define __UAPI_DEF_IN_CLASS 0
#define __UAPI_DEF_IN6_ADDR 0
-/* The exception is the in6_addr macros which must be defined
- * if the glibc code didn't define them. This guard matches
- * the guard in glibc/inet/netinet/in.h which defines the
- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
-#if defined(__USE_MISC) || defined (__USE_GNU)
#define __UAPI_DEF_IN6_ADDR_ALT 0
-#else
-#define __UAPI_DEF_IN6_ADDR_ALT 1
-#endif
#define __UAPI_DEF_SOCKADDR_IN6 0
#define __UAPI_DEF_IPV6_MREQ 0
#define __UAPI_DEF_IPPROTO_V6 0
@@ -115,10 +106,10 @@
#define __UAPI_DEF_IN6_PKTINFO 0
#define __UAPI_DEF_IP6_MTUINFO 0
-#else
+#else /* defined(_NETINET_IN_H) */
/* Linux headers included first, and we must define everything
- * we need. The expectation is that glibc will check the
+ * we need. The expectation is that libc will check the
* __UAPI_DEF_* defines and adjust appropriately. */
#define __UAPI_DEF_IN_ADDR 1
#define __UAPI_DEF_IN_IPPROTO 1
@@ -128,7 +119,7 @@
#define __UAPI_DEF_IN_CLASS 1
#define __UAPI_DEF_IN6_ADDR 1
-/* We unconditionally define the in6_addr macros and glibc must
+/* We unconditionally define the in6_addr macros and libc must
* coordinate. */
#define __UAPI_DEF_IN6_ADDR_ALT 1
#define __UAPI_DEF_SOCKADDR_IN6 1
@@ -170,7 +161,7 @@
* or we are being included in the kernel, then define everything
* that we need. Check for previous __UAPI_* definitions to give
* unsupported C libraries a way to opt out of any kernel definition. */
-#else /* !defined(__GLIBC__) */
+#else /* __KERNEL__ */
/* Definitions for if.h */
#ifndef __UAPI_DEF_IF_IFCONF
@@ -262,6 +253,6 @@
#define __UAPI_DEF_XATTR 1
#endif
-#endif /* __GLIBC__ */
+#endif /* __KERNEL__ */
#endif /* _UAPI_LIBC_COMPAT_H */
@@ -0,0 +1,46 @@
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [v2,2/3] uapi glibc compat: fix build if libc defines IFF_ECHO
From: Hauke Mehrtens <hauke@hauke-m.de>
X-Patchwork-Id: 9686293
Message-Id: <20170418210036.26039-3-hauke@hauke-m.de>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, jarod@redhat.com, jogo@openwrt.org,
david.heidelberger@ixit.cz, maillist-linux@barfooze.de,
mikko.rapeli@iki.fi, dwmw2@infradead.org, Hauke Mehrtens <hauke@hauke-m.de>
Date: Tue, 18 Apr 2017 23:00:35 +0200
musl 1.1.15 defines IFF_ECHO and the other net_device_flags options.
When a user application includes linux/if.h and net/if.h the compile
will fail.
Activate __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO only when
it is needed. This should also make this work in case glibc will add
these defines.
Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
Upstream-Status: Submitted [https://patchwork.kernel.org/patch/9686293/]
Signed-off-by: André Draszik <adraszik@tycoint.com>
Acked-by: Stephane Ayotte <sayotte@tycoint.com>
include/uapi/linux/libc-compat.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
index 43a81136ea6e..ce2fa8a4ced6 100644
--- a/include/uapi/linux/libc-compat.h
+++ b/include/uapi/linux/libc-compat.h
@@ -64,9 +64,11 @@
/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
+#ifndef IFF_ECHO
#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
+#endif /* IFF_ECHO */
#else /* _NET_IF_H */
@@ -0,0 +1,29 @@
From 8e69b663d6ddef132041a1186f081fdd74d4a31d Mon Sep 17 00:00:00 2001
From: rofl0r <retnyg@gmx.net>
Date: Mon, 20 Jan 2014 21:31:34 +0100
Subject: [PATCH 3/3] remove inclusion of sysinfo.h in kernel.h
the declaration of struct sysinfo clashes with userspace.
it's not quite clear why that header was included from kernel.h,
as none of its functionality is needed.
---
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Submitted
include/uapi/linux/kernel.h | 2 ++
1 file changed, 2 insertions(+)
Index: linux-5.12.11/include/uapi/linux/kernel.h
===================================================================
--- linux-5.12.11.orig/include/uapi/linux/kernel.h
+++ linux-5.12.11/include/uapi/linux/kernel.h
@@ -2,7 +2,9 @@
#ifndef _UAPI_LINUX_KERNEL_H
#define _UAPI_LINUX_KERNEL_H
+#ifdef __GLIBC__
#include <linux/sysinfo.h>
#include <linux/const.h>
+#endif
#endif /* _UAPI_LINUX_KERNEL_H */
@@ -0,0 +1,17 @@
require linux-libc-headers.inc
SRC_URI:append:libc-musl = "\
file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \
"
SRC_URI += "\
file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \
"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI[sha256sum] = "8fa0588f0c2ceca44cac77a0e39ba48c9f00a6b9dc69761c02a5d3efac8da7f3"
@@ -0,0 +1,605 @@
CVE_STATUS[CVE-2018-6559] = "not-applicable-platform: Issue only affects Ubuntu"
# https://www.linuxkernelcves.com/cves/CVE-2019-3016
# Fixed with 5.6
CVE_STATUS[CVE-2019-3016] = "fixed-version: Fixed in version v5.6"
# https://www.linuxkernelcves.com/cves/CVE-2019-3819
# Fixed with 5.1
CVE_STATUS[CVE-2019-3819] = "fixed-version: Fixed in version v5.1"
# https://www.linuxkernelcves.com/cves/CVE-2019-3887
# Fixed with 5.2
CVE_STATUS[CVE-2019-3887] = "fixed-version: Fixed in version v5.2"
CVE_STATUS[CVE-2020-11935] = "not-applicable-config: Issue only affects aufs, which is not in linux-yocto"
# https://nvd.nist.gov/vuln/detail/CVE-2020-27784
# Introduced in version v4.1 b26394bd567e5ebe57ec4dee7fe6cd14023c96e9
# Patched in kernel since v5.10 e8d5f92b8d30bb4ade76494490c3c065e12411b1
# Backported in version v5.4.73 e9e791f5c39ab30e374a3b1a9c25ca7ff24988f3
CVE_STATUS[CVE-2020-27784] = "cpe-stable-backport: Backported in version v5.4.73"
# 2021
# https://nvd.nist.gov/vuln/detail/CVE-2021-3669
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.15 20401d1058f3f841f35a594ac2fc1293710e55b9
CVE_STATUS[CVE-2021-3669] = "fixed-version: Fixed in version v5.15"
# https://nvd.nist.gov/vuln/detail/CVE-2021-3759
# Introduced in version v4.5 a9bb7e620efdfd29b6d1c238041173e411670996
# Patched in kernel since v5.15 18319498fdd4cdf8c1c2c48cd432863b1f915d6f
# Backported in version v5.4.224 bad83d55134e647a739ebef2082541963f2cbc92
# Backported in version v5.10.154 836686e1a01d7e2fda6a5a18252243ff30a6e196
CVE_STATUS[CVE-2021-3759] = "cpe-stable-backport: Backported in versions v5.4.224 and v6.1.11"
# https://nvd.nist.gov/vuln/detail/CVE-2021-4218
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.8 32927393dc1ccd60fb2bdc05b9e8e88753761469
CVE_STATUS[CVE-2021-4218] = "fixed-version: Fixed in version v5.8"
# 2022
# https://nvd.nist.gov/vuln/detail/CVE-2022-0480
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.15 0f12156dff2862ac54235fc72703f18770769042
CVE_STATUS[CVE-2022-0480] = "fixed-version: Fixed in version v5.15"
# https://nvd.nist.gov/vuln/detail/CVE-2022-1184
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.19 46c116b920ebec58031f0a78c5ea9599b0d2a371
# Backported in version v5.4.198 17034d45ec443fb0e3c0e7297f9cd10f70446064
# Backported in version v5.10.121 da2f05919238c7bdc6e28c79539f55c8355408bb
# Backported in version v5.15.46 ca17db384762be0ec38373a12460081d22a8b42d
CVE_STATUS[CVE-2022-1184] = "cpe-stable-backport: Backported in versions v5.4.198, v5.10.121 and v5.15.46"
# https://nvd.nist.gov/vuln/detail/CVE-2022-1462
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.19 a501ab75e7624d133a5a3c7ec010687c8b961d23
# Backported in version v5.4.208 f7785092cb7f022f59ebdaa181651f7c877df132
# Backported in version v5.10.134 08afa87f58d83dfe040572ed591b47e8cb9e225c
# Backported in version v5.15.58 b2d1e4cd558cffec6bfe318f5d74e6cffc374d29
CVE_STATUS[CVE-2022-1462] = "cpe-stable-backport: Backported in versions v5.4.208, v5.10.134 and v5.15.58"
# https://nvd.nist.gov/vuln/detail/CVE-2022-2196
# Introduced in version v5.8 5c911beff20aa8639e7a1f28988736c13e03ed54
# Breaking commit backported in v5.4.47 64b8f33b2e1e687d465b5cb382e7bec495f1e026
# Patched in kernel since v6.2 2e7eab81425ad6c875f2ed47c0ce01e78afc38a5
# Backported in version v5.4.233 f93a1a5bdcdd122aae0a3eab7a52c15b71fb725b
# Backported in version v5.10.170 1b0cafaae8884726c597caded50af185ffc13349
# Backported in version v5.15.96 6b539a7dbb49250f92515c2ba60aea239efc9e35
# Backported in version v6.1.14 63fada296062e91ad9f871970d4e7f19e21a6a15
CVE_STATUS[CVE-2022-2196] = "cpe-stable-backport: Backported in versions v5.4.1233, v5.10.170, v5.15.46 and v6.1.14"
# https://nvd.nist.gov/vuln/detail/CVE-2022-2308
# Introduced in version v5.15 c8a6153b6c59d95c0e091f053f6f180952ade91e
# Patched in kernel since v6.0 46f8a29272e51b6df7393d58fc5cb8967397ef2b
# Backported in version v5.15.72 dc248ddf41eab4566e95b1ee2433c8a5134ad94a
# Backported in version v5.19.14 38d854c4a11c3bbf6a96ea46f14b282670c784ac
CVE_STATUS[CVE-2022-2308] = "cpe-stable-backport: Backported in versions v5.15.72 and v5.19.14"
# https://nvd.nist.gov/vuln/detail/CVE-2022-2327
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.10.125 df3f3bb5059d20ef094d6b2f0256c4bf4127a859
CVE_STATUS[CVE-2022-2327] = "fixed-version: Fixed in version v5.10.125"
# https://nvd.nist.gov/vuln/detail/CVE-2022-2663
# Introduced in version v2.6.20 869f37d8e48f3911eb70f38a994feaa8f8380008
# Patched in kernel since v6.0 0efe125cfb99e6773a7434f3463f7c2fa28f3a43
# Backported in version v5.4.213 36f7b71f8ad8e4d224b45f7d6ecfeff63b091547
# Backported in version v5.10.143 e12ce30fe593dd438c5b392290ad7316befc11ca
# Backported in version v5.15.68 451c9ce1e2fc9b9e40303bef8e5a0dca1a923cc4
# Backported in version v5.19.9 6cf0609154b2ce8d3ae160e7506ab316400a8d3d
CVE_STATUS[CVE-2022-2663] = "cpe-stable-backport: Backported in versions v5.4.213, v5.10.143, v5.15.68 and v5.19.9"
# https://nvd.nist.gov/vuln/detail/CVE-2022-2785
# Introduced in version v5.18 b1d18a7574d0df5eb4117c14742baf8bc2b9bb74
# Patched in kernel since v6.0 86f44fcec22ce2979507742bc53db8400e454f46
# Backported in version v5.19.4 b429d0b9a7a0f3dddb1f782b72629e6353f292fd
CVE_STATUS[CVE-2022-2785] = "cpe-stable-backport: Backported in version v5.19.4"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3176
# Introduced in version v5.1 221c5eb2338232f7340386de1c43decc32682e58
# Patched in kernel since v5.17 791f3465c4afde02d7f16cf7424ca87070b69396
# Backported in version v5.15.65 e9d7ca0c4640cbebe6840ee3bac66a25a9bacaf5
CVE_STATUS[CVE-2022-3176] = "cpe-stable-backport: Backported in version v5.15.65"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3424
# Introduced in version v2.6.33 55484c45dbeca2eec7642932ec3f60f8a2d4bdbf
# Patched in kernel since v6.2 643a16a0eb1d6ac23744bb6e90a00fc21148a9dc
# Backported in version v5.4.229 0078dd8758561540ed30b2c5daa1cb647e758977
# Backported in version v5.10.163 0f67ed565f20ea2fdd98e3b0b0169d9e580bb83c
# Backported in version v5.15.86 d5c8f9003a289ee2a9b564d109e021fc4d05d106
# Backported in version v6.1.2 4e947fc71bec7c7da791f8562d5da233b235ba5e
CVE_STATUS[CVE-2022-3424] = "cpe-stable-backport: Backported in versions v5.4.229, v5.10.163, v5.15.86 and v 6.1.2"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3435
# Introduced in version v5.18 6bf92d70e690b7ff12b24f4bfff5e5434d019b82
# Breaking commit backported in v5.4.189 f5064531c23ad646da7be8b938292b00a7e61438
# Breaking commit backported in v5.10.111 63ea57478aaa3e06a597081a0f537318fc04e49f
# Breaking commit backported in v5.15.34 907c97986d6fa77318d17659dd76c94b65dd27c5
# Patched in kernel since v6.1 61b91eb33a69c3be11b259c5ea484505cd79f883
# Backported in version v5.4.226 cc3cd130ecfb8b0ae52e235e487bae3f16a24a32
# Backported in version v5.10.158 0b5394229ebae09afc07aabccb5ffd705ffd250e
# Backported in version v5.15.82 25174d91e4a32a24204060d283bd5fa6d0ddf133
CVE_STATUS[CVE-2022-3435] = "cpe-stable-backport: Backported in versions v5.4.226, v5.10.158 and v5.15.82"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3523
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v6.1 16ce101db85db694a91380aa4c89b25530871d33
CVE_STATUS[CVE-2022-3523] = "fixed-version: Fixed in version v6.1"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3526
# Introduced in version v5.13 427f0c8c194b22edcafef1b0a42995ddc5c2227d
# Patched in kernel since v5.18 e16b859872b87650bb55b12cca5a5fcdc49c1442
# Backported in version v5.15.35 8f79ce226ad2e9b2ec598de2b9560863b7549d1b
CVE_STATUS[CVE-2022-3526] = "cpe-stable-backport: Backported in version v5.15.35"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3534
# Introduced in version v5.10 919d2b1dbb074d438027135ba644411931179a59
# Patched in kernel since v6.2 93c660ca40b5d2f7c1b1626e955a8e9fa30e0749
# Backported in version v5.10.163 c61650b869e0b6fb0c0a28ed42d928eea969afc8
# Backported in version v5.15.86 a733bf10198eb5bb927890940de8ab457491ed3b
# Backported in version v6.1.2 fbe08093fb2334549859829ef81d42570812597d
CVE_STATUS[CVE-2022-3534] = "cpe-stable-backport: Backported in versions v5.10.163, v5.15.86 and v6.1.2"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3564
# Introduced in version v3.6 4b51dae96731c9d82f5634e75ac7ffd3b9c1b060
# Patched in kernel since v6.1 3aff8aaca4e36dc8b17eaa011684881a80238966
# Backported in version v5.10.154 cb1c012099ef5904cd468bdb8d6fcdfdd9bcb569
# Backported in version v5.15.78 8278a87bb1eeea94350d675ef961ee5a03341fde
CVE_STATUS[CVE-2022-3564] = "cpe-stable-backport: Backported in versions v5.10.154 and v5.15.78"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3566
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v6.1 f49cd2f4d6170d27a2c61f1fecb03d8a70c91f57
CVE_STATUS[CVE-2022-3566] = "fixed-version: Fixed in version v6.1"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3567
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v6.1 364f997b5cfe1db0d63a390fe7c801fa2b3115f6
CVE_STATUS[CVE-2022-3567] = "fixed-version: Fixed in version v6.1"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3619
# Introduced in version v5.12 4d7ea8ee90e42fc75995f6fb24032d3233314528
# Patched in kernel since v6.1 7c9524d929648935bac2bbb4c20437df8f9c3f42
# Backported in version v5.15.78 aa16cac06b752e5f609c106735bd7838f444784c
CVE_STATUS[CVE-2022-3619] = "cpe-stable-backport: Backported in version v5.15.78"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3621
# Introduced in version v2.60.30 05fe58fdc10df9ebea04c0eaed57adc47af5c184
# Patched in kernel since v6.1 21a87d88c2253350e115029f14fe2a10a7e6c856
# Backported in version v5.4.218 792211333ad77fcea50a44bb7f695783159fc63c
# Backported in version v5.10.148 3f840480e31495ce674db4a69912882b5ac083f2
# Backported in version v5.15.74 1e512c65b4adcdbdf7aead052f2162b079cc7f55
# Backported in version v5.19.16 caf2c6b580433b3d3e413a3d54b8414a94725dcd
CVE_STATUS[CVE-2022-3621] = "cpe-stable-backport: Backported in versions v5.4.218, v5.10.148, v5.15.74 and v5.19.16"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3623
# Introduced in version v5.1 5480280d3f2d11d47f9be59d49b20a8d7d1b33e8
# Patched in kernel since v6.1 fac35ba763ed07ba93154c95ffc0c4a55023707f
# Backported in version v5.4.228 176ba4c19d1bb153aa6baaa61d586e785b7d736c
# Backported in version v5.10.159 fccee93eb20d72f5390432ecea7f8c16af88c850
# Backported in version v5.15.78 3a44ae4afaa5318baed3c6e2959f24454e0ae4ff
# Backported in version v5.19.17 86a913d55c89dd13ba070a87f61a493563e94b54
CVE_STATUS[CVE-2022-3623] = "cpe-stable-backport: Backported in versions v5.4.228, v5.10.159, v5.15.78 and v 5.19.17"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3624
# Introduced in version v6.0 d5410ac7b0baeca91cf73ff5241d35998ecc8c9e
# Patched in kernel since v6.0 4f5d33f4f798b1c6d92b613f0087f639d9836971
CVE_STATUS[CVE-2022-3624] = "fixed-version: Fixed in version v6.0"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3625
# Introduced in version v4.19 45f05def5c44c806f094709f1c9b03dcecdd54f0
# Patched in kernel since v6.0 6b4db2e528f650c7fb712961aac36455468d5902
# Backported in version v5.4.211 1ad4ba9341f15412cf86dc6addbb73871a10212f
# Backported in version v5.10.138 0e28678a770df7989108327cfe86f835d8760c33
# Backported in version v5.15.63 c4d09fd1e18bac11c2f7cf736048112568687301
# Backported in version v5.19.4 26bef5616255066268c0e40e1da10cc9b78b82e9
CVE_STATUS[CVE-2022-3625] = "cpe-stable-backport: Backported in versions v5.4.211, v5.10.138, v5.15.63 and v5.19.4"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3629
# Introduced in version v3.9 d021c344051af91f42c5ba9fdedc176740cbd238
# Patched in kernel since v6.0 7e97cfed9929eaabc41829c395eb0d1350fccb9d
# Backported in version v5.4.211 f82f1e2042b397277cd39f16349950f5abade58d
# Backported in version v5.10.138 38ddccbda5e8b762c8ee06670bb1f64f1be5ee50
# Backported in version v5.15.63 e4c0428f8a6fc8c218d7fd72bddd163f05b29795
# Backported in version v5.19.4 8ff5db3c1b3d6797eda5cd326dcd31b9cd1c5f72
CVE_STATUS[CVE-2022-3629] = "cpe-stable-backport: Backported in versions v5.4.211, v5.10.138, v5.15.63 and v5.19.4"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3630
# Introduced in version v5.19 85e4ea1049c70fb99de5c6057e835d151fb647da
# Patched in kernel since v6.0 fb24771faf72a2fd62b3b6287af3c610c3ec9cf1
# Backported in version v5.19.4 7a369dc87b66acc85d0cffcf39984344a203e20b
CVE_STATUS[CVE-2022-3630] = "cpe-stable-backport: Backported in version v5.19.4"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3633
# Introduced in version v5.4 9d71dd0c70099914fcd063135da3c580865e924c
# Patched in kernel since v6.0 8c21c54a53ab21842f5050fa090f26b03c0313d6
# Backported in version v5.4.211 04e41b6bacf474f5431491f92e981096e8cc8e93
# Backported in version v5.10.138 a220ff343396bae8d3b6abee72ab51f1f34b3027
# Backported in version v5.15.63 98dc8fb08299ab49e0b9c08daedadd2f4de1a2f2
# Backported in version v5.19.4 a0278dbeaaf7ca60346c62a9add65ae7d62564de
CVE_STATUS[CVE-2022-3633] = "cpe-stable-backport: Backported in versions v5.4.211, v5.10.138, v5.15.63 and v5.19.4"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3635
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v6.0 3f4093e2bf4673f218c0bf17d8362337c400e77b
# Backported in version v5.4.211 9a6cbaa50f263b12df18a051b37f3f42f9fb5253
# Backported in version v5.10.138 a0ae122e9aeccbff75014c4d36d11a9d32e7fb5e
# Backported in version v5.15.63 a5d7ce086fe942c5ab422fd2c034968a152be4c4
# Backported in version v5.19.4 af412b252550f9ac36d9add7b013c2a2c3463835
CVE_STATUS[CVE-2022-3635] = "cpe-stable-backport: Backported in versions v5.4.211, v5.10.138, v5.15.63 and v5.19.4"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3636
# Introduced in version v5.19 33fc42de33278b2b3ec6f3390512987bc29a62b7
# Patched in kernel since v5.19 17a5f6a78dc7b8db385de346092d7d9f9dc24df6
CVE_STATUS[CVE-2022-3636] = "cpe-stable-backport: Backported in version v5.19"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3640
# Introduced in version v5.19 d0be8347c623e0ac4202a1d4e0373882821f56b0
# Breaking commit backported in v5.4.209 098e07ef0059296e710a801cdbd74b59016e6624
# Breaking commit backported in v5.10.135 de5d4654ac6c22b1be756fdf7db18471e7df01ea
# Breaking commit backported in v5.15.59 f32d5615a78a1256c4f557ccc6543866e75d03f4
# Patched in kernel since v6.1 0d0e2d032811280b927650ff3c15fe5020e82533
# Backported in version v5.4.224 c1f594dddd9ffd747c39f49cc5b67a9b7677d2ab
# Backported in version v5.10.154 d9ec6e2fbd4a565b2345d4852f586b7ae3ab41fd
# Backported in version v5.15.78 a3a7b2ac64de232edb67279e804932cb42f0b52a
CVE_STATUS[CVE-2022-3640] = "cpe-stable-backport: Backported in versions v5.4.224, v5.10.154 and v5.15.78"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3646
# Introduced in version v2.6.30 9ff05123e3bfbb1d2b68ba1d9bf1f7d1dffc1453
# Patched in kernel since v6.1 d0d51a97063db4704a5ef6bc978dddab1636a306
# Backported in version v5.4.218 b7e409d11db9ce9f8bc05fcdfa24d143f60cd393
# Backported in version v5.10.148 aad4c997857f1d4b6c1e296c07e4729d3f8058ee
# Backported in version v5.15.74 44b1ee304bac03f1b879be5afe920e3a844e40fc
# Backported in version v5.19.16 4755fcd844240857b525f6e8d8b65ee140fe9570
CVE_STATUS[CVE-2022-3646] = "cpe-stable-backport: Backported in versions v5.4.218, v5.10.148, v5.15.74 and v5.19.16"
# https://nvd.nist.gov/vuln/detail/CVE-2022-3649
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v6.1 d325dc6eb763c10f591c239550b8c7e5466a5d09
# Backported in version v5.4.220 d1c2d820a2cd73867b7d352e89e92fb3ac29e926
# Backported in version v5.10.148 21ee3cffed8fbabb669435facfd576ba18ac8652
# Backported in version v5.15.74 cb602c2b654e26763226d8bd27a702f79cff4006
# Backported in version v5.19.16 394b2571e9a74ddaed55aa9c4d0f5772f81c21e4
CVE_STATUS[CVE-2022-3649] = "cpe-stable-backport: Backported in versions v5.4.220, v5.10.148, v5.15.74 and v5.19.16"
# https://nvd.nist.gov/vuln/detail/CVE-2022-4382
# Introduced in version v5.3 e5d82a7360d124ae1a38c2a5eac92ba49b125191
# Patched in kernel since v6.2-rc5 d18dcfe9860e842f394e37ba01ca9440ab2178f4
# Backported in version v5.4.230 9a39f4626b361ee7aa10fd990401c37ec3b466ae
# Backported in version v5.10.165 856e4b5e53f21edbd15d275dde62228dd94fb2b4
# Backported in version v5.15.90 a2e075f40122d8daf587db126c562a67abd69cf9
# Backported in version v6.1.8 616fd34d017000ecf9097368b13d8a266f4920b3
CVE_STATUS[CVE-2022-4382] = "cpe-stable-backport: Backported in versions v5.4.230, v5.10.165, v5.15.90 and v6.1.8"
# https://nvd.nist.gov/vuln/detail/CVE-2022-26365
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.19 2f446ffe9d737e9a844b97887919c4fda18246e7
# Backported in version v5.4.204 42112e8f94617d83943f8f3b8de2b66041905506
# Backported in version v5.10.129 cfea428030be836d79a7690968232bb7fa4410f1
# Backported in version v5.15.53 7ed65a4ad8fa9f40bc3979b32c54243d6a684ec9
CVE_STATUS[CVE-2022-26365] = "cpe-stable-backport: Backported in versions v5.4.204, v5.10.129 and v5.15.53"
# https://nvd.nist.gov/vuln/detail/CVE-2022-33740
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.19 307c8de2b02344805ebead3440d8feed28f2f010
# Backported in version v5.4.204 04945b5beb73019145ac17a2565526afa7293c14
# Backported in version v5.10.129 728d68bfe68d92eae1407b8a9edc7817d6227404
# Backported in version v5.15.53 5dd0993c36832d33820238fc8dc741ba801b7961
CVE_STATUS[CVE-2022-33740] = "cpe-stable-backport: Backported in versions v5.4.204, v5.10.129 and v5.15.53"
# https://nvd.nist.gov/vuln/detail/CVE-2022-33741
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.19 4491001c2e0fa69efbb748c96ec96b100a5cdb7e
# Backported in version v5.4.204 ede57be88a5fff42cd00e6bcd071503194d398dd
# Backported in version v5.10.129 4923217af5742a796821272ee03f8d6de15c0cca
# Backported in version v5.15.53 ed3cfc690675d852c3416aedb271e0e7d179bf49
CVE_STATUS[CVE-2022-33741] = "cpe-stable-backport: Backported in versions v5.4.204, v5.10.129 and v5.15.53"
# https://nvd.nist.gov/vuln/detail/CVE-2022-33742
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v5.19 2400617da7eebf9167d71a46122828bc479d64c9
# Backported in version v5.4.204 60ac50daad36ef3fe9d70d89cfe3b95d381db997
# Backported in version v5.10.129 cbbd2d2531539212ff090aecbea9877c996e6ce6
# Backported in version v5.15.53 6d0a9127279a4533815202e30ad1b3a39f560ba3
CVE_STATUS[CVE-2022-33742] = "cpe-stable-backport: Backported in versions v5.4.204, v5.10.129 and v5.15.53"
# https://nvd.nist.gov/vuln/detail/CVE-2022-42895
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v6.1 b1a2cd50c0357f243b7435a732b4e62ba3157a2e
# Backported in version v5.4.224 6949400ec9feca7f88c0f6ca5cb5fdbcef419c89
# Backported in version v5.10.154 26ca2ac091b49281d73df86111d16e5a76e43bd7
# Backported in version v5.15.78 3e4697ffdfbb38a2755012c4e571546c89ab6422
CVE_STATUS[CVE-2022-42895] = "cpe-stable-backport: Backported in versions v5.4.224, v5.10.154 and v5.15.78"
# https://nvd.nist.gov/vuln/detail/CVE-2022-42896
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v6.1 711f8c3fb3db61897080468586b970c87c61d9e4
# Backported in version v5.4.226 0d87bb6070361e5d1d9cb391ba7ee73413bc109b
# Backported in version v5.10.154 6b6f94fb9a74dd2891f11de4e638c6202bc89476
# Backported in version v5.15.78 81035e1201e26d57d9733ac59140a3e29befbc5a
CVE_STATUS[CVE-2022-42896] = "cpe-stable-backport: Backported in versions v5.4.226, v5.10.154 and v5.15.78"
# https://nvd.nist.gov/vuln/detail/CVE-2022-38457
# https://nvd.nist.gov/vuln/detail/CVE-2022-40133
# Both CVE-2022-38457 & CVE-2022-40133 are fixed by the same commit:
# Introduced in version v4.20 e14c02e6b6990e9f6ee18a214a22ac26bae1b25e
# Patched in kernel since v6.2 a309c7194e8a2f8bd4539b9449917913f6c2cd50
# Backported in version v6.1.7 7ac9578e45b20e3f3c0c8eb71f5417a499a7226a
# See:
# * https://www.linuxkernelcves.com/cves/CVE-2022-38457
# * https://www.linuxkernelcves.com/cves/CVE-2022-40133
# * https://lore.kernel.org/all/CAODzB9q3OBD0k6W2bcWrSZo2jC3EvV0PrLyWmO07rxR4nQgkJA@mail.gmail.com/T/
CVE_STATUS[CVE-2022-38457] = "cpe-stable-backport: Backported in version v6.1.7"
CVE_STATUS[CVE-2022-40133] = "cpe-stable-backport: Backported in version v6.1.7"
# Backported to 6.1.33
CVE_STATUS[CVE-2022-48425] = "cpe-stable-backport: Backported in version v6.1.33"
# 2023
# https://nvd.nist.gov/vuln/detail/CVE-2023-0179
# Patched in kernel since v6.2 696e1a48b1a1b01edad542a1ef293665864a4dd0
# Backported in version v5.10.164 550efeff989b041f3746118c0ddd863c39ddc1aa
# Backported in version v5.15.89 a8acfe2c6fb99f9375a9325807a179cd8c32e6e3
# Backported in version v6.1.7 76ef74d4a379faa451003621a84e3498044e7aa3
CVE_STATUS[CVE-2023-0179] = "cpe-stable-backport: Backported in versions v5.10.164, v5.15.89 and v6.1.7"
# https://nvd.nist.gov/vuln/detail/CVE-2023-0266
# Introduced in version v2.6.12 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
# Patched in kernel since v6.2 56b88b50565cd8b946a2d00b0c83927b7ebb055e
# Backported in version v5.15.88 26350c21bc5e97a805af878e092eb8125843fe2c
# Backported in version v6.1.6 d6ad4bd1d896ae1daffd7628cd50f124280fb8b1
CVE_STATUS[CVE-2023-0266] = "cpe-stable-backport: Backported in versions v5.15.88 and v6.1.6"
# https://nvd.nist.gov/vuln/detail/CVE-2023-0394
# Introduced in version 2.6.12 357b40a18b04c699da1d45608436e9b76b50e251
# Patched in kernel since v6.2 cb3e9864cdbe35ff6378966660edbcbac955fe17
# Backported in version v5.4.229 3998dba0f78a59922b0ef333ccfeb58d9410cd3d
# Backported in version v5.10.164 6c9e2c11c33c35563d34d12b343d43b5c12200b5
# Backported in version v5.15.89 456e3794e08a0b59b259da666e31d0884b376bcf
# Backported in version v6.1.7 0afa5f0736584411771299074bbeca8c1f9706d4
CVE_STATUS[CVE-2023-0394] = "cpe-stable-backport: Backported in versions v5.4.229, v5.10.164, v5.15.89 and v6.1.7"
# https://nvd.nist.gov/vuln/detail/CVE-2023-0386
# Introduced in 5.11 459c7c565ac36ba09ffbf24231147f408fde4203
# Patched in kernel v6.2 4f11ada10d0ad3fd53e2bd67806351de63a4f9c3
# Backported in version 5.15.91 e91308e63710574c4b6a0cadda3e042a3699666e
# Backported in version 6.1.9 42fea1c35254c49cce07c600d026cbc00c6d3c81
CVE_STATUS[CVE-2023-0386] = "cpe-stable-backport: Backported in versions v5.15.91 and v6.1.9"
# https://nvd.nist.gov/vuln/detail/CVE-2023-0461
# Introduced in version v4.13 734942cc4ea6478eed125af258da1bdbb4afe578
# Patched in kernel since v6.2 2c02d41d71f90a5168391b6a5f2954112ba2307c
# Backported in version v5.4.229 c6d29a5ffdbc362314853462a0e24e63330a654d
# Backported in version v5.10.163 f8ed0a93b5d576bbaf01639ad816473bdfd1dcb0
# Backported in version v5.15.88 dadd0dcaa67d27f550131de95c8e182643d2c9d6
# Backported in version v6.1.5 7d242f4a0c8319821548c7176c09a6e0e71f223c
CVE_STATUS[CVE-2023-0461] = "cpe-stable-backport: Backported in versions v5.4.229, v5.10.163, v5.15.88 and v6.1.5"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1073
# Introduced in v3.16 1b15d2e5b8077670b1e6a33250a0d9577efff4a5
# Patched in kernel v6.2 b12fece4c64857e5fab4290bf01b2e0317a88456
# Backported in version 5.10.166 5dc3469a1170dd1344d262a332b26994214eeb58
# Backported in version 5.15.91 2b49568254365c9c247beb0eabbaa15d0e279d64
# Backported in version 6.1.9 cdcdc0531a51659527fea4b4d064af343452062d
CVE_STATUS[CVE-2023-1073] = "cpe-stable-backport: Backported in versions v5.10.166, v5.15.91 and v6.1.9"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1074
# Patched in kernel v6.2 458e279f861d3f61796894cd158b780765a1569f
# Backported in version 5.15.91 3391bd42351be0beb14f438c7556912b9f96cb32
# Backported in version 6.1.9 9f08bb650078dca24a13fea1c375358ed6292df3
CVE_STATUS[CVE-2023-1074] = "cpe-stable-backport: Backported in versions v5.15.91 andv6.1.9"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1075
# Introduced in v4.20 a42055e8d2c30d4decfc13ce943d09c7b9dad221
# Patched in kernel v6.2 ffe2a22562444720b05bdfeb999c03e810d84cbb
# Backported in version 6.1.11 37c0cdf7e4919e5f76381ac60817b67bcbdacb50
# 5.15 still has issue, include/net/tls.h:is_tx_ready() would need patch
CVE_STATUS[CVE-2023-1075] = "cpe-stable-backport: Backported in version v6.1.11"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1076
# Patched in kernel v6.3 a096ccca6e503a5c575717ff8a36ace27510ab0a
# Backported in version v5.4.235 d92d87000eda9884d49f1acec1c1fccd63cd9b11
# Backported in version v5.10.173 9a31af61f397500ccae49d56d809b2217d1e2178
# Backported in version v5.15.99 67f9f02928a34aad0a2c11dab5eea269f5ecf427
# Backported in version v6.1.16 b4ada752eaf1341f47bfa3d8ada377eca75a8d44
# Backported in version v6.2.3 4aa4b4b3b3e9551c4de2bf2987247c28805fb8f6
CVE_STATUS[CVE-2023-1076] = "cpe-stable-backport: Backported in versions v5.4.235, v5.10.173, v5.15.99, v6.1.16 and v6.2.3"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1077
# Patched in kernel 6.3rc1 7c4a5b89a0b5a57a64b601775b296abf77a9fe97
# Backported in version 5.15.99 2c36c390a74981d03f04f01fe7ee9c3ac3ea11f7
# Backported in version 6.1.16 6b4fcc4e8a3016e85766c161daf0732fca16c3a3
CVE_STATUS[CVE-2023-1077] = "cpe-stable-backport: Backported in versions v5.15.99 and v6.1.16"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1078
# Patched in kernel 6.2 f753a68980cf4b59a80fe677619da2b1804f526d
# Backported in version 5.15.94 528e3f3a4b53df36dafd10cdf6b8c0fe2aa1c4ba
# Backported in version 6.1.12 1d52bbfd469af69fbcae88c67f160ce1b968e7f3
CVE_STATUS[CVE-2023-1078] = "cpe-stable-backport: Backported in versions v5.15.94 and v6.1.12"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1079
# Patched in kernel since v6.3-rc1 4ab3a086d10eeec1424f2e8a968827a6336203df
# Backported in version v5.4.235 dd08e68d04d08d2f42b09162c939a0b0841216cc
# Backported in version v5.10.173 21a2eec4a440060a6eb294dc890eaf553101ba09
# Backported in version v5.15.99 3959316f8ceb17866646abc6be4a332655407138
# Backported in version v6.1.16 ee907829b36949c452c6f89485cb2a58e97c048e
# Backported in version v6.2.3 b08bcfb4c97d7bd41b362cff44b2c537ce9e8540
CVE_STATUS[CVE-2023-1079] = "cpe-stable-backport: Backported in versions v5.4.235, v5.10.173, v5.15.99, v6.1.16 and v6.2.3"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1118
# Introduced in version v2.6.36 9ea53b74df9c4681f5bb2da6b2e10e37d87ea6d6
# Patched in kernel since v6.3-rc1 29b0589a865b6f66d141d79b2dd1373e4e50fe17
# Backported in version v5.4.235 d120334278b370b6a1623a75ebe53b0c76cb247c
# Backported in version v5.10.173 78da5a378bdacd5bf68c3a6389bdc1dd0c0f5b3c
# Backported in version v5.15.99 29962c478e8b2e6a6154d8d84b8806dbe36f9c28
# Backported in version v6.1.16 029c1410e345ce579db5c007276340d072aac54a
# Backported in version v6.2.3 182ea492aae5b64067277e60a4ea5995c4628555
CVE_STATUS[CVE-2023-1118] = "cpe-stable-backport: Backported in versions v5.4.235, v5.10.173, v5.15.99, v6.1.16 and v6.2.3"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1281
# Introduced in version v4.14 9b0d4446b56904b59ae3809913b0ac760fa941a6
# Patched in kernel since v6.2 ee059170b1f7e94e55fa6cadee544e176a6e59c2
# Backported in version v5.10.169 eb8e9d8572d1d9df17272783ad8a84843ce559d4
# Backported in version v5.15.95 becf55394f6acb60dd60634a1c797e73c747f9da
# Backported in version v6.1.13 bd662ba56187b5ef8a62a3511371cd38299a507f
CVE_STATUS[CVE-2023-1281] = "cpe-stable-backport: Backported in versions v5.10.169, v5.15.95 and v6.1.13"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1513
# Patched in kernel since v6.2 2c10b61421a28e95a46ab489fd56c0f442ff6952
# Backported in version v5.4.232 9f95a161a7deef62d6d2f57b1a69f94e0546d8d8
# Backported in version v5.10.169 6416c2108ba54d569e4c98d3b62ac78cb12e7107
# Backported in version v5.15.95 35351e3060d67eed8af1575d74b71347a87425d8
# Backported in version v6.1.13 747ca7c8a0c7bce004709143d1cd6596b79b1deb
CVE_STATUS[CVE-2023-1513] = "cpe-stable-backport: Backported in versions v5.4.232, v5.10.169, v5.15.95 and v6.1.13"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1652
# Patched in kernel since v6.2 e6cf91b7b47ff82b624bdfe2fdcde32bb52e71dd
# Backported in version v5.15.91 0a27dcd5343026ac0cb168ee63304255372b7a36
# Backported in version v6.1.9 32d5eb95f8f0e362e37c393310b13b9e95404560
# Ref: https://www.linuxkernelcves.com/cves/CVE-2023-1652
# Ref: Debian kernel-sec team: https://salsa.debian.org/kernel-team/kernel-sec/-/blob/1fa77554d4721da54e2df06fa1908a83ba6b1045/retired/CVE-2023-1652
CVE_STATUS[CVE-2023-1652] = "cpe-stable-backport: Backported in versions v5.15.91 and v6.1.9"
# https://nvd.nist.gov/vuln/detail/CVE-2023-1829
# Patched in kernel since v6.3-rc1 8c710f75256bb3cf05ac7b1672c82b92c43f3d28
# Backported in version v5.4.235 7a6fb69bbcb21e9ce13bdf18c008c268874f0480
# Backported in version v5.10.173 18c3fa7a7fdbb4d21dafc8a7710ae2c1680930f6
# Backported in version v5.15.100 7c183dc0af472dec33d2c0786a5e356baa8cad19
# Backported in version v6.1.18 3abebc503a5148072052c229c6b04b329a420ecd
# Backported in version v6.2.5 372ae77cf11d11fb118cbe2d37def9dd5f826abd
# Ref: https://www.linuxkernelcves.com/cves/CVE-2023-1829
# Ref: Debian kernel-sec team : https://salsa.debian.org/kernel-team/kernel-sec/-/blob/1fa77554d4721da54e2df06fa1908a83ba6b1045/active/CVE-2023-1829
CVE_STATUS[CVE-2023-1829] = "cpe-stable-backport: Backported in versions v5.4.235, v5.10.173, v5.15.100, v6.1.18 and v6.2.5"
# https://nvd.nist.gov/vuln/detail/CVE-2023-28466
# Introduced in version v4.13 3c4d7559159bfe1e3b94df3a657b2cda3a34e218
# Patched in kernel since v6.3-rc2 49c47cc21b5b7a3d8deb18fc57b0aa2ab1286962
# Backported in version v5.15.105 0b54d75aa43a1edebc8a3770901f5c3557ee0daa
# Backported in version v6.1.20 14c17c673e1bba08032d245d5fb025d1cbfee123
# Backported in version v6.2.7 5231fa057bb0e52095591b303cf95ebd17bc62ce
CVE_STATUS[CVE-2023-28466] = "cpe-stable-backport: Backported in versions v5.15.05, v6.1.20 and v6.2.7"
# https://www.linuxkernelcves.com/cves/CVE-2023-0615
# Fixed in 6.1 onwards
CVE_STATUS[CVE-2023-0615] = "fixed-version: Fixed in version v6.1 onwards"
# https://www.linuxkernelcves.com/cves/CVE-2023-28328
# Fixed with 6.1.2
CVE_STATUS[CVE-2023-28328] = "fixed-version: Fixed in version v6.1.2"
# https://www.linuxkernelcves.com/cves/CVE-2023-2162
# Fixed in 6.1.11
CVE_STATUS[CVE-2023-2162] = "fixed-version: Fixed in version v6.1.11"
# https://www.linuxkernelcves.com/cves/CVE-2023-0459
# Fixed in 6.1.14 onwards
CVE_STATUS[CVE-2023-0459] = "fixed-version: Fixed in version v6.1.14"
# https://www.linuxkernelcves.com/cves/CVE-2023-1999
# https://www.linuxkernelcves.com/cves/CVE-2023-2985
# Fixed in 6.1.16
CVE_STATUS[CVE-2023-1998] = "fixed-version: Fixed in version v6.1.16"
CVE_STATUS[CVE-2023-2985] = "fixed-version: Fixed in version v6.1.16"
# https://www.linuxkernelcves.com/cves/CVE-2023-1855
# https://www.linuxkernelcves.com/cves/CVE-2023-1990
# https://www.linuxkernelcves.com/cves/CVE-2023-2235
# https://www.linuxkernelcves.com/cves/CVE-2023-30456
# Fixed in 6.1.21
CVE_STATUS_GROUPS += "CVE_STATUS_KERNEL_6121"
CVE_STATUS_KERNEL_6121 = "CVE-2023-1855 CVE-2023-1990 CVE-2023-2235 CVE-2023-30456"
CVE_STATUS_KERNEL_6121[status] = "fixed-version: Fixed in version v6.1.21"
# https://www.linuxkernelcves.com/cves/CVE-2023-1989
# https://www.linuxkernelcves.com/cves/CVE-2023-2194
# https://www.linuxkernelcves.com/cves/CVE-2023-28866
# https://www.linuxkernelcves.com/cves/CVE-2023-30772
# https://www.linuxkernelcves.com/cves/CVE-2023-33203
# https://www.linuxkernelcves.com/cves/CVE-2023-33288
# Fixed with 6.1.22
CVE_STATUS_GROUPS += "CVE_STATUS_KERNEL_6122"
CVE_STATUS_KERNEL_6122 = "CVE-2023-2194 CVE-2023-1989 CVE-2023-28866 CVE-2023-30772 CVE-2023-33203 CVE-2023-33288"
CVE_STATUS_KERNEL_6122[status] = "fixed-version: Fixed in version v6.1.22"
# https://www.linuxkernelcves.com/cves/CVE-2023-1611
# Fixed in 6.1.23
CVE_STATUS[CVE-2023-1611] = "fixed-version: Fixed in version v6.1.23"
# https://www.linuxkernelcves.com/cves/CVE-2023-1859
# Fixed in 6.1.25
CVE_STATUS[CVE-2023-1859] = "fixed-version: Fixed in version v6.1.25"
# https://www.linuxkernelcves.com/cves/CVE-2023-2156
# https://www.linuxkernelcves.com/cves/CVE-2023-31436
# Fixed in 6.1.26
CVE_STATUS[CVE-2023-2156] = "fixed-version: Fixed in version v6.1.26"
CVE_STATUS[CVE-2023-31436] = "fixed-version: Fixed in version v6.1.26"
# https://www.linuxkernelcves.com/cves/CVE-2023-1380
# https://www.linuxkernelcves.com/cves/CVE-2023-2002
# Fixed in 6.1.27
CVE_STATUS[CVE-2023-1380] = "fixed-version: Fixed in version v6.1.27"
CVE_STATUS[CVE-2023-2002] = "fixed-version: Fixed in version v6.1.27"
# https://www.linuxkernelcves.com/cves/CVE-2023-32233
# Fixed with 6.1.28
CVE_STATUS[CVE-2023-32233] = "fixed-version: Fixed in version v6.1.28"
# https://www.linuxkernelcves.com/cves/CVE-2023-34256
# Fixed in 6.1.29
CVE_STATUS[CVE-2023-34256] = "fixed-version: Fixed in version v6.1.29"
# Backported to 6.1.9
CVE_STATUS[CVE-2023-3358] = "cpe-stable-backport: Backported in version v6.1.9"
# Backported to 6.1.11
CVE_STATUS[CVE-2023-3359] = "cpe-stable-backport: Backported in version v6.1.11"
CVE_STATUS[CVE-2023-3161] = "cpe-stable-backport: Backported in version v6.1.11"
# Backported to 6.1.16
CVE_STATUS[CVE-2023-3220] = "cpe-stable-backport: Backported in version v6.1.16"
# Backported to 6.1.28
CVE_STATUS_GROUPS += "CVE_STATUS_KERNEL_6128"
CVE_STATUS_KERNEL_6128 = "CVE-2023-3268 CVE-2023-35823 CVE-2023-35824 CVE-2023-35826 CVE-2023-35828 CVE-2023-35829"
CVE_STATUS_KERNEL_6122[status] = "cpe-stable-backport: Backported in version v6.1.28"
# Backported to 6.1.30
# Backported to 6.1.30 as 9a342d4
CVE_STATUS[CVE-2023-3090] = "cpe-stable-backport: Backported in version v6.1.30"
CVE_STATUS[CVE-2023-3141] = "cpe-stable-backport: Backported in version v6.1.30 as 9a342d4"
# Backported to 6.1.33
CVE_STATUS_GROUPS += "CVE_STATUS_KERNEL_6133"
CVE_STATUS_KERNEL_6133 = "CVE-2023-2124 CVE-2023-3212 CVE-2023-35788"
CVE_STATUS_KERNEL_6133[status] = "cpe-stable-backport: Backported in version v6.1.33"
# Backported to 6.1.35
CVE_STATUS[CVE-2023-3117] = "cpe-stable-backport: Backported in version v6.1.35"
CVE_STATUS[CVE-2023-3390] = "cpe-stable-backport: Backported in version v6.1.35"
# Backported to 6.1.36
CVE_STATUS[CVE-2023-3389] = "cpe-stable-backport: Backported in version v6.1.36"
# Only in 6.2.0 to 6.2.14, and 6.3.0 to 6.3.1
CVE_STATUS[CVE-2023-3312] = "not-applicable-config: Only in versions v6.2.0 to v6.2.4 and v6.3.0 to v6.3.1"
# https://nvd.nist.gov/vuln/detail/CVE-2023-23005
# Introduced in version v6.1 7b88bda3761b95856cf97822efe8281c8100067b
# Patched in kernel since v6.2 4a625ceee8a0ab0273534cb6b432ce6b331db5ee
# But, the CVE is disputed:
CVE_STATUS[CVE-2023-23005] = "disputed: There are no realistic cases \
in which a user can cause the alloc_memory_type error case to be reached. \
See: https://bugzilla.suse.com/show_bug.cgi?id=1208844#c2"
CVE_STATUS[CVE-2023-28464] = "not-applicable-config: Only in 6.3-rc"
@@ -0,0 +1,69 @@
From d14450f9e0f05ea7177c5404a7a9289352caab77 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 23 Jan 2023 13:04:10 -0800
Subject: [PATCH] perf cpumap: Make counter as unsigned ints
These are loop counters which is inherently unsigned. Therefore make
them unsigned. Moreover it also fixes alloc-size-larger-than
error with gcc-13, where malloc can be called with (-1) due to tmp_len
being an int type.
Fixes
| cpumap.c:366:20: error: argument 1 range [18446744065119617024, 18446744073709551612] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
| 366 | tmp_cpus = malloc(tmp_len * sizeof(struct perf_cpu));
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Upstream-Status: Submitted [https://lore.kernel.org/linux-perf-users/20230123211310.127532-1-raj.khem@gmail.com/T/#u]
---
tools/lib/perf/cpumap.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/lib/perf/cpumap.c b/tools/lib/perf/cpumap.c
index 6cd0be7c1bb4..d960880dd903 100644
--- a/tools/lib/perf/cpumap.c
+++ b/tools/lib/perf/cpumap.c
@@ -351,8 +351,8 @@ struct perf_cpu_map *perf_cpu_map__merge(struct perf_cpu_map *orig,
struct perf_cpu_map *other)
{
struct perf_cpu *tmp_cpus;
- int tmp_len;
- int i, j, k;
+ unsigned int tmp_len;
+ unsigned int i, j, k;
struct perf_cpu_map *merged;
if (perf_cpu_map__is_subset(orig, other))
@@ -369,7 +369,7 @@ struct perf_cpu_map *perf_cpu_map__merge(struct perf_cpu_map *orig,
/* Standard merge algorithm from wikipedia */
i = j = k = 0;
- while (i < orig->nr && j < other->nr) {
+ while (i < (unsigned int)orig->nr && j < (unsigned int)other->nr) {
if (orig->map[i].cpu <= other->map[j].cpu) {
if (orig->map[i].cpu == other->map[j].cpu)
j++;
@@ -378,10 +378,10 @@ struct perf_cpu_map *perf_cpu_map__merge(struct perf_cpu_map *orig,
tmp_cpus[k++] = other->map[j++];
}
- while (i < orig->nr)
+ while (i < (unsigned int)orig->nr)
tmp_cpus[k++] = orig->map[i++];
- while (j < other->nr)
+ while (j < (unsigned int)other->nr)
tmp_cpus[k++] = other->map[j++];
assert(k <= tmp_len);
--
2.39.1
@@ -0,0 +1,392 @@
SUMMARY = "Linux kernel Development Source"
DESCRIPTION = "Development source linux kernel. When built, this recipe packages the \
source of the preferred virtual/kernel provider and makes it available for full kernel \
development or external module builds"
SECTION = "kernel"
LICENSE = "GPL-2.0-only"
inherit linux-kernel-base
# Whilst not a module, this ensures we don't get multilib extended (which would make no sense)
inherit module-base
# We need the kernel to be staged (unpacked, patched and configured) before
# we can grab the source and make the source package. We also need the bits from
# ${B} not to change while we install, so virtual/kernel must finish do_compile.
do_install[depends] += "virtual/kernel:do_shared_workdir"
# Need the source, not just the output of populate_sysroot
do_install[depends] += "virtual/kernel:do_install"
# There's nothing to do here, except install the source where we can package it
do_fetch[noexec] = "1"
do_unpack[noexec] = "1"
do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
deltask do_populate_sysroot
S = "${STAGING_KERNEL_DIR}"
B = "${STAGING_KERNEL_BUILDDIR}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
KERNEL_BUILD_ROOT="${nonarch_base_libdir}/modules/"
do_install() {
kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
install -d $kerneldir
# create the directory structure
rm -f $kerneldir/build
rm -f $kerneldir/source
mkdir -p $kerneldir/build
# for compatibility with some older variants of this package, we
# create a /usr/src/kernel symlink to /lib/modules/<version>/source
mkdir -p ${D}/usr/src
(
cd ${D}/usr/src
ln -rs ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
)
# for on target purposes, we unify build and source
(
cd $kerneldir
ln -s build source
)
# first copy everything
(
cd ${S}
cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build
cp --parents $(find -type f -name "Build" -o -name "Build.include") $kerneldir/build
)
# then drop all but the needed Makefiles/Kconfig files
rm -rf $kerneldir/build/scripts
rm -rf $kerneldir/build/include
# now copy in parts from the build that we'll need later
(
cd ${B}
if [ -s Module.symvers ]; then
cp Module.symvers $kerneldir/build
fi
cp System.map* $kerneldir/build
if [ -s Module.markers ]; then
cp Module.markers $kerneldir/build
fi
cp -a .config $kerneldir/build
# This scripts copy blow up QA, so for now, we require a more
# complex 'make scripts' to restore these, versus copying them
# here. Left as a reference to indicate that we know the scripts must
# be dealt with.
# cp -a scripts $kerneldir/build
# although module.lds can be regenerated on target via 'make modules_prepare'
# there are several places where 'makes scripts prepare' is done, and that won't
# regenerate the file. So we copy it onto the target as a migration to using
# modules_prepare
cp -a --parents scripts/module.lds $kerneldir/build/ 2>/dev/null || :
if [ -d arch/${ARCH}/scripts ]; then
cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH}
fi
if [ -f arch/${ARCH}/*lds ]; then
cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH}
fi
rm -f $kerneldir/build/scripts/*.o
rm -f $kerneldir/build/scripts/*/*.o
if [ "${ARCH}" = "powerpc" ]; then
if [ -e arch/powerpc/lib/crtsavres.S ] ||
[ -e arch/powerpc/lib/crtsavres.o ]; then
cp -a --parents arch/powerpc/lib/crtsavres.[So] $kerneldir/build/
fi
fi
if [ "${ARCH}" = "arm64" -o "${ARCH}" = "riscv" ]; then
if [ -e arch/${ARCH}/kernel/vdso/vdso.lds ]; then
cp -a --parents arch/${ARCH}/kernel/vdso/vdso.lds $kerneldir/build/
fi
fi
if [ "${ARCH}" = "powerpc" ]; then
cp -a --parents arch/powerpc/kernel/vdso32/vdso32.lds $kerneldir/build 2>/dev/null || :
cp -a --parents arch/powerpc/kernel/vdso64/vdso64.lds $kerneldir/build 2>/dev/null || :
# v5.19+
cp -a --parents arch/powerpc/kernel/vdso/vdso*.lds $kerneldir/build 2>/dev/null || :
fi
cp -a include $kerneldir/build/include
# we don't usually copy generated files, since they can be rebuilt on the target,
# but without this file, we get a forced syncconfig run in v5.8+, which prompts and
# breaks workflows.
cp -a --parents include/generated/autoconf.h $kerneldir/build 2>/dev/null || :
if [ -e $kerneldir/include/generated/.vdso-offsets.h.cmd ] ||
[ -e $kerneldir/build/include/generated/.vdso-offsets.h.cmd ] ||
[ -e $kerneldir/build/include/generated/.vdso32-offsets.h.cmd ] ; then
rm -f $kerneldir/include/generated/.vdso-offsets.h.cmd
rm -f $kerneldir/build/include/generated/.vdso-offsets.h.cmd
rm -f $kerneldir/build/include/generated/.vdso32-offsets.h.cmd
fi
)
# now grab the chunks from the source tree that we need
(
cd ${S}
cp -a scripts $kerneldir/build
# for v6.1+ (otherwise we are missing multiple default targets)
cp -a --parents Kbuild $kerneldir/build 2>/dev/null || :
# if our build dir had objtool, it will also be rebuilt on target, so
# we copy what is required for that build
if [ -f ${B}/tools/objtool/objtool ]; then
# these are a few files associated with objtool, since we'll need to
# rebuild it
cp -a --parents tools/build/Build.include $kerneldir/build/
cp -a --parents tools/build/Build $kerneldir/build/
cp -a --parents tools/build/fixdep.c $kerneldir/build/
cp -a --parents tools/scripts/utilities.mak $kerneldir/build/
# extra files, just in case
cp -a --parents tools/objtool/* $kerneldir/build/
cp -a --parents tools/lib/* $kerneldir/build/
cp -a --parents tools/lib/subcmd/* $kerneldir/build/
cp -a --parents tools/include/* $kerneldir/build/
cp -a --parents $(find tools/arch/${ARCH}/ -type f) $kerneldir/build/
fi
if [ "${ARCH}" = "arm64" ]; then
# arch/arm64/include/asm/xen references arch/arm
cp -a --parents arch/arm/include/asm/xen $kerneldir/build/
# arch/arm64/include/asm/opcodes.h references arch/arm
cp -a --parents arch/arm/include/asm/opcodes.h $kerneldir/build/
# v6.1+
cp -a --parents arch/arm64/kernel/asm-offsets.c $kerneldir/build/
cp -a --parents arch/arm64/kernel/vdso/*gettimeofday.* $kerneldir/build/
cp -a --parents arch/arm64/kernel/vdso/sigreturn.S $kerneldir/build/
cp -a --parents arch/arm64/kernel/vdso/note.S $kerneldir/build/
cp -a --parents arch/arm64/kernel/vdso/gen_vdso_offsets.sh $kerneldir/build/
cp -a --parents arch/arm64/kernel/module.lds $kerneldir/build/ 2>/dev/null || :
# 5.13+ needs these tools
cp -a --parents arch/arm64/tools/gen-cpucaps.awk $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/arm64/tools/cpucaps $kerneldir/build/ 2>/dev/null || :
# 5.19+
cp -a --parents arch/arm64/tools/gen-sysreg.awk $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/arm64/tools/sysreg $kerneldir/build/ 2>/dev/null || :
if [ -e $kerneldir/build/arch/arm64/tools/gen-cpucaps.awk ]; then
sed -i -e "s,#!.*awk.*,#!${USRBINPATH}/env awk," $kerneldir/build/arch/arm64/tools/gen-cpucaps.awk
fi
if [ -e $kerneldir/build/arch/arm64/tools/gen-sysreg.awk ]; then
sed -i -e "s,#!.*awk.*,#!${USRBINPATH}/env awk," $kerneldir/build/arch/arm64/tools/gen-sysreg.awk
fi
fi
if [ "${ARCH}" = "powerpc" ]; then
# 5.0 needs these files, but don't error if they aren't present in the source
cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/${ARCH}/kernel/syscalls/syscallhdr.sh $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/${ARCH}/kernel/vdso32/* $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/${ARCH}/kernel/vdso64/* $kerneldir/build/ 2>/dev/null || :
# v5.19+
cp -a --parents arch/powerpc/kernel/vdso/*.S $kerneldir/build 2>/dev/null || :
cp -a --parents arch/powerpc/kernel/vdso/*gettimeofday.* $kerneldir/build 2>/dev/null || :
cp -a --parents arch/powerpc/kernel/vdso/gen_vdso*_offsets.sh $kerneldir/build/ 2>/dev/null || :
# v6,1+
cp -a --parents arch/powerpc/kernel/asm-offsets.c $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/powerpc/kernel/head_booke.h $kerneldir/build/ 2>/dev/null || :
fi
if [ "${ARCH}" = "riscv" ]; then
cp -a --parents arch/riscv/kernel/vdso/*gettimeofday.* $kerneldir/build/
cp -a --parents arch/riscv/kernel/vdso/note.S $kerneldir/build/
if [ -e arch/riscv/kernel/vdso/gen_vdso_offsets.sh ]; then
cp -a --parents arch/riscv/kernel/vdso/gen_vdso_offsets.sh $kerneldir/build/
fi
cp -a --parents arch/riscv/kernel/vdso/* $kerneldir/build/ 2>/dev/null || :
fi
# include the machine specific headers for ARM variants, if available.
if [ "${ARCH}" = "arm" ]; then
cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/
# include a few files for 'make prepare'
cp -a --parents arch/arm/tools/gen-mach-types $kerneldir/build/
cp -a --parents arch/arm/tools/mach-types $kerneldir/build/
# 5.19+
cp -a --parents arch/arm/tools/gen-sysreg.awk $kerneldir/build/ 2>/dev/null || :
# ARM syscall table tools only exist for kernels v4.10 or later
SYSCALL_TOOLS=$(find arch/arm/tools -name "syscall*")
if [ -n "$SYSCALL_TOOLS" ] ; then
cp -a --parents $SYSCALL_TOOLS $kerneldir/build/
fi
cp -a --parents arch/arm/kernel/module.lds $kerneldir/build/ 2>/dev/null || :
# v6.1+
cp -a --parents arch/arm/kernel/asm-offsets.c $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/arm/kernel/signal.h $kerneldir/build/ 2>/dev/null || :
fi
if [ -d arch/${ARCH}/include ]; then
cp -a --parents arch/${ARCH}/include $kerneldir/build/
fi
cp -a include $kerneldir/build
cp -a --parents lib/vdso/* $kerneldir/build/ 2>/dev/null || :
cp -a --parents tools/include/tools/le_byteshift.h $kerneldir/build/
cp -a --parents tools/include/tools/be_byteshift.h $kerneldir/build/
# required for generate missing syscalls prepare phase
cp -a --parents $(find arch/x86 -type f -name "syscall_32.tbl") $kerneldir/build
cp -a --parents $(find arch/arm -type f -name "*.tbl") $kerneldir/build 2>/dev/null || :
if [ "${ARCH}" = "x86" ]; then
# files for 'make prepare' to succeed with kernel-devel
cp -a --parents $(find arch/x86 -type f -name "syscall_32.tbl") $kerneldir/build/ 2>/dev/null || :
cp -a --parents $(find arch/x86 -type f -name "syscalltbl.sh") $kerneldir/build/ 2>/dev/null || :
cp -a --parents $(find arch/x86 -type f -name "syscallhdr.sh") $kerneldir/build/ 2>/dev/null || :
cp -a --parents $(find arch/x86 -type f -name "syscall_64.tbl") $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/
cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/
cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/
cp -a --parents arch/x86/tools/relocs_common.c $kerneldir/build/
cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/
cp -a --parents arch/x86/tools/gen-insn-attr-x86.awk $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/x86/purgatory/purgatory.c $kerneldir/build/
# 4.18 + have unified the purgatory files, so we ignore any errors if
# these files are not present
cp -a --parents arch/x86/purgatory/sha256.h $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/x86/purgatory/sha256.c $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/
cp -a --parents arch/x86/purgatory/string.c $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/x86/purgatory/setup-x86_64.S $kerneldir/build/
cp -a --parents arch/x86/purgatory/entry64.S $kerneldir/build/
cp -a --parents arch/x86/boot/string.h $kerneldir/build/
cp -a --parents arch/x86/boot/string.c $kerneldir/build/
cp -a --parents arch/x86/boot/compressed/string.c $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/
# objtool requires these files
cp -a --parents arch/x86/lib/inat.c $kerneldir/build/ 2>/dev/null || :
cp -a --parents arch/x86/lib/insn.c $kerneldir/build/ 2>/dev/null || :
# v6.1+
cp -a --parents arch/x86/kernel/asm-offsets* $kerneldir/build || :
# for capabilities.h, vmx.h
cp -a --parents arch/x86/kvm/vmx/*.h $kerneldir/build || :
# for lapic.h, hyperv.h ....
cp -a --parents arch/x86/kvm/*.h $kerneldir/build || :
fi
# moved from arch/mips to all arches for v6.1+
cp -a --parents kernel/time/timeconst.bc $kerneldir/build 2>/dev/null || :
cp -a --parents kernel/bounds.c $kerneldir/build 2>/dev/null || :
if [ "${ARCH}" = "mips" ]; then
cp -a --parents arch/mips/Kbuild.platforms $kerneldir/build/
cp --parents $(find -type f -name "Platform") $kerneldir/build
cp --parents arch/mips/boot/tools/relocs* $kerneldir/build
cp -a --parents arch/mips/kernel/asm-offsets.c $kerneldir/build
cp -a --parents Kbuild $kerneldir/build
cp -a --parents arch/mips/kernel/syscalls/*.sh $kerneldir/build 2>/dev/null || :
cp -a --parents arch/mips/kernel/syscalls/*.tbl $kerneldir/build 2>/dev/null || :
cp -a --parents arch/mips/tools/elf-entry.c $kerneldir/build 2>/dev/null || :
fi
# required to build scripts/selinux/genheaders/genheaders
cp -a --parents security/selinux/include/* $kerneldir/build/
# copy any localversion files
cp -a localversion* $kerneldir/build/ 2>/dev/null || :
)
# Make sure the Makefile and version.h have a matching timestamp so that
# external modules can be built
touch -r $kerneldir/build/Makefile $kerneldir/build/include/generated/uapi/linux/version.h
# This fixes a warning that the compilers don't match when building a module
# Change: CONFIG_CC_VERSION_TEXT="x86_64-poky-linux-gcc (GCC) 12.2.0" to "gcc (GCC) 12.2.0"
# #define CONFIG_CC_VERSION_TEXT "x86_64-poky-linux-gcc (GCC) 12.2.0" to "gcc (GCC) 12.2.0"
sed -i 's/CONFIG_CC_VERSION_TEXT=".*\(gcc.*\)"/CONFIG_CC_VERSION_TEXT="\1"/' "$kerneldir/build/.config"
sed -i 's/#define CONFIG_CC_VERSION_TEXT ".*\(gcc.*\)"/#define CONFIG_CC_VERSION_TEXT "\1"/' $kerneldir/build/include/generated/autoconf.h
sed -i 's/CONFIG_CC_VERSION_TEXT=".*\(gcc.*\)"/CONFIG_CC_VERSION_TEXT="\1"/' $kerneldir/build/include/config/auto.conf
# make sure these are at least as old as the .config, or rebuilds will trigger
touch -r $kerneldir/build/.config $kerneldir/build/include/generated/autoconf.h 2>/dev/null || :
touch -r $kerneldir/build/.config $kerneldir/build/include/config/auto.conf* 2>/dev/null || :
if [ -e "$kerneldir/build/include/config/auto.conf.cmd" ]; then
sed -i 's/ifneq "$(CC)" ".*-linux-.*gcc.*$/ifneq "$(CC)" "gcc"/' "$kerneldir/build/include/config/auto.conf.cmd"
sed -i 's/ifneq "$(LD)" ".*-linux-.*ld.bfd.*$/ifneq "$(LD)" "ld"/' "$kerneldir/build/include/config/auto.conf.cmd"
sed -i 's/ifneq "$(AR)" ".*-linux-.*ar.*$/ifneq "$(AR)" "ar"/' "$kerneldir/build/include/config/auto.conf.cmd"
sed -i 's/ifneq "$(OBJCOPY)" ".*-linux-.*objcopy.*$/ifneq "$(OBJCOPY)" "objcopy"/' "$kerneldir/build/include/config/auto.conf.cmd"
if [ "${ARCH}" = "powerpc" ]; then
sed -i 's/ifneq "$(NM)" ".*-linux-.*nm.*$/ifneq "$(NM)" "nm --synthetic"/' "$kerneldir/build/include/config/auto.conf.cmd"
else
sed -i 's/ifneq "$(NM)" ".*-linux-.*nm.*$/ifneq "$(NM)" "nm"/' "$kerneldir/build/include/config/auto.conf.cmd"
fi
sed -i 's/ifneq "$(HOSTCXX)" ".*$/ifneq "$(HOSTCXX)" "g++"/' "$kerneldir/build/include/config/auto.conf.cmd"
sed -i 's/ifneq "$(HOSTCC)" ".*$/ifneq "$(HOSTCC)" "gcc"/' "$kerneldir/build/include/config/auto.conf.cmd"
sed -i 's/ifneq "$(CC_VERSION_TEXT)".*\(gcc.*\)"/ifneq "$(CC_VERSION_TEXT)" "\1"/' "$kerneldir/build/include/config/auto.conf.cmd"
sed -i 's/ifneq "$(srctree)" ".*"/ifneq "$(srctree)" "."/' "$kerneldir/build/include/config/auto.conf.cmd"
# we don't build against the defconfig, so make sure it isn't the trigger for syncconfig
sed -i 's/ifneq "$(KBUILD_DEFCONFIG)".*"\(.*\)"/ifneq "\1" "\1"/' "$kerneldir/build/include/config/auto.conf.cmd"
fi
# make the scripts python3 safe. We won't be running these, and if they are
# left as /usr/bin/python rootfs assembly will fail, since we only have python3
# in the RDEPENDS (and the python3 package does not include /usr/bin/python)
for ss in $(find $kerneldir/build/scripts -type f -name '*'); do
sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "$ss"
sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "$ss"
sed -i 's,/usr/bin/python,/usr/bin/env python3,' "$ss"
done
chown -R root:root ${D}
}
# Ensure we don't race against "make scripts" during cpio
do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
FILES:${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}"
FILES:${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*"
RDEPENDS:${PN} = "bc python3-core flex bison ${TCLIBC}-utils"
# 4.15+ needs these next two RDEPENDS
RDEPENDS:${PN} += "openssl-dev util-linux"
# and x86 needs a bit more for 4.15+
RDEPENDS:${PN} += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-dev', '', d)}"
# powerpc needs elfutils on 6.3+
RDEPENDS:${PN} += "${@bb.utils.contains('ARCH', 'powerpc', 'elfutils-dev', '', d)}"
# 5.8+ needs gcc-plugins libmpc-dev
RDEPENDS:${PN} += "gcc-plugins libmpc-dev"
# 5.13+ needs awk for arm64
RDEPENDS:${PN}:append:aarch64 = " gawk"
# 5.13+ needs grep for powerpc
RDEPENDS:${PN}:append:powerpc = " grep"
@@ -0,0 +1,67 @@
SUMMARY = "Dummy Linux kernel"
DESCRIPTION = "Dummy Linux kernel, to be selected as the preferred \
provider for virtual/kernel to satisfy dependencies for situations \
where you wish to build the kernel externally from the build system."
SECTION = "kernel"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
PROVIDES += "virtual/kernel"
inherit deploy linux-dummy
PACKAGES_DYNAMIC += "^kernel-module-.*"
PACKAGES_DYNAMIC += "^kernel-image-.*"
PACKAGES_DYNAMIC += "^kernel-firmware-.*"
PACKAGES += "kernel-modules kernel-vmlinux"
FILES:kernel-modules = ""
ALLOW_EMPTY:kernel-modules = "1"
DESCRIPTION:kernel-modules = "Kernel modules meta package"
FILES:kernel-vmlinux = ""
ALLOW_EMPTY:kernel-vmlinux = "1"
DESCRIPTION:kernel-vmlinux = "Kernel vmlinux meta package"
INHIBIT_DEFAULT_DEPS = "1"
COMPATIBLE_HOST = ".*-linux"
PR = "r1"
SRC_URI = "file://COPYING.GPL"
S = "${WORKDIR}"
do_configure() {
:
}
do_compile () {
:
}
do_compile_kernelmodules() {
:
}
do_shared_workdir () {
:
}
do_install() {
:
}
do_bundle_initramfs() {
:
}
do_deploy() {
:
}
addtask bundle_initramfs after do_install before do_deploy
addtask deploy after do_install
addtask shared_workdir after do_compile before do_install
addtask compile_kernelmodules
@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
@@ -0,0 +1,66 @@
# This recipe tracks the linux-yocto-dev repository as its upstream source.
# Since this tree is frequently updated, and periodically rebuilt, AUTOREV is
# used to track its contents.
#
# This recipe is just like other linux-yocto variants, with the only difference
# being that to avoid network access during initial parsing, static SRCREVs are
# provided and overridden if the preferred kernel provider is linux-yocto-dev.
#
# To enable this recipe, set PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev"
inherit kernel
require recipes-kernel/linux/linux-yocto.inc
# provide this .inc to set specific revisions
include recipes-kernel/linux/linux-yocto-dev-revisions.inc
KBRANCH = "v6.4/standard/base"
KMETA = "kernel-meta"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name=machine;protocol=https \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=master;destsuffix=${KMETA};protocol=https"
# Set default SRCREVs. Both the machine and meta SRCREVs are statically set
# to the korg v3.7 tag, and hence prevent network access during parsing. If
# linux-yocto-dev is the preferred provider, they will be overridden to
# AUTOREV in following anonymous python routine and resolved when the
# variables are finalized.
SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
LINUX_VERSION ?= "6.4"
LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
PV = "${LINUX_VERSION}+git${SRCPV}"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "${@bb.utils.contains('ARCH', 'powerpc', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
DEPENDS += "gmp-native libmpc-native"
# yaml and dtschema are required for 5.16+ device tree validation, libyaml is checked
# via pkgconfig, so must always be present, but we can wrap the others to make them
# conditional
DEPENDS += "libyaml-native"
PACKAGECONFIG ??= ""
PACKAGECONFIG[dt-validation] = ",,python3-dtschema-native"
# we need the wrappers if validation isn't in the packageconfig
DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'dt-validation', '', 'python3-dtschema-wrapper-native', d)}"
COMPATIBLE_MACHINE = "^(qemuarmv5|qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv32|qemuriscv64|qemuloongarch64)$"
KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES:append:qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}"
KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}"
KERNEL_VERSION_SANITY_SKIP = "1"
@@ -0,0 +1,48 @@
KBRANCH ?= "v6.1/standard/preempt-rt/base"
require recipes-kernel/linux/linux-yocto.inc
# CVE exclusions
include recipes-kernel/linux/cve-exclusion_6.1.inc
# Skip processing of this recipe if it is not explicitly specified as the
# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
# to build multiple virtual/kernel providers, e.g. as dependency of
# core-image-rt-sdk, core-image-rt.
python () {
if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
SRCREV_machine ?= "efb2c857761e865cd7947aab42eaa5ba77ef6ee7"
SRCREV_meta ?= "cba89f406c6e07a16018cb77b51950cbae8ec654"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.1;destsuffix=${KMETA};protocol=https"
LINUX_VERSION ?= "6.1.38"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "1"
LINUX_KERNEL_TYPE = "preempt-rt"
COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)$"
KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES:append:qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
KERNEL_FEATURES:append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}"
@@ -0,0 +1,48 @@
KBRANCH ?= "v6.4/standard/preempt-rt/base"
require recipes-kernel/linux/linux-yocto.inc
# CVE exclusions
include recipes-kernel/linux/cve-exclusion_6.4.inc
# Skip processing of this recipe if it is not explicitly specified as the
# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
# to build multiple virtual/kernel providers, e.g. as dependency of
# core-image-rt-sdk, core-image-rt.
python () {
if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
SRCREV_machine ?= "917d160a84f61aada28d09f5afc04d6451fa52a0"
SRCREV_meta ?= "dab56f52aa33b5cea1513b36b98e50a6c7c31f47"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.4;destsuffix=${KMETA};protocol=https"
LINUX_VERSION ?= "6.4.3"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "1"
LINUX_KERNEL_TYPE = "preempt-rt"
COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)$"
KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES:append:qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
KERNEL_FEATURES:append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}"
@@ -0,0 +1,33 @@
KBRANCH ?= "v6.1/standard/tiny/base"
LINUX_KERNEL_TYPE = "tiny"
KCONFIG_MODE = "--allnoconfig"
require recipes-kernel/linux/linux-yocto.inc
# CVE exclusions
include recipes-kernel/linux/cve-exclusion_6.1.inc
LINUX_VERSION ?= "6.1.38"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
SRCREV_machine ?= "b110cf9bbc395fe757956839d8110e72368699f4"
SRCREV_meta ?= "cba89f406c6e07a16018cb77b51950cbae8ec654"
PV = "${LINUX_VERSION}+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.1;destsuffix=${KMETA};protocol=https"
COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm64|qemuarm|qemuarmv5)$"
# Functionality flags
KERNEL_FEATURES = ""
KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
@@ -0,0 +1,33 @@
KBRANCH ?= "v6.4/standard/tiny/base"
LINUX_KERNEL_TYPE = "tiny"
KCONFIG_MODE = "--allnoconfig"
require recipes-kernel/linux/linux-yocto.inc
# CVE exclusions
include recipes-kernel/linux/cve-exclusion_6.4.inc
LINUX_VERSION ?= "6.4.3"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
SRCREV_machine ?= "dee78ad1963cff9c063fba486d43fc9670285883"
SRCREV_meta ?= "dab56f52aa33b5cea1513b36b98e50a6c7c31f47"
PV = "${LINUX_VERSION}+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.4;destsuffix=${KMETA};protocol=https"
COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm64|qemuarm|qemuarmv5)$"
# Functionality flags
KERNEL_FEATURES = ""
KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
@@ -0,0 +1,78 @@
SUMMARY = "Linux kernel"
SECTION = "kernel"
LICENSE = "GPL-2.0-only"
HOMEPAGE = "https://www.yoctoproject.org/"
LIC_FILES_CHKSUM ?= "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
RECIPE_NO_UPDATE_REASON = "Recipe is updated through a separate process"
# Skip processing of this recipe if it is not explicitly specified as the
# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
# by the use of AUTOREV SRCREVs, which are the default for this recipe.
python () {
if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
d.delVar("BB_DONT_CACHE")
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN")))
}
DEPENDS += "xz-native bc-native"
DEPENDS:append:aarch64 = " libgcc"
KERNEL_CC:append:aarch64 = " ${TOOLCHAIN_OPTIONS}"
KERNEL_LD:append:aarch64 = " ${TOOLCHAIN_OPTIONS}"
DEPENDS:append:nios2 = " libgcc"
KERNEL_CC:append:nios2 = " ${TOOLCHAIN_OPTIONS}"
KERNEL_LD:append:nios2 = " ${TOOLCHAIN_OPTIONS}"
DEPENDS:append:arc = " libgcc"
KERNEL_CC:append:arc = " ${TOOLCHAIN_OPTIONS}"
KERNEL_LD:append:arc = " ${TOOLCHAIN_OPTIONS}"
KERNEL_FEATURES:append:qemuall=" features/debug/printk.scc features/taskstats/taskstats.scc"
KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'cfg/efi.scc', '', d)}"
KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"
KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'vfat', 'cfg/fs/vfat.scc', '', d)}"
# A KMACHINE is the mapping of a yocto $MACHINE to what is built
# by the kernel. This is typically the branch that should be built,
# and it can be specific to the machine or shared
# KMACHINE = "UNDEFINED"
LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}"
# Pick up shared functions
inherit kernel
inherit kernel-yocto
B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build"
do_install:append(){
if [ -n "${KMETA}" ]; then
rm -rf ${STAGING_KERNEL_DIR}/${KMETA}
fi
}
# enable kernel-sample for oeqa/runtime/cases's ksample.py test
KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc"
KERNEL_DEBUG ?= ""
# These used to be version specific, but are now common dependencies. New
# tools / dependencies will continue to be added in version specific recipes.
DEPENDS += '${@bb.utils.contains_any("ARCH", [ "x86", "arm64", "powerpc" ], "elfutils-native", "", d)}'
DEPENDS += "openssl-native util-linux-native"
DEPENDS += "gmp-native libmpc-native"
DEPENDS += '${@bb.utils.contains("KERNEL_DEBUG", "True", "pahole-native", "", d)}'
EXTRA_OEMAKE += '${@bb.utils.contains("KERNEL_DEBUG", "True", "", "PAHOLE=false", d)}'
do_devshell:prepend() {
# setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native)
d.setVar("PKG_CONFIG_DIR", "${STAGING_DIR_NATIVE}${libdir_native}/pkgconfig")
d.setVar("PKG_CONFIG_PATH", "${PKG_CONFIG_DIR}:${STAGING_DATADIR_NATIVE}/pkgconfig")
d.setVar("PKG_CONFIG_LIBDIR", "${PKG_CONFIG_DIR}")
d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1")
d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
}
@@ -0,0 +1,72 @@
KBRANCH ?= "v6.1/standard/base"
require recipes-kernel/linux/linux-yocto.inc
# CVE exclusions
include recipes-kernel/linux/cve-exclusion_6.1.inc
# board specific branches
KBRANCH:qemuarm ?= "v6.1/standard/arm-versatile-926ejs"
KBRANCH:qemuarm64 ?= "v6.1/standard/qemuarm64"
KBRANCH:qemumips ?= "v6.1/standard/mti-malta32"
KBRANCH:qemuppc ?= "v6.1/standard/qemuppc"
KBRANCH:qemuriscv64 ?= "v6.1/standard/base"
KBRANCH:qemuriscv32 ?= "v6.1/standard/base"
KBRANCH:qemux86 ?= "v6.1/standard/base"
KBRANCH:qemux86-64 ?= "v6.1/standard/base"
KBRANCH:qemuloongarch64 ?= "v6.1/standard/base"
KBRANCH:qemumips64 ?= "v6.1/standard/mti-malta64"
SRCREV_machine:qemuarm ?= "a74344429a095a5941cd8dfac532160349344c92"
SRCREV_machine:qemuarm64 ?= "b110cf9bbc395fe757956839d8110e72368699f4"
SRCREV_machine:qemuloongarch64 ?= "b110cf9bbc395fe757956839d8110e72368699f4"
SRCREV_machine:qemumips ?= "78c81e178f8e2ffbb7c03cd324cf50ee0c5c4cf2"
SRCREV_machine:qemuppc ?= "b110cf9bbc395fe757956839d8110e72368699f4"
SRCREV_machine:qemuriscv64 ?= "b110cf9bbc395fe757956839d8110e72368699f4"
SRCREV_machine:qemuriscv32 ?= "b110cf9bbc395fe757956839d8110e72368699f4"
SRCREV_machine:qemux86 ?= "b110cf9bbc395fe757956839d8110e72368699f4"
SRCREV_machine:qemux86-64 ?= "b110cf9bbc395fe757956839d8110e72368699f4"
SRCREV_machine:qemumips64 ?= "6c6b1170464e1f64f78a45cf7e78d5c678f38f48"
SRCREV_machine ?= "b110cf9bbc395fe757956839d8110e72368699f4"
SRCREV_meta ?= "cba89f406c6e07a16018cb77b51950cbae8ec654"
# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll
# get the <version>/base branch, which is pure upstream -stable, and the same
# meta SRCREV as the linux-yocto-standard builds. Select your version using the
# normal PREFERRED_VERSION settings.
BBCLASSEXTEND = "devupstream:target"
SRCREV_machine:class-devupstream ?= "61fd484b2cf6bc8022e8e5ea6f693a9991740ac2"
PN:class-devupstream = "linux-yocto-upstream"
KBRANCH:class-devupstream = "v6.1/base"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.1;destsuffix=${KMETA};protocol=https"
SRC_URI += "file://0001-perf-cpumap-Make-counter-as-unsigned-ints.patch"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
LINUX_VERSION ?= "6.1.38"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "1"
KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
COMPATIBLE_MACHINE = "^(qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32|qemuloongarch64)$"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES:append:qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc cfg/net/mdio.scc"
KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}"
KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}"
KERNEL_FEATURES:append:powerpc =" arch/powerpc/powerpc-debug.scc"
KERNEL_FEATURES:append:powerpc64 =" arch/powerpc/powerpc-debug.scc"
KERNEL_FEATURES:append:powerpc64le =" arch/powerpc/powerpc-debug.scc"
INSANE_SKIP:kernel-vmlinux:qemuppc64 = "textrel"
@@ -0,0 +1,71 @@
KBRANCH ?= "v6.4/standard/base"
require recipes-kernel/linux/linux-yocto.inc
# CVE exclusions
include recipes-kernel/linux/cve-exclusion_6.4.inc
# board specific branches
KBRANCH:qemuarm ?= "v6.4/standard/arm-versatile-926ejs"
KBRANCH:qemuarm64 ?= "v6.4/standard/qemuarm64"
KBRANCH:qemumips ?= "v6.4/standard/mti-malta32"
KBRANCH:qemuppc ?= "v6.4/standard/qemuppc"
KBRANCH:qemuriscv64 ?= "v6.4/standard/base"
KBRANCH:qemuriscv32 ?= "v6.4/standard/base"
KBRANCH:qemux86 ?= "v6.4/standard/base"
KBRANCH:qemux86-64 ?= "v6.4/standard/base"
KBRANCH:qemuloongarch64 ?= "v6.4/standard/base"
KBRANCH:qemumips64 ?= "v6.4/standard/mti-malta64"
SRCREV_machine:qemuarm ?= "aa7642358697dc9be32c4563a3d950f257a3f2ed"
SRCREV_machine:qemuarm64 ?= "dee78ad1963cff9c063fba486d43fc9670285883"
SRCREV_machine:qemuloongarch64 ?= "dee78ad1963cff9c063fba486d43fc9670285883"
SRCREV_machine:qemumips ?= "8a3ac37b45e7dcc98d28ab3920309340202272d9"
SRCREV_machine:qemuppc ?= "dee78ad1963cff9c063fba486d43fc9670285883"
SRCREV_machine:qemuriscv64 ?= "dee78ad1963cff9c063fba486d43fc9670285883"
SRCREV_machine:qemuriscv32 ?= "dee78ad1963cff9c063fba486d43fc9670285883"
SRCREV_machine:qemux86 ?= "dee78ad1963cff9c063fba486d43fc9670285883"
SRCREV_machine:qemux86-64 ?= "dee78ad1963cff9c063fba486d43fc9670285883"
SRCREV_machine:qemumips64 ?= "144ff37fee7f0499574d5b508e4db82234f38fec"
SRCREV_machine ?= "dee78ad1963cff9c063fba486d43fc9670285883"
SRCREV_meta ?= "dab56f52aa33b5cea1513b36b98e50a6c7c31f47"
# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll
# get the <version>/base branch, which is pure upstream -stable, and the same
# meta SRCREV as the linux-yocto-standard builds. Select your version using the
# normal PREFERRED_VERSION settings.
BBCLASSEXTEND = "devupstream:target"
SRCREV_machine:class-devupstream ?= "160f4124ea8b4cd6c86867e111fa55e266345a16"
PN:class-devupstream = "linux-yocto-upstream"
KBRANCH:class-devupstream = "v6.4/base"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.4;destsuffix=${KMETA};protocol=https"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
LINUX_VERSION ?= "6.4.3"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "1"
KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
COMPATIBLE_MACHINE = "^(qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32|qemuloongarch64)$"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES:append:qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc cfg/net/mdio.scc"
KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}"
KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}"
KERNEL_FEATURES:append:powerpc =" arch/powerpc/powerpc-debug.scc"
KERNEL_FEATURES:append:powerpc64 =" arch/powerpc/powerpc-debug.scc"
KERNEL_FEATURES:append:powerpc64le =" arch/powerpc/powerpc-debug.scc"
INSANE_SKIP:kernel-vmlinux:qemuppc64 = "textrel"
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# use target=recheck if you want to recheck failing tests
[ "$target" = "" ] && target=check
# Without --ignore-exit, the tap harness causes any FAILs within a
# test plan to raise ERRORs; this is just noise.
makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD"
exec make -C tests -k -s $makeargs $target 2>/dev/null
@@ -0,0 +1,28 @@
From 56986190e4b0c10945ce6aaa7ca10d6bd8a26a39 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Mon, 9 Mar 2020 21:10:35 +0000
Subject: [PATCH] Make manpages multilib identical
Upstream-Status: Pending
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
---
doc/man/asciidoc-attrs.conf.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/man/asciidoc-attrs.conf.in b/doc/man/asciidoc-attrs.conf.in
index ad1183f1..e11c7031 100644
--- a/doc/man/asciidoc-attrs.conf.in
+++ b/doc/man/asciidoc-attrs.conf.in
@@ -1,7 +1,7 @@
[attributes]
# default values
-system_plugin_path="@LIBDIR@/babeltrace2/plugins"
-system_plugin_provider_path="@LIBDIR@/babeltrace2/plugin-providers"
+system_plugin_path="@prefix@/lib*/babeltrace2/plugins"
+system_plugin_provider_path="@prefix@/lib*/babeltrace2/plugin-providers"
babeltrace_version="@PACKAGE_VERSION@"
enable_debug_info="@ENABLE_DEBUG_INFO_VAL@"
defrdport=5344
--
2.24.1
@@ -0,0 +1,28 @@
From 582713cc9a013481eeef253195d644020f637ec4 Mon Sep 17 00:00:00 2001
Message-Id: <582713cc9a013481eeef253195d644020f637ec4.1583403622.git.wallinux@gmail.com>
From: Anders Wallin <wallinux@gmail.com>
Date: Thu, 5 Mar 2020 11:20:04 +0100
Subject: [PATCH] tests: do not run test applications from .libs
Cross compile specific change
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Anders Wallin <wallinux@gmail.com>
---
tests/lib/test_plugin | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/lib/test_plugin b/tests/lib/test_plugin
index 652c90cc..1f817c50 100755
--- a/tests/lib/test_plugin
+++ b/tests/lib/test_plugin
@@ -26,4 +26,4 @@ fi
# shellcheck source=../utils/utils.sh
source "$UTILSSH"
-"${BT_TESTS_BUILDDIR}/lib/plugin" "${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins/.libs"
+"${BT_TESTS_BUILDDIR}/lib/plugin" "${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins"
--
2.25.1
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
# use target=recheck if you want to recheck failing tests
[ "$target" = "" ] && target=check
# Without --ignore-exit, the tap harness causes any FAILs within a
# test plan to raise ERRORs; this is just noise.
makeargs="LOG_DRIVER_FLAGS=--ignore-exit abs_top_srcdir=$PWD abs_top_builddir=$PWD GREP=grep SED=sed PYTHON=python3"
exec 2> error.log
make -C tests -k -s $makeargs $target
exitcode=$?
if [ -e error.log ]; then
cat error.log
fi
if [ -e tests/test-suite.log ]; then
cat tests/test-suite.log
fi
exit $exitcode
@@ -0,0 +1,95 @@
SUMMARY = "Babeltrace2 - Trace Format Babel Tower"
DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
HOMEPAGE = "http://babeltrace.org/"
BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-only & BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a6a458c13f18385b7bc5069a6d7b176e"
DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-2.0;protocol=https \
file://run-ptest \
file://0001-tests-do-not-run-test-applications-from-.libs.patch \
file://0001-Make-manpages-multilib-identical.patch \
"
SRCREV = "66e76d1ea601705928899138f02730a3a2a3153d"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$"
S = "${WORKDIR}/git"
inherit autotools pkgconfig ptest python3targetconfig
EXTRA_OECONF = "--disable-debug-info --disable-Werror"
PACKAGECONFIG ??= "manpages"
PACKAGECONFIG[manpages] = ", --disable-man-pages, asciidoc-native xmlto-native"
FILES:${PN}-staticdev += "${libdir}/babeltrace2/plugins/*.a"
FILES:${PN} += "${libdir}/babeltrace2/plugins/*.so"
ASNEEDED = ""
LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld ptest', ' -fuse-ld=bfd ', '', d)}"
# coreutils since we need full mktemp
RDEPENDS:${PN}-ptest += "bash gawk python3 make grep coreutils findutils"
do_compile_ptest () {
make -C tests all
}
do_install_ptest () {
install -d "${D}${PTEST_PATH}/tests"
# Copy required files from source directory
for d in $(find "${S}/tests" -type d -printf '%P ') ; do
install -d "${D}${PTEST_PATH}/tests/$d"
find "${S}/tests/$d" -maxdepth 1 -executable -type f \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
find "${S}/tests/$d" -maxdepth 1 -name *.sh \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
find "${S}/tests/$d" -maxdepth 1 -name *.py \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
find "${S}/tests/$d" -maxdepth 1 -name *.expect \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
done
install -d "${D}${PTEST_PATH}/tests/data/ctf-traces/"
cp -a ${S}/tests/data/ctf-traces/* ${D}${PTEST_PATH}/tests/data/ctf-traces/
# Copy the tests directory tree and the executables and
# Makefiles found within.
install -D "${B}/tests/Makefile" "${D}${PTEST_PATH}/tests/"
for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do
install -d "${D}${PTEST_PATH}/tests/$d"
find "${B}/tests/$d" -maxdepth 1 -executable -type f \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
test -r "${B}/tests/$d/Makefile" && \
install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile"
find "${B}/tests/$d" -maxdepth 1 -name *.sh \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
done
for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
done
done
# Prevent attempts to update Makefiles during test runs, and
# silence "Making check in $SUBDIR" messages.
find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
sed -i \
-e '/Makefile:/,/^$/d' \
-e '/%: %.in/,/^$/d' \
-e '/echo "Making $$target in $$subdir"; \\/d' \
-e 's/^srcdir = \(.*\)/srcdir = ./' \
-e 's/^builddir = \(.*\)/builddir = ./' \
-e 's/^all-am:.*/all-am:/' \
{} +
# Substitute links to installed binaries.
install -d "${D}${PTEST_PATH}/src/cli/"
ln -s "${bindir}/babeltrace2" ${D}${PTEST_PATH}/src/cli/
# Remove architechture specific testfiles
rm -rf ${D}${PTEST_PATH}/tests/data/plugins/flt.lttng-utils.debug-info/*
}
@@ -0,0 +1,98 @@
SUMMARY = "Babeltrace - Trace Format Babel Tower"
DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
HOMEPAGE = "http://babeltrace.org/"
BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.5;protocol=https \
file://run-ptest \
"
SRCREV = "91c00f70884887ff5c4849a8e3d47e311a22ba9d"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>1(\.\d+)+)$"
S = "${WORKDIR}/git"
inherit autotools pkgconfig ptest
EXTRA_OECONF = "--disable-debug-info"
ASNEEDED = ""
RDEPENDS:${PN}-ptest += "bash gawk make"
addtask do_patch_ptest_path after do_patch before do_configure
do_patch_ptest_path () {
for f in $(grep -l -r abs_top_srcdir ${S}/tests); do
sed -i 's:\@abs_top_srcdir\@:${PTEST_PATH}:' ${f}
done
for f in $(grep -l -r abs_top_builddir ${S}/tests); do
sed -i 's:\@abs_top_builddir\@:${PTEST_PATH}:' ${f}
done
for f in $(grep -l -r GREP ${S}/tests); do
sed -i 's:\@GREP\@:grep:' ${f}
done
for f in $(grep -l -r SED ${S}/tests); do
sed -i 's:\@SED\@:sed:' ${f}
done
}
do_compile_ptest () {
make -C tests all
}
do_install_ptest () {
# Copy required files from source directory
for f in config/tap-driver.sh config/test-driver; do
install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
done
install -d "$f" "${D}${PTEST_PATH}/tests/ctf-traces/"
cp -a ${S}/tests/ctf-traces/* ${D}${PTEST_PATH}/tests/ctf-traces/
# Copy the tests directory tree and the executables and
# Makefiles found within.
install -D "${B}/tests/Makefile" "${D}${PTEST_PATH}/tests/"
for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do
install -d "${D}${PTEST_PATH}/tests/$d"
find "${B}/tests/$d" -maxdepth 1 -executable -type f \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
test -r "${B}/tests/$d/Makefile" && \
install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile"
find "${B}/tests/$d" -maxdepth 1 -name *.sh \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
done
for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
done
done
install -D ${B}/formats/ctf/metadata/.libs/ctf-parser-test \
${D}${PTEST_PATH}/formats/ctf/metadata/ctf-parser-test
# Prevent attempts to update Makefiles during test runs, and
# silence "Making check in $SUBDIR" messages.
find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
sed -i \
-e '/Makefile:/,/^$/d' \
-e '/$(check_SCRIPTS)/s/^/#/' \
-e '/%: %.in/,/^$/d' \
-e '/echo "Making $$target in $$subdir"; \\/d' \
-e 's/^srcdir = \(.*\)/srcdir = ./' \
-e 's/^builddir = \(.*\)/builddir = ./' \
-e 's/^all-am:.*/all-am:/' \
{} +
# Remove path to babeltrace.
for f in $(grep -l -r "^BABELTRACE_BIN" ${D}${PTEST_PATH}); do
sed -i 's:^BABELTRACE_BIN.*:BABELTRACE_BIN=/usr/bin/babeltrace:' ${f}
done
for f in $(grep -l -r "^BTBIN" ${D}${PTEST_PATH}); do
sed -i 's:^BTBIN.*:BTBIN=/usr/bin/babeltrace:' ${f}
done
}
@@ -0,0 +1,82 @@
From 939200ef160c95c8a9d71fd80c99f42a1de0a9f0 Mon Sep 17 00:00:00 2001
From: Michael Jeanson <mjeanson@efficios.com>
Date: Tue, 7 Mar 2023 11:41:14 -0500
Subject: [PATCH 1/4] fix: mm: introduce vma->vm_flags wrapper functions (v6.3)
See upstream commit :
commit bc292ab00f6c7a661a8a605c714e8a148f629ef6
Author: Suren Baghdasaryan <surenb@google.com>
Date: Thu Jan 26 11:37:47 2023 -0800
mm: introduce vma->vm_flags wrapper functions
vm_flags are among VMA attributes which affect decisions like VMA merging
and splitting. Therefore all vm_flags modifications are performed after
taking exclusive mmap_lock to prevent vm_flags updates racing with such
operations. Introduce modifier functions for vm_flags to be used whenever
flags are updated. This way we can better check and control correct
locking behavior during these updates.
Upstream-Status: Backport
Change-Id: I2cf662420d9d7748e5e310d3ea4bac98ba7d7f94
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
include/wrapper/mm.h | 16 ++++++++++++++++
src/lib/ringbuffer/ring_buffer_mmap.c | 4 +++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/include/wrapper/mm.h b/include/wrapper/mm.h
index d3bdda66..61ac8127 100644
--- a/include/wrapper/mm.h
+++ b/include/wrapper/mm.h
@@ -13,6 +13,22 @@
#include <lttng/kernel-version.h>
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
+static inline
+void wrapper_vm_flags_set(struct vm_area_struct *vma,
+ vm_flags_t flags)
+{
+ vm_flags_set(vma, flags);
+}
+#else
+static inline
+void wrapper_vm_flags_set(struct vm_area_struct *vma,
+ vm_flags_t flags)
+{
+ vma->vm_flags |= flags;
+}
+#endif
+
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0) \
|| LTTNG_UBUNTU_KERNEL_RANGE(4,4,25,44, 4,5,0,0))
diff --git a/src/lib/ringbuffer/ring_buffer_mmap.c b/src/lib/ringbuffer/ring_buffer_mmap.c
index 25e2d8d5..d24b76a3 100644
--- a/src/lib/ringbuffer/ring_buffer_mmap.c
+++ b/src/lib/ringbuffer/ring_buffer_mmap.c
@@ -17,6 +17,8 @@
#include <ringbuffer/frontend.h>
#include <ringbuffer/vfs.h>
+#include <wrapper/mm.h>
+
/*
* fault() vm_op implementation for ring buffer file mapping.
*/
@@ -113,7 +115,7 @@ static int lib_ring_buffer_mmap_buf(struct lttng_kernel_ring_buffer *buf,
return -EINVAL;
vma->vm_ops = &lib_ring_buffer_mmap_ops;
- vma->vm_flags |= VM_DONTEXPAND;
+ wrapper_vm_flags_set(vma, VM_DONTEXPAND);
vma->vm_private_data = buf;
return 0;
--
2.34.1
@@ -0,0 +1,46 @@
From 878f89b6136ff7b870a19e04901cc6f316bbe10a Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Sat, 15 May 2021 10:26:38 -0400
Subject: [PATCH] src/Kbuild: change missing CONFIG_TRACEPOINTS to warning
Taken from a previous patch to the main lttng-modules Makefile, by
Otavio Salvador:
The lttng-modules are being pulled by the tools-profile image feature,
however, not every kernel has the CONFIG_TRACEPOINTS feature enabled.
This change makes the build do not fail when CONFIG_TRACEPOINTS is not
available, allowing it to be kept being pulled by default.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
src/Kbuild | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/Kbuild b/src/Kbuild
index 7137874..04eb5c9 100644
--- a/src/Kbuild
+++ b/src/Kbuild
@@ -2,10 +2,13 @@
ifdef CONFIG_LOCALVERSION # Check if dot-config is included.
ifeq ($(CONFIG_TRACEPOINTS),)
- $(error The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
+ $(warning The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
+ DISABLE_MODULE = y
endif # CONFIG_TRACEPOINTS
endif # ifdef CONFIG_LOCALVERSION
+ifneq ($(DISABLE_MODULE),y)
+
TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/..
lttng_check_linux_version = $(shell pwd)/include/linux/version.h
@@ -150,3 +153,5 @@ lttng-statedump-objs := lttng-statedump-impl.o
obj-$(CONFIG_LTTNG) += probes/
obj-$(CONFIG_LTTNG) += lib/
obj-$(CONFIG_LTTNG) += tests/
+
+endif # DISABLE_MODULE
@@ -0,0 +1,60 @@
From b3756eaa49a3de2f388bc269b2928a0233358fea Mon Sep 17 00:00:00 2001
From: Michael Jeanson <mjeanson@efficios.com>
Date: Tue, 7 Mar 2023 12:05:00 -0500
Subject: [PATCH 2/4] fix: uuid: Decouple guid_t and uuid_le types and
respective macros (v6.3)
See upstream commit :
commit 5e6a51787fef20b849682d8c49ec9c2beed5c373
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Tue Jan 24 15:38:38 2023 +0200
uuid: Decouple guid_t and uuid_le types and respective macros
The guid_t type and respective macros are being used internally only.
The uuid_le has its user outside the kernel. Decouple these types and
macros, and make guid_t completely internal type to the kernel.
Upstream-Status: Backport
Change-Id: I8644fd139b0630e9cf18886b84e33bffab1e5abd
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
include/lttng/events-internal.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h
index e31e6abb..a91a659e 100644
--- a/include/lttng/events-internal.h
+++ b/include/lttng/events-internal.h
@@ -9,6 +9,7 @@
#define _LTTNG_EVENTS_INTERNAL_H
#include <wrapper/compiler_attributes.h>
+#include <wrapper/uuid.h>
#include <lttng/events.h>
@@ -289,7 +290,7 @@ struct lttng_metadata_cache {
atomic_t producing; /* Metadata being produced (incomplete) */
struct kref refcount; /* Metadata cache usage */
struct list_head metadata_stream; /* Metadata stream list */
- uuid_le uuid; /* Trace session unique ID (copy) */
+ guid_t uuid; /* Trace session unique ID (copy) */
struct mutex lock; /* Produce/consume lock */
uint64_t version; /* Current version of the metadata */
};
@@ -463,7 +464,7 @@ struct lttng_kernel_session_private {
struct list_head events; /* Event list head */
struct list_head list; /* Session list */
unsigned int free_chan_id; /* Next chan ID to allocate */
- uuid_le uuid; /* Trace session unique ID */
+ guid_t uuid; /* Trace session unique ID */
struct lttng_metadata_cache *metadata_cache;
unsigned int metadata_dumped:1,
tstate:1; /* Transient enable state */
--
2.34.1
@@ -0,0 +1,116 @@
From d0eeda3f84ba1643831561a2488ca2e99e9472b1 Mon Sep 17 00:00:00 2001
From: Michael Jeanson <mjeanson@efficios.com>
Date: Tue, 7 Mar 2023 11:26:25 -0500
Subject: [PATCH 3/4] fix: btrfs: pass find_free_extent_ctl to allocator
tracepoints (v6.3)
See upstream commit :
commit cfc2de0fce015d4249c674ef9f5e0b4817ba5c53
Author: Boris Burkov <boris@bur.io>
Date: Thu Dec 15 16:06:31 2022 -0800
btrfs: pass find_free_extent_ctl to allocator tracepoints
The allocator tracepoints currently have a pile of values from ffe_ctl.
In modifying the allocator and adding more tracepoints, I found myself
adding to the already long argument list of the tracepoints. It makes it
a lot simpler to just send in the ffe_ctl itself.
Upstream-Status: Backport
Change-Id: Iab4132a9d3df3a6369591a50fb75374b1e399fa4
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
include/instrumentation/events/btrfs.h | 60 +++++++++++++++++++++++++-
1 file changed, 58 insertions(+), 2 deletions(-)
diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
index 01157107..7c7b9b0c 100644
--- a/include/instrumentation/events/btrfs.h
+++ b/include/instrumentation/events/btrfs.h
@@ -13,6 +13,10 @@
#include <../fs/btrfs/accessors.h>
#endif
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
+#include <../fs/btrfs/extent-tree.h>
+#endif
+
#ifndef _TRACE_BTRFS_DEF_
#define _TRACE_BTRFS_DEF_
struct btrfs_root;
@@ -1963,7 +1967,26 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
+
+ btrfs_find_free_extent,
+
+ TP_PROTO(const struct btrfs_root *root,
+ const struct find_free_extent_ctl *ffe_ctl),
+
+ TP_ARGS(root, ffe_ctl),
+
+ TP_FIELDS(
+ ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
+ ctf_integer(u64, root_objectid, root->root_key.objectid)
+ ctf_integer(u64, num_bytes, ffe_ctl->num_bytes)
+ ctf_integer(u64, empty_size, ffe_ctl->empty_size)
+ ctf_integer(u64, flags, ffe_ctl->flags)
+ )
+)
+
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
@@ -2102,7 +2125,40 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
)
#endif
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
+
+ TP_PROTO(const struct btrfs_block_group *block_group,
+ const struct find_free_extent_ctl *ffe_ctl),
+
+ TP_ARGS(block_group, ffe_ctl),
+
+ TP_FIELDS(
+ ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
+ ctf_integer(u64, bg_objectid, block_group->start)
+ ctf_integer(u64, flags, block_group->flags)
+ ctf_integer(u64, start, ffe_ctl->search_start)
+ ctf_integer(u64, len, ffe_ctl->num_bytes)
+ )
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
+
+ TP_PROTO(const struct btrfs_block_group *block_group,
+ const struct find_free_extent_ctl *ffe_ctl),
+
+ TP_ARGS(block_group, ffe_ctl)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
+
+ TP_PROTO(const struct btrfs_block_group *block_group,
+ const struct find_free_extent_ctl *ffe_ctl),
+
+ TP_ARGS(block_group, ffe_ctl)
+)
+
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
--
2.34.1
@@ -0,0 +1,62 @@
From 12f43cab7daceff0c73c78276b5a5b9cc1d5056f Mon Sep 17 00:00:00 2001
From: Michael Jeanson <mjeanson@efficios.com>
Date: Tue, 7 Mar 2023 11:10:26 -0500
Subject: [PATCH 4/4] fix: net: add location to trace_consume_skb() (v6.3)
See upstream commit :
commit dd1b527831a3ed659afa01b672d8e1f7e6ca95a5
Author: Eric Dumazet <edumazet@google.com>
Date: Thu Feb 16 15:47:18 2023 +0000
net: add location to trace_consume_skb()
kfree_skb() includes the location, it makes sense
to add it to consume_skb() as well.
Upstream-Status: Backport
Change-Id: I8d871187d90e7fe113a63e209b00aebe0df475f3
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
include/instrumentation/events/skb.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/instrumentation/events/skb.h b/include/instrumentation/events/skb.h
index 186732ea..3c43f32d 100644
--- a/include/instrumentation/events/skb.h
+++ b/include/instrumentation/events/skb.h
@@ -61,6 +61,21 @@ LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb,
)
#endif
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
+LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
+
+ skb_consume,
+
+ TP_PROTO(struct sk_buff *skb, void *location),
+
+ TP_ARGS(skb, location),
+
+ TP_FIELDS(
+ ctf_integer_hex(void *, skbaddr, skb)
+ ctf_integer_hex(void *, location, location)
+ )
+)
+#else
LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
skb_consume,
@@ -73,6 +88,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
ctf_integer_hex(void *, skbaddr, skb)
)
)
+#endif
LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
--
2.34.1
@@ -0,0 +1,76 @@
From 82fbf9d383ff9069808fb0f5f75c660098dbae52 Mon Sep 17 00:00:00 2001
From: Michael Jeanson <mjeanson@efficios.com>
Date: Tue, 5 Apr 2022 14:57:41 -0400
Subject: [PATCH 09/10] Rename genhd wrapper to blkdev
The genhd.h header was folded into blkdev.h in v5.18, rename our wrapper
to follow upstream.
Upstream-Status: Backport
Change-Id: I4ec94fb94d11712dd20f0680aea1de77fbfa9d17
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
include/wrapper/{genhd.h => blkdev.h} | 10 +++++-----
src/lttng-statedump-impl.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
rename include/wrapper/{genhd.h => blkdev.h} (93%)
diff --git a/include/wrapper/genhd.h b/include/wrapper/blkdev.h
similarity index 93%
rename from include/wrapper/genhd.h
rename to include/wrapper/blkdev.h
index 4a59b68e..0d5ad90f 100644
--- a/include/wrapper/genhd.h
+++ b/include/wrapper/blkdev.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
*
- * wrapper/genhd.h
+ * wrapper/blkdev.h
*
* wrapper around block layer functions and data structures. Using
* KALLSYMS to get its address when available, else we need to have a
@@ -9,8 +9,8 @@
* Copyright (C) 2011-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*/
-#ifndef _LTTNG_WRAPPER_GENHD_H
-#define _LTTNG_WRAPPER_GENHD_H
+#ifndef _LTTNG_WRAPPER_BLKDEV_H
+#define _LTTNG_WRAPPER_BLKDEV_H
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
#include <linux/blkdev.h>
@@ -45,7 +45,7 @@ struct class *wrapper_get_block_class(void)
/*
* Canary function to check for 'block_class' at compile time.
*
- * From 'include/linux/genhd.h':
+ * From 'include/linux/blkdev.h':
*
* extern struct class block_class;
*/
@@ -104,4 +104,4 @@ struct device_type *wrapper_get_disk_type(void)
#endif
-#endif /* _LTTNG_WRAPPER_GENHD_H */
+#endif /* _LTTNG_WRAPPER_BLKDEV_H */
diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c
index 4d7b2921..0e753090 100644
--- a/src/lttng-statedump-impl.c
+++ b/src/lttng-statedump-impl.c
@@ -41,7 +41,7 @@
#include <wrapper/namespace.h>
#include <wrapper/irq.h>
#include <wrapper/tracepoint.h>
-#include <wrapper/genhd.h>
+#include <wrapper/blkdev.h>
#include <wrapper/file.h>
#include <wrapper/fdtable.h>
#include <wrapper/sched.h>
--
2.19.1
@@ -0,0 +1,46 @@
SECTION = "devel"
SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
HOMEPAGE = "https://lttng.org/"
LICENSE = "LGPL-2.1-only & GPL-2.0-only & MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4"
inherit module
include lttng-platforms.inc
SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
file://0009-Rename-genhd-wrapper-to-blkdev.patch \
file://0001-fix-mm-introduce-vma-vm_flags-wrapper-functions-v6.3.patch \
file://0002-fix-uuid-Decouple-guid_t-and-uuid_le-types-and-respe.patch \
file://0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch \
file://0004-fix-net-add-location-to-trace_consume_skb-v6.3.patch \
"
# Use :append here so that the patch is applied also when using devupstream
SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
SRC_URI[sha256sum] = "bf808b113544287cfe837a6382887fa66354ef5cc8216460cebbef3d27dc3581"
export INSTALL_MOD_DIR="kernel/lttng-modules"
EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
MODULES_MODULE_SYMVERS_LOCATION = "src"
do_install:append() {
# Delete empty directories to avoid QA failures if no modules were built
if [ -d ${D}/${nonarch_base_libdir} ]; then
find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
fi
}
python do_package:prepend() {
if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')):
bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
}
BBCLASSEXTEND = "devupstream:target"
SRC_URI:class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.13;protocol=https"
SRCREV:class-devupstream = "7584cfc04914cb0842a986e9808686858b9c8630"
SRCREV_FORMAT ?= "lttng_git"
@@ -0,0 +1,21 @@
#
# Whether the platform supports kernel tracing
#
LTTNGMODULES = "lttng-modules"
LTTNGMODULES:arc = ""
LTTNGMODULES:riscv64 = ""
COMPATIBLE_HOST:riscv64:pn-lttng-modules = "null"
COMPATIBLE_HOST:arc:pn-lttng-modules = "null"
# Whether the platform supports userspace tracing
# lttng-ust uses sched_getcpu() which is not there on for some platforms.
LTTNGUST = "lttng-ust"
LTTNGUST:arc = ""
COMPATIBLE_HOST:arc:pn-lttng-ust = "null"
# Whether the platform supports lttng-tools
# lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on riscv32.
# It's also turned off for riscv32 in meta-riscv. See https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf
COMPATIBLE_HOST:riscv32:pn-lttng-tools = "null"
@@ -0,0 +1,74 @@
From 74b3844737b03492756b4f896c938b504b069f14 Mon Sep 17 00:00:00 2001
From: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Date: Tue, 17 Jan 2023 16:57:35 -0500
Subject: [PATCH] compat: off64_t is not defined by musl
This helps compile with latest musl, where off64_t is not defined unless
_LARGEFILE64_SOURCE is defined. On glibc, _LARGEFILE64_SOURCE is defined
if _GNU_SOURCE is defined, so the problem is only seen with musl.
Since the project uses AC_SYS_LARGEFILE, which from the autoconf doc:
"arrange for 64-bit file offsets, known as large-file support."
As such, it is safe to assume off_t is 64-bit wide. This is checked by a
static_assert to catch any platform where autoconf would let a 32-bit
off_t slip.
Upstream-Status: Submitted [https://review.lttng.org/c/lttng-tools/+/9268]
Reported-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: If2c6007a8c85bc3f3065002af8a7538b882fb4a8
---
--- a/src/common/compat/compat-fcntl.c
+++ b/src/common/compat/compat-fcntl.c
@@ -8,14 +8,17 @@
#define _LGPL_SOURCE
#include <common/compat/fcntl.h>
#include <common/macros.h>
+#include <common/bug.h>
+#include <stdint.h>
#include <unistd.h>
#ifdef __linux__
LTTNG_HIDDEN
-int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
+int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
unsigned int flags)
{
+ LTTNG_BUILD_BUG_ON(sizeof(off_t) != sizeof(int64_t));
#ifdef HAVE_SYNC_FILE_RANGE
return sync_file_range(fd, offset, nbytes, flags);
#else
--- a/src/common/compat/fcntl.h
+++ b/src/common/compat/fcntl.h
@@ -13,16 +13,12 @@
#include <common/compat/errno.h>
-#if (defined(__CYGWIN__))
-typedef long long off64_t;
-#endif
-
#if (defined(__FreeBSD__) || defined(__sun__))
typedef off64_t loff_t;
#endif
#ifdef __linux__
-extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
+extern int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
unsigned int flags);
#define lttng_sync_file_range(fd, offset, nbytes, flags) \
compat_sync_file_range(fd, offset, nbytes, flags)
@@ -37,8 +33,8 @@ extern int compat_sync_file_range(int fd
#define SYNC_FILE_RANGE_WAIT_BEFORE 0
#define SYNC_FILE_RANGE_WRITE 0
-static inline int lttng_sync_file_range(int fd, off64_t offset,
- off64_t nbytes, unsigned int flags)
+static inline int lttng_sync_file_range(int fd, off_t offset,
+ off_t nbytes, unsigned int flags)
{
return -ENOSYS;
}
@@ -0,0 +1,27 @@
From ab238c213fac190972f55e73cf3e0bb1c7846eb8 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 12 Dec 2019 16:52:07 +0100
Subject: [PATCH] tests: do not strip a helper library
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
tests/utils/testapp/userspace-probe-elf-binary/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
index 03f5d5a..d12c343 100644
--- a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
+++ b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
@@ -12,7 +12,7 @@ userspace_probe_elf_binary_LDADD = libfoo.la
libfoo.strip: libfoo.la
$(OBJCOPY) --strip-all .libs/libfoo.so
-all-local: libfoo.strip
+all-local:
@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
for script in $(EXTRA_DIST); do \
cp -f $(srcdir)/$$script $(builddir); \
--
2.17.1
@@ -0,0 +1,48 @@
From 40b2a4a793c81221a28f822d07135069456ea021 Mon Sep 17 00:00:00 2001
From: Olivier Dion <odion@efficios.com>
Date: Fri, 10 Mar 2023 13:17:46 -0500
Subject: [PATCH] Tests: fix: parse-callback reports missing addr2line
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Upstream-Status: Backport
addr2line from binutils is required for this script to work correctly.
However, it silently fails. Fix this by using `subprocess.run' with
`check=True' instead of `subprocess.getoutput'. That way, an exception
is raised if an error occurs.
Fix the shebang by not assuming where python is installed while at it.
Change-Id: I5157b3dbccf6bfbe08a6b6840b38f5db9010fe96
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
---
tests/utils/parse-callstack.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py
index 3bfddd9ef..c3f0e2e9b 100755
--- a/tests/utils/parse-callstack.py
+++ b/tests/utils/parse-callstack.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
#
# Copyright (C) 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
#
@@ -24,7 +24,9 @@ def addr2line(executable, addr):
# Expand inlined functions
cmd += ['--addresses', addr]
- addr2line_output = subprocess.getoutput(' '.join(cmd))
+ status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
+
+ addr2line_output = status.stdout.decode("utf-8")
# Omit the last 2 lines as the caller of main can not be determine
fcts = [addr2line_output.split()[-2]]
--
2.34.1
@@ -0,0 +1,34 @@
Upstream-Status: Inappropriate [need to root cause the test hangs]
We keep seeing hangs in the tools/notifications tests on x86 and arm for
a variety of distros. Exclude them for now to work out if this is the
only place we see them and give SWAT/triage a break from the stream
of them.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14263
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Index: lttng-tools-2.13.1/tests/regression/Makefile.am
===================================================================
--- lttng-tools-2.13.1.orig/tests/regression/Makefile.am
+++ lttng-tools-2.13.1/tests/regression/Makefile.am
@@ -29,18 +29,6 @@ TESTS = tools/base-path/test_ust \
tools/crash/test_crash \
tools/regen-metadata/test_ust \
tools/regen-statedump/test_ust \
- tools/notification/test_notification_ust_error \
- tools/notification/test_notification_ust_buffer_usage \
- tools/notification/test_notification_ust_capture \
- tools/notification/test_notification_ust_event_rule_condition_exclusion \
- tools/notification/test_notification_kernel_error \
- tools/notification/test_notification_kernel_buffer_usage \
- tools/notification/test_notification_kernel_capture \
- tools/notification/test_notification_kernel_instrumentation \
- tools/notification/test_notification_kernel_syscall \
- tools/notification/test_notification_notifier_discarded_count \
- tools/notification/test_notification_kernel_userspace_probe \
- tools/notification/test_notification_multi_app \
tools/rotation/test_ust \
tools/rotation/test_kernel \
tools/rotation/test_save_load_mi \
@@ -0,0 +1,107 @@
From 844be4dc46deeec83199da80e9e2a6058e9f5a53 Mon Sep 17 00:00:00 2001
From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
<jeremie.galarneau@efficios.com>
Date: Thu, 25 May 2023 19:15:20 -0400
Subject: [PATCH] Tests fix: test_callstack: output of addr2line incorrectly
parsed
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Upstream-Status: Backport
Issue observed
--------------
The test_callstack test fails with GCC 13.1 with the following output:
Traceback (most recent call last):
File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 160, in <module>
main()
File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 155, in main
raise Exception('Expected function name not found in recorded callstack')
Exception: Expected function name not found in recorded callstack
ok 10 - Destroy session callstack
PASS: kernel/test_callstack 10 - Destroy session callstack
not ok 11 - Validate userspace callstack
FAIL: kernel/test_callstack 11 - Validate userspace callstack
Cause
-----
parse-callstack.py uses 'split()' to split the lines of addr2line's
output. By default, 'split()' splits a string on any whitespace.
Typically this was fine as addr2line's output doesn't contain spaces and
the function then splits on new lines.
Typical output of addr2line:
$ addr2line -e ./tests/regression/kernel//../../utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack --functions --addresses 0x40124B
0x000000000040124b
my_gettid
/tmp/test-callstack-master/src/lttng-tools/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c:40
However, with the test app compiled using gcc 13.1, a "discriminator"
annotation is present:
0x0000000000401279
fct_b
/tmp/test-callstack-master/src/lttng-tools/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c:58 (discriminator 1)
Hence, by selecting the second to last element (-2, with negative
indexing), the addr2line function returns '(discriminator' as the
function name.
Solution
--------
The parsing code is changed to simply iterate on groups of 3 lines,
following addr2line's output format.
Fixes #1377
Change-Id: I8c1eab97e84ca7cad171904bed6660540061cf08
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
---
tests/utils/parse-callstack.py | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py
index c3f0e2e9bc..029100b618 100755
--- a/tests/utils/parse-callstack.py
+++ b/tests/utils/parse-callstack.py
@@ -26,14 +26,23 @@ def addr2line(executable, addr):
status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
- addr2line_output = status.stdout.decode("utf-8")
-
- # Omit the last 2 lines as the caller of main can not be determine
- fcts = [addr2line_output.split()[-2]]
-
- fcts = [ f for f in fcts if '??' not in f]
-
- return fcts
+ addr2line_output = status.stdout.decode("utf-8").splitlines()
+ # addr2line's output is made of 3-tuples:
+ # - address
+ # - function name
+ # - source location
+ if len(addr2line_output) % 3 != 0:
+ raise Exception('Unexpected addr2line output:\n\t{}'.format('\n\t'.join(addr2line_output)))
+
+ function_names = []
+ for address_line_number in range(0, len(addr2line_output), 3):
+ function_name = addr2line_output[address_line_number + 1]
+
+ # Filter-out unresolved functions
+ if "??" not in function_name:
+ function_names.append(addr2line_output[address_line_number + 1])
+
+ return function_names
def extract_user_func_names(executable, raw_callstack):
"""
--
2.34.1
@@ -0,0 +1,9 @@
[Unit]
Description=LTTng 2.x central tracing registry session daemon
[Service]
Type=forking
ExecStart=/usr/bin/lttng-sessiond -d
[Install]
WantedBy=multi-user.target
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
# Without --ignore-exit, the tap harness causes any FAILs within a
# test plan to raise ERRORs; this is just noise.
export LD_LIBRARY_PATH=FIXMEPTESTPATH/tests/utils/testapp/userspace-probe-elf-binary/.libs
makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=FIXMEPTESTPATH top_builddir=FIXMEPTESTPATH"
make -k -t all >error.log 2>&1
# Can specify a test e.g.:
# -C tests/regression/ check TESTS='kernel/test_callstack'
make -k -s $makeargs check 2>error.log | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g'
exitcode=$?
if [ -e error.log ]; then
cat error.log
fi
if [ -e tests/unit/test-suite.log ]; then
cat tests/unit/test-suite.log
fi
if [ -e tests/regression/test-suite.log ]; then
cat tests/regression/test-suite.log
fi
exit $exitcode
@@ -0,0 +1,197 @@
SECTION = "devel"
SUMMARY = "Linux Trace Toolkit Control"
DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
to extract program execution details from the Linux operating system \
and interpret them."
HOMEPAGE = "https://github.com/lttng/lttng-tools"
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=40ef17463fbd6f377db3c47b1cbaded8 \
file://LICENSES/GPL-2.0;md5=e68f69a54b44ba526ad7cb963e18fbce \
file://LICENSES/LGPL-2.1;md5=9920968d0f2ff585ce61fae30344dd95"
include lttng-platforms.inc
DEPENDS = "liburcu popt libxml2 util-linux bison-native"
RDEPENDS:${PN} = "libgcc"
RRECOMMENDS:${PN} += "${LTTNGMODULES}"
RDEPENDS:${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core grep binutils"
RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils"
RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils"
# babelstats.pl wants getopt-long
RDEPENDS:${PN}-ptest += "perl-module-getopt-long"
PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
"
PACKAGECONFIG ??= "${LTTNGUST} kmod"
PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod"
PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
file://0001-tests-do-not-strip-a-helper-library.patch \
file://run-ptest \
file://lttng-sessiond.service \
file://disable-tests.patch \
file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \
file://40b2a4a793c81221a28f822d07135069456ea021.patch \
file://gcc13-ptest-fix.patch \
"
SRC_URI[sha256sum] = "8d94dc95b608cf70216b01203a3f8242b97a232db2e23421a2f43708da08f337"
inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
CACHED_CONFIGUREVARS = "PGREP=/usr/bin/pgrep"
SYSTEMD_SERVICE:${PN} = "lttng-sessiond.service"
SYSTEMD_AUTO_ENABLE = "disable"
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM:${PN} = "tracing"
FILES:${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
${PYTHON_SITEPACKAGES_DIR}/*"
FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
# Since files are installed into ${libdir}/lttng/libexec we match
# the libexec insane test so skip it.
# Python module needs to keep _lttng.so
INSANE_SKIP:${PN} = "libexec dev-so"
INSANE_SKIP:${PN}-dbg = "libexec"
PRIVATE_LIBS:${PN}-ptest = "libfoo.so"
do_install:append () {
# install systemd unit file
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_system_unitdir}
}
do_install_ptest () {
for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/*.lttng \
tests/regression/tools/save-load/configuration/load-42*.lttng tests/regression/tools/health/test_health.sh \
tests/regression/tools/metadata/utils.sh tests/regression/tools/rotation/rotate_utils.sh \
tests/regression/tools/notification/util_event_generator.sh \
tests/regression/tools/base-path/*.lttng; do
install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
done
for f in tests/utils/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-4.1.xsd; do
install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
done
# Patch in the correct path for the custom libraries a helper executable needs
sed -i -e 's!FIXMEPTESTPATH!${PTEST_PATH}!g' "${D}${PTEST_PATH}/run-ptest"
# Prevent 'make check' from recursing into non-test subdirectories.
sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile"
# We don't need these
sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile"
# We shouldn't need to build anything in tests/utils
sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \
"${D}${PTEST_PATH}/tests/Makefile"
# Copy the tests directory tree and the executables and
# Makefiles found within.
for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do
install -d "${D}${PTEST_PATH}/tests/$d"
find "${B}/tests/$d" -maxdepth 1 -executable -type f \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
# Take all .py scripts for tests using the python bindings.
find "${B}/tests/$d" -maxdepth 1 -type f -name "*.py" \
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
test -r "${B}/tests/$d/Makefile" && \
install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile"
done
for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
case $f in
*.so|userspace-probe-elf-*)
install -d ${D}${PTEST_PATH}/tests/$d/
ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f
# Remove any rpath/runpath to pass QA check.
chrpath --delete ${D}${PTEST_PATH}/tests/$d/$f
;;
esac
done
done
chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary
chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary
chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libbar.so
chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libfoo.so
#
# Use the versioned libs of liblttng-ust-dl.
#
ustdl="${D}${PTEST_PATH}/tests/regression/ust/ust-dl/test_ust-dl.py"
if [ -e $ustdl ]; then
sed -i -e 's!:liblttng-ust-dl.so!:liblttng-ust-dl.so.0!' $ustdl
fi
install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/
# We shouldn't need to build anything in tests/regression/tools
sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \
"${D}${PTEST_PATH}/tests/regression/Makefile"
# Prevent attempts to update Makefiles during test runs, and
# silence "Making check in $SUBDIR" messages.
find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
-e '/echo "Making $$target in $$subdir"; \\/d' \
-e 's/^srcdir = \(.*\)/srcdir = ./' \
-e 's/^builddir = \(.*\)/builddir = ./' \
-e 's/^all-am:.*/all-am:/' \
{} +
find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
touch -r "${B}/Makefile" {} +
#
# Need to stop generated binaries from rebuilding by removing their source dependencies
#
sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \
-e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \
-e 's#\(^test.*SOURCES.=\)#disable\1#g' \
-e 's#\(^test.*LDADD.=\)#disable\1#g' \
-i ${D}${PTEST_PATH}/tests/unit/Makefile
# Fix hardcoded build path
sed -e 's#TESTAPP_PATH=.*/tests/regression/#TESTAPP_PATH="${PTEST_PATH}/tests/regression/#' \
-i ${D}${PTEST_PATH}/tests/regression/ust/python-logging/test_python_logging
# Substitute links to installed binaries.
for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd lttng-crash; do
exedir="${D}${PTEST_PATH}/src/bin/${prog}"
install -d "$exedir"
case "$prog" in
lttng-consumerd)
ln -s "${libdir}/lttng/libexec/$prog" "$exedir"
;;
*)
ln -s "${bindir}/$prog" "$exedir"
;;
esac
done
}
INHIBIT_PACKAGE_STRIP_FILES = "\
${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary \
${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/.libs/userspace-probe-elf-binary \
${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary \
${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/.libs/userspace-probe-elf-cxx-binary \
${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/gen-syscall-events \
${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/.libs/gen-syscall-events \
${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack \
${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/.libs/gen-syscall-events-callstack \
"
@@ -0,0 +1,35 @@
From 06279f50e924d1d55b43eb3b299f6633ecb1f7a4 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Wed, 22 Sep 2021 16:33:10 +0800
Subject: [PATCH] Makefile.am: update rpath link
since commit 6339062 Move liblttng-ust to 'src/lib/',
liblttng-ust.so/liblttng-ust-common.so/liblttng-ust-tracepoint.so
's location changed from one dir to multiple dirs. which make below
error:
ld: warning: liblttng-ust-common.so.1, needed by ../../../src/lib/lttng-ust/.libs/liblttng-ust.so, not found (try using -rpath or -rpath-link)
ld: warning: liblttng-ust-tracepoint.so.1, needed by ../../../src/lib/lttng-ust/.libs/liblttng-ust.so, not found (try using -rpath or -rpath-link)
Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/61]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
doc/examples/Makefile.am | 2 +-
1 file changed, 1 insertions(+), 1 deletions(-)
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 8ee0564..20d246c 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -142,7 +142,7 @@ all-local:
CFLAGS='$(CFLAGS)' \
AM_CFLAGS='$(AM_CFLAGS)' \
LDFLAGS="$(LDFLAGS)" \
- AM_LDFLAGS='$(AM_LDFLAGS) -L../../../src/lib/lttng-ust/.libs -Wl,-rpath="$(PWD)/../../src/lib/lttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../src/lib/lttng-ust/.libs/"' \
+ AM_LDFLAGS='$(AM_LDFLAGS) -L../../../src/lib/lttng-ust/.libs -Wl,-rpath="$(PWD)/../../src/lib/lttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../src/lib/lttng-ust/.libs/:$(PWD)/../../src/lib/lttng-ust-tracepoint/.libs:$(PWD)/../../src/lib/lttng-ust-common/.libs/"' \
LTTNG_GEN_TP_PATH="$$rel_src_subdir$(top_srcdir)/tools/" \
AM_V_P="$(AM_V_P)" \
AM_V_at="$(AM_V_at)" \
--
2.17.1
@@ -0,0 +1,25 @@
From 2058584b7e87d6bd9d1765577766e0df7752232c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Sun, 5 Sep 2021 10:44:19 +0200
Subject: [PATCH] lttng-ust-common: link with liburcu explicitly
Otherwise linking errors are seen on x86-32.
Upstream-Status: Submitted [by email to lttng-dev, Francis, Jonathan]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
src/lib/lttng-ust-common/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lib/lttng-ust-common/Makefile.am b/src/lib/lttng-ust-common/Makefile.am
index caeea2b..30febf0 100644
--- a/src/lib/lttng-ust-common/Makefile.am
+++ b/src/lib/lttng-ust-common/Makefile.am
@@ -15,6 +15,7 @@ liblttng_ust_common_la_SOURCES = \
liblttng_ust_common_la_LIBADD = \
$(top_builddir)/src/common/libcommon.la \
+ $(URCU_LIBS) \
$(DL_LIBS)
liblttng_ust_common_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
@@ -0,0 +1,29 @@
From dd1fdc841d069dbd4e284f430a88af79de951124 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Thu, 26 Sep 2019 17:54:00 +0800
Subject: [PATCH] python-lttngust/Makefile.am: Add --install-lib to setup.py
Otherwise it may install to /usr/lib, but should be /usr/lib64 when cross
building.
Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/59]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
src/python-lttngust/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/python-lttngust/Makefile.am b/src/python-lttngust/Makefile.am
index f95482d..f76d95b 100644
--- a/src/python-lttngust/Makefile.am
+++ b/src/python-lttngust/Makefile.am
@@ -32,7 +32,7 @@ install-exec-local: build-python-bindings.stamp
if [ "$(DESTDIR)" != "" ]; then \
opts="$$opts --root=$(DESTDIR)"; \
fi; \
- $(PYTHON) $(builddir)/setup.py install $$opts;
+ $(PYTHON) $(builddir)/setup.py install $$opts --install-lib=$(pythondir);
clean-local:
rm -rf $(builddir)/build
@@ -0,0 +1,53 @@
SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x"
DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes."
HOMEPAGE = "http://lttng.org/ust"
BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust"
LICENSE = "LGPL-2.1-or-later & MIT & GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a46577a38ad0c36ff6ff43ccf40c480f"
PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
"
inherit autotools lib_package manpages python3native pkgconfig
include lttng-platforms.inc
EXTRA_OECONF = "--disable-numa"
CPPFLAGS:append:arm = "${@oe.utils.vartrue('DEBUG_BUILD', '-DUATOMIC_NO_LINK_ERROR', '', d)}"
DEPENDS = "liburcu util-linux"
RDEPENDS:${PN}-bin = "python3-core"
# For backwards compatibility after rename
RPROVIDES:${PN} = "lttng2-ust"
RREPLACES:${PN} = "lttng2-ust"
RCONFLICTS:${PN} = "lttng2-ust"
PE = "2"
SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \
file://0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch \
file://0001-lttng-ust-common-link-with-liburcu-explicitly.patch \
file://0001-Makefile.am-update-rpath-link.patch \
"
SRC_URI[sha256sum] = "e7e04596dd73ac7aa99e27cd000f949dbb0fed51bd29099f9b08a25c1df0ced5"
CVE_PRODUCT = "ust"
PACKAGECONFIG[examples] = "--enable-examples, --disable-examples,"
PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
PACKAGECONFIG[python3-agent] = "--enable-python-agent ${PYTHON_OPTION}, --disable-python-agent, python3, python3"
FILES:${PN} += " ${PYTHON_SITEPACKAGES_DIR}/*"
FILES:${PN}-staticdev += " ${PYTHON_SITEPACKAGES_DIR}/*.a"
FILES:${PN}-dev += " ${PYTHON_SITEPACKAGES_DIR}/*.la"
do_install:append() {
# Patch python tools to use Python 3; they should be source compatible, but
# still refer to Python 2 in the shebang
sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/lttng-gen-tp
}
@@ -0,0 +1,35 @@
SUMMARY = "Build tools needed by external modules"
HOMEPAGE = "https://www.yoctoproject.org/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
inherit kernel-arch linux-kernel-base
inherit pkgconfig
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}"
do_configure[depends] += "virtual/kernel:do_shared_workdir openssl-native:do_populate_sysroot"
do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
DEV_PKG_DEPENDENCY = ""
DEPENDS += "bc-native bison-native"
DEPENDS += "gmp-native"
EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
# Build some host tools under work-shared. CC, LD, and AR are probably
# not used, but this is the historical way of invoking "make scripts".
#
do_configure() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
for t in prepare scripts_basic scripts; do
oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \
STRIP="${KERNEL_STRIP}" \
-C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} $t
done
}
@@ -0,0 +1,59 @@
#!/bin/sh
#
# SPDX-License-Identifier: MIT
#
### BEGIN INIT INFO
# Provides: module-init-tools
# Required-Start:
# Required-Stop:
# Should-Start: checkroot
# Should-stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Process /etc/modules.
# Description: Load the modules listed in /etc/modules.
### END INIT INFO
LOAD_MODULE=modprobe
[ -f /proc/modules ] || exit 0
[ -d /lib/modules/`uname -r` ] || exit 0
# Test if modules.dep exists and has a size greater than zero
if [ ! -s /lib/modules/`uname -r`/modules.dep ]; then
[ "$VERBOSE" != no ] && echo "Calculating module dependencies ..."
depmod -a
fi
[ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0
[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
loaded_modules=" "
process_file() {
file=$1
(cat $file; echo; ) |
while read module args
do
case "$module" in
\#*|"") continue ;;
esac
[ -n "$(echo $loaded_modules | grep " $module ")" ] && continue
[ "$VERBOSE" != no ] && echo -n "$module "
eval "$LOAD_MODULE $module $args >/dev/null 2>&1"
loaded_modules="${loaded_modules}${module} "
done
}
[ "$VERBOSE" != no ] && echo -n "Loading modules: "
[ -f /etc/modules ] && process_file /etc/modules
[ -d /etc/modules-load.d ] || exit 0
for f in /etc/modules-load.d/*.conf; do
process_file $f
done
[ "$VERBOSE" != no ] && echo
exit 0
@@ -0,0 +1,32 @@
SUMMARY = "Initscript for auto-loading kernel modules on boot"
SECTION = "base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://modutils.sh;beginline=3;endline=3;md5=b2dccaa94b3629a08bfb4f983cad6f89"
SRC_URI = "file://modutils.sh"
PR = "r7"
S = "${WORKDIR}"
INITSCRIPT_NAME = "modutils.sh"
INITSCRIPT_PARAMS = "start 06 S ."
inherit update-rc.d
do_compile () {
}
do_install () {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
}
PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
pkg_postinst:${PN} () {
if type systemctl >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPTS="--root=$D"
fi
systemctl $OPTS mask modutils.service
fi
}
@@ -0,0 +1,7 @@
inherit perlnative cpan-base
# Env var which tells perl if it should use host (no) or target (yes) settings
export PERLCONFIGTARGET = "${@is_target(d)}"
export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+392
View File
@@ -0,0 +1,392 @@
SUMMARY = "Performance analysis tools for Linux"
DESCRIPTION = "Performance counters for Linux are a new kernel-based \
subsystem that provide a framework for all things \
performance analysis. It covers hardware level \
(CPU/PMU, Performance Monitoring Unit) features \
and software features (software counters, tracepoints) \
as well."
HOMEPAGE = "https://perf.wiki.kernel.org/index.php/Main_Page"
LICENSE = "GPL-2.0-only"
PR = "r9"
PACKAGECONFIG ??= "scripting tui libunwind libtraceevent"
PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3 python3-setuptools-native"
# gui support was added with kernel 3.6.35
# since 3.10 libnewt was replaced by slang
# to cover a wide range of kernel we add both dependencies
PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang"
PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind"
PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1"
PACKAGECONFIG[bfd] = ",NO_LIBBFD=1"
PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap"
PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
# libaudit support would need scripting to be enabled
PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native"
PACKAGECONFIG[cap] = ",,libcap"
PACKAGECONFIG[libtraceevent] = ",NO_LIBTRACEEVENT=1,libtraceevent"
# Arm CoreSight
PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd"
# libunwind is not yet ported for some architectures
PACKAGECONFIG:remove:arc = "libunwind"
PACKAGECONFIG:remove:riscv32 = "libunwind"
DEPENDS = " \
virtual/${MLPREFIX}libc \
${MLPREFIX}elfutils \
${MLPREFIX}binutils \
bison-native flex-native xz \
"
do_configure[depends] += "virtual/kernel:do_shared_workdir"
PROVIDES = "virtual/perf"
inherit linux-kernel-base kernel-arch manpages
# needed for building the tools/perf Python bindings
inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'python3targetconfig', '', d)}
inherit python3-dir
export PYTHON_SITEPACKAGES_DIR
#kernel 3.1+ supports WERROR to disable warnings as errors
export WERROR = "0"
do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
# needed for building the tools/perf Perl binding
include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', '', d)}
inherit kernelsrc
S = "${WORKDIR}/${BP}"
SPDX_S = "${S}/tools/perf"
# The LDFLAGS is required or some old kernels fails due missing
# symbols and this is preferred than requiring patches to every old
# supported kernel.
LDFLAGS="-ldl -lutil"
EXTRA_OEMAKE = '\
V=1 \
-C ${S}/tools/perf \
O=${B} \
CROSS_COMPILE=${TARGET_PREFIX} \
ARCH=${ARCH} \
CC="${CC}" \
CCLD="${CC}" \
LDSHARED="${CC} -shared" \
AR="${AR}" \
LD="${LD}" \
EXTRA_CFLAGS="-ldw -I${S}" \
YFLAGS='-y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' \
EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \
perfexecdir=${libexecdir} \
NO_GTK2=1 \
${PACKAGECONFIG_CONFARGS} \
PKG_CONFIG=pkg-config \
TMPDIR="${B}" \
LIBUNWIND_DIR=${STAGING_EXECPREFIXDIR} \
'
EXTRA_OEMAKE += "\
'DESTDIR=${D}' \
'prefix=${prefix}' \
'bindir=${bindir}' \
'sharedir=${datadir}' \
'sysconfdir=${sysconfdir}' \
'perfexecdir=${libexecdir}/perf-core' \
'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \
'sharedir=${@os.path.relpath(datadir, prefix)}' \
'mandir=${@os.path.relpath(mandir, prefix)}' \
'infodir=${@os.path.relpath(infodir, prefix)}' \
${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \
"
# During do_configure, we might run a 'make clean'. That often breaks
# when done in parallel, so disable parallelism for do_configure. Note
# that it has to be done this way rather than by passing -j1, since
# perf's build system by default ignores any -j argument, but does
# honour a JOBS variable.
EXTRA_OEMAKE:append:task-configure = " JOBS=1"
PERF_SRC ?= "Makefile \
tools/arch \
tools/build \
tools/include \
tools/lib \
tools/Makefile \
tools/perf \
tools/scripts \
scripts/ \
arch/${ARCH}/Makefile \
"
PERF_EXTRA_LDFLAGS = ""
# MIPS N32/N64
PERF_EXTRA_LDFLAGS:mipsarchn32eb = "-m elf32btsmipn32"
PERF_EXTRA_LDFLAGS:mipsarchn32el = "-m elf32ltsmipn32"
PERF_EXTRA_LDFLAGS:mipsarchn64eb = "-m elf64btsmip"
PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip"
do_compile() {
# Linux kernel build system is expected to do the right thing
unset CFLAGS
test -e ${S}/tools/lib/traceevent/plugins/Makefile && \
sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile
test -e ${S}/tools/perf/Makefile.config && \
sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/perf/Makefile.config
oe_runmake all
}
do_install() {
# Linux kernel build system is expected to do the right thing
unset CFLAGS
oe_runmake install
# we are checking for this make target to be compatible with older perf versions
if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
oe_runmake DESTDIR=${D} install-python_ext
if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; then
sed -i -e 's#${WORKDIR}##g' ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt
fi
fi
}
do_configure[prefuncs] += "copy_perf_source_from_kernel"
python copy_perf_source_from_kernel() {
sources = (d.getVar("PERF_SRC") or "").split()
src_dir = d.getVar("STAGING_KERNEL_DIR")
dest_dir = d.getVar("S")
bb.utils.mkdirhier(dest_dir)
bb.utils.prunedir(dest_dir)
for s in sources:
src = oe.path.join(src_dir, s)
dest = oe.path.join(dest_dir, s)
if not os.path.exists(src):
bb.fatal("Path does not exist: %s. Maybe PERF_SRC does not match the kernel version." % src)
if os.path.isdir(src):
oe.path.copyhardlinktree(src, dest)
else:
src_path = os.path.dirname(s)
os.makedirs(os.path.join(dest_dir,src_path),exist_ok=True)
bb.utils.copyfile(src, dest)
}
do_configure:prepend () {
# If building a multlib based perf, the incorrect library path will be
# detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
# build, with a 64 bit multilib, the arch won't match and the detection of a
# 64 bit build (and library) are not exected. To ensure that libraries are
# installed to the correct location, we can use the weak assignment in the
# config/Makefile.
#
# Also need to relocate .config-detected to $(OUTPUT)/config-detected
# for kernel sources that do not already do this
# as two builds (e.g. perf and lib32-perf from mutlilib can conflict
# with each other if its in the shared source directory
#
if [ -e "${S}/tools/perf/config/Makefile" ]; then
perfconfig="${S}/tools/perf/config/Makefile"
fi
if [ -e "${S}/tools/perf/Makefile.config" ]; then
perfconfig="${S}/tools/perf/Makefile.config"
fi
if [ -n "${perfconfig}" ]; then
# Match $(prefix)/$(lib) and $(prefix)/lib
sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
-e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \
-e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
${perfconfig}
fi
# The man pages installation is "$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)"
# in ${S}/tools/perf/Documentation/Makefile, if the mandir set to '?=', it
# will use the relative path 'share/man', in the way it will resulting in
# incorrect installation for man pages.
if [ -e "${S}/tools/perf/Documentation/Makefile" ]; then
sed -i 's,^mandir?=,mandir:=,' ${S}/tools/perf/Documentation/Makefile
fi
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
${S}/tools/perf/Makefile.perf
sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(PYTHON_SITEPACKAGES_DIR)' --root='\$(DESTDIR)',g" \
${S}/tools/perf/Makefile.perf
# backport https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
sed -i -e 's,\($(Q)$(SHELL) .$(arch_errno_tbl).\) $(CC) $(arch_errno_hdr_dir),\1 $(firstword $(CC)) $(arch_errno_hdr_dir),g' \
${S}/tools/perf/Makefile.perf
fi
sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
${S}/tools/perf/Makefile*
if [ -e "${S}/tools/build/Makefile.build" ]; then
sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
${S}/tools/build/Makefile.build
fi
# start reproducibility substitutions
if [ -e "${S}/tools/perf/Makefile.config" ]; then
# The following line in the Makefle:
# override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON_AUTO))
# "PYTHON" / "PYTHON_AUTO" have the full path as part of the variable. We've
# ensure that the environment is setup and we do not need the full path to be
# captured, since the symbol gets built into the executable, making it not
# reproducible.
sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO)),$(notdir $(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO))),g' \
${S}/tools/perf/Makefile.config
# The same line is in older releases, but looking explicitly for Python 2
sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(PYTHON2)),$(notdir $(call get-executable-or-default\,PYTHON\,$(PYTHON2))),g' \
${S}/tools/perf/Makefile.config
# likewise with this substitution. Kernels with commit 18f2967418d031a39
# [perf tools: Use Python devtools for version autodetection rather than runtime]
# need this substitution for reproducibility.
sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(subst -config\,\,$(PYTHON_AUTO))),$(notdir $(call get-executable-or-default\,PYTHON\,$(subst -config\,\,$(PYTHON_AUTO)))),g' \
${S}/tools/perf/Makefile.config
# The following line:
# srcdir_SQ = $(patsubst %tools/perf,tools/perf,$(subst ','\'',$(srcdir))),
# Captures the full src path of perf, which of course makes it not
# reproducible. We really only need the relative location 'tools/perf', so we
# change the Makefile line to remove everything before 'tools/perf'
sed -i -e "s%srcdir_SQ = \$(subst ','\\\'',\$(srcdir))%srcdir_SQ = \$(patsubst \%tools/perf,tools/perf,\$(subst ','\\\'',\$(srcdir)))%g" \
${S}/tools/perf/Makefile.config
# Avoid hardcoded path to python-native
sed -i -e 's#\(PYTHON_WORD := \)$(call shell-wordify,$(PYTHON))#\1 python3#g' \
${S}/tools/perf/Makefile.config
fi
if [ -e "${S}/tools/perf/tests/Build" ]; then
# OUTPUT is the full path, we have python on the path so we remove it from the
# definition. This is captured in the perf binary, so breaks reproducibility
sed -i -e 's,PYTHONPATH="BUILD_STR($(OUTPUT)python)",PYTHONPATH="BUILD_STR(python)",g' \
${S}/tools/perf/tests/Build
fi
if [ -e "${S}/tools/perf/util/Build" ]; then
# To avoid bison generating #ifdefs that have captured paths, we make sure
# all the calls have YFLAGS, which contains prefix mapping information.
sed -i -e 's,$(BISON),$(BISON) $(YFLAGS),g' ${S}/tools/perf/util/Build
fi
if [ -e "${S}/scripts/Makefile.host" ]; then
# To avoid yacc (bison) generating #ifdefs that have captured paths, we make sure
# all the calls have YFLAGS, which contains prefix mapping information.
sed -i -e 's,$(YACC),$(YACC) $(YFLAGS),g' ${S}/scripts/Makefile.host
fi
if [ -e "${S}/tools/perf/pmu-events/Build" ]; then
target='$(OUTPUT)pmu-events/pmu-events.c $(V)'
replacement1='$(OUTPUT)pmu-events/pmu-events.c $(V)\n'
replacement2='\t$(srctree)/sort-pmuevents.py $(OUTPUT)pmu-events/pmu-events.c $(OUTPUT)pmu-events/pmu-events.c.new\n'
replacement3='\tcp $(OUTPUT)pmu-events/pmu-events.c.new $(OUTPUT)pmu-events/pmu-events.c'
sed -i -e "s,$target,$replacement1$replacement2$replacement3,g" \
"${S}/tools/perf/pmu-events/Build"
fi
if [ -e "${S}/tools/perf/pmu-events/jevents.py" ]; then
sed -i -e "s#os.scandir(path)#sorted(os.scandir(path), key=lambda e: e.name)#g" \
"${S}/tools/perf/pmu-events/jevents.py"
fi
if [ -e "${S}/tools/perf/arch/arm64/Makefile" ]; then
sed -i 's,sysdef := $(srctree)/,sysdef := ,' ${S}/tools/perf/arch/arm64/Makefile
sed -i 's,$(incpath) $(sysdef),$(incpath) $(srctree)/$(sysdef) $(sysdef),' ${S}/tools/perf/arch/arm64/Makefile
fi
if [ -e "${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl" ]; then
if ! grep -q input_rel ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl; then
sed -i 's,input=$4,input=$4\ninput_rel=$5,' ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
fi
sed -i 's,#include \\"\$input\\",#include \\"\$input_rel\\",' ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
fi
# end reproducibility substitutions
# We need to ensure the --sysroot option in CC is preserved
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf
sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf
sed -i 's,PKG_CONFIG = $(CROSS_COMPILE)pkg-config,#PKG_CONFIG,' ${S}/tools/perf/Makefile.perf
fi
if [ -e "${S}/tools/lib/api/Makefile" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile
sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/lib/api/Makefile
fi
if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/subcmd/Makefile
fi
if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then
sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile
fi
if [ -e "${S}/tools/build/Makefile.feature" ]; then
sed -i 's,CFLAGS=,CC="\$(CC)" CFLAGS=,' ${S}/tools/build/Makefile.feature
fi
# 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include
if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then
sed -i 's,#include "util/callchain.h",#include "util/callchain.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c
fi
if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then
sed -i 's,#include "tests/tests.h",#include "tests/tests.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/tests/dwarf-unwind.c
sed -i 's,#include "perf_regs.h",#include "perf_regs.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/util/unwind-libunwind.c
fi
# use /usr/bin/env instead of version specific python
for s in `find ${S}/tools/perf/ -name '*.py'` `find ${S}/scripts/ -name 'bpf_helpers_doc.py'`; do
sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s}
done
# unistd.h can be out of sync between libc-headers and the captured version in the perf source
# so we copy it from the sysroot unistd.h to the perf unistd.h
install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h
# the fetcher is inhibited by the 'inherit kernelsrc', so we do a quick check and
# copy for a helper script we need
for p in $(echo ${FILESPATH} | tr ':' '\n'); do
if [ -e $p/sort-pmuevents.py ]; then
cp $p/sort-pmuevents.py ${S}
fi
done
}
python do_package:prepend() {
d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python"
RDEPENDS:${PN} += "elfutils bash"
RDEPENDS:${PN}-archive =+ "bash"
RDEPENDS:${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}"
RDEPENDS:${PN}-perl =+ "bash perl perl-modules"
RDEPENDS:${PN}-tests =+ "python3 bash"
RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}"
RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
FILES_SOLIBSDEV = ""
FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so"
FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
FILES:${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
FILES:${PN}-python = " \
${PYTHON_SITEPACKAGES_DIR} \
${libexecdir}/perf-core/scripts/python \
"
FILES:${PN}-perl = "${libexecdir}/perf-core/scripts/perl"
DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized"
PACKAGESPLITFUNCS =+ "perf_fix_sources"
perf_fix_sources () {
for f in util/parse-events-flex.h util/parse-events-flex.c util/pmu-flex.c \
util/pmu-flex.h util/expr-flex.h util/expr-flex.c; do
f=${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/$f
if [ -e $f ]; then
sed -i -e 's#${S}/##g' $f
fi
done
}
+100
View File
@@ -0,0 +1,100 @@
#!/usr/bin/env python3
# perf pmu-events sorting tool
#
# Copyright (C) 2021 Bruce Ashfield
#
# SPDX-License-Identifier: MIT
#
import sys
import os
import re
from collections import OrderedDict
if len(sys.argv) < 2:
print( "[ERROR]: input and output pmu files missing" )
sys.exit(1)
if len(sys.argv) < 3:
print( "[ERROR]: output pmu file missing" )
sys.exit(1)
infile = sys.argv[1]
outfile = sys.argv[2]
if not os.path.exists(infile):
print( "ERROR. input file does not exist: %s" % infile )
sys.exit(1)
if os.path.exists(outfile):
print( "WARNING. output file will be overwritten: %s" % infile )
with open(infile, 'r') as file:
data = file.read()
preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL )
preamble = re.search( preamble_regex, data )
struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL )
field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL )
cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL )
name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL )
# create a dictionary structure to store all the structs, their
# types and then their fields.
entry_dict = {}
for struct in re.findall( struct_block_regex, data ):
# print( "struct: %s %s %s" % (struct[0],struct[1],struct[2]) )
entry_dict[struct[2]] = {}
entry_dict[struct[2]]['type_prefix'] = struct[0]
entry_dict[struct[2]]['type'] = struct[1]
entry_dict[struct[2]]['fields'] = {}
for entry in re.findall( field_regex, struct[3] ):
#print( " entry: %s" % entry )
cpuid = re.search( cpuid_regex, entry )
if cpuid:
#print( " cpuid found: %s" % cpuid.group(1) )
entry_dict[struct[2]]['fields'][cpuid.group(1)] = entry
name = re.search( name_regex, entry )
if name:
#print( " name found: %s" % name.group(1) )
entry_dict[struct[2]]['fields'][name.group(1)] = entry
# unmatched entries are most likely array terminators and
# should end up as the last element in the sorted list, which
# is achieved by using '0' as the key
if not cpuid and not name:
entry_dict[struct[2]]['fields']['0'] = entry
# created ordered dictionaries from the captured values. These are ordered by
# a sorted() iteration of the keys. We don't care about the order we read
# things, just the sorted order. Hency why we couldn't create these during
# reading.
#
# yes, there's a more concise way to do this, but our nested dictionaries of
# fields make it complex enough that it becomes unreadable.
entry_dict_sorted = OrderedDict()
for i in sorted(entry_dict.keys()):
entry_dict_sorted[i] = {}
entry_dict_sorted[i]['type_prefix'] = entry_dict[i]['type_prefix']
entry_dict_sorted[i]['type'] = entry_dict[i]['type']
entry_dict_sorted[i]['fields'] = {}
for f in sorted(entry_dict[i]['fields'].keys()):
entry_dict_sorted[i]['fields'][f] = entry_dict[i]['fields'][f]
# dump the sorted elements to the outfile
outf = open( outfile, 'w' )
print( preamble.group(1) )
outf.write( preamble.group(1) )
for d in entry_dict_sorted:
outf.write( "%s %s %s[] = {\n" % (entry_dict_sorted[d]['type_prefix'], entry_dict_sorted[d]['type'],d) )
for f in entry_dict_sorted[d]['fields']:
outf.write( entry_dict_sorted[d]['fields'][f] + '\n' )
outf.write( "};\n" )
outf.close()
@@ -0,0 +1,55 @@
From 4c24fdd8e0a42359df7308155b2d43c28a5e02fd Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 20 May 2019 20:25:00 +0200
Subject: [PATCH] wakeup_xxx.h: include limits.h
limits.h must be included to define PATH_MAX otherwise build will fail
on:
In file included from wakeup/wakeup_ethernet.cpp:45:0:
wakeup/wakeup_ethernet.h:35:16: error: 'PATH_MAX' was not declared in this scope
char eth_path[PATH_MAX];
In file included from wakeup/wakeup_usb.cpp:45:0:
wakeup/wakeup_usb.h:35:16: error: 'PATH_MAX' was not declared in this scope
char usb_path[PATH_MAX];
Fixes:
- http://autobuild.buildroot.org/results/a0b3337cf4a827e6566f8b15b6bb180f0dcef7a3
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Upstream-Status: Submitted [https://lists.01.org/pipermail/powertop/2019-May/002052.html]
---
src/wakeup/wakeup_ethernet.h | 1 +
src/wakeup/wakeup_usb.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/wakeup/wakeup_ethernet.h b/src/wakeup/wakeup_ethernet.h
index 682bf95..e0fa628 100644
--- a/src/wakeup/wakeup_ethernet.h
+++ b/src/wakeup/wakeup_ethernet.h
@@ -25,6 +25,7 @@
#ifndef _INCLUDE_GUARD_ETHERNET_WAKEUP_H
#define _INCLUDE_GUARD_ETHERNET_WAKEUP_H
+#include <limits.h>
#include <vector>
#include "wakeup.h"
diff --git a/src/wakeup/wakeup_usb.h b/src/wakeup/wakeup_usb.h
index f7a1f7e..15898e3 100644
--- a/src/wakeup/wakeup_usb.h
+++ b/src/wakeup/wakeup_usb.h
@@ -25,6 +25,7 @@
#ifndef _INCLUDE_GUARD_USB_WAKEUP_H
#define _INCLUDE_GUARD_USB_WAKEUP_H
+#include <limits.h>
#include <vector>
#include "wakeup.h"
--
2.20.1
@@ -0,0 +1,24 @@
SUMMARY = "Power usage tool"
DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
HOMEPAGE = "https://01.org/powertop/"
BUGTRACKER = "https://app.devzing.com/powertopbugs/bugzilla"
DEPENDS = "ncurses libnl pciutils autoconf-archive-native"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
SRC_URI = "git://github.com/fenrus75/powertop;protocol=https;branch=master \
file://0001-wakeup_xxx.h-include-limits.h.patch \
"
SRCREV = "d51ad395436d4d1dcc3ca46e1519ffeb475bf651"
S = "${WORKDIR}/git"
LDFLAGS:append = " -pthread"
inherit autotools gettext pkgconfig bash-completion
inherit update-alternatives
ALTERNATIVE:${PN} = "powertop"
ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
ALTERNATIVE_PRIORITY = "100"
@@ -0,0 +1,6 @@
require systemtap_git.bb
inherit native
addtask addto_recipe_sysroot after do_populate_sysroot before do_build
@@ -0,0 +1,42 @@
SUMMARY = "UProbes kernel module for SystemTap"
HOMEPAGE = "https://sourceware.org/systemtap/"
require systemtap_git.inc
DEPENDS = "systemtap virtual/kernel"
# On systems without CONFIG_UTRACE, this package is empty.
ALLOW_EMPTY:${PN} = "1"
inherit module-base gettext
FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemtap:"
FILES:${PN} += "${datadir}/systemtap/runtime/uprobes"
# Compile and install the uprobes kernel module on machines with utrace
# support. Note that staprun expects it in the systemtap/runtime directory,
# not in /lib/modules.
do_compile() {
if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_BUILDDIR}/.config
then
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \
STRIP="${KERNEL_STRIP}" \
-C ${STAGING_KERNEL_DIR} scripts
oe_runmake KDIR=${STAGING_KERNEL_DIR} \
M="${S}/runtime/uprobes/" \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \
STRIP="${KERNEL_STRIP}" \
-C "${S}/runtime/uprobes/"
fi
}
do_install() {
if [ -e "${S}/runtime/uprobes/uprobes.ko" ]
then
install -d ${D}${datadir}/systemtap/runtime/uprobes/
install -m 0644 ${S}/runtime/uprobes/uprobes.ko ${D}${datadir}/systemtap/runtime/uprobes/
fi
}
@@ -0,0 +1,25 @@
From ab29615ed6c2e779b472903564dc683dc1015de7 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 22 Feb 2017 13:37:33 +0200
Subject: [PATCH] Do not let configure write a python location into the dtrace
binary
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
dtrace.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dtrace.in b/dtrace.in
index 5e1cf8079..a24229cbc 100644
--- a/dtrace.in
+++ b/dtrace.in
@@ -1,4 +1,4 @@
-#!@preferred_python@
+#!/usr/bin/python3
# vim: et sta sts=4 sw=4 ts=8
# This handles the systemtap equivalent of
--
2.11.0
@@ -0,0 +1,56 @@
From 2ada22f05460223924efe54080cb4419e2b4c276 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 24 Feb 2017 17:53:02 +0200
Subject: [PATCH] Install python modules to correct library dir.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Add OE's CFLAGS which contains `-fdebug-prefix-map' options to
setup.py
Supply "--root" directory to the "install" command, and use
it as a prefix to strip off the purported filename encoded
in bytecode files. (It strips build path prefix from .pyc files)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
python/Makefile.am | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/python/Makefile.am b/python/Makefile.am
index a254480..578602f 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -8,6 +8,10 @@ AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -I$(srcdir)/../includes
AM_CPPFLAGS += -I$(abs_builddir)/../includes/sys
+# Add OE's CFLAGS which contains `-fdebug-prefix-map' options to
+# fix build path issue
+AM_CPPFLAGS += $(CFLAGS)
+
# Any script in the following variable will get byte-compiled at
# install time.
pkglibexecpython_PYTHON =
@@ -47,7 +51,7 @@ install-exec-local:
if HAVE_PYTHON2_PROBES
(cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON) setup.py build \
--build-base $(shell readlink -f $(builddir))/py2build \
- install --prefix $(DESTDIR)$(prefix) \
+ install --root $(DESTDIR) --prefix $(prefix) --prefix $(prefix) --install-lib=${pythondir} \
--single-version-externally-managed \
--record $(shell readlink -f $(builddir))/py2build/install_files.txt \
--verbose)
@@ -55,7 +59,7 @@ endif
if HAVE_PYTHON3_PROBES
(cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
--build-base $(shell readlink -f $(builddir))/py3build \
- install --prefix $(DESTDIR)$(prefix) \
+ install --root $(DESTDIR) --prefix $(prefix) --install-lib=${python3dir} \
--single-version-externally-managed \
--record $(shell readlink -f $(builddir))/py3build/install_files.txt \
--verbose)
--
2.7.4
@@ -0,0 +1,31 @@
From 6288ba5df0a8c73ef842b609081449ac4de86123 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Wed, 18 Jul 2018 16:58:33 +0800
Subject: [PATCH] improve reproducibility for c++ compiling
Use relative dir to include header string_ref to
strip build path prefix in c++ object file
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
stringtable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stringtable.h b/stringtable.h
index 5fc42e7..6fd8a1e 100644
--- a/stringtable.h
+++ b/stringtable.h
@@ -19,7 +19,7 @@
#if defined(HAVE_BOOST_UTILITY_STRING_REF_HPP)
#include <boost/version.hpp>
-#include <boost/utility/string_ref.hpp> //header with string_ref
+#include "@RELATIVE_STAGING_INCDIR@/boost/utility/string_ref.hpp" //header with string_ref
// XXX: experimental tunables
#define INTERNED_STRING_FIND_MEMMEM 1 /* perf stat indicates a very slight benefit */
--
2.7.4
@@ -0,0 +1,37 @@
From ebb424eee5599fcc131901c0d82d0bfc0d2f57ab Mon Sep 17 00:00:00 2001
From: "Frank Ch. Eigler" <fche@redhat.com>
Date: Fri, 28 Apr 2023 13:51:27 -0400
Subject: [PATCH] release date fix
Upstream-Status: Backport
---
NEWS | 2 +-
systemtap.spec | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 695bc990c..46859e304 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-* What's new in version 4.9, 2023-04-27
+* What's new in version 4.9, 2023-04-28
- ISystemtap: the new interactive systemtap jupyter kernel. This provides
a simple GUI for writing/running Systemtap scripts in an easy, incremental
diff --git a/systemtap.spec b/systemtap.spec
index 59814f112..fd8023264 100644
--- a/systemtap.spec
+++ b/systemtap.spec
@@ -1307,7 +1307,7 @@ exit 0
# PRERELEASE
%changelog
-* Thu Apr 27 2023 Frank Ch. Eigler <fche@redhat.com> - 4.9-1
+* Fri Apr 28 2023 Frank Ch. Eigler <fche@redhat.com> - 4.9-1
- Upstream release, see wiki page below for detailed notes.
https://sourceware.org/systemtap/wiki/SystemTapReleases
--
2.40.1
@@ -0,0 +1,61 @@
From 191f528da19193d713d94ee252e2485efd9af4d3 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Mon, 25 Oct 2021 17:59:24 +0200
Subject: [PATCH] staprun: address ncurses 6.3 failures
Upstream-Status: Submitted [by email to smakarov@redhat.com,systemtap@sourceware.org]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
staprun/monitor.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/staprun/monitor.c b/staprun/monitor.c
index 478634c09..f4fbfd686 100644
--- a/staprun/monitor.c
+++ b/staprun/monitor.c
@@ -448,12 +448,12 @@ void monitor_render(void)
if (active_window == 0)
wattron(status, A_BOLD);
wprintw(status, "\n%*s\t%*s\t%*s\t%*s\t%*s\t%*s\t%s\n",
- width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
- width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
- width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
- width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
- width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
- width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
+ (int)width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
+ (int)width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
+ (int)width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
+ (int)width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
+ (int)width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
+ (int)width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
HIGHLIGHT("name", p_name, comp_fn_index));
if (active_window == 0)
wattroff(status, A_BOLD);
@@ -466,17 +466,17 @@ void monitor_render(void)
json_object *probe, *field;
probe = json_object_array_get_idx(jso_probe_list, i);
json_object_object_get_ex(probe, "index", &field);
- wprintw(status, "%*s\t", width[p_index], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_index], json_object_get_string(field));
json_object_object_get_ex(probe, "state", &field);
- wprintw(status, "%*s\t", width[p_state], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_state], json_object_get_string(field));
json_object_object_get_ex(probe, "hits", &field);
- wprintw(status, "%*s\t", width[p_hits], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_hits], json_object_get_string(field));
json_object_object_get_ex(probe, "min", &field);
- wprintw(status, "%*s\t", width[p_min], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_min], json_object_get_string(field));
json_object_object_get_ex(probe, "avg", &field);
- wprintw(status, "%*s\t", width[p_avg], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_avg], json_object_get_string(field));
json_object_object_get_ex(probe, "max", &field);
- wprintw(status, "%*s\t", width[p_max], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_max], json_object_get_string(field));
getyx(status, discard, cur_x);
json_object_object_get_ex(probe, "name", &field);
wprintw(status, "%.*s", max_cols-cur_x-1, json_object_get_string(field));
--
2.20.1
@@ -0,0 +1,37 @@
From 3e13a006fe3dff9489269274093bf868532036e2 Mon Sep 17 00:00:00 2001
From: Saul Wold <sgw@linux.intel.com>
Date: Tue, 5 Sep 2017 16:02:55 -0700
Subject: [PATCH] staprun/stapbpf: don't support installing a non-root
Since we are in a known environment and installing as root and
expect to be running as root, don't create the group or chmod
the binaries.
Upstream-Status: Inappropriate [Embedded]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
stapbpf/Makefile.am | 14 +++++++-------
staprun/Makefile.am | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
Index: git/stapbpf/Makefile.am
===================================================================
--- git.orig/stapbpf/Makefile.am
+++ git/stapbpf/Makefile.am
@@ -41,10 +41,10 @@
# Why the "id -u" condition? This way, an unprivileged user can run
# make install, and have "sudo stap ...." or "sudo stapbpf ...." work later.
-install-exec-hook:
- if [ `id -u` -eq 0 ] && (getent group stapusr >/dev/null \
- || groupadd -f -g 156 -r stapusr); then \
- chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \
- && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \
- fi
+#install-exec-hook:
+## if [ `id -u` -eq 0 ] && (getent group stapusr >/dev/null \
+## || groupadd -f -g 156 -r stapusr); then \
+## chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \
+# && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \
+# fi
endif
@@ -0,0 +1,102 @@
SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux"
DESCRIPTION = "It provides free software infrastructure to simplify the \
gathering of information about the running Linux system. This assists \
diagnosis of a performance or functional problem."
HOMEPAGE = "https://sourceware.org/systemtap/"
require systemtap_git.inc
SRC_URI += " \
file://0001-improve-reproducibility-for-c-compiling.patch \
file://0001-staprun-address-ncurses-6.3-failures.patch \
"
DEPENDS = "elfutils"
EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
--without-nss --without-avahi --without-dyninst \
--disable-server --disable-grapher --enable-prologues \
--with-python3 --without-python2-probes \
ac_cv_prog_have_javac=no \
ac_cv_prog_have_jar=no "
STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
EXTRA_OECONF += "${STAP_DOCS} "
PACKAGECONFIG ??= "translator sqlite monitor python3-probes"
PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash"
PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
inherit autotools gettext pkgconfig systemd
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)}
# | ../git/elaborate.cxx:2601:21: error: storing the address of local variable 'sym' in '*s.systemtap_session::symbol_resolver' [-Werror=dangling-pointer=]
CXXFLAGS += "-Wno-dangling-pointer"
# exporter comes with python3-probes
PACKAGES =+ "${PN}-exporter"
FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \
${sysconfdir}/sysconfig/stap-exporter \
${systemd_system_unitdir}/stap-exporter.service \
${sbindir}/stap-exporter"
RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient"
SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service"
PACKAGES =+ "${PN}-runtime"
FILES:${PN}-runtime = "\
${bindir}/staprun \
${bindir}/stap-merge \
${bindir}/stapsh \
${libexecdir}/${BPN}/stapio \
"
RDEPENDS:${PN}:class-target += "${PN}-runtime"
PACKAGES =+ "${PN}-examples"
FILES:${PN}-examples = "${datadir}/${BPN}/examples/"
RDEPENDS:${PN}-examples += "${PN}"
# don't complain that some examples involve bash, perl, php...
INSANE_SKIP:${PN}-examples += "file-rdeps"
PACKAGES =+ "${PN}-python"
FILES:${PN}-python += "\
${bindir}/dtrace \
${libdir}/python*/ \
${libexecdir}/${BPN}/python/ \
"
# python material requires sdt headers
RDEPENDS:${PN}-python += "${PN}-dev python3-core"
INSANE_SKIP:${PN}-python += "dev-deps"
do_configure:prepend () {
# Improve reproducibility for c++ object files
reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}"
sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h
}
do_install:append () {
if [ ! -f ${D}${bindir}/stap ]; then
# translator disabled case, need to leave only minimal runtime
rm -rf ${D}${datadir}/${PN}
rm ${D}${libexecdir}/${PN}/stap-env
fi
if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
# Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
# without usrmerge distro feature enabled
install -d `dirname ${D}${systemd_unitdir}`
mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
fi
# Ensure correct ownership for files copied in
if [ -d ${D}${sysconfdir}/stap-exporter ]; then
chown root:root ${D}${sysconfdir}/stap-exporter/* -R
fi
}
BBCLASSEXTEND = "nativesdk"
@@ -0,0 +1,23 @@
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRCREV = "418f0a45ca4473491385b5c7eef777607bbdb3b7"
PV = "4.9"
SRC_URI = "git://sourceware.org/git/systemtap.git;branch=master;protocol=https \
file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \
file://0001-Install-python-modules-to-correct-library-dir.patch \
file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \
file://0001-release-date-fix.patch \
"
COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux'
COMPATIBLE_HOST:libc-musl = 'null'
S = "${WORKDIR}/git"
# systemtap can't be built without optimization, if someone tries to compile an
# entire image as -O0, break with fatal.
python () {
if bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
bb.fatal("systemtap can't be built with -O0, using -O1 -Wno-error or -O1 instead.")
}
@@ -0,0 +1,43 @@
SUMMARY = "Wireless Central Regulatory Domain Database"
HOMEPAGE = "https://wireless.wiki.kernel.org/en/developers/regulatory/crda"
SECTION = "net"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
SRC_URI[sha256sum] = "f254d08ab3765aeae2b856222e11a95d44aef519a6663877c71ef68fae4c8c12"
inherit bin_package allarch
do_install() {
install -d -m0755 ${D}${nonarch_libdir}/crda
install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys
install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin
install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem
install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db
install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s
}
# Install static regulatory DB in /lib/firmware for kernel to load.
# This requires Linux kernel >= v4.15.
# For kernel <= v4.14, inherit the kernel_wireless_regdb.bbclass
# (in meta-networking) in kernel's recipe.
PACKAGES = "${PN}-static ${PN}"
RCONFLICTS:${PN} = "${PN}-static"
FILES:${PN}-static = " \
${nonarch_base_libdir}/firmware/regulatory.db \
${nonarch_base_libdir}/firmware/regulatory.db.p7s \
"
# Native users might want to use the source of regulatory DB.
# This is for example used by Linux kernel <= v4.14 and
# kernel_wireless_regdb.bbclass in meta-networking.
do_install:append:class-native() {
install -m 0644 -D db.txt ${D}${libdir}/crda/db.txt
}
RSUGGESTS:${PN} = "crda"
BBCLASSEXTEND = "native"