diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-kernel')
101 files changed, 1715 insertions, 4098 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch deleted file mode 100644 index a4b7157b4..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6b5bbdfaac7f216fe8a02c4cf29e5eb2aee5a409 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 15 Sep 2015 00:01:00 +0000 -Subject: [PATCH] include sys/types.h for dev_t definition - -Avoids the build failures when sys/types.h does not get included -indirectly through other headers. - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - blktrace.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/blktrace.h b/blktrace.h -index 380aec7..944fc08 100644 ---- a/blktrace.h -+++ b/blktrace.h -@@ -5,6 +5,7 @@ - #include <limits.h> - #include <byteswap.h> - #include <endian.h> -+#include <sys/types.h> - - #include "blktrace_api.h" - #include "rbtree.h" --- -2.5.2 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch index dea1aa202..ab905cf0d 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch +++ b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch @@ -10,6 +10,8 @@ aed463414e2e2bf8ca44ba54ee5973e7ed599e57 Signed-off-by: Fahad Usman <fahad_usman@mentor.com> +Index: git/Makefile +=================================================================== --- git.orig/Makefile +++ git/Makefile @@ -1,5 +1,6 @@ @@ -19,7 +21,7 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com> ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon LIBS = -lpthread -@@ -23,19 +24,19 @@ btreplay/btreplay: +@@ -26,19 +27,19 @@ btreplay/btreplay: $(CC) -o $*.o -c $(ALL_CFLAGS) $< blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o @@ -44,6 +46,8 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com> $(PROGS): | depend +Index: git/btreplay/Makefile +=================================================================== --- git.orig/btreplay/Makefile +++ git/btreplay/Makefile @@ -7,6 +7,7 @@ @@ -55,8 +59,8 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com> OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @@ -32,10 +33,10 @@ clean: docsclean - $(CC) $(CFLAGS) -c -o $*.o $< - + $(CC) $(CFLAGS) -c -o $*.o $< + btrecord: btrecord.o - $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) + $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS) @@ -67,6 +71,8 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com> depend: @$(CC) -MM $(CFLAGS) *.c 1> .depend +Index: git/btt/Makefile +=================================================================== --- git.orig/btt/Makefile +++ git/btt/Makefile @@ -7,6 +7,7 @@ @@ -86,11 +92,13 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com> ifneq ($(wildcard .depend),) include .depend +Index: git/iowatcher/Makefile +=================================================================== --- git.orig/iowatcher/Makefile +++ git/iowatcher/Makefile @@ -1,5 +1,6 @@ - C = gcc - CFLAGS = -Wall -O0 -g -W + CC = gcc + CFLAGS = -Wall -O2 -g -W -Wunused-result +LDFLAGS = ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @@ -99,8 +107,8 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com> $(CC) -o $*.o -c $(ALL_CFLAGS) $< iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o -- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS) +- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt ++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS) -lrt depend: @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend diff --git a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb index 770575fda..663de2ed5 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb @@ -5,13 +5,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" DEPENDS = "libaio" -SRCREV = "43fc870ce04e963def45dfc0d1ed4ea21ef10d4b" +SRCREV = "cca113f2fe0759b91fd6a0e10fdcda2c28f18a7e" -PV = "1.1.0+git${SRCPV}" +PV = "1.2.0+git${SRCPV}" SRC_URI = "git://git.kernel.dk/blktrace.git \ file://ldflags.patch \ - file://0001-include-sys-types.h-for-dev_t-definition.patch \ " S = "${WORKDIR}/git" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb index 552eb6aba..ed6d0ecae 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb @@ -9,6 +9,7 @@ DEPENDS += "cryptodev-linux" SRC_URI += " \ file://0001-Disable-installing-header-file-provided-by-another-p.patch \ +file://0001-ioctl.c-Fix-build-with-linux-4.13.patch \ " EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc index 50366e720..ab15bc1d9 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc +++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc @@ -3,11 +3,9 @@ HOMEPAGE = "http://cryptodev-linux.org/" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "http://nwl.cc/pub/cryptodev-linux/cryptodev-linux-${PV}.tar.gz" +SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux" +SRCREV = "87d959d9a279c055b361de8e730fab6a7144edd7" -SRC_URI[md5sum] = "cb4e0ed9e5937716c7c8a7be84895b6d" -SRC_URI[sha256sum] = "9f4c0b49b30e267d776f79455d09c70cc9c12c86eee400a0d0a0cd1d8e467950" - -S = "${WORKDIR}/cryptodev-linux-${PV}" +S = "${WORKDIR}/git" CLEANBROKEN = "1" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch index 3f0298b0b..84fd27e68 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch +++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch @@ -14,37 +14,37 @@ Upstream-Status: Pending tests/Makefile | 8 ++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) -diff --git a/Makefile b/Makefile -index 31c4b3f..2ecf2a9 100644 ---- a/Makefile -+++ b/Makefile -@@ -34,6 +34,9 @@ modules_install: - @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..." - @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -35,6 +35,9 @@ modules_install: + $(MAKE) $(KERNEL_MAKE_OPTS) modules_install + install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h +install_tests: + make -C tests install DESTDIR=$(PREFIX) + clean: - make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean + $(MAKE) $(KERNEL_MAKE_OPTS) clean rm -f $(hostprogs) *~ -@@ -42,6 +45,9 @@ clean: +@@ -43,6 +46,9 @@ clean: check: - CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) make -C tests check + CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C tests check +testprogs: + KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs + CPOPTS = - ifneq (${SHOW_TYPES},) + ifneq ($(SHOW_TYPES),) CPOPTS += --show-types -diff --git a/tests/Makefile b/tests/Makefile -index c9f04e8..cd202af 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o - example-async-speed-objs := async_speed.o - example-hashcrypt-speed-objs := hashcrypt_speed.c +Index: git/tests/Makefile +=================================================================== +--- git.orig/tests/Makefile ++++ git/tests/Makefile +@@ -23,6 +23,12 @@ bindir = $(execprefix)/bin + + all: $(hostprogs) +install: + install -d $(DESTDIR)/usr/bin/tests_cryptodev @@ -55,9 +55,9 @@ index c9f04e8..cd202af 100644 check: $(hostprogs) ./cipher ./hmac -@@ -28,6 +34,8 @@ check: $(hostprogs) - ./cipher-gcm - ./cipher-aead +@@ -38,6 +44,8 @@ install: + install -m 755 $$prog $(DESTDIR)/$(bindir); \ + done +testprogs: $(hostprogs) + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch new file mode 100644 index 000000000..a41efacdd --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch @@ -0,0 +1,49 @@ +From f0d69774afb27ffc62bf353465fba145e70cb85a Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> +Date: Mon, 4 Sep 2017 11:05:08 +0200 +Subject: [PATCH] ioctl.c: Fix build with linux 4.13 + +git/ioctl.c:1127:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] + {0, }, + ^ +note: (near initialization for 'verbosity_ctl_dir[1]') +git/ioctl.c:1136:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] + {0, }, + ^ + +Linux kernel has added -Werror=designated-init around 4.11 (c834f0e8a8b) +triggering build errors with gcc 5 and 6 (but not with gcc 4) + +Upstream-Status: Backport + +Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> +Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> +--- + ioctl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ioctl.c b/ioctl.c +index 0385203..8d4a162 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -1124,7 +1124,7 @@ static struct ctl_table verbosity_ctl_dir[] = { + .mode = 0644, + .proc_handler = proc_dointvec, + }, +- {0, }, ++ {}, + }; + + static struct ctl_table verbosity_ctl_root[] = { +@@ -1133,7 +1133,7 @@ static struct ctl_table verbosity_ctl_root[] = { + .mode = 0555, + .child = verbosity_ctl_dir, + }, +- {0, }, ++ {}, + }; + static struct ctl_table_header *verbosity_sysctl_header; + static int __init init_cryptodev(void) +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc index d75994661..9a90d4404 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc +++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc @@ -7,9 +7,11 @@ DEPENDS = "flex-native bison-native" SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \ file://make_install.patch \ - " + file://0001-checks-Use-proper-format-modifier-for-size_t.patch \ + " +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" -EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"' +EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"' S = "${WORKDIR}/git" @@ -20,4 +22,4 @@ do_install () { PACKAGES =+ "${PN}-misc" FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff" -RDEPENDS_${PN}-misc += "bash" +RDEPENDS_${PN}-misc += "bash diffutils" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/0001-checks-Use-proper-format-modifier-for-size_t.patch b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/0001-checks-Use-proper-format-modifier-for-size_t.patch new file mode 100644 index 000000000..cab384dd9 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/0001-checks-Use-proper-format-modifier-for-size_t.patch @@ -0,0 +1,43 @@ +From c7a4c3817796107bb824a1f173faf90fae45396b Mon Sep 17 00:00:00 2001 +From: Thierry Reding <treding@nvidia.com> +Date: Wed, 27 Sep 2017 15:04:09 +0200 +Subject: [PATCH] checks: Use proper format modifier for size_t + +The size of size_t can vary between architectures, so using %ld isn't +going to work on 32-bit builds. Use the %zu modifier to make sure it is +always correct. + +Upstream-Status: Backport +Signed-off-by: Thierry Reding <treding@nvidia.com> +Acked-by: Rob Herring <robh@kernel.org> +Signed-off-by: David Gibson <david@gibson.dropbear.id.au> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + checks.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/checks.c b/checks.c +index 902f2e3..08a3a29 100644 +--- a/checks.c ++++ b/checks.c +@@ -972,7 +972,7 @@ static void check_property_phandle_args(struct check *c, + int cell, cellsize = 0; + + if (prop->val.len % sizeof(cell_t)) { +- FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s", ++ FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s", + prop->name, prop->val.len, sizeof(cell_t), node->fullpath); + return; + } +@@ -1163,7 +1163,7 @@ static void check_interrupts_property(struct check *c, + return; + + if (irq_prop->val.len % sizeof(cell_t)) +- FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s", ++ FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s", + irq_prop->name, irq_prop->val.len, sizeof(cell_t), + node->fullpath); + +-- +2.15.0 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch index 1120617e7..ccf17b38f 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch +++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch @@ -2,11 +2,11 @@ Upstream-Status: Inappropriate [configuration] Index: git/Makefile =================================================================== ---- git.orig/Makefile 2011-11-02 14:52:17.243104779 -0700 -+++ git/Makefile 2011-11-02 15:06:01.555104982 -0700 -@@ -161,8 +161,8 @@ - $(INSTALL) -d $(DESTDIR)$(BINDIR) - $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) +--- git.orig/Makefile ++++ git/Makefile +@@ -168,8 +168,8 @@ install-bin: all $(SCRIPTS) + install-lib: all + @$(VECHO) INSTALL-LIB $(INSTALL) -d $(DESTDIR)$(LIBDIR) - $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) - ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) @@ -14,4 +14,4 @@ Index: git/Makefile + ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib)) ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT) $(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) - $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.5.bb index eadb7bab6..0e46cfbeb 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.4.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.5.bb @@ -3,7 +3,7 @@ require dtc.inc LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c" -SRCREV = "558cd81bdd432769b59bff01240c44f82cfb1a9d" +SRCREV = "22a65c5331c22979d416738eb756b9541672e00d" S = "${WORKDIR}/git" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb index 3a3992a29..8ccd8cee1 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb @@ -12,6 +12,7 @@ inherit native SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git" S = "${WORKDIR}" +UPSTREAM_CHECK_COMMITS = "1" do_compile() { : diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc deleted file mode 100644 index c689bec1f..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc +++ /dev/null @@ -1,38 +0,0 @@ -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 = "GPLv2" -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 \ -" - -PR = "r1" - -inherit autotools - -COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)' - -INSANE_SKIP_${PN} = "arch" - -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 -} diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch deleted file mode 100644 index 84e94d7d9..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 3bb73e5e5649b455e15d5ca3a7ad1a90c4960972 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 10 Jun 2017 11:54:36 -0700 -Subject: [PATCH] arm64: Disable PIC - -Fix -| cc1: sorry, unimplemented: code model 'large' with -fPIC -| make: *** [Makefile:118: purgatory/arch/arm64/entry.o] Error 1 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - purgatory/arch/arm64/Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/purgatory/arch/arm64/Makefile b/purgatory/arch/arm64/Makefile -index 636abea..80068ca 100644 ---- a/purgatory/arch/arm64/Makefile -+++ b/purgatory/arch/arm64/Makefile -@@ -1,6 +1,7 @@ - - arm64_PURGATORY_EXTRA_CFLAGS = \ - -mcmodel=large \ -+ -fno-PIC \ - -fno-stack-protector \ - -fno-asynchronous-unwind-tables \ - -Wundef \ --- -2.13.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch deleted file mode 100644 index 822f28c44..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 02eed0f8f2748fd7579f69e5373445b52b2b8754 Mon Sep 17 00:00:00 2001 -From: AKASHI Takahiro <takahiro.akashi@linaro.org> -Date: Mon, 17 Oct 2016 13:56:58 +0900 -Subject: [PATCH 1/9] kexec: exntend the semantics of kexec_iomem_for_each_line - -The current kexec_iomem_for_each_line() counts up all the lines for which -a callback function returns zero(0) or positive, and otherwise it stops -further scanning. -This behavior is incovenient in some cases. For instance, on arm64, we want -to count up "System RAM" entries, but need to skip "reserved" entries. - -So this patch extends the semantics so that we will continue to scan -succeeding entries but not count lines for which a callback function -returns positive. - -The current users of kexec_iomem_for_each_line(), arm, sh and x86, will not -be affected by this change because -* arm - The callback function only returns -1 or 0, and the return value of - kexec_iomem_for_each_line() will never be used. -* sh, x86 - The callback function may return (-1 for sh,) 0 or 1, but always returns - 1 once we have reached the maximum number of entries allowed. - Even so the current kexec_iomem_for_each_line() counts them up. - This change actually fixes this bug. - -Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] - -Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - kexec/kexec-iomem.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/kexec/kexec-iomem.c b/kexec/kexec-iomem.c -index 485a2e8..0a0277a 100644 ---- a/kexec/kexec-iomem.c -+++ b/kexec/kexec-iomem.c -@@ -18,6 +18,9 @@ - * Iterate over each line in the file returned by proc_iomem(). If match is - * NULL or if the line matches with our match-pattern then call the - * callback if non-NULL. -+ * If match is NULL, callback should return a negative if error. -+ * Otherwise the interation goes on, incrementing nr but only if callback -+ * returns 0 (matched). - * - * Return the number of lines matched. - */ -@@ -37,7 +40,7 @@ int kexec_iomem_for_each_line(char *match, - char *str; - int consumed; - int count; -- int nr = 0; -+ int nr = 0, ret; - - fp = fopen(iomem, "r"); - if (!fp) -@@ -50,11 +53,13 @@ int kexec_iomem_for_each_line(char *match, - str = line + consumed; - size = end - start + 1; - if (!match || memcmp(str, match, strlen(match)) == 0) { -- if (callback -- && callback(data, nr, str, start, size) < 0) { -- break; -+ if (callback) { -+ ret = callback(data, nr, str, start, size); -+ if (ret < 0) -+ break; -+ else if (ret == 0) -+ nr++; - } -- nr++; - } - } - --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch deleted file mode 100644 index 90c2f6e0e..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d811875a41b4628040abaada3da29b7b9592e757 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 9 Jan 2016 17:16:16 -0800 -Subject: [PATCH] vmcore-dmesg: Define _GNU_SOURCE - -loff_t is guarded with _GNU_SOURCE on some C library implementations -e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to -include this define, it should help compiling on musl while nothing -changes for glibc based systems since there _GNU_SOURCE is already -defined - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - vmcore-dmesg/vmcore-dmesg.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c -index 0364636..a8f56df 100644 ---- a/vmcore-dmesg/vmcore-dmesg.c -+++ b/vmcore-dmesg/vmcore-dmesg.c -@@ -1,4 +1,5 @@ - #define _XOPEN_SOURCE 600 -+#define _GNU_SOURCE - #define _LARGEFILE_SOURCE 1 - #define _FILE_OFFSET_BITS 64 - #include <endian.h> --- -2.7.0 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch deleted file mode 100644 index e601f5275..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch +++ /dev/null @@ -1,78 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> - - -From 1550f81bf1886aa0520da0b6181cd61c1a75d4ad Mon Sep 17 00:00:00 2001 -From: Pratyush Anand <panand@redhat.com> -Date: Tue, 14 Mar 2017 17:59:22 +0530 -Subject: [PATCH 1/2] x86/x86_64: Fix format warning with die() - -Fedora koji uses gcc version 7.0.1-0.12.fc27, and it generates a build -warning - - kexec/arch/i386/kexec-elf-x86.c:299:3: error: format not a string - literal and no format arguments [-Werror=format-security] - die(error_msg); - ^~~ - cc1: some warnings being treated as errors - -error_msg can have a format specifier as well in string. In such cases, -if there is no other arguments for the format variable then code will -try to access a non existing argument. Therefore, use 1st argument as -format specifier for string print and pass error_msg as the string to be -printed. - -While doing that,also use const qualifier before "char *error_msg". - -Signed-off-by: Pratyush Anand <panand@redhat.com> -Signed-off-by: Simon Horman <horms@verge.net.au> ---- - kexec/arch/i386/kexec-elf-x86.c | 4 ++-- - kexec/arch/x86_64/kexec-elf-x86_64.c | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/kexec/arch/i386/kexec-elf-x86.c b/kexec/arch/i386/kexec-elf-x86.c -index de00dcb..fedf031 100644 ---- a/kexec/arch/i386/kexec-elf-x86.c -+++ b/kexec/arch/i386/kexec-elf-x86.c -@@ -91,7 +91,7 @@ int elf_x86_load(int argc, char **argv, const char *buf, off_t len, - char *command_line = NULL, *modified_cmdline = NULL; - const char *append = NULL; - char *tmp_cmdline = NULL; -- char *error_msg = NULL; -+ const char *error_msg = NULL; - int result; - int command_line_len; - const char *ramdisk; -@@ -296,6 +296,6 @@ out: - free(command_line); - free(modified_cmdline); - if (error_msg) -- die(error_msg); -+ die("%s", error_msg); - return result; - } -diff --git a/kexec/arch/x86_64/kexec-elf-x86_64.c b/kexec/arch/x86_64/kexec-elf-x86_64.c -index ae65692..ad22311 100644 ---- a/kexec/arch/x86_64/kexec-elf-x86_64.c -+++ b/kexec/arch/x86_64/kexec-elf-x86_64.c -@@ -99,7 +99,7 @@ int elf_x86_64_load(int argc, char **argv, const char *buf, off_t len, - #define ARG_STYLE_NONE 2 - int opt; - int result = 0; -- char *error_msg = NULL; -+ const char *error_msg = NULL; - - /* See options.h and add any new options there too! */ - static const struct option options[] = { -@@ -276,6 +276,6 @@ out: - free(command_line); - free(modified_cmdline); - if (error_msg) -- die(error_msg); -+ die("%s", error_msg); - return result; - } --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch deleted file mode 100644 index 953f13bd0..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch +++ /dev/null @@ -1,194 +0,0 @@ -From d29f37bb6e9114aba96c606103b110f511bee9a1 Mon Sep 17 00:00:00 2001 -From: Pratyush Anand <panand@redhat.com> -Date: Wed, 2 Nov 2016 15:05:25 +0530 -Subject: [PATCH 2/9] kexec: generalize and rename get_kernel_stext_sym() - -get_kernel_stext_sym() has been defined for both arm and i386. Other -architecture might need some other kernel symbol address. Therefore rewrite -this function as generic function to get any kernel symbol address. - -More over, kallsyms is not arch specific representation, therefore have -common function for all arches. - -Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] - -Signed-off-by: Pratyush Anand <panand@redhat.com> -[created symbols.c] -Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - kexec/Makefile | 1 + - kexec/arch/arm/crashdump-arm.c | 40 +--------------------------------------- - kexec/arch/i386/crashdump-x86.c | 29 ----------------------------- - kexec/kexec.h | 2 ++ - kexec/symbols.c | 41 +++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 45 insertions(+), 68 deletions(-) - create mode 100644 kexec/symbols.c - -diff --git a/kexec/Makefile b/kexec/Makefile -index 39f365f..2b4fb3d 100644 ---- a/kexec/Makefile -+++ b/kexec/Makefile -@@ -26,6 +26,7 @@ KEXEC_SRCS_base += kexec/kernel_version.c - KEXEC_SRCS_base += kexec/lzma.c - KEXEC_SRCS_base += kexec/zlib.c - KEXEC_SRCS_base += kexec/kexec-xen.c -+KEXEC_SRCS_base += kexec/symbols.c - - KEXEC_GENERATED_SRCS += $(PURGATORY_HEX_C) - -diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c -index 4a89b5e..245c21a 100644 ---- a/kexec/arch/arm/crashdump-arm.c -+++ b/kexec/arch/arm/crashdump-arm.c -@@ -73,48 +73,10 @@ static struct crash_elf_info elf_info = { - - extern unsigned long long user_page_offset; - --/* Retrieve kernel _stext symbol virtual address from /proc/kallsyms */ --static unsigned long long get_kernel_stext_sym(void) --{ -- const char *kallsyms = "/proc/kallsyms"; -- const char *stext = "_stext"; -- char sym[128]; -- char line[128]; -- FILE *fp; -- unsigned long long vaddr = 0; -- char type; -- -- fp = fopen(kallsyms, "r"); -- if (!fp) { -- fprintf(stderr, "Cannot open %s\n", kallsyms); -- return 0; -- } -- -- while(fgets(line, sizeof(line), fp) != NULL) { -- unsigned long long addr; -- -- if (sscanf(line, "%Lx %c %s", &addr, &type, sym) != 3) -- continue; -- -- if (strcmp(sym, stext) == 0) { -- dbgprintf("kernel symbol %s vaddr = %#llx\n", stext, addr); -- vaddr = addr; -- break; -- } -- } -- -- fclose(fp); -- -- if (vaddr == 0) -- fprintf(stderr, "Cannot get kernel %s symbol address\n", stext); -- -- return vaddr; --} -- - static int get_kernel_page_offset(struct kexec_info *info, - struct crash_elf_info *elf_info) - { -- unsigned long long stext_sym_addr = get_kernel_stext_sym(); -+ unsigned long long stext_sym_addr = get_kernel_sym("_stext"); - if (stext_sym_addr == 0) { - if (user_page_offset != (-1ULL)) { - elf_info->page_offset = user_page_offset; -diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c -index ab833d4..abf82a5 100644 ---- a/kexec/arch/i386/crashdump-x86.c -+++ b/kexec/arch/i386/crashdump-x86.c -@@ -102,35 +102,6 @@ static int get_kernel_paddr(struct kexec_info *UNUSED(info), - return -1; - } - --/* Retrieve kernel symbol virtual address from /proc/kallsyms */ --static unsigned long long get_kernel_sym(const char *symbol) --{ -- const char *kallsyms = "/proc/kallsyms"; -- char sym[128]; -- char line[128]; -- FILE *fp; -- unsigned long long vaddr; -- char type; -- -- fp = fopen(kallsyms, "r"); -- if (!fp) { -- fprintf(stderr, "Cannot open %s\n", kallsyms); -- return 0; -- } -- -- while(fgets(line, sizeof(line), fp) != NULL) { -- if (sscanf(line, "%Lx %c %s", &vaddr, &type, sym) != 3) -- continue; -- if (strcmp(sym, symbol) == 0) { -- dbgprintf("kernel symbol %s vaddr = %16llx\n", symbol, vaddr); -- return vaddr; -- } -- } -- -- fprintf(stderr, "Cannot get kernel %s symbol address\n", symbol); -- return 0; --} -- - /* Retrieve info regarding virtual address kernel has been compiled for and - * size of the kernel from /proc/kcore. Current /proc/kcore parsing from - * from kexec-tools fails because of malformed elf notes. A kernel patch has -diff --git a/kexec/kexec.h b/kexec/kexec.h -index 9194f1c..b4fafad 100644 ---- a/kexec/kexec.h -+++ b/kexec/kexec.h -@@ -312,4 +312,6 @@ int xen_kexec_load(struct kexec_info *info); - int xen_kexec_unload(uint64_t kexec_flags); - void xen_kexec_exec(void); - -+extern unsigned long long get_kernel_sym(const char *text); -+ - #endif /* KEXEC_H */ -diff --git a/kexec/symbols.c b/kexec/symbols.c -new file mode 100644 -index 0000000..ea6e327 ---- /dev/null -+++ b/kexec/symbols.c -@@ -0,0 +1,41 @@ -+#include <stdio.h> -+#include <string.h> -+#include "kexec.h" -+ -+/* Retrieve kernel symbol virtual address from /proc/kallsyms */ -+unsigned long long get_kernel_sym(const char *text) -+{ -+ const char *kallsyms = "/proc/kallsyms"; -+ char sym[128]; -+ char line[128]; -+ FILE *fp; -+ unsigned long long vaddr = 0; -+ char type; -+ -+ fp = fopen(kallsyms, "r"); -+ if (!fp) { -+ fprintf(stderr, "Cannot open %s\n", kallsyms); -+ return 0; -+ } -+ -+ while (fgets(line, sizeof(line), fp) != NULL) { -+ unsigned long long addr; -+ -+ if (sscanf(line, "%Lx %c %s", &addr, &type, sym) != 3) -+ continue; -+ -+ if (strcmp(sym, text) == 0) { -+ dbgprintf("kernel symbol %s vaddr = %#llx\n", -+ text, addr); -+ vaddr = addr; -+ break; -+ } -+ } -+ -+ fclose(fp); -+ -+ if (vaddr == 0) -+ fprintf(stderr, "Cannot get kernel %s symbol address\n", text); -+ -+ return vaddr; -+} --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch deleted file mode 100644 index 6a1c06df9..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 1c956fc8c6b6324d8d38bba5f9e60a018051c6f5 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Thu, 16 Mar 2017 15:39:06 +0200 -Subject: [PATCH 2/2] ppc: Fix format warning with die() - -Enable compiling kexec-tools for ppc with -Werror=format-security. - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> -Upstream-Status: Submitted [Mailing list] ---- - kexec/arch/ppc/kexec-elf-ppc.c | 2 +- - kexec/arch/ppc/kexec-uImage-ppc.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/kexec/arch/ppc/kexec-elf-ppc.c b/kexec/arch/ppc/kexec-elf-ppc.c -index 291f06d..ad43ad1 100644 ---- a/kexec/arch/ppc/kexec-elf-ppc.c -+++ b/kexec/arch/ppc/kexec-elf-ppc.c -@@ -453,7 +453,7 @@ out: - if (!tmp_cmdline) - free(command_line); - if (error_msg) -- die(error_msg); -+ die("%s", error_msg); - - return result; - } -diff --git a/kexec/arch/ppc/kexec-uImage-ppc.c b/kexec/arch/ppc/kexec-uImage-ppc.c -index 5eec6e4..e8f7adc 100644 ---- a/kexec/arch/ppc/kexec-uImage-ppc.c -+++ b/kexec/arch/ppc/kexec-uImage-ppc.c -@@ -306,7 +306,7 @@ out: - if (!tmp_cmdline) - free(command_line); - if (error_msg) -- die(error_msg); -+ die("%s", error_msg); - return ret; - } - --- -2.11.0 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch deleted file mode 100644 index 1a1c31743..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 16df170ad4808d12acd5e919ac4f6e7f33a247b3 Mon Sep 17 00:00:00 2001 -From: AKASHI Takahiro <takahiro.akashi@linaro.org> -Date: Thu, 1 Sep 2016 10:57:42 +0900 -Subject: [PATCH 3/9] arm64: identify PHYS_OFFSET correctly - -Due to the kernel patch, commit e7cd190385d1 ("arm64: mark reserved -memblock regions explicitly in iomem"), the current code will not be able -to identify the correct value of PHYS_OFFSET if some "reserved" memory -region, which is likely to be UEFI runtime services code/data, exists at -an address below the first "System RAM" regions. - -This patch fixes this issue. - -Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] - -Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - kexec/arch/arm64/iomem.h | 7 +++++++ - kexec/arch/arm64/kexec-arm64.c | 12 ++++++++++-- - 2 files changed, 17 insertions(+), 2 deletions(-) - create mode 100644 kexec/arch/arm64/iomem.h - -diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h -new file mode 100644 -index 0000000..7fd66eb ---- /dev/null -+++ b/kexec/arch/arm64/iomem.h -@@ -0,0 +1,7 @@ -+#ifndef IOMEM_H -+#define IOMEM_H -+ -+#define SYSTEM_RAM "System RAM\n" -+#define IOMEM_RESERVED "reserved\n" -+ -+#endif -diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c -index 2e8839a..8ac811d 100644 ---- a/kexec/arch/arm64/kexec-arm64.c -+++ b/kexec/arch/arm64/kexec-arm64.c -@@ -21,6 +21,7 @@ - #include "crashdump-arm64.h" - #include "dt-ops.h" - #include "fs2dt.h" -+#include "iomem.h" - #include "kexec-syscall.h" - #include "arch/options.h" - -@@ -475,7 +476,14 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str, - return -1; - - r = (struct memory_range *)data + nr; -- r->type = RANGE_RAM; -+ -+ if (!strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM))) -+ r->type = RANGE_RAM; -+ else if (!strncmp(str, IOMEM_RESERVED, strlen(IOMEM_RESERVED))) -+ r->type = RANGE_RESERVED; -+ else -+ return 1; -+ - r->start = base; - r->end = base + length - 1; - -@@ -494,7 +502,7 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str, - static int get_memory_ranges_iomem(struct memory_range *array, - unsigned int *count) - { -- *count = kexec_iomem_for_each_line("System RAM\n", -+ *count = kexec_iomem_for_each_line(NULL, - get_memory_ranges_iomem_cb, array); - - if (!*count) { --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch deleted file mode 100644 index 66600f307..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch +++ /dev/null @@ -1,202 +0,0 @@ -From 48a4c7874d8264ddbfaec2e9858d7866a2d2eb60 Mon Sep 17 00:00:00 2001 -From: AKASHI Takahiro <takahiro.akashi@linaro.org> -Date: Wed, 5 Aug 2015 13:16:30 +0900 -Subject: [PATCH 4/9] arm64: kdump: identify memory regions - -The following regions need to be identified for later use: - a) memory regions which belong to the 1st kernel - b) usable memory reserved for crash dump kernel - -We go through /proc/iomem to find out a) and b) which are marked -as "System RAM" and "Crash kernel", respectively. - -Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] - -Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - kexec/arch/arm64/Makefile | 2 + - kexec/arch/arm64/crashdump-arm64.c | 100 ++++++++++++++++++++++++++++++++++++- - kexec/arch/arm64/crashdump-arm64.h | 14 +++++- - kexec/arch/arm64/iomem.h | 1 + - 4 files changed, 114 insertions(+), 3 deletions(-) - -diff --git a/kexec/arch/arm64/Makefile b/kexec/arch/arm64/Makefile -index 74b677f..2d4ae0e 100644 ---- a/kexec/arch/arm64/Makefile -+++ b/kexec/arch/arm64/Makefile -@@ -6,6 +6,8 @@ arm64_FS2DT_INCLUDE += \ - - arm64_DT_OPS += kexec/dt-ops.c - -+arm64_MEM_REGIONS = kexec/mem_regions.c -+ - arm64_CPPFLAGS += -I $(srcdir)/kexec/ - - arm64_KEXEC_SRCS += \ -diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c -index d2272c8..dcaca43 100644 ---- a/kexec/arch/arm64/crashdump-arm64.c -+++ b/kexec/arch/arm64/crashdump-arm64.c -@@ -1,5 +1,13 @@ - /* - * ARM64 crashdump. -+ * partly derived from arm implementation -+ * -+ * Copyright (c) 2014-2016 Linaro Limited -+ * Author: AKASHI Takahiro <takahiro.akashi@linaro.org> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. - */ - - #define _GNU_SOURCE -@@ -10,12 +18,102 @@ - #include "kexec.h" - #include "crashdump.h" - #include "crashdump-arm64.h" -+#include "iomem.h" - #include "kexec-arm64.h" - #include "kexec-elf.h" -+#include "mem_regions.h" - --struct memory_ranges usablemem_rgns = {}; -+/* memory ranges on crashed kernel */ -+static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES]; -+static struct memory_ranges crash_memory_rgns = { -+ .size = 0, -+ .max_size = CRASH_MAX_MEMORY_RANGES, -+ .ranges = crash_memory_ranges, -+}; -+ -+/* memory range reserved for crashkernel */ -+struct memory_range crash_reserved_mem; -+struct memory_ranges usablemem_rgns = { -+ .size = 0, -+ .max_size = 1, -+ .ranges = &crash_reserved_mem, -+}; -+ -+/* -+ * iomem_range_callback() - callback called for each iomem region -+ * @data: not used -+ * @nr: not used -+ * @str: name of the memory region -+ * @base: start address of the memory region -+ * @length: size of the memory region -+ * -+ * This function is called once for each memory region found in /proc/iomem. -+ * It locates system RAM and crashkernel reserved memory and places these to -+ * variables, respectively, crash_memory_ranges and crash_reserved_mem. -+ */ -+ -+static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr), -+ char *str, unsigned long long base, -+ unsigned long long length) -+{ -+ if (strncmp(str, CRASH_KERNEL, strlen(CRASH_KERNEL)) == 0) -+ return mem_regions_add(&usablemem_rgns, -+ base, length, RANGE_RAM); -+ else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0) -+ return mem_regions_add(&crash_memory_rgns, -+ base, length, RANGE_RAM); -+ -+ return 0; -+} - - int is_crashkernel_mem_reserved(void) - { -+ if (!crash_reserved_mem.end) -+ kexec_iomem_for_each_line(NULL, iomem_range_callback, NULL); -+ -+ return crash_reserved_mem.start != crash_reserved_mem.end; -+} -+ -+/* -+ * crash_get_memory_ranges() - read system physical memory -+ * -+ * Function reads through system physical memory and stores found memory -+ * regions in crash_memory_ranges. -+ * Regions are sorted in ascending order. -+ * -+ * Returns 0 in case of success and -1 otherwise (errno is set). -+ */ -+static int crash_get_memory_ranges(void) -+{ -+ /* -+ * First read all memory regions that can be considered as -+ * system memory including the crash area. -+ */ -+ if (!usablemem_rgns.size) -+ kexec_iomem_for_each_line(NULL, iomem_range_callback, NULL); -+ -+ /* allow only a single region for crash dump kernel */ -+ if (usablemem_rgns.size != 1) { -+ errno = EINVAL; -+ return -1; -+ } -+ -+ dbgprint_mem_range("Reserved memory range", &crash_reserved_mem, 1); -+ -+ if (mem_regions_exclude(&crash_memory_rgns, &crash_reserved_mem)) { -+ fprintf(stderr, -+ "Error: Number of crash memory ranges excedeed the max limit\n"); -+ errno = ENOMEM; -+ return -1; -+ } -+ -+ /* -+ * Make sure that the memory regions are sorted. -+ */ -+ mem_regions_sort(&crash_memory_rgns); -+ -+ dbgprint_mem_range("Coredump memory ranges", -+ crash_memory_rgns.ranges, crash_memory_rgns.size); -+ - return 0; - } -diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h -index f33c7a2..07a0ed0 100644 ---- a/kexec/arch/arm64/crashdump-arm64.h -+++ b/kexec/arch/arm64/crashdump-arm64.h -@@ -1,12 +1,22 @@ - /* - * ARM64 crashdump. -+ * -+ * Copyright (c) 2014-2016 Linaro Limited -+ * Author: AKASHI Takahiro <takahiro.akashi@linaro.org> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. - */ - --#if !defined(CRASHDUMP_ARM64_H) -+#ifndef CRASHDUMP_ARM64_H - #define CRASHDUMP_ARM64_H - - #include "kexec.h" - -+#define CRASH_MAX_MEMORY_RANGES 32 -+ - extern struct memory_ranges usablemem_rgns; -+extern struct memory_range crash_reserved_mem; - --#endif -+#endif /* CRASHDUMP_ARM64_H */ -diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h -index 7fd66eb..20cda87 100644 ---- a/kexec/arch/arm64/iomem.h -+++ b/kexec/arch/arm64/iomem.h -@@ -2,6 +2,7 @@ - #define IOMEM_H - - #define SYSTEM_RAM "System RAM\n" -+#define CRASH_KERNEL "Crash kernel\n" - #define IOMEM_RESERVED "reserved\n" - - #endif --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch deleted file mode 100644 index fe535b607..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch +++ /dev/null @@ -1,191 +0,0 @@ -From 769da25627cebb2a53caee5d5be78a32d376adc1 Mon Sep 17 00:00:00 2001 -From: AKASHI Takahiro <takahiro.akashi@linaro.org> -Date: Wed, 5 Aug 2015 13:45:15 +0900 -Subject: [PATCH 5/9] arm64: kdump: add elf core header segment - -Elf core header contains the information necessary for the coredump of -the 1st kernel, including its physcal memory layout as well as cpu register -states at the panic. -The segment is allocated inside the reserved memory of crash dump kernel. - -Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] - -Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - kexec/arch/arm64/crashdump-arm64.c | 96 ++++++++++++++++++++++++++++++++++++++ - kexec/arch/arm64/crashdump-arm64.h | 3 ++ - kexec/arch/arm64/iomem.h | 2 + - kexec/arch/arm64/kexec-elf-arm64.c | 10 ++++ - 4 files changed, 111 insertions(+) - -diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c -index dcaca43..8346131 100644 ---- a/kexec/arch/arm64/crashdump-arm64.c -+++ b/kexec/arch/arm64/crashdump-arm64.c -@@ -39,6 +39,39 @@ struct memory_ranges usablemem_rgns = { - .ranges = &crash_reserved_mem, - }; - -+struct memory_range elfcorehdr_mem; -+ -+static struct crash_elf_info elf_info = { -+ .class = ELFCLASS64, -+#if (__BYTE_ORDER == __LITTLE_ENDIAN) -+ .data = ELFDATA2LSB, -+#else -+ .data = ELFDATA2MSB, -+#endif -+ .machine = EM_AARCH64, -+}; -+ -+/* -+ * Note: The returned value is correct only if !CONFIG_RANDOMIZE_BASE. -+ */ -+static uint64_t get_kernel_page_offset(void) -+{ -+ int i; -+ -+ if (elf_info.kern_vaddr_start == UINT64_MAX) -+ return UINT64_MAX; -+ -+ /* Current max virtual memory range is 48-bits. */ -+ for (i = 48; i > 0; i--) -+ if (!(elf_info.kern_vaddr_start & (1UL << i))) -+ break; -+ -+ if (i <= 0) -+ return UINT64_MAX; -+ else -+ return UINT64_MAX << i; -+} -+ - /* - * iomem_range_callback() - callback called for each iomem region - * @data: not used -@@ -62,6 +95,10 @@ static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr), - else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0) - return mem_regions_add(&crash_memory_rgns, - base, length, RANGE_RAM); -+ else if (strncmp(str, KERNEL_CODE, strlen(KERNEL_CODE)) == 0) -+ elf_info.kern_paddr_start = base; -+ else if (strncmp(str, KERNEL_DATA, strlen(KERNEL_DATA)) == 0) -+ elf_info.kern_size = base + length - elf_info.kern_paddr_start; - - return 0; - } -@@ -115,5 +152,64 @@ static int crash_get_memory_ranges(void) - dbgprint_mem_range("Coredump memory ranges", - crash_memory_rgns.ranges, crash_memory_rgns.size); - -+ /* -+ * For additional kernel code/data segment. -+ * kern_paddr_start/kern_size are determined in iomem_range_callback -+ */ -+ elf_info.kern_vaddr_start = get_kernel_sym("_text"); -+ if (!elf_info.kern_vaddr_start) -+ elf_info.kern_vaddr_start = UINT64_MAX; -+ -+ return 0; -+} -+ -+/* -+ * load_crashdump_segments() - load the elf core header -+ * @info: kexec info structure -+ * -+ * This function creates and loads an additional segment of elf core header -+ : which is used to construct /proc/vmcore on crash dump kernel. -+ * -+ * Return 0 in case of success and -1 in case of error. -+ */ -+ -+int load_crashdump_segments(struct kexec_info *info) -+{ -+ unsigned long elfcorehdr; -+ unsigned long bufsz; -+ void *buf; -+ int err; -+ -+ /* -+ * First fetch all the memory (RAM) ranges that we are going to -+ * pass to the crash dump kernel during panic. -+ */ -+ -+ err = crash_get_memory_ranges(); -+ -+ if (err) -+ return err; -+ -+ elf_info.page_offset = get_kernel_page_offset(); -+ dbgprintf("%s: page_offset: %016llx\n", __func__, -+ elf_info.page_offset); -+ -+ err = crash_create_elf64_headers(info, &elf_info, -+ crash_memory_rgns.ranges, crash_memory_rgns.size, -+ &buf, &bufsz, ELF_CORE_HEADER_ALIGN); -+ -+ if (err) -+ return err; -+ -+ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 0, -+ crash_reserved_mem.start, crash_reserved_mem.end, -+ -1, 0); -+ -+ elfcorehdr_mem.start = elfcorehdr; -+ elfcorehdr_mem.end = elfcorehdr + bufsz - 1; -+ -+ dbgprintf("%s: elfcorehdr 0x%llx-0x%llx\n", __func__, -+ elfcorehdr_mem.start, elfcorehdr_mem.end); -+ - return 0; - } -diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h -index 07a0ed0..da75a2d 100644 ---- a/kexec/arch/arm64/crashdump-arm64.h -+++ b/kexec/arch/arm64/crashdump-arm64.h -@@ -18,5 +18,8 @@ - - extern struct memory_ranges usablemem_rgns; - extern struct memory_range crash_reserved_mem; -+extern struct memory_range elfcorehdr_mem; -+ -+extern int load_crashdump_segments(struct kexec_info *info); - - #endif /* CRASHDUMP_ARM64_H */ -diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h -index 20cda87..d4864bb 100644 ---- a/kexec/arch/arm64/iomem.h -+++ b/kexec/arch/arm64/iomem.h -@@ -2,6 +2,8 @@ - #define IOMEM_H - - #define SYSTEM_RAM "System RAM\n" -+#define KERNEL_CODE "Kernel code\n" -+#define KERNEL_DATA "Kernel data\n" - #define CRASH_KERNEL "Crash kernel\n" - #define IOMEM_RESERVED "reserved\n" - -diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c -index daf8bf0..c70a37a 100644 ---- a/kexec/arch/arm64/kexec-elf-arm64.c -+++ b/kexec/arch/arm64/kexec-elf-arm64.c -@@ -119,6 +119,16 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf, - dbgprintf("%s: PE format: %s\n", __func__, - (arm64_header_check_pe_sig(header) ? "yes" : "no")); - -+ if (info->kexec_flags & KEXEC_ON_CRASH) { -+ /* create and initialize elf core header segment */ -+ result = load_crashdump_segments(info); -+ if (result) { -+ dbgprintf("%s: Creating eflcorehdr failed.\n", -+ __func__); -+ goto exit; -+ } -+ } -+ - /* load the kernel */ - result = elf_exec_load(&ehdr, info); - --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch deleted file mode 100644 index 414955107..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 4079c93ac5453ef5f7889ab64920c1e9427690ef Mon Sep 17 00:00:00 2001 -From: AKASHI Takahiro <takahiro.akashi@linaro.org> -Date: Tue, 17 Feb 2015 16:06:55 +0900 -Subject: [PATCH 6/9] arm64: kdump: set up kernel image segment - -On arm64, we can use the same kernel image as 1st kernel, but -we have to modify the entry point as well as segments' addresses -in the kernel's elf header in order to load them into correct places. - -Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] - -Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - kexec/arch/arm64/crashdump-arm64.c | 23 +++++++++++++++++++++++ - kexec/arch/arm64/crashdump-arm64.h | 1 + - kexec/arch/arm64/kexec-arm64.c | 25 ++++++++++++++++++++----- - kexec/arch/arm64/kexec-elf-arm64.c | 10 +++++++++- - 4 files changed, 53 insertions(+), 6 deletions(-) - -diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c -index 8346131..9517329 100644 ---- a/kexec/arch/arm64/crashdump-arm64.c -+++ b/kexec/arch/arm64/crashdump-arm64.c -@@ -213,3 +213,26 @@ int load_crashdump_segments(struct kexec_info *info) - - return 0; - } -+ -+/* -+ * e_entry and p_paddr are actually in virtual address space. -+ * Those values will be translated to physcal addresses by -+ * using virt_to_phys(). -+ * So let's get ready for later use so the memory base (phys_offset) -+ * will be correctly replaced with crash_reserved_mem.start. -+ */ -+void modify_ehdr_for_crashdump(struct mem_ehdr *ehdr) -+{ -+ struct mem_phdr *phdr; -+ int i; -+ -+ ehdr->e_entry += - arm64_mem.phys_offset + crash_reserved_mem.start; -+ -+ for (i = 0; i < ehdr->e_phnum; i++) { -+ phdr = &ehdr->e_phdr[i]; -+ if (phdr->p_type != PT_LOAD) -+ continue; -+ phdr->p_paddr += -+ (-arm64_mem.phys_offset + crash_reserved_mem.start); -+ } -+} -diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h -index da75a2d..382f571 100644 ---- a/kexec/arch/arm64/crashdump-arm64.h -+++ b/kexec/arch/arm64/crashdump-arm64.h -@@ -21,5 +21,6 @@ extern struct memory_range crash_reserved_mem; - extern struct memory_range elfcorehdr_mem; - - extern int load_crashdump_segments(struct kexec_info *info); -+extern void modify_ehdr_for_crashdump(struct mem_ehdr *ehdr); - - #endif /* CRASHDUMP_ARM64_H */ -diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c -index 8ac811d..cec4e41 100644 ---- a/kexec/arch/arm64/kexec-arm64.c -+++ b/kexec/arch/arm64/kexec-arm64.c -@@ -307,12 +307,27 @@ unsigned long arm64_locate_kernel_segment(struct kexec_info *info) - { - unsigned long hole; - -- hole = locate_hole(info, -- arm64_mem.text_offset + arm64_mem.image_size, -- MiB(2), 0, ULONG_MAX, 1); -+ if (info->kexec_flags & KEXEC_ON_CRASH) { -+ unsigned long hole_end; -+ -+ hole = (crash_reserved_mem.start < mem_min ? -+ mem_min : crash_reserved_mem.start); -+ hole = _ALIGN_UP(hole, MiB(2)); -+ hole_end = hole + arm64_mem.text_offset + arm64_mem.image_size; -+ -+ if ((hole_end > mem_max) || -+ (hole_end > crash_reserved_mem.end)) { -+ dbgprintf("%s: Crash kernel out of range\n", __func__); -+ hole = ULONG_MAX; -+ } -+ } else { -+ hole = locate_hole(info, -+ arm64_mem.text_offset + arm64_mem.image_size, -+ MiB(2), 0, ULONG_MAX, 1); - -- if (hole == ULONG_MAX) -- dbgprintf("%s: locate_hole failed\n", __func__); -+ if (hole == ULONG_MAX) -+ dbgprintf("%s: locate_hole failed\n", __func__); -+ } - - return hole; - } -diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c -index c70a37a..842ce21 100644 ---- a/kexec/arch/arm64/kexec-elf-arm64.c -+++ b/kexec/arch/arm64/kexec-elf-arm64.c -@@ -9,6 +9,7 @@ - #include <stdlib.h> - #include <linux/elf.h> - -+#include "crashdump-arm64.h" - #include "kexec-arm64.h" - #include "kexec-elf.h" - #include "kexec-syscall.h" -@@ -105,7 +106,8 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf, - } - - arm64_mem.vp_offset = _ALIGN_DOWN(ehdr.e_entry, MiB(2)); -- arm64_mem.vp_offset -= kernel_segment - get_phys_offset(); -+ if (!(info->kexec_flags & KEXEC_ON_CRASH)) -+ arm64_mem.vp_offset -= kernel_segment - get_phys_offset(); - - dbgprintf("%s: kernel_segment: %016lx\n", __func__, kernel_segment); - dbgprintf("%s: text_offset: %016lx\n", __func__, -@@ -127,6 +129,12 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf, - __func__); - goto exit; - } -+ -+ /* -+ * offset addresses in order to fit vmlinux -+ * (elf_exec) into crash kernel's memory -+ */ -+ modify_ehdr_for_crashdump(&ehdr); - } - - /* load the kernel */ --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch deleted file mode 100644 index 2745466db..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 07ad14e12665221d754fde8e47c32ac18c24586a Mon Sep 17 00:00:00 2001 -From: AKASHI Takahiro <takahiro.akashi@linaro.org> -Date: Fri, 31 Jul 2015 20:01:39 +0900 -Subject: [PATCH 7/9] arm64: kdump: set up other segments - -We make sure that all the other segments, initrd and device-tree blob, -also be loaded into the reserved memory of crash dump kernel. - -Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] - -Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - kexec/arch/arm64/kexec-arm64.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c -index cec4e41..78a0035 100644 ---- a/kexec/arch/arm64/kexec-arm64.c -+++ b/kexec/arch/arm64/kexec-arm64.c -@@ -374,7 +374,10 @@ int arm64_load_other_segments(struct kexec_info *info, - /* Put the other segments after the image. */ - - hole_min = image_base + arm64_mem.image_size; -- hole_max = ULONG_MAX; -+ if (info->kexec_flags & KEXEC_ON_CRASH) -+ hole_max = crash_reserved_mem.end; -+ else -+ hole_max = ULONG_MAX; - - if (arm64_opts.initrd) { - initrd_buf = slurp_file(arm64_opts.initrd, &initrd_size); --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch deleted file mode 100644 index 31c3d8510..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 23bf7ac189cc3b87ceb9d1d3b69b5c4815354add Mon Sep 17 00:00:00 2001 -From: AKASHI Takahiro <takahiro.akashi@linaro.org> -Date: Wed, 27 Jan 2016 13:38:39 +0900 -Subject: [PATCH 8/9] arm64: kdump: add DT properties to crash dump kernel's - dtb - -We pass the following properties to crash dump kernel: -linux,elfcorehdr: elf core header segment, - same as "elfcorehdr=" kernel parameter on other archs -linux,usable-memory-range: usable memory reserved for crash dump kernel - -Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] - -Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - kexec/arch/arm64/kexec-arm64.c | 76 +++++++++++++++++++++++++++++++++++--- - kexec/arch/arm64/kexec-elf-arm64.c | 5 --- - 2 files changed, 71 insertions(+), 10 deletions(-) - -diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c -index 78a0035..a8fb64f 100644 ---- a/kexec/arch/arm64/kexec-arm64.c -+++ b/kexec/arch/arm64/kexec-arm64.c -@@ -128,9 +128,6 @@ int arch_process_options(int argc, char **argv) - case OPT_INITRD: - arm64_opts.initrd = optarg; - break; -- case OPT_PANIC: -- die("load-panic (-p) not supported"); -- break; - default: - break; /* Ignore core and unknown options. */ - } -@@ -285,8 +282,12 @@ on_success: - * setup_2nd_dtb - Setup the 2nd stage kernel's dtb. - */ - --static int setup_2nd_dtb(struct dtb *dtb, char *command_line) -+static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash) - { -+ char *new_buf; -+ int new_size; -+ int nodeoffset; -+ uint64_t range[2]; - int result; - - result = fdt_check_header(dtb->buf); -@@ -298,8 +299,72 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line) - - result = set_bootargs(dtb, command_line); - -+ /* remove those anyway */ -+ nodeoffset = fdt_path_offset(dtb->buf, "/chosen"); -+ fdt_delprop(dtb->buf, nodeoffset, "linux,crashkernel-base"); -+ fdt_delprop(dtb->buf, nodeoffset, "linux,crashkernel-size"); -+ -+ if (on_crash) { -+ nodeoffset = fdt_path_offset(dtb->buf, "/chosen"); -+ fdt_delprop(dtb->buf, nodeoffset, "linux,elfcorehdr"); -+ fdt_delprop(dtb->buf, nodeoffset, "linux,usable-memory-range"); -+ new_size = fdt_totalsize(dtb->buf) -+ + 2 * (sizeof(struct fdt_property) -+ + FDT_TAGALIGN(sizeof(range))) -+ + strlen("linux,elfcorehdr") + 1 -+ + strlen("linux,usable-memory-range") + 1; -+ -+ new_buf = xmalloc(new_size); -+ result = fdt_open_into(dtb->buf, new_buf, new_size); -+ if (result) { -+ dbgprintf("%s: fdt_open_into failed: %s\n", __func__, -+ fdt_strerror(result)); -+ result = -ENOSPC; -+ goto on_error; -+ } -+ -+ range[0] = cpu_to_be64(elfcorehdr_mem.start); -+ range[1] = cpu_to_be64(elfcorehdr_mem.end -+ - elfcorehdr_mem.start + 1); -+ nodeoffset = fdt_path_offset(new_buf, "/chosen"); -+ result = fdt_setprop(new_buf, nodeoffset, "linux,elfcorehdr", -+ (void *)range, sizeof(range)); -+ if (result) { -+ dbgprintf("%s: fdt_setprop failed: %s\n", __func__, -+ fdt_strerror(result)); -+ result = -EINVAL; -+ goto on_error; -+ } -+ -+ range[0] = cpu_to_be64(crash_reserved_mem.start); -+ range[1] = cpu_to_be64(crash_reserved_mem.end -+ - crash_reserved_mem.start + 1); -+ nodeoffset = fdt_path_offset(new_buf, "/chosen"); -+ result = fdt_setprop(new_buf, nodeoffset, -+ "linux,usable-memory-range", -+ (void *)range, sizeof(range)); -+ if (result) { -+ dbgprintf("%s: fdt_setprop failed: %s\n", __func__, -+ fdt_strerror(result)); -+ result = -EINVAL; -+ goto on_error; -+ } -+ -+ fdt_pack(new_buf); -+ dtb->buf = new_buf; -+ dtb->size = fdt_totalsize(new_buf); -+ } -+ - dump_reservemap(dtb); - -+ -+ return result; -+ -+on_error: -+ fprintf(stderr, "kexec: %s failed.\n", __func__); -+ if (new_buf) -+ free(new_buf); -+ - return result; - } - -@@ -366,7 +431,8 @@ int arm64_load_other_segments(struct kexec_info *info, - } - } - -- result = setup_2nd_dtb(&dtb, command_line); -+ result = setup_2nd_dtb(&dtb, command_line, -+ info->kexec_flags & KEXEC_ON_CRASH); - - if (result) - return -EFAILED; -diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c -index 842ce21..b17a31a 100644 ---- a/kexec/arch/arm64/kexec-elf-arm64.c -+++ b/kexec/arch/arm64/kexec-elf-arm64.c -@@ -47,11 +47,6 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf, - int result; - int i; - -- if (info->kexec_flags & KEXEC_ON_CRASH) { -- fprintf(stderr, "kexec: kdump not yet supported on arm64\n"); -- return -EFAILED; -- } -- - result = build_elf_exec_info(kernel_buf, kernel_size, &ehdr, 0); - - if (result < 0) { --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch deleted file mode 100644 index 8b1c0183e..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 5a4958f01a793c3e7f440f5bae75666a4349cc50 Mon Sep 17 00:00:00 2001 -From: Pratyush Anand <panand@redhat.com> -Date: Thu, 14 May 2015 11:25:37 +0530 -Subject: [PATCH 9/9] arm64: kdump: Add support for binary image files - -This patch adds support to use binary image ie arch/arm64/boot/Image with -kdump. - -Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] - -Signed-off-by: Pratyush Anand <panand@redhat.com> -[takahiro.akashi@linaro.org: a bit reworked] -Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - kexec/arch/arm64/kexec-image-arm64.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/kexec/arch/arm64/kexec-image-arm64.c b/kexec/arch/arm64/kexec-image-arm64.c -index 960ed96..982e431 100644 ---- a/kexec/arch/arm64/kexec-image-arm64.c -+++ b/kexec/arch/arm64/kexec-image-arm64.c -@@ -4,7 +4,9 @@ - - #define _GNU_SOURCE - -+#include "crashdump-arm64.h" - #include "kexec-arm64.h" -+#include "kexec-syscall.h" - #include <limits.h> - - int image_arm64_probe(const char *kernel_buf, off_t kernel_size) -@@ -58,6 +60,16 @@ int image_arm64_load(int argc, char **argv, const char *kernel_buf, - dbgprintf("%s: PE format: %s\n", __func__, - (arm64_header_check_pe_sig(header) ? "yes" : "no")); - -+ if (info->kexec_flags & KEXEC_ON_CRASH) { -+ /* create and initialize elf core header segment */ -+ result = load_crashdump_segments(info); -+ if (result) { -+ dbgprintf("%s: Creating eflcorehdr failed.\n", -+ __func__); -+ goto exit; -+ } -+ } -+ - /* load the kernel */ - add_segment_phys_virt(info, kernel_buf, kernel_size, - kernel_segment + arm64_mem.text_offset, --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch deleted file mode 100644 index b03f58257..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch +++ /dev/null @@ -1,801 +0,0 @@ -From: Geoff Levand <geoff@infradead.org> -Date: Mon, 15 Jul 2013 23:32:36 +0000 (-0700) -Subject: Add arm64 support -X-Git-Url: https://git.linaro.org/gitweb?p=people%2Fgeoff%2Fkexec-tools.git;a=commitdiff_plain;h=fbf5ac6c2c70ec0f6da2b9ff563e573999752c01 - -Add arm64 support - -Signed-off-by: Geoff Levand <geoff@infradead.org> - -Get patch from: -https://fedorapeople.org/~hrw/aarch64/for-fedora/kexec-aarch64.patch - -Upstream-Status: Pending - -Signed-off-by: Kai Kang <kai.kang@windriver.com> ---- - ---- - configure.ac | 3 - kexec/Makefile | 1 - kexec/arch/arm64/Makefile | 13 + - kexec/arch/arm64/crashdump-arm64.c | 305 ++++++++++++++++++++++++++++++++ - kexec/arch/arm64/include/arch/options.h | 26 ++ - kexec/arch/arm64/kexec-arm64.c | 177 ++++++++++++++++++ - kexec/arch/arm64/kexec-arm64.h | 20 ++ - kexec/arch/arm64/kexec-elf-arm64.c | 114 +++++++++++ - kexec/kexec-syscall.h | 9 - kexec/kexec.c | 2 - purgatory/arch/arm64/Makefile | 7 - 11 files changed, 675 insertions(+), 2 deletions(-) - -Index: kexec-tools-2.0.10/configure.ac -=================================================================== ---- kexec-tools-2.0.10.orig/configure.ac -+++ kexec-tools-2.0.10/configure.ac -@@ -36,6 +36,9 @@ case $target_cpu in - ARCH="ppc64" - SUBARCH="LE" - ;; -+ aarch64* ) -+ ARCH="arm64" -+ ;; - arm* ) - ARCH="arm" - ;; -Index: kexec-tools-2.0.10/kexec/Makefile -=================================================================== ---- kexec-tools-2.0.10.orig/kexec/Makefile -+++ kexec-tools-2.0.10/kexec/Makefile -@@ -71,6 +71,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT) - - include $(srcdir)/kexec/arch/alpha/Makefile - include $(srcdir)/kexec/arch/arm/Makefile -+include $(srcdir)/kexec/arch/arm64/Makefile - include $(srcdir)/kexec/arch/i386/Makefile - include $(srcdir)/kexec/arch/ia64/Makefile - include $(srcdir)/kexec/arch/m68k/Makefile -Index: kexec-tools-2.0.10/kexec/arch/arm64/Makefile -=================================================================== ---- /dev/null -+++ kexec-tools-2.0.10/kexec/arch/arm64/Makefile -@@ -0,0 +1,13 @@ -+ -+arm64_KEXEC_SRCS += \ -+ kexec/arch/arm64/kexec-arm64.c \ -+ kexec/arch/arm64/kexec-elf-arm64.c \ -+ kexec/arch/arm64/crashdump-arm64.c -+ -+arm64_ARCH_REUSE_INITRD = -+arm64_ADD_SEGMENT = -+arm64_VIRT_TO_PHYS = -+ -+dist += $(arm64_KEXEC_SRCS) \ -+ kexec/arch/arm64/Makefile \ -+ kexec/arch/arm64/kexec-arm64.h -Index: kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c -=================================================================== ---- /dev/null -+++ kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c -@@ -0,0 +1,305 @@ -+/* -+ * 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 (version 2 of the License). -+ */ -+ -+#include "../../kexec.h" -+#include "../../kexec-elf.h" -+#include "../../crashdump.h" -+ -+int is_crashkernel_mem_reserved(void) -+{ -+ return 0; -+} -+ -+#if 0 -+/* -+ * Used to save various memory ranges/regions needed for the captured -+ * kernel to boot. (lime memmap= option in other archs) -+ */ -+static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES]; -+struct memory_ranges usablemem_rgns = { -+ .size = 0, -+ .ranges = crash_memory_ranges, -+}; -+ -+/* memory range reserved for crashkernel */ -+static struct memory_range crash_reserved_mem; -+ -+static struct crash_elf_info elf_info = { -+ .class = ELFCLASS32, -+ .data = ELFDATA2LSB, -+ .machine = EM_ARM, -+ .page_offset = PAGE_OFFSET, -+}; -+ -+unsigned long phys_offset; -+ -+/** -+ * crash_range_callback() - callback called for each iomem region -+ * @data: not used -+ * @nr: not used -+ * @str: name of the memory region -+ * @base: start address of the memory region -+ * @length: size of the memory region -+ * -+ * This function is called once for each memory region found in /proc/iomem. It -+ * locates system RAM and crashkernel reserved memory and places these to -+ * variables: @crash_memory_ranges and @crash_reserved_mem. Number of memory -+ * regions is placed in @crash_memory_nr_ranges. -+ */ -+static int crash_range_callback(void *UNUSED(data), int UNUSED(nr), -+ char *str, unsigned long base, -+ unsigned long length) -+{ -+ struct memory_range *range; -+ -+ if (usablemem_rgns.size >= CRASH_MAX_MEMORY_RANGES) -+ return 1; -+ -+ range = usablemem_rgns.ranges + usablemem_rgns.size; -+ -+ if (strncmp(str, "System RAM\n", 11) == 0) { -+ range->start = base; -+ range->end = base + length - 1; -+ range->type = RANGE_RAM; -+ usablemem_rgns.size++; -+ } else if (strncmp(str, "Crash kernel\n", 13) == 0) { -+ crash_reserved_mem.start = base; -+ crash_reserved_mem.end = base + length - 1; -+ crash_reserved_mem.type = RANGE_RAM; -+ } -+ -+ return 0; -+} -+ -+/** -+ * crash_exclude_range() - excludes memory region reserved for crashkernel -+ * -+ * Function locates where crashkernel reserved memory is and removes that region -+ * from the available memory regions. -+ */ -+static void crash_exclude_range(void) -+{ -+ const struct memory_range *range = &crash_reserved_mem; -+ int i; -+ -+ for (i = 0; i < usablemem_rgns.size; i++) { -+ struct memory_range *r = usablemem_rgns.ranges + i; -+ -+ /* -+ * We assume that crash area is fully contained in -+ * some larger memory area. -+ */ -+ if (r->start <= range->start && r->end >= range->end) { -+ struct memory_range *new; -+ /* -+ * Let's split this area into 2 smaller ones and -+ * remove excluded range from between. First create -+ * new entry for the remaining area. -+ */ -+ new = usablemem_rgns.ranges + usablemem_rgns.size; -+ new->start = range->end + 1; -+ new->end = r->end; -+ usablemem_rgns.size++; -+ /* -+ * Next update this area to end before excluded range. -+ */ -+ r->end = range->start - 1; -+ break; -+ } -+ } -+} -+ -+static int range_cmp(const void *a1, const void *a2) -+{ -+ const struct memory_range *r1 = a1; -+ const struct memory_range *r2 = a2; -+ -+ if (r1->start > r2->start) -+ return 1; -+ if (r1->start < r2->start) -+ return -1; -+ -+ return 0; -+} -+ -+/** -+ * crash_get_memory_ranges() - read system physical memory -+ * -+ * Function reads through system physical memory and stores found memory regions -+ * in @crash_memory_ranges. Number of memory regions found is placed in -+ * @crash_memory_nr_ranges. Regions are sorted in ascending order. -+ * -+ * Returns %0 in case of success and %-1 otherwise (errno is set). -+ */ -+static int crash_get_memory_ranges(void) -+{ -+ /* -+ * First read all memory regions that can be considered as -+ * system memory including the crash area. -+ */ -+ kexec_iomem_for_each_line(NULL, crash_range_callback, NULL); -+ -+ if (usablemem_rgns.size < 1) { -+ errno = EINVAL; -+ return -1; -+ } -+ -+ /* -+ * Exclude memory reserved for crashkernel (this may result a split memory -+ * region). -+ */ -+ crash_exclude_range(); -+ -+ /* -+ * Make sure that the memory regions are sorted. -+ */ -+ qsort(usablemem_rgns.ranges, usablemem_rgns.size, -+ sizeof(*usablemem_rgns.ranges), range_cmp); -+ -+ return 0; -+} -+ -+/** -+ * cmdline_add_elfcorehdr() - adds elfcorehdr= to @cmdline -+ * @cmdline: buffer where parameter is placed -+ * @elfcorehdr: physical address of elfcorehdr -+ * -+ * Function appends 'elfcorehdr=start' at the end of the command line given in -+ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long -+ * (inclunding %NUL). -+ */ -+static void cmdline_add_elfcorehdr(char *cmdline, unsigned long elfcorehdr) -+{ -+ char buf[COMMAND_LINE_SIZE]; -+ int buflen; -+ -+ buflen = snprintf(buf, sizeof(buf), "%s elfcorehdr=%#lx", -+ cmdline, elfcorehdr); -+ if (buflen < 0) -+ die("Failed to construct elfcorehdr= command line parameter\n"); -+ if (buflen >= sizeof(buf)) -+ die("Command line overflow\n"); -+ -+ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE); -+ cmdline[COMMAND_LINE_SIZE - 1] = '\0'; -+} -+ -+/** -+ * cmdline_add_mem() - adds mem= parameter to kernel command line -+ * @cmdline: buffer where parameter is placed -+ * @size: size of the kernel reserved memory (in bytes) -+ * -+ * This function appends 'mem=size' at the end of the command line given in -+ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long -+ * (including %NUL). -+ */ -+static void cmdline_add_mem(char *cmdline, unsigned long size) -+{ -+ char buf[COMMAND_LINE_SIZE]; -+ int buflen; -+ -+ buflen = snprintf(buf, sizeof(buf), "%s mem=%ldK", cmdline, size >> 10); -+ if (buflen < 0) -+ die("Failed to construct mem= command line parameter\n"); -+ if (buflen >= sizeof(buf)) -+ die("Command line overflow\n"); -+ -+ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE); -+ cmdline[COMMAND_LINE_SIZE - 1] = '\0'; -+} -+ -+static unsigned long long range_size(const struct memory_range *r) -+{ -+ return r->end - r->start + 1; -+} -+ -+static void dump_memory_ranges(void) -+{ -+ int i; -+ -+ if (!kexec_debug) -+ return; -+ -+ dbgprintf("crashkernel: [%#llx - %#llx] (%ldM)\n", -+ crash_reserved_mem.start, crash_reserved_mem.end, -+ (unsigned long)range_size(&crash_reserved_mem) >> 20); -+ -+ for (i = 0; i < usablemem_rgns.size; i++) { -+ struct memory_range *r = usablemem_rgns.ranges + i; -+ dbgprintf("memory range: [%#llx - %#llx] (%ldM)\n", -+ r->start, r->end, (unsigned long)range_size(r) >> 20); -+ } -+} -+ -+/** -+ * load_crashdump_segments() - loads additional segments needed for kdump -+ * @info: kexec info structure -+ * @mod_cmdline: kernel command line -+ * -+ * This function loads additional segments which are needed for the dump capture -+ * kernel. It also updates kernel command line passed in @mod_cmdline to have -+ * right parameters for the dump capture kernel. -+ * -+ * Return %0 in case of success and %-1 in case of error. -+ */ -+int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) -+{ -+ unsigned long elfcorehdr; -+ unsigned long bufsz; -+ void *buf; -+ int err; -+ -+ /* -+ * First fetch all the memory (RAM) ranges that we are going to pass to -+ * the crashdump kernel during panic. -+ */ -+ err = crash_get_memory_ranges(); -+ if (err) -+ return err; -+ -+ /* -+ * Now that we have memory regions sorted, we can use first memory -+ * region as PHYS_OFFSET. -+ */ -+ phys_offset = usablemem_rgns.ranges->start; -+ dbgprintf("phys_offset: %#lx\n", phys_offset); -+ -+ err = crash_create_elf32_headers(info, &elf_info, -+ usablemem_rgns.ranges, -+ usablemem_rgns.size, &buf, &bufsz, -+ ELF_CORE_HEADER_ALIGN); -+ if (err) -+ return err; -+ -+ /* -+ * We allocate ELF core header from the end of the memory area reserved -+ * for the crashkernel. We align the header to SECTION_SIZE (which is -+ * 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. -+ */ -+ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20, -+ crash_reserved_mem.start, -+ crash_reserved_mem.end, -1, 0); -+ -+ dbgprintf("elfcorehdr: %#lx\n", elfcorehdr); -+ cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr); -+ -+ /* -+ * Add 'mem=size' parameter to dump capture kernel command line. This -+ * prevents the dump capture kernel from using any other memory regions -+ * which belong to the primary kernel. -+ */ -+ cmdline_add_mem(mod_cmdline, elfcorehdr - crash_reserved_mem.start); -+ -+ dump_memory_ranges(); -+ dbgprintf("kernel command line: \"%s\"\n", mod_cmdline); -+ -+ return 0; -+} -+ -+#endif -+ -Index: kexec-tools-2.0.10/kexec/arch/arm64/include/arch/options.h -=================================================================== ---- /dev/null -+++ kexec-tools-2.0.10/kexec/arch/arm64/include/arch/options.h -@@ -0,0 +1,26 @@ -+#ifndef KEXEC_ARCH_ARM64_OPTIONS_H -+#define KEXEC_ARCH_ARM64_OPTIONS_H -+ -+//#define OPT_ARCH_MAX ((OPT_MAX)+0) -+ -+#define OPT_APPEND ((OPT_MAX)+0) -+#define OPT_RAMDISK ((OPT_MAX)+1) -+#define OPT_DTB ((OPT_MAX)+2) -+ -+#define OPT_ARCH_MAX ((OPT_MAX)+3) -+ -+ -+#define KEXEC_ARCH_OPTIONS \ -+ KEXEC_OPTIONS \ -+ { "append", 1, NULL, OPT_APPEND }, \ -+ { "command-line", 1, NULL, OPT_APPEND }, \ -+ { "dtb", 1, NULL, OPT_DTB }, \ -+ { "initrd", 1, NULL, OPT_RAMDISK }, \ -+ { "ramdisk", 1, NULL, OPT_RAMDISK }, \ -+ -+#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR /* Only accept long arch options. */ -+ -+#define KEXEC_ALL_OPTIONS KEXEC_ARCH_OPTIONS -+#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR -+ -+#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */ -Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.c -=================================================================== ---- /dev/null -+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.c -@@ -0,0 +1,177 @@ -+/* -+ * ARM64 kexec support. -+ */ -+ -+#define _GNU_SOURCE -+ -+#include <errno.h> -+#include <stddef.h> -+ -+//#include <linux/kexec.h> -+ -+#include "../../kexec.h" -+#include "../../kexec-syscall.h" -+#include "kexec-arm64.h" -+ -+ -+void arch_usage(void) -+{ -+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); -+ -+ printf( -+" --append=STRING Set the kernel command line to STRING.\n" -+" --command-line=STRING Set the kernel command line to STRING.\n" -+" --dtb=FILE Use FILE as the device tree blob.\n" -+" --initrd=FILE Use FILE as the kernel initial ramdisk.\n" -+" --ramdisk=FILE Use FILE as the kernel initial ramdisk.\n"); -+ -+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); -+} -+ -+int arch_process_options(int UNUSED(argc), char **UNUSED(argv)) -+{ -+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); -+ return 0; -+} -+ -+const struct arch_map_entry arches[] = { -+ { "aarch64", KEXEC_ARCH_ARM64 }, -+ { NULL, 0 }, -+}; -+ -+void arch_update_purgatory(struct kexec_info *UNUSED(info)) -+{ -+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); -+} -+ -+unsigned long virt_to_phys(unsigned long addr) -+{ -+ fprintf(stderr, "%s:%d: %016lx -> %016lx\n", __func__, __LINE__, addr, -+ addr + 0x080000000UL); -+ return addr + 0x080000000UL; -+} -+ -+void add_segment(struct kexec_info *info, const void *buf, size_t bufsz, -+ unsigned long base, size_t memsz) -+{ -+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); -+ add_segment_phys_virt(info, buf, bufsz, base, memsz, 1); -+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); -+} -+ -+static int get_memory_ranges_1(struct memory_range **range, int *ranges, -+ unsigned long kexec_flags) -+{ -+ static struct memory_range memory_range[KEXEC_SEGMENT_MAX]; -+ const char *iomem; -+ int range_count = 0; -+ char line[MAX_LINE]; -+ FILE *fp; -+ -+ iomem = proc_iomem(); -+ fp = fopen(iomem, "r"); -+ -+ if (!fp) { -+ fprintf(stderr, "Cannot open %s: %s\n", -+ iomem, strerror(errno)); -+ return -1; -+ } -+ -+ dbgprintf("memory ranges:\n"); -+ -+ while(fgets(line, sizeof(line), fp) != 0) { -+ struct memory_range r; -+ char *str; -+ int consumed; -+ -+ if (range_count >= KEXEC_SEGMENT_MAX) -+ break; -+ -+ if (sscanf(line, "%Lx-%Lx : %n", &r.start, &r.end, &consumed) -+ != 2) -+ continue; -+ -+ str = line + consumed; -+ r.end++; -+ -+ if (memcmp(str, "System RAM\n", 11)) { -+ dbgprintf(" Skip: %016Lx - %016Lx : %s", r.start, r.end, -+ str); -+ continue; -+ } -+ -+ r.type = RANGE_RAM; -+ memory_range[range_count] = r; -+ range_count++; -+ -+ dbgprintf(" Add: %016Lx - %016Lx : %s", r.start, r.end, str); -+ } -+ -+ fclose(fp); -+ *range = memory_range; -+ *ranges = range_count; -+ -+ return 0; -+} -+ -+static int get_memory_ranges_2(struct memory_range **range, int *ranges, -+ unsigned long UNUSED(kexec_flags)) -+{ -+ static struct memory_range memory_range[2]; -+ -+ memory_range[0].start = 0x080000000; -+ memory_range[0].end = 0x100000000; -+ memory_range[0].type = RANGE_RAM; -+ -+ memory_range[1].start = 0x900000000; -+ memory_range[1].end = 0x880000000; -+ memory_range[1].type = RANGE_RAM; -+ -+ *range = memory_range; -+ *ranges = sizeof(memory_range) / sizeof(memory_range[0]); -+ -+ return 0; -+} -+ -+int get_memory_ranges(struct memory_range **range, int *ranges, -+ unsigned long kexec_flags) -+{ -+ /* FIXME: Should get this info from device tree. */ -+ -+ return get_memory_ranges_1(range, ranges, kexec_flags); -+} -+ -+struct file_type file_type[] = { -+ { "elf-arm64", elf_arm64_probe, elf_arm64_load, elf_arm64_usage }, -+}; -+ -+int file_types = sizeof(file_type) / sizeof(file_type[0]); -+ -+int arch_compat_trampoline(struct kexec_info *info) -+{ -+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); -+ return 0; -+} -+ -+void arch_reuse_initrd(void) -+{ -+} -+ -+int machine_verify_elf_rel(struct mem_ehdr *ehdr) -+{ -+ (void)ehdr; -+ -+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); -+ return 0; -+} -+ -+void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type, -+ void *location, unsigned long address, unsigned long value) -+{ -+ (void)ehdr; -+ (void)r_type; -+ (void)location; -+ (void)address; -+ (void)value; -+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); -+} -Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.h -=================================================================== ---- /dev/null -+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.h -@@ -0,0 +1,20 @@ -+/* -+ * ARM64 kexec support. -+ */ -+ -+#if !defined(KEXEC_ARM64_H) -+#define KEXEC_ARM64_H -+ -+/* #include <linux/kexec.h> FIXME: this is broken */ -+#include <sys/types.h> -+ -+#include "../../kexec.h" -+ -+#define KEXEC_SEGMENT_MAX 16 /* FIXME: this should come from <linux/kexec.h> */ -+ -+int elf_arm64_probe(const char *buf, off_t len); -+int elf_arm64_load(int argc, char **argv, const char *buf, off_t len, -+ struct kexec_info *info); -+void elf_arm64_usage(void); -+ -+#endif -\ No newline at end of file -Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-elf-arm64.c -=================================================================== ---- /dev/null -+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-elf-arm64.c -@@ -0,0 +1,114 @@ -+/* -+ * ARM64 kexec support. -+ */ -+ -+#define _GNU_SOURCE -+ -+#include <elf.h> -+#include <getopt.h> -+ -+#include "../../kexec-syscall.h" -+ -+#include "kexec-arm64.h" -+#include "arch/options.h" -+ -+#if !defined(EM_AARCH64) -+# define EM_AARCH64 183 -+#endif -+ -+int elf_arm64_probe(const char *buf, off_t len) -+{ -+ int result; -+ struct mem_ehdr ehdr; -+ -+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); -+ -+ result = build_elf_exec_info(buf, len, &ehdr, 0); -+ -+ if (result < 0) { -+ dbgprintf("Not an ELF executable\n"); -+ goto out; -+ } -+ -+ if (ehdr.e_machine != EM_AARCH64) { -+ dbgprintf("Not an AARCH64 executable\n"); -+ result = -1; -+ goto out; -+ } -+ -+ result = 0; -+ -+out: -+ free_elf_info(&ehdr); -+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); -+ return result; -+} -+ -+int elf_arm64_load(int argc, char **argv, const char *buf, off_t len, -+ struct kexec_info *info) -+{ -+ static const struct option options[] = { -+ KEXEC_ARCH_OPTIONS -+ { 0 } -+ }; -+ static const char short_options[] = KEXEC_OPT_STR ""; -+ const char *command_line = NULL; -+ unsigned int command_line_len = 0; -+ const char *ramdisk = NULL; -+ const char *dtb = NULL; -+ int opt; -+ struct mem_ehdr ehdr; -+ int result; -+ -+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); -+ -+ while ((opt = getopt_long(argc, argv, short_options, options, 0)) -+ != -1) { -+ switch (opt) { -+ default: -+ if (opt < OPT_MAX) /* Ignore core options */ -+ break; -+ case OPT_APPEND: -+ command_line = optarg; -+ command_line_len = strlen(command_line) + 1; -+ break; -+ case OPT_RAMDISK: -+ ramdisk = optarg; -+ break; -+ case OPT_DTB: -+ dtb = optarg; -+ break; -+ } -+ } -+ -+ fprintf(stderr, "%s:%d: command_line: %s\n", __func__, __LINE__, command_line); -+ fprintf(stderr, "%s:%d: ramdisk: %s\n", __func__, __LINE__, ramdisk); -+ fprintf(stderr, "%s:%d: dtb: %s\n", __func__, __LINE__, dtb); -+ -+ if (info->kexec_flags & KEXEC_ON_CRASH) { -+ fprintf(stderr, "kexec: kdump not yet supported on arm64\n"); -+ return -1; -+ } -+ -+ result = build_elf_exec_info(buf, len, &ehdr, 0); -+ -+ if (result < 0) { -+ free_elf_info(&ehdr); -+ fprintf(stderr, "%s:%d: free_elf_info failed\n", __func__, -+ __LINE__); -+ return result; -+ } -+ -+ elf_exec_build_load(info, &ehdr, buf, len, 0); -+ -+ info->entry = (void*)0x80080000UL; // FIXME -+ -+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); -+ return 0; -+} -+ -+void elf_arm64_usage(void) -+{ -+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); -+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); -+} -Index: kexec-tools-2.0.10/kexec/kexec-syscall.h -=================================================================== ---- kexec-tools-2.0.10.orig/kexec/kexec-syscall.h -+++ kexec-tools-2.0.10/kexec/kexec-syscall.h -@@ -39,8 +39,8 @@ - #ifdef __s390__ - #define __NR_kexec_load 277 - #endif --#ifdef __arm__ --#define __NR_kexec_load __NR_SYSCALL_BASE + 347 -+#if defined(__arm__) || defined(__arm64__) -+#define __NR_kexec_load __NR_SYSCALL_BASE + 347 - #endif - #if defined(__mips__) - #define __NR_kexec_load 4311 -@@ -108,6 +108,8 @@ static inline long kexec_file_load(int k - #define KEXEC_ARCH_PPC64 (21 << 16) - #define KEXEC_ARCH_IA_64 (50 << 16) - #define KEXEC_ARCH_ARM (40 << 16) -+#define KEXEC_ARCH_ARM64 (183 << 16) -+/* #define KEXEC_ARCH_AARCH64 (183 << 16) */ - #define KEXEC_ARCH_S390 (22 << 16) - #define KEXEC_ARCH_SH (42 << 16) - #define KEXEC_ARCH_MIPS_LE (10 << 16) -@@ -153,5 +155,8 @@ static inline long kexec_file_load(int k - #ifdef __m68k__ - #define KEXEC_ARCH_NATIVE KEXEC_ARCH_68K - #endif -+#if defined(__arm64__) -+#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64 -+#endif - - #endif /* KEXEC_SYSCALL_H */ -Index: kexec-tools-2.0.10/kexec/kexec.c -=================================================================== ---- kexec-tools-2.0.10.orig/kexec/kexec.c -+++ kexec-tools-2.0.10/kexec/kexec.c -@@ -664,6 +664,8 @@ static int my_load(const char *type, int - memset(&info, 0, sizeof(info)); - info.kexec_flags = kexec_flags; - -+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); -+ - result = 0; - if (argc - fileind <= 0) { - fprintf(stderr, "No kernel specified\n"); -Index: kexec-tools-2.0.10/purgatory/arch/arm64/Makefile -=================================================================== ---- /dev/null -+++ kexec-tools-2.0.10/purgatory/arch/arm64/Makefile -@@ -0,0 +1,7 @@ -+# -+# Purgatory arm64 -+# -+ -+arm64_PURGATORY_SRCS = -+ -+dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS) diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb deleted file mode 100644 index 0f6398f13..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb +++ /dev/null @@ -1,65 +0,0 @@ -require kexec-tools.inc -export LDFLAGS = "-L${STAGING_LIBDIR}" -EXTRA_OECONF = " --with-zlib=yes" - -SRC_URI += "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ - file://0002-powerpc-change-the-memory-size-limit.patch \ - file://0001-purgatory-Pass-r-directly-to-linker.patch \ - file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \ - file://0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch \ - file://0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch \ - file://0003-arm64-identify-PHYS_OFFSET-correctly.patch \ - file://0004-arm64-kdump-identify-memory-regions.patch \ - file://0005-arm64-kdump-add-elf-core-header-segment.patch \ - file://0006-arm64-kdump-set-up-kernel-image-segment.patch \ - file://0007-arm64-kdump-set-up-other-segments.patch \ - file://0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch \ - file://0009-arm64-kdump-Add-support-for-binary-image-files.patch \ - file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \ - file://0001-x86-x86_64-Fix-format-warning-with-die.patch \ - file://0002-ppc-Fix-format-warning-with-die.patch \ - file://kexec-x32.patch \ - file://0001-Disable-PIE-during-link.patch \ - file://0001-arm64-Disable-PIC.patch \ - " - -SRC_URI[md5sum] = "b2b2c5e6b29d467d6e99d587fb6b7cf5" -SRC_URI[sha256sum] = "b3e69519d2acced256843b1e8f1ecfa00d9b54fa07449ed78f05b9193f239370" - -SECURITY_PIE_CFLAGS_remove = "-fPIE -pie" - -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_unitdir}/system/kdump.service \ -" - -FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" - -inherit update-rc.d systemd - -INITSCRIPT_PACKAGES = "kdump" -INITSCRIPT_NAME_kdump = "kdump" -INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." - -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_unitdir}/system/kdump.service - sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service - fi -} diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.16.bb b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.16.bb new file mode 100644 index 000000000..ebb483268 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.16.bb @@ -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 = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ + file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" +DEPENDS = "zlib xz" + +PR = "r1" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ + file://kdump \ + file://kdump.conf \ + file://kdump.service \ + file://0002-powerpc-change-the-memory-size-limit.patch \ + file://0001-purgatory-Pass-r-directly-to-linker.patch \ + file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \ + file://kexec-x32.patch \ + file://0001-Disable-PIE-during-link.patch \ + " + +SRC_URI[md5sum] = "5198968de79b5ded96f97f3c2ea9637b" +SRC_URI[sha256sum] = "cf17fc99bf77c9b39f06ee88ac0e86d0349c4a0c3f8214a3cc78eece872f6f3a" + +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_unitdir}/system/kdump.service + sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/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_unitdir}/system/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 ." + +SECURITY_PIE_CFLAGS_remove = "-fPIE -pie" + +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)' + +INSANE_SKIP_${PN} = "arch" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb index 44d013f29..9a172675a 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb @@ -11,6 +11,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" SSTATE_SCAN_FILES += "depmodwrapper" EXTRA_STAGING_FIXMES += "PKGDATA_DIR" +DEPENDS += "kmod-native" do_populate_sysroot[depends] = "" do_install() { @@ -23,17 +24,13 @@ if [ "\$1" != "-a" -o "\$2" != "-b" ]; then echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2 exit 1 fi -if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then - echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2 -else - kernelabi=\$(cat ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion) - if [ "\$kernelabi" != "\$4" ]; then - echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2 - exit 1 - fi + +kernelabi="" +if [ -r "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" ]; then + kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion") fi -if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then +if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2 exec env depmod "\$1" "\$2" "\$3" "\$4" else @@ -45,4 +42,5 @@ EOF SYSROOT_DIRS += "${bindir_crossscripts}" +PACKAGES = "" inherit nopackages diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc index 7fb10b58c..29885fbe7 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc +++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc @@ -14,9 +14,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ " inherit autotools gtk-doc pkgconfig manpages -SRCREV = "ef4257b59c4307b8c627d89f3c7f1feedb32582f" +SRCREV = "aca4eca103d6699543f7ed663335c28c2e9908bb" # Lookout for PV bump too when SRCREV is changed -PV = "24+git${SRCPV}" +PV = "25+git${SRCPV}" SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \ file://depmod-search.conf \ @@ -35,9 +35,7 @@ PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" PACKAGECONFIG[logging] = " --enable-logging,--disable-logging" PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" -do_configure_prepend () { - gtkdocize --docdir ${S}/libkmod/docs --srcdir ${S} -} +GTKDOC_DOCDIR = "${S}/libkmod/docs" do_configure_append () { sed -i 's#}libtool#}${TARGET_SYS}-libtool#' ${B}/doltlibtool diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch index feafcb9b7..5f45fce93 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch +++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch @@ -11,10 +11,10 @@ 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 eb0f9d1..a539968 100644 ---- a/configure.ac -+++ b/configure.ac +Index: git/configure.ac +=================================================================== +--- git.orig/configure.ac ++++ git/configure.ac @@ -14,7 +14,7 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_PREFIX_DEFAULT([/usr]) @@ -23,7 +23,4 @@ index eb0f9d1..a539968 100644 +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]) - --- -1.9.1 - + DOLT diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch index 8161d6128..5d9d40c38 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch +++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch @@ -18,12 +18,12 @@ Upstream-Status: Pending libkmod/libkmod-internal.h | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h -index 0180124..100b40f 100644 ---- a/libkmod/libkmod-internal.h -+++ b/libkmod/libkmod-internal.h -@@ -9,6 +9,10 @@ - #include "macro.h" +Index: git/libkmod/libkmod-internal.h +=================================================================== +--- git.orig/libkmod/libkmod-internal.h ++++ git/libkmod/libkmod-internal.h +@@ -10,6 +10,10 @@ + #include "libkmod.h" +#ifndef O_CLOEXEC @@ -33,6 +33,3 @@ index 0180124..100b40f 100644 static _always_inline_ _printf_format_(2, 3) void kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {} --- -1.7.10.4 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch deleted file mode 100644 index b24813346..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch +++ /dev/null @@ -1,64 +0,0 @@ -From db112739dc4f608a968b8104b382955dc3d96ca3 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 7 Sep 2015 07:40:10 +0000 -Subject: [PATCH] Rectify the function signatures to fix prototype mismatches - -clang is less forgiving when it comes to coding standards, correct the -function signatures to reflect the function logic - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - fsync.c | 7 ++++--- - latencytop.h | 2 +- - 2 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/fsync.c b/fsync.c -index 82dff0e..5cefba9 100644 ---- a/fsync.c -+++ b/fsync.c -@@ -51,7 +51,7 @@ struct fsync_files { - static GList *fsync_data; - - --static chain_file(struct fsync_process *proc, char *filename) -+static void chain_file(struct fsync_process *proc, char *filename) - { - struct fsync_files *file; - GList *item; -@@ -75,7 +75,7 @@ static chain_file(struct fsync_process *proc, char *filename) - proc->files = g_list_append(proc->files, file); - } - --static report_file(char *process, char *file) -+static void report_file(char *process, char *file) - { - struct fsync_process *proc; - GList *item; -@@ -157,9 +157,10 @@ int enable_fsync_tracer(void) - write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync"); - write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk"); - write_to_file("/sys/kernel/debug/tracing/tracing_on", "1"); -+ return ret; - } - --int disable_fsync_tracer(void) -+void disable_fsync_tracer(void) - { - write_to_file("/sys/kernel/debug/tracing/tracing_on", "0"); - } -diff --git a/latencytop.h b/latencytop.h -index 5394d73..9d107a8 100644 ---- a/latencytop.h -+++ b/latencytop.h -@@ -54,5 +54,5 @@ extern char *translate(char *line); - extern void init_translations(char *filename); - extern int fsync_display(int duration); - extern int enable_fsync_tracer(void); --extern int disable_fsync_tracer(void); -+extern void disable_fsync_tracer(void); - extern void update_list(void); --- -2.5.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch deleted file mode 100644 index 7848ccf2a..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch +++ /dev/null @@ -1,49 +0,0 @@ -linux: sysfs: use tracing_on as tracing_enabled is deprecated - -tracing_enabled use in the kernel is being deprecated as per commit -6752ab4a9c30 [tracing: Deprecate tracing_enabled for tracing_on] in -the linux mainline kernel. tracing_enabled use will generate a warning -and may no longer function as expected, therefore move to use tracing_on. - -Upstream-Status: Pending - -Signed-off-by: Dennis Hall <dennis.hall@windriver.com> - -Index: latencytop-0.5/fsync.c -=================================================================== ---- latencytop-0.5.orig/fsync.c 2012-08-03 10:45:49.000000000 -0400 -+++ latencytop-0.5/fsync.c 2012-08-03 10:48:39.000000000 -0400 -@@ -149,19 +149,19 @@ - * cd /sys/kernel/debug/tracing - * echo fsync > current_tracer - * echo ftrace_printk > iter_ctrl -- * echo 1 > tracing_enabled -+ * echo 1 > tracing_on - */ - ret = system("/bin/mount -t debugfs none /sys/kernel/debug/"); - if (!ret) - return -1; - write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync"); - write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk"); -- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1"); -+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1"); - } - - int disable_fsync_tracer(void) - { -- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0"); -+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0"); - } - - -@@ -339,8 +339,8 @@ - if (curduration > 5) - curduration = 5; - /* clear the ftrace buffer */ -- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0"); -- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1"); -+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0"); -+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1"); - key = select(1, &rfds, NULL, NULL, &end); - parse_ftrace(); - print_global_list(); diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch deleted file mode 100644 index 7147fda5d..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch +++ /dev/null @@ -1,43 +0,0 @@ - -Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk> -Upstream-Status: Pending - -diff --git a/Makefile.orig b/Makefile -index 16a2369..fa797a2 100644 ---- a/Makefile.orig -+++ b/Makefile -@@ -1,10 +1,11 @@ --# FIXME: Use autoconf ? --HAS_GTK_GUI = 1 -+# -+# - - DESTDIR = - SBINDIR = /usr/sbin - XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare --LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw -+LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses $(LDFLAGS) -+CC ?= gcc - - OBJS= latencytop.o text_display.o translate.o fsync.o - -@@ -26,16 +27,17 @@ endif - - # We write explicity this "implicit rule" - %.o : %.c -- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@ -+ $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@ - - latencytop: $(OBJS) latencytop.h Makefile -- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop -+ $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop - - clean: - rm -f *~ latencytop DEADJOE *.o - - install: latencytop - mkdir -p $(DESTDIR)/usr/share/latencytop -+ mkdir -p $(DESTDIR)/$(SBINDIR) - install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans - install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/ - install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/ diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop_0.5.bb deleted file mode 100644 index eb19471ce..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop_0.5.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Linux tool for measuring and fixing latency" -HOMEPAGE = "http://www.latencytop.org/" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa" - -inherit pkgconfig - -DEPENDS = "virtual/libintl ncurses glib-2.0" - -PR = "r3" - -SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.gz/73bb3371c6ee0b0e68e25289027e865c/${BP}.tar.gz \ - file://latencytop-makefile.patch \ - file://latencytop-fsync.patch \ - file://0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch \ -" - -SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c" -SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" - -PACKAGECONFIG[x11] = ",,gtk+" - -EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}" - -#CFLAGS += "${LDFLAGS}" - -do_install() { - oe_runmake install DESTDIR=${D} ${EXTRA_OEMAKE_X} -} diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch deleted file mode 100644 index d59a7f7d8..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 272a8a069a8f5f06a1e5dfa0ef12f5f92984728b Mon Sep 17 00:00:00 2001 -From: Noor <noor_ahsan@mentor.com> -Date: Wed, 12 Aug 2015 20:54:00 +0500 -Subject: [PATCH] Makefile: Add LDFLAGS variable to SLDFLAGS. - -* Add LDFLAGS variable to SLDFLAGS so that extra linker - flags can be sent via this variable. - -Upstream-Status: Submitted [perfmon2-libpfm4-commits@lists.sourceforge.net] - -Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com> ---- - lib/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/Makefile b/lib/Makefile -index 1cc8765..4bd92ef 100644 ---- a/lib/Makefile -+++ b/lib/Makefile -@@ -187,7 +187,7 @@ CFLAGS += -DCONFIG_PFMLIB_CELL - endif - - ifeq ($(SYS),Linux) --SLDFLAGS=-shared -Wl,-soname -Wl,$(VLIBPFM) -+SLDFLAGS=$(LDFLAGS) -shared -Wl,-soname -Wl,$(VLIBPFM) - SLIBPFM=libpfm.so.$(VERSION).$(REVISION).$(AGE) - VLIBPFM=libpfm.so.$(VERSION) - SOLIBEXT=so --- -1.7.9.5 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch deleted file mode 100644 index 25d47ef12..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch +++ /dev/null @@ -1,38 +0,0 @@ -Upstream-Status: Pending - -Fix compile error: - -| syst_count.c:346:3: error: this 'for' clause does not guard... [-Werror=misleading-indentation] -| for(c=cmin ; c < cmax; c++) -| ^~~ - -Signed-off-by: Kai Kang <kai.kang@windriver.com> ---- -diff --git a/perf_examples/syst_count.c b/perf_examples/syst_count.c -index 0d53078..2dfb9b9 100644 ---- a/perf_examples/syst_count.c -+++ b/perf_examples/syst_count.c -@@ -343,8 +343,9 @@ measure(void) - - for (delay = 1 ; delay <= options.delay; delay++) { - -- for(c=cmin ; c < cmax; c++) -- start_cpu(c); -+ for(c=cmin ; c < cmax; c++) { -+ start_cpu(c); -+ } - - if (0) { - tv.tv_sec = 0; -@@ -353,8 +354,9 @@ measure(void) - } else - sleep(1); - -- for(c=cmin ; c < cmax; c++) -- stop_cpu(c); -+ for(c=cmin ; c < cmax; c++) { -+ stop_cpu(c); -+ } - - for(c = cmin; c < cmax; c++) { - printf("# %'ds -----\n", delay); diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb deleted file mode 100644 index 4136eac81..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Monitoring tools exploiting the performance monitoring events" -DESCRIPTION = "This package provides a library, called libpfm4 which is used to develop \ -monitoring tools exploiting the performance monitoring events such as those \ -provided by the Performance Monitoring Unit (PMU) of modern processors." -HOMEPAGE = "http://perfmon2.sourceforge.net/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=144822&atid=759953&source=navbar" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=0de488f3bd4424e308e2e399cb99c788" - -SECTION = "devel" - -COMPATIBLE_HOST = "powerpc64" - -SRC_URI = "http://downloads.sourceforge.net/project/perfmon2/${BPN}/libpfm-${PV}.tar.gz \ - file://0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch \ - file://fix-misleading-indentation-error.patch \ - " - -SRC_URI[md5sum] = "5077b9022440e4951d96f2d0e73bd487" -SRC_URI[sha256sum] = "5ab1e5b0472550f9037a8800834f6bc3b927690070f69fac0b67284b4b05fd5f" - -UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/perfmon2/files/libpfm4/" - -EXTRA_OEMAKE = "DESTDIR=\"${D}\" PREFIX=\"${prefix}\" LIBDIR=\"${libdir}\" LDCONFIG=\"true\"" -EXTRA_OEMAKE_append_powerpc = " ARCH=\"powerpc\"" -EXTRA_OEMAKE_append_powerpc64 = " ARCH=\"powerpc\" BITMODE=\"64\"" - -S = "${WORKDIR}/libpfm-${PV}" - -do_install () { - oe_runmake install -} diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb index 9054b33cc..8d6f2f2db 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb @@ -37,6 +37,7 @@ LICENSE = "\ & Firmware-ath9k-htc \ & Firmware-phanfw \ & Firmware-qat \ + & Firmware-qcom \ & Firmware-qla1280 \ & Firmware-qla2xxx \ & Firmware-qualcommAthos_ar3k \ @@ -90,12 +91,13 @@ LIC_FILES_CHKSUM = "\ file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \ file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \ file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \ - file://LICENCE.Netronome;md5=cd2a3e6effe3cdf42731575b8e9477ed \ + file://LICENCE.Netronome;md5=4add08f2577086d44447996503cddf5f \ file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 \ file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \ file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \ file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \ file://LICENCE.qat_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \ + file://LICENSE.qcom;md5=164e3362a538eb11d3ac51e8e134294b \ file://LICENCE.qla1280;md5=d6895732e622d950609093223a2c4f5d \ file://LICENCE.qla2xxx;md5=505855e921b75f1be4a437ad9b79dff0 \ file://LICENSE.QualcommAtheros_ar3k;md5=b5fe244fb2b532311de1472a3bc06da5 \ @@ -116,7 +118,7 @@ LIC_FILES_CHKSUM = "\ file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \ file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \ - file://WHENCE;md5=038edbc9e744171d8b6235e0224028ba \ + file://WHENCE;md5=6f46986f4e913ef16b765c2319cc5141 \ " # These are not common licenses, set NO_GENERIC_LICENSE for them @@ -156,6 +158,7 @@ NO_GENERIC_LICENSE[Firmware-OLPC] = "LICENCE.OLPC" NO_GENERIC_LICENSE[Firmware-ath9k-htc] = "LICENCE.open-ath9k-htc-firmware" NO_GENERIC_LICENSE[Firmware-phanfw] = "LICENCE.phanfw" NO_GENERIC_LICENSE[Firmware-qat] = "LICENCE.qat_firmware" +NO_GENERIC_LICENSE[Firmware-qcom] = "LICENSE.qcom" NO_GENERIC_LICENSE[Firmware-qla1280] = "LICENCE.qla1280" NO_GENERIC_LICENSE[Firmware-qla2xxx] = "LICENCE.qla2xxx" NO_GENERIC_LICENSE[Firmware-qualcommAthos_ar3k] = "LICENSE.QualcommAtheros_ar3k" @@ -178,13 +181,13 @@ NO_GENERIC_LICENSE[Firmware-xc5000] = "LICENCE.xc5000" NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c" NO_GENERIC_LICENSE[WHENCE] = "WHENCE" -SRCREV = "bf04291309d3169c0ad3b8db52564235bbd08e30" +SRCREV = "8fc2d4e55685bf73b6f7752383da9067404a74bb" PE = "1" PV = "0.0+git${SRCPV}" SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" -UPSTREAM_VERSION_UNKNOWN = "1" +UPSTREAM_CHECK_COMMITS = "1" S = "${WORKDIR}/git" @@ -249,14 +252,19 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \ ${PN}-iwlwifi-7260 \ ${PN}-iwlwifi-7265 \ ${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \ + ${PN}-iwlwifi-9000 \ ${PN}-iwlwifi-misc \ ${PN}-ibt-license ${PN}-ibt ${PN}-ibt-misc \ ${PN}-ibt-11-5 ${PN}-ibt-12-16 ${PN}-ibt-hw-37-7 ${PN}-ibt-hw-37-8 \ + ${PN}-ibt-17 \ ${PN}-i915-license ${PN}-i915 \ ${PN}-adsp-sst-license ${PN}-adsp-sst \ ${PN}-bnx2-mips \ ${PN}-netronome-license ${PN}-netronome \ ${PN}-qat ${PN}-qat-license \ + ${PN}-qcom-license \ + ${PN}-qcom-venus-1.8 ${PN}-qcom-venus-4.2 \ + ${PN}-qcom-adreno-a3xx ${PN}-qcom-adreno-a530 \ ${PN}-whence-license \ ${PN}-license \ " @@ -596,6 +604,7 @@ LICENSE_${PN}-iwlwifi-7265 = "Firmware-iwlwifi_firmware" LICENSE_${PN}-iwlwifi-7265d = "Firmware-iwlwifi_firmware" LICENSE_${PN}-iwlwifi-8000c = "Firmware-iwlwifi_firmware" LICENSE_${PN}-iwlwifi-8265 = "Firmware-iwlwifi_firmware" +LICENSE_${PN}-iwlwifi-9000 = "Firmware-iwlwifi_firmware" LICENSE_${PN}-iwlwifi-misc = "Firmware-iwlwifi_firmware" LICENSE_${PN}-iwlwifi-license = "Firmware-iwlwifi_firmware" @@ -622,6 +631,7 @@ FILES_${PN}-iwlwifi-7265 = "${nonarch_base_libdir}/firmware/iwlwifi-7265-*.uco FILES_${PN}-iwlwifi-7265d = "${nonarch_base_libdir}/firmware/iwlwifi-7265D-*.ucode" FILES_${PN}-iwlwifi-8000c = "${nonarch_base_libdir}/firmware/iwlwifi-8000C-*.ucode" FILES_${PN}-iwlwifi-8265 = "${nonarch_base_libdir}/firmware/iwlwifi-8265-*.ucode" +FILES_${PN}-iwlwifi-9000 = "${nonarch_base_libdir}/firmware/iwlwifi-9000-*.ucode" FILES_${PN}-iwlwifi-misc = "${nonarch_base_libdir}/firmware/iwlwifi-*.ucode" RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license" @@ -645,6 +655,7 @@ RDEPENDS_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-license" RDEPENDS_${PN}-iwlwifi-7265d = "${PN}-iwlwifi-license" RDEPENDS_${PN}-iwlwifi-8000c = "${PN}-iwlwifi-license" RDEPENDS_${PN}-iwlwifi-8265 = "${PN}-iwlwifi-license" +RDEPENDS_${PN}-iwlwifi-9000 = "${PN}-iwlwifi-license" RDEPENDS_${PN}-iwlwifi-misc = "${PN}-iwlwifi-license" # -iwlwifi-misc is a "catch all" package that includes all the iwlwifi @@ -670,6 +681,7 @@ LICENSE_${PN}-ibt-hw-37-7 = "Firmware-ibt_firmware" LICENSE_${PN}-ibt-hw-37-8 = "Firmware-ibt_firmware" LICENSE_${PN}-ibt-11-5 = "Firmware-ibt_firmware" LICENSE_${PN}-ibt-12-16 = "Firmware-ibt_firmware" +LICENSE_${PN}-ibt-17 = "Firmware-ibt_firmware" LICENSE_${PN}-ibt-misc = "Firmware-ibt_firmware" FILES_${PN}-ibt-license = "${nonarch_base_libdir}/firmware/LICENCE.ibt_firmware" @@ -677,12 +689,14 @@ FILES_${PN}-ibt-hw-37-7 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.7*.bs FILES_${PN}-ibt-hw-37-8 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.8*.bseq" FILES_${PN}-ibt-11-5 = "${nonarch_base_libdir}/firmware/intel/ibt-11-5.sfi /lib/firmware/intel/ibt-11-5.ddc" FILES_${PN}-ibt-12-16 = "${nonarch_base_libdir}/firmware/intel/ibt-12-16.sfi /lib/firmware/intel/ibt-12-16.ddc" +FILES_${PN}-ibt-17 = "${nonarch_base_libdir}/firmware/intel/ibt-17-*.sfi /lib/firmware/intel/ibt-17-*.ddc" FILES_${PN}-ibt-misc = "${nonarch_base_libdir}/firmware/ibt-*" RDEPENDS_${PN}-ibt-hw-37-7 = "${PN}-ibt-license" RDEPENDS_${PN}-ibt-hw-37.8 = "${PN}-ibt-license" RDEPENDS_${PN}-ibt-11-5 = "${PN}-ibt-license" RDEPENDS_${PN}-ibt-12-16 = "${PN}-ibt-license" +RDEPENDS_${PN}-ibt-17 = "${PN}-ibt-license" RDEPENDS_${PN}-ibt-misc = "${PN}-ibt-license" ALLOW_EMPTY_${PN}-ibt= "1" @@ -707,6 +721,18 @@ FILES_${PN}-qat-license = "${nonarch_base_libdir}/firmware/LICENCE.qat_firmwar FILES_${PN}-qat = "${nonarch_base_libdir}/firmware/qat*.bin" RDEPENDS_${PN}-qat = "${PN}-qat-license" +# For QCOM VPU/GPU +LICENSE_${PN}-qcom-license = "Firmware-qcom" +FILES_${PN}-qcom-license = "${nonarch_base_libdir}/firmware/LICENSE.qcom ${nonarch_base_libdir}/firmware/qcom/NOTICE.txt" +FILES_${PN}-qcom-venus-1.8 = "${nonarch_base_libdir}/firmware/qcom/venus-1.8/*" +FILES_${PN}-qcom-venus-4.2 = "${nonarch_base_libdir}/firmware/qcom/venus-4.2/*" +FILES_${PN}-qcom-adreno-a3xx = "${nonarch_base_libdir}/firmware/qcom/a300_*.fw ${nonarch_base_libdir}/firmware/a300_*.fw" +FILES_${PN}-qcom-adreno-a530 = "${nonarch_base_libdir}/firmware/qcom/a530*.*" +RDEPENDS_${PN}-qcom-venus-1.8 = "${PN}-qcom-license" +RDEPENDS_${PN}-qcom-venus-4.2 = "${PN}-qcom-license" +RDEPENDS_${PN}-qcom-adreno-a3xx = "${PN}-qcom-license" +RDEPENDS_${PN}-qcom-adreno-a530 = "${PN}-qcom-license" + # For other firmwares # Maybe split out to separate packages when needed. LICENSE_${PN} = "\ @@ -737,6 +763,7 @@ LICENSE_${PN} = "\ & Firmware-ath9k-htc \ & Firmware-phanfw \ & Firmware-qat \ + & Firmware-qcom \ & Firmware-qla1280 \ & Firmware-qla2xxx \ & Firmware-r8a779x_usb3 \ diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc index 1657df6e9..9903c06c2 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc @@ -78,7 +78,7 @@ do_install_append_arm () { } do_install_armmultilib () { - oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/mman.h asm/param.h asm/perf_regs.h + oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h 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 } diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch new file mode 100644 index 000000000..68b244698 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch @@ -0,0 +1,31 @@ +From 897736166fd709906a5fdf16eb23f8fddff770b5 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <bruce.ashfield@windriver.com> +Date: Thu, 1 Mar 2018 18:31:01 -0500 +Subject: [PATCH] if_ether: move muslc ethhdr protection to uapi file + +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> +Upstream-Status: Pending +--- + include/uapi/linux/if_ether.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h +index 153c9c2..7b69b73 100644 +--- a/include/uapi/linux/if_ether.h ++++ b/include/uapi/linux/if_ether.h +@@ -149,6 +149,12 @@ + * This is an Ethernet frame header. + */ + ++#ifdef _NETINET_IF_ETHER_H /* musl */ ++#define __UAPI_DEF_ETHHDR 0 ++#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */ ++#define __UAPI_DEF_ETHHDR 1 ++#endif ++ + /* allow libcs like musl to deactivate this, glibc does not implement this. */ + #ifndef __UAPI_DEF_ETHHDR + #define __UAPI_DEF_ETHHDR 1 +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch index 8bb775ccf..064a39193 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch @@ -11,11 +11,11 @@ Upstream-Status: Submitted include/uapi/linux/libc-compat.h | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) -Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h +Index: linux-4.15/include/uapi/linux/libc-compat.h =================================================================== ---- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h -+++ linux-4.8-rc4/include/uapi/linux/libc-compat.h -@@ -48,13 +48,12 @@ +--- 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 @@ -33,7 +33,7 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h * that would already be defined. */ #define __UAPI_DEF_IF_IFCONF 0 -@@ -98,15 +97,7 @@ +@@ -99,15 +98,7 @@ #define __UAPI_DEF_IN_CLASS 0 #define __UAPI_DEF_IN6_ADDR 0 @@ -49,7 +49,7 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h #define __UAPI_DEF_SOCKADDR_IN6 0 #define __UAPI_DEF_IPV6_MREQ 0 #define __UAPI_DEF_IPPROTO_V6 0 -@@ -114,10 +105,10 @@ +@@ -115,10 +106,10 @@ #define __UAPI_DEF_IN6_PKTINFO 0 #define __UAPI_DEF_IP6_MTUINFO 0 @@ -62,7 +62,7 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h * __UAPI_DEF_* defines and adjust appropriately. */ #define __UAPI_DEF_IN_ADDR 1 #define __UAPI_DEF_IN_IPPROTO 1 -@@ -127,7 +118,7 @@ +@@ -128,7 +119,7 @@ #define __UAPI_DEF_IN_CLASS 1 #define __UAPI_DEF_IN6_ADDR 1 @@ -71,18 +71,18 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h * coordinate. */ #define __UAPI_DEF_IN6_ADDR_ALT 1 #define __UAPI_DEF_SOCKADDR_IN6 1 -@@ -149,7 +140,7 @@ - /* If we did not see any headers from any supported C libraries, +@@ -170,7 +161,7 @@ * or we are being included in the kernel, then define everything - * that we need. */ + * 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 */ - #define __UAPI_DEF_IF_IFCONF 1 -@@ -182,6 +173,6 @@ - /* Definitions for xattr.h */ + #ifndef __UAPI_DEF_IF_IFCONF +@@ -262,6 +253,6 @@ #define __UAPI_DEF_XATTR 1 + #endif -#endif /* __GLIBC__ */ +#endif /* __KERNEL__ */ diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch index 8dc1edc33..fb7e1de17 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch @@ -11,37 +11,11 @@ Upstream-Status: Submitted include/uapi/linux/libc-compat.h | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) -Index: linux-4.8-rc4/include/uapi/linux/if_ether.h +Index: linux-4.15/include/uapi/linux/libc-compat.h =================================================================== ---- linux-4.8-rc4.orig/include/uapi/linux/if_ether.h -+++ linux-4.8-rc4/include/uapi/linux/if_ether.h -@@ -22,6 +22,7 @@ - #define _UAPI_LINUX_IF_ETHER_H - - #include <linux/types.h> -+#include <linux/libc-compat.h> - - /* - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble -@@ -138,11 +139,12 @@ - * This is an Ethernet frame header. - */ - -+#if __UAPI_DEF_ETHHDR - struct ethhdr { - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ - unsigned char h_source[ETH_ALEN]; /* source ether addr */ - __be16 h_proto; /* packet type ID field */ - } __attribute__((packed)); -- -+#endif - - #endif /* _UAPI_LINUX_IF_ETHER_H */ -Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h -=================================================================== ---- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h -+++ linux-4.8-rc4/include/uapi/linux/libc-compat.h -@@ -50,6 +50,12 @@ +--- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.338370731 -0500 ++++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.334370603 -0500 +@@ -51,6 +51,12 @@ #ifndef __KERNEL__ /* we're used from userspace */ @@ -52,5 +26,5 @@ Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h +#endif + /* Coordinate with libc net/if.h header. */ - #if defined(_NET_IF_H) && defined(__USE_MISC) + #if defined(_NET_IF_H) diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.15.7.bb index f0d0abfa4..a7db4c9c0 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.12.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.15.7.bb @@ -5,7 +5,9 @@ SRC_URI_append_libc-musl = "\ file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.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 \ + file://0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch \ " -SRC_URI[md5sum] = "fc454157e2d024d401a60905d6481c6b" -SRC_URI[sha256sum] = "a45c3becd4d08ce411c14628a949d08e2433d8cdeca92036c7013980e93858ab" + +SRC_URI[md5sum] = "8186ce63c489199b58b6a58ad2a24a94" +SRC_URI[sha256sum] = "cd44df4b23a3e0edc14be63df95d768b9600b31c35be05fb89f93226907fc8c6" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb index c1b5b7786..8bbfa23e4 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb @@ -69,6 +69,13 @@ do_install() { cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o fi + # Remove fixdep/objtool as they won't be target binaries + for i in fixdep objtool; do + if [ -e $kerneldir/tools/objtool/$i ]; then + rm -rf $kerneldir/tools/objtool/$i + fi + done + chown -R root:root ${D} } # Ensure we don't race against "make scripts" during cpio diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb index 5852b425d..4201faf67 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb @@ -28,10 +28,13 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name 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 ?= "4.12-rc+" +LINUX_VERSION ?= "4.16-rc+" LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}" PV = "${LINUX_VERSION}+git${SRCPV}" +DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" +DEPENDS += "openssl-native util-linux-native" + COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)" KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb index 64b1da1ea..5edc0fa40 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb @@ -7,17 +7,17 @@ require recipes-kernel/linux/linux-yocto.inc # to build multiple virtual/kernel providers, e.g. as dependency of # core-image-rt-sdk, core-image-rt. python () { - if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": - raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") + 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 ?= "da775aa9aab41e8a2b4e9b44ffe268446c51759f" -SRCREV_meta ?= "4f825eeb783a279216ee45ed3b9a63dd6837f7d7" +SRCREV_machine ?= "705d03507a0c10dcbf9cad3ff70f5d60b70f2d99" +SRCREV_meta ?= "46171de19220c49d670544017cfbeffc1ec70e80" SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;branch=${KBRANCH};name=machine \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}" -LINUX_VERSION ?= "4.12.20" +LINUX_VERSION ?= "4.12.24" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb index fd31bf986..81306a984 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb @@ -1,4 +1,4 @@ -KBRANCH ?= "standard/preempt-rt/base" +KBRANCH ?= "v4.14/standard/preempt-rt/base" require recipes-kernel/linux/linux-yocto.inc @@ -7,17 +7,20 @@ require recipes-kernel/linux/linux-yocto.inc # to build multiple virtual/kernel providers, e.g. as dependency of # core-image-rt-sdk, core-image-rt. python () { - if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": - raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") + 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 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09" -SRCREV_meta ?= "1d9a8200184af22f8981fa24b0e82af49c7988dd" +SRCREV_machine ?= "7272e9132fdaaf0dd78bc94e9f297aaf73452982" +SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563" -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}" +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}" -LINUX_VERSION ?= "4.10.17" +LINUX_VERSION ?= "4.14.30" + +DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" +DEPENDS += "openssl-native util-linux-native" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb index 5c016ed7c..c5d3ee03f 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb @@ -1,4 +1,4 @@ -KBRANCH ?= "standard/preempt-rt/base" +KBRANCH ?= "v4.15/standard/preempt-rt/base" require recipes-kernel/linux/linux-yocto.inc @@ -7,17 +7,20 @@ require recipes-kernel/linux/linux-yocto.inc # to build multiple virtual/kernel providers, e.g. as dependency of # core-image-rt-sdk, core-image-rt. python () { - if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": - raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") + 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 ?= "90d1ffa36cbd36722638c97c1bb46a5874dbe28e" -SRCREV_meta ?= "0774eacea2a7d3a150594533b8c80d0c0bfdfded" +SRCREV_machine ?= "91084d030bc841c483c31e8664289c7940aa5506" +SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174" -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}" -LINUX_VERSION ?= "4.9.82" +LINUX_VERSION ?= "4.15.13" + +DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" +DEPENDS += "openssl-native util-linux-native" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb deleted file mode 100644 index 97538e28b..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb +++ /dev/null @@ -1,36 +0,0 @@ -KBRANCH ?= "standard/preempt-rt/base" - -require recipes-kernel/linux/linux-yocto.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("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": - raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") -} - -SRCREV_machine ?= "d5efeeeb928a0111fc187fd1e8d03d2e4e35d4a0" -SRCREV_meta ?= "b149d14ccae8349ab33e101f6af233a12f4b17ba" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}" - -LINUX_VERSION ?= "4.4.113" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -LINUX_KERNEL_TYPE = "preempt-rt" - -COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" - -# 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" -KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" -KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb deleted file mode 100644 index b22349769..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb +++ /dev/null @@ -1,25 +0,0 @@ -KBRANCH ?= "standard/tiny/common-pc" -LINUX_KERNEL_TYPE = "tiny" -KCONFIG_MODE = "--allnoconfig" - -require recipes-kernel/linux/linux-yocto.inc - -LINUX_VERSION ?= "4.10.17" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -SRCREV_machine ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09" -SRCREV_meta ?= "1d9a8200184af22f8981fa24b0e82af49c7988dd" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}" - -COMPATIBLE_MACHINE = "qemux86|qemux86-64" - -# Functionality flags -KERNEL_FEATURES = "" - -KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb index 0bbd8e28d..31307a638 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb @@ -4,13 +4,13 @@ KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "4.12.20" +LINUX_VERSION ?= "4.12.24" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c" -SRCREV_meta ?= "4f825eeb783a279216ee45ed3b9a63dd6837f7d7" +SRCREV_machine ?= "f9d67777b07ac97966186c1b56db78afe2a16f92" +SRCREV_meta ?= "46171de19220c49d670544017cfbeffc1ec70e80" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb new file mode 100644 index 000000000..34bee0949 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb @@ -0,0 +1,28 @@ +KBRANCH ?= "v4.14/standard/tiny/common-pc" +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +require recipes-kernel/linux/linux-yocto.inc + +LINUX_VERSION ?= "4.14.30" + +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 ?= "ad31896630f8bf6a459164263adc0a8faf984d9e" +SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}" + +COMPATIBLE_MACHINE = "qemux86|qemux86-64" + +# Functionality flags +KERNEL_FEATURES = "" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb index 4d4680254..05b9ca38b 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb @@ -1,21 +1,21 @@ -KBRANCH ?= "standard/tiny/common-pc" +KBRANCH ?= "v4.15/standard/tiny/common-pc" LINUX_KERNEL_TYPE = "tiny" KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "4.9.82" +LINUX_VERSION ?= "4.15.13" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc" -SRCREV_meta ?= "0774eacea2a7d3a150594533b8c80d0c0bfdfded" +SRCREV_machine ?= "91084d030bc841c483c31e8664289c7940aa5506" +SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174" PV = "${LINUX_VERSION}+git${SRCPV}" -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}" COMPATIBLE_MACHINE = "qemux86|qemux86-64" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb deleted file mode 100644 index 8a98189d4..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb +++ /dev/null @@ -1,23 +0,0 @@ -KBRANCH ?= "standard/tiny/common-pc" -LINUX_KERNEL_TYPE = "tiny" -KCONFIG_MODE = "--allnoconfig" - -require recipes-kernel/linux/linux-yocto.inc - -LINUX_VERSION ?= "4.4.113" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -SRCREV_machine ?= "4d31a8b7661509ff1044abcf9050750cc2478e20" -SRCREV_meta ?= "b149d14ccae8349ab33e101f6af233a12f4b17ba" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}" - -COMPATIBLE_MACHINE = "qemux86|qemux86-64" - -# Functionality flags -KERNEL_FEATURES = "" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc index 9c1f61be7..3bb872a32 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc @@ -12,9 +12,9 @@ INC_PR = "r4" # 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("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"): + 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.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN"))) + raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN"))) } DEPENDS += "xz-native bc-native" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb deleted file mode 100644 index 1fe3cca2a..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb +++ /dev/null @@ -1,44 +0,0 @@ -KBRANCH ?= "standard/base" - -require recipes-kernel/linux/linux-yocto.inc - -# board specific branches -KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" -KBRANCH_qemuarm64 ?= "standard/qemuarm64" -KBRANCH_qemumips ?= "standard/mti-malta32" -KBRANCH_qemuppc ?= "standard/qemuppc" -KBRANCH_qemux86 ?= "standard/base" -KBRANCH_qemux86-64 ?= "standard/base" -KBRANCH_qemumips64 ?= "standard/mti-malta64" - -SRCREV_machine_qemuarm ?= "ae12e19cecc19af66f64a50538909cb1cad185f9" -SRCREV_machine_qemuarm64 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09" -SRCREV_machine_qemumips ?= "b71b80fd679a17dfb4f73b352263c49273f721d4" -SRCREV_machine_qemuppc ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09" -SRCREV_machine_qemux86 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09" -SRCREV_machine_qemux86-64 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09" -SRCREV_machine_qemumips64 ?= "8bb135e71037c46175bbcc7acf387309b2e17133" -SRCREV_machine ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09" -SRCREV_meta ?= "1d9a8200184af22f8981fa24b0e82af49c7988dd" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}" - -LINUX_VERSION ?= "4.10.17" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" - -COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" - -# Functionality flags -KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" -KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" -KERNEL_FEATURES_append_qemuall=" cfg/virtio.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)}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb index fabf0f554..8d560127f 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb @@ -11,20 +11,22 @@ KBRANCH_qemux86 ?= "standard/base" KBRANCH_qemux86-64 ?= "standard/base" KBRANCH_qemumips64 ?= "standard/mti-malta64" -SRCREV_machine_qemuarm ?= "42cf4d6a1bc84b90681cb82ad95c129387d76b4b" -SRCREV_machine_qemuarm64 ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c" -SRCREV_machine_qemumips ?= "571315a5526b9e22262cf99bae7c0dd6e5bd204c" -SRCREV_machine_qemuppc ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c" -SRCREV_machine_qemux86 ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c" -SRCREV_machine_qemux86-64 ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c" -SRCREV_machine_qemumips64 ?= "e7889ba18f060368d4ab35e70b076728d73ba622" -SRCREV_machine ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c" -SRCREV_meta ?= "4f825eeb783a279216ee45ed3b9a63dd6837f7d7" +SRCREV_machine_qemuarm ?= "45824c60ca37f414a5ac5783e970338db9a5a2af" +SRCREV_machine_qemuarm64 ?= "f9d67777b07ac97966186c1b56db78afe2a16f92" +SRCREV_machine_qemumips ?= "66f741b0b3d093e6b6df0f44120913ef3a259e23" +SRCREV_machine_qemuppc ?= "f9d67777b07ac97966186c1b56db78afe2a16f92" +SRCREV_machine_qemux86 ?= "f9d67777b07ac97966186c1b56db78afe2a16f92" +SRCREV_machine_qemux86-64 ?= "f9d67777b07ac97966186c1b56db78afe2a16f92" +SRCREV_machine_qemumips64 ?= "c5d838c9e26bd657b49dfe28b115e5bc4b580850" +SRCREV_machine ?= "f9d67777b07ac97966186c1b56db78afe2a16f92" +SRCREV_meta ?= "46171de19220c49d670544017cfbeffc1ec70e80" SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;name=machine;branch=${KBRANCH}; \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}" -LINUX_VERSION ?= "4.12.20" +DEPENDS += "openssl-native util-linux-native" + +LINUX_VERSION ?= "4.12.24" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb new file mode 100644 index 000000000..16142f8ce --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb @@ -0,0 +1,47 @@ +KBRANCH ?= "v4.14/standard/base" + +require recipes-kernel/linux/linux-yocto.inc + +# board specific branches +KBRANCH_qemuarm ?= "v4.14/standard/arm-versatile-926ejs" +KBRANCH_qemuarm64 ?= "v4.14/standard/qemuarm64" +KBRANCH_qemumips ?= "v4.14/standard/mti-malta32" +KBRANCH_qemuppc ?= "v4.14/standard/qemuppc" +KBRANCH_qemux86 ?= "v4.14/standard/base" +KBRANCH_qemux86-64 ?= "v4.14/standard/base" +KBRANCH_qemumips64 ?= "v4.14/standard/mti-malta64" + +SRCREV_machine_qemuarm ?= "d6268fc3460d3904fd49087f7a822efbaab9bfe8" +SRCREV_machine_qemuarm64 ?= "c94189843b8ad62cafe9a307e7f7d60741690505" +SRCREV_machine_qemumips ?= "4afd92347b2b35dc8e0006712f8fa00ac57f2a36" +SRCREV_machine_qemuppc ?= "e8af5c9b65c5187d148ecd11bd7979489460ca64" +SRCREV_machine_qemux86 ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c" +SRCREV_machine_qemux86-64 ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c" +SRCREV_machine_qemumips64 ?= "9863b327e770b42b8c18da3e0cfaf06e8f99ae97" +SRCREV_machine ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c" +SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}" + +LINUX_VERSION ?= "4.14.30" + +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 = "2" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" + +COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.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)}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.15.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.15.bb new file mode 100644 index 000000000..70bd7118b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.15.bb @@ -0,0 +1,47 @@ +KBRANCH ?= "v4.15/standard/base" + +require recipes-kernel/linux/linux-yocto.inc + +# board specific branches +KBRANCH_qemuarm ?= "v4.15/standard/arm-versatile-926ejs" +KBRANCH_qemuarm64 ?= "v4.15/standard/qemuarm64" +KBRANCH_qemumips ?= "v4.15/standard/mti-malta32" +KBRANCH_qemuppc ?= "v4.15/standard/qemuppc" +KBRANCH_qemux86 ?= "v4.15/standard/base" +KBRANCH_qemux86-64 ?= "v4.15/standard/base" +KBRANCH_qemumips64 ?= "v4.15/standard/mti-malta64" + +SRCREV_machine_qemuarm ?= "4b6902b42f47593928117b2ff0900cd965cf6443" +SRCREV_machine_qemuarm64 ?= "91084d030bc841c483c31e8664289c7940aa5506" +SRCREV_machine_qemumips ?= "19ba2d843750ff65d8fe590acdfc99aea6153945" +SRCREV_machine_qemuppc ?= "91084d030bc841c483c31e8664289c7940aa5506" +SRCREV_machine_qemux86 ?= "91084d030bc841c483c31e8664289c7940aa5506" +SRCREV_machine_qemux86-64 ?= "91084d030bc841c483c31e8664289c7940aa5506" +SRCREV_machine_qemumips64 ?= "97000c3f4664643bac7828bbdc048f7ec216cc31" +SRCREV_machine ?= "91084d030bc841c483c31e8664289c7940aa5506" +SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}" + +LINUX_VERSION ?= "4.15.13" + +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 = "2" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" + +COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.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)}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb deleted file mode 100644 index 97c16d59d..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb +++ /dev/null @@ -1,42 +0,0 @@ -KBRANCH ?= "standard/base" - -require recipes-kernel/linux/linux-yocto.inc - -# board specific branches -KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" -KBRANCH_qemuarm64 ?= "standard/qemuarm64" -KBRANCH_qemumips ?= "standard/mti-malta32" -KBRANCH_qemuppc ?= "standard/qemuppc" -KBRANCH_qemux86 ?= "standard/base" -KBRANCH_qemux86-64 ?= "standard/base" -KBRANCH_qemumips64 ?= "standard/mti-malta64" - -SRCREV_machine_qemuarm ?= "400c0f39b954cd8fffdf53e6ec97852b73fea7af" -SRCREV_machine_qemuarm64 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20" -SRCREV_machine_qemumips ?= "fb03a9472367b6c177729ac631326aafd5d17c92" -SRCREV_machine_qemuppc ?= "4d31a8b7661509ff1044abcf9050750cc2478e20" -SRCREV_machine_qemux86 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20" -SRCREV_machine_qemux86-64 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20" -SRCREV_machine_qemumips64 ?= "26b8ba186a6d39728fc1510bd2264110c75842f5" -SRCREV_machine ?= "4d31a8b7661509ff1044abcf9050750cc2478e20" -SRCREV_meta ?= "b149d14ccae8349ab33e101f6af233a12f4b17ba" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}" - -LINUX_VERSION ?= "4.4.113" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" - -# Functionality flags -KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" -KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" -KERNEL_FEATURES_append_qemuall=" cfg/virtio.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)}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.9.bb deleted file mode 100644 index a5a165f76..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.9.bb +++ /dev/null @@ -1,44 +0,0 @@ -KBRANCH ?= "standard/base" - -require recipes-kernel/linux/linux-yocto.inc - -# board specific branches -KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" -KBRANCH_qemuarm64 ?= "standard/qemuarm64" -KBRANCH_qemumips ?= "standard/mti-malta32" -KBRANCH_qemuppc ?= "standard/qemuppc" -KBRANCH_qemux86 ?= "standard/base" -KBRANCH_qemux86-64 ?= "standard/base" -KBRANCH_qemumips64 ?= "standard/mti-malta64" - -SRCREV_machine_qemuarm ?= "23369eb7e07c839fa73a8c1e85aba37a07bf14c1" -SRCREV_machine_qemuarm64 ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc" -SRCREV_machine_qemumips ?= "cab9e059447878f5383f91a05db12813f69cbfc1" -SRCREV_machine_qemuppc ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc" -SRCREV_machine_qemux86 ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc" -SRCREV_machine_qemux86-64 ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc" -SRCREV_machine_qemumips64 ?= "c2e5ef83b612d50f50fafeed9930dbea302fbe8c" -SRCREV_machine ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc" -SRCREV_meta ?= "0774eacea2a7d3a150594533b8c80d0c0bfdfded" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" - -LINUX_VERSION ?= "4.9.82" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" - -COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" - -# Functionality flags -KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" -KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" -KERNEL_FEATURES_append_qemuall=" cfg/virtio.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)}" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.3.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb index 4d81da016..a29402adb 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.3.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb @@ -15,5 +15,5 @@ SRC_URI = "http://www.efficios.com/files/babeltrace/babeltrace-${PV}.tar.bz2 \ EXTRA_OECONF = "--disable-debug-info" -SRC_URI[md5sum] = "0cec2745ac316649791c43f416d71ea1" -SRC_URI[sha256sum] = "2249fee5beba657731f5d6a84c5296c6517f544bfbe7571bd1fd7af23726137c" +SRC_URI[md5sum] = "3e8cdafec3ac0346a389870e87bf1344" +SRC_URI[sha256sum] = "9643039923a0abc75a25b3d594cee0017423b57f10d2b625e96ed1e8d4891fc1" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb index 6e92c22be..93626dd4b 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb @@ -25,6 +25,7 @@ PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust" PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod" PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" PACKAGECONFIG_remove_libc-musl = "lttng-ust" +PACKAGECONFIG_remove_riscv64 = "lttng-ust" SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ file://x32.patch \ diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch index 0f18c5d9f..bff852799 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch @@ -6,13 +6,12 @@ recipe anyway. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> -Index: doc/Makefile.am +Index: lttng-ust-2.9.1/doc/Makefile.am =================================================================== ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -1,4 +1,4 @@ +--- lttng-ust-2.9.1.orig/doc/Makefile.am ++++ lttng-ust-2.9.1/doc/Makefile.am +@@ -1,3 +1,3 @@ -SUBDIRS = . man examples +SUBDIRS = . man - dist_man_MANS = man/lttng-gen-tp.1 \ - man/lttng-ust.3 \ + dist_doc_DATA = java-agent.txt diff --git a/import-layers/yocto-poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb new file mode 100644 index 000000000..97c58c523 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "Build tools needed by external modules" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +inherit kernel-arch +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" + +DEPENDS += "bc-native" + +EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" + +# 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 + oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ + -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts prepare + +} diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc deleted file mode 100644 index 4b01654fa..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc +++ /dev/null @@ -1,65 +0,0 @@ -SUMMARY = "System-Wide Profiler" -DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \ -of profiling all running code at low overhead." -HOMEPAGE = "http://oprofile.sourceforge.net/news/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191" - -LICENSE = "LGPLv2.1+ & GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \ - " -SECTION = "devel" - -DEPENDS = "popt binutils" -RDEPENDS_${PN} = "binutils-symlinks" -RRECOMMENDS_${PN} = "kernel-vmlinux" - -FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}" -FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la" -FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ - file://acinclude.m4 \ - file://automake-foreign.patch \ - file://oprofile-cross-compile-tests.patch \ - file://run-ptest \ - file://root-home-dir.patch \ - file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \ - file://0001-Fix-FTBFS-problem-with-GCC-6.patch \ -" -UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/" -UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/" - -SRC_URI_append_libc-musl = " file://musl.patch" - -inherit autotools pkgconfig ptest - -EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC=" -do_configure () { - cp ${WORKDIR}/acinclude.m4 ${S}/ - autotools_do_configure -} - -EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests" -do_compile_ptest() { - oe_runmake check -} - -do_install_ptest() { - subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests " - for tooltest in ${subdirs} - do - find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH} - done - - # needed by some libop tests - cp -r events ${D}${PTEST_PATH} - - # needed by libregex regex_test - cp libregex/stl.pat ${D}${PTEST_PATH}/libregex - cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests - - # needed by litutil++ file_manip_tests - cp ${S}/libutil++/tests/file_manip_tests.cpp \ - libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests -} diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch deleted file mode 100644 index ae8562a23..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001 -From: Marek Vasut <marex@denx.de> -Date: Tue, 9 Feb 2016 02:00:29 +0100 -Subject: [PATCH] Add rmb() definition for NIOS2 architecture - -Signed-off-by: Marek Vasut <marex@denx.de> -Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ] ---- - libperf_events/operf_utils.h | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h -index 32954cc..8270e53 100644 ---- a/libperf_events/operf_utils.h -+++ b/libperf_events/operf_utils.h -@@ -178,6 +178,11 @@ void op_release_resources(void); - #define cpu_relax() asm volatile("" ::: "memory") - #endif - -+#ifdef __nios2__ -+#define rmb() asm volatile("" ::: "memory") -+#define cpu_relax() asm volatile("" ::: "memory") -+#endif -+ - #ifdef __tile__ - #include <asm/unistd.h> - #define rmb() __insn_mf() --- -2.7.0 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch deleted file mode 100644 index d372fd527..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 39d4d46a0bd504ac708ffe72df87bf74cd12ad30 Mon Sep 17 00:00:00 2001 -From: William Cohen <wcohen@redhat.com> -Date: Fri, 5 Feb 2016 17:30:19 -0500 -Subject: [PATCH] Fix FTBFS problem with GCC-6 - -GCC-6 is pickier about some of the type conversions causing the Fedora -24 mass rebuild the build of oprofile failed with: - -make[3]: Entering directory '/builddir/build/BUILD/oprofile-1.1.0/libutil++' -g++ -DHAVE_CONFIG_H -I. -I.. -I ../libutil -I ../libop -I ../libpp -W -Wall -fno-common -ftemplate-depth-50 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c -o op_bfd.o op_bfd.cpp -op_bfd.cpp: In member function 'void op_bfd::get_symbol_range(symbol_index_t, long long unsigned int&, long long unsigned int&) const': -op_bfd.cpp:538:47: error: cannot convert 'std::ostream {aka std::basic_ostream<char>}' to 'const bool' in initialization - bool const verbose = cverb << (vbfd & vlevel1); - ^ -op_bfd.cpp:546:7: error: in argument to unary ! - if (!verbose) - ^~~~~~~ - -Avoid the intermediate bool type to make GCC-6 happy. - -Signed-off-by: William Cohen <wcohen@redhat.com> ---- -Upstream-Status: Backport - - libutil++/op_bfd.cpp | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/libutil++/op_bfd.cpp b/libutil++/op_bfd.cpp -index 389c920..f2eb42b 100644 ---- a/libutil++/op_bfd.cpp -+++ b/libutil++/op_bfd.cpp -@@ -535,15 +535,13 @@ void op_bfd::get_symbol_range(symbol_index_t sym_idx, - { - op_bfd_symbol const & sym = syms[sym_idx]; - -- bool const verbose = cverb << (vbfd & vlevel1); -- - if (anon_obj) - start = sym.vma(); - else - start = sym.filepos(); - end = start + sym.size(); - -- if (!verbose) -+ if (!(cverb << (vbfd & vlevel1))) - return; - - io_state state(cverb << (vbfd & vlevel1)); --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 deleted file mode 100644 index 95ecd91b5..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 +++ /dev/null @@ -1,581 +0,0 @@ -dnl AX_KERNEL_OPTION(option, action-if-found, action-if-not-found) -dnl see if autoconf.h defines the option -AC_DEFUN([AX_KERNEL_OPTION], [ -SAVE_CFLAGS=$CFLAGS -CFLAGS="-I$KINC -O2 -D__KERNEL__" -AC_TRY_COMPILE( [#include <linux/config.h>], -[ -#ifndef $1 -break_me_hard(\\\); -#endif -],[$2],[$3],) -CFLAGS=$SAVE_CFLAGS -]) - -dnl Handle the 2.4 module inside module/ -AC_DEFUN([AX_CONFIG_MODULE], -[ -if test ! -f $KINC/linux/autoconf.h; then - AC_MSG_ERROR([no suitably configured kernel include tree found]) -fi - -dnl --- Get Linux kernel version and compile parameters --- - -AC_SUBST(KVERS) -AC_MSG_CHECKING([for kernel version]) -dnl it's like this to handle mandrake's fubar version.h - bug #471448 -eval KVERS=`gcc -I$KINC -E -dM $KINC/linux/version.h | grep -w UTS_RELEASE | awk '{print $[]3}'` -AC_MSG_RESULT([$KVERS]) -case "$KVERS" in -2.2.*|2.4.*) ;; -*) AC_MSG_ERROR([Unsupported kernel version]) -esac - -dnl Check for the minimal kernel version supported -AC_MSG_CHECKING([kernel version]) -AX_KERNEL_VERSION(2, 2, 10, <=, AC_MSG_RESULT([ok]), AC_MSG_ERROR([check html documentation install section])) - -dnl linux/spinlock.h added at some point in past -AC_MSG_CHECKING([for $KINC/linux/spinlock.h]) -if test -f $KINC/linux/spinlock.h; then - EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DHAVE_LINUX_SPINLOCK_HEADER" - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -AC_MSG_CHECKING([for rtc_lock]) -gcc -I$KINC -E $KINC/linux/mc146818rtc.h | grep rtc_lock >/dev/null -if test "$?" -eq 0; then - EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DRTC_LOCK" - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -arch="unknown" -AC_MSG_CHECKING(for x86-64 architecture) -AX_KERNEL_OPTION(CONFIG_X86_64, x8664=1, x8664=0) -AX_MSG_RESULT_YN($x8664) -BUILD_HAMMER=no -if test "$x8664" -eq 1; then - arch="x86" - BUILD_HAMMER=yes -else - AC_MSG_CHECKING(for x86 architecture) - AX_KERNEL_OPTION(CONFIG_X86, x86=1, x86=0) - AX_KERNEL_OPTION(CONFIG_X86_WP_WORKS_OK, x86=1, x86=$x86) - AX_MSG_RESULT_YN($x86) - test "$x86" = 1 && arch="x86" - - if test "$arch" = "unknown"; then - AC_MSG_CHECKING(for ia64 architecture) - AX_KERNEL_OPTION(CONFIG_IA64, ia64=1, ia64=0) - AX_MSG_RESULT_YN($ia64) - test "$ia64" = 1 && arch="ia64" - fi - -fi -AC_SUBST(BUILD_HAMMER) - -test "$arch" = "unknown" && AC_MSG_ERROR(Unsupported architecture) - -dnl check to see if kernel verion appropriate for arch -AC_MSG_CHECKING(arch/kernel version combination) -case "$arch" in -ia64) - AX_KERNEL_VERSION(2, 4, 18, <, AC_MSG_RESULT([ok]), - AC_MSG_ERROR([unsupported arch/kernel])) ;; -*) AC_MSG_RESULT([ok]) -esac - -dnl for now we do not support PREEMPT patch -AC_MSG_CHECKING([for preempt patch]) -AX_KERNEL_OPTION(CONFIG_PREEMPT,preempt=1,preempt=0) -AX_MSG_RESULT_YN([$preempt]) -test "$preempt" = 0 || AC_MSG_ERROR([unsupported kernel configuration : CONFIG_PREEMPT]) - -AC_SUBST(KINC) - -MODINSTALLDIR=/lib/modules/$KVERS - -OPROFILE_MODULE_ARCH=$arch -AC_SUBST(OPROFILE_MODULE_ARCH) -] -) - -dnl AX_MSG_RESULT_YN(a) -dnl results "yes" iff a==1, "no" else -AC_DEFUN([AX_MSG_RESULT_YN], [x=no -test "x$1" = "x1" && x=yes -AC_MSG_RESULT($x)]) - -dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc)) -AC_DEFUN([AX_MALLOC_ATTRIBUTE], -[ -AC_MSG_CHECKING([whether malloc attribute is understood]) -SAVE_CFLAGS=$CFLAGS -CFLAGS="-Werror $CFLAGS" -AC_TRY_COMPILE(,[ -void monkey() __attribute__((malloc)); -],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no])) -CFLAGS=$SAVE_CFLAGS -] -) - -dnl builtin_expect is used in module we can't add that in config.h -AC_DEFUN([AX_BUILTIN_EXPECT], -[ -AC_MSG_CHECKING([whether __builtin_expect is understood]) -SAVE_CFLAGS=$CFLAGS -CFLAGS="-Werror $CFLAGS" -AC_TRY_LINK(,[ -int i; -if (__builtin_expect(i, 0)) { } -], -AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK", -AC_MSG_RESULT([no]);) -CFLAGS=$SAVE_CFLAGS -] -) - -dnl AX_EXTRA_DIRS - Let user specify extra dirs for include/libs -AC_DEFUN([AX_EXTRA_DIRS], -[ -AC_ARG_WITH(extra-includes, -[ --with-extra-includes=DIR add extra include paths], - use_extra_includes="$withval", - use_extra_includes=NO -) -if test -n "$use_extra_includes" && \ - test "$use_extra_includes" != "NO"; then - ac_save_ifs=$IFS - IFS=':' - for dir in $use_extra_includes; do - extra_includes="$extra_includes -I$dir" - done - IFS=$ac_save_ifs - CPPFLAGS="$CPPFLAGS $extra_includes" -fi - -AC_ARG_WITH(extra-libs, -[ --with-extra-libs=DIR add extra library paths], - use_extra_libs=$withval, - use_extra_libs=NO -) -if test -n "$use_extra_libs" && \ - test "$use_extra_libs" != "NO"; then - ac_save_ifs=$IFS - IFS=':' - for dir in $use_extra_libs; do - extra_libraries="$extra_libraries -L$dir" - done - IFS=$ac_save_ifs - LDFLAGS="$LDFLAGS $extra_libraries" -fi -] -) - -dnl AX_POPT_CONST - check popt prototype -AC_DEFUN([AX_POPT_CONST], -[ -AC_MSG_CHECKING([popt prototype]) -SAVE_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-Werror $CXXFLAGS" -AC_TRY_COMPILE([#include <popt.h>], -[ -int c; char **v; -poptGetContext(0, c, v, 0, 0); -], -AC_MSG_RESULT([takes char **]);, -AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **])) -CXXFLAGS="$SAVE_CXXFLAGS" -] -) - -dnl AX_CHECK_SSTREAM - check if local sstream is needed to compile OK -AC_DEFUN([AX_CHECK_SSTREAM], -[ -AC_MSG_CHECKING([whether to use included sstream]) -AC_TRY_COMPILE([#include <sstream>], [], -AC_MSG_RESULT([no]);, -AC_MSG_RESULT([yes]); OP_CXXFLAGS="$OP_CXXFLAGS -I\${top_srcdir}/include") -] -) - -dnl AX_CHECK_TYPEDEF(typedef_name, type, action-if-true, action-if-false) -dnl exec action-if-true if typedef_name is a typedef to type else exec -dnl action-if-false -dnl currently work only with type typedef'ed in stddef.h -AC_DEFUN([AX_CHECK_TYPEDEF], [ -dnl AC_LANG_PUSH(C) not in autoconf 2.13 -AC_LANG_SAVE -AC_LANG_C -SAVE_CFLAGS=$CFLAGS -CFLAGS="-Werror $CFLAGS" - -AC_TRY_COMPILE( - [ - #include <stddef.h> - ], - [ - typedef void (*fct1)($1); - typedef void (*fct2)($2); - fct1 f1 = 0; - fct2 f2 = 0; - if (f1 == f2) {} - ], -[$3],[$4]) - -CFLAGS=$SAVE_CFLAGS -AC_LANG_RESTORE -]) - - -dnl AX_TYPEDEFED_NAME(typedef_name, candidate_list, var_name) -dnl set var_name to the typedef name of $1 which must be in canditate_list -dnl else produce a fatal error -AC_DEFUN([AX_TYPEDEFED_NAME], [ - AC_MSG_CHECKING([type of $1]) - for f in $2; do - AX_CHECK_TYPEDEF($1, $f, $3="$f", $3="") - if test -n "${$3}"; then - break - fi - done - if test -n "${$3}"; then - AC_MSG_RESULT([${$3}]) - else - AC_MSG_ERROR([not found]) - fi -]) - -dnl find a binary in the path -AC_DEFUN([QT_FIND_PATH], -[ - AC_MSG_CHECKING([for $1]) - AC_CACHE_VAL(qt_cv_path_$1, - [ - qt_cv_path_$1="NONE" - if test -n "$$2"; then - qt_cv_path_$1="$$2"; - else - dirs="$3" - qt_save_IFS=$IFS - IFS=':' - for dir in $PATH; do - dirs="$dirs $dir" - done - IFS=$qt_save_IFS - - for dir in $dirs; do - if test -x "$dir/$1"; then - if test -n "$5"; then - evalstr="$dir/$1 $5 2>&1 " - if eval $evalstr; then - qt_cv_path_$1="$dir/$1" - break - fi - else - qt_cv_path_$1="$dir/$1" - break - fi - fi - done - fi - ]) - - if test -z "$qt_cv_path_$1" || test "$qt_cv_path_$1" = "NONE"; then - AC_MSG_RESULT(not found) - $4 - else - AC_MSG_RESULT($qt_cv_path_$1) - $2=$qt_cv_path_$1 - fi -]) - -dnl Find the uic compiler on the path or in qt_cv_dir -AC_DEFUN([QT_FIND_UIC], -[ - QT_FIND_PATH(uic, ac_uic, $qt_cv_dir/bin) - if test -z "$ac_uic" -a "$FATAL" = 1; then - AC_MSG_ERROR([uic binary not found in \$PATH or $qt_cv_dir/bin !]) - fi -]) - -dnl Find the right moc in path/qt_cv_dir -AC_DEFUN([QT_FIND_MOC], -[ - QT_FIND_PATH(moc2, ac_moc2, $qt_cv_dir/bin) - QT_FIND_PATH(moc, ac_moc1, $qt_cv_dir/bin) - - if test -n "$ac_moc1" -a -n "$ac_moc2"; then - dnl found both. Prefer Qt3's if it exists else moc2 - $ac_moc1 -v 2>&1 | grep "Qt 3" >/dev/null - if test "$?" = 0; then - ac_moc=$ac_moc1; - else - ac_moc=$ac_moc2; - fi - else - if test -n "$ac_moc1"; then - ac_moc=$ac_moc1; - else - ac_moc=$ac_moc2; - fi - fi - - if test -z "$ac_moc" -a "$FATAL" = 1; then - AC_MSG_ERROR([moc binary not found in \$PATH or $qt_cv_dir/bin !]) - fi -]) - -dnl check a particular libname -AC_DEFUN([QT_TRY_LINK], -[ - SAVE_LIBS="$LIBS" - LIBS="$LIBS $1" - AC_TRY_LINK([ - #include <qglobal.h> - #include <qstring.h> - ], - [ - QString s("mangle_failure"); - #if (QT_VERSION < 221) - break_me_(\\\); - #endif - ], - qt_cv_libname=$1, - ) - LIBS="$SAVE_LIBS" -]) - -dnl check we can do a compile -AC_DEFUN([QT_CHECK_COMPILE], -[ - AC_MSG_CHECKING([for Qt library name]) - - AC_CACHE_VAL(qt_cv_libname, - [ - AC_LANG_CPLUSPLUS - SAVE_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS" - - for libname in -lqt-mt -lqt3 -lqt2 -lqt; - do - QT_TRY_LINK($libname) - if test -n "$qt_cv_libname"; then - break; - fi - done - - CXXFLAGS=$SAVE_CXXFLAGS - ]) - - if test -z "$qt_cv_libname"; then - AC_MSG_RESULT([failed]) - if test "$FATAL" = 1 ; then - AC_MSG_ERROR([Cannot compile a simple Qt executable. Check you have the right \$QTDIR !]) - fi - else - AC_MSG_RESULT([$qt_cv_libname]) - fi -]) - -dnl get Qt version we're using -AC_DEFUN([QT_GET_VERSION], -[ - AC_CACHE_CHECK([Qt version],lyx_cv_qtversion, - [ - AC_LANG_CPLUSPLUS - SAVE_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $QT_INCLUDES" - - cat > conftest.$ac_ext <<EOF -#line __oline__ "configure" -#include "confdefs.h" -#include <qglobal.h> -"%%%"QT_VERSION_STR"%%%" -EOF - lyx_cv_qtversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \ - grep '^"%%%"' 2>/dev/null | \ - sed -e 's/"%%%"//g' -e 's/"//g'` - rm -f conftest.$ac_ext - CPPFLAGS=$SAVE_CPPFLAGS - ]) - - QT_VERSION=$lyx_cv_qtversion - AC_SUBST(QT_VERSION) -]) - -dnl start here -AC_DEFUN([QT_DO_IT_ALL], -[ - dnl Please leave this alone. I use this file in - dnl oprofile. - FATAL=0 - - AC_ARG_WITH(qt-dir, [ --with-qt-dir where the root of Qt is installed ], - [ qt_cv_dir=`eval echo "$withval"/` ]) - - AC_ARG_WITH(qt-includes, [ --with-qt-includes where the Qt includes are. ], - [ qt_cv_includes=`eval echo "$withval"` ]) - - AC_ARG_WITH(qt-libraries, [ --with-qt-libraries where the Qt library is installed.], - [ qt_cv_libraries=`eval echo "$withval"` ]) - - dnl pay attention to $QTDIR unless overridden - if test -z "$qt_cv_dir"; then - qt_cv_dir=$QTDIR - fi - - dnl derive inc/lib if needed - if test -n "$qt_cv_dir"; then - if test -z "$qt_cv_includes"; then - qt_cv_includes=$qt_cv_dir/include - fi - if test -z "$qt_cv_libraries"; then - qt_cv_libraries=$qt_cv_dir/lib - fi - fi - - dnl flags for compilation - QT_INCLUDES= - QT_LDFLAGS= - if test -n "$qt_cv_includes"; then - QT_INCLUDES="-I$qt_cv_includes" - fi - if test -n "$qt_cv_libraries"; then - QT_LDFLAGS="-L$qt_cv_libraries" - fi - AC_SUBST(QT_INCLUDES) - AC_SUBST(QT_LDFLAGS) - - QT_FIND_MOC - MOC=$ac_moc - AC_SUBST(MOC) - QT_FIND_UIC - UIC=$ac_uic - AC_SUBST(UIC) - - QT_CHECK_COMPILE - - QT_LIB=$qt_cv_libname; - AC_SUBST(QT_LIB) - - if test -n "$qt_cv_libname"; then - QT_GET_VERSION - fi -]) - -dnl AX_CXXFLAGS_OPTIONS(var-name, option) -dnl add option to var-name if $CXX support it. -AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [ -AC_MSG_CHECKING([whether ${CXX} support precompiled header]) -AC_LANG_SAVE -AC_LANG_CPLUSPLUS -SAVE_CXXFLAGS=$CXXFLAGS -dnl we consider than if -Winvalid-pch is accepted pch will works ... -CXXFLAGS=-Winvalid-pch -dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and -dnl the fact than some pch will be invalid for the given compilation option -AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no])) -CXXFLAGS=$SAVE_CXXFLAGS -AC_LANG_RESTORE -]) - -dnl AX_CHECK_DOCBOOK -AC_DEFUN([AX_CHECK_DOCBOOK], [ -# It's just rude to go over the net to build -XSLTPROC_FLAGS=--nonet -DOCBOOK_ROOT= -if test ! -f /etc/xml/catalog; then - for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/; - do - if test -d "$i"; then - DOCBOOK_ROOT=$i - fi - done - - # Last resort - try net - if test -z "$DOCBOOK_ROOT"; then - XSLTPROC_FLAGS= - fi -else - XML_CATALOG=/etc/xml/catalog - CAT_ENTRY_START='<!--' - CAT_ENTRY_END='-->' -fi - -AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,) -XSLTPROC_WORKS=no -if test -n "$XSLTPROC"; then - AC_MSG_CHECKING([whether xsltproc works]) - - if test -n "$XML_CATALOG"; then - DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" - else - DB_FILE="$DOCBOOK_ROOT/docbook.xsl" - fi - - $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END -<?xml version="1.0" encoding='ISO-8859-1'?> -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> -<book id="test"> -</book> -END - if test "$?" = 0; then - XSLTPROC_WORKS=yes - fi - AC_MSG_RESULT($XSLTPROC_WORKS) -fi -AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes") - -AC_SUBST(XML_CATALOG) -AC_SUBST(XSLTPROC_FLAGS) -AC_SUBST(DOCBOOK_ROOT) -AC_SUBST(CAT_ENTRY_START) -AC_SUBST(CAT_ENTRY_END) -]) - -dnl AX_CFLAGS_OPTIONS(var-name, option) -dnl add option to var-name if $CC support it. -AC_DEFUN([AX_CFLAGS_OPTION], [ -AC_MSG_CHECKING([whether ${CC} $2 is understood]) -AC_LANG_SAVE -AC_LANG_C -SAVE_CFLAGS=$CFLAGS -CFLAGS=$2 -AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no])) -CFLAGS=$SAVE_CFLAGS -AC_LANG_RESTORE -]) - - -dnl AX_CXXFLAGS_OPTIONS(var-name, option) -dnl add option to var-name if $CXX support it. -AC_DEFUN([AX_CXXFLAGS_OPTION], [ -AC_MSG_CHECKING([whether ${CXX} $2 is understood]) -AC_LANG_SAVE -AC_LANG_CPLUSPLUS -SAVE_CXXFLAGS=$CXXFLAGS -CXXFLAGS=$2 -AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no])) -CXXFLAGS=$SAVE_CXXFLAGS -AC_LANG_RESTORE -]) - -dnl AX_COPY_IF_CHANGE(source, dest) -dnl copy source to dest if they don't compare equally or if dest doesn't exist -AC_DEFUN([AX_COPY_IF_CHANGE], [ -if test -r $2; then - if cmp $1 $2 > /dev/null; then - echo $2 is unchanged - else - cp -f $1 $2 - fi -else - cp -f $1 $2 -fi -]) - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch deleted file mode 100644 index b9bb6c577..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch +++ /dev/null @@ -1,12 +0,0 @@ -oprofile doesn't want GNU-levels of automake strictness so tell it to be "foreign". - -Upstream-Status: Pending -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/configure.ac b/configure.ac -index 5740585..cf6c316 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h]) --AM_INIT_AUTOMAKE -+AM_INIT_AUTOMAKE([foreign]) diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch deleted file mode 100644 index 51db40845..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch +++ /dev/null @@ -1,46 +0,0 @@ -Fix glibc-isms so that oprofile builds with musl. - -Patch taken from openwrt (https://github.com/openwrt-mirror/openwrt/blob/master/package/devel/oprofile/patches/100-musl.patch) - -Upstream-Status: Pending -Signed-off-by: Ross Burton <ross.burton@intel.com> - ---- a/pe_profiling/operf.cpp -+++ b/pe_profiling/operf.cpp -@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_ - int tflag __attribute__((unused)), - struct FTW *ftwbuf __attribute__((unused))) - { -+ int err; -+ - if (remove(fpath)) { -+ err = errno; - perror("sample data removal error"); -- return FTW_STOP; -+ return err; - } else { -- return FTW_CONTINUE; -+ return 0; - } - } - -@@ -896,7 +899,7 @@ static void convert_sample_data(void) - return; - - if (!operf_options::append) { -- int flags = FTW_DEPTH | FTW_ACTIONRETVAL; -+ int flags = FTW_DEPTH; - errno = 0; - if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 && - errno != ENOENT) { ---- a/libop/op_events.c -+++ b/libop/op_events.c -@@ -83,7 +83,7 @@ static int parse_hex(char const * str) - static u64 parse_long_hex(char const * str) - { - u64 value; -- if (sscanf(str, "%Lx", &value) != 1) -+ if (sscanf(str, "0x%llx", &value) != 1) - parse_error("expected long hexadecimal value"); - - fflush(stderr); diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch deleted file mode 100644 index aefa9548e..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch +++ /dev/null @@ -1,98 +0,0 @@ -Prevent running check tests on host if cross compiling - -This patch enables running the 'make check' tests on the target -in a cross-compiled environment. If not cross-compiling, then 'make - check' builds and executes the tests; no change from this patch. -In a cross-compiling environment, the make variable CROSS_COMPILE is -set which bypasses assiging tests to the makekfile variable TESTS. -Since TESTS is empty, the 'make check' process never tries to run the -tests on the hosts. On the target, the tests must be run manually. - -Also, in the libutil++ tests, a makefile variable SRCDIR is passed into -the compilation phase, pointing to the runtime location of the test -'file-manip-tests'. The mechanism used for a host test, based on -'topdir' doesn't work. Instead, if CROSS_COMPILE is set, the -makefile takes the path of SRCDIR from the build environment and not -from an expression based on the host path 'topdir'. - -Upstream-Status: Pending - -Signed-off-by: Dave Lerner <dave.lerner@windriver.com> - -diff --git a/configure.ac b/configure.ac -index 41ece64..ce5a16f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -392,6 +392,7 @@ AC_ARG_ENABLE(account-check, - enable_account_check=$enableval, enable_account_check=yes) - - AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes") -+AM_CONDITIONAL(CROSS_COMPILE, test "x$cross_compiling" = "xyes") - - AC_SUBST(OP_CFLAGS) - AC_SUBST(OP_CXXFLAGS) -diff --git a/libdb/tests/Makefile.am b/libdb/tests/Makefile.am -index 8a69003..d820090 100644 ---- a/libdb/tests/Makefile.am -+++ b/libdb/tests/Makefile.am -@@ -13,4 +13,6 @@ check_PROGRAMS = db_test - db_test_SOURCES = db_test.c - db_test_LDADD = ../libodb.a ../../libutil/libutil.a - -+if ! CROSS_COMPILE - TESTS = ${check_PROGRAMS} -+endif -diff --git a/libop/tests/Makefile.am b/libop/tests/Makefile.am -index 8a79eb5..6d417c4 100644 ---- a/libop/tests/Makefile.am -+++ b/libop/tests/Makefile.am -@@ -33,4 +33,6 @@ load_events_files_tests_LDADD = ${COMMON_LIBS} - mangle_tests_SOURCES = mangle_tests.c - mangle_tests_LDADD = ${COMMON_LIBS} - -+if ! CROSS_COMPILE - TESTS = ${check_PROGRAMS} utf8_checker.sh -+endif -diff --git a/libregex/tests/Makefile.am b/libregex/tests/Makefile.am -index 6f19838..1d176f9 100644 ---- a/libregex/tests/Makefile.am -+++ b/libregex/tests/Makefile.am -@@ -18,4 +18,6 @@ java_test_LDADD = \ - - EXTRA_DIST = mangled-name.in - -+if ! CROSS_COMPILE - TESTS = ${check_PROGRAMS} -+endif -diff --git a/libutil++/tests/Makefile.am b/libutil++/tests/Makefile.am -index 51af031..a01ea2d 100644 ---- a/libutil++/tests/Makefile.am -+++ b/libutil++/tests/Makefile.am -@@ -1,7 +1,9 @@ - - REALPATH= readlink -f - -+if ! CROSS_COMPILE - SRCDIR := $(shell $(REALPATH) $(topdir)/libutil++/tests/ ) -+endif - - AM_CPPFLAGS = \ - -I ${top_srcdir}/libutil++ -D SRCDIR="\"$(SRCDIR)/\"" @OP_CPPFLAGS@ -@@ -46,4 +48,6 @@ cached_value_tests_LDADD = ${COMMON_LIBS} - utility_tests_SOURCES = utility_tests.cpp - utility_tests_LDADD = ${COMMON_LIBS} - -+if ! CROSS_COMPILE - TESTS = ${check_PROGRAMS} -+endif -diff --git a/libutil/tests/Makefile.am b/libutil/tests/Makefile.am -index dfcd6ec..e8831b5 100644 ---- a/libutil/tests/Makefile.am -+++ b/libutil/tests/Makefile.am -@@ -12,4 +12,6 @@ file_tests_LDADD = ../libutil.a - string_tests_SOURCES = string_tests.c - string_tests_LDADD = ../libutil.a - -+if ! CROSS_COMPILE - TESTS = ${check_PROGRAMS} -+endif diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch deleted file mode 100644 index 3eaf6a794..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch +++ /dev/null @@ -1,44 +0,0 @@ -oprofile: Determine the root home directory dynamically - -This commit detects the root home directory dynamically with changes to -the oprofile gui app source. - -The commit replaces an earlier fix that detected and adjusted a -'non-standard' root home directory at build time. The advantage of this -patch is that the oprofile tools are adjusted to the current run-time -path to ~root, not the build time path. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Dave Lerner <dave.lerner@windriver.com> - -Index: oprofile-1.0.0/doc/oprofile.html -=================================================================== ---- oprofile-1.0.0.orig/doc/oprofile.html 2014-11-03 17:55:31.511034857 +0000 -+++ oprofile-1.0.0/doc/oprofile.html 2014-11-03 17:57:26.415037988 +0000 -@@ -1563,8 +1563,8 @@ - <span class="emphasis"><em>must</em></span> stop it in a controlled manner in order to process - the profile data it has collected. Use <code class="code">kill -SIGINT <operf-PID></code> - for this purpose. It is recommended that when running <span class="command"><strong>operf</strong></span> -- with this option, your current working directory should be <code class="filename">/root</code> or a subdirectory -- of <code class="filename">/root</code> to avoid storing sample data files in locations accessible by regular users. -+ with this option, your current working directory should be <code class="filename">~root</code> or a subdirectory -+ of <code class="filename">~root</code> to avoid storing sample data files in locations accessible by regular users. - </p> - </dd> - <dt> -Index: oprofile-1.0.0/doc/oprofile.xml -=================================================================== ---- oprofile-1.0.0.orig/doc/oprofile.xml 2014-11-03 17:55:31.515034857 +0000 -+++ oprofile-1.0.0/doc/oprofile.xml 2014-11-03 17:58:03.719039005 +0000 -@@ -654,8 +654,8 @@ - <emphasis>must</emphasis> stop it in a controlled manner in order to process - the profile data it has collected. Use <code>kill -SIGINT <operf-PID></code> - for this purpose. It is recommended that when running <command>operf</command> -- with this option, your current working directory should be <filename>/root</filename> or a subdirectory -- of <filename>/root</filename> to avoid storing sample data files in locations accessible by regular users. -+ with this option, your current working directory should be <filename>~root</filename> or a subdirectory -+ of <filename>~root</filename> to avoid storing sample data files in locations accessible by regular users. - </para></listitem> - </varlistentry> - <varlistentry> diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/run-ptest b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/run-ptest deleted file mode 100644 index 4814be652..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/run-ptest +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -saved_dir=$PWD -for dir in */tests ; do - cd $dir - for atest in * ; do - if [ \( -x $atest \) -a \( -f $atest \) ] ; then - ./$atest > ${atest}.stdout 2> ${atest}.stderr - if [ $? = 0 ] ; then - echo "PASS: $dir $atest" - rm ${atest}.stdout ${atest}.stderr - else - echo "FAIL: ${dir}/${atest}" - fi - fi - done - cd $saved_dir -done - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb deleted file mode 100644 index 92a94ad0d..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb +++ /dev/null @@ -1,10 +0,0 @@ -require oprofile.inc - -DEPENDS += "virtual/kernel" -DEPENDS_append_powerpc64 = " libpfm4" - -SRC_URI[md5sum] = "248c4c069f9476f427fa7195563f9867" -SRC_URI[sha256sum] = "cf759a6de1a6033d5dfc93bda129a9f2e128aecc4238cc657feb0801d1b0366c" - -S = "${WORKDIR}/oprofile-${PV}" - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb b/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb index b79b97394..51f5597eb 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb @@ -22,11 +22,14 @@ PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=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" + DEPENDS = " \ virtual/${MLPREFIX}libc \ ${MLPREFIX}elfutils \ ${MLPREFIX}binutils \ - bison flex xz \ + bison-native flex-native xz \ xmlto-native \ asciidoc-native \ " @@ -35,9 +38,10 @@ do_configure[depends] += "virtual/kernel:do_shared_workdir" PROVIDES = "virtual/perf" -inherit linux-kernel-base kernel-arch pythonnative +inherit linux-kernel-base kernel-arch # needed for building the tools/perf Python bindings +inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'pythonnative', '', d)} inherit python-dir export PYTHON_SITEPACKAGES_DIR @@ -47,7 +51,8 @@ export WERROR = "0" do_populate_lic[depends] += "virtual/kernel:do_patch" # needed for building the tools/perf Perl binding -inherit perlnative cpan-base +inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perlnative', '', d)} +inherit 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" @@ -56,7 +61,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version inherit kernelsrc -B = "${WORKDIR}/${BPN}-${PV}" +S = "${WORKDIR}/${BP}" SPDX_S = "${S}/tools/perf" # The LDFLAGS is required or some old kernels fails due missing @@ -92,6 +97,17 @@ EXTRA_OEMAKE += "\ 'infodir=${@os.path.relpath(infodir, prefix)}' \ " +PERF_SRC ?= "Makefile \ + include \ + tools/arch \ + tools/build \ + tools/include \ + tools/lib \ + tools/Makefile \ + tools/perf \ + tools/scripts \ +" + PERF_EXTRA_LDFLAGS = "" # MIPS N32 @@ -114,11 +130,22 @@ do_install() { fi } -do_configure_prepend () { - # Fix for rebuilding - rm -rf ${B}/ - mkdir -p ${B}/ +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) + for s in sources: + src = oe.path.join(src_dir, s) + dest = oe.path.join(dest_dir, s) + if os.path.isdir(src): + oe.path.copyhardlinktree(src, dest) + else: + 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 @@ -214,20 +241,21 @@ PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" RDEPENDS_${PN} += "elfutils bash" RDEPENDS_${PN}-doc += "man" RDEPENDS_${PN}-archive =+ "bash" -RDEPENDS_${PN}-python =+ "bash python python-modules" +RDEPENDS_${PN}-python =+ "bash python python-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}" RDEPENDS_${PN}-perl =+ "bash perl perl-modules" RDEPENDS_${PN}-tests =+ "python" RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" -#FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core /usr/lib64/traceevent ${libdir}/traceevent" FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent" FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive" FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests" -FILES_${PN}-python = "${libdir}/perf/perf-core/scripts/python ${PYTHON_SITEPACKAGES_DIR}" -FILES_${PN}-python += "${libexecdir}/perf-core/scripts/python/*" -FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl" +FILES_${PN}-python = " \ + ${PYTHON_SITEPACKAGES_DIR} \ + ${libexecdir}/perf-core/scripts/python \ + " +FILES_${PN}-perl = "${libexecdir}/perf-core/scripts/perl" INHIBIT_PACKAGE_DEBUG_SPLIT="1" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch deleted file mode 100644 index 0fd63106d..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0856d8145d187a7e5a49625247abe43a13f95acc Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 15 Sep 2015 19:36:28 +0000 -Subject: [PATCH] include rquired headers for typedefs - -timeval struct needs to include sys/time.h and sprintf() usage requires -to include stdio.h headers from system - -Fixes -src/perf/perf_bundle.cpp:141:2: error: use of undeclared identifier 'sprintf'; did you mean 'vswprintf'? -src/devices/devfreq.h:35:18: error: field has incomplete type 'struct timeval' - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - src/devices/devfreq.h | 1 + - src/perf/perf_bundle.cpp | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/devices/devfreq.h b/src/devices/devfreq.h -index 16a60fb..4bede7c 100644 ---- a/src/devices/devfreq.h -+++ b/src/devices/devfreq.h -@@ -25,6 +25,7 @@ - #ifndef _INCLUDE_GUARD_DEVFREQ_H - #define _INCLUDE_GUARD_DEVFREQ_H - -+#include <sys/time.h> - #include "device.h" - #include "../parameters/parameters.h" - -diff --git a/src/perf/perf_bundle.cpp b/src/perf/perf_bundle.cpp -index cf1ae11..232f894 100644 ---- a/src/perf/perf_bundle.cpp -+++ b/src/perf/perf_bundle.cpp -@@ -27,6 +27,7 @@ - #include <algorithm> - #include <string.h> - #include <stdint.h> -+#include <stdio.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> --- -2.5.2 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.9.bb index 4d7a3e7bd..4fe5447a0 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.9.bb @@ -6,17 +6,19 @@ DEPENDS = "ncurses libnl pciutils" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" -SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz \ - file://0001-include-rquired-headers-for-typedefs.patch \ +SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-v${PV}.tar.gz \ " -SRC_URI[md5sum] = "c55fedb69203e480801b18bd7b886241" -SRC_URI[sha256sum] = "a87b563f73106babfa3e74dcf92f252938c061e309ace20a361358bbfa579c5a" +SRC_URI[md5sum] = "583518c5c4434c6e9b9c58c3920950b6" +SRC_URI[sha256sum] = "aa7fb7d8e9a00f05e7d8a7a2866d85929741e0d03a5bf40cab22d2021c959250" UPSTREAM_CHECK_URI = "https://01.org/powertop/downloads" +UPSTREAM_CHECK_REGEX = "powertop-[v]?(?P<pver>\d+(\.\d+)+)\.tar" inherit autotools gettext pkgconfig +S = "${WORKDIR}/${BPN}-v${PV}" + # we do not want libncursesw if we can do_configure_prepend() { # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch deleted file mode 100644 index 202f354d2..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 27df521c68e7c8b5b050dab15f40aa15fd03623a Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Wed, 4 May 2016 14:58:24 +0300 -Subject: [PATCH] Avoid building docs - -Upstream-Status: Inappropriate -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - Makefile.am | 2 +- - m4/yelp.m4 | 6 ------ - 2 files changed, 1 insertion(+), 7 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index b919a3f..3a3851d 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = daemon data help lib po src tools tests -+SUBDIRS = daemon data lib po src tools tests - - EXTRA_DIST = AUTHORS tap-test COPYING.gpl-2 - -diff --git a/m4/yelp.m4 b/m4/yelp.m4 -index 5db847f..1b6ede4 100644 ---- a/m4/yelp.m4 -+++ b/m4/yelp.m4 -@@ -27,12 +27,6 @@ AC_ARG_WITH([help-dir], - HELP_DIR="$with_help_dir" - AC_SUBST(HELP_DIR) - --AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command]) --AC_CHECK_PROG([ITSTOOL], [itstool], [itstool]) --if test x"$ITSTOOL" = x; then -- AC_MSG_ERROR([itstool not found]) --fi -- - AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command]) - AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint]) - if test x"$XMLLINT" = x; then --- -2.1.4 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch deleted file mode 100644 index 608523272..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 765d578145e31ddc9495adfab8037ade33c6a9cc Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Wed, 4 May 2016 10:59:36 +0300 -Subject: [PATCH] Disable check for polkit for UI - -The check is not technically required: sysprof just needs -to be able to access system perf counters at runtime. - -Upstream-Status: Pending -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 8559597..ecf93ad 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -131,8 +131,8 @@ AS_IF([test "$enable_gtk" = auto],[ - AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[enable_gtk=yes],[enable_gtk=no]) - ]) - AS_IF([test "$enable_gtk" = "yes"],[ -- AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[],[ -- AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version and polkit-gobject-1]) -+ AS_IF([test "$have_gtk" = "yes"],[],[ -+ AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version]) - ]) - ]) - AM_CONDITIONAL(ENABLE_GTK, test "$enable_gtk" = "yes") --- -2.8.1 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch new file mode 100644 index 000000000..e28fdcad9 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch @@ -0,0 +1,26 @@ +From c2495a4c042e6a675da69bab20cc3669391e8e2a Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 23 Aug 2017 18:38:26 +0300 +Subject: [PATCH 1/2] Do not build anything in help/ as it requires itstool. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + meson.build | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 4ac3934..8c4369a 100644 +--- a/meson.build ++++ b/meson.build +@@ -116,7 +116,6 @@ subdir('tools') + subdir('tests') + + subdir('data') +-subdir('help') + subdir('po') + + meson.add_install_script('build-aux/meson_post_install.sh') +-- +2.14.1 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch deleted file mode 100644 index 158d9975f..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 2b4005d72d3393933a7914be102ea65505c536cc Mon Sep 17 00:00:00 2001 -From: "Maxin B. John" <maxin.john@intel.com> -Date: Thu, 21 Jul 2016 11:53:31 +0300 -Subject: [PATCH] configure: Add option to enable/disable polkit - -Changes the configure behaviour from autodetecting the polkit by default -to having an option to disable it explicitly - -Upstream-Status: Pending - -Signed-off-by: Maxin B. John <maxin.john@intel.com> ---- - configure.ac | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 2246d5a..3d3fe0f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -104,10 +104,18 @@ PKG_CHECK_MODULES(GTK, - [gtk+-3.0 >= gtk_required_version], - [have_gtk=yes], - [have_gtk=no]) -+AC_ARG_ENABLE([polkit], -+ AS_HELP_STRING([--disable-polkit], [Do not use Polkit]), -+ [enable_polkit="$enableval"], [enable_polkit="yes"]) -+ -+AS_IF([test "x$enable_polkit" = "xyes"], [ - PKG_CHECK_MODULES(POLKIT, - [polkit-gobject-1], - [have_polkit=yes], - [have_polkit=no]) -+ ]) -+AM_CONDITIONAL([HAVE_POLKIT], [test "x$enable_polkit" = "xyes"]) -+ - PKG_CHECK_MODULES(SYSTEMD, - [libsystemd >= systemd_required_version], - [have_systemd=yes], --- -2.4.0 - diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.24.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb index 79a27be80..1989b52a7 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.24.1.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb @@ -4,31 +4,31 @@ LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875" +GNOMEBASEBUILDCLASS = "meson" inherit gnomebase gettext systemd upstream-version-is-even DEPENDS = "glib-2.0 libxml2-native glib-2.0-native" +SRC_URI[archive.md5sum] = "6f9f947960ba79bb1269d8ee49b7db78" +SRC_URI[archive.sha256sum] = "d8b9d5c2246696e4a3776a312731dc7c014fbd33478bb14d5512c6f1f35a3b11" SRC_URI += " \ file://define-NT_GNU_BUILD_ID.patch \ - file://0001-configure-Add-option-to-enable-disable-polkit.patch \ - file://0001-Disable-check-for-polkit-for-UI.patch \ - file://0001-Avoid-building-docs.patch \ - " -SRC_URI[archive.md5sum] = "2b44ae1d8cd899417294a9c4509d7870" -SRC_URI[archive.sha256sum] = "054eebe2afb6fe3c06ac8c46bc045c42f675d4fd64e6f16cbc602d5c7ce27bec" - -AUTOTOOLS_AUXDIR = "${S}/build-aux" - -EXTRA_OECONF = "--enable-compile-warnings" + file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \ + " PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}" -PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3" -PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit dbus" +PACKAGECONFIG[gtk] = "-Denable_gtk=true,-Denable_gtk=false,gtk+3" +PACKAGECONFIG[sysprofd] = "-Dwith_sysprofd=bundled,-Dwith_sysprofd=none,polkit" SOLIBS = ".so" FILES_SOLIBSDEV = "" -SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'sysprof2.service', '', d)}" +SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof2.service', '', d)}" # We do not yet work for aarch64. COMPATIBLE_HOST = "^(?!aarch64).*" + +FILES_${PN} += " \ + ${datadir}/dbus-1/system-services \ + ${datadir}/dbus-1/system.d \ + " diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch new file mode 100644 index 000000000..c0ceb5a41 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch @@ -0,0 +1,42 @@ +From a714658727206d2a98a7194b7e6d29dbd3e27b8d Mon Sep 17 00:00:00 2001 +From: David Smith <dsmith@redhat.com> +Date: Mon, 19 Mar 2018 16:50:05 -0500 +Subject: [PATCH] Added a couple of small sysroot fixes. + +* tapsets.cxx (dwarf_builder::build): Fix commit 4ffecddf5. + (path_remove_sysroot): Fix extra '/' present at start of paths. + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> +--- + tapsets.cxx | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +Index: git/tapsets.cxx +=================================================================== +--- git.orig/tapsets.cxx ++++ git/tapsets.cxx +@@ -1395,7 +1395,8 @@ string path_remove_sysroot(const systemt + string retval = path; + if (!sess.sysroot.empty() && + (pos = retval.find(sess.sysroot)) != string::npos) +- retval.replace(pos, sess.sysroot.length(), "/"); ++ retval.replace(pos, sess.sysroot.length(), ++ (sess.sysroot.back() == '/' ? "/": "")); + return retval; + } + +@@ -8412,8 +8413,11 @@ dwarf_builder::build(systemtap_session & + + // PR13338: unquote glob results + module_name = unescape_glob_chars (module_name); +- user_path = find_executable (module_name, "", sess.sysenv); // canonicalize it +- if (!is_fully_resolved(user_path, sess.sysroot, sess.sysenv)) ++ user_path = find_executable (module_name, sess.sysroot, sess.sysenv); // canonicalize it ++ // Note we don't need to pass the sysroot to ++ // is_fully_resolved(), since we just passed it to ++ // find_executable(). ++ if (!is_fully_resolved(user_path, "", sess.sysenv)) + throw SEMANTIC_ERROR(_F("cannot find executable '%s'", + user_path.to_string().c_str())); + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch new file mode 100644 index 000000000..89951a2f1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch @@ -0,0 +1,61 @@ +From 4ffecddf5433d65a6f01241990c9d516586b1c79 Mon Sep 17 00:00:00 2001 +From: Victor Kamensky <kamensky@cisco.com> +Date: Mon, 19 Mar 2018 08:53:51 -0500 +Subject: [PATCH] Delay adding sysroot path to module name in case of non + absolute executable + +Current stap code adds sysroot prematurely for probes that specify non +absolute path name, i.e like "foo", so when find_executable called it +receives full path as <sysroot>/foo and find_executable does not search +PATH while applying sysroot. + +Fix delays adding sysroot till path inside of sysroot is searched first. + +Also fix missing sysroot addition in glob expansion case. + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> +--- + tapsets.cxx | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: git/tapsets.cxx +=================================================================== +--- git.orig/tapsets.cxx ++++ git/tapsets.cxx +@@ -746,7 +746,7 @@ base_query::base_query(dwflpp & dw, lite + pid_val = 0; + get_string_param(params, TOK_PROCESS, module_val); + } +- module_val = find_executable (module_val, "", sess.sysenv); ++ module_val = find_executable (module_val, sess.sysroot, sess.sysenv); + if (!is_fully_resolved(module_val, "", sess.sysenv)) + throw SEMANTIC_ERROR(_F("cannot find executable '%s'", + module_val.to_string().c_str())); +@@ -8287,7 +8287,6 @@ dwarf_builder::build(systemtap_session & + } + else + { +- module_name = (string)sess.sysroot + (string)module_name; + filled_parameters[TOK_PROCESS] = new literal_string(module_name); + } + } +@@ -8321,7 +8320,8 @@ dwarf_builder::build(systemtap_session & + assert (lit); + + // Evaluate glob here, and call derive_probes recursively with each match. +- const auto& globs = glob_executable (module_name); ++ const auto& globs = glob_executable (sess.sysroot ++ + string(module_name)); + unsigned results_pre = finished_results.size(); + for (auto it = globs.begin(); it != globs.end(); ++it) + { +@@ -8413,7 +8413,7 @@ dwarf_builder::build(systemtap_session & + // PR13338: unquote glob results + module_name = unescape_glob_chars (module_name); + user_path = find_executable (module_name, "", sess.sysenv); // canonicalize it +- if (!is_fully_resolved(user_path, "", sess.sysenv)) ++ if (!is_fully_resolved(user_path, sess.sysroot, sess.sysenv)) + throw SEMANTIC_ERROR(_F("cannot find executable '%s'", + user_path.to_string().c_str())); + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch new file mode 100644 index 000000000..460c3b760 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch @@ -0,0 +1,277 @@ +From fbb26e17a4c026f05a497fc5d584516bad3b6950 Mon Sep 17 00:00:00 2001 +From: David Smith <dsmith@redhat.com> +Date: Wed, 6 Dec 2017 14:37:42 -0600 +Subject: [PATCH] Fix PR22551 by updating the use of timers for the 4.15 + kernel. + +* runtime/linux/timer_compatibility.h: New file. +* runtime/time.c: Update timer callback function parameter type. Update + timer initialization. +* runtime/transport/relay_v2.c: Ditto. +* runtime/transport/transport.c: Ditto. +* tapset-timers.cxx (timer_derived_probe_group::emit_module_decls): + Ditto. Handle old and new timer callback interface. +* runtime/linux/runtime.h: Include timer_compatibility.h instead of timer.h. +* tapset/linux/scsi.stp: Ditto. + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> + +--- + runtime/linux/runtime.h | 2 +- + runtime/linux/timer_compatibility.h | 76 +++++++++++++++++++++++++++++++++++++ + runtime/time.c | 7 ++-- + runtime/transport/relay_v2.c | 8 ++-- + runtime/transport/transport.c | 13 +++---- + tapset-timers.cxx | 14 +++++-- + tapset/linux/scsi.stp | 2 +- + 7 files changed, 100 insertions(+), 22 deletions(-) + create mode 100644 runtime/linux/timer_compatibility.h + +diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h +index 9c585a2..df9b74c 100644 +--- a/runtime/linux/runtime.h ++++ b/runtime/linux/runtime.h +@@ -34,7 +34,7 @@ + #include <linux/compat.h> + #include <linux/sched.h> + #include <linux/mm.h> +-#include <linux/timer.h> ++#include "timer_compatibility.h" + #include <linux/delay.h> + #include <linux/profile.h> + #include <linux/rcupdate.h> +diff --git a/runtime/linux/timer_compatibility.h b/runtime/linux/timer_compatibility.h +new file mode 100644 +index 0000000..ac03de9 +--- /dev/null ++++ b/runtime/linux/timer_compatibility.h +@@ -0,0 +1,76 @@ ++/* ++ * linux/timer.h compatibility defines and inlines ++ * Copyright (C) 2017 Red Hat Inc. ++ * ++ * This file is part of systemtap, and is free software. You can ++ * redistribute it and/or modify it under the terms of the GNU General ++ * Public License (GPL); either version 2, or (at your option) any ++ * later version. ++ */ ++ ++#ifndef _TIMER_COMPATIBILITY_H_ ++#define _TIMER_COMPATIBILITY_H_ ++ ++#include <linux/timer.h> ++ ++/* ++ * Starting with the 4.15 kernel, the timer interface ++ * changed. Originally, you'd do something like: ++ * ++ * static void timer_func(unsigned long val); ++ * ++ * init_timer(&timer); ++ * timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL; ++ * timer.function = timer_func; ++ * timer.data = 0; ++ * add_timer(&timer); ++ * ++ * The 'data' parameter would get passed to the callback ++ * function. Starting with 4.15, you'd do something like this: ++ * ++ * static void timer_func(struct timer_list *val); ++ * ++ * timer_setup(&timer, timer_func, 0); ++ * timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL; ++ * add_timer(&timer); ++ * ++ * With the new code, the timer that caused the callback gets passed ++ * to the timer callback function. The 'data' field has been removed. ++ * ++ * So, we're going to use the new interface. To hide the differences ++ * between the callback function parameter type, we'll define a new ++ * type, 'stp_timer_callback_parameter_t'. ++ * ++ * If code needs to figure out the difference between the old and new ++ * interface, it should test the TIMER_TRACE_FLAGMASK define (which ++ * only exists in the new interface). ++ */ ++ ++#if defined(TIMER_TRACE_FLAGMASK) ++/* This is the >= 4.15 kernel interface. */ ++ ++typedef struct timer_list * stp_timer_callback_parameter_t; ++ ++#else ++/* This is the < 4.15 kernel interface. */ ++ ++typedef unsigned long stp_timer_callback_parameter_t; ++ ++/** ++ * timer_setup - prepare a timer for first use ++ * @timer: the timer in question ++ * @callback: the function to call when timer expires ++ * @flags: any TIMER_* flags (note that anything other than 0 is an ++ * error, since this compatibility function can't support any ++ * of the TIMER_* flags) ++ */ ++#define timer_setup(timer, callback, flags) \ ++ { \ ++ init_timer((timer)); \ ++ (timer)->function = callback; \ ++ (timer)->data = 0; \ ++ BUILD_BUG_ON_ZERO((flags) != 0); \ ++ } ++#endif ++ ++#endif /* _TIMER_COMPATIBILITY_H_ */ +diff --git a/runtime/time.c b/runtime/time.c +index 2e666d5..91ceafa 100644 +--- a/runtime/time.c ++++ b/runtime/time.c +@@ -168,10 +168,10 @@ __stp_time_smp_callback(void *val) + + /* The timer callback is in a softIRQ -- interrupts enabled. */ + static void +-__stp_time_timer_callback(unsigned long val) ++__stp_time_timer_callback(stp_timer_callback_parameter_t unused) + { + stp_time_t *time =__stp_time_local_update(); +- (void) val; ++ (void) unused; + + /* PR6481: make sure IRQs are enabled before resetting the timer + (IRQs are disabled and then reenabled in +@@ -200,9 +200,8 @@ __stp_init_time(void *info) + time->freq = __stp_get_freq(); + __stp_time_local_update(); + +- init_timer(&time->timer); ++ timer_setup(&time->timer, __stp_time_timer_callback, 0); + time->timer.expires = jiffies + STP_TIME_SYNC_INTERVAL; +- time->timer.function = __stp_time_timer_callback; + + #ifndef STAPCONF_ADD_TIMER_ON + add_timer(&time->timer); +diff --git a/runtime/transport/relay_v2.c b/runtime/transport/relay_v2.c +index f81d75d..135951a 100644 +--- a/runtime/transport/relay_v2.c ++++ b/runtime/transport/relay_v2.c +@@ -30,7 +30,7 @@ + #include <linux/debugfs.h> + #include <linux/mm.h> + #include <linux/relay.h> +-#include <linux/timer.h> ++#include "../linux/timer_compatibility.h" + #include "../uidgid_compatibility.h" + #include "relay_compat.h" + +@@ -120,7 +120,7 @@ static void __stp_relay_wakeup_readers(struct rchan_buf *buf) + wake_up_interruptible(&buf->read_wait); + } + +-static void __stp_relay_wakeup_timer(unsigned long val) ++static void __stp_relay_wakeup_timer(stp_timer_callback_parameter_t unused) + { + #ifdef STP_BULKMODE + int i; +@@ -151,10 +151,8 @@ static void __stp_relay_wakeup_timer(unsigned long val) + static void __stp_relay_timer_init(void) + { + atomic_set(&_stp_relay_data.wakeup, 0); +- init_timer(&_stp_relay_data.timer); ++ timer_setup(&_stp_relay_data.timer, __stp_relay_wakeup_timer, 0); + _stp_relay_data.timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL; +- _stp_relay_data.timer.function = __stp_relay_wakeup_timer; +- _stp_relay_data.timer.data = 0; + add_timer(&_stp_relay_data.timer); + smp_mb(); + } +diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c +index 3400f22..320fd18 100644 +--- a/runtime/transport/transport.c ++++ b/runtime/transport/transport.c +@@ -311,7 +311,7 @@ static void _stp_detach(void) + } + + +-static void _stp_ctl_work_callback(unsigned long val); ++static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused); + + /* + * Called when stapio opens the control channel. +@@ -320,13 +320,12 @@ static void _stp_attach(void) + { + dbug_trans(1, "attach\n"); + _stp_pid = current->pid; +- if (_stp_namespaces_pid < 1) +- _stp_namespaces_pid = _stp_pid; ++ if (_stp_namespaces_pid < 1) ++ _stp_namespaces_pid = _stp_pid; + _stp_transport_data_fs_overwrite(0); +- init_timer(&_stp_ctl_work_timer); ++ ++ timer_setup(&_stp_ctl_work_timer, _stp_ctl_work_callback, 0); + _stp_ctl_work_timer.expires = jiffies + STP_CTL_TIMER_INTERVAL; +- _stp_ctl_work_timer.function = _stp_ctl_work_callback; +- _stp_ctl_work_timer.data= 0; + add_timer(&_stp_ctl_work_timer); + } + +@@ -341,7 +340,7 @@ static void _stp_attach(void) + * notified. Reschedules itself if someone is still attached + * to the cmd channel. + */ +-static void _stp_ctl_work_callback(unsigned long val) ++static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused) + { + int do_io = 0; + unsigned long flags; +diff --git a/tapset-timers.cxx b/tapset-timers.cxx +index 1a40bcd..0ab4d69 100644 +--- a/tapset-timers.cxx ++++ b/tapset-timers.cxx +@@ -122,9 +122,13 @@ timer_derived_probe_group::emit_module_decls (systemtap_session& s) + s.op->newline(-1) << "};"; + s.op->newline(); + +- s.op->newline() << "static void enter_timer_probe (unsigned long val) {"; ++ s.op->newline() << "static void enter_timer_probe (stp_timer_callback_parameter_t val) {"; ++ s.op->newline() << "#if defined(TIMER_TRACE_FLAGMASK)"; ++ s.op->newline(1) << "struct stap_timer_probe* stp = container_of(val, struct stap_timer_probe, timer_list);"; ++ s.op->newline(-1) << "#else"; + s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [val];"; +- s.op->newline() << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||"; ++ s.op->newline(-1) << "#endif"; ++ s.op->newline(1) << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||"; + s.op->newline() << " (atomic_read (session_state()) == STAP_SESSION_RUNNING))"; + s.op->newline(1) << "mod_timer (& stp->timer_list, jiffies + "; + emit_interval (s.op); +@@ -148,9 +152,11 @@ timer_derived_probe_group::emit_module_init (systemtap_session& s) + s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {"; + s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [i];"; + s.op->newline() << "probe_point = stp->probe->pp;"; +- s.op->newline() << "init_timer (& stp->timer_list);"; +- s.op->newline() << "stp->timer_list.function = & enter_timer_probe;"; ++ ++ s.op->newline() << "timer_setup (& stp->timer_list, enter_timer_probe, 0);"; ++ s.op->newline() << "#if !defined(TIMER_TRACE_FLAGMASK)"; + s.op->newline() << "stp->timer_list.data = i;"; // NB: important! ++ s.op->newline() << "#endif"; + // copy timer renew calculations from above :-( + s.op->newline() << "stp->timer_list.expires = jiffies + "; + emit_interval (s.op); +diff --git a/tapset/linux/scsi.stp b/tapset/linux/scsi.stp +index 44f686c..3577942 100644 +--- a/tapset/linux/scsi.stp ++++ b/tapset/linux/scsi.stp +@@ -14,7 +14,7 @@ + #include <scsi/scsi_cmnd.h> + #include <scsi/scsi_device.h> + #include <scsi/scsi_host.h> +-#include <linux/timer.h> ++#include "linux/timer_compatibility.h" + #include <linux/blkdev.h> + %} + +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fixes-for-gcc-8.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fixes-for-gcc-8.patch new file mode 100644 index 000000000..a1b0bff02 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fixes-for-gcc-8.patch @@ -0,0 +1,215 @@ +From 4ffe00f1d9eac332d928f7dc01fe250dc32b1bb8 Mon Sep 17 00:00:00 2001 +From: Stan Cox <scox@redhat.com> +Date: Tue, 13 Feb 2018 22:38:03 -0500 +Subject: [PATCH] Fixes for gcc 8 + +* includes/sys/sdt.h (__SDT_COND_SIGNED): Add CT, cast type argument + +Author: Will Cohen <wcohen.redhat.com> + +* stap-serverd.cxx (generate_mok, handleRequest, handle_connection): + Catch format overflow + +* translate.cxx (translate_pass): Use ref in catch. +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj <raj.khem@gmail.com> + + includes/sys/sdt.h | 20 ++++++++-------- + stap-serverd.cxx | 67 +++++++++++++++++++++++++++++++++++++++++++++++------- + translate.cxx | 2 +- + 3 files changed, 70 insertions(+), 19 deletions(-) + +diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h +index 940f74483..c0c5a492c 100644 +--- a/includes/sys/sdt.h ++++ b/includes/sys/sdt.h +@@ -119,8 +119,8 @@ struct __sdt_type + + #define __SDT_ALWAYS_SIGNED(T) \ + template<> struct __sdt_type<T> { static const bool __sdt_signed = true; }; +-#define __SDT_COND_SIGNED(T) \ +-template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 1); }; ++#define __SDT_COND_SIGNED(T,CT) \ ++template<> struct __sdt_type<T> { static const bool __sdt_signed = ((CT)(-1) < 1); }; + __SDT_ALWAYS_SIGNED(signed char) + __SDT_ALWAYS_SIGNED(short) + __SDT_ALWAYS_SIGNED(int) +@@ -141,14 +141,14 @@ __SDT_ALWAYS_SIGNED(const volatile short) + __SDT_ALWAYS_SIGNED(const volatile int) + __SDT_ALWAYS_SIGNED(const volatile long) + __SDT_ALWAYS_SIGNED(const volatile long long) +-__SDT_COND_SIGNED(char) +-__SDT_COND_SIGNED(wchar_t) +-__SDT_COND_SIGNED(volatile char) +-__SDT_COND_SIGNED(volatile wchar_t) +-__SDT_COND_SIGNED(const char) +-__SDT_COND_SIGNED(const wchar_t) +-__SDT_COND_SIGNED(const volatile char) +-__SDT_COND_SIGNED(const volatile wchar_t) ++__SDT_COND_SIGNED(char, char) ++__SDT_COND_SIGNED(wchar_t, wchar_t) ++__SDT_COND_SIGNED(volatile char, char) ++__SDT_COND_SIGNED(volatile wchar_t, wchar_t) ++__SDT_COND_SIGNED(const char, char) ++__SDT_COND_SIGNED(const wchar_t, wchar_t) ++__SDT_COND_SIGNED(const volatile char, char) ++__SDT_COND_SIGNED(const volatile wchar_t, wchar_t) + #if defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + /* __SDT_COND_SIGNED(char16_t) */ + /* __SDT_COND_SIGNED(char32_t) */ +diff --git a/stap-serverd.cxx b/stap-serverd.cxx +index 7cf76c617..41f77ee9e 100644 +--- a/stap-serverd.cxx ++++ b/stap-serverd.cxx +@@ -1607,6 +1607,7 @@ generate_mok(string &mok_fingerprint) + char tmpdir[PATH_MAX] = { '\0' }; + string public_cert_path, private_cert_path, destdir; + mode_t old_umask; ++ int retlen; + + mok_fingerprint.clear (); + +@@ -1631,7 +1632,14 @@ generate_mok(string &mok_fingerprint) + } + + // Make a temporary directory to store results in. +- snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ()); ++ retlen = snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ()); ++ if (retlen < 0 || retlen >= PATH_MAX) ++ { ++ server_error (_F("Could not create %s name", "temporary directory")); ++ tmpdir[0] = '\0'; ++ goto cleanup; ++ } ++ + if (mkdtemp (tmpdir) == NULL) + { + server_error (_F("Could not create temporary directory %s: %s", tmpdir, +@@ -1704,6 +1712,7 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri + unsigned u; + unsigned i; + FILE* f; ++ int retlen; + + // Save the server version. Do this early, so the client knows what version of the server + // it is dealing with, even if the request is not fully completed. +@@ -1782,7 +1791,12 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri + struct stat st; + char *arg; + +- snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i); ++ retlen = snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i); ++ if (retlen < 0 || retlen >= PATH_MAX) ++ { ++ server_error (_F("Error creating %s name", "path")); ++ return; ++ } + + rc = stat(stapargfile, & st); + if (rc) break; +@@ -1888,7 +1902,15 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri + { + glob_t globber; + char pattern[PATH_MAX]; +- snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str()); ++ int retlen; ++ ++ retlen = snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str()); ++ if (retlen < 0 || retlen >= PATH_MAX) ++ { ++ server_error (_F("Error creating %s name", "pattern")); ++ return; ++ } ++ + rc = glob (pattern, GLOB_ERR, NULL, &globber); + if (rc) + server_error (_F("Unable to find a module in %s", new_staptmpdir.c_str())); +@@ -2164,6 +2186,7 @@ handle_connection (void *arg) + copy for each connection.*/ + vector<string> argv; + PRInt32 bytesRead; ++ int retlen; + + /* Detatch to avoid a memory leak */ + if(max_threads > 0) +@@ -2213,7 +2236,13 @@ handle_connection (void *arg) + #endif + + secStatus = SECFailure; +- snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp"); ++ retlen = snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp"); ++ if (retlen < 0 || retlen >= PATH_MAX) ++ { ++ server_error (_F("Error creating %s name", "temporary directory")); ++ tmpdir[0]=0; /* prevent /bin/rm */ ++ goto cleanup; ++ } + rc1 = mkdtemp(tmpdir); + if (! rc1) + { +@@ -2223,9 +2252,20 @@ handle_connection (void *arg) + } + + /* Create a temporary files names and directories. */ +- snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir); ++ retlen = snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir); ++ if (retlen < 0 || retlen >= PATH_MAX) ++ { ++ server_error (_F("Error creating %s name", "request.zip path")); ++ goto cleanup; ++ } ++ ++ retlen = snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir); ++ if (retlen < 0 || retlen >= PATH_MAX) ++ { ++ server_error (_F("Error creating %s name", "request directory path")); ++ goto cleanup; ++ } + +- snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir); + rc = mkdir(requestDirName, 0700); + if (rc) + { +@@ -2233,7 +2273,13 @@ handle_connection (void *arg) + goto cleanup; + } + +- snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir); ++ retlen = snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir); ++ if (retlen < 0 || retlen >= PATH_MAX) ++ { ++ server_error (_F("Error creating %s name", "response directory path")); ++ goto cleanup; ++ } ++ + rc = mkdir(responseDirName, 0700); + if (rc) + { +@@ -2243,7 +2289,12 @@ handle_connection (void *arg) + // Set this early, since it gets used for errors to be returned to the client. + stapstderr = string(responseDirName) + "/stderr"; + +- snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir); ++ retlen = snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir); ++ if (retlen < 0 || retlen >= PATH_MAX) ++ { ++ server_error (_F("Error creating %s name", "response.zip path")); ++ goto cleanup; ++ } + + /* Read data from the socket. + * If the user is requesting/requiring authentication, authenticate +diff --git a/translate.cxx b/translate.cxx +index 1240a80ec..4ade06fdd 100644 +--- a/translate.cxx ++++ b/translate.cxx +@@ -7860,7 +7860,7 @@ translate_pass (systemtap_session& s) + if (versions.size() >= 3 && s.verbose > 1) + clog << _F("ignoring extra parts of compat version: %s", s.compatible.c_str()) << endl; + } +- catch (const runtime_error) ++ catch (const runtime_error&) + { + throw SEMANTIC_ERROR(_F("parse error in compatibility version: %s", s.compatible.c_str())); + } diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch new file mode 100644 index 000000000..7cd9030ea --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch @@ -0,0 +1,128 @@ +From 41efad04730be89889d1483719f9a6c9396dc250 Mon Sep 17 00:00:00 2001 +From: David Smith <dsmith@redhat.com> +Date: Wed, 14 Mar 2018 17:05:25 -0500 +Subject: [PATCH] Make sure sysroot paths don't end with a slash. + +* session.cxx (parse_cmdline): Make sure a sysroot path does not end with + a '/', since we build paths like: sysroot + "/lib/modules". If the + sysroot path ends with a '/', we end up with paths like + '/SYSROOT//lib/modules'. + (setup_kernel_release): Take a string parameter, not a character pointer. +* session.h: Update setup_kernel_release() prototype. + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> +--- + session.cxx | 34 ++++++++++++++++++++++++++-------- + session.h | 2 +- + 2 files changed, 27 insertions(+), 9 deletions(-) + +Index: git/session.cxx +=================================================================== +--- git.orig/session.cxx ++++ git/session.cxx +@@ -722,6 +722,9 @@ systemtap_session::parse_cmdline (int ar + client_options_disallowed_for_unprivileged = ""; + std::set<std::string> additional_unwindsym_modules; + struct rlimit our_rlimit; ++ bool sysroot_option_seen = false; ++ string kernel_release_value; ++ + while (true) + { + char * num_endptr; +@@ -887,7 +890,7 @@ systemtap_session::parse_cmdline (int ar + // Note that '-' must come last in a regex bracket expression. + assert_regexp_match("-r parameter from client", optarg, "^[a-z0-9_.+-]+$"); + server_args.push_back (string ("-") + (char)grc + optarg); +- setup_kernel_release(optarg); ++ kernel_release_value = optarg; + break; + + case 'a': +@@ -1473,7 +1476,7 @@ systemtap_session::parse_cmdline (int ar + if (client_options) { + cerr << _F("ERROR: %s invalid with %s", "--sysroot", "--client-options") << endl; + return 1; +- } else if (!sysroot.empty()) { ++ } else if (sysroot_option_seen) { + cerr << "ERROR: multiple --sysroot options not supported" << endl; + return 1; + } else { +@@ -1487,11 +1490,17 @@ systemtap_session::parse_cmdline (int ar + + sysroot = string(spath); + free (spath); +- if (sysroot[sysroot.size() - 1] != '/') +- sysroot.append("/"); + +- break; ++ // We do path creation like this: ++ // sysroot + "/lib/modules" ++ // So, we don't want the sysroot path to end with a '/', ++ // otherwise we'll end up with '/foo//lib/modules'. ++ if (sysroot.back() == '/') { ++ sysroot.pop_back(); ++ } + } ++ sysroot_option_seen = true; ++ break; + + case LONG_OPT_SYSENV: + if (client_options) { +@@ -1501,7 +1510,7 @@ systemtap_session::parse_cmdline (int ar + string sysenv_str = optarg; + string value; + size_t pos; +- if (sysroot.empty()) { ++ if (! sysroot_option_seen) { + cerr << "ERROR: --sysenv must follow --sysroot" << endl; + return 1; + } +@@ -1646,6 +1655,15 @@ systemtap_session::parse_cmdline (int ar + } + } + ++ if (! kernel_release_value.empty()) ++ { ++ setup_kernel_release(kernel_release_value); ++ } ++ else if (! sysroot.empty()) ++ { ++ kernel_build_tree = sysroot + "/lib/modules/" + kernel_release + "/build"; ++ } ++ + return 0; + } + +@@ -2152,7 +2170,7 @@ void systemtap_session::insert_loaded_mo + } + + void +-systemtap_session::setup_kernel_release (const char* kstr) ++systemtap_session::setup_kernel_release (const string& kstr) + { + // Sometimes we may get dupes here... e.g. a server may have a full + // -r /path/to/kernel followed by a client's -r kernel. +@@ -2183,7 +2201,7 @@ systemtap_session::setup_kernel_release + else + { + update_release_sysroot = true; +- kernel_release = string (kstr); ++ kernel_release = kstr; + if (!kernel_release.empty()) + kernel_build_tree = "/lib/modules/" + kernel_release + "/build"; + +Index: git/session.h +=================================================================== +--- git.orig/session.h ++++ git/session.h +@@ -144,7 +144,7 @@ public: + + // NB: It is very important for all of the above (and below) fields + // to be cleared in the systemtap_session ctor (session.cxx). +- void setup_kernel_release (const char* kstr); ++ void setup_kernel_release (const std::string& kstr); + void insert_loaded_modules (); + + // command line parsing diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Use-sysroot-when-looking-for-the-System.map-file.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Use-sysroot-when-looking-for-the-System.map-file.patch new file mode 100644 index 000000000..b2820b31e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Use-sysroot-when-looking-for-the-System.map-file.patch @@ -0,0 +1,29 @@ +From 436063d5e4738a9b03535d330a2242be5118e745 Mon Sep 17 00:00:00 2001 +From: David Smith <dsmith@redhat.com> +Date: Thu, 8 Mar 2018 16:01:58 -0600 +Subject: [PATCH] Use sysroot when looking for the System.map file. + +Add sysroot to system_map_path + "/boot/System.map" case. Otherwise +stap tries to look symbols on host system and it produce error like this: + +> Kernel symbol table /boot/System.map-4.9.78-yocto-standard unavailable, (No such file or directory) + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> +--- + session.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: git/session.cxx +=================================================================== +--- git.orig/session.cxx ++++ git/session.cxx +@@ -2013,7 +2013,7 @@ systemtap_session::parse_kernel_function + clog << _F("Kernel symbol table %s unavailable, (%s)", + system_map_path.c_str(), strerror(errno)) << endl; + +- system_map_path = "/boot/System.map-" + kernel_release; ++ system_map_path = sysroot + "/boot/System.map-" + kernel_release; + system_map.clear(); + system_map.open(system_map_path.c_str(), ifstream::in); + if (! system_map.is_open()) diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch new file mode 100644 index 000000000..98181a129 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch @@ -0,0 +1,39 @@ +From 183c7a7a8167333c873525f7908913837b8dc3cb Mon Sep 17 00:00:00 2001 +From: Victor Kamensky <kamensky@cisco.com> +Date: Tue, 20 Mar 2018 12:41:05 -0500 +Subject: [PATCH] _stp_umodule_relocate needs target file path, not host file + path + +Strip of sysroot from module name is required when _stp_umodule_relocate +call is generated. Otherwise path won't match path on target and could +will fail to calculated address within the file. + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> +--- + loc2stap.cxx | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/loc2stap.cxx b/loc2stap.cxx +index 4818ee0..e09954f 100644 +--- a/loc2stap.cxx ++++ b/loc2stap.cxx +@@ -17,6 +17,7 @@ + + #include "loc2stap.h" + #include "dwflpp.h" ++#include "tapsets.h" + + #if ! _ELFUTILS_PREREQ(0, 153) + #define DW_OP_GNU_entry_value 0xf3 +@@ -106,7 +107,9 @@ location_context::translate_address(Dwarf_Addr addr) + c = "/* pragma:vma */ " + "({ unsigned long addr = 0; " + "addr = _stp_umodule_relocate (\"" +- + resolve_path(dw->module_name.c_str()) + "\", " ++ + path_remove_sysroot(dw->sess, ++ resolve_path(dw->module_name.c_str())) ++ + "\", " + + lex_cast_hex (addr) + + ", current); addr; })"; + } diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch new file mode 100644 index 000000000..160642db0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch @@ -0,0 +1,42 @@ +From b29e448e12040ed8f4d83743a14db0f138a7cc67 Mon Sep 17 00:00:00 2001 +From: Victor Kamensky <kamensky@cisco.com> +Date: Wed, 14 Mar 2018 16:54:08 -0500 +Subject: [PATCH] debuginfo lookup with sysroot case do not remove sysroot from + file_name + +If sysroot option is passed, and debug symbols reside in sysroot along +with executable <foo> in <foo_dir>/.debug/<foo_file> directory, +stap fails to find debuginfo because it strips out sysroot path +from file_name so dwfl_standard_find_debuginfo ends up looking at +host <foo_dir>/.debug/<foo_file> rather then checking +<sysroot>/<foo_dir>/.debug/<foo_file>. + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> +--- + setupdwfl.cxx | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/setupdwfl.cxx b/setupdwfl.cxx +index 11e0bb2..2a87982 100644 +--- a/setupdwfl.cxx ++++ b/setupdwfl.cxx +@@ -627,18 +627,6 @@ internal_find_debuginfo (Dwfl_Module *mod, + + call_dwfl_standard_find_debuginfo: + +- if (current_session_for_find_debuginfo) +- { +- string sysroot = current_session_for_find_debuginfo->sysroot + "/*"; +- int found = fnmatch(sysroot.c_str(), file_name, 0); +- +- if (found) +- { +- file_name = file_name +- + current_session_for_find_debuginfo->sysroot.length() - 1; +- } +- } +- + /* Call the original dwfl_standard_find_debuginfo */ + return dwfl_standard_find_debuginfo(mod, userdata, modname, base, + file_name, debuglink_file, diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch new file mode 100644 index 000000000..6fe7d4d1c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch @@ -0,0 +1,40 @@ +From 7e11f129ff370ce5f39812ce2ae6ce40818a347f Mon Sep 17 00:00:00 2001 +From: Victor Kamensky <kamensky@cisco.com> +Date: Thu, 22 Mar 2018 16:02:02 -0500 +Subject: [PATCH] sysroot: fix short release -r option handling follow up + +In case of sysroot set and short release -r option it does not make sense +to pass short release name into dwfl_linux_kernel_report_offline +function. This function is not aware about sysroot and it won't look for +kernel modules under sysroot directory. + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> +--- + setupdwfl.cxx | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/setupdwfl.cxx b/setupdwfl.cxx +index c419afa..0cf5810 100644 +--- a/setupdwfl.cxx ++++ b/setupdwfl.cxx +@@ -367,7 +367,15 @@ setup_dwfl_kernel (unsigned *modules_found, systemtap_session &s) + // hard-code this magic here. + string lib_path = s.sysroot + "/lib/modules/" + s.kernel_release + "/build"; + if (s.kernel_build_tree == lib_path) +- elfutils_kernel_path = s.kernel_release; ++ { ++ if (s.sysroot != "") ++ // If we have sysroot set does not make sense to pass ++ // short release to dwfl, it won't take a sysroot into ++ // account. Let's construct full path in such case. ++ elfutils_kernel_path = string(s.sysroot + "/lib/modules/" + s.kernel_release); ++ else ++ elfutils_kernel_path = s.kernel_release; ++ } + else + elfutils_kernel_path = s.kernel_build_tree; + offline_modules_found = 0; +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling.patch new file mode 100644 index 000000000..b31d6274e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling.patch @@ -0,0 +1,53 @@ +From a9ce89bcd2d78728faef59bda60e75510972cd56 Mon Sep 17 00:00:00 2001 +From: Victor Kamensky <kamensky@cisco.com> +Date: Wed, 14 Mar 2018 17:09:44 -0500 +Subject: [PATCH] sysroot: fix short release -r option handling + +* setupdwfl.cxx (debuginfo_path_insert_sysroot): Add a '/' to the end of + the sysroot for path_insert_sysroot(). + (setup_dwfl_kernel): Simplify logic when finding the kernel path to send + to elfutils. + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> +--- + setupdwfl.cxx | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +diff --git a/setupdwfl.cxx b/setupdwfl.cxx +index 2a87982..f6c3157 100644 +--- a/setupdwfl.cxx ++++ b/setupdwfl.cxx +@@ -339,6 +339,13 @@ static char * path_insert_sysroot(string sysroot, string path) + + void debuginfo_path_insert_sysroot(string sysroot) + { ++ // FIXME: This is a short-term fix, until we expect sysroot paths to ++ // always end with a '/' (and never be empty). ++ // ++ // The path_insert_sysroot() function assumes that sysroot has a '/' ++ // on the end. Make sure that is true. ++ if (sysroot.back() != '/') ++ sysroot.push_back('/'); + debuginfo_path = path_insert_sysroot(sysroot, debuginfo_path); + debuginfo_usr_path = path_insert_sysroot(sysroot, debuginfo_usr_path); + } +@@ -358,13 +365,11 @@ setup_dwfl_kernel (unsigned *modules_found, systemtap_session &s) + // no way to set the dwfl_callback.debuginfo_path and always + // passs the plain kernel_release here. So instead we have to + // hard-code this magic here. +- string lib_path = "/lib/modules/" + s.kernel_release + "/build"; +- if (s.kernel_build_tree == string(s.sysroot + lib_path) || +- (s.kernel_build_tree == lib_path +- && s.sysroot == "/")) +- elfutils_kernel_path = s.kernel_release; +- else +- elfutils_kernel_path = s.kernel_build_tree; ++ string lib_path = s.sysroot + "/lib/modules/" + s.kernel_release + "/build"; ++ if (s.kernel_build_tree == lib_path) ++ elfutils_kernel_path = s.kernel_release; ++ else ++ elfutils_kernel_path = s.kernel_build_tree; + offline_modules_found = 0; + + // First try to report full path modules. diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch new file mode 100644 index 000000000..8a3d39a5b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch @@ -0,0 +1,117 @@ +From 2041085d1a700201dc088991ca8136e7935bf42f Mon Sep 17 00:00:00 2001 +From: Victor Kamensky <kamensky@cisco.com> +Date: Wed, 21 Mar 2018 11:35:26 -0500 +Subject: [PATCH] sysroot: handle symbolic links with absolute name relative to + sysroot + +In case of symbolic link found under sysroot point to absolute path, +instead of trying to look for such absolute path in host system, +apply sysroot prefix first. + +Upstream-Status: Backport +Signed-off-by: Victor Kamensky <kamensky@cisco.com> +--- + util.cxx | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 76 insertions(+) + +Index: git/util.cxx +=================================================================== +--- git.orig/util.cxx ++++ git/util.cxx +@@ -441,6 +441,64 @@ split_lines(const char *buf, size_t n) + return lines; + } + ++static string ++follow_link(const string& name, const string& sysroot) ++{ ++ char *linkname; ++ ssize_t r; ++ string retpath; ++ struct stat st; ++ ++ const char *f = name.c_str(); ++ ++ lstat(f, &st); ++ ++ linkname = (char *) malloc(st.st_size + 1); ++ ++ if (linkname) ++ { ++ r = readlink(f, linkname, st.st_size + 1); ++ linkname[st.st_size] = '\0'; ++ /* ++ * If we have non-empty sysroot and we got link that ++ * points to absolute path name, we need to look at ++ * this path relative to sysroot itself. access and ++ * stat will follow symbolic links correctly only in ++ * case with empty sysroot. ++ */ ++ while (r != -1 && linkname && linkname[0] == '/') ++ { ++ string fname1 = sysroot + linkname; ++ const char *f1 = fname1.c_str(); ++ if (access(f1, X_OK) == 0 ++ && stat(f1, &st) == 0 ++ && S_ISREG(st.st_mode)) ++ { ++ retpath = fname1; ++ break; ++ } ++ else if (lstat(f1, &st) == 0 ++ && S_ISLNK(st.st_mode)) ++ { ++ free(linkname); ++ linkname = (char *) malloc(st.st_size + 1); ++ if (linkname) ++ { ++ r = readlink(f1, linkname, st.st_size + 1); ++ linkname[st.st_size] = '\0'; ++ } ++ } ++ else ++ { ++ break; ++ } ++ } ++ } ++ free(linkname); ++ ++ return retpath; ++} ++ + // Resolve an executable name to a canonical full path name, with the + // same policy as execvp(). A program name not containing a slash + // will be searched along the $PATH. +@@ -465,6 +523,14 @@ string find_executable(const string& nam + if (name.find('/') != string::npos) // slash in the path already? + { + retpath = sysroot + name; ++ ++ const char *f = retpath.c_str(); ++ if (sysroot != "" ++ && lstat(f, &st) == 0 ++ && S_ISLNK(st.st_mode)) ++ { ++ retpath = follow_link(f, sysroot); ++ } + } + else // Nope, search $PATH. + { +@@ -493,6 +559,16 @@ string find_executable(const string& nam + retpath = fname; + break; + } ++ else if (sysroot != "" ++ && lstat(f, &st) == 0 ++ && S_ISLNK(st.st_mode)) ++ { ++ retpath = follow_link(f, sysroot); ++ if (retpath != "") ++ { ++ break; ++ } ++ } + } + } + } diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch deleted file mode 100644 index 013af5c3a..000000000 --- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch +++ /dev/null @@ -1,23 +0,0 @@ -systemtap: Cross compilation fix - -This is a cross compilation fix. It allows systemtap to find -the kernel map file in the right place, i.e. in the kernel build tree. -Without this fix it takes a map file from the build host, if available. - -Upstream-Status: Pending - -Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com> - -Index: git/session.cxx -=================================================================== ---- git.orig/session.cxx -+++ git/session.cxx -@@ -1634,7 +1634,7 @@ systemtap_session::parse_kernel_function - clog << _F("Kernel symbol table %s unavailable, (%s)", - system_map_path.c_str(), strerror(errno)) << endl; - -- system_map_path = "/boot/System.map-" + kernel_release; -+ system_map_path = kernel_build_tree + "/System.map-" + kernel_release; - system_map.clear(); - system_map.open(system_map_path.c_str(), ifstream::in); - if (! system_map.is_open()) diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb index 475b2073f..b280f583e 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb @@ -3,9 +3,7 @@ HOMEPAGE = "https://sourceware.org/systemtap/" require systemtap_git.inc -DEPENDS = "boost elfutils" - -RDEPENDS_${PN} += "python3-core bash perl" +DEPENDS = "elfutils" EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \ --without-nss --without-avahi --without-dyninst \ @@ -18,7 +16,8 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" EXTRA_OECONF += "${STAP_DOCS} " -PACKAGECONFIG ??= "sqlite monitor python3-probes" +PACKAGECONFIG ??= "translator sqlite monitor python3-probes" +PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,python3-core bash perl" PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3" PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" @@ -26,4 +25,12 @@ PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes, inherit autotools gettext pkgconfig distutils3-base +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 +} + BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc index 3dc688a18..e2f5204a0 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc +++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc @@ -1,10 +1,9 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRCREV = "45d0e7a09a15a21078d0ebf2db5175ed9e87014e" -PV = "3.1" +SRCREV = "4051c70c9318c837981384cbb23f3e9eb1bd0892" +PV = "3.2" SRC_URI = "git://sourceware.org/git/systemtap.git \ - file://system_map_location.patch \ file://configure-allow-to-disable-libvirt.patch \ file://x32_abi_time.patch \ file://monitor-option.patch \ @@ -13,10 +12,21 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \ file://0001-Install-python-modules-to-correct-library-dir.patch \ file://0001-buildrun-remove-quotes-around-I-include-line.patch \ file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \ + file://0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch \ + file://0001-Fixes-for-gcc-8.patch \ + file://0001-Use-sysroot-when-looking-for-the-System.map-file.patch \ + file://0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch \ + file://0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch \ + file://0001-sysroot-fix-short-release-r-option-handling.patch \ + file://0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch \ + file://0001-Added-a-couple-of-small-sysroot-fixes.patch \ + file://0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch \ + file://0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch \ + file://0001-sysroot-fix-short-release-r-option-handling-follow-u.patch \ " -# systemtap doesn't support mips -COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64).*-linux' +COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux' +COMPATIBLE_HOST_libc-musl = 'null' S = "${WORKDIR}/git" diff --git a/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc b/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc index 002ee65fd..0a1789c45 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc +++ b/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc @@ -1,11 +1,11 @@ -SRCREV = "021710e1073fe203341b427cd1a4bac577ec899c" -PV = "2.6.1" +SRCREV = "7d0147bbba3ed1d5ef6eea4eec3f0ad4c98f02b5" +PV = "2.7" inherit pkgconfig FILESEXTRAPATHS =. "${FILE_DIRNAME}/trace-cmd:" -SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=trace-cmd-stable-v2.6 \ +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git \ file://blktrace-api-compatibility.patch \ file://0001-Include-limits.h-so-that-PATH_MAX-is-defined-an-issu.patch \ " |