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 <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2023-05-10 06:52:16 +00:00 committed by Krzesimir Nowak
parent f4dc89a00a
commit 0bd5089fdf
3 changed files with 3 additions and 1 deletions

View File

@ -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"

View File

@ -18,10 +18,12 @@ src_prepare() {
elog "Building using config ${archconfig} and ${commonconfig}"
cat "${archconfig}" "${commonconfig}" >> build/.config || die
fi
cpio -ov </dev/null >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() {

View File

@ -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