summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch104
-rw-r--r--meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch26
-rw-r--r--meta-oe/recipes-kernel/makedumpfile/makedumpfile/0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch24
-rw-r--r--meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb (renamed from meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb)17
4 files changed, 36 insertions, 135 deletions
diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch
deleted file mode 100644
index 49777bcee..000000000
--- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch
+++ /dev/null
@@ -1,104 +0,0 @@
1From 399f2c9a3acd5bd913e50a4dde52dee6527b297e Mon Sep 17 00:00:00 2001
2From: Kairui Song <kasong@redhat.com>
3Date: Wed, 29 Jan 2020 13:37:13 +0800
4Subject: [PATCH] [PATCH] Remove duplicated variable definitions
5
6When building on Fedora 32 (with GCC 10), following error is observed:
7
8/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2010: multiple definition of
9 `crash_reserved_mem_nr'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2010: first defined here
10/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2009: multiple definition of
11 `crash_reserved_mem'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2009: first defined here
12/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1278: multiple definition of
13 `parallel_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1278: first defined here
14/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1265: multiple definition of
15 `splitting_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1265: first defined here
16...
17collect2: error: ld returned 1 exit status
18make: *** [Makefile:97: makedumpfile] Error 1
19
20These variables are wrongly defined multiple times. So remove the
21duplicated definitions.
22
23Upstream-Status: Backport [https://github.com/kraj/makedumpfile/commit/399f2c9a3acd5bd913e50a4dde52dee6527b297e]
24Signed-off-by: Kairui Song <kasong@redhat.com>
25Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
26---
27 makedumpfile.c | 8 ++++----
28 makedumpfile.h | 8 ++++----
29 2 files changed, 8 insertions(+), 8 deletions(-)
30
31diff --git a/makedumpfile.c b/makedumpfile.c
32index e290fbd..ae7336a 100644
33--- a/makedumpfile.c
34+++ b/makedumpfile.c
35@@ -10954,7 +10954,7 @@ check_param_for_reassembling_dumpfile(int argc, char *argv[])
36 return FALSE;
37
38 if ((info->splitting_info
39- = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
40+ = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
41 == NULL) {
42 MSG("Can't allocate memory for splitting_info.\n");
43 return FALSE;
44@@ -11042,7 +11042,7 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
45 return FALSE;
46 }
47 if ((info->splitting_info
48- = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
49+ = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
50 == NULL) {
51 MSG("Can't allocate memory for splitting_info.\n");
52 return FALSE;
53@@ -11077,13 +11077,13 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
54
55 if (info->num_threads) {
56 if ((info->parallel_info =
57- malloc(sizeof(parallel_info_t) * info->num_threads))
58+ malloc(sizeof(struct parallel_info) * info->num_threads))
59 == NULL) {
60 MSG("Can't allocate memory for parallel_info.\n");
61 return FALSE;
62 }
63
64- memset(info->parallel_info, 0, sizeof(parallel_info_t)
65+ memset(info->parallel_info, 0, sizeof(struct parallel_info)
66 * info->num_threads);
67 }
68
69diff --git a/makedumpfile.h b/makedumpfile.h
70index 68d9691..7217407 100644
71--- a/makedumpfile.h
72+++ b/makedumpfile.h
73@@ -1262,7 +1262,7 @@ struct splitting_info {
74 mdf_pfn_t end_pfn;
75 off_t offset_eraseinfo;
76 unsigned long size_eraseinfo;
77-} splitting_info_t;
78+};
79
80 struct parallel_info {
81 int fd_memory;
82@@ -1275,7 +1275,7 @@ struct parallel_info {
83 #ifdef USELZO
84 lzo_bytep wrkmem;
85 #endif
86-} parallel_info_t;
87+};
88
89 struct ppc64_vmemmap {
90 unsigned long phys;
91@@ -2006,8 +2006,8 @@ struct memory_range {
92 };
93
94 #define CRASH_RESERVED_MEM_NR 8
95-struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
96-int crash_reserved_mem_nr;
97+extern struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
98+extern int crash_reserved_mem_nr;
99
100 unsigned long read_vmcoreinfo_symbol(char *str_symbol);
101 int readmem(int type_addr, unsigned long long addr, void *bufptr, size_t size);
102--
1032.28.0
104
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 ff093a72b..270cc3562 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
@@ -17,10 +17,10 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
17 Makefile | 45 +++++++++++++++++++++++---------------------- 17 Makefile | 45 +++++++++++++++++++++++----------------------
18 1 file changed, 23 insertions(+), 22 deletions(-) 18 1 file changed, 23 insertions(+), 22 deletions(-)
19 19
20diff --git a/Makefile b/Makefile 20Index: git/Makefile
21index 1fdb628..5dce589 100644 21===================================================================
22--- a/Makefile 22--- git.orig/Makefile
23+++ b/Makefile 23+++ git/Makefile
24@@ -8,12 +8,6 @@ ifeq ($(strip $CC),) 24@@ -8,12 +8,6 @@ ifeq ($(strip $CC),)
25 CC = gcc 25 CC = gcc
26 endif 26 endif
@@ -81,12 +81,12 @@ index 1fdb628..5dce589 100644
81 SRC_BASE = makedumpfile.c makedumpfile.h diskdump_mod.h sadump_mod.h sadump_info.h 81 SRC_BASE = makedumpfile.c makedumpfile.h diskdump_mod.h sadump_mod.h sadump_info.h
82 SRC_PART = print_info.c dwarf_info.c elf_info.c erase_info.c sadump_info.c cache.c tools.c 82 SRC_PART = print_info.c dwarf_info.c elf_info.c erase_info.c sadump_info.c cache.c tools.c
83 OBJ_PART=$(patsubst %.c,%.o,$(SRC_PART)) 83 OBJ_PART=$(patsubst %.c,%.o,$(SRC_PART))
84@@ -52,17 +53,17 @@ OBJ_ARCH=$(patsubst %.c,%.o,$(SRC_ARCH)) 84@@ -52,12 +53,12 @@ OBJ_ARCH=$(patsubst %.c,%.o,$(SRC_ARCH))
85 85
86 LIBS = -ldw -lbz2 -ldl -lelf -lz 86 LIBS = -ldw -lbz2 -ldl -lelf -lz
87 ifneq ($(LINKTYPE), dynamic) 87 ifneq ($(LINKTYPE), dynamic)
88-LIBS := -static $(LIBS) 88-LIBS := -static $(LIBS) -llzma
89+LIBS := $(LIBS) 89+LIBS := $(LIBS) -llzma
90 endif 90 endif
91 91
92 ifeq ($(USELZO), on) 92 ifeq ($(USELZO), on)
@@ -96,13 +96,16 @@ index 1fdb628..5dce589 100644
96 endif 96 endif
97 97
98 ifeq ($(USESNAPPY), on) 98 ifeq ($(USESNAPPY), on)
99 LIBS := -lsnappy $(LIBS) 99@@ -65,7 +66,7 @@ LIBS := -lsnappy $(LIBS)
100 ifneq ($(LINKTYPE), dynamic)
101 LIBS := $(LIBS) -lstdc++
102 endif
100-CFLAGS += -DUSESNAPPY 103-CFLAGS += -DUSESNAPPY
101+CFLAGS_COMMON += -DUSESNAPPY 104+CFLAGS_COMMON += -DUSESNAPPY
102 endif 105 endif
103 106
104 LIBS := -lpthread $(LIBS) 107 LIBS := -lpthread $(LIBS)
105@@ -87,14 +88,14 @@ LIBS := $(LIBS) $(call try-run,\ 108@@ -90,14 +91,14 @@ LIBS := $(LIBS) $(call try-run,\
106 all: makedumpfile 109 all: makedumpfile
107 110
108 $(OBJ_PART): $(SRC_PART) 111 $(OBJ_PART): $(SRC_PART)
@@ -119,7 +122,7 @@ index 1fdb628..5dce589 100644
119 echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8 122 echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8
120 grep -v "^.TH MAKEDUMPFILE 8" $(VPATH)makedumpfile.8 >> temp.8 123 grep -v "^.TH MAKEDUMPFILE 8" $(VPATH)makedumpfile.8 >> temp.8
121 mv temp.8 makedumpfile.8 124 mv temp.8 makedumpfile.8
122@@ -105,7 +106,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(OBJ_ARCH) 125@@ -108,7 +109,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(
123 gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz 126 gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz
124 127
125 eppic_makedumpfile.so: extension_eppic.c 128 eppic_makedumpfile.so: extension_eppic.c
@@ -128,6 +131,3 @@ index 1fdb628..5dce589 100644
128 131
129 clean: 132 clean:
130 rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz 133 rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz
131--
1322.21.0
133
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 1707df3e3..85d883365 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
@@ -28,11 +28,11 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
28 arch/ppc64.c | 38 ++------------------------------------ 28 arch/ppc64.c | 38 ++------------------------------------
29 1 file changed, 2 insertions(+), 36 deletions(-) 29 1 file changed, 2 insertions(+), 36 deletions(-)
30 30
31diff --git a/arch/ppc64.c b/arch/ppc64.c 31Index: git/arch/ppc64.c
32index 9d8f252..6f4860f 100644 32===================================================================
33--- a/arch/ppc64.c 33--- git.orig/arch/ppc64.c
34+++ b/arch/ppc64.c 34+++ git/arch/ppc64.c
35@@ -462,48 +462,14 @@ ppc64_vtop_level4(unsigned long vaddr) 35@@ -462,44 +462,6 @@ ppc64_vtop_level4(unsigned long vaddr)
36 return paddr; 36 return paddr;
37 } 37 }
38 38
@@ -40,6 +40,13 @@ index 9d8f252..6f4860f 100644
40-set_ppc64_max_physmem_bits(void) 40-set_ppc64_max_physmem_bits(void)
41-{ 41-{
42- long array_len = ARRAY_LENGTH(mem_section); 42- long array_len = ARRAY_LENGTH(mem_section);
43-
44- /* Check if we can get MAX_PHYSMEM_BITS from vmcoreinfo */
45- if (NUMBER(MAX_PHYSMEM_BITS) != NOT_FOUND_NUMBER) {
46- info->max_physmem_bits = NUMBER(MAX_PHYSMEM_BITS);
47- return TRUE;
48- }
49-
43- /* 50- /*
44- * The older ppc64 kernels uses _MAX_PHYSMEM_BITS as 42 and the 51- * The older ppc64 kernels uses _MAX_PHYSMEM_BITS as 42 and the
45- * newer kernels 3.7 onwards uses 46 bits. 52- * newer kernels 3.7 onwards uses 46 bits.
@@ -67,10 +74,10 @@ index 9d8f252..6f4860f 100644
67- 74-
68- return FALSE; 75- return FALSE;
69-} 76-}
70- 77
71 int 78 int
72 get_machdep_info_ppc64(void) 79 get_machdep_info_ppc64(void)
73 { 80@@ -507,10 +469,8 @@ get_machdep_info_ppc64(void)
74 unsigned long vmlist, vmap_area_list, vmalloc_start; 81 unsigned long vmlist, vmap_area_list, vmalloc_start;
75 82
76 info->section_size_bits = _SECTION_SIZE_BITS; 83 info->section_size_bits = _SECTION_SIZE_BITS;
@@ -83,6 +90,3 @@ index 9d8f252..6f4860f 100644
83 info->page_offset = __PAGE_OFFSET; 90 info->page_offset = __PAGE_OFFSET;
84 91
85 if (SYMBOL(_stext) == NOT_FOUND_SYMBOL) { 92 if (SYMBOL(_stext) == NOT_FOUND_SYMBOL) {
86--
872.21.0
88
diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb
index ad1e09c35..475465124 100644
--- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb
+++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.8.bb
@@ -5,12 +5,15 @@ DESCRIPTION = "\
5 images without extra uneeded information (zero pages, userspace programs, \ 5 images without extra uneeded information (zero pages, userspace programs, \
6 etc). \ 6 etc). \
7" 7"
8HOMEPAGE = "http://makedumpfile.sourceforge.net" 8HOMEPAGE = "https://github.com/makedumpfile/makedumpfile"
9 9
10LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" 10LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
11LICENSE = "GPLv2.0" 11LICENSE = "GPLv2.0"
12 12
13DEPENDS = "bzip2 zlib elfutils" 13SRCBRANCH ?= "master"
14SRCREV = "18e0cdba48feeccea2429b3b0b2691f4314d1062"
15
16DEPENDS = "bzip2 zlib elfutils xz"
14RDEPENDS_${PN}-tools = "perl ${PN}" 17RDEPENDS_${PN}-tools = "perl ${PN}"
15 18
16# arm and aarch64 would compile but has never been tested upstream. mips would not compile. 19# arm and aarch64 would compile but has never been tested upstream. mips would not compile.
@@ -21,16 +24,14 @@ PACKAGES =+ "${PN}-tools"
21FILES_${PN}-tools = "${bindir}/*.pl" 24FILES_${PN}-tools = "${bindir}/*.pl"
22 25
23SRC_URI = "\ 26SRC_URI = "\
24 ${SOURCEFORGE_MIRROR}/makedumpfile/${BPN}-${PV}.tar.gz \ 27 git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH} \
25 file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ 28 file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \
26 file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \ 29 file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \
27 file://0001-PATCH-Remove-duplicated-variable-definitions.patch \
28" 30"
29SRC_URI[md5sum] = "808ef840ca49ca6bfde77c097cf429f5"
30SRC_URI[sha256sum] = "e702fbdf62b4cd829a76e46f3e24eb3fc7501918b85ebdcd8baef4f53d6ee2c8"
31 31
32UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/makedumpfile/files/makedumpfile/" 32S = "${WORKDIR}/git"
33UPSTREAM_CHECK_REGEX = "makedumpfile/(?P<pver>\d+(\.\d+)+)/" 33
34UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
34 35
35SECTION = "base" 36SECTION = "base"
36 37