Skip to contentSkip to conversation

kexec-tools-klibc: Update to latest 2.0.32 release

PATCH New Khem Raj 1 participant 1 message Dec 13, 2025 RISC-V

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 kexec-tools-klibc: Update to latest 2.0.32 release

Add riscv64 support
Rework klibc support patches

Cc Andrea Adami <[email protected]>
---
 .../0001-force-static-build.patch             |   2 -
 ...cal-implementation-of-mkstemp-for-kl.patch | 118 ++++++++++++++++++
 ...der-of-headers-to-fix-build-for-musl.patch |   4 +-
 ...xdiv-implementation-for-klibc-builds.patch |  48 +++++++
 .../0003-kexec-elf-rel-use-our-elf.h.patch    |  12 --
 ...endian-conversion-macros-for-klibc-b.patch |  70 +++++++++++
 ...xec-Define-EM_RISCV-for-klibc-builds.patch |  36 ++++++
 ...ec-elf-exec.c-replace-with-our-err.h.patch |   2 -
 ...work-around-for-sysconf-_SC_NPROCESS.patch |   2 -
 ...isable-memfd_create-for-klibc-builds.patch |  44 +++++++
 ...-work-around-missing-syscall-wrapper.patch |   8 +-
 ...007-kexec.c-add-guard-around-ENOTSUP.patch |  29 ++---
 ...-kexec.c-replace-mising-BLKGETSIZE64.patch |   6 +-
 ...-dmesg.c-work-around-missing-imaxdiv.patch |  57 ---------
 ...-fs2dt.c-work-around-missing-getline.patch |   6 +-
 ...011-purgatory-Makefile-adapt-to-klcc.patch |   8 +-
 ...string.c-avoid-inclusion-of-string.h.patch |   2 -
 ...256.h-avoid-inclusion-of-sys-types.h.patch |   2 -
 .../0014-add-if_nameindex-from-musl.patch     |  12 +-
 .../0015-vmcore-dmesg-fix-warning.patch       |  29 -----
 ...uilding-on-x86_64-with-binutils-2.41.patch |  95 --------------
 .../arm_crashdump-fix-buffer-align.patch      |  44 -------
 .../kexec-tools-klibc/include_next.patch      |   2 +-
 .../kexec/kexec-tools-klibc/kexec-x32.patch   |  94 --------------
 .../kexec-tools-klibc/klibc-reboot.patch      |  71 +++++++++--
 ...powerpc_change-the-memory-size-limit.patch |   2 -
 .../kexec/kexec-tools-klibc_git.bb            |  21 ++--
 27 files changed, 418 insertions(+), 408 deletions(-)
 create mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0001-kexec-Provide-local-implementation-of-mkstemp-for-kl.patch
 create mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0002-kexec-Add-imaxdiv-implementation-for-klibc-builds.patch
 create mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0003-kexec-riscv-Add-endian-conversion-macros-for-klibc-b.patch
 create mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0004-exec-Define-EM_RISCV-for-klibc-builds.patch
 create mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0005-kexec-Disable-memfd_create-for-klibc-builds.patch
 delete mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch
 delete mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0015-vmcore-dmesg-fix-warning.patch
 delete mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/Fix-building-on-x86_64-with-binutils-2.41.patch
 delete mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch
 delete mode 100644 meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/kexec-x32.patch
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0001-force-static-build.patch +0 -2
index 34826baed9..843ce3c881 100644
@@ -10,8 +10,6 @@ Signed-off-by: Andrea Adami <[email protected]>
  Makefile.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/Makefile.in b/Makefile.in
-index fb01134..dbf1fb6 100644
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -47,7 +47,7 @@ TARGET_CFLAGS	= @TARGET_CFLAGS@
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0001-kexec-Provide-local-implementation-of-mkstemp-for-kl.patch new file +118 -0

118 lines not on this page · raw message

meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0002-Adjust-the-order-of-headers-to-fix-build-for-musl.patch +1 -3
index ec456f382b..a02e9306bb 100644
@@ -13,11 +13,9 @@ Signed-off-by: Khem Raj <[email protected]>
  kexec/ifdown.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/kexec/ifdown.c b/kexec/ifdown.c
-index 9679ad7..82c6141 100644
 --- a/kexec/ifdown.c
 +++ b/kexec/ifdown.c
-@@ -16,8 +16,8 @@ char *v_ifdown = "@(#)ifdown.c  1.11  02-Jun-1998  [email protected]";
+@@ -16,8 +16,8 @@ char *v_ifdown = "@(#)ifdown.c  1.11  02
  #include <sys/socket.h>
  #include <sys/time.h>
 
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0002-kexec-Add-imaxdiv-implementation-for-klibc-builds.patch new file +48 -0

48 lines not on this page · raw message

meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0003-kexec-elf-rel-use-our-elf.h.patch +0 -12
index 32035ca128..b7a71aaac3 100644
@@ -22,8 +22,6 @@ Signed-off-by: Andrea Adami <[email protected]>
  kexec/kexec-elf-rel.c                    | 2 +-
  6 files changed, 6 insertions(+), 6 deletions(-)
 
-diff --git a/kexec/arch/arm/kexec-elf-rel-arm.c b/kexec/arch/arm/kexec-elf-rel-arm.c
-index a939cf4..2551dc0 100644
 --- a/kexec/arch/arm/kexec-elf-rel-arm.c
 +++ b/kexec/arch/arm/kexec-elf-rel-arm.c
 @@ -1,5 +1,5 @@
@@ -33,8 +31,6 @@ index a939cf4..2551dc0 100644
  #include "../../kexec.h"
  #include "../../kexec-elf.h"
 
-diff --git a/kexec/arch/i386/kexec-elf-rel-x86.c b/kexec/arch/i386/kexec-elf-rel-x86.c
-index 55a214e..e7583d1 100644
 --- a/kexec/arch/i386/kexec-elf-rel-x86.c
 +++ b/kexec/arch/i386/kexec-elf-rel-x86.c
 @@ -1,5 +1,5 @@
@@ -44,8 +40,6 @@ index 55a214e..e7583d1 100644
  #include "../../kexec.h"
  #include "../../kexec-elf.h"
 
-diff --git a/kexec/arch/ppc/kexec-elf-rel-ppc.c b/kexec/arch/ppc/kexec-elf-rel-ppc.c
-index 1acbd86..a60c66c 100644
 --- a/kexec/arch/ppc/kexec-elf-rel-ppc.c
 +++ b/kexec/arch/ppc/kexec-elf-rel-ppc.c
 @@ -1,5 +1,5 @@
@@ -55,8 +49,6 @@ index 1acbd86..a60c66c 100644
  #include "../../kexec.h"
  #include "../../kexec-elf.h"
 
-diff --git a/kexec/arch/ppc64/kexec-elf-rel-ppc64.c b/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
-index 51b1354..c85f421 100644
 --- a/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
 +++ b/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
 @@ -1,5 +1,5 @@
@@ -66,8 +58,6 @@ index 51b1354..c85f421 100644
  #include <string.h>
  #include "../../kexec.h"
  #include "../../kexec-elf.h"
-diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
-index db85b44..761a4ed 100644
 --- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
 +++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
 @@ -1,5 +1,5 @@
@@ -77,8 +67,6 @@ index db85b44..761a4ed 100644
  #include "../../kexec.h"
  #include "../../kexec-elf.h"
 
-diff --git a/kexec/kexec-elf-rel.c b/kexec/kexec-elf-rel.c
-index 9a6e63d..a856636 100644
 --- a/kexec/kexec-elf-rel.c
 +++ b/kexec/kexec-elf-rel.c
 @@ -4,7 +4,7 @@
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0003-kexec-riscv-Add-endian-conversion-macros-for-klibc-b.patch new file +70 -0

70 lines not on this page · raw message

meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0004-exec-Define-EM_RISCV-for-klibc-builds.patch new file +36 -0
new file mode 100644
index 0000000000..9bba417ac9
@@ -0,0 +1,36 @@
+From c71b58dd324a29f2d157eb9d07f5a05bee0518f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 13 Dec 2025 12:16:00 -0800
+Subject: [PATCH 4/5] exec: Define EM_RISCV for klibc builds
+
+klibc's elf.h header doesn't define the EM_RISCV machine type
+constant. Add a fallback definition when building with klibc to
+support RISC-V architecture.
+
+EM_RISCV (243) is the official ELF machine type for RISC-V as
+defined in the ELF specification.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ kexec/kexec-elf.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/kexec/kexec-elf.h b/kexec/kexec-elf.h
+index 1e512c8..af3fc55 100644
+--- a/kexec/kexec-elf.h
++++ b/kexec/kexec-elf.h
+@@ -4,6 +4,13 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+
++/* klibc provided elf.h does not yet have this definition and its preferred in includes
++ * when building for klibc
++ */
++#ifndef EM_RISCV
++#define EM_RISCV	243		/* RISC-V */
++#endif
++
+ struct kexec_info;
+
+ struct mem_ehdr {
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0004-kexec-elf-exec.c-replace-with-our-err.h.patch +0 -2
index 27a1cc7a56..c4ffe1403e 100644
@@ -15,8 +15,6 @@ Signed-off-by: Andrea Adami <[email protected]>
  kexec/kexec-elf-exec.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/kexec/kexec-elf-exec.c b/kexec/kexec-elf-exec.c
-index a9329ac..0dd0700 100644
 --- a/kexec/kexec-elf-exec.c
 +++ b/kexec/kexec-elf-exec.c
 @@ -4,7 +4,7 @@
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0005-crashdump-elf.c-work-around-for-sysconf-_SC_NPROCESS.patch +0 -2
index 4604c2a5b7..b01b07b417 100644
@@ -21,8 +21,6 @@ Signed-off-by: Andrea Adami <[email protected]>
  kexec/crashdump-elf.c | 92 +++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 92 insertions(+)
 
-diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c
-index b8bb686..7e6767c 100644
 --- a/kexec/crashdump-elf.c
 +++ b/kexec/crashdump-elf.c
 @@ -25,6 +25,94 @@ do {									\
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0005-kexec-Disable-memfd_create-for-klibc-builds.patch new file +44 -0

44 lines not on this page · raw message

meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0006-kexec-syscall.h-work-around-missing-syscall-wrapper.patch +3 -5
index a607ce777e..28b0de1377 100644
@@ -15,11 +15,9 @@ Signed-off-by: Andrea Adami <[email protected]>
  kexec/kexec-syscall.h | 21 +++++++++++++++++++++
  1 file changed, 21 insertions(+)
 
-diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
-index b96e02a..2a3794d 100644
 --- a/kexec/kexec-syscall.h
 +++ b/kexec/kexec-syscall.h
-@@ -77,11 +77,16 @@
+@@ -96,11 +96,16 @@
 
  struct kexec_segment;
 
@@ -36,7 +34,7 @@ index b96e02a..2a3794d 100644
 
  static inline int is_kexec_file_load_implemented(void) {
  	if (__NR_kexec_file_load != 0xffffffff)
-@@ -89,6 +94,21 @@ static inline int is_kexec_file_load_implemented(void) {
+@@ -108,6 +113,21 @@ static inline int is_kexec_file_load_imp
  	return 0;
  }
 
@@ -58,7 +56,7 @@ index b96e02a..2a3794d 100644
  static inline long kexec_file_load(int kernel_fd, int initrd_fd,
  			unsigned long cmdline_len, const char *cmdline_ptr,
  			unsigned long flags)
-@@ -96,6 +116,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
+@@ -115,6 +135,7 @@ static inline long kexec_file_load(int k
  	return (long) syscall(__NR_kexec_file_load, kernel_fd, initrd_fd,
  				cmdline_len, cmdline_ptr, flags);
  }
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0007-kexec.c-add-guard-around-ENOTSUP.patch +13 -16
index 0ae90016d0..76bb1c5e69 100644
@@ -15,23 +15,20 @@ Signed-off-by: Andrea Adami <[email protected]>
  kexec/kexec.c | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/kexec/kexec.c b/kexec/kexec.c
-index 32ae56c..0764e85 100644
 --- a/kexec/kexec.c
 +++ b/kexec/kexec.c
-@@ -1517,6 +1517,7 @@ int main(int argc, char *argv[])
- 					 */
- 				case -EINVAL:
- 				case -ENOEXEC:
+@@ -1421,12 +1421,14 @@ static int do_kexec_file_load(int filein
+ 			 */
+ 		case EINVAL:
+ 		case ENOEXEC:
 +#ifndef __KLIBC__
- 					 /*
- 					  * ENOTSUP can be unsupported image
- 					  * type or unsupported PE signature
-@@ -1529,6 +1530,7 @@ int main(int argc, char *argv[])
- 					  * kernel bug
- 					  */
- 				case -ENOTSUP:
+ 			/*
+ 			 * ENOTSUP can be unsupported image
+ 			 * type or unsupported PE signature
+ 			 * wrapper type, duh.
+ 			 */
+ 		case ENOTSUP:
 +#endif
- 					do_kexec_file_syscall = 0;
- 					break;
- 			}
+ 			ret = EFALLBACK;
+ 			break;
+ 		}
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0008-kexec.c-replace-mising-BLKGETSIZE64.patch +2 -4
index 0ab7a1d71e..bb34157559 100644
@@ -15,11 +15,9 @@ Signed-off-by: Andrea Adami <[email protected]>
  kexec/kexec.c | 4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/kexec/kexec.c b/kexec/kexec.c
-index 0764e85..157c577 100644
 --- a/kexec/kexec.c
 +++ b/kexec/kexec.c
-@@ -55,6 +55,10 @@
+@@ -61,6 +61,10 @@
  #define KEXEC_LOADED_PATH "/sys/kernel/kexec_loaded"
  #define KEXEC_CRASH_LOADED_PATH "/sys/kernel/kexec_crash_loaded"
 
@@ -29,4 +27,4 @@ index 0764e85..157c577 100644
 +
  unsigned long long mem_min = 0;
  unsigned long long mem_max = ULONG_MAX;
- static unsigned long kexec_flags = 0;
+ unsigned long elfcorehdrsz = 0;
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch deleted +0 -57

57 lines not on this page · raw message

meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0010-fs2dt.c-work-around-missing-getline.patch +2 -4
index 4652f10a6e..6c960e671a 100644
@@ -17,11 +17,9 @@ Signed-off-by: Andrea Adami <[email protected]>
  kexec/fs2dt.c | 8 ++++++++
  1 file changed, 8 insertions(+)
 
-diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
-index 07a5e2f..d635636 100644
 --- a/kexec/fs2dt.c
 +++ b/kexec/fs2dt.c
-@@ -531,6 +531,9 @@ static void dt_copy_old_root_param(void)
+@@ -532,6 +532,9 @@ static void dt_copy_old_root_param(void)
  	char *last_cmdline = NULL;
  	char *p, *old_param;
  	size_t len = 0;
@@ -31,7 +29,7 @@ index 07a5e2f..d635636 100644
 
  	strcpy(filename, pathname);
  	strcat(filename, "bootargs");
-@@ -538,8 +541,13 @@ static void dt_copy_old_root_param(void)
+@@ -539,8 +542,13 @@ static void dt_copy_old_root_param(void)
  	if (!fp)
  		return;
 
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch +4 -4
index 07fa841ccc..c591923c2d 100644
@@ -12,16 +12,16 @@ Signed-off-by: Andrea Adami <[email protected]>
 
 --- a/purgatory/Makefile
 +++ b/purgatory/Makefile
-@@ -47,7 +47,7 @@ purgatory/sha256.o: $(srcdir)/util_lib/s
+@@ -49,7 +49,7 @@ purgatory/sha256.o: $(srcdir)/util_lib/s
  $(PURGATORY): CC=$(TARGET_CC)
- $(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \
+ $(PURGATORY): CFLAGS=$(PURGATORY_EXTRA_CFLAGS) \
  		      $($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
 -		      -Os -fno-builtin -ffreestanding \
 +		      -Os -fno-builtin -ffreestanding -nostdinc \
  		      -fno-zero-initialized-in-bss \
- 		      -fno-PIC -fno-PIE -fno-stack-protector
+ 		      -fno-PIC -fno-PIE -fno-stack-protector -fno-tree-vectorize
 
-@@ -59,8 +59,8 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATO
+@@ -61,8 +61,8 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATO
  			-Iinclude \
  			-I$(shell $(CC) -print-file-name=include)
  $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0012-purgatory-string.c-avoid-inclusion-of-string.h.patch +0 -2
index db0d763178..93ac0908c3 100644
@@ -14,8 +14,6 @@ Signed-off-by: Andrea Adami <[email protected]>
  purgatory/string.c | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/purgatory/string.c b/purgatory/string.c
-index f06c460..c5e978a 100644
 --- a/purgatory/string.c
 +++ b/purgatory/string.c
 @@ -1,5 +1,7 @@
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0013-sha256.h-avoid-inclusion-of-sys-types.h.patch +0 -2
index 777cbcf94f..b7c4d7d8e2 100644
@@ -15,8 +15,6 @@ Signed-off-by: Andrea Adami <[email protected]>
  util_lib/include/sha256.h | 4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/util_lib/include/sha256.h b/util_lib/include/sha256.h
-index 467fb22..40fd3ed 100644
 --- a/util_lib/include/sha256.h
 +++ b/util_lib/include/sha256.h
 @@ -1,7 +1,11 @@
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0014-add-if_nameindex-from-musl.patch +1 -11
index eca01b956c..738623f0dd 100644
@@ -32,8 +32,6 @@ Upstream-Status: Pending
  create mode 100644 kexec/if_nameindex.c
  create mode 100644 kexec/if_nameindex.h
 
-diff --git a/kexec/Makefile b/kexec/Makefile
-index 4db84d8..fb7520b 100644
 --- a/kexec/Makefile
 +++ b/kexec/Makefile
 @@ -11,7 +11,7 @@ KEXEC_SRCS = $(KEXEC_SRCS_base)
@@ -45,9 +43,6 @@ index 4db84d8..fb7520b 100644
  KEXEC_SRCS_base += kexec/kexec-elf.c
  KEXEC_SRCS_base += kexec/kexec-elf-exec.c
  KEXEC_SRCS_base += kexec/kexec-elf-core.c
-diff --git a/kexec/if_nameindex.c b/kexec/if_nameindex.c
-new file mode 100644
-index 0000000..e586e41
 --- /dev/null
 +++ b/kexec/if_nameindex.c
 @@ -0,0 +1,64 @@
@@ -115,9 +110,6 @@ index 0000000..e586e41
 +	errno = ENOBUFS;
 +	return p;
 +}
-diff --git a/kexec/if_nameindex.h b/kexec/if_nameindex.h
-new file mode 100644
-index 0000000..cf1c061
 --- /dev/null
 +++ b/kexec/if_nameindex.h
 @@ -0,0 +1,15 @@
@@ -136,11 +128,9 @@ index 0000000..cf1c061
 +void if_freenameindex (struct if_nameindex *);
 +
 +#endif
-diff --git a/kexec/ifdown.c b/kexec/ifdown.c
-index 82c6141..cc3ca9f 100644
 --- a/kexec/ifdown.c
 +++ b/kexec/ifdown.c
-@@ -18,6 +18,9 @@ char *v_ifdown = "@(#)ifdown.c  1.11  02-Jun-1998  [email protected]";
+@@ -18,6 +18,9 @@ char *v_ifdown = "@(#)ifdown.c  1.11  02
 
  #include <netinet/in.h>
  #include <net/if.h>
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0015-vmcore-dmesg-fix-warning.patch deleted +0 -29
deleted file mode 100644
index 044a70d93b..0000000000
@@ -1,29 +0,0 @@
-From a2679731a56748de58a4cf0a46b7a15d75543a88 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <[email protected]>
-Date: Sun, 29 Apr 2018 00:52:31 +0200
-Subject: [PATCH] vmcore-dmesg: fix warning
-
- # define __bitwise
-
-Signed-off-by: Andrea Adami <[email protected]>
-
----
-Upstream-Status: Pending
-
- vmcore-dmesg/vmcore-dmesg.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
-index c63ac4f..a4e3014 100644
---- a/vmcore-dmesg/vmcore-dmesg.c
-+++ b/vmcore-dmesg/vmcore-dmesg.c
-@@ -2,6 +2,9 @@
- #define _GNU_SOURCE
- #define _LARGEFILE_SOURCE 1
- #define _FILE_OFFSET_BITS 64
-+#ifdef __KLIBC__
-+#include <sys/types.h>
-+#endif
- #include <endian.h>
- #include <byteswap.h>
- #include <stdio.h>
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/Fix-building-on-x86_64-with-binutils-2.41.patch deleted +0 -95

95 lines not on this page · raw message

meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch deleted +0 -44

44 lines not on this page · raw message

meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/include_next.patch +1 -1
index 29ea1d9f18..62279f9cb6 100644
@@ -2,7 +2,7 @@ Upstream-Status: Pending
 
 --- a/kexec/Makefile
 +++ b/kexec/Makefile
-@@ -110,7 +110,7 @@ $(KEXEC): $(KEXEC_OBJS) $(UTIL_LIB)
+@@ -116,7 +116,7 @@ $(KEXEC): $(KEXEC_OBJS) $(UTIL_LIB)
  	@$(MKDIR) -p $(@D)
  	$(LINK.o) -o $@ $^ $(CFLAGS) $(LIBS)
 
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/kexec-x32.patch deleted +0 -94

94 lines not on this page · raw message

meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch +64 -7

80 lines not on this page · raw message

meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch +0 -2
index 67a3cac1fa..35d2d6ad16 100644
@@ -21,8 +21,6 @@ Signed-off-by: Quanyang Wang <[email protected]>
  kexec/arch/ppc/kexec-ppc.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/kexec/arch/ppc/kexec-ppc.h b/kexec/arch/ppc/kexec-ppc.h
-index 04e728e..6bae9ec 100644
 --- a/kexec/arch/ppc/kexec-ppc.h
 +++ b/kexec/arch/ppc/kexec-ppc.h
 @@ -44,7 +44,7 @@ void dol_ppc_usage(void);
meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb +11 -10
index 2df53ff38e..a6ef7a4d66 100644
@@ -3,20 +3,19 @@ SUMMARY = "Kexec tools, statically compiled against klibc"
 HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
 SECTION = "kernel/userland"
 LICENSE = "GPL-2.0-only"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
+LIC_FILES_CHKSUM = "file://COPYING;md5=570a9b3749dd0463a1778803b12a6dce \
                     file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
-PV = "2.0.18+git"
+PV = "2.0.32"
 
 DEPENDS = "zlib xz"
 
 inherit klibc autotools siteinfo
 
 SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git;branch=master"
-SRCREV = "5750980cdbbc33ef75bfba6660295b932376ce15"
+SRCREV = "15d78e5799eea7ec5ea9c5897ae95aaa0ce8970c"
 
 BUILD_PATCHES = "file://0001-force-static-build.patch \
                  file://0002-Adjust-the-order-of-headers-to-fix-build-for-musl.patch \
-                 file://Fix-building-on-x86_64-with-binutils-2.41.patch \
                  "
 
 KLIBC_PATCHES += " \
@@ -26,21 +25,23 @@ KLIBC_PATCHES += " \
             file://0006-kexec-syscall.h-work-around-missing-syscall-wrapper.patch \
             file://0007-kexec.c-add-guard-around-ENOTSUP.patch \
             file://0008-kexec.c-replace-mising-BLKGETSIZE64.patch \
-            file://0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch \
             file://0010-fs2dt.c-work-around-missing-getline.patch \
             file://0011-purgatory-Makefile-adapt-to-klcc.patch \
             file://0012-purgatory-string.c-avoid-inclusion-of-string.h.patch \
             file://0013-sha256.h-avoid-inclusion-of-sys-types.h.patch \
             file://0014-add-if_nameindex-from-musl.patch \
-            file://0015-vmcore-dmesg-fix-warning.patch \
             file://klibc-reboot.patch \
             file://include_next.patch \
+            file://0001-kexec-Provide-local-implementation-of-mkstemp-for-kl.patch \
+            file://0002-kexec-Add-imaxdiv-implementation-for-klibc-builds.patch \
+            file://0003-kexec-riscv-Add-endian-conversion-macros-for-klibc-b.patch \
+            file://0004-exec-Define-EM_RISCV-for-klibc-builds.patch \
+            file://0005-kexec-Disable-memfd_create-for-klibc-builds.patch \
             "
 
 WARNING_FIXES = ""
-FROM_OE_CORE = "file://arm_crashdump-fix-buffer-align.patch \
-                file://powerpc_change-the-memory-size-limit.patch \
-                file://kexec-x32.patch"
+FROM_OE_CORE = "file://powerpc_change-the-memory-size-limit.patch \
+                "
 
 SRC_URI += "${BUILD_PATCHES} ${KLIBC_PATCHES} ${WARNING_FIXES} ${FROM_OE_CORE}"
 
@@ -91,4 +92,4 @@ FILES:vmcore-dmesg-klibc = "${sbindir}/vmcore-dmesg"
 
 INSANE_SKIP:${PN} = "arch"
 
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*|riscv64.*)-(linux|freebsd.*)'