From 72cc1b4f0a05330f6ebf90c9d26710ba720fcb10 Mon Sep 17 00:00:00 2001 From: Mingli Yu Date: Sun, 24 Apr 2022 16:45:38 +0800 Subject: makedumpfile: Upgrade to 1.6.9 * Linux 5.10 introduces a new lockless ringbuffer. The new ringbuffer is structured completely different to the previous iterations. Add support for retrieving the ringbuffer from debug information and/or using vmcoreinfo. The new ringbuffer is detected based on the availability of the "prb" symbol. * Support newer kernels as follows: - 5.10, 5.11, 5.12 (x86_64 SPARSEMEM) Signed-off-by: Mingli Yu Signed-off-by: Armin Kuster --- ...0001-makedumpfile-replace-hardcode-CFLAGS.patch | 17 +++--- .../makedumpfile/makedumpfile_1.6.8.bb | 64 ---------------------- .../makedumpfile/makedumpfile_1.6.9.bb | 64 ++++++++++++++++++++++ 3 files changed, 73 insertions(+), 72 deletions(-) delete mode 100644 meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb create mode 100644 meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.9.bb diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch index 270cc35625..94eac931e3 100644 --- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch +++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch @@ -1,4 +1,4 @@ -From af97e2ad643334b4c7c3d66f971ce9ebb2b596af Mon Sep 17 00:00:00 2001 +From 1053cf25be28b266ba264705e11179cf4f04aa91 Mon Sep 17 00:00:00 2001 From: Mingli Yu Date: Thu, 21 Jul 2016 18:06:21 +0800 Subject: [PATCH] makedumpfile: replace hardcode CFLAGS @@ -13,14 +13,15 @@ Subject: [PATCH] makedumpfile: replace hardcode CFLAGS Upstream-Status: Inappropriate[oe specific] Signed-off-by: Mingli Yu + --- Makefile | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) -Index: git/Makefile -=================================================================== ---- git.orig/Makefile -+++ git/Makefile +diff --git a/Makefile b/Makefile +index 6fa00bc..7aa7ae2 100644 +--- a/Makefile ++++ b/Makefile @@ -8,12 +8,6 @@ ifeq ($(strip $CC),) CC = gcc endif @@ -79,7 +80,7 @@ Index: git/Makefile + -DRELEASE_DATE='"$(DATE)"' + SRC_BASE = makedumpfile.c makedumpfile.h diskdump_mod.h sadump_mod.h sadump_info.h - SRC_PART = print_info.c dwarf_info.c elf_info.c erase_info.c sadump_info.c cache.c tools.c + SRC_PART = print_info.c dwarf_info.c elf_info.c erase_info.c sadump_info.c cache.c tools.c printk.c OBJ_PART=$(patsubst %.c,%.o,$(SRC_PART)) @@ -52,12 +53,12 @@ OBJ_ARCH=$(patsubst %.c,%.o,$(SRC_ARCH)) @@ -104,7 +105,7 @@ Index: git/Makefile +CFLAGS_COMMON += -DUSESNAPPY endif - LIBS := -lpthread $(LIBS) + LIBS := $(LIBS) -lpthread @@ -90,14 +91,14 @@ LIBS := $(LIBS) $(call try-run,\ all: makedumpfile @@ -122,7 +123,7 @@ Index: git/Makefile echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8 grep -v "^.TH MAKEDUMPFILE 8" $(VPATH)makedumpfile.8 >> temp.8 mv temp.8 makedumpfile.8 -@@ -108,7 +109,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $( +@@ -108,7 +109,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(OBJ_ARCH) gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz eppic_makedumpfile.so: extension_eppic.c diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb deleted file mode 100644 index 6f87db1779..0000000000 --- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb +++ /dev/null @@ -1,64 +0,0 @@ -SUMMARY = "VMcore extraction tool" -DESCRIPTION = "\ - This program is used to extract a subset of the memory available either \ - via /dev/mem or /proc/vmcore (for crashdumps). It is used to get memory \ - images without extra uneeded information (zero pages, userspace programs, \ - etc). \ -" -HOMEPAGE = "https://github.com/makedumpfile/makedumpfile" - -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -LICENSE = "GPLv2.0" - -SRCBRANCH ?= "master" -SRCREV = "18e0cdba48feeccea2429b3b0b2691f4314d1062" - -DEPENDS = "bzip2 zlib elfutils xz" -RDEPENDS_${PN}-tools = "perl ${PN}" - -# arm and aarch64 would compile but has never been tested upstream. mips would not compile. -# -COMPATIBLE_HOST = "(x86_64|i.86|powerpc|arm|aarch64).*-linux" - -PACKAGES =+ "${PN}-tools" -FILES_${PN}-tools = "${bindir}/*.pl" - -SRC_URI = "\ - git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH};protocol=https \ - file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ - file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \ -" - -S = "${WORKDIR}/git" - -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" - -SECTION = "base" - -# If we do not specify TARGET, makedumpfile will build for the host but use the -# target gcc. -# -EXTRA_OEMAKE = "\ - LINKTYPE=static \ - TARGET=${TARGET_ARCH} \ - ${PACKAGECONFIG_CONFARGS} \ -" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[lzo] = "USELZO=on,USELZO=off,lzo" -PACKAGECONFIG[snappy] = "USESNAPPY=on,USESNAPPY=off,snappy" - -do_install () { - mkdir -p ${D}/usr/bin - install -m 755 ${S}/makedumpfile ${D}/usr/bin - install -m 755 ${S}/makedumpfile-R.pl ${D}/usr/bin - - mkdir -p ${D}/usr/share/man/man8 - install -m 644 ${S}/makedumpfile.8.gz ${D}/usr/share/man/man8 - - mkdir -p ${D}/usr/share/man/man5 - install -m 644 ${S}/makedumpfile.conf.5.gz ${D}/usr/share/man/man5 - - mkdir -p ${D}/etc/ - install -m 644 ${S}/makedumpfile.conf ${D}/etc/makedumpfile.conf.sample -} diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.9.bb b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.9.bb new file mode 100644 index 0000000000..4350ea1261 --- /dev/null +++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.9.bb @@ -0,0 +1,64 @@ +SUMMARY = "VMcore extraction tool" +DESCRIPTION = "\ + This program is used to extract a subset of the memory available either \ + via /dev/mem or /proc/vmcore (for crashdumps). It is used to get memory \ + images without extra uneeded information (zero pages, userspace programs, \ + etc). \ +" +HOMEPAGE = "https://github.com/makedumpfile/makedumpfile" + +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +LICENSE = "GPLv2.0" + +SRCBRANCH ?= "master" +SRCREV = "a9ad811c15e769c8e6d8d915a05cebc32f2ea2f5" + +DEPENDS = "bzip2 zlib elfutils xz" +RDEPENDS_${PN}-tools = "perl ${PN}" + +# arm and aarch64 would compile but has never been tested upstream. mips would not compile. +# +COMPATIBLE_HOST = "(x86_64|i.86|powerpc|arm|aarch64).*-linux" + +PACKAGES =+ "${PN}-tools" +FILES_${PN}-tools = "${bindir}/*.pl" + +SRC_URI = "\ + git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH};protocol=https \ + file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ + file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \ +" + +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" + +SECTION = "base" + +# If we do not specify TARGET, makedumpfile will build for the host but use the +# target gcc. +# +EXTRA_OEMAKE = "\ + LINKTYPE=static \ + TARGET=${TARGET_ARCH} \ + ${PACKAGECONFIG_CONFARGS} \ +" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[lzo] = "USELZO=on,USELZO=off,lzo" +PACKAGECONFIG[snappy] = "USESNAPPY=on,USESNAPPY=off,snappy" + +do_install () { + mkdir -p ${D}/usr/bin + install -m 755 ${S}/makedumpfile ${D}/usr/bin + install -m 755 ${S}/makedumpfile-R.pl ${D}/usr/bin + + mkdir -p ${D}/usr/share/man/man8 + install -m 644 ${S}/makedumpfile.8.gz ${D}/usr/share/man/man8 + + mkdir -p ${D}/usr/share/man/man5 + install -m 644 ${S}/makedumpfile.conf.5.gz ${D}/usr/share/man/man5 + + mkdir -p ${D}/etc/ + install -m 644 ${S}/makedumpfile.conf ${D}/etc/makedumpfile.conf.sample +} -- cgit 1.2.3-korg