Skip to content

Add kernel-6.18-microvm - #585

Open
ginglis13 wants to merge 3 commits into
bottlerocket-os:developfrom
ginglis13:add-kernel-6.18-microvm
Open

ginglis13 wants to merge 3 commits into
bottlerocket-os:developfrom
ginglis13:add-kernel-6.18-microvm

Conversation

@ginglis13

@ginglis13 ginglis13 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Issue

#606

Description of changes:

Add kernel-6.18-microvm to the kernel-kit. kernel-6.18-microvm is a flavor of kernel-6.18 with a config overlay so a microvm guest can boot a minimal virtio device model. CONFIG_VIRTIO_MMIO=y, CONFIG_VIRTIO_BLK=y, vsock, dm-verity, erofs, serial are built in. kernel-6.18 ships neuron/EFA/GPU/full module set; kernel-6.18-microvm strips much of that.

The source RPM and custom patches are identical to kernel-6.18. These changes also include updates to the config generation for this new kernel package, including diff checks to ensure the 6.18 specific configs don't drift between this new package and kernel-6.18.

For an annotated diff of this new kernel-6.18-microvm vs. kernel-6.18, see https://gist.github.com/ginglis13/6298e4c5a8c2451cabf5059bc2f3b718

Testing done:

See full details of a boot test on x86 and arm via firecracker in this gist: https://gist.github.com/ginglis13/23f052d87050a0e0b4f3e1f3e1b179e5

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@ginglis13
ginglis13 force-pushed the add-kernel-6.18-microvm branch 3 times, most recently from eda0c66 to 5703d82 Compare October 8, 2026 22:05
@ginglis13

Copy link
Copy Markdown
Contributor Author

^ force pushes have been commitlint fixes, bringing SRPM up to latest to match kernel-6.18 and a fix for the aarch64 config that is generated by make full-config

@ginglis13
ginglis13 force-pushed the add-kernel-6.18-microvm branch 2 times, most recently from 1120c6d to e748a6a Compare October 9, 2026 02:33
@ginglis13

ginglis13 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

^ force pushes extract out the shared custom kconfigs to a new package, kernel-6.18-shared-configs, and enumerate packaged modules for kernel-6.18-microvm rather than glob.

@ginglis13
ginglis13 force-pushed the add-kernel-6.18-microvm branch from e748a6a to 4544a11 Compare October 9, 2026 02:38
@ginglis13

Copy link
Copy Markdown
Contributor Author

^ fix tools/latest-kernel-full-config.sh to skip fetch of sources if no url declared in a Cargo.toml in a package: https://github.com/bottlerocket-os/bottlerocket-kernel-kit/compare/e748a6a61b02ca46ad0b5d3ddad12f7a82c616d1..4544a11c22522760bc6e056d56c66f41de5c382c

@ginglis13
ginglis13 force-pushed the add-kernel-6.18-microvm branch from 4544a11 to 65430b0 Compare October 13, 2026 16:38
@ginglis13

Copy link
Copy Markdown
Contributor Author

^ force push fixes License on the new kernel-6.18-shared-configs pkg to be Apache-2.0 OR MIT, matching other 1st party sources shipped in the kernel-kit

@cbgbt

cbgbt commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Hello friends! I'm curious if you'd consider enabling virtio-mem as well?

@cbgbt

cbgbt commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

On second thought, I don't think I need to build virtio-mem directly in. The module is fine. Disregard!

Comment thread packages/kernel-6.18-microvm/config-microvm Outdated
Comment thread packages/kernel-6.18-shared-configs/kernel-6.18-shared-configs.spec
Introduce a kernel-6.18-shared-configs package that ships the base
Bottlerocket kernel configuration fragments (config-bottlerocket and
its per-architecture variants) and installs them into the build
sysroot.

Every 6.18-based kernel can then consume these fragments at build time
via a BuildRequires rather than carrying its own copy. Convert
kernel-6.18 to pull them from the shared package: drop its local
config-bottlerocket{,-x86_64,-aarch64} sources, add the build
dependency, and merge the fragments from %{kernel_configdir} in %prep.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
@ginglis13
ginglis13 force-pushed the add-kernel-6.18-microvm branch from 65430b0 to 6e7c4ac Compare October 28, 2026 23:54
@ginglis13

Copy link
Copy Markdown
Contributor Author

^ force push:

  • DRM fix: ship drm_client_lib.ko (was %excluded). keep the full DRM set modular, matching the shared base (no DRM disable).
  • Dead configs removed: dropped CONFIG_DM_CRYPT=y and CONFIG_INPUT_VIVALDIFMAP=y, which both silently resolved to =m.
  • PS/2 stack is now modular to match base kernel
  • FIPS enabled (match base): removed stale Conflicts: image-feature(fips); added the -fips subpackage, fipsmodules-{x86_64,aarch64} + check-fips-modules.drop-in.conf.in sources, the drop-in install loop, and conditional Requires: %{name}-fips.
  • Conflicts: kernel-6.18 added (both install to the same /boot + /lib/modules paths).
  • SRPM bump to 6.18.56-125.164, patches re-synced to base 6.18 kernel

https://github.com/bottlerocket-os/bottlerocket-kernel-kit/compare/65430b0529ce2b6f899ab7cdc7df1a3c60546638..6e7c4acaf9962c2b2ca1a73eafbd857cbee018be

add a new flavor of the 6.18 kernel to support booting microvms such as
Firecracker.

This flavor reuses the same source, patches and Bottlerocket config
fragments as kernel-6.18, adds config-microvm to build the virtio
transport, network and vsock drivers in, and ships bzImage or
vmlinuz.efi depending on architecture

Include a new config-microvm for setting configuration options specific
to guests so a microvm guest can boot a minimal virtio device model.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
latest-kernel-full-config.sh reconstructed each package directory from
the SRPM's majorminor version (6.18.51 -> 6.18), so two packages that
share a majorminor (kernel-6.18 and kernel-6.18-microvm) could not be
told apart and the microvm flavor never got its own configuration
generated. Pass the actual package directory through merge/validate
instead.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
@ginglis13
ginglis13 force-pushed the add-kernel-6.18-microvm branch from 6e7c4ac to 5f99013 Compare October 29, 2026 00:10
@ginglis13

Copy link
Copy Markdown
Contributor Author

^ force push installs kernel as /boot/vmlinuz regardless of arch, matching what the base 6.18 kernel does https://github.com/bottlerocket-os/bottlerocket-kernel-kit/compare/6e7c4acaf9962c2b2ca1a73eafbd857cbee018be..5f990132a4e1b02871eb05d44647a6c1225439ac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants