Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
From b89799f7f20d4b2476e99e95e6795450f2f1c111 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Wed, 22 Oct 2025 13:44:12 +0200
Subject: kexec-tools: powerpc: Fix function signature of comparefunc()
Fixes the following build error on 32-bit PowerPC:
kexec/arch/ppc/fs2dt.c: In function 'putnode':
kexec/arch/ppc/fs2dt.c:338:51: error: passing argument 4 of 'scandir' from incompatible pointer type [-Wincompatible-pointer-types]
338 | numlist = scandir(pathname, &namelist, 0, comparefunc);
| ^~~~~~~~~~~
| |
| int (*)(const void *, const void *)
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: Simon Horman <horms@kernel.org>
Upstream: https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=b89799f7f20d4b2476e99e95e6795450f2f1c111
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
kexec/arch/ppc/fs2dt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kexec/arch/ppc/fs2dt.c b/kexec/arch/ppc/fs2dt.c
index fed499b..d03b995 100644
--- a/kexec/arch/ppc/fs2dt.c
+++ b/kexec/arch/ppc/fs2dt.c
@@ -292,7 +292,8 @@ static void putprops(char *fn, struct dirent **nlist, int numlist)
* Compare function used to sort the device-tree directories
* This function will be passed to scandir.
*/
-static int comparefunc(const void *dentry1, const void *dentry2)
+static int comparefunc(const struct dirent **dentry1,
+ const struct dirent **dentry2)
{
char *str1 = (*(struct dirent **)dentry1)->d_name;
char *str2 = (*(struct dirent **)dentry2)->d_name;
--
cgit 1.3-korg

View File

@@ -0,0 +1,54 @@
From 8ac3a7e08957fcb3fa59c9fc4e9c283b9a072ce6 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Wed, 22 Oct 2025 13:44:13 +0200
Subject: kexec-tools: powerpc: Fix pointer declarations in
read_memory_region_limits()
Fixes the following two build errors on 32-bit PowerPC:
kexec/arch/ppc/kexec-ppc.c: In function 'read_memory_region_limits':
kexec/arch/ppc/kexec-ppc.c:106:11: error: assignment to 'long long unsigned int *' from incompatible pointer type 'long unsigned int *' [-Wincompatible-pointer-types]
106 | p = (unsigned long*)buf;
| ^
kexec/arch/ppc/kexec-ppc.c: In function 'read_memory_region_limits':
kexec/arch/ppc/kexec-ppc.c:112:19: error: assignment to 'long unsigned int *' from incompatible pointer type 'long long unsigned int *' [-Wincompatible-pointer-types]
112 | p = (unsigned long long *)p + 1;
| ^
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: Simon Horman <horms@kernel.org>
Upstream: https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/patch/?id=8ac3a7e08957fcb3fa59c9fc4e9c283b9a072ce6
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
kexec/arch/ppc/kexec-ppc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c
index d3dad0f..e173433 100644
--- a/kexec/arch/ppc/kexec-ppc.c
+++ b/kexec/arch/ppc/kexec-ppc.c
@@ -91,7 +91,7 @@ int read_memory_region_limits(int fd, unsigned long long *start,
unsigned long long *end)
{
char buf[MAXBYTES];
- unsigned long *p;
+ unsigned long long *p;
unsigned long nbytes = dt_address_cells + dt_size_cells;
if (lseek(fd, 0, SEEK_SET) == -1) {
@@ -103,7 +103,7 @@ int read_memory_region_limits(int fd, unsigned long long *start,
return -1;
}
- p = (unsigned long*)buf;
+ p = (unsigned long long*)buf;
if (dt_address_cells == sizeof(unsigned long)) {
*start = p[0];
p++;
--
cgit 1.3-korg

34
package/kexec/Config.in Normal file
View File

@@ -0,0 +1,34 @@
config BR2_PACKAGE_KEXEC_ARCH_SUPPORTS
bool
default y
depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_armeb || \
BR2_loongarch64 || \
BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el || \
BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
BR2_sh4 || BR2_sh4a || BR2_aarch64 || BR2_s390x || BR2_m68k || \
BR2_riscv
config BR2_PACKAGE_KEXEC
bool "kexec"
depends on BR2_PACKAGE_KEXEC_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd_create()
help
Kexec is a user space utility for loading another kernel
and asking the currently running kernel to do something with
it.
https://www.kernel.org/pub/linux/utils/kernel/kexec/
if BR2_PACKAGE_KEXEC
config BR2_PACKAGE_KEXEC_ZLIB
bool "zlib support"
select BR2_PACKAGE_ZLIB
help
Support for compressed kernel images
endif
comment "kexec needs a toolchain w/ headers >= 3.17"
depends on BR2_PACKAGE_KEXEC_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17

6
package/kexec/kexec.hash Normal file
View File

@@ -0,0 +1,6 @@
# From https://www.kernel.org/pub/linux/utils/kernel/kexec/sha256sums.asc
# After checking pgp signature with key:
# E27CD9A1F5ACC2FF4BFE7285D7CF64696A374FBE
sha256 8f81422a5fd2362cf6cb001b511e535565ed0f32c2f4451fb5eb68fed6710a5d kexec-tools-2.0.32.tar.xz
# locally calculated
sha256 edaef632cbb643e4e7a221717a6c441a4c1a7c918e6e4d56debc3d8739b233f6 COPYING

47
package/kexec/kexec.mk Normal file
View File

@@ -0,0 +1,47 @@
################################################################################
#
# kexec
#
################################################################################
KEXEC_VERSION = 2.0.32
KEXEC_SOURCE = kexec-tools-$(KEXEC_VERSION).tar.xz
KEXEC_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kexec
KEXEC_LICENSE = GPL-2.0
KEXEC_LICENSE_FILES = COPYING
KEXEC_CPE_ID_PRODUCT = kexec-tools
KEXEC_CPE_ID_VENDOR = kexec-tools_project
KEXEC_SELINUX_MODULES = kdump
# Makefile expects $STRIP -o to work, so needed for !BR2_STRIP_strip
KEXEC_MAKE_OPTS = STRIP="$(TARGET_CROSS)strip"
# kexec requires at least -O1 optimization level. Its code uses a
# trick to detect unaligned accesses at link time which needs at least
# dead-code-removal to work. See put/get_unaligned() macros in
# kexec/kexec.h
ifeq ($(BR2_OPTIMIZE_0),y)
KEXEC_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O1"
endif
ifeq ($(BR2_PACKAGE_KEXEC_ZLIB),y)
KEXEC_CONF_OPTS += --with-zlib
KEXEC_DEPENDENCIES += zlib
else
KEXEC_CONF_OPTS += --without-zlib
endif
ifeq ($(BR2_PACKAGE_XZ),y)
KEXEC_CONF_OPTS += --with-lzma
KEXEC_DEPENDENCIES += xz
else
KEXEC_CONF_OPTS += --without-lzma
endif
define KEXEC_REMOVE_LIB_TOOLS
rm -rf $(TARGET_DIR)/usr/lib/kexec-tools
endef
KEXEC_POST_INSTALL_TARGET_HOOKS += KEXEC_REMOVE_LIB_TOOLS
$(eval $(autotools-package))