From 0bd5089fdf976abe0c3c6612c3d1c93b242dba69 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Wed, 10 May 2023 06:52:16 +0000 Subject: [PATCH] overlay sys-kernel: Unify kernel config between coreos-kernel and coreos-modules The kernel config can affect btf generation, and we need btf information to match between the two builds otherwise modules don't load. Accomplish that by including an empty user specified initramfs in the vmlinux built by coreos-modules. This vmlinux file is only used as a base for btf generation, and is discarded after the build. Signed-off-by: Jeremi Piotrowski --- .../sys-kernel/coreos-kernel/coreos-kernel-6.1.27.ebuild | 1 - .../sys-kernel/coreos-modules/coreos-modules-6.1.27.ebuild | 2 ++ .../sys-kernel/coreos-modules/files/commonconfig-6.1 | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/coreos-kernel-6.1.27.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/coreos-kernel-6.1.27.ebuild index 1217ba82cb..a49884384e 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/coreos-kernel-6.1.27.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/coreos-kernel-6.1.27.ebuild @@ -67,7 +67,6 @@ src_prepare() { # Symlink to bootengine.cpio so we can stick with relative paths in .config ln -sv "${SYSROOT%/}"/usr/share/bootengine/bootengine.cpio build/ || die config_update 'CONFIG_INITRAMFS_SOURCE="bootengine.cpio"' - config_update 'CONFIG_INITRAMFS_COMPRESSION_ZSTD=y' # include all intel and amd microcode files, avoiding the signatures local fw_dir="${SYSROOT%/}/lib/firmware" diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/coreos-modules-6.1.27.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/coreos-modules-6.1.27.ebuild index 73f19c25fb..1741f4238e 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/coreos-modules-6.1.27.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/coreos-modules-6.1.27.ebuild @@ -18,10 +18,12 @@ src_prepare() { elog "Building using config ${archconfig} and ${commonconfig}" cat "${archconfig}" "${commonconfig}" >> build/.config || die fi + cpio -ov build/bootengine.cpio # Check that an old pre-ebuild-split config didn't leak in. grep -q "^CONFIG_INITRAMFS_SOURCE=" build/.config && \ die "CONFIG_INITRAMFS_SOURCE must be removed from kernel config" + config_update 'CONFIG_INITRAMFS_SOURCE="bootengine.cpio"' } src_compile() { diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/files/commonconfig-6.1 b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/files/commonconfig-6.1 index b385d7147f..3b822fc8a8 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/files/commonconfig-6.1 +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/files/commonconfig-6.1 @@ -281,6 +281,7 @@ CONFIG_INFINIBAND_OCRDMA=m CONFIG_INFINIBAND_SRP=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INIT_STACK_NONE=y +CONFIG_INITRAMFS_COMPRESSION_ZSTD=y CONFIG_INPUT_EVDEV=m CONFIG_INPUT_MISC=y CONFIG_INPUT_MOUSEDEV=m