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

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 from 5703d82 to 1120c6d Compare October 9, 2026 02:22
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>
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>
@ginglis13
ginglis13 force-pushed the add-kernel-6.18-microvm branch 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.

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

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.

1 participant