From 279a2b3ffd79aac4b2232b54d6992bd5bca4c3fd Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Fri, 6 Jan 2017 10:04:53 +0800 Subject: makedumpfile: update to 1.6.1 * Support 4.8 kernel * Add a patch to fix vmcore compressing for ppc64 Signed-off-by: Yi Zhao Signed-off-by: Martin Jansa --- ...-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch | 73 ++++++++++++++++++++++ .../makedumpfile/makedumpfile_1.6.0.bb | 53 ---------------- .../makedumpfile/makedumpfile_1.6.1.bb | 54 ++++++++++++++++ 3 files changed, 127 insertions(+), 53 deletions(-) create mode 100644 meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch delete mode 100644 meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.0.bb create mode 100644 meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.1.bb 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 new file mode 100644 index 0000000000..e0c3d9af6f --- /dev/null +++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch @@ -0,0 +1,73 @@ +From 653fe8e724081d2f289c2245d1220d5f7170538d 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 + PPC64 + +Related to change: +http://lists.infradead.org/pipermail/kexec/2013-January/007849.html + +Linux on PPC64 has supported only 46 bit MAX_PHYSMEM_BITS since commit: +048ee0993ec8360abb0b51bdf8f8721e9ed62ec4 + +Also remove set_ppc64_max_physmem_bits and set info->max_physmem_bits in +get_machdep_info_ppc64 instead. set_ppc64_max_physmem_bits is broken +for all kernels compiled with CONFIG_SPARSEMEM=n. makedumpfile is +unable to get mem_section field from powerpc kernel since commit: +fd59d231f81cb02870b9cf15f456a897f3669b4e + +Upstream-Status: Pending + +Signed-off-by: Alexandru Moise +Signed-off-by: Yi Zhao +--- + arch/ppc64.c | 28 ++-------------------------- + 1 file changed, 2 insertions(+), 26 deletions(-) + +diff --git a/arch/ppc64.c b/arch/ppc64.c +index 89a7f05..6c928ab 100644 +--- a/arch/ppc64.c ++++ b/arch/ppc64.c +@@ -302,37 +302,13 @@ ppc64_vtop_level4(unsigned long vaddr) + } + + int +-set_ppc64_max_physmem_bits(void) +-{ +- long array_len = ARRAY_LENGTH(mem_section); +- /* +- * The older ppc64 kernels uses _MAX_PHYSMEM_BITS as 42 and the +- * newer kernels 3.7 onwards uses 46 bits. +- */ +- +- info->max_physmem_bits = _MAX_PHYSMEM_BITS_ORIG ; +- if ((array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT_EXTREME())) +- || (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT()))) +- return TRUE; +- +- info->max_physmem_bits = _MAX_PHYSMEM_BITS_3_7; +- if ((array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT_EXTREME())) +- || (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT()))) +- return TRUE; +- +- return FALSE; +-} +- +-int + get_machdep_info_ppc64(void) + { + unsigned long vmlist, vmap_area_list, vmalloc_start; + + info->section_size_bits = _SECTION_SIZE_BITS; +- if (!set_ppc64_max_physmem_bits()) { +- ERRMSG("Can't detect max_physmem_bits.\n"); +- return FALSE; +- } ++ info->max_physmem_bits = _MAX_PHYSMEM_BITS_3_7; ++ + info->page_offset = __PAGE_OFFSET; + + if (SYMBOL(_stext) == NOT_FOUND_SYMBOL) { +-- +2.5.0 + diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.0.bb b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.0.bb deleted file mode 100644 index 93a6f62c3a..0000000000 --- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.0.bb +++ /dev/null @@ -1,53 +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" - -DEPENDS = "bzip2 zlib elfutils" -RDEPENDS_${PN}-tools = "perl ${PN}" - -# arm would compile but has never been tested upstream. mips would not compile. -# -COMPATIBLE_HOST = "(x86_64|i.86|powerpc|arm).*-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 \ -" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -LICENSE = "GPLv2.0" - -SRC_URI[md5sum] = "041c5c6de2c3066600e4ca646c2397d6" -SRC_URI[sha256sum] = "e3147abc52df2ceac1e9affef45bf37e2f2e1d9979bc94a761ee11e4044072ac" - -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.1.bb b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.1.bb new file mode 100644 index 0000000000..dacc76b04f --- /dev/null +++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.1.bb @@ -0,0 +1,54 @@ +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" + +DEPENDS = "bzip2 zlib elfutils" +RDEPENDS_${PN}-tools = "perl ${PN}" + +# arm would compile but has never been tested upstream. mips would not compile. +# +COMPATIBLE_HOST = "(x86_64|i.86|powerpc|arm).*-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 \ +" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +LICENSE = "GPLv2.0" + +SRC_URI[md5sum] = "16c0ae9902ae57be4a603a6ab1e86c53" +SRC_URI[sha256sum] = "0b6e73106998670407887de9e1a505b3a2dbb2fb517a4b968a665eda8fb097ce" + +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