mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-04 10:25:25 +01:00
Upgrade kernel to 4.14.341-openela
This is a continuation of the 4.14 series by the Open Enterprise Linux Alliance, ostensibly to the same maintenance standards as the now discontinued kernel.org LTS. This code is primarily offered as a Git repository, with gz tarballs also available, but no xz versions. Switching back to a gzipped version of the kernel source code would introduce too much srcfs growth, so we use the last kernel.org tar.xz release (4.14.336), and apply OpenELA's changes using a patch generated from the Git repository.
This commit is contained in:
parent
86e1a5e7f6
commit
c75d609cf7
24 changed files with 15503 additions and 10 deletions
4319
steps/linux-4.14.341-openela/files/config
Normal file
4319
steps/linux-4.14.341-openela/files/config
Normal file
File diff suppressed because it is too large
Load diff
68
steps/linux-4.14.341-openela/pass1.sh
Normal file
68
steps/linux-4.14.341-openela/pass1.sh
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space>
|
||||
# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
|
||||
# SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
dirname=linux-4.14.336
|
||||
|
||||
src_unpack() {
|
||||
mkdir "linux-4.14.336"
|
||||
default || true # Predictable link errors - not a problem
|
||||
rm "${DISTFILES}/linux-4.14.336.tar.xz"
|
||||
}
|
||||
|
||||
generate_autoconf_h() {
|
||||
# generate include/linux/autoconf.h -- we do not have gperf rn to do it the normal way
|
||||
mkdir -p include/generated
|
||||
# Transform each of the CONFIG_* options that are =y into header
|
||||
grep -E '=y$' .config | sed 's/=y$/ 1/' | sed 's/^/#define /' >> include/generated/autoconf.h
|
||||
# Transform each of the CONFIG_* options that are unset into headers
|
||||
grep -E ' is not set$' .config | sed 's/ is not set$//' | sed 's/#/#undef/' >> include/generated/autoconf.h
|
||||
# Transform each of the non-boolean options into headers
|
||||
grep -E '=.*$' .config | grep -v -E '=y$' | sed 's/=/ /' | sed 's/^/#define /' >> include/generated/autoconf.h
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
mv config .config
|
||||
mkdir -p include/config
|
||||
cp .config include/config/auto.conf
|
||||
|
||||
generate_autoconf_h
|
||||
|
||||
# Remove shipped files
|
||||
find . -name "*_shipped*" -delete
|
||||
|
||||
# Remove documentation to save space
|
||||
rm -rf Documentation
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cp .config include/config/auto.conf
|
||||
rm include/generated/autoconf.h
|
||||
generate_autoconf_h
|
||||
|
||||
# Allow use of patched initramfs_list.sh (which is required anyway)
|
||||
make "${MAKEJOBS}" ARCH=i386 prepare
|
||||
|
||||
# Build just the vmlinux, because a full build will not fit our ramdisk
|
||||
PATH="${PWD}/usr:${PATH}" make "${MAKEJOBS}" ARCH=i386 vmlinux
|
||||
|
||||
# Clear up more space
|
||||
find . -name '*.o' -not -path './drivers/firmware/efi/libstub/*' -delete
|
||||
|
||||
# Now that we have space, build bzImage, taking care not to rebuild what we've just deleted
|
||||
PATH="${PWD}/usr:${PATH}" make "${MAKEJOBS}" ARCH=i386 -o vmlinux bzImage
|
||||
|
||||
# Clear up one more time
|
||||
find . -name '*.o' -delete
|
||||
rm vmlinux
|
||||
}
|
||||
|
||||
src_install() {
|
||||
install -D -m 644 arch/i386/boot/bzImage "${DESTDIR}/boot/vmlinuz"
|
||||
install -D -m 755 usr/gen_init_cpio "${DESTDIR}${PREFIX}/bin/gen_init_cpio"
|
||||
install -D -m 755 scripts/gen_initramfs_list.sh "${DESTDIR}${PREFIX}/bin/gen_initramfs_list.sh"
|
||||
}
|
||||
15044
steps/linux-4.14.341-openela/patches/4.14.341-openela.patch
Normal file
15044
steps/linux-4.14.341-openela/patches/4.14.341-openela.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,60 @@
|
|||
SPDX-FileCopyrightText: 2022 Sean Christopherson <seanjc@google.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Revert the following patch:
|
||||
From ddfd117714014cebe7b5d008fdec8eaec620cba1 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Christopherson <seanjc@google.com>
|
||||
Date: Wed, 30 Nov 2022 23:36:48 +0000
|
||||
Subject: [PATCH] x86/virt: Force GIF=1 prior to disabling SVM (for reboot
|
||||
flows)
|
||||
|
||||
commit 6a3236580b0b1accc3976345e723104f74f6f8e6 upstream.
|
||||
|
||||
Set GIF=1 prior to disabling SVM to ensure that INIT is recognized if the
|
||||
kernel is disabling SVM in an emergency, e.g. if the kernel is about to
|
||||
jump into a crash kernel or may reboot without doing a full CPU RESET.
|
||||
If GIF is left cleared, the new kernel (or firmware) will be unabled to
|
||||
awaken APs. Eat faults on STGI (due to EFER.SVME=0) as it's possible
|
||||
that SVM could be disabled via NMI shootdown between reading EFER.SVME
|
||||
and executing STGI.
|
||||
|
||||
Link: https://lore.kernel.org/all/cbcb6f35-e5d7-c1c9-4db9-fe5cc4de579a@amd.com
|
||||
Cc: stable@vger.kernel.org
|
||||
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>
|
||||
Cc: Tom Lendacky <thomas.lendacky@amd.com>
|
||||
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
Link: https://lore.kernel.org/r/20221130233650.1404148-3-seanjc@google.com
|
||||
Signed-off-by: Sean Christopherson <seanjc@google.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
arch/x86/include/asm/virtext.h | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86/include/asm/virtext.h b/arch/x86/include/asm/virtext.h
|
||||
index 0116b2ee9e64f..4699acd602af4 100644
|
||||
--- arch/x86/include/asm/virtext.h
|
||||
+++ arch/x86/include/asm/virtext.h
|
||||
@@ -114,21 +114,7 @@ static inline void cpu_svm_disable(void)
|
||||
|
||||
wrmsrl(MSR_VM_HSAVE_PA, 0);
|
||||
rdmsrl(MSR_EFER, efer);
|
||||
- if (efer & EFER_SVME) {
|
||||
- /*
|
||||
- * Force GIF=1 prior to disabling SVM to ensure INIT and NMI
|
||||
- * aren't blocked, e.g. if a fatal error occurred between CLGI
|
||||
- * and STGI. Note, STGI may #UD if SVM is disabled from NMI
|
||||
- * context between reading EFER and executing STGI. In that
|
||||
- * case, GIF must already be set, otherwise the NMI would have
|
||||
- * been blocked, so just eat the fault.
|
||||
- */
|
||||
- asm_volatile_goto("1: stgi\n\t"
|
||||
- _ASM_EXTABLE(1b, %l[fault])
|
||||
- ::: "memory" : fault);
|
||||
-fault:
|
||||
- wrmsrl(MSR_EFER, efer & ~EFER_SVME);
|
||||
- }
|
||||
+ wrmsrl(MSR_EFER, efer & ~EFER_SVME);
|
||||
}
|
||||
|
||||
/** Makes sure SVM is disabled, if it is supported on the CPU
|
||||
9392
steps/linux-4.14.341-openela/patches/deblob.patch
Normal file
9392
steps/linux-4.14.341-openela/patches/deblob.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,22 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
There's something incorrect with this macro for live-bootstrap, most likely as
|
||||
a result of the dodgy installation of linux-headers. However, there is no
|
||||
problem with this, and it is verified that BITS_PER_LONG __BITS_PER_LONG
|
||||
have functional and correct values.
|
||||
|
||||
--- tools/include/asm-generic/bitsperlong.h 2021-07-31 11:50:26.616768608 +1000
|
||||
+++ tools/include/asm-generic/bitsperlong.h 2021-07-31 11:50:36.786847443 +1000
|
||||
@@ -9,10 +9,6 @@
|
||||
#define BITS_PER_LONG __WORDSIZE
|
||||
#endif
|
||||
|
||||
-#if BITS_PER_LONG != __BITS_PER_LONG
|
||||
-#error Inconsistent word size. Check asm/bitsperlong.h
|
||||
-#endif
|
||||
-
|
||||
#ifndef BITS_PER_LONG_LONG
|
||||
#define BITS_PER_LONG_LONG 64
|
||||
#endif
|
||||
24
steps/linux-4.14.341-openela/patches/drm_edid.patch
Normal file
24
steps/linux-4.14.341-openela/patches/drm_edid.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Remove BUILD_BUG_ON check as it causes a link error
|
||||
|
||||
--- drivers/gpu/drm/drm_edid.c.bak 2024-02-16 08:36:01.168832650 +0100
|
||||
+++ drivers/gpu/drm/drm_edid.c 2024-02-16 08:36:58.148828524 +0100
|
||||
@@ -2879,15 +2879,6 @@
|
||||
* get the other variants by simply increasing the
|
||||
* vertical front porch length.
|
||||
*/
|
||||
- BUILD_BUG_ON(edid_cea_modes[8].vtotal != 262 ||
|
||||
- edid_cea_modes[9].vtotal != 262 ||
|
||||
- edid_cea_modes[12].vtotal != 262 ||
|
||||
- edid_cea_modes[13].vtotal != 262 ||
|
||||
- edid_cea_modes[23].vtotal != 312 ||
|
||||
- edid_cea_modes[24].vtotal != 312 ||
|
||||
- edid_cea_modes[27].vtotal != 312 ||
|
||||
- edid_cea_modes[28].vtotal != 312);
|
||||
-
|
||||
if (((vic == 8 || vic == 9 ||
|
||||
vic == 12 || vic == 13) && mode->vtotal < 263) ||
|
||||
((vic == 23 || vic == 24 ||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Name the union in i2c_hid_desc_override, to avoid unknown field error
|
||||
|
||||
--- drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c.bak 2024-02-15 13:27:20.177877726 +0100
|
||||
+++ drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c 2024-02-15 15:11:15.787482938 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
union {
|
||||
struct i2c_hid_desc *i2c_hid_desc;
|
||||
uint8_t *i2c_hid_desc_buffer;
|
||||
- };
|
||||
+ } u;
|
||||
uint8_t *hid_report_desc;
|
||||
unsigned int hid_report_desc_size;
|
||||
uint8_t *i2c_name;
|
||||
@@ -36,6 +36,7 @@
|
||||
*/
|
||||
|
||||
static const struct i2c_hid_desc_override sipodev_desc = {
|
||||
+ .u = {
|
||||
.i2c_hid_desc_buffer = (uint8_t [])
|
||||
{0x1e, 0x00, /* Length of descriptor */
|
||||
0x00, 0x01, /* Version of descriptor */
|
||||
@@ -52,6 +53,7 @@
|
||||
0x06, 0x00, /* Version ID */
|
||||
0x00, 0x00, 0x00, 0x00 /* Reserved */
|
||||
},
|
||||
+ },
|
||||
|
||||
.hid_report_desc = (uint8_t [])
|
||||
{0x05, 0x01, /* Usage Page (Desktop), */
|
||||
@@ -422,7 +424,7 @@
|
||||
if (strcmp(override->i2c_name, i2c_name))
|
||||
return NULL;
|
||||
|
||||
- return override->i2c_hid_desc;
|
||||
+ return override->u.i2c_hid_desc;
|
||||
}
|
||||
|
||||
char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name,
|
||||
17
steps/linux-4.14.341-openela/patches/i915_sw_fence.patch
Normal file
17
steps/linux-4.14.341-openela/patches/i915_sw_fence.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Neuter the __i915_sw_fence_call define, which our gcc can't understand
|
||||
|
||||
--- drivers/gpu/drm/i915/i915_sw_fence.h.bak 2024-02-15 12:21:07.758127759 +0100
|
||||
+++ drivers/gpu/drm/i915/i915_sw_fence.h 2024-02-15 12:22:04.498124232 +0100
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
typedef int (*i915_sw_fence_notify_t)(struct i915_sw_fence *,
|
||||
enum i915_sw_fence_notify state);
|
||||
-#define __i915_sw_fence_call __aligned(4)
|
||||
+#define __i915_sw_fence_call /* __aligned(4) */
|
||||
|
||||
void __i915_sw_fence_init(struct i915_sw_fence *fence,
|
||||
i915_sw_fence_notify_t fn,
|
||||
17
steps/linux-4.14.341-openela/patches/initramfs_list.patch
Normal file
17
steps/linux-4.14.341-openela/patches/initramfs_list.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Use gen_initramfs_list.sh from outside kernel source tree.
|
||||
|
||||
--- scripts/gen_initramfs_list.sh 2021-10-10 20:37:12.220231015 +1100
|
||||
+++ scripts/gen_initramfs_list.sh 2021-10-10 20:37:22.694296140 +1100
|
||||
@@ -310,7 +310,7 @@
|
||||
fi
|
||||
fi
|
||||
cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)"
|
||||
- usr/gen_init_cpio $timestamp ${cpio_list} > ${cpio_tfile}
|
||||
+ gen_init_cpio $timestamp ${cpio_list} > ${cpio_tfile}
|
||||
else
|
||||
cpio_tfile=${cpio_file}
|
||||
fi
|
||||
17
steps/linux-4.14.341-openela/patches/linking.patch
Normal file
17
steps/linux-4.14.341-openela/patches/linking.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
This seemingly useless statement (redefined a couple of lines later) is
|
||||
not liked by our version of binutils.
|
||||
|
||||
--- arch/x86/kernel/vmlinux.lds.S 2021-07-31 18:45:14.787124887 +1000
|
||||
+++ arch/x86/kernel/vmlinux.lds.S 2021-07-31 18:43:16.234180449 +1000
|
||||
@@ -170,7 +170,6 @@
|
||||
. = __vvar_beginning_hack + PAGE_SIZE;
|
||||
} :data
|
||||
|
||||
- . = ALIGN(__vvar_page + PAGE_SIZE, PAGE_SIZE);
|
||||
|
||||
/* Init code and data - will be freed after init */
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
18
steps/linux-4.14.341-openela/patches/regen.patch
Normal file
18
steps/linux-4.14.341-openela/patches/regen.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
We do not use the _shipped version of the keymap generated using loadkeys.
|
||||
For some reason the makefile needs to be patched for this to work...
|
||||
|
||||
--- drivers/tty/vt/Makefile 2021-07-27 21:11:24.743104498 +1000
|
||||
+++ drivers/tty/vt/Makefile 2021-07-27 21:11:34.261186200 +1000
|
||||
@@ -22,7 +22,7 @@
|
||||
# Uncomment if you're changing the keymap and have an appropriate
|
||||
# loadkeys version for the map. By default, we'll use the shipped
|
||||
# versions.
|
||||
-# GENERATE_KEYMAP := 1
|
||||
+GENERATE_KEYMAP := 1
|
||||
|
||||
ifdef GENERATE_KEYMAP
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Our older version of binutils doesn't play very nicely with binutils for a
|
||||
couple of edgecase macros. It seems that ALTERNATIVE is one of these. As we
|
||||
know what your system will be (not Xen), we can manually evaluate and write
|
||||
out the ALTERNATIVEs.
|
||||
|
||||
--- arch/x86/entry/entry_32.S 2021-07-31 11:40:07.458032771 +1000
|
||||
+++ arch/x86/entry/entry_32.S 2021-07-31 11:40:42.835298841 +1000
|
||||
@@ -412,9 +412,8 @@
|
||||
|
||||
movl %esp, %eax
|
||||
call do_fast_syscall_32
|
||||
- /* XEN PV guests always use IRET path */
|
||||
- ALTERNATIVE "testl %eax, %eax; jz .Lsyscall_32_done", \
|
||||
- "jmp .Lsyscall_32_done", X86_FEATURE_XENPV
|
||||
+ testl %eax, %eax
|
||||
+ jz .Lsyscall_32_done
|
||||
|
||||
/* Opportunistic SYSEXIT */
|
||||
TRACE_IRQS_ON /* User mode traces as IRQs on. */
|
||||
--- arch/x86/entry/vdso/vdso32/system_call.S 2021-07-31 11:41:40.379731622 +1000
|
||||
+++ arch/x86/entry/vdso/vdso32/system_call.S 2021-07-31 11:43:40.294633506 +1000
|
||||
@@ -55,8 +55,6 @@
|
||||
/* If SYSENTER (Intel) or SYSCALL32 (AMD) is available, use it. */
|
||||
ALTERNATIVE_2 "", SYSENTER_SEQUENCE, X86_FEATURE_SYSENTER32, \
|
||||
SYSCALL_SEQUENCE, X86_FEATURE_SYSCALL32
|
||||
-#else
|
||||
- ALTERNATIVE "", SYSENTER_SEQUENCE, X86_FEATURE_SEP
|
||||
#endif
|
||||
|
||||
/* Enter using int $0x80 */
|
||||
23
steps/linux-4.14.341-openela/patches/remove-kconfig.patch
Normal file
23
steps/linux-4.14.341-openela/patches/remove-kconfig.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
kconfig uses gperf, which we don't have at this stage. We manually generate
|
||||
everything (in the actual script) that is actually required within kconfig,
|
||||
and forgo everything that is not really required for the build.
|
||||
|
||||
--- Makefile 2021-07-30 21:25:43.577592065 +1000
|
||||
+++ Makefile 2021-07-30 21:26:40.349015612 +1000
|
||||
@@ -547,10 +547,10 @@
|
||||
export KBUILD_DEFCONFIG KBUILD_KCONFIG
|
||||
|
||||
config: scripts_basic outputmakefile FORCE
|
||||
- $(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||
+ $(Q)true
|
||||
|
||||
%config: scripts_basic outputmakefile FORCE
|
||||
- $(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||
+ true
|
||||
|
||||
else
|
||||
# ===========================================================================
|
||||
17
steps/linux-4.14.341-openela/patches/wno-array-bounds.patch
Normal file
17
steps/linux-4.14.341-openela/patches/wno-array-bounds.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Remove -Wno-array-bounds which gcc-4.0.4 doesn't recognize
|
||||
|
||||
--- drivers/net/ethernet/broadcom/Makefile.bak 2024-02-15 17:05:34.617050047 +0100
|
||||
+++ drivers/net/ethernet/broadcom/Makefile 2024-02-15 17:06:06.097047984 +0100
|
||||
@@ -16,8 +16,3 @@
|
||||
obj-$(CONFIG_BGMAC_PLATFORM) += bgmac-platform.o
|
||||
obj-$(CONFIG_SYSTEMPORT) += bcmsysport.o
|
||||
obj-$(CONFIG_BNXT) += bnxt/
|
||||
-
|
||||
-# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
|
||||
-ifndef KBUILD_EXTRA_WARN
|
||||
-CFLAGS_tg3.o += -Wno-array-bounds
|
||||
-endif
|
||||
1
steps/linux-4.14.341-openela/sources
Normal file
1
steps/linux-4.14.341-openela/sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.336.tar.xz 0820fdb7971c6974338081c11fbf2dc869870501e7bdcac4d0ed58ba1f57b61c
|
||||
Loading…
Add table
Add a link
Reference in a new issue