From 8c345d604f80420e841f769f64aae2b02544c44f Mon Sep 17 00:00:00 2001 From: Haiqing Bai Date: Thu, 7 Mar 2019 09:10:33 +0800 Subject: makedumpfile: Upgrade to 1.6.5 to support kernel 4.18 and 4.19 This upgrade fixed the below issue: When run '$makedumpfile -E -d 1 /proc/vmcore /root/vmcore_dumpfile' shows 'The kernel version is not supported.' Signed-off-by: Haiqing Bai Signed-off-by: Yi Zhao Signed-off-by: Khem Raj --- ...-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch | 25 +++++++--- .../makedumpfile/makedumpfile_1.6.4.bb | 57 ---------------------- .../makedumpfile/makedumpfile_1.6.5.bb | 57 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 65 deletions(-) delete mode 100644 meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.4.bb create mode 100644 meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.5.bb (limited to 'meta-oe') diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch index 766f4fc76e..156b4d57d4 100644 --- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch +++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch @@ -1,4 +1,4 @@ -From ba123fa6b2aa0ac62d1b78f327339635ae87201a Mon Sep 17 00:00:00 2001 +From 0d1cdb59da3603e0a80913617ece0164b05380d2 Mon Sep 17 00:00:00 2001 From: Alexandru Moise Date: Fri, 29 Apr 2016 07:40:46 +0000 Subject: [PATCH] mem_section: Support only 46 bit for MAX_PHYSMEM_BITS on @@ -21,19 +21,20 @@ Upstream-Status: Pending Signed-off-by: Alexandru Moise Signed-off-by: Yi Zhao +[hqBai: adjusted patch for context, no logical change] +Signed-off-by: Haiqing Bai --- - arch/ppc64.c | 28 ++-------------------------- - 1 file changed, 2 insertions(+), 26 deletions(-) + arch/ppc64.c | 33 ++------------------------------- + 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/arch/ppc64.c b/arch/ppc64.c -index 8b6f7d5..458f06b 100644 +index 947a125..458f06b 100644 --- a/arch/ppc64.c +++ b/arch/ppc64.c -@@ -462,38 +462,14 @@ ppc64_vtop_level4(unsigned long vaddr) - return paddr; +@@ -463,42 +463,13 @@ ppc64_vtop_level4(unsigned long vaddr) } --int + int -set_ppc64_max_physmem_bits(void) -{ - long array_len = ARRAY_LENGTH(mem_section); @@ -52,10 +53,15 @@ index 8b6f7d5..458f06b 100644 - || (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT()))) - return TRUE; - +- info->max_physmem_bits = _MAX_PHYSMEM_BITS_4_19; +- if ((array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT_EXTREME())) +- || (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT()))) +- return TRUE; +- - return FALSE; -} - - int +-int get_machdep_info_ppc64(void) { unsigned long vmlist, vmap_area_list, vmalloc_start; @@ -70,3 +76,6 @@ index 8b6f7d5..458f06b 100644 info->page_offset = __PAGE_OFFSET; if (SYMBOL(_stext) == NOT_FOUND_SYMBOL) { +-- +2.7.4 + diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.4.bb b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.4.bb deleted file mode 100644 index 33194b8504..0000000000 --- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.4.bb +++ /dev/null @@ -1,57 +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 = "http://makedumpfile.sourceforge.net" - -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -LICENSE = "GPLv2.0" - -DEPENDS = "bzip2 zlib elfutils" -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 = "\ - ${SOURCEFORGE_MIRROR}/makedumpfile/${BPN}-${PV}.tar.gz \ - file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ - file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \ -" -SRC_URI[md5sum] = "7dfbca19f487604c271e2892ba07f4bd" -SRC_URI[sha256sum] = "7e06f72d5f291fcab9e92975f405a76e37d4f7fc8fa4172f199636398ae812b1" - -UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/makedumpfile/files/makedumpfile/" -UPSTREAM_CHECK_REGEX = "makedumpfile/(?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} \ -" - -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.5.bb b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.5.bb new file mode 100644 index 0000000000..413b413a9f --- /dev/null +++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.5.bb @@ -0,0 +1,57 @@ +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 = "http://makedumpfile.sourceforge.net" + +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +LICENSE = "GPLv2.0" + +DEPENDS = "bzip2 zlib elfutils" +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 = "\ + ${SOURCEFORGE_MIRROR}/makedumpfile/${BPN}-${PV}.tar.gz \ + file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ + file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \ +" +SRC_URI[md5sum] = "1737f8e8904d565629f0c9e702f92d02" +SRC_URI[sha256sum] = "5d4f1d6ded8dca6951eeabcf4bb1ebf6575288fee947529397103c040eb5c760" + +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/makedumpfile/files/makedumpfile/" +UPSTREAM_CHECK_REGEX = "makedumpfile/(?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} \ +" + +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