aboutsummaryrefslogtreecommitdiffstats
path: root/meta-initramfs
diff options
context:
space:
mode:
Diffstat (limited to 'meta-initramfs')
-rw-r--r--meta-initramfs/README.md (renamed from meta-initramfs/README)5
-rw-r--r--meta-initramfs/classes/klibc.bbclass12
-rwxr-xr-xmeta-initramfs/conf/include/non-repro-meta-initramfs.inc23
-rw-r--r--meta-initramfs/conf/layer.conf4
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch42
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/files/0001-make-Add-compiler-includes-in-cflags.patch33
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb4
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb20
-rw-r--r--meta-initramfs/recipes-core/images/initramfs-debug-image.bb (renamed from meta-initramfs/recipes-bsp/images/initramfs-debug-image.bb)7
-rw-r--r--meta-initramfs/recipes-core/images/initramfs-kexecboot-image.bb (renamed from meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb)10
-rw-r--r--meta-initramfs/recipes-core/images/initramfs-kexecboot-klibc-image.bb (renamed from meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb)0
-rw-r--r--meta-initramfs/recipes-core/images/meta-initramfs-image.bb6
-rw-r--r--meta-initramfs/recipes-core/initrdscripts/files/init-debug.sh (renamed from meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh)0
-rw-r--r--meta-initramfs/recipes-core/initrdscripts/initramfs-debug_1.0.bb (renamed from meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb)2
-rw-r--r--meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb18
-rw-r--r--meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch35
-rw-r--r--meta-initramfs/recipes-devtools/dracut/dracut/0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch32
-rw-r--r--meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch16
-rw-r--r--meta-initramfs/recipes-devtools/dracut/dracut_056.bb (renamed from meta-initramfs/recipes-devtools/dracut/dracut_git.bb)28
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch24
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby/0001-rename-grub2-editenv-to-grub-editenv.patch (renamed from meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch)10
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby/0002-Add-another-variable-LIBS-to-provides-libraries-from.patch38
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby/0003-include-paths.h-for-_PATH_MOUNTED.patch (renamed from meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch)10
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby/0004-rpm-sort-include-string.h-for-strverscmp.patch33
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb40
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby_git.bb30
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/0001-Define-in_-structs-for-non-glibc-system-libs.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch)8
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/0001-always-use-bfd-linker.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-always-use-bfd-linker.patch)2
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch)4
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/0001-include-linux-sysinfo.h-directly.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-include-linux-sysinfo.h-directly.patch)8
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch)6
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/0001-klibc-add-getrandom-syscall.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-add-getrandom-syscall.patch)9
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/0001-klibc_2.0.4-add-kexec_file_load-syscall.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc_2.0.4-add-kexec_file_load-syscall.patch)9
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/0001-mkfifo-Implement-mkfifo.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-mkfifo-Implement-mkfifo.patch)2
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/0001-workaround-for-overlapping-sections-in-binary.patch47
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/armv4-fix-v4bx.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch)8
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/cross-clang.patch26
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/klcc-consider-sysroot.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch)2
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch38
-rw-r--r--meta-initramfs/recipes-devtools/klibc/files/use-env-for-perl.patch (renamed from meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/use-env-for-perl.patch)4
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.13.bb (renamed from meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.4.bb)6
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch28
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch28
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-dash-Specify-format-string-in-fmtstr.patch29
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-static-utils-do-not-build-shared-binaries.patch213
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-cross-accept-clang-options.patch19
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch24
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch29
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch151
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.13.bb (renamed from meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.4.bb)8
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-utils.inc10
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.13.bb (renamed from meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.4.bb)2
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc.inc53
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc_2.0.13.bb (renamed from meta-initramfs/recipes-devtools/klibc/klibc_2.0.4.bb)8
-rw-r--r--meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-2.0.2/0001-make-Add-compiler-includes-in-cflags.patch32
-rw-r--r--meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb36
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0001-force-static-build.patch4
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0002-Adjust-the-order-of-headers-to-fix-build-for-musl.patch2
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0003-kexec-elf-rel-use-our-elf.h.patch6
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0004-kexec-elf-exec.c-replace-with-our-err.h.patch2
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0005-crashdump-elf.c-work-around-for-sysconf-_SC_NPROCESS.patch4
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0006-kexec-syscall.h-work-around-missing-syscall-wrapper.patch13
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0007-kexec.c-add-guard-around-ENOTSUP.patch8
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0008-kexec.c-replace-mising-BLKGETSIZE64.patch6
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch4
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0010-fs2dt.c-work-around-missing-getline.patch2
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch18
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0012-purgatory-string.c-avoid-inclusion-of-string.h.patch5
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0013-sha256.h-avoid-inclusion-of-sys-types.h.patch5
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0014-add-if_nameindex-from-musl.patch16
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0015-vmcore-dmesg-fix-warning.patch12
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/140-mips_disable_devicetree_support.patch158
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/Fix-building-on-x86_64-with-binutils-2.41.patch95
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64-crashdump-arm64.c-fix-warning.patch10
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-arm64.c-workaround-for-getrandom-syscall.patch11
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-image-header.h-add-missing-le64toh.patch7
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch12
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump.patch4
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/include_next.patch24
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/kexec-x32.patch46
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch23
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc-purgatory-Makefile-remove-unknown-flags.patch9
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch13
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_basename.patch4
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_kexec_test.patch4
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_sys_io.patch2
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_vfscanf.patch4
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb53
88 files changed, 1017 insertions, 900 deletions
diff --git a/meta-initramfs/README b/meta-initramfs/README.md
index 79244d43f0..119293a741 100644
--- a/meta-initramfs/README
+++ b/meta-initramfs/README.md
@@ -11,9 +11,8 @@ Dependencies
This layer depends on:
-URI: git://github.com/openembedded/oe-core.git
+URI: git://git.openembedded.org/meta-openembedded
branch: master
-revision: HEAD
Maintenance
@@ -23,7 +22,7 @@ Send patches / pull requests to openembedded-devel@lists.openembedded.org
with '[meta-initramfs]' in the subject.
When sending single patches, please using something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-initramfs][PATCH'
+git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-initramfs][PATCH'
Interm layer maintainer: Khem Raj <raj.khem@gmail.com>
diff --git a/meta-initramfs/classes/klibc.bbclass b/meta-initramfs/classes/klibc.bbclass
index b7b72b728b..202d132d94 100644
--- a/meta-initramfs/classes/klibc.bbclass
+++ b/meta-initramfs/classes/klibc.bbclass
@@ -3,14 +3,14 @@ DEPENDS =+ "klcc-cross"
# Default for klcc is to build static binaries.
# Set CC = "${TARGET_PREFIX}klcc -shared" to build the dynamic version.
-CC_forcevariable = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS}"
-CC_forcevariable_armv4_linux-gnueabi = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS} -march=armv4 -mthumb-interwork"
-CC_append_armv7ve = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"
-CC_append_armv7a = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"
-
-CPP_forcevariable = "${CC} -E"
+CC:forcevariable = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS}"
+CC:forcevariable:armv4:linux-gnueabi = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS} -march=armv4 -mthumb-interwork"
+CC:append:armv7ve = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"
+CC:append:armv7a = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"
# klcc uses own optimizations by default. See klcc(1) man file.
export CFLAGS="${TUNE_CCARGS}"
export CPPFLAGS="${TUNE_CCARGS}"
export LDFLAGS="${TUNE_CCARGS}"
+
+OVERRIDES =. "libc-klibc:"
diff --git a/meta-initramfs/conf/include/non-repro-meta-initramfs.inc b/meta-initramfs/conf/include/non-repro-meta-initramfs.inc
new file mode 100755
index 0000000000..8f01f5624b
--- /dev/null
+++ b/meta-initramfs/conf/include/non-repro-meta-initramfs.inc
@@ -0,0 +1,23 @@
+# List of known non-reproducible package of the meta-initramfs layer
+# Please keep this list sorted
+KNOWN_NON_REPRO_META_INITRAMFS = " \
+ kexecboot-klibc \
+ kexecboot-klibc-dbg \
+ kexec-klibc \
+ kexec-tools-klibc-dbg \
+ mtdinfo-klibc \
+ ubiattach-klibc \
+ ubiblock-klibc \
+ ubicrc32-klibc \
+ ubidetach-klibc \
+ ubiformat-klibc \
+ ubimkvol-klibc \
+ ubinfo-klibc \
+ ubinize-klibc \
+ ubirename-klibc \
+ ubirmvol-klibc \
+ ubirsvol-klibc \
+ ubiupdatevol-klibc \
+ ubi-utils-klibc-dbg \
+ vmcore-dmesg-klibc \
+"
diff --git a/meta-initramfs/conf/layer.conf b/meta-initramfs/conf/layer.conf
index bd92ddfbc2..93ae527d42 100644
--- a/meta-initramfs/conf/layer.conf
+++ b/meta-initramfs/conf/layer.conf
@@ -13,10 +13,10 @@ BBFILE_PATTERN_meta-initramfs := "^${LAYERDIR}/"
# choosing carefully how this layer interacts with all of the
# other layers.
-BBFILE_PRIORITY_meta-initramfs = "8"
+BBFILE_PRIORITY_meta-initramfs = "5"
LAYERDEPENDS_meta-initramfs = "core"
-LAYERSERIES_COMPAT_meta-initramfs = "thud"
+LAYERSERIES_COMPAT_meta-initramfs = "scarthgap styhead"
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
dracut->virtual/kernel \
diff --git a/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch b/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch
new file mode 100644
index 0000000000..52d622a2f8
--- /dev/null
+++ b/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch
@@ -0,0 +1,42 @@
+From a6d1678379df6142a68cc9bb76dae540a31b8fdb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Mar 2019 23:47:50 -0700
+Subject: [PATCH] kexecboot: Use new reboot() API with klibc
+
+Klibc has changed this API in
+https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=6b621b8705ce5901dcf49607c8a3523c9e521901
+
+therefore adopt the code
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/kexecboot.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/kexecboot.c b/src/kexecboot.c
+index cf49b40..c785fce 100644
+--- a/src/kexecboot.c
++++ b/src/kexecboot.c
+@@ -857,7 +857,7 @@ int process_ctx_menu(struct params_t *params, int action) {
+ #else
+ sync();
+ /* if ( -1 == reboot(LINUX_REBOOT_CMD_RESTART) ) { */
+- if ( -1 == reboot(RB_AUTOBOOT) ) {
++ if ( -1 == reboot(RB_AUTOBOOT, NULL) ) {
+ log_msg(lg, "Can't initiate reboot: %s", ERRMSG);
+ }
+ #endif
+@@ -874,7 +874,7 @@ int process_ctx_menu(struct params_t *params, int action) {
+ #else
+ sync();
+ /* if ( -1 == reboot(LINUX_REBOOT_CMD_POWER_OFF) ) { */
+- if ( -1 == reboot(RB_POWER_OFF) ) {
++ if ( -1 == reboot(RB_POWER_OFF, NULL) ) {
+ log_msg(lg, "Can't initiate shutdown: %s", ERRMSG);
+ }
+ #endif
+--
+2.21.0
+
diff --git a/meta-initramfs/recipes-bsp/kexecboot/files/0001-make-Add-compiler-includes-in-cflags.patch b/meta-initramfs/recipes-bsp/kexecboot/files/0001-make-Add-compiler-includes-in-cflags.patch
new file mode 100644
index 0000000000..abfd8b77ee
--- /dev/null
+++ b/meta-initramfs/recipes-bsp/kexecboot/files/0001-make-Add-compiler-includes-in-cflags.patch
@@ -0,0 +1,33 @@
+From 528a64d17488295299dad9fbfe3d7140bc1cfdfa Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 6 Feb 2021 11:06:48 -0800
+Subject: [PATCH] make: Add compiler includes in cflags
+
+Fixes
+| In file included from /mnt/b/yoe/master/build/tmp/work/raspberrypi4_64-yoe-linux/kexecboot-klibc/0.6+gitAUTOINC+5a5e04be20-r0/recipe-sysroot/usr/lib/klibc/include/stdio.h:11:
+| /mnt/b/yoe/master/build/tmp/work/raspberrypi4_64-yoe-linux/kexecboot-klibc/0.6+gitAUTOINC+5a5e04be20-r0/recipe-sysroot/usr/lib/klibc/include/stdarg.h:9:15: fatal error: 'stdarg.h' file not found
+| #include_next <stdarg.h>
+| ^~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index c75df23..d2adf38 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,6 +1,6 @@
+ bin_PROGRAMS=kexecboot
+
+-kexecboot_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS)
++kexecboot_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS) -I$(shell $(CC) -print-file-name=include)
+
+ kexecboot_SOURCES = \
+ util.c \
+--
+2.30.0
+
diff --git a/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb b/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
index f90e2344bb..2dce19c6be 100644
--- a/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
+++ b/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
@@ -8,7 +8,7 @@ SRC_URI = "file://icon.xpm"
S = "${WORKDIR}"
-do_install_prepend () {
+do_install:prepend () {
echo '# /boot/boot.cfg - KEXECBOOT configuration file.
#
# First kernel stanza.
@@ -55,7 +55,7 @@ do_install () {
PACKAGE_ARCH = "${MACHINE_ARCH}"
-FILES_${PN} += "/boot/*"
+FILES:${PN} += "/boot/*"
CMDLINE ?= ""
CMDLINE_DEBUG ?= "quiet"
diff --git a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
index 6d79e8f83f..a92c0e8966 100644
--- a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
+++ b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
@@ -1,16 +1,22 @@
SUMMARY = "kexecboot linux-as-bootloader"
DESCRIPTION = "kexecboot is a graphical linux-as-bootloader implementation based on kexec."
-HOMEPAGE = "http://kexecboot.org"
-LICENSE = "GPLv2"
+HOMEPAGE = "https://github.com/kexecboot/kexecboot/wiki"
+LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-PV = "0.6+git${SRCPV}"
+PV = "0.6+git"
S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/kexecboot/kexecboot.git"
-SRCREV = "4c01d6960aa6a9d03675605062469ab777fa2b01"
+SRC_URI = "git://github.com/kexecboot/kexecboot.git;branch=master;protocol=https"
+SRC_URI:append:libc-klibc = "\
+ file://0001-kexecboot-Use-new-reboot-API-with-klibc.patch \
+ file://0001-make-Add-compiler-includes-in-cflags.patch \
+"
+SRCREV = "5a5e04be206140059f42ac786d424da1afaa04b6"
inherit autotools
EXTRA_OECONF = "--enable-textui --enable-delay=2 --enable-evdev-rate=1000,250"
+CFLAGS += "-fcommon"
+
do_install () {
install -D -m 0755 ${B}/src/kexecboot ${D}${bindir}/kexecboot
install -d ${D}/proc
@@ -21,9 +27,9 @@ do_install () {
PACKAGE_ARCH = "${MACHINE_ARCH}"
-FILES_${PN} += " ${bindir}/kexecboot /init /proc /mnt /dev /sys"
+FILES:${PN} += " ${bindir}/kexecboot /init /proc /mnt /dev /sys"
-pkg_postinst_${PN} () {
+pkg_postinst:${PN} () {
ln -sf ${bindir}/kexecboot $D/init
}
diff --git a/meta-initramfs/recipes-bsp/images/initramfs-debug-image.bb b/meta-initramfs/recipes-core/images/initramfs-debug-image.bb
index be7350ade2..fc9e81e5de 100644
--- a/meta-initramfs/recipes-bsp/images/initramfs-debug-image.bb
+++ b/meta-initramfs/recipes-core/images/initramfs-debug-image.bb
@@ -11,9 +11,12 @@ IMAGE_FEATURES = ""
export IMAGE_BASENAME = "initramfs-debug-image"
IMAGE_LINGUAS = ""
-LICENSE = "MIT"
+# Some BSPs use IMAGE_FSTYPES:<machine override> which would override
+# an assignment to IMAGE_FSTYPES so we need anon python
+python () {
+ d.setVar("IMAGE_FSTYPES", d.getVar("INITRAMFS_FSTYPES"))
+}
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
IMAGE_ROOTFS_SIZE = "8192"
diff --git a/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb b/meta-initramfs/recipes-core/images/initramfs-kexecboot-image.bb
index 2573eb4818..7e6e03d8e7 100644
--- a/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb
+++ b/meta-initramfs/recipes-core/images/initramfs-kexecboot-image.bb
@@ -1,11 +1,13 @@
SUMMARY = "Initramfs image for kexecboot kernel"
DESCRIPTION = "This image provides kexecboot (linux as bootloader) and helpers."
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-inherit image
+# Some BSPs use IMAGE_FSTYPES:<machine override> which would override
+# an assignment to IMAGE_FSTYPES so we need anon python
+python () {
+ d.setVar("IMAGE_FSTYPES", d.getVar("INITRAMFS_FSTYPES"))
+}
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit image
# avoid circular dependencies
EXTRA_IMAGEDEPENDS = ""
diff --git a/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb b/meta-initramfs/recipes-core/images/initramfs-kexecboot-klibc-image.bb
index 3a8d9f7438..3a8d9f7438 100644
--- a/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb
+++ b/meta-initramfs/recipes-core/images/initramfs-kexecboot-klibc-image.bb
diff --git a/meta-initramfs/recipes-core/images/meta-initramfs-image.bb b/meta-initramfs/recipes-core/images/meta-initramfs-image.bb
new file mode 100644
index 0000000000..4c041eb5fc
--- /dev/null
+++ b/meta-initramfs/recipes-core/images/meta-initramfs-image.bb
@@ -0,0 +1,6 @@
+SUMMARY = "meta-initramfs build test image"
+
+IMAGE_INSTALL = "packagegroup-core-boot \
+ packagegroup-meta-initramfs"
+
+inherit core-image
diff --git a/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh b/meta-initramfs/recipes-core/initrdscripts/files/init-debug.sh
index 7edbd70cb0..7edbd70cb0 100644
--- a/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh
+++ b/meta-initramfs/recipes-core/initrdscripts/files/init-debug.sh
diff --git a/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb b/meta-initramfs/recipes-core/initrdscripts/initramfs-debug_1.0.bb
index 667690f888..4c06346570 100644
--- a/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb
+++ b/meta-initramfs/recipes-core/initrdscripts/initramfs-debug_1.0.bb
@@ -11,4 +11,4 @@ do_install() {
inherit allarch
-FILES_${PN} += " /init "
+FILES:${PN} += " /init "
diff --git a/meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb b/meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb
new file mode 100644
index 0000000000..4b76246a03
--- /dev/null
+++ b/meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Meta-initramfs packagegroups"
+
+inherit packagegroup
+
+PROVIDES = "${PACKAGES}"
+PACKAGES = ' \
+ packagegroup-meta-initramfs \
+ packagegroup-meta-initramfs-devtools \
+'
+
+RDEPENDS:packagegroup-meta-initramfs = "\
+ packagegroup-meta-initramfs-devtools \
+"
+
+RDEPENDS:packagegroup-meta-initramfs-devtools = "\
+ dracut \
+ ${@bb.utils.contains_any("TRANSLATED_TARGET_ARCH", "i586 x86-64", "grubby", "", d)} \
+ "
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch b/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch
new file mode 100644
index 0000000000..bd768d00d2
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch
@@ -0,0 +1,35 @@
+From ff5e1a662ba93ba79e2aeaaaec48a2a8ec4b4701 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Thu, 31 Mar 2022 22:22:44 +0800
+Subject: [PATCH] Guard against __GLIBC_PREREQ for musl libc
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/install/util.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/install/util.c b/src/install/util.c
+index 5721de89..784aec48 100644
+--- a/src/install/util.c
++++ b/src/install/util.c
+@@ -27,6 +27,7 @@
+
+ #include "util.h"
+
++#if defined(__GLIBC__)
+ #if __GLIBC_PREREQ(2, 30) == 0
+ #include <sys/syscall.h>
+ #ifndef SYS_gettid
+@@ -35,6 +36,7 @@
+
+ #define gettid() ((pid_t) syscall(SYS_gettid))
+ #endif /*__GLIBC_PREREQ */
++#endif /*__GLIBC__*/
+
+ size_t page_size(void)
+ {
+--
+2.25.1
+
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut/0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch b/meta-initramfs/recipes-devtools/dracut/dracut/0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch
new file mode 100644
index 0000000000..170df7119f
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/dracut/dracut/0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch
@@ -0,0 +1,32 @@
+From 7f8ef553b7c433af153d48c6a16b2943780abf67 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 31 Dec 2022 14:41:52 -0800
+Subject: [PATCH] install: Do not undef _FILE_OFFSET_BITS
+
+_FILE_OFFSET_BITS is a feature test macro to determine largefile
+support. Usually its set to 64 on systems supporting LFS. Its also
+needed to be set to 64 for supporting 64bit time_t on glibc on 32bit
+systems. If its undefined explicitly, then 64bit time_t can not be
+enabled.
+
+Upstream-Status: Submitted [https://github.com/dracutdevs/dracut/pull/2157]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/install/dracut-install.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
+index dda0caca..05a67a03 100644
+--- a/src/install/dracut-install.c
++++ b/src/install/dracut-install.c
+@@ -22,7 +22,6 @@
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+-#undef _FILE_OFFSET_BITS
+ #include <ctype.h>
+ #include <errno.h>
+ #include <fcntl.h>
+--
+2.39.0
+
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch b/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch
index 32714038b9..68ec2b8fdb 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch
+++ b/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch
@@ -1,4 +1,4 @@
-From 06011ce55b1e892e863568a73d64eebc6389544f Mon Sep 17 00:00:00 2001
+From 9f7740c4c2fda64029c23674e9858ce8bd4367df Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 13 Jul 2017 17:14:05 -0700
Subject: [PATCH] util.h: include <sys/reg.h> when libc != glibc
@@ -11,13 +11,15 @@ https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dracut/patches/mu
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- install/util.h | 3 +++
+Upstream-Status: Pending
+
+ src/install/util.h | 3 +++
1 file changed, 3 insertions(+)
-diff --git a/install/util.h b/install/util.h
-index 2ad3254d..062626ec 100644
---- a/install/util.h
-+++ b/install/util.h
+diff --git a/src/install/util.h b/src/install/util.h
+index a6f9a184..82732913 100644
+--- a/src/install/util.h
++++ b/src/install/util.h
@@ -36,6 +36,9 @@
#include <sys/stat.h>
#include <dirent.h>
@@ -29,5 +31,5 @@ index 2ad3254d..062626ec 100644
#include "macro.h"
--
-2.13.2
+2.17.1
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_056.bb
index dd2e8bbb3d..db08fffe9a 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_056.bb
@@ -2,20 +2,20 @@ SUMMARY = "Initramfs generator using udev"
HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page"
DESCRIPTION = "Dracut is an event driven initramfs infrastructure. dracut (the tool) is used to create an initramfs image by copying tools and files from an installed system and combining it with the dracut framework, usually found in /usr/lib/dracut/modules.d."
-LICENSE = "GPLv2"
+LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PE = "1"
-PV = "049"
-# v048 tag
-SRCREV = "225e4b94cbdb702cf512490dcd2ad9ca5f5b22c1"
-SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
+SRCREV = "631d5f72a223288aa1f48bb8e8d0313e75947400"
+SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http;branch=master \
file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
+ file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
+ file://0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch \
"
DEPENDS += "kmod"
-DEPENDS_append_libc-musl = " fts"
+DEPENDS:append:libc-musl = " fts"
inherit bash-completion pkgconfig
@@ -38,7 +38,8 @@ PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/
EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
-LDLIBS_append_libc-musl = " -lfts"
+CFLAGS:append = " -fPIC"
+LDLIBS:append:libc-musl = " -lfts"
do_configure() {
./configure ${EXTRA_OECONF}
@@ -51,19 +52,20 @@ do_install() {
chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
}
-FILES_${PN} += "${prefix}/lib/kernel \
+FILES:${PN} += "${prefix}/lib/kernel \
${prefix}/lib/dracut \
${systemd_unitdir} \
"
-FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
+FILES:${PN}-dbg += "${prefix}/lib/dracut/.debug"
-CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
+CONFFILES:${PN} += "${sysconfdir}/dracut.conf"
-RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
+RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
# This could be optimized a bit, but let's avoid non-booting systems :)
-RRECOMMENDS_${PN} = " \
+RRECOMMENDS:${PN} = " \
kernel-modules \
- busybox \
coreutils \
"
+
+CVE_STATUS[CVE-2010-4176] = "not-applicable-platform: Applies only to Fedora"
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch b/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch
deleted file mode 100644
index dfbe7ba6b4..0000000000
--- a/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From b7b3caa9b5c8abcd3c371d0683001cd681e104b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 15 Jul 2017 10:19:22 -0700
-Subject: [PATCH 1/2] Add another variable LIBS to provides libraries from env
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index cc7e823..ae30a07 100644
---- a/Makefile
-+++ b/Makefile
-@@ -31,7 +31,7 @@ ifneq ($(VERBOSE_TEST),)
- VERBOSE_TEST="--verbose"
- endif
-
--grubby_LIBS = -lblkid -lpopt
-+grubby_LIBS = -lblkid -lpopt ${LIBS}
-
- all: grubby
-
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch b/meta-initramfs/recipes-devtools/grubby/grubby/0001-rename-grub2-editenv-to-grub-editenv.patch
index e693916e1d..7e1615c5b5 100644
--- a/meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch
+++ b/meta-initramfs/recipes-devtools/grubby/grubby/0001-rename-grub2-editenv-to-grub-editenv.patch
@@ -1,21 +1,20 @@
-From 15f0572f2f456c2c1b700bc790d9ce7a5c13cc74 Mon Sep 17 00:00:00 2001
+From 7a72139d2e3cc80f64090a823afe7bcea76e4792 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 4 Aug 2015 23:54:41 -0700
Subject: [PATCH] rename grub2-editenv to grub-editenv
We don't use the name grub2-editenv for grub2.
-Upstream-Status: Inappropriate
+Upstream-Status: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
-
---
grubby.c | 4 ++--
test.sh | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/grubby.c b/grubby.c
-index 396041a..3ceae69 100644
+index 98c1516..be832f6 100644
--- a/grubby.c
+++ b/grubby.c
@@ -301,7 +301,7 @@ static char *grub2GetEnv(struct configFileInfo *info, char *name)
@@ -74,3 +73,6 @@ index 33d24cf..009479c 100755
"saved_entry=title"
testing="GRUB2 --default-index with default=saved_entry"
+--
+2.25.1
+
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby/0002-Add-another-variable-LIBS-to-provides-libraries-from.patch b/meta-initramfs/recipes-devtools/grubby/grubby/0002-Add-another-variable-LIBS-to-provides-libraries-from.patch
new file mode 100644
index 0000000000..967a4c94fb
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/grubby/grubby/0002-Add-another-variable-LIBS-to-provides-libraries-from.patch
@@ -0,0 +1,38 @@
+From c02d1bf46174656cdb6f7c08fa3e8fa520edcd8e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 10:19:22 -0700
+Subject: [PATCH] Add another variable LIBS to provides libraries from env
+
+Upstream-Status: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 968c276..75abe44 100644
+--- a/Makefile
++++ b/Makefile
+@@ -31,7 +31,8 @@ ifneq ($(VERBOSE_TEST),)
+ VERBOSE_TEST="--verbose"
+ endif
+
+-grubby_LIBS = -lblkid -lpopt
++grubby_LIBS = -lblkid -lpopt ${LIBS}
++rpm-sort_LIBS = ${LIBS}
+
+ all: grubby rpm-sort
+
+@@ -63,7 +64,7 @@ grubby:: $(OBJECTS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(grubby_LIBS)
+
+ rpm-sort::rpm-sort.o
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lrpmio
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lrpmio $(rpm-sort_LIBS)
+
+ clean:
+ rm -f *.o grubby rpm-sort *~
+--
+2.25.1
+
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch b/meta-initramfs/recipes-devtools/grubby/grubby/0003-include-paths.h-for-_PATH_MOUNTED.patch
index de8133a3a4..86ae01021f 100644
--- a/meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch
+++ b/meta-initramfs/recipes-devtools/grubby/grubby/0003-include-paths.h-for-_PATH_MOUNTED.patch
@@ -1,7 +1,9 @@
-From 8f844ac7f44b8dc428d06cd6958c5f32d383d01c Mon Sep 17 00:00:00 2001
+From 7e68976eb6edd766471c11382f5bf57940ba9315 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 15 Jul 2017 10:19:50 -0700
-Subject: [PATCH 2/2] include paths.h for _PATH_MOUNTED
+Subject: [PATCH] include paths.h for _PATH_MOUNTED
+
+Upstream-Status: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
@@ -9,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/grubby.c b/grubby.c
-index 47a1a15..59f74a9 100644
+index be832f6..4825797 100644
--- a/grubby.c
+++ b/grubby.c
@@ -34,6 +34,7 @@
@@ -21,5 +23,5 @@ index 47a1a15..59f74a9 100644
#include "log.h"
--
-2.13.3
+2.25.1
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby/0004-rpm-sort-include-string.h-for-strverscmp.patch b/meta-initramfs/recipes-devtools/grubby/grubby/0004-rpm-sort-include-string.h-for-strverscmp.patch
new file mode 100644
index 0000000000..c68b492ebe
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/grubby/grubby/0004-rpm-sort-include-string.h-for-strverscmp.patch
@@ -0,0 +1,33 @@
+From 45bc228090b3adfc0a5058b9cd019d91831e110a Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Tue, 3 Jan 2023 13:59:48 +0800
+Subject: [PATCH] rpm-sort: include string.h for strverscmp
+
+Include string.h to fix build error:
+rpm-sort.c: In function 'package_version_compare':
+rpm-sort.c:156:13: error: 'strverscmp' undeclared (first use in this function)
+ 156 | cmp = strverscmp;
+ | ^~~~~~~~~~
+
+Upstream-Status: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ rpm-sort.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/rpm-sort.c b/rpm-sort.c
+index f196356..2eb91ce 100644
+--- a/rpm-sort.c
++++ b/rpm-sort.c
+@@ -8,6 +8,7 @@
+ #include <argp.h>
+ #include <rpm/rpmlib.h>
+ #include <err.h>
++#include <string.h>
+
+ typedef enum {
+ RPMNVRCMP,
+--
+2.25.1
+
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb b/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
deleted file mode 100644
index dc3a70bb52..0000000000
--- a/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "A command line tool for updating and displaying info about boot loaders"
-DESCRIPTION = "grubby is a command line tool for updating and displaying information \
-about the configuration files for the grub, lilo, elilo (ia64), yaboot (powerpc) and \
-zipl (s390) boot loaders. It is primarily designed to be used from scripts which install \
-new kernels and need to find information about the current boot environment. \
-"
-HOMEPAGE = "https://github.com/rhboot/grubby"
-LICENSE = "GPLv2+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
-
-DEPENDS = "popt util-linux"
-DEPENDS_append_libc-musl = " libexecinfo"
-
-S = "${WORKDIR}/git"
-SRCREV = "79c5cfa02c567efdc5bb18cdd584789e2e35aa23"
-SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https; \
- file://grubby-rename-grub2-editenv-to-grub-editenv.patch \
- file://run-ptest \
- file://0001-Add-another-variable-LIBS-to-provides-libraries-from.patch \
- file://0002-include-paths.h-for-_PATH_MOUNTED.patch \
- "
-
-RDEPENDS_${PN} += "dracut"
-
-inherit autotools-brokensep ptest
-
-EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}' LIBS='${LIBS}'"
-
-LIBS_libc-musl = "-lexecinfo"
-LIBS ?= ""
-do_install_ptest() {
- install -d ${D}${PTEST_PATH}
- cp -r ${S}/test ${S}/test.sh ${D}${PTEST_PATH}
- sed -i 's|./grubby|grubby|' ${D}${PTEST_PATH}/test.sh
-}
-
-RDEPENDS_${PN}-ptest = "util-linux-getopt bash"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby_git.bb b/meta-initramfs/recipes-devtools/grubby/grubby_git.bb
index 8430b7e102..ff673e21bb 100644
--- a/meta-initramfs/recipes-devtools/grubby/grubby_git.bb
+++ b/meta-initramfs/recipes-devtools/grubby/grubby_git.bb
@@ -5,29 +5,30 @@ zipl (s390) boot loaders. It is primarily designed to be used from scripts which
new kernels and need to find information about the current boot environment. \
"
HOMEPAGE = "https://github.com/rhboot/grubby"
-LICENSE = "GPLv2+"
+LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
-DEPENDS = "popt util-linux"
-DEPENDS_append_libc-musl = " libexecinfo"
+DEPENDS = "popt util-linux rpm"
+DEPENDS:append:libc-musl = " libexecinfo argp-standalone"
S = "${WORKDIR}/git"
-SRCREV = "a1d2ae93408c3408e672d7eba4550fdf27fb0201"
-SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https; \
- file://grubby-rename-grub2-editenv-to-grub-editenv.patch \
+SRCREV = "c01b0d5bb182bde35b464d14996acf354a3ada2e"
+SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https;;branch=main \
+ file://0001-rename-grub2-editenv-to-grub-editenv.patch \
+ file://0002-Add-another-variable-LIBS-to-provides-libraries-from.patch \
+ file://0003-include-paths.h-for-_PATH_MOUNTED.patch \
+ file://0004-rpm-sort-include-string.h-for-strverscmp.patch \
file://run-ptest \
- file://0001-Add-another-variable-LIBS-to-provides-libraries-from.patch \
- file://0002-include-paths.h-for-_PATH_MOUNTED.patch \
"
-RDEPENDS_${PN} += "dracut"
+RDEPENDS:${PN} += "dracut"
inherit autotools-brokensep ptest
-EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}' LIBS='${LIBS}'"
+EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}' 'LIBS=${LIBS}'"
-LIBS_libc-musl = "-lexecinfo"
+LIBS:libc-musl = "-lexecinfo -largp"
LIBS ?= ""
do_install_ptest() {
install -d ${D}${PTEST_PATH}
@@ -35,6 +36,11 @@ do_install_ptest() {
sed -i 's|./grubby|grubby|' ${D}${PTEST_PATH}/test.sh
}
-RDEPENDS_${PN}-ptest = "util-linux-getopt bash"
+RDEPENDS:${PN} += "bash"
+RDEPENDS:${PN}-ptest = "util-linux-getopt bash"
+
+inherit update-alternatives
+ALTERNATIVE:${PN} = "installkernel"
+ALTERNATIVE_LINK_NAME[installkernel] = "${sbindir}/installkernel"
COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-Define-in_-structs-for-non-glibc-system-libs.patch
index e7a0cce837..c782cf03c8 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-Define-in_-structs-for-non-glibc-system-libs.patch
@@ -12,12 +12,12 @@ to infer that these structs should be defined in linux/in.h
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
usr/include/net/if.h | 11 +++++++++++
usr/include/netinet/in.h | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+)
-diff --git a/usr/include/net/if.h b/usr/include/net/if.h
-index 116a176..6246b12 100644
--- a/usr/include/net/if.h
+++ b/usr/include/net/if.h
@@ -1,6 +1,17 @@
@@ -38,8 +38,6 @@ index 116a176..6246b12 100644
#include <sys/socket.h>
#include <sys/types.h>
#include <linux/if.h>
-diff --git a/usr/include/netinet/in.h b/usr/include/netinet/in.h
-index 2952bb2..0c95bc9 100644
--- a/usr/include/netinet/in.h
+++ b/usr/include/netinet/in.h
@@ -5,6 +5,42 @@
@@ -82,6 +80,6 @@ index 2952bb2..0c95bc9 100644
+#define __UAPI_DEF_IF_IFREQ 1
+#endif
+
+ #include <sys/types.h>
#include <klibc/extern.h>
#include <stdint.h>
- #include <endian.h> /* Must be included *before* <linux/in.h> */
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-always-use-bfd-linker.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-always-use-bfd-linker.patch
index de04d691fe..895254889c 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-always-use-bfd-linker.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-always-use-bfd-linker.patch
@@ -10,6 +10,8 @@ linking issues on such distros
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
index fcf4f891a4..5ac0d4596a 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
@@ -11,11 +11,11 @@ which is a bit harder in OE
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
usr/klibc/arch/arm/MCONFIG | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG
-index 303c6ac..48d2685 100644
--- a/usr/klibc/arch/arm/MCONFIG
+++ b/usr/klibc/arch/arm/MCONFIG
@@ -10,7 +10,7 @@
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-include-linux-sysinfo.h-directly.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-include-linux-sysinfo.h-directly.patch
index 04c97fc5ee..d49dfc1924 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-include-linux-sysinfo.h-directly.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-include-linux-sysinfo.h-directly.patch
@@ -12,17 +12,17 @@ override to avoid this assumption
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
usr/include/sys/sysinfo.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/usr/include/sys/sysinfo.h b/usr/include/sys/sysinfo.h
-index dba68dc..d145c0b 100644
--- a/usr/include/sys/sysinfo.h
+++ b/usr/include/sys/sysinfo.h
-@@ -5,7 +5,7 @@
- #ifndef _SYS_SYSINFO_H
+@@ -6,7 +6,7 @@
#define _SYS_SYSINFO_H
+ #include <sys/types.h>
-#include <linux/kernel.h>
+#include <linux/sysinfo.h>
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch
index 94818e3669..e4ae3728a4 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch
@@ -12,12 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
usr/klibc/Kbuild | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
-index 98caf2e9..b34521e0 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
-@@ -168,7 +168,8 @@ $(SOHASH): $(SOLIB) $(SOLIB).hash
- targets += interp.o
+@@ -190,7 +190,8 @@ $(SOHASH): $(SOLIB) $(SOLIB).hash
+ targets += shared-stub.o
quiet_cmd_interp = BUILD $@
- cmd_interp = $(KLIBCCC) $(klibccflags) -D__ASSEMBLY__ \
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-add-getrandom-syscall.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-klibc-add-getrandom-syscall.patch
index 0768f6d514..80e6c6b11c 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-add-getrandom-syscall.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-klibc-add-getrandom-syscall.patch
@@ -7,14 +7,14 @@ needed by latest kexec-tools for qemuarm64 (kashan)
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
+Upstream-Status: Pending
+
usr/klibc/SYSCALLS.def | 1 +
1 file changed, 1 insertion(+)
-diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
-index 6b3bf4c..d4184ba 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
-@@ -274,6 +274,7 @@ int syslog::klogctl(int, char *, int);
+@@ -275,6 +275,7 @@ int syslog::klogctl(int, char *, int);
int sysinfo(struct sysinfo *);
long kexec_load(void *, unsigned long, struct kexec_segment *, unsigned long);
<x86_64,ppc64,s390x> long kexec_file_load(int, int, unsigned long, const char *, unsigned long);
@@ -22,6 +22,3 @@ index 6b3bf4c..d4184ba 100644
/*
* Low-level I/O (generally architecture-specific);
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc_2.0.4-add-kexec_file_load-syscall.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-klibc_2.0.4-add-kexec_file_load-syscall.patch
index 3d8d987c43..16885488e4 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc_2.0.4-add-kexec_file_load-syscall.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-klibc_2.0.4-add-kexec_file_load-syscall.patch
@@ -7,14 +7,14 @@ for supported archs only (matched in kexec-tools)
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
+Upstream-Status: Pending
+
usr/klibc/SYSCALLS.def | 1 +
1 file changed, 1 insertion(+)
-diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
-index c56e8f9..6b3bf4c 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
-@@ -273,6 +273,7 @@ int reboot::__reboot(int, int, int, void *);
+@@ -274,6 +274,7 @@ int reboot::__reboot(int, int, int, void
int syslog::klogctl(int, char *, int);
int sysinfo(struct sysinfo *);
long kexec_load(void *, unsigned long, struct kexec_segment *, unsigned long);
@@ -22,6 +22,3 @@ index c56e8f9..6b3bf4c 100644
/*
* Low-level I/O (generally architecture-specific);
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-mkfifo-Implement-mkfifo.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-mkfifo-Implement-mkfifo.patch
index 3bc081d4e9..4378ca5610 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-mkfifo-Implement-mkfifo.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-mkfifo-Implement-mkfifo.patch
@@ -6,6 +6,8 @@ Subject: [PATCH] mkfifo: Implement mkfifo
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
usr/utils/mkfifo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta-initramfs/recipes-devtools/klibc/files/0001-workaround-for-overlapping-sections-in-binary.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-workaround-for-overlapping-sections-in-binary.patch
new file mode 100644
index 0000000000..2f203ef0a4
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-workaround-for-overlapping-sections-in-binary.patch
@@ -0,0 +1,47 @@
+From 911130ce429cbf6a92d0fbd17f0ff638ec941df2 Mon Sep 17 00:00:00 2001
+From: Petr Ovtchenkov <ptr@void-ptr.info>
+Date: Sun, 7 Feb 2021 00:04:36 -0800
+Subject: [PATCH] workaround for overlapping sections in binary
+
+Problem: binary (typesize.bin) created from object file (typesize.o)
+with 'objcopy -O binary ... '. But typesize.o has relocatable objects that all
+copied with offset 0. This will lead to overlapping sections in binary.
+By fortunate syscalls.pl check magic bytes and ring the bell.
+
+This is naive workaround: skip .note.gnu.property section that overlap
+.rodata section.
+
+This not a bug of objcopy, https://sourceware.org/bugzilla/show_bug.cgi?id=27314
+
+Related commit:
+
+ commit de6f630e6be90d6d32d8bf2fed3f856b0c32f7ba
+ Author: H. Peter Anvin <hpa at zytor.com>
+ Date: Sat Jun 10 11:15:19 2006 -0700
+
+ [klibc] Detect the sizes of various types, and make available to sysstub.ph.
+
+ This additional code effectively queries the C compiler for the sizes of
+ various types, and makes an associative array %typesize available to
+ sysstub.ph. This is currently not used, but it's expected that some
+ architectures, e.g. s390, will need this to determine which registers
+ go where, and how many registers are needed.
+
+Upstream-Status: Submitted [https://lists.zytor.com/archives/klibc/2021-February/004583.html]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ usr/klibc/syscalls/Kbuild | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/usr/klibc/syscalls/Kbuild
++++ b/usr/klibc/syscalls/Kbuild
+@@ -71,7 +71,7 @@ $(obj)/typesize.c: $(srctree)/$(KLIBCSRC
+
+ # Convert typesize.o to typesize.bin
+ quiet_cmd_mkbin = OBJCOPY $@
+- cmd_mkbin = $(KLIBCOBJCOPY) -O binary --only-section .rodata $< $@
++ cmd_mkbin = $(KLIBCOBJCOPY) -O binary --remove-section .note.gnu.property $< $@
+
+ $(obj)/typesize.bin: $(obj)/typesize.o FORCE
+ $(call if_changed,mkbin)
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch b/meta-initramfs/recipes-devtools/klibc/files/armv4-fix-v4bx.patch
index e842353061..7b29eaf200 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/armv4-fix-v4bx.patch
@@ -9,15 +9,15 @@ which is "" in case of armv5 or thumbs.
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
+Upstream-Status: Pending
+
usr/klibc/arch/arm/MCONFIG | 1 +
1 file changed, 1 insertion(+)
-diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG
-index 53bc1dc..303c6ac 100644
--- a/usr/klibc/arch/arm/MCONFIG
+++ b/usr/klibc/arch/arm/MCONFIG
-@@ -29,6 +29,7 @@ else
- KLIBCSHAREDFLAGS = -Ttext 0x01800200
+@@ -23,6 +23,7 @@ else
+ # Extra linkflags when building the shared version of the library
ifeq ($(CONFIG_AEABI),y)
KLIBCREQFLAGS += -mabi=aapcs-linux -mno-thumb-interwork
+KLIBCLDFLAGS += $(FIX_ARMV4_EABI_BX)
diff --git a/meta-initramfs/recipes-devtools/klibc/files/cross-clang.patch b/meta-initramfs/recipes-devtools/klibc/files/cross-clang.patch
new file mode 100644
index 0000000000..f39701a65e
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/klibc/files/cross-clang.patch
@@ -0,0 +1,26 @@
+Upstream-Status: Pending
+
+--- a/scripts/Kbuild.klibc
++++ b/scripts/Kbuild.klibc
+@@ -113,10 +113,8 @@ KLIBCCPPFLAGS := -nostdinc -iwithpref
+ -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
+ -I$(KLIBCINC)/bits$(KLIBCBITSIZE) \
+ -I$(KLIBCOBJ)/../include \
+- -I$(KLIBCINC)
+-ifeq ($(cc-name),clang)
+-KLIBCCPPFLAGS += -isystem $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-file-name=include)
+-endif
++ -I$(KLIBCINC) \
++ -I$(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-file-name=include)
+
+ # kernel include paths
+ KLIBCKERNELSRC ?= $(srctree)
+@@ -137,7 +135,7 @@ KLIBCCFLAGS += $(KLIBCCPPFLAGS) $(K
+ KLIBCAFLAGS += -D__ASSEMBLY__ $(KLIBCCFLAGS)
+ KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
+
+-KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) $(if $(filter gcc,$(cc-name)),--print-libgcc,--print-libgcc-file-name))
++KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc-file-name)
+ KLIBCLIBGCC ?= $(KLIBCLIBGCC_DEF)
+ KLIBCCRT0 := $(KLIBCOBJ)/arch/$(KLIBCARCHDIR)/crt0.o
+ KLIBCLIBC := $(KLIBCOBJ)/libc.a
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch b/meta-initramfs/recipes-devtools/klibc/files/klcc-consider-sysroot.patch
index 5f47d3f20a..af76564901 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/klcc-consider-sysroot.patch
@@ -3,6 +3,8 @@ From: Andrea Adami <andrea.adami@gmail.com>
Date: Fri, 19 Sep 2014 23:09:29 +0200
---
+Upstream-Status: Pending
+
klcc/klcc.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch b/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch
new file mode 100644
index 0000000000..a3a0695637
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch
@@ -0,0 +1,38 @@
+meta-clang passes this option to compiler defaults
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/klcc/klcc.in
++++ b/klcc/klcc.in
+@@ -207,6 +207,30 @@ while ( defined($a = shift(@ARGV)) ) {
+ } elsif ( $a =~ /^--([sysroot=])(.*)$/ ) {
+ # Override gcc encoded sysroot
+ push(@ccopt, $a);
++ } elsif ( $a eq '-nostartfiles' ) {
++ # Allow clang options
++ push(@ccopt, $a);
++ } elsif ( $a eq '-nostdlib' ) {
++ # Allow clang options
++ push(@ccopt, $a);
++ } elsif ( $a eq '-nodefaultlibs' ) {
++ # Allow clang options
++ push(@ccopt, $a);
++ } elsif ( $a eq '-no-pie' ) {
++ # Allow clang options
++ push(@ccopt, $a);
++ } elsif ( $a eq '-no-integrated-as' ) {
++ # Allow clang options
++ push(@ccopt, $a);
++ } elsif ( $a =~ '--unwindlib=.*' ) {
++ # Allow clang options
++ push(@ccopt, $a);
++ } elsif ( $a =~ '-rtlib=.*' ) {
++ # Allow clang options
++ push(@ccopt, $a);
++ } elsif ( $a =~ '--dyld-prefix=.*' ) {
++ # Allow clang options
++ push(@ccopt, $a);
+ } else {
+ die "$0: unknown option: $a\n";
+ }
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/use-env-for-perl.patch b/meta-initramfs/recipes-devtools/klibc/files/use-env-for-perl.patch
index eac128cc09..d2a19909f0 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/use-env-for-perl.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/use-env-for-perl.patch
@@ -1,3 +1,5 @@
+Upstream-Status: Pending
+
Patch was imported from the OpenEmbedded git server
(git://git.openembedded.org/openembedded)
as of commit id 676cbb54d42c89a4832871064cfcb7ee2ad372ee
@@ -10,8 +12,6 @@ that /usr/bin/env perl will always return ours (if it has been built).
Signed-off-by: Tom Rini <tom_rini@mentor.com>
-Index: klibc-1.5.20/klcc/makeklcc.pl
-===================================================================
--- a/klcc/makeklcc.pl
+++ b/klcc/makeklcc.pl
@@ -26,7 +26,7 @@ sub pathsearch($) {
diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.4.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.13.bb
index b285b2e8be..4011aa231e 100644
--- a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.4.bb
+++ b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.13.bb
@@ -7,8 +7,6 @@ DEPENDS = "klibc"
PACKAGES = ""
inherit nopackages
-FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
-
SRC_URI += "file://use-env-for-perl.patch"
# disable task already run in klibc recipe
@@ -25,8 +23,8 @@ do_install() {
# magic by removing all the crazy escaping.
sed -i -e "2i \$TARGETSYSROOT = '${STAGING_DIR_TARGET}';" \
-e "2i \$NATIVESYSROOT = '${STAGING_DIR_NATIVE}';" \
- -e 's#${@d.getVar("STAGING_DIR_NATIVE", True).replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${NATIVESYSROOT}#g;' \
- -e 's#${@d.getVar("STAGING_DIR_TARGET", True).replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${TARGETSYSROOT}#g' \
+ -e 's#${@d.getVar("STAGING_DIR_NATIVE").replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${NATIVESYSROOT}#g;' \
+ -e 's#${@d.getVar("STAGING_DIR_TARGET").replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${TARGETSYSROOT}#g' \
${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc
}
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch
deleted file mode 100644
index 181dcfb6de..0000000000
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 4b4147b76518d31a88fb2c58cdbf2236e159a25c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Sep 2017 23:10:54 -0700
-Subject: [PATCH] Kbuild.klibc: Add path to compiler headers via -isystem
-
-We need to include this path so it can find compiler headers e.g.
-stdarg.h which is called from wrapper stdarg.h using include_next
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- scripts/Kbuild.klibc | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
-index 101f86f..1d5cdc4 100644
---- a/scripts/Kbuild.klibc
-+++ b/scripts/Kbuild.klibc
-@@ -105,7 +105,8 @@ KLIBCOBJCOPY := $(OBJCOPY)
- KLIBCOBJDUMP := $(OBJDUMP)
-
- # klibc include paths
--KLIBCCPPFLAGS := -nostdinc -iwithprefix include \
-+KLIBCCPPFLAGS := -nostdinc -iwithprefix include \
-+ -isystem $(shell $(CC) -print-file-name=include) \
- -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
- -I$(KLIBCINC)/bits$(KLIBCBITSIZE) \
- -I$(KLIBCOBJ)/../include \
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch
deleted file mode 100644
index 1ba05a811e..0000000000
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b6185401fc3daa7fa8ba2b84db3e4da3b94a9867 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 26 Jul 2017 16:13:16 -0700
-Subject: [PATCH] Kbuild.klibc: Use -print-libgcc-file-name instead of
- --print-libgcc
-
--print-libgcc-file-name works with clang and gcc unlike --print-libgcc
-which is gcc specific
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- scripts/Kbuild.klibc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
-index f500d53..101f86f 100644
---- a/scripts/Kbuild.klibc
-+++ b/scripts/Kbuild.klibc
-@@ -128,7 +128,7 @@ KLIBCCFLAGS += $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS) \
- KLIBCAFLAGS += -D__ASSEMBLY__ $(KLIBCCFLAGS)
- KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
-
--KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc)
-+KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) -print-libgcc-file-name)
- KLIBCLIBGCC ?= $(KLIBCLIBGCC_DEF)
- KLIBCCRT0 := $(KLIBCOBJ)/arch/$(KLIBCARCHDIR)/crt0.o
- KLIBCLIBC := $(KLIBCOBJ)/libc.a
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-dash-Specify-format-string-in-fmtstr.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-dash-Specify-format-string-in-fmtstr.patch
deleted file mode 100644
index 46a23987f5..0000000000
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-dash-Specify-format-string-in-fmtstr.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8beffe501c1ac5b35d62004735c4157c74183901 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 9 Jul 2017 13:51:25 -0700
-Subject: [PATCH] dash: Specify format string in fmtstr()
-
-Fixes build with hardening flags
-
-usr/dash/jobs.c:429:3: error: format not a string literal and no format arguments [-Werror=format-security]
- col = fmtstr(s, 32, strsignal(st));
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- usr/dash/jobs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c
-index 009bbfe..299bcac 100644
---- a/usr/dash/jobs.c
-+++ b/usr/dash/jobs.c
-@@ -426,7 +426,7 @@ sprint_status(char *s, int status, int sigonly)
- goto out;
- #endif
- }
-- col = fmtstr(s, 32, strsignal(st));
-+ col = fmtstr(s, 32, "%s", strsignal(st));
- #ifdef WCOREDUMP
- if (WCOREDUMP(status)) {
- col += fmtstr(s + col, 16, " (core dumped)");
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-static-utils-do-not-build-shared-binaries.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-static-utils-do-not-build-shared-binaries.patch
deleted file mode 100644
index 2f7cd35564..0000000000
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-klibc-static-utils-do-not-build-shared-binaries.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From c034dceae17b7d8d437871afe5eba55a55434222 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Wed, 10 Oct 2018 00:48:31 +0200
-Subject: [PATCH] klibc-static-utils: do not build shared binaries
-
-We were building some shared utilities and this was leading to linker errors
-for x86 with security flags enabled.
-
-Fix
- i586-oe-linux-musl-ld.bfd: discarded output section: `.got.plt'
-
-Upstream-Status: Inappropriate [Embedded Specific]
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- usr/dash/Kbuild | 6 +-----
- usr/kinit/Kbuild | 4 +---
- usr/kinit/fstype/Kbuild | 4 +---
- usr/kinit/ipconfig/Kbuild | 4 +---
- usr/kinit/nfsmount/Kbuild | 4 +---
- usr/kinit/resume/Kbuild | 5 +----
- usr/kinit/run-init/Kbuild | 5 +----
- usr/utils/Kbuild | 7 ++-----
- 8 files changed, 9 insertions(+), 30 deletions(-)
-
-diff --git a/usr/dash/Kbuild b/usr/dash/Kbuild
-index 1a6920a..b3a4e64 100644
---- a/usr/dash/Kbuild
-+++ b/usr/dash/Kbuild
-@@ -25,12 +25,8 @@ gen-h-files := builtins.h nodes.h syntax.h token.h
-
- static-y := sh
-
--# The shared binary
--shared-y := sh.shared
--sh.shared-y := $(sh-y)
--
- # For cleaning
--targets := sh sh.g sh.shared sh.shared.g $(gen-o-files)
-+targets := sh sh.g $(gen-o-files)
-
- # explicit dependency for all generated files
- $(addprefix $(obj)/, $(sh-y)): $(addprefix $(obj)/, $(gen-h-files))
-diff --git a/usr/kinit/Kbuild b/usr/kinit/Kbuild
-index f7fdccd..8db06ab 100644
---- a/usr/kinit/Kbuild
-+++ b/usr/kinit/Kbuild
-@@ -18,8 +18,6 @@ kinit-y += fstype/
- kinit-y += resume/
-
- static-y := kinit
--shared-y := kinit.shared
--kinit.shared-y := $(kinit-y)
-
- # Additional include paths files
- KLIBCCFLAGS += -I$(srctree)/$(src)/fstype \
-@@ -29,7 +27,7 @@ KLIBCCFLAGS += -I$(srctree)/$(src)/fstype \
- -I$(srctree)/$(src)/run-init
-
- # Cleaning
--targets += kinit kinit.g kinit.shared kinit.shared.g
-+targets += kinit kinit.g
- subdir- := fstype ipconfig nfsmount resume run-init
-
-
-diff --git a/usr/kinit/fstype/Kbuild b/usr/kinit/fstype/Kbuild
-index 367611d..8d453ea 100644
---- a/usr/kinit/fstype/Kbuild
-+++ b/usr/kinit/fstype/Kbuild
-@@ -3,7 +3,6 @@
- #
-
- static-y := static/fstype
--shared-y := shared/fstype
-
- # common .o files
- objs := main.o fstype.o
-@@ -16,8 +15,7 @@ lib-y := $(objs)
-
- # .o files used to built executables
- static/fstype-y := $(objs)
--shared/fstype-y := $(objs)
-
- # Cleaning
--clean-dirs := static shared
-+clean-dirs := static
-
-diff --git a/usr/kinit/ipconfig/Kbuild b/usr/kinit/ipconfig/Kbuild
-index eb1d472..ef87e7e 100644
---- a/usr/kinit/ipconfig/Kbuild
-+++ b/usr/kinit/ipconfig/Kbuild
-@@ -3,7 +3,6 @@
- #
-
- static-y := static/ipconfig
--shared-y := shared/ipconfig
-
- # common .o files
- objs := main.o netdev.o packet.o
-@@ -22,8 +21,7 @@ lib-y := $(objs)
-
- # .o files used to built executables
- static/ipconfig-y := $(objs)
--shared/ipconfig-y := $(objs)
-
- # Cleaning
--clean-dirs := static shared
-+clean-dirs := static
-
-diff --git a/usr/kinit/nfsmount/Kbuild b/usr/kinit/nfsmount/Kbuild
-index ba31708..01bedce 100644
---- a/usr/kinit/nfsmount/Kbuild
-+++ b/usr/kinit/nfsmount/Kbuild
-@@ -4,7 +4,6 @@
-
- static-y := static/nfsmount
- #FIXME - build is broken static-y := dummypmap
--shared-y := shared/nfsmount
-
- objs := main.o mount.o portmap.o dummypmap.o sunrpc.o
-
-@@ -13,7 +12,6 @@ lib-y := $(objs)
-
- # .o files used for executables
- static/nfsmount-y := $(objs)
--shared/nfsmount-y := $(objs)
-
- # dummypmap uses a single .o file (rename src file?)
- dummypmap-y := dummypmap_test.o
-@@ -21,5 +19,5 @@ dummypmap-y := dummypmap_test.o
- # TODO - do we want a stripped version
- # TODO - do we want the static.g + shared.g directories?
-
--clean-dirs := static shared
-+clean-dirs := static
-
-diff --git a/usr/kinit/resume/Kbuild b/usr/kinit/resume/Kbuild
-index c1342e1..15b9590 100644
---- a/usr/kinit/resume/Kbuild
-+++ b/usr/kinit/resume/Kbuild
-@@ -3,7 +3,6 @@
- #
-
- static-y := static/resume
--shared-y := shared/resume
-
- # common .o files
- objs := resume.o resumelib.o
-@@ -20,9 +19,7 @@ KLIBCCFLAGS += -I$(srctree)/$(src)/..
- # .o files used to built executables
- static/resume-y := $(objs)
- static/resume-lib := ../lib.a
--shared/resume-y := $(objs)
--shared/resume-lib := ../lib.a
-
- # Cleaning
--clean-dirs := static shared
-+clean-dirs := static
-
-diff --git a/usr/kinit/run-init/Kbuild b/usr/kinit/run-init/Kbuild
-index c153b0a..a1ea834 100644
---- a/usr/kinit/run-init/Kbuild
-+++ b/usr/kinit/run-init/Kbuild
-@@ -3,7 +3,6 @@
- #
-
- static-y := static/run-init
--shared-y := shared/run-init
-
- # common .o files
- objs := run-init.o runinitlib.o
-@@ -24,9 +23,7 @@ KLIBCCFLAGS += -I$(srctree)/$(src)/..
- # .o files used to built executables
- static/run-init-y := $(objs)
- static/run-init-lib := ../lib.a
--shared/run-init-y := $(objs)
--shared/run-init-lib := ../lib.a
-
- # Cleaning
--clean-dirs := static shared
-+clean-dirs := static
-
-diff --git a/usr/utils/Kbuild b/usr/utils/Kbuild
-index 67d9486..1573363 100644
---- a/usr/utils/Kbuild
-+++ b/usr/utils/Kbuild
-@@ -7,7 +7,6 @@ progs += true false sleep ln mv nuke minips cat ls losetup
- progs += uname halt kill readlink cpio sync dmesg
-
- static-y := $(addprefix static/, $(progs))
--shared-y := $(addprefix shared/, $(progs))
-
- # The binary is placed in a subdir, so we need to tell kbuild this
- static/chroot-y := chroot.o
-@@ -62,13 +61,11 @@ static/losetup-y := losetup.o
- shared/losetup-y := losetup.o
-
- # Additionally linked targets
--always := static/reboot static/poweroff shared/reboot shared/poweroff
-+always := static/reboot static/poweroff
-
- $(obj)/static/reboot $(obj)/static/poweroff: $(obj)/static/halt
- $(call cmd,ln)
--$(obj)/shared/reboot $(obj)/shared/poweroff: $(obj)/shared/halt
-- $(call cmd,ln)
-
- # Clean deletes the static and shared dir
--clean-dirs := static shared
-+clean-dirs := static
-
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-cross-accept-clang-options.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-cross-accept-clang-options.patch
deleted file mode 100644
index 07703aa536..0000000000
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-cross-accept-clang-options.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-meta-clang passes this option to compiler defaults
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: git/klcc/klcc.in
-===================================================================
---- git.orig/klcc/klcc.in
-+++ git/klcc/klcc.in
-@@ -207,6 +207,9 @@ while ( defined($a = shift(@ARGV)) ) {
- } elsif ( $a =~ /^--([sysroot=])(.*)$/ ) {
- # Override gcc encoded sysroot
- push(@ccopt, $a);
-+ } elsif ( $a eq '-no-integrated-as' ) {
-+ # Allow clang options
-+ push(@ccopt, $a);
- } else {
- die "$0: unknown option: $a\n";
- }
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch
deleted file mode 100644
index f28cd54233..0000000000
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 1118cc971917abe19ddb029aa80417f6fd6bb343 Mon Sep 17 00:00:00 2001
-From: Thomas Kunze <thommycheck@gmx.de>
-Date: Sat, 6 Aug 2011 05:30:14 +0000
-Subject: [PATCH] klibc: initial commit of version 1.5.24
-
-Patch was imported from the OpenEmbedded git server
-(git://git.openembedded.org/openembedded)
-as of commit id b6764cf32ec93547531130dca364fb95e1c495f4
-Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
-
----
- defconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/defconfig b/defconfig
-index 04b98e9..0cb23d0 100644
---- a/defconfig
-+++ b/defconfig
-@@ -6,4 +6,4 @@ CONFIG_KLIBC_ZLIB=y
- CONFIG_REGPARM=y
- # ARM options
- # CONFIG_KLIBC_THUMB is not set
--# CONFIG_AEABI is not set
-+CONFIG_AEABI=y
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch
deleted file mode 100644
index a5563b7407..0000000000
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1be2bc41f915922102a3ba671b54c2df6f0052e6 Mon Sep 17 00:00:00 2001
-From: Ben Hutchings <ben@decadent.org.uk>
-Date: Sun, 14 Mar 2010 18:41:56 +0000
-Subject: [PATCH] klibc_1.5.26: now build against linux-libc-headers
-
-commit 43adf69062254fb4f8d4d11fb5fe36a60ae25d5a
-
- Taken from debian "Fix klibc Debian specific build trouble"
- Adapted for klibc_2.0.2
-
----
- scripts/Kbuild.install | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
-index 8af5697..d32a8a5 100644
---- a/scripts/Kbuild.install
-+++ b/scripts/Kbuild.install
-@@ -95,7 +95,9 @@ header:
- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
-- $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
-+ $(Q)for x in ../../../include/asm ../../../include/asm-generic ../../../include/linux ../../../include/mtd; do \
-+ ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \
-+ done
- $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
- $(Q)chmod -R a+rX,go-w $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
- $(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch
deleted file mode 100644
index 5c7a6625b5..0000000000
--- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From 1892079b827cf8f8316305b6d6e0985db82441a2 Mon Sep 17 00:00:00 2001
-From: Thomas Kunze <thommycheck@gmx.de>
-Date: Sat, 6 Aug 2011 05:30:14 +0000
-Subject: [PATCH] klibc: initial commit of version 1.5.24
-
-Patch was imported from the OpenEmbedded git server
-(git://git.openembedded.org/openembedded)
-as of commit id eefb99a313bbcc8f34c8b32bf0c5aa2dd2580735
-Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
-
-Minor edits following upstream changes
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
-
----
- scripts/Kbuild.install | 4 ----
- usr/dash/Kbuild | 2 --
- usr/gzip/Kbuild | 2 --
- usr/kinit/Kbuild | 2 --
- usr/kinit/fstype/Kbuild | 2 --
- usr/kinit/ipconfig/Kbuild | 2 --
- usr/kinit/nfsmount/Kbuild | 2 --
- usr/kinit/resume/Kbuild | 2 --
- usr/kinit/run-init/Kbuild | 2 --
- usr/klibc/Kbuild | 2 --
- usr/utils/Kbuild | 2 --
- 11 files changed, 24 deletions(-)
-
-diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
-index d32a8a5..fda699d 100644
---- a/scripts/Kbuild.install
-+++ b/scripts/Kbuild.install
-@@ -88,19 +88,15 @@ else
- header:
- $(Q)echo " INSTALL headers + man pages to $(INSTALLROOT)$(INSTALLDIR)"
- $(Q)mkdir -p $(INSTALLROOT)$(bindir)
-- $(Q)mkdir -p $(INSTALLROOT)$(mandir)/man1
-- $(Q)mkdir -p $(INSTALLROOT)$(SHLIBDIR)
- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)
- $(Q)-rm -rf $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
-- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
- $(Q)for x in ../../../include/asm ../../../include/asm-generic ../../../include/linux ../../../include/mtd; do \
- ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \
- done
- $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
- $(Q)chmod -R a+rX,go-w $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
-- $(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
- $(Q)$(install-bin) $(objtree)/klcc/$(KCROSS)klcc $(INSTALLROOT)$(bindir)
-
- footer: header
-diff --git a/usr/dash/Kbuild b/usr/dash/Kbuild
-index 3a98c1f..1a6920a 100644
---- a/usr/dash/Kbuild
-+++ b/usr/dash/Kbuild
-@@ -92,5 +92,3 @@ $(obj)/syntax.c: $(obj)/mksyntax
- $(obj)/syntax.h: $(obj)/syntax.c
- $(Q):
-
--# Targets to install
--install-y := sh.shared
-diff --git a/usr/gzip/Kbuild b/usr/gzip/Kbuild
-index 9bbf0a4..c497d02 100644
---- a/usr/gzip/Kbuild
-+++ b/usr/gzip/Kbuild
-@@ -21,5 +21,3 @@ $(obj)/gunzip $(obj)/zcat: $(obj)/gzip
- # Cleaning
- targets := gzip gzip.g gunzip zcat
-
--# Targets to install
--install-y := gzip gunzip zcat
-diff --git a/usr/kinit/Kbuild b/usr/kinit/Kbuild
-index 5320127..f7fdccd 100644
---- a/usr/kinit/Kbuild
-+++ b/usr/kinit/Kbuild
-@@ -33,5 +33,3 @@ targets += kinit kinit.g kinit.shared kinit.shared.g
- subdir- := fstype ipconfig nfsmount resume run-init
-
-
--# install binary
--install-y := kinit kinit.shared
-diff --git a/usr/kinit/fstype/Kbuild b/usr/kinit/fstype/Kbuild
-index 9b20db1..367611d 100644
---- a/usr/kinit/fstype/Kbuild
-+++ b/usr/kinit/fstype/Kbuild
-@@ -21,5 +21,3 @@ shared/fstype-y := $(objs)
- # Cleaning
- clean-dirs := static shared
-
--# install binary
--install-y := $(shared-y)
-diff --git a/usr/kinit/ipconfig/Kbuild b/usr/kinit/ipconfig/Kbuild
-index 7f8d181..eb1d472 100644
---- a/usr/kinit/ipconfig/Kbuild
-+++ b/usr/kinit/ipconfig/Kbuild
-@@ -27,5 +27,3 @@ shared/ipconfig-y := $(objs)
- # Cleaning
- clean-dirs := static shared
-
--# install binary
--install-y := $(shared-y)
-diff --git a/usr/kinit/nfsmount/Kbuild b/usr/kinit/nfsmount/Kbuild
-index 461e6f3..ba31708 100644
---- a/usr/kinit/nfsmount/Kbuild
-+++ b/usr/kinit/nfsmount/Kbuild
-@@ -23,5 +23,3 @@ dummypmap-y := dummypmap_test.o
-
- clean-dirs := static shared
-
--# Install binary
--install-y := $(shared-y)
-diff --git a/usr/kinit/resume/Kbuild b/usr/kinit/resume/Kbuild
-index 034195d..c1342e1 100644
---- a/usr/kinit/resume/Kbuild
-+++ b/usr/kinit/resume/Kbuild
-@@ -26,5 +26,3 @@ shared/resume-lib := ../lib.a
- # Cleaning
- clean-dirs := static shared
-
--# install binary
--install-y := $(shared-y)
-diff --git a/usr/kinit/run-init/Kbuild b/usr/kinit/run-init/Kbuild
-index f7832b7..c153b0a 100644
---- a/usr/kinit/run-init/Kbuild
-+++ b/usr/kinit/run-init/Kbuild
-@@ -30,5 +30,3 @@ shared/run-init-lib := ../lib.a
- # Cleaning
- clean-dirs := static shared
-
--# install binary
--install-y := $(shared-y)
-diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
-index eba6add..98caf2e 100644
---- a/usr/klibc/Kbuild
-+++ b/usr/klibc/Kbuild
-@@ -185,5 +185,3 @@ install-rule:
- $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib))
- $(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \
- $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib
-- $(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \
-- $(INSTALLROOT)$(SHLIBDIR)
-diff --git a/usr/utils/Kbuild b/usr/utils/Kbuild
-index 05aa794..67d9486 100644
---- a/usr/utils/Kbuild
-+++ b/usr/utils/Kbuild
-@@ -72,5 +72,3 @@ $(obj)/shared/reboot $(obj)/shared/poweroff: $(obj)/shared/halt
- # Clean deletes the static and shared dir
- clean-dirs := static shared
-
--# install only install the shared binaries
--install-y := $(shared-y) shared/reboot shared/poweroff
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.4.bb b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.13.bb
index 16778630c4..0de580781b 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.4.bb
+++ b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.13.bb
@@ -3,16 +3,10 @@ SUMMARY = "klibc utils for initramfs statically compiled"
FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
PACKAGES = "${PN}"
-FILES_${PN} = ""
+FILES:${PN} = ""
KLIBC_UTILS_VARIANT = "static"
KLIBC_UTILS_PKGNAME = "klibc-static-utils"
require klibc-utils.inc
require klibc.inc
-
-SRC_URI += "file://0001-klibc-static-utils-do-not-build-shared-binaries.patch"
-
-# avoid textrel if linking with -pie
-SECURITY_CFLAGS = ""
-SECURITY_LDFLAGS = ""
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc b/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc
index 2aac9e6ebf..4e9fea88d1 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc
+++ b/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc
@@ -2,11 +2,11 @@ do_install() {
install -d ${D}${base_bindir}
install -d ${D}${base_sbindir}
if [ "${KLIBC_UTILS_VARIANT}" = "shared" ]; then
- install -m 755 usr/kinit/kinit.shared ${D}${base_bindir}/kinit.shared
- install -m 755 usr/dash/sh.shared ${D}${base_bindir}/sh.shared
+ install -m 755 usr/kinit/shared/kinit ${D}${base_bindir}/kinit.shared
+ install -m 755 usr/dash/shared/sh ${D}${base_bindir}/sh.shared
else
- install -m 755 usr/dash/sh ${D}${base_bindir}/sh
- install -m 755 usr/kinit/kinit ${D}${base_bindir}/kinit
+ install -m 755 usr/dash/static/sh ${D}${base_bindir}/sh
+ install -m 755 usr/kinit/static/kinit ${D}${base_bindir}/kinit
install -m 755 usr/gzip/gzip ${D}${base_bindir}
ln -s gzip ${D}${base_bindir}/gunzip
ln -s gzip ${D}${base_bindir}/zcat
@@ -50,7 +50,7 @@ EXTRA_KLIBC_DEPS = "${@oe.utils.conditional('KLIBC_UTILS_VARIANT', 'shared', '${
PACKAGES_DYNAMIC += "^${KLIBC_UTILS_PKGNAME}-.*"
-python populate_packages_prepend () {
+python populate_packages:prepend () {
base_bin_dir = d.expand('${base_bindir}')
do_split_packages(d, base_bin_dir, '(.*)', '${KLIBC_UTILS_PKGNAME}-%s', 'Klibc util for %s', extra_depends='${EXTRA_KLIBC_DEPS}', allow_links=True, allow_dirs=True)
base_sbin_dir = d.expand('${base_sbindir}')
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.4.bb b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.13.bb
index 06e71cb7b8..2f26093cbe 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.4.bb
+++ b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.13.bb
@@ -3,7 +3,7 @@ SUMMARY = "klibc utils for initramfs"
FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
PACKAGES = "${PN}"
-FILES_${PN} = ""
+FILES:${PN} = ""
KLIBC_UTILS_VARIANT = "shared"
KLIBC_UTILS_PKGNAME = "klibc-utils"
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
index be01c2f58d..6093e19b7c 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
+++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
@@ -2,37 +2,39 @@ DESCRIPTION = "klibc is intended to be a minimalistic libc subset for \
use with initramfs. It is deliberately written for small size, \
minimal entaglement, and portability, not speed."
SECTION = "libs"
-LICENSE = "BSD-3-Clause & GPL-2.0 & MIT & Zlib"
+LICENSE = "BSD-3-Clause & GPL-2.0-only & MIT & Zlib"
LIC_FILES_CHKSUM = "file://usr/klibc/LICENSE;md5=d75181f10e998c21eb147f6d2e43ce8b"
DEPENDS = "linux-libc-headers perl-native"
-SRCREV = "4d19974d7020488f63651244e1f9f51727c3f66c"
-SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \
+SRC_URI = "${KERNELORG_MIRROR}/linux/libs/klibc/2.0/klibc-${PV}.tar.xz \
${ARMPATCHES} \
- file://klibc-linux-libc-dev.patch \
- file://staging.patch \
file://klcc-consider-sysroot.patch \
file://klcc-cross-accept-clang-options.patch \
- file://0001-dash-Specify-format-string-in-fmtstr.patch \
file://0001-Define-in_-structs-for-non-glibc-system-libs.patch \
file://0001-include-linux-sysinfo.h-directly.patch \
file://0001-mkfifo-Implement-mkfifo.patch \
file://0001-always-use-bfd-linker.patch \
- file://0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch \
- file://0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch \
file://0001-arm-Do-not-set-a-fallback-march-and-mtune.patch \
file://0001-klibc_2.0.4-add-kexec_file_load-syscall.patch \
file://0001-klibc-add-getrandom-syscall.patch \
file://0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch \
+ file://cross-clang.patch \
+ file://0001-workaround-for-overlapping-sections-in-binary.patch \
"
ARMPATCHES ?= ""
-ARMPATCHES_arm = "file://klibc-config-eabi.patch \
+ARMPATCHES:arm = " \
file://armv4-fix-v4bx.patch \
"
+SRC_URI[sha256sum] = "d673a294f742d59368222ff5c38462d81098c55063799de6fb8a7ba3d4af0436"
-S = "${WORKDIR}/git"
+S = "${WORKDIR}/klibc-${PV}"
+
+OPTFLAGS = "${TUNE_CCARGS} -Os -fcommon"
+OPTFLAGS:append = " ${DEBUG_PREFIX_MAP}"
+OPTFLAGS:append:toolchain-clang = " -fno-builtin-bcmp"
+OPTFLAGS:append:toolchain-clang:mipsarch = " -no-integrated-as"
PARALLEL_MAKE = ""
EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
@@ -44,11 +46,9 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
'INSTALLDIR=${libdir}/klibc' \
'SHLIBDIR=${libdir}' \
'${KLIBCTHUMB}' \
- 'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \
+ 'KLIBCOPTFLAGS=${OPTFLAGS}' \
V=1 \
"
-EXTRA_OEMAKE += "'EXTRA_KLIBCAFLAGS=${SECURITY_CFLAGS} -Wa,--noexecstack' \
- 'EXTRA_KLIBCLDFLAGS=${SECURITY_LDFLAGS} -z noexecstack'"
export FIX_ARMV4_EABI_BX = "${FIX_V4BX}"
KLIBCTHUMB = "${@['CONFIG_KLIBC_THUMB=n', 'CONFIG_KLIBC_THUMB=y'][(d.getVar('ARM_INSTRUCTION_SET') == 'thumb')]}"
@@ -57,25 +57,22 @@ do_configure () {
ln -sf "${STAGING_DIR_TARGET}${exec_prefix}" linux
}
-do_compile_prepend_toolchain-clang() {
+do_compile:prepend:toolchain-clang() {
sed -i -e 's#$(KLIBCROSS)gcc#$(KLIBCROSS)clang#g' ${S}/Makefile
}
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-INSANE_SKIP_${PN} = "already-stripped"
-INSANE_SKIP_libklibc-dev = "dev-elf"
+INSANE_SKIP:${PN} = "already-stripped"
+INSANE_SKIP:libklibc-dev = "dev-elf"
KLIBC_ARCH = "${TARGET_ARCH}"
-KLIBC_ARCH_aarch64 = "arm64"
-KLIBC_ARCH_armeb = "arm"
-KLIBC_ARCH_mipsel = "mips"
-KLIBC_ARCH_x86 = "i386"
-KLIBC_ARCH_x86-64 = "x86_64"
-KLIBC_ARCH_powerpc = "ppc"
-KLIBC_ARCH_powerpc64 = "ppc64"
+KLIBC_ARCH:aarch64 = "arm64"
+KLIBC_ARCH:armeb = "arm"
+KLIBC_ARCH:mipsel = "mips"
+KLIBC_ARCH:mips64el = "mips64"
+KLIBC_ARCH:x86 = "i386"
+KLIBC_ARCH:x86-64 = "x86_64"
+KLIBC_ARCH:powerpc = "ppc"
+KLIBC_ARCH:powerpc64 = "ppc64"
+KLIBC_ARCH:powerpc64le = "ppc64"
THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})"
-
-GCCPIE ?= ""
-SECURITY_LDFLAGS = "${@'-z relro -z now -pie' if '${GCCPIE}' else ''}"
-SECURITY_LDFLAGS_mips = ""
-SECURITY_LDFLAGS_mips64 = ""
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.4.bb b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.13.bb
index bc80f382fe..8dda9a8cdc 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.4.bb
+++ b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.13.bb
@@ -10,13 +10,15 @@ do_install() {
install -d ${D}${libdir}
install -m 755 usr/klibc/klibc-*.so ${D}${libdir}
(cd ${D}${libdir}; ln -s klibc-*.so klibc.so)
+ rm -rf ${D}${exec_prefix}/man
+ rm -rf ${D}${libdir}/klibc/bin
}
PACKAGES = "libklibc libklibc-staticdev libklibc-dev"
-FILES_libklibc = "${libdir}/klibc-*.so"
-FILES_libklibc-staticdev = "${libdir}/klibc/lib/libc.a"
-FILES_libklibc-dev = "${libdir}/klibc.so \
+FILES:libklibc = "${libdir}/klibc-*.so"
+FILES:libklibc-staticdev = "${libdir}/klibc/lib/libc.a"
+FILES:libklibc-dev = "${libdir}/klibc.so \
${libdir}/klibc/lib/* \
${libdir}/klibc/include/* \
"
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-2.0.2/0001-make-Add-compiler-includes-in-cflags.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-2.0.2/0001-make-Add-compiler-includes-in-cflags.patch
new file mode 100644
index 0000000000..778d830128
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-2.0.2/0001-make-Add-compiler-includes-in-cflags.patch
@@ -0,0 +1,32 @@
+From 884ec4c654f1d07a387fdc1dae5640606369f254 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 6 Feb 2021 10:56:36 -0800
+Subject: [PATCH] make: Add compiler includes in cflags
+
+Fixes
+ In file included from ../git/ubi-utils/ubiformat.c:47:
+| ../git/include/common.h:22:10: fatal error: 'stdbool.h' file not found
+| #include <stdbool.h>
+| ^~~~~~~~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 5a6e77c..f0003d5 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -9,6 +9,7 @@ endif
+ if WITHOUT_LZO
+ AM_CPPFLAGS += -DWITHOUT_LZO
+ endif
++AM_CPPFLAGS += -I$(shell $(CC) -print-file-name=include)
+
+ sbin_PROGRAMS =
+ sbin_SCRIPTS =
+--
+2.30.0
+
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb
index 0475cbeaee..43ddb82a00 100644
--- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb
@@ -1,29 +1,31 @@
SUMMARY = "UBI utils statically compiled against klibc"
DESCRIPTION = "Small sized tools from mtd-utils for use with initramfs."
SECTION = "base"
-DEPENDS = "zlib lzo e2fsprogs util-linux"
+DEPENDS = "zlib e2fsprogs util-linux"
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
-LICENSE = "GPLv2+"
+LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
inherit autotools pkgconfig klibc
SRCREV = "64f61a9dc71b158c7084006cbce4ea23886f0b47"
-SRC_URI = "git://git.infradead.org/mtd-utils.git \
+SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \
file://0001-libmissing.h-fix-klibc-build-when-using-glibc-toolch.patch \
file://0002-Instead-of-doing-preprocessor-magic-just-output-off_.patch \
file://0003-Makefile.am-only-build-ubi-utils.patch \
file://0004-mtd-utils-common.h-no-features.h-for-klibc-builds.patch \
file://0005-common.h-replace-getline-with-fgets.patch \
+ file://0001-make-Add-compiler-includes-in-cflags.patch \
"
-S = "${WORKDIR}/git/"
+S = "${WORKDIR}/git"
EXTRA_OECONF += "--disable-tests --without-jffs --without-ubifs"
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
PACKAGECONFIG[xattr] = ",,acl,"
+PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
@@ -37,16 +39,16 @@ PACKAGES =+ "mtdinfo-klibc ubiattach-klibc ubiblock-klibc ubicrc32-klibc ubideta
ubiformat-klibc ubimkvol-klibc ubinfo-klibc ubinize-klibc ubirename-klibc \
ubirmvol-klibc ubirsvol-klibc ubiupdatevol-klibc"
-FILES_mtdinfo-klibc = "${sbindir}/mtdinfo"
-FILES_ubiattach-klibc = "${sbindir}/ubiattach"
-FILES_ubiblock-klibc = "${sbindir}/ubiblock"
-FILES_ubicrc32-klibc = "${sbindir}/ubicrc32"
-FILES_ubidetach-klibc = "${sbindir}/ubidetach"
-FILES_ubiformat-klibc = "${sbindir}/ubiformat"
-FILES_ubimkvol-klibc = "${sbindir}/ubimkvol"
-FILES_ubinfo-klibc = "${sbindir}/ubinfo"
-FILES_ubinize-klibc = "${sbindir}/ubinize"
-FILES_ubirename-klibc = "${sbindir}/ubirename"
-FILES_ubirmvol-klibc = "${sbindir}/ubirmvol"
-FILES_ubirsvol-klibc = "${sbindir}/ubirsvol"
-FILES_ubiupdatevol-klibc = "${sbindir}/ubiupdatevol"
+FILES:mtdinfo-klibc = "${sbindir}/mtdinfo"
+FILES:ubiattach-klibc = "${sbindir}/ubiattach"
+FILES:ubiblock-klibc = "${sbindir}/ubiblock"
+FILES:ubicrc32-klibc = "${sbindir}/ubicrc32"
+FILES:ubidetach-klibc = "${sbindir}/ubidetach"
+FILES:ubiformat-klibc = "${sbindir}/ubiformat"
+FILES:ubimkvol-klibc = "${sbindir}/ubimkvol"
+FILES:ubinfo-klibc = "${sbindir}/ubinfo"
+FILES:ubinize-klibc = "${sbindir}/ubinize"
+FILES:ubirename-klibc = "${sbindir}/ubirename"
+FILES:ubirmvol-klibc = "${sbindir}/ubirmvol"
+FILES:ubirsvol-klibc = "${sbindir}/ubirsvol"
+FILES:ubiupdatevol-klibc = "${sbindir}/ubiupdatevol"
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0001-force-static-build.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0001-force-static-build.patch
index 4744e7a35b..34826baed9 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0001-force-static-build.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0001-force-static-build.patch
@@ -1,4 +1,4 @@
-From d6af515cfcc8185f423860f80ff28719975b701f Mon Sep 17 00:00:00 2001
+From 2a62d7623e3d4c0eaa44434ab678274fe3a9edb1 Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Wed, 11 Apr 2018 22:51:00 +0200
Subject: [PATCH] force static build
@@ -11,7 +11,7 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
-index 54c206f..79188d8 100644
+index fb01134..dbf1fb6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -47,7 +47,7 @@ TARGET_CFLAGS = @TARGET_CFLAGS@
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0002-Adjust-the-order-of-headers-to-fix-build-for-musl.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0002-Adjust-the-order-of-headers-to-fix-build-for-musl.patch
index 1d96a2b3db..ec456f382b 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0002-Adjust-the-order-of-headers-to-fix-build-for-musl.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0002-Adjust-the-order-of-headers-to-fix-build-for-musl.patch
@@ -1,4 +1,4 @@
-From 0976d2d5be1ed44c2324b609c7d16c1e93181c4b Mon Sep 17 00:00:00 2001
+From 6843cefb1d1d0017a714a2752bb008efd844f3e4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 13 Jul 2017 16:20:08 -0700
Subject: [PATCH] Adjust the order of headers to fix build for musl
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0003-kexec-elf-rel-use-our-elf.h.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0003-kexec-elf-rel-use-our-elf.h.patch
index ae9e7bbc48..32035ca128 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0003-kexec-elf-rel-use-our-elf.h.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0003-kexec-elf-rel-use-our-elf.h.patch
@@ -1,4 +1,4 @@
-From 7f91875d65778154709e4fa0ccb23f3b2a98b0dc Mon Sep 17 00:00:00 2001
+From 7e202ea55e8dd803278d9d1eac7ffd355344d6be Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Wed, 11 Apr 2018 22:51:00 +0200
Subject: [PATCH] kexec-elf-rel: use our elf.h
@@ -56,7 +56,7 @@ index 1acbd86..a60c66c 100644
#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 5f8e3f2..765bf6e 100644
+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 @@
@@ -67,7 +67,7 @@ index 5f8e3f2..765bf6e 100644
#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 7fdde73..cd5d729 100644
+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 @@
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0004-kexec-elf-exec.c-replace-with-our-err.h.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0004-kexec-elf-exec.c-replace-with-our-err.h.patch
index 1080e8bb56..27a1cc7a56 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0004-kexec-elf-exec.c-replace-with-our-err.h.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0004-kexec-elf-exec.c-replace-with-our-err.h.patch
@@ -1,4 +1,4 @@
-From 8b9da93ac9a4ea79ae953f80f6fe6e4f080341f2 Mon Sep 17 00:00:00 2001
+From 720e24029fca7dcd8e1cd0b556f37aa1dc2b8fe8 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Tue, 17 Apr 2018 10:57:23 +0200
Subject: [PATCH] kexec-elf-exec.c: replace with our elf.h
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0005-crashdump-elf.c-work-around-for-sysconf-_SC_NPROCESS.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0005-crashdump-elf.c-work-around-for-sysconf-_SC_NPROCESS.patch
index 4f7506d44c..4604c2a5b7 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0005-crashdump-elf.c-work-around-for-sysconf-_SC_NPROCESS.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0005-crashdump-elf.c-work-around-for-sysconf-_SC_NPROCESS.patch
@@ -1,4 +1,4 @@
-From 1cfee75d9662c3382bb7cb8f1c952333837598ae Mon Sep 17 00:00:00 2001
+From 43fb9cec1749b337bfa252fc2c1b0288847e8fa7 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Wed, 18 Apr 2018 02:21:30 +0200
Subject: [PATCH] crashdump-elf.c: work around for _SC_NPROCESSORS_CONF
@@ -18,7 +18,7 @@ Upstream-Status: Inappropriate [klibc specific]
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
- kexec/crashdump-elf.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ kexec/crashdump-elf.c | 92 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0006-kexec-syscall.h-work-around-missing-syscall-wrapper.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0006-kexec-syscall.h-work-around-missing-syscall-wrapper.patch
index 3020f767ad..a607ce777e 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0006-kexec-syscall.h-work-around-missing-syscall-wrapper.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0006-kexec-syscall.h-work-around-missing-syscall-wrapper.patch
@@ -1,4 +1,4 @@
-From 45a80fe7d247898d83edfeabe32b9de80a50a6be Mon Sep 17 00:00:00 2001
+From ab24f236cbc0aa8a3eadde5d71d9d7ea1d979a51 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Fri, 31 Aug 2018 11:33:51 +0200
Subject: [PATCH] kexec-syscall.h: work around missing syscall() wrapper
@@ -16,10 +16,10 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 21 insertions(+)
diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
-index 33638c2..204007d 100644
+index b96e02a..2a3794d 100644
--- a/kexec/kexec-syscall.h
+++ b/kexec/kexec-syscall.h
-@@ -74,11 +74,16 @@
+@@ -77,11 +77,16 @@
struct kexec_segment;
@@ -36,7 +36,7 @@ index 33638c2..204007d 100644
static inline int is_kexec_file_load_implemented(void) {
if (__NR_kexec_file_load != 0xffffffff)
-@@ -86,6 +91,21 @@ static inline int is_kexec_file_load_implemented(void) {
+@@ -89,6 +94,21 @@ static inline int is_kexec_file_load_implemented(void) {
return 0;
}
@@ -58,7 +58,7 @@ index 33638c2..204007d 100644
static inline long kexec_file_load(int kernel_fd, int initrd_fd,
unsigned long cmdline_len, const char *cmdline_ptr,
unsigned long flags)
-@@ -93,6 +113,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
+@@ -96,6 +116,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
return (long) syscall(__NR_kexec_file_load, kernel_fd, initrd_fd,
cmdline_len, cmdline_ptr, flags);
}
@@ -66,6 +66,3 @@ index 33638c2..204007d 100644
#define KEXEC_ON_CRASH 0x00000001
#define KEXEC_PRESERVE_CONTEXT 0x00000002
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0007-kexec.c-add-guard-around-ENOTSUP.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0007-kexec.c-add-guard-around-ENOTSUP.patch
index 3d44683936..0ae90016d0 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0007-kexec.c-add-guard-around-ENOTSUP.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0007-kexec.c-add-guard-around-ENOTSUP.patch
@@ -1,4 +1,4 @@
-From e6bd7a1bcfbd3e54efc81fbd7d60d915f9af0632 Mon Sep 17 00:00:00 2001
+From 17e9da8d3c3c69f84e11c0457bd9fb8c4ee4274b Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Tue, 17 Apr 2018 11:35:14 +0200
Subject: [PATCH] kexec.c: add guard around ENOTSUP
@@ -16,10 +16,10 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 2 insertions(+)
diff --git a/kexec/kexec.c b/kexec/kexec.c
-index 313d9fe..b5a8a1e 100644
+index 32ae56c..0764e85 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
-@@ -1501,6 +1501,7 @@ int main(int argc, char *argv[])
+@@ -1517,6 +1517,7 @@ int main(int argc, char *argv[])
*/
case -EINVAL:
case -ENOEXEC:
@@ -27,7 +27,7 @@ index 313d9fe..b5a8a1e 100644
/*
* ENOTSUP can be unsupported image
* type or unsupported PE signature
-@@ -1513,6 +1514,7 @@ int main(int argc, char *argv[])
+@@ -1529,6 +1530,7 @@ int main(int argc, char *argv[])
* kernel bug
*/
case -ENOTSUP:
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0008-kexec.c-replace-mising-BLKGETSIZE64.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0008-kexec.c-replace-mising-BLKGETSIZE64.patch
index cfc51cf7f3..0ab7a1d71e 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0008-kexec.c-replace-mising-BLKGETSIZE64.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0008-kexec.c-replace-mising-BLKGETSIZE64.patch
@@ -1,4 +1,4 @@
-From 12c7b09c3152f2b3475d081691a26bd1a5633256 Mon Sep 17 00:00:00 2001
+From 30b61da180286643bea68b09b092744346011801 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Tue, 17 Apr 2018 11:38:42 +0200
Subject: [PATCH] kexec.c: replace missing BLKGETSIZE64
@@ -16,10 +16,10 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/kexec/kexec.c b/kexec/kexec.c
-index b5a8a1e..7842f8b 100644
+index 0764e85..157c577 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
-@@ -54,6 +54,10 @@
+@@ -55,6 +55,10 @@
#define KEXEC_LOADED_PATH "/sys/kernel/kexec_loaded"
#define KEXEC_CRASH_LOADED_PATH "/sys/kernel/kexec_crash_loaded"
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch
index df980b118e..8bc473cb00 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch
@@ -1,4 +1,4 @@
-From ad598a71ffff6f86462211f252ac0c7b5de53869 Mon Sep 17 00:00:00 2001
+From 20e2c61fc04a291250acee649c2523d2546cedea Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Tue, 17 Apr 2018 13:14:12 +0200
Subject: [PATCH] vmcore-dmesg.c: work around missing imaxdiv()
@@ -18,7 +18,7 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
-index e340ef4..1b27b71 100644
+index 7972788..c63ac4f 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -575,8 +575,11 @@ static void dump_dmesg_structured(int fd)
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0010-fs2dt.c-work-around-missing-getline.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0010-fs2dt.c-work-around-missing-getline.patch
index cff1485e5e..4652f10a6e 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0010-fs2dt.c-work-around-missing-getline.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0010-fs2dt.c-work-around-missing-getline.patch
@@ -1,4 +1,4 @@
-From edefda702d906d472ee7a675f6b506d5cfca7ac8 Mon Sep 17 00:00:00 2001
+From 14d4dbd293c75bc81a0dde6e678f9bbefb40b6f1 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Tue, 17 Apr 2018 13:48:25 +0200
Subject: [PATCH] fs2dt.c: work around missing getline()
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch
index 636151bee9..07fa841ccc 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch
@@ -1,19 +1,18 @@
-From 9b6866b106eb3ad11115bd591a23e65a68dd847d Mon Sep 17 00:00:00 2001
+From b6ebe05dc389b9457e3707401411fd075230b10e Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Tue, 21 Aug 2018 16:31:44 +0200
-Subject: [PATCH 11/11] purgatory Makefile: adapt to klcc
+Subject: [PATCH] purgatory Makefile: adapt to klcc
Upstream-Status: Inappropriate [klibc specific]
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+
---
purgatory/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
-diff --git a/purgatory/Makefile b/purgatory/Makefile
-index 49ce80a..72eefaa 100644
--- a/purgatory/Makefile
+++ b/purgatory/Makefile
-@@ -47,7 +47,7 @@ purgatory/sha256.o: $(srcdir)/util_lib/sha256.c
+@@ -47,7 +47,7 @@ purgatory/sha256.o: $(srcdir)/util_lib/s
$(PURGATORY): CC=$(TARGET_CC)
$(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \
$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
@@ -22,17 +21,14 @@ index 49ce80a..72eefaa 100644
-fno-zero-initialized-in-bss \
-fno-PIC -fno-PIE -fno-stack-protector
-@@ -59,8 +59,8 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
+@@ -59,8 +59,8 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATO
-Iinclude \
-I$(shell $(CC) -print-file-name=include)
$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
- -Wl,--no-undefined -nostartfiles -nostdlib \
- -nodefaultlibs -e purgatory_start -r \
-+ -Wl,--no-undefined -Wl,-no-pie -Wl,-nostartfiles -Wl,-nostdlib \
-+ -Wl,-nodefaultlibs -Wl,--entry=purgatory_start -Wl,-r \
++ -Wl,--no-undefined -no-pie -nostartfiles -nostdlib \
++ -nodefaultlibs -Wl,--entry=purgatory_start -Wl,-r \
-Wl,-Map=$(PURGATORY_MAP)
$(PURGATORY): $(PURGATORY_OBJS)
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0012-purgatory-string.c-avoid-inclusion-of-string.h.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0012-purgatory-string.c-avoid-inclusion-of-string.h.patch
index 20934da898..db0d763178 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0012-purgatory-string.c-avoid-inclusion-of-string.h.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0012-purgatory-string.c-avoid-inclusion-of-string.h.patch
@@ -1,4 +1,4 @@
-From 2d2ad16f9328a7cbb3f5b8479ae93eb923a0727f Mon Sep 17 00:00:00 2001
+From 9bb386018257e1e18ffe0e925201946515b31080 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Thu, 19 Apr 2018 00:28:14 +0200
Subject: [PATCH] purgatory/string.c: avoid inclusion of string.h
@@ -26,6 +26,3 @@ index f06c460..c5e978a 100644
size_t strnlen(const char *s, size_t max)
{
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0013-sha256.h-avoid-inclusion-of-sys-types.h.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0013-sha256.h-avoid-inclusion-of-sys-types.h.patch
index 5d1664f76b..777cbcf94f 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0013-sha256.h-avoid-inclusion-of-sys-types.h.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0013-sha256.h-avoid-inclusion-of-sys-types.h.patch
@@ -1,4 +1,4 @@
-From ec6000b9f287e62cb0746e26cfa4372c7ea528f4 Mon Sep 17 00:00:00 2001
+From 60098810e1c04be677794bff6a3935011af98934 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Thu, 19 Apr 2018 23:26:43 +0200
Subject: [PATCH] sha256.h: avoid inclusion of sys/types.h
@@ -31,6 +31,3 @@ index 467fb22..40fd3ed 100644
#include <stdint.h>
typedef struct
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0014-add-if_nameindex-from-musl.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0014-add-if_nameindex-from-musl.patch
index ad21266987..eca01b956c 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0014-add-if_nameindex-from-musl.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0014-add-if_nameindex-from-musl.patch
@@ -1,7 +1,7 @@
-From b15e9610b4ab52c381e712241d50dea96d50d873 Mon Sep 17 00:00:00 2001
+From 04eec97b390621f2b3794b0d774b77429eb88cfd Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Wed, 2 May 2018 23:14:19 +0200
-Subject: [PATCH 14/14] add if_nameindex from musl
+Subject: [PATCH] add if_nameindex from musl
Taken from musl, minimal changes.
klibc lacks struct and func
@@ -20,10 +20,13 @@ to fix :
#define __bitwise __bitwise__
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+
---
+Upstream-Status: Pending
+
kexec/Makefile | 2 +-
- kexec/if_nameindex.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- kexec/if_nameindex.h | 15 ++++++++++++
+ kexec/if_nameindex.c | 64 ++++++++++++++++++++++++++++++++++++++++++++
+ kexec/if_nameindex.h | 15 +++++++++++
kexec/ifdown.c | 3 +++
4 files changed, 83 insertions(+), 1 deletion(-)
create mode 100644 kexec/if_nameindex.c
@@ -114,7 +117,7 @@ index 0000000..e586e41
+}
diff --git a/kexec/if_nameindex.h b/kexec/if_nameindex.h
new file mode 100644
-index 0000000..1725fbd
+index 0000000..cf1c061
--- /dev/null
+++ b/kexec/if_nameindex.h
@@ -0,0 +1,15 @@
@@ -147,6 +150,3 @@ index 82c6141..cc3ca9f 100644
/*
* First, we find all shaper devices and down them. Then we
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0015-vmcore-dmesg-fix-warning.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0015-vmcore-dmesg-fix-warning.patch
index 0b88b94c6e..044a70d93b 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0015-vmcore-dmesg-fix-warning.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0015-vmcore-dmesg-fix-warning.patch
@@ -1,17 +1,20 @@
-From 3294266c6a875c5009065c1ae5d0b86200c4147c Mon Sep 17 00:00:00 2001
+From a2679731a56748de58a4cf0a46b7a15d75543a88 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Sun, 29 Apr 2018 00:52:31 +0200
-Subject: [PATCH 6/6] vmcore-dmesg: fix warning
+Subject: [PATCH] vmcore-dmesg: fix warning
# define __bitwise
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+
---
+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 e340ef4..91e4789 100644
+index c63ac4f..a4e3014 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -2,6 +2,9 @@
@@ -24,6 +27,3 @@ index e340ef4..91e4789 100644
#include <endian.h>
#include <byteswap.h>
#include <stdio.h>
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/140-mips_disable_devicetree_support.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/140-mips_disable_devicetree_support.patch
new file mode 100644
index 0000000000..031efb6275
--- /dev/null
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/140-mips_disable_devicetree_support.patch
@@ -0,0 +1,158 @@
+From 7bd94a64cd5424e74ad49dbda65a15e83670268f Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Mon, 17 Dec 2018 11:25:20 +0100
+Subject: [PATCH] kexec-tools: fix non-device tree devices on mips
+
+Add additional argument '--no-dtb' which disables device tree
+search in currently loaded kernel.
+
+Taken from LEDE-DEV:
+https://patchwork.ozlabs.org/patch/852961/
+
+Rebased for kexec-tools 2.0.18
+Removed ppc change (unwanted ?)
+
+Signed-off-by: Konstantin Kuzov <master.nosferatu@gmail.com>
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+
+---
+Upstream-Status: Pending
+
+ kexec/arch/mips/include/arch/options.h | 4 +-
+ kexec/arch/mips/kexec-elf-mips.c | 58 ++++++++++++++------------
+ kexec/arch/mips/kexec-mips.c | 4 ++
+ kexec/arch/mips/kexec-mips.h | 1 +
+ 4 files changed, 39 insertions(+), 28 deletions(-)
+
+--- a/kexec/arch/mips/include/arch/options.h
++++ b/kexec/arch/mips/include/arch/options.h
+@@ -5,6 +5,7 @@
+ #define OPT_APPEND (OPT_ARCH_MAX+0)
+ #define OPT_DTB (OPT_ARCH_MAX+1)
+ #define OPT_RAMDISK (OPT_ARCH_MAX+2)
++#define OPT_NO_DTB (OPT_ARCH_MAX+3)
+
+ /* Options relevant to the architecture (excluding loader-specific ones),
+ * in this case none:
+@@ -14,7 +15,8 @@
+ {"command-line", 1, 0, OPT_APPEND}, \
+ {"append", 1, 0, OPT_APPEND}, \
+ {"dtb", 1, 0, OPT_DTB }, \
+- {"initrd", 1, 0, OPT_RAMDISK },
++ {"initrd", 1, 0, OPT_RAMDISK }, \
++ {"no-dtb", 0, 0, OPT_NO_DTB },
+
+
+ #define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR ""
+--- a/kexec/arch/mips/kexec-elf-mips.c
++++ b/kexec/arch/mips/kexec-elf-mips.c
+@@ -141,45 +141,49 @@ int elf_mips_load(int argc, char **argv,
+ else
+ cmdline_addr = 0;
+
+- /* MIPS systems that have been converted to use device tree
+- * passed through UHI will use commandline in the DTB and
+- * the DTB passed as a separate buffer. Note that
+- * CMDLINE_PREFIX is skipped here intentionally, as it is
+- * used only in the legacy method */
+-
+- if (arch_options.dtb_file) {
+- dtb_buf = slurp_file(arch_options.dtb_file, &dtb_length);
+- } else {
+- create_flatten_tree(&dtb_buf, &dtb_length, cmdline_buf + strlen(CMDLINE_PREFIX));
+- }
+-
+- if (arch_options.initrd_file) {
+- initrd_buf = slurp_file(arch_options.initrd_file, &initrd_size);
+
+- /* Create initrd entries in dtb - although at this time
+- * they would not point to the correct location */
+- dtb_set_initrd(&dtb_buf, &dtb_length, initrd_buf, initrd_buf + initrd_size);
+-
+- initrd_base = add_buffer(info, initrd_buf, initrd_size,
+- initrd_size, sizeof(void *),
+- _ALIGN_UP(kernel_addr + kernel_size + dtb_length,
+- pagesize), 0x0fffffff, 1);
+-
+- /* Now that the buffer for initrd is prepared, update the dtb
+- * with an appropriate location */
+- dtb_set_initrd(&dtb_buf, &dtb_length, initrd_base, initrd_base + initrd_size);
++ if (!arch_options.no_dtb) {
++ /* MIPS systems that have been converted to use device tree
++ * passed through UHI will use commandline in the DTB and
++ * the DTB passed as a separate buffer. Note that
++ * CMDLINE_PREFIX is skipped here intentionally, as it is
++ * used only in the legacy method */
++
++ if (arch_options.dtb_file) {
++ dtb_buf = slurp_file(arch_options.dtb_file, &dtb_length);
++ } else {
++ create_flatten_tree(&dtb_buf, &dtb_length, cmdline_buf + strlen(CMDLINE_PREFIX));
++ }
++
++ if (arch_options.initrd_file) {
++ initrd_buf = slurp_file(arch_options.initrd_file, &initrd_size);
++
++ /* Create initrd entries in dtb - although at this time
++ * they would not point to the correct location */
++ dtb_set_initrd(&dtb_buf, &dtb_length, (off_t)initrd_buf, (off_t)initrd_buf + initrd_size);
++
++ initrd_base = add_buffer(info, initrd_buf, initrd_size,
++ initrd_size, sizeof(void *),
++ _ALIGN_UP(kernel_addr + kernel_size + dtb_length,
++ pagesize), 0x0fffffff, 1);
++
++ /* Now that the buffer for initrd is prepared, update the dtb
++ * with an appropriate location */
++ dtb_set_initrd(&dtb_buf, &dtb_length, initrd_base, initrd_base + initrd_size);
++ }
+ }
+
+-
+ /* This is a legacy method for commandline passing used
+ * currently by Octeon CPUs only */
+ add_buffer(info, cmdline_buf, sizeof(cmdline_buf),
+ sizeof(cmdline_buf), sizeof(void *),
+ cmdline_addr, 0x0fffffff, 1);
+
+- add_buffer(info, dtb_buf, dtb_length, dtb_length, 0,
+- _ALIGN_UP(kernel_addr + kernel_size, pagesize),
+- 0x0fffffff, 1);
++ if (!arch_options.no_dtb) {
++ add_buffer(info, dtb_buf, dtb_length, dtb_length, 0,
++ _ALIGN_UP(kernel_addr + kernel_size, pagesize),
++ 0x0fffffff, 1);
++ }
+
+ return 0;
+ }
+--- a/kexec/arch/mips/kexec-mips.c
++++ b/kexec/arch/mips/kexec-mips.c
+@@ -89,6 +89,7 @@ void arch_usage(void)
+ " --append=STRING Set the kernel command line to STRING.\n"
+ " --dtb=FILE Use FILE as the device tree blob.\n"
+ " --initrd=FILE Use FILE as initial ramdisk.\n"
++ " --no-dtb Don't try to find device tree\n"
+ );
+ }
+
+@@ -121,6 +122,9 @@ int arch_process_options(int argc, char
+ case OPT_RAMDISK:
+ arch_options.initrd_file = optarg;
+ break;
++ case OPT_NO_DTB:
++ arch_options.no_dtb = 1;
++ break;
+ default:
+ break;
+ }
+--- a/kexec/arch/mips/kexec-mips.h
++++ b/kexec/arch/mips/kexec-mips.h
+@@ -22,6 +22,7 @@ struct arch_options_t {
+ char *dtb_file;
+ char *initrd_file;
+ int core_header_type;
++ int no_dtb;
+ };
+
+ extern struct memory_ranges usablemem_rgns;
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/Fix-building-on-x86_64-with-binutils-2.41.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/Fix-building-on-x86_64-with-binutils-2.41.patch
new file mode 100644
index 0000000000..4894f044fc
--- /dev/null
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/Fix-building-on-x86_64-with-binutils-2.41.patch
@@ -0,0 +1,95 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Michel Lind <salimma@fedoraproject.org>
+Date: Tue, 30 Jan 2024 04:14:31 -0600
+Subject: [PATCH] Fix building on x86_64 with binutils 2.41
+
+Newer versions of the GNU assembler (observed with binutils 2.41) will
+complain about the ".arch i386" in files assembled with "as --64",
+with the message "Error: 64bit mode not supported on 'i386'".
+
+Fix by moving ".arch i386" below the relevant ".code32" directive, so
+that the assembler is no longer expecting 64-bit instructions to be used
+by the time that the ".arch i386" directive is encountered.
+
+Based on similar iPXE fix:
+https://github.com/ipxe/ipxe/commit/6ca597eee
+
+Signed-off-by: Michel Lind <michel@michel-slm.name>
+Signed-off-by: Simon Horman <horms@kernel.org>
+
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?h=main&id=328de8e00e298f00d7ba6b25dc3950147e9642e6]
+Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
+---
+ purgatory/arch/i386/entry32-16-debug.S | 2 +-
+ purgatory/arch/i386/entry32-16.S | 2 +-
+ purgatory/arch/i386/entry32.S | 2 +-
+ purgatory/arch/i386/setup-x86.S | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/purgatory/arch/i386/entry32-16-debug.S b/purgatory/arch/i386/entry32-16-debug.S
+index 5167944..12e1164 100644
+--- a/purgatory/arch/i386/entry32-16-debug.S
++++ b/purgatory/arch/i386/entry32-16-debug.S
+@@ -25,10 +25,10 @@
+ .globl entry16_debug_pre32
+ .globl entry16_debug_first32
+ .globl entry16_debug_old_first32
+- .arch i386
+ .balign 16
+ entry16_debug:
+ .code32
++ .arch i386
+ /* Compute where I am running at (assumes esp valid) */
+ call 1f
+ 1: popl %ebx
+diff --git a/purgatory/arch/i386/entry32-16.S b/purgatory/arch/i386/entry32-16.S
+index c051aab..eace095 100644
+--- a/purgatory/arch/i386/entry32-16.S
++++ b/purgatory/arch/i386/entry32-16.S
+@@ -20,10 +20,10 @@
+ #undef i386
+ .text
+ .globl entry16, entry16_regs
+- .arch i386
+ .balign 16
+ entry16:
+ .code32
++ .arch i386
+ /* Compute where I am running at (assumes esp valid) */
+ call 1f
+ 1: popl %ebx
+diff --git a/purgatory/arch/i386/entry32.S b/purgatory/arch/i386/entry32.S
+index f7a494f..8ce9e31 100644
+--- a/purgatory/arch/i386/entry32.S
++++ b/purgatory/arch/i386/entry32.S
+@@ -20,10 +20,10 @@
+ #undef i386
+
+ .text
+- .arch i386
+ .globl entry32, entry32_regs
+ entry32:
+ .code32
++ .arch i386
+
+ /* Setup a gdt that should that is generally usefully */
+ lgdt %cs:gdt
+diff --git a/purgatory/arch/i386/setup-x86.S b/purgatory/arch/i386/setup-x86.S
+index 201bb2c..a212eed 100644
+--- a/purgatory/arch/i386/setup-x86.S
++++ b/purgatory/arch/i386/setup-x86.S
+@@ -21,10 +21,10 @@
+ #undef i386
+
+ .text
+- .arch i386
+ .globl purgatory_start
+ purgatory_start:
+ .code32
++ .arch i386
+
+ /* Load a gdt so I know what the segment registers are */
+ lgdt %cs:gdt
+--
+2.39.2
+
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64-crashdump-arm64.c-fix-warning.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64-crashdump-arm64.c-fix-warning.patch
index 24be4dd76d..a3b7789eba 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64-crashdump-arm64.c-fix-warning.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64-crashdump-arm64.c-fix-warning.patch
@@ -1,7 +1,7 @@
-From 6f69f489a442b3a192e4c08748ee8c4d31c75dae Mon Sep 17 00:00:00 2001
+From 3fd4db2ce1710f45eb297ae6b2c10726b33204f3 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Sun, 29 Apr 2018 00:46:16 +0200
-Subject: [PATCH 5/6] arm64: crashdump-arm64.c: fix warning
+Subject: [PATCH] arm64: crashdump-arm64.c: fix warning
from ../git/kexec/kexec.h:6,
from ../git/kexec/arch/arm64/crashdump-arm64.c:18:
@@ -11,7 +11,10 @@ ng: "__bitwise" redefined
# define __bitwise
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+
---
+Upstream-Status: Pending
+
kexec/arch/arm64/crashdump-arm64.c | 3 +++
1 file changed, 3 insertions(+)
@@ -29,6 +32,3 @@ index 4fd7aa8..890d88f 100644
#include <linux/elf.h>
#include "kexec.h"
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-arm64.c-workaround-for-getrandom-syscall.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-arm64.c-workaround-for-getrandom-syscall.patch
index b22ac3aca4..df7b0a7782 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-arm64.c-workaround-for-getrandom-syscall.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-arm64.c-workaround-for-getrandom-syscall.patch
@@ -1,4 +1,4 @@
-From 10afeecd10499fbd64b2c68d3b076c6906df441f Mon Sep 17 00:00:00 2001
+From a99fc685214452aedabf9ac105bb99357006aa26 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Wed, 5 Sep 2018 17:07:48 +0200
Subject: [PATCH] kexec-arm64.c: workaround for getrandom() syscall
@@ -15,15 +15,15 @@ and
| ../git/kexec/arch/arm64/kexec-arm64.c:499:12: warning: implicit declaration of function 'getrandom'; did you mean 'srandom'? [-Wimplicit-function-declaration]
| result = getrandom(&fdt_val64,
-
Upstream-Status: Inappropriate [klibc specific]
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+
---
kexec/arch/arm64/kexec-arm64.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
-index 7a12479..8a7f5c5 100644
+index b143e86..88d4168 100644
--- a/kexec/arch/arm64/kexec-arm64.c
+++ b/kexec/arch/arm64/kexec-arm64.c
@@ -16,7 +16,11 @@
@@ -54,8 +54,5 @@ index 7a12479..8a7f5c5 100644
+ GRND_NONBLOCK);
+#endif
if(result == -1) {
- dbgprintf("%s: Reading random bytes failed.\n",
+ fprintf(stderr, "%s: Reading random bytes failed.\n",
__func__);
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-image-header.h-add-missing-le64toh.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-image-header.h-add-missing-le64toh.patch
index 7decbac4fb..cdcecdf41e 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-image-header.h-add-missing-le64toh.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm64_kexec-image-header.h-add-missing-le64toh.patch
@@ -1,7 +1,7 @@
-From af7d06a753a4c377b7ffe587da67a6ba56048bea Mon Sep 17 00:00:00 2001
+From c5e7928217ee73640d25c6471c4619601cb1ba19 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Thu, 19 Apr 2018 10:47:17 +0200
-Subject: [PATCH 2/2] kexec/arm64: image-header.h: add macro for le64toh
+Subject: [PATCH] kexec/arm64: image-header.h: add macro for le64toh
Fix
@@ -35,6 +35,3 @@ index 158d411..10ed2d6 100644
/**
* struct arm64_image_header - arm64 kernel image header.
*
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch
index c6afdfae71..89a5d34c83 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch
@@ -1,15 +1,18 @@
-From 06b0d43c20f7c6200902d4c6db3d33416877f71c Mon Sep 17 00:00:00 2001
+From edf186f45d543e318400195cc25175387ff3f5c4 Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Sun, 26 Aug 2018 21:40:06 +0200
-Subject: [PATCH 1/1] arm- backport from oe-core
+Subject: [PATCH] arm- backport from oe-core
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+
---
+Upstream-Status: Pending
+
kexec/arch/arm/crashdump-arm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
-index 2530b29..af2600d 100644
+index daa4788..3f72b38 100644
--- a/kexec/arch/arm/crashdump-arm.c
+++ b/kexec/arch/arm/crashdump-arm.c
@@ -240,6 +240,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
@@ -39,6 +42,3 @@ index 2530b29..af2600d 100644
crash_kernel_mem.start,
crash_kernel_mem.end, -1, 0);
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump.patch
index 95962636e5..2d1d64db1c 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump.patch
@@ -1,4 +1,4 @@
-From 6dae4752a53973c152b3e91e8a4ca74a486dae8b Mon Sep 17 00:00:00 2001
+From 8ee92bc915d650e188caaa3df0a798ac2002f64e Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Wed, 11 Apr 2018 22:51:00 +0200
Subject: [PATCH] use our elf.h header
@@ -17,7 +17,7 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
-index daa4788..2530b29 100644
+index 3f72b38..af2600d 100644
--- a/kexec/arch/arm/crashdump-arm.c
+++ b/kexec/arch/arm/crashdump-arm.c
@@ -21,7 +21,7 @@
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/include_next.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/include_next.patch
new file mode 100644
index 0000000000..29ea1d9f18
--- /dev/null
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/include_next.patch
@@ -0,0 +1,24 @@
+Upstream-Status: Pending
+
+--- a/kexec/Makefile
++++ b/kexec/Makefile
+@@ -110,7 +110,7 @@ $(KEXEC): $(KEXEC_OBJS) $(UTIL_LIB)
+ @$(MKDIR) -p $(@D)
+ $(LINK.o) -o $@ $^ $(CFLAGS) $(LIBS)
+
+-$(KEXEC): CPPFLAGS+=-I$(srcdir)/kexec/arch/$(ARCH)/include
++$(KEXEC): CPPFLAGS+=-I$(srcdir)/kexec/arch/$(ARCH)/include -I$(shell $(CC) -print-file-name=include)
+
+ kexec/fs2dt.o: CPPFLAGS+=$($(ARCH)_FS2DT_INCLUDE)
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -46,7 +46,7 @@ TARGET_CFLAGS = @TARGET_CFLAGS@
+ # Base compiler flags. These are extended by the subcomponent-Makefiles
+ # where necessary.
+ CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -I$(srcdir)/util_lib/include \
+- -Iinclude/ $($(ARCH)_CPPFLAGS)
++ -Iinclude/ $($(ARCH)_CPPFLAGS) -I$(shell $(CC) -print-file-name=include)
+ CFLAGS = @CFLAGS@ -static -fno-strict-aliasing -Wall -Wstrict-prototypes
+ PURGATORY_EXTRA_CFLAGS = @PURGATORY_EXTRA_CFLAGS@
+ ASFLAGS = @ASFLAGS@ $($(ARCH)_ASFLAGS)
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/kexec-x32.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/kexec-x32.patch
index 26d18eb6fe..3c2594a5d0 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/kexec-x32.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/kexec-x32.patch
@@ -1,4 +1,10 @@
-x86_64: Add support to build kexec-tools with x32 ABI
+From fd40eee42273220fb0050fe10744b10067adc0a7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Fri, 31 Aug 2018 17:31:50 +0200
+Subject: [PATCH] x86_64: Add support to build kexec-tools with x32 ABI
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
Summary of changes,
@@ -21,11 +27,11 @@ Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
purgatory/arch/x86_64/Makefile | 4 +++-
4 files changed, 20 insertions(+), 1 deletion(-)
-Index: kexec-tools-2.0.10/configure.ac
-===================================================================
---- kexec-tools-2.0.10.orig/configure.ac
-+++ kexec-tools-2.0.10/configure.ac
-@@ -56,6 +56,15 @@ case $target_cpu in
+diff --git a/configure.ac b/configure.ac
+index e05d601..c428146 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -54,6 +54,15 @@ case $target_cpu in
;;
ia64|x86_64|alpha|m68k )
ARCH="$target_cpu"
@@ -41,11 +47,11 @@ Index: kexec-tools-2.0.10/configure.ac
;;
* )
AC_MSG_ERROR([unsupported architecture $target_cpu])
-Index: kexec-tools-2.0.10/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
-+++ kexec-tools-2.0.10/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
-@@ -8,7 +8,11 @@ int machine_verify_elf_rel(struct mem_eh
+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 761a4ed..1c0e3f8 100644
+--- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
++++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
+@@ -8,7 +8,11 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr)
if (ehdr->ei_data != ELFDATA2LSB) {
return 0;
}
@@ -57,10 +63,10 @@ Index: kexec-tools-2.0.10/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
return 0;
}
if (ehdr->e_machine != EM_X86_64) {
-Index: kexec-tools-2.0.10/kexec/kexec-syscall.h
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/kexec-syscall.h
-+++ kexec-tools-2.0.10/kexec/kexec-syscall.h
+diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
+index 2a3794d..3e67078 100644
+--- a/kexec/kexec-syscall.h
++++ b/kexec/kexec-syscall.h
@@ -31,8 +31,12 @@
#define __NR_kexec_load 268
#endif
@@ -74,11 +80,11 @@ Index: kexec-tools-2.0.10/kexec/kexec-syscall.h
#ifdef __s390x__
#define __NR_kexec_load 277
#endif
-Index: kexec-tools-2.0.10/purgatory/arch/x86_64/Makefile
-===================================================================
---- kexec-tools-2.0.10.orig/purgatory/arch/x86_64/Makefile
-+++ kexec-tools-2.0.10/purgatory/arch/x86_64/Makefile
-@@ -23,4 +23,6 @@ x86_64_PURGATORY_SRCS += purgatory/arch/
+diff --git a/purgatory/arch/x86_64/Makefile b/purgatory/arch/x86_64/Makefile
+index 7300937..4af11e4 100644
+--- a/purgatory/arch/x86_64/Makefile
++++ b/purgatory/arch/x86_64/Makefile
+@@ -23,4 +23,6 @@ x86_64_PURGATORY_SRCS += purgatory/arch/i386/console-x86.c
x86_64_PURGATORY_SRCS += purgatory/arch/i386/vga.c
x86_64_PURGATORY_SRCS += purgatory/arch/i386/pic.c
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch
new file mode 100644
index 0000000000..1c58e92b35
--- /dev/null
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch
@@ -0,0 +1,23 @@
+From 9c99b0748dd0ea1aaf3836378ee75fa5af099a19 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Mar 2019 00:22:40 -0700
+
+---
+Upstream-Status: Pending
+
+ kexec/kexec.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kexec/kexec.c b/kexec/kexec.c
+index 157c577..5da0d67 100644
+--- a/kexec/kexec.c
++++ b/kexec/kexec.c
+@@ -901,7 +901,7 @@ static int my_exec(void)
+ if (xen_present())
+ xen_kexec_exec();
+ else
+- reboot(LINUX_REBOOT_CMD_KEXEC);
++ reboot(LINUX_REBOOT_CMD_KEXEC, NULL);
+ /* I have failed if I make it here */
+ fprintf(stderr, "kexec failed: %s\n",
+ strerror(errno));
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc-purgatory-Makefile-remove-unknown-flags.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc-purgatory-Makefile-remove-unknown-flags.patch
index c3b2071bcd..8fb9f443aa 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc-purgatory-Makefile-remove-unknown-flags.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc-purgatory-Makefile-remove-unknown-flags.patch
@@ -1,8 +1,7 @@
-From 709dfe457c07aa0275f3da14634cbce5cf1029dc Mon Sep 17 00:00:00 2001
+From 3683b3f3e318fa711f6018f154d950c51d5b597a Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Thu, 19 Apr 2018 19:26:53 +0200
-Subject: [PATCH 3/3] powerpc/purgatory: Makefile: remove unknown flags for
- powerpc
+Subject: [PATCH] powerpc/purgatory: Makefile: remove unknown flags for powerpc
Fix
@@ -12,6 +11,7 @@ Fix
Upstream-Status: Inappropriate [klibc specific]
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+
---
purgatory/arch/ppc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -29,6 +29,3 @@ index c85c58a..cd44a16 100644
dist += purgatory/arch/ppc/Makefile $(ppc_PURGATORY_SRCS) \
purgatory/arch/ppc/purgatory-ppc.h purgatory/arch/ppc/ppc_asm.h
---
-2.7.4
-
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch
index dc97d930e9..67a3cac1fa 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch
@@ -1,4 +1,4 @@
-From b19b68eab567aa534cf8dec79fe18e3dc0e14043 Mon Sep 17 00:00:00 2001
+From 6fec72bd7264478c214169b0f30f649304bd39ea Mon Sep 17 00:00:00 2001
From: Quanyang Wang <quanyang.wang@windriver.com>
Date: Tue, 16 Jun 2015 12:59:57 +0800
Subject: [PATCH] powerpc: change the memory size limit
@@ -16,15 +16,16 @@ locate_hole failed
Upstream-Status: Pending
Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
+
---
kexec/arch/ppc/kexec-ppc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: kexec-tools-2.0.10/kexec/arch/ppc/kexec-ppc.h
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/arch/ppc/kexec-ppc.h
-+++ kexec-tools-2.0.10/kexec/arch/ppc/kexec-ppc.h
-@@ -42,7 +42,7 @@ void dol_ppc_usage(void);
+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);
* During inital setup the kernel does not map the whole memory but a part of
* it. On Book-E that is 64MiB, 601 24MiB or 256MiB (if possible).
*/
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_basename.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_basename.patch
index 0d0ed23c90..568f19758a 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_basename.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_basename.patch
@@ -1,4 +1,4 @@
-From 5f47c30759684cea9a7a409646686c1a358b78ac Mon Sep 17 00:00:00 2001
+From 7823956149c78e1996c567d1965803456df090f8 Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Wed, 11 Apr 2018 22:51:05 +0200
Subject: [PATCH] replace basename() with sscanf()
@@ -13,7 +13,7 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
-index 6c7d260..7850083 100644
+index 6cda12c..5514c1c 100644
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -304,9 +304,9 @@ static int add_edd_entry(struct x86_linux_param_header *real_mode,
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_kexec_test.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_kexec_test.patch
index 1c471f5593..ecb0d85e26 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_kexec_test.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_kexec_test.patch
@@ -1,4 +1,4 @@
-From 9de68ec5af8db2eff352f12da28145fe5e96244d Mon Sep 17 00:00:00 2001
+From e26fe77b0ac9acc2c8086586d267aa7160969d2d Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Wed, 11 Apr 2018 22:51:05 +0200
Subject: [PATCH] do not build test
@@ -14,7 +14,7 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
-index fb01134..440730d 100644
+index dbf1fb6..440730d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -173,8 +173,8 @@ PSRCS:=$(foreach s, $(SRCS), $(PACKAGE_NAME)-$(PACKAGE_VERSION)/$(s))
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_sys_io.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_sys_io.patch
index 493f298a99..ef9a411b5c 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_sys_io.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_sys_io.patch
@@ -1,4 +1,4 @@
-From a992ee014efacdc98d5658be9930dcab0eaadfd7 Mon Sep 17 00:00:00 2001
+From 444160260a11022ecd84cd605fe8c22b316e6546 Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Wed, 11 Apr 2018 22:51:04 +0200
Subject: [PATCH] i386: replace with our io.h
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_vfscanf.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_vfscanf.patch
index 2f0ad2ea45..af8467a239 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_vfscanf.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/x86_vfscanf.patch
@@ -1,4 +1,4 @@
-From 423c3f6f41fe04f4512e2a97a130f072d53dd4cf Mon Sep 17 00:00:00 2001
+From c6934455ec2337e6da7ea9fbc3486ce9beeb5d82 Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Wed, 11 Apr 2018 22:51:05 +0200
Subject: [PATCH] x86-linux-setup.c: replace vfscanf() with vsscanf()
@@ -13,7 +13,7 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
-index 7850083..e190356 100644
+index 5514c1c..bdb28c6 100644
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -200,6 +200,8 @@ static int file_scanf(const char *dir, const char *file, const char *scanf_line,
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
index 25f5da48da..363cdb9adf 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
@@ -1,22 +1,23 @@
# the binaries are statically linked against klibc
SUMMARY = "Kexec tools, statically compiled against klibc"
-AUTHOR = "Eric Biederman"
HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
SECTION = "kernel/userland"
-LICENSE = "GPLv2"
+LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
-PV = "2.0.17+git${SRCPV}"
+PV = "2.0.18+git"
DEPENDS = "zlib xz"
-inherit klibc autotools
+inherit klibc autotools siteinfo
-SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
-SRCREV = "b9de21ef51a7ceab7122a707c188602eae22c4ee"
+SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git;branch=master"
+SRCREV = "5750980cdbbc33ef75bfba6660295b932376ce15"
BUILD_PATCHES = "file://0001-force-static-build.patch \
- file://0002-Adjust-the-order-of-headers-to-fix-build-for-musl.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 += " \
file://0003-kexec-elf-rel-use-our-elf.h.patch \
@@ -31,7 +32,10 @@ KLIBC_PATCHES += " \
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://0015-vmcore-dmesg-fix-warning.patch \
+ file://klibc-reboot.patch \
+ file://include_next.patch \
+ "
WARNING_FIXES = ""
FROM_OE_CORE = "file://arm_crashdump-fix-buffer-align.patch \
@@ -40,19 +44,22 @@ FROM_OE_CORE = "file://arm_crashdump-fix-buffer-align.patch \
SRC_URI += "${BUILD_PATCHES} ${KLIBC_PATCHES} ${WARNING_FIXES} ${FROM_OE_CORE}"
-SRC_URI_append_arm = " file://arm_crashdump.patch"
+SRC_URI:append:arm = " file://arm_crashdump.patch"
-SRC_URI_append_x86 = " file://x86_sys_io.patch file://x86_basename.patch \
+SRC_URI:append:mips = " file://140-mips_disable_devicetree_support.patch"
+SRC_URI:append:mipsel = " file://140-mips_disable_devicetree_support.patch"
+
+SRC_URI:append:x86 = " file://x86_sys_io.patch file://x86_basename.patch \
file://x86_vfscanf.patch file://x86_kexec_test.patch"
-SRC_URI_append_x86-64 = " file://x86_sys_io.patch file://x86_basename.patch \
+SRC_URI:append:x86-64 = " file://x86_sys_io.patch file://x86_basename.patch \
file://x86_vfscanf.patch file://x86_kexec_test.patch"
-SRC_URI_append_aarch64 = " file://arm64_kexec-image-header.h-add-missing-le64toh.patch \
+SRC_URI:append:aarch64 = " file://arm64_kexec-image-header.h-add-missing-le64toh.patch \
file://arm64-crashdump-arm64.c-fix-warning.patch \
file://arm64_kexec-arm64.c-workaround-for-getrandom-syscall.patch"
-SRC_URI_append_powerpc = " file://powerpc-purgatory-Makefile-remove-unknown-flags.patch"
+SRC_URI:append:powerpc = " file://powerpc-purgatory-Makefile-remove-unknown-flags.patch"
S = "${WORKDIR}/git"
@@ -60,16 +67,10 @@ EXTRA_OECONF += "--without-zlib --without-lzma --without-xen"
# fix purgatory/printf.c:2:10: fatal error: limits.h: No such file or directory
# fix include/limits.h:42:10: fatal error: bitsize/limits.h: No such file or directory
-COMMON_CFLAGS += "-O2 -I${STAGING_DIR_HOST}${libdir}/klibc/include -I${S}/purgatory/include"
-CFLAGS_x86_append = " ${COMMON_CFLAGS} -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits32"
-CFLAGS_x86-64_append = " ${COMMON_CFLAGS} -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits64"
-CFLAGS_arm_append = " ${COMMON_CFLAGS} -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits32"
-CFLAGS_aarch64_append = "${COMMON_CFLAGS} -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits64"
-CFLAGS_mips_append = " ${COMMON_CFLAGS} -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits32"
-CFLAGS_mips64_append = " ${COMMON_CFLAGS} -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits64"
-CFLAGS_powerpc_append = " ${COMMON_CFLAGS} -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits32"
-
-do_compile_prepend() {
+CFLAGS += "-O2 -I${STAGING_DIR_HOST}${libdir}/klibc/include -I${S}/purgatory/include \
+ -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits${SITEINFO_BITS}"
+
+do_compile:prepend() {
# Remove the prepackaged config.h from the source tree as it overrides
# the same file generated by configure and placed in the build tree
rm -f ${S}/include/config.h
@@ -86,9 +87,9 @@ do_compile_prepend() {
PACKAGES =+ "kexec-klibc vmcore-dmesg-klibc"
-FILES_kexec-klibc = "${sbindir}/kexec"
-FILES_vmcore-dmesg-klibc = "${sbindir}/vmcore-dmesg"
+FILES:kexec-klibc = "${sbindir}/kexec"
+FILES:vmcore-dmesg-klibc = "${sbindir}/vmcore-dmesg"
-INSANE_SKIP_${PN} = "arch"
+INSANE_SKIP:${PN} = "arch"
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'