diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2021-11-18 14:07:19 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-11-18 11:07:10 -0800 |
commit | 2fdb6eb87e7a94ec4794d50059b69e945daaa707 (patch) | |
tree | b0237c7f172a7ff367c71d9e0fb5716499dd8cc9 /meta-oe/recipes-kernel/makedumpfile | |
parent | 2755ba786a1d8e54b065320b7a35bfe8f31ef847 (diff) | |
download | meta-openembedded-2fdb6eb87e7a94ec4794d50059b69e945daaa707.tar.gz |
makedumpfile: upgrade from 1.6.9 to 1.7.0
* Drop 0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch
This patch has been introduced in January 2017 for makedumpfile 1.6.1.
It has never reached upstream, hence the pending status is
inappropriate. Since that time, the upstream code to retrieve
MAX_PHYSMEM_BITS has been updated to use vmcoreinfo, with a backward
compatibility for older kernels.
* Remove the deprecated comment about arm/aarch64 would compile but has never
been tested upstream, introduced in July 2016. Nowadays, it works just fine
on those architectures.
* Add PACKAGECONFIG option for zstd compression
Since 1.7.0 release, Zstandard (zstd) compression support has been added.
With zstd, the vmcore size and time consumption can have a better balance
than zlib/lzo/snappy.
http://lists.infradead.org/pipermail/kexec/2021-September/023011.html
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-kernel/makedumpfile')
-rw-r--r-- | meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch | 21 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch | 90 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.7.0.bb (renamed from meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.9.bb) | 7 |
3 files changed, 18 insertions, 100 deletions
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 2b108ab6c..1dd87c8b1 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 | |||
@@ -13,9 +13,12 @@ Subject: [PATCH] makedumpfile: replace hardcode CFLAGS | |||
13 | Upstream-Status: Inappropriate[oe specific] | 13 | Upstream-Status: Inappropriate[oe specific] |
14 | 14 | ||
15 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | 15 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> |
16 | |||
17 | [2021-11-18] Patch updated to use CFLAGS_COMMON for zstd | ||
18 | Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> | ||
16 | --- | 19 | --- |
17 | Makefile | 45 +++++++++++++++++++++++---------------------- | 20 | Makefile | 47 ++++++++++++++++++++++++----------------------- |
18 | 1 file changed, 23 insertions(+), 22 deletions(-) | 21 | 1 file changed, 24 insertions(+), 23 deletions(-) |
19 | 22 | ||
20 | --- a/Makefile | 23 | --- a/Makefile |
21 | +++ b/Makefile | 24 | +++ b/Makefile |
@@ -94,7 +97,7 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | |||
94 | endif | 97 | endif |
95 | 98 | ||
96 | ifeq ($(USESNAPPY), on) | 99 | ifeq ($(USESNAPPY), on) |
97 | @@ -65,7 +66,7 @@ LIBS := -lsnappy $(LIBS) | 100 | @@ -65,12 +66,12 @@ LIBS := -lsnappy $(LIBS) |
98 | ifneq ($(LINKTYPE), dynamic) | 101 | ifneq ($(LINKTYPE), dynamic) |
99 | LIBS := $(LIBS) -lstdc++ | 102 | LIBS := $(LIBS) -lstdc++ |
100 | endif | 103 | endif |
@@ -102,8 +105,14 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | |||
102 | +CFLAGS_COMMON += -DUSESNAPPY | 105 | +CFLAGS_COMMON += -DUSESNAPPY |
103 | endif | 106 | endif |
104 | 107 | ||
105 | LIBS := $(LIBS) -lpthread | 108 | ifeq ($(USEZSTD), on) |
106 | @@ -90,14 +91,14 @@ LIBS := $(LIBS) $(call try-run,\ | 109 | LIBS := -lzstd $(LIBS) |
110 | -CFLAGS += -DUSEZSTD | ||
111 | +CFLAGS_COMMON += -DUSEZSTD | ||
112 | endif | ||
113 | |||
114 | ifeq ($(DEBUG), on) | ||
115 | @@ -104,14 +105,14 @@ LIBS := $(LIBS) $(call try-run,\ | ||
107 | all: makedumpfile | 116 | all: makedumpfile |
108 | 117 | ||
109 | $(OBJ_PART): $(SRC_PART) | 118 | $(OBJ_PART): $(SRC_PART) |
@@ -120,7 +129,7 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | |||
120 | echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8 | 129 | echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8 |
121 | grep -v "^.TH MAKEDUMPFILE 8" $(VPATH)makedumpfile.8 >> temp.8 | 130 | grep -v "^.TH MAKEDUMPFILE 8" $(VPATH)makedumpfile.8 >> temp.8 |
122 | mv temp.8 makedumpfile.8 | 131 | mv temp.8 makedumpfile.8 |
123 | @@ -108,7 +109,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $( | 132 | @@ -122,7 +123,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $( |
124 | gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz | 133 | gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz |
125 | 134 | ||
126 | eppic_makedumpfile.so: extension_eppic.c | 135 | eppic_makedumpfile.so: extension_eppic.c |
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 deleted file mode 100644 index f46fb3117..000000000 --- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | From 9045b72bdb703bf58a6586d77461eea8f59f50f7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexandru Moise <alexandru.moise@windriver.com> | ||
3 | Date: Fri, 29 Apr 2016 07:40:46 +0000 | ||
4 | Subject: [PATCH] mem_section: Support only 46 bit for MAX_PHYSMEM_BITS on | ||
5 | PPC64 | ||
6 | |||
7 | Related to change: | ||
8 | http://lists.infradead.org/pipermail/kexec/2013-January/007849.html | ||
9 | |||
10 | Linux on PPC64 has supported only 46 bit MAX_PHYSMEM_BITS since commit: | ||
11 | 048ee0993ec8360abb0b51bdf8f8721e9ed62ec4 | ||
12 | |||
13 | Also remove set_ppc64_max_physmem_bits and set info->max_physmem_bits in | ||
14 | get_machdep_info_ppc64 instead. set_ppc64_max_physmem_bits is broken | ||
15 | for all kernels compiled with CONFIG_SPARSEMEM=n. makedumpfile is | ||
16 | unable to get mem_section field from powerpc kernel since commit: | ||
17 | fd59d231f81cb02870b9cf15f456a897f3669b4e | ||
18 | |||
19 | Upstream-Status: Pending | ||
20 | |||
21 | Signed-off-by: Alexandru Moise <alexandru.moise@windriver.com> | ||
22 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
23 | |||
24 | [hqBai: adjusted patch for context, no logical change] | ||
25 | Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> | ||
26 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
27 | --- | ||
28 | arch/ppc64.c | 38 ++------------------------------------ | ||
29 | 1 file changed, 2 insertions(+), 36 deletions(-) | ||
30 | |||
31 | --- a/arch/ppc64.c | ||
32 | +++ b/arch/ppc64.c | ||
33 | @@ -462,44 +462,6 @@ ppc64_vtop_level4(unsigned long vaddr) | ||
34 | return paddr; | ||
35 | } | ||
36 | |||
37 | -int | ||
38 | -set_ppc64_max_physmem_bits(void) | ||
39 | -{ | ||
40 | - long array_len = ARRAY_LENGTH(mem_section); | ||
41 | - | ||
42 | - /* Check if we can get MAX_PHYSMEM_BITS from vmcoreinfo */ | ||
43 | - if (NUMBER(MAX_PHYSMEM_BITS) != NOT_FOUND_NUMBER) { | ||
44 | - info->max_physmem_bits = NUMBER(MAX_PHYSMEM_BITS); | ||
45 | - return TRUE; | ||
46 | - } | ||
47 | - | ||
48 | - /* | ||
49 | - * The older ppc64 kernels uses _MAX_PHYSMEM_BITS as 42 and the | ||
50 | - * newer kernels 3.7 onwards uses 46 bits. | ||
51 | - */ | ||
52 | - | ||
53 | - info->max_physmem_bits = _MAX_PHYSMEM_BITS_ORIG ; | ||
54 | - if ((array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT_EXTREME())) | ||
55 | - || (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT()))) | ||
56 | - return TRUE; | ||
57 | - | ||
58 | - info->max_physmem_bits = _MAX_PHYSMEM_BITS_3_7; | ||
59 | - if ((array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT_EXTREME())) | ||
60 | - || (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT()))) | ||
61 | - return TRUE; | ||
62 | - | ||
63 | - info->max_physmem_bits = _MAX_PHYSMEM_BITS_4_19; | ||
64 | - if ((array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT_EXTREME())) | ||
65 | - || (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT()))) | ||
66 | - return TRUE; | ||
67 | - | ||
68 | - info->max_physmem_bits = _MAX_PHYSMEM_BITS_4_20; | ||
69 | - if ((array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT_EXTREME())) | ||
70 | - || (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT()))) | ||
71 | - return TRUE; | ||
72 | - | ||
73 | - return FALSE; | ||
74 | -} | ||
75 | |||
76 | int | ||
77 | get_machdep_info_ppc64(void) | ||
78 | @@ -507,10 +469,8 @@ get_machdep_info_ppc64(void) | ||
79 | unsigned long vmlist, vmap_area_list, vmalloc_start; | ||
80 | |||
81 | info->section_size_bits = _SECTION_SIZE_BITS; | ||
82 | - if (!set_ppc64_max_physmem_bits()) { | ||
83 | - ERRMSG("Can't detect max_physmem_bits.\n"); | ||
84 | - return FALSE; | ||
85 | - } | ||
86 | + info->max_physmem_bits = _MAX_PHYSMEM_BITS_3_7; | ||
87 | + | ||
88 | info->page_offset = __PAGE_OFFSET; | ||
89 | |||
90 | if (SYMBOL(_stext) == NOT_FOUND_SYMBOL) { | ||
diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.9.bb b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.7.0.bb index 8de4a7ad6..e703ee71b 100644 --- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.9.bb +++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.7.0.bb | |||
@@ -11,13 +11,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | |||
11 | LICENSE = "GPLv2.0" | 11 | LICENSE = "GPLv2.0" |
12 | 12 | ||
13 | SRCBRANCH ?= "master" | 13 | SRCBRANCH ?= "master" |
14 | SRCREV = "a9ad811c15e769c8e6d8d915a05cebc32f2ea2f5" | 14 | SRCREV = "06ef8e2b814feb08a668b7a3783c86674e49a7b1" |
15 | 15 | ||
16 | DEPENDS = "bzip2 zlib elfutils xz" | 16 | DEPENDS = "bzip2 zlib elfutils xz" |
17 | RDEPENDS:${PN}-tools = "perl ${PN}" | 17 | RDEPENDS:${PN}-tools = "perl ${PN}" |
18 | 18 | ||
19 | # arm and aarch64 would compile but has never been tested upstream. mips would not compile. | 19 | # mips would not compile. |
20 | # | ||
21 | COMPATIBLE_HOST = "(x86_64|i.86|powerpc|arm|aarch64).*-linux" | 20 | COMPATIBLE_HOST = "(x86_64|i.86|powerpc|arm|aarch64).*-linux" |
22 | 21 | ||
23 | PACKAGES =+ "${PN}-tools" | 22 | PACKAGES =+ "${PN}-tools" |
@@ -26,7 +25,6 @@ FILES:${PN}-tools = "${bindir}/*.pl" | |||
26 | SRC_URI = "\ | 25 | SRC_URI = "\ |
27 | git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH};protocol=https \ | 26 | git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH};protocol=https \ |
28 | file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ | 27 | file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ |
29 | file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \ | ||
30 | " | 28 | " |
31 | 29 | ||
32 | S = "${WORKDIR}/git" | 30 | S = "${WORKDIR}/git" |
@@ -47,6 +45,7 @@ EXTRA_OEMAKE = "\ | |||
47 | PACKAGECONFIG ??= "" | 45 | PACKAGECONFIG ??= "" |
48 | PACKAGECONFIG[lzo] = "USELZO=on,USELZO=off,lzo" | 46 | PACKAGECONFIG[lzo] = "USELZO=on,USELZO=off,lzo" |
49 | PACKAGECONFIG[snappy] = "USESNAPPY=on,USESNAPPY=off,snappy" | 47 | PACKAGECONFIG[snappy] = "USESNAPPY=on,USESNAPPY=off,snappy" |
48 | PACKAGECONFIG[zstd] = "USEZSTD=on,USEZSTD=off,zstd" | ||
50 | 49 | ||
51 | do_install () { | 50 | do_install () { |
52 | mkdir -p ${D}/usr/bin | 51 | mkdir -p ${D}/usr/bin |