mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-04 21:51:46 +00:00
- Use multi-stage builds - Use a single Dockerfile for all kernels Kernel version and series are passed in as arguments - Use a separate kernel config per kernel version These have been copied from kernel_config and ran through oldconfig to tidy them up - Rename patch directories - Refactor the Makefile to use a template - Allows building of all kernels without arguments to make - Use git tree hash as the image tag - Don't build the image if the tag already exists Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Linux kernel builds, based on mostly-vanilla upstream Linux kernels.
See ../docs/kernel-patches.md for how the local patches in patches-*
are maintained.
The build is mostly silent. A local build can be run via make. To view
the output use docker log -f <containerid>. The build creates multiple
containers, so multiple invocations may be necessary. To view the full build
output one may also invoke docker build . and then copy the build artefacts
from the image afterwards.
To build with various debug options enabled, build the kernel with
make DEBUG=1. The options enabled are listed in kernel_config.debug.
This allocates a significant amount of memory on boot and you may need to
adjust the kernel config on some systems. Specifically:
--- a/alpine/kernel/kernel_config
+++ b/alpine/kernel/kernel_config
@@ -415,8 +415,8 @@ CONFIG_DMI=y
# CONFIG_CALGARY_IOMMU is not set
CONFIG_SWIOTLB=y
CONFIG_IOMMU_HELPER=y
-CONFIG_MAXSMP=y
-CONFIG_NR_CPUS=8192
+CONFIG_MAXSMP=n
+CONFIG_NR_CPUS=8
# CONFIG_SCHED_SMT is not set
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set