From db108731229dca9585d3cbdefc9bd7ce757b8ff5 Mon Sep 17 00:00:00 2001 From: Gabriel Chabot Date: Tue, 29 Oct 2019 09:26:59 +0100 Subject: [PATCH] Add the possibility to tag linuxkit/kconfig with a custom tag instead of latest KCONFIG_TAG variable can be used to set a custom kconfig tag. If KCONFIG_TAG is not set, the the image is tagged as linuxkit/kconfig:latest This is useful for projects requiring to build multiple kernels that have different patches. When trying to edit an unpatched kernel config after working on a patched kernel config (same kernel version), one had to rerun make kconfig first in order to edit the config of an unpatched kernel. Now it is possible to generate a tegged kconfig image and then, get the wanted config by selecting the corresponding linuxkit/kexec:tag. Signed-off-by: Gabriel Chabot --- kernel/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/Makefile b/kernel/Makefile index 8e062a090..739861797 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -271,6 +271,12 @@ endif # Target for kernel config kconfig: +ifeq (${KCONFIG_TAG},) docker build --no-cache -f Dockerfile.kconfig \ --build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \ -t linuxkit/kconfig . +else + docker build --no-cache -f Dockerfile.kconfig \ + --build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \ + -t linuxkit/kconfig:${KCONFIG_TAG} . +endif