From e60f9d3946f0cfe71af66867f95759ababd717f0 Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Fri, 19 May 2017 13:52:29 -0600 Subject: [PATCH] projects: run check-kernel-config.sh at kernel build time Signed-off-by: Tycho Andersen --- projects/kernel-config/.gitignore | 1 + projects/kernel-config/Dockerfile | 3 ++- projects/kernel-config/Makefile | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 projects/kernel-config/.gitignore diff --git a/projects/kernel-config/.gitignore b/projects/kernel-config/.gitignore new file mode 100644 index 000000000..1bc4b71ae --- /dev/null +++ b/projects/kernel-config/.gitignore @@ -0,0 +1 @@ +check-kernel-config.sh diff --git a/projects/kernel-config/Dockerfile b/projects/kernel-config/Dockerfile index 067c2c0f5..346a29443 100644 --- a/projects/kernel-config/Dockerfile +++ b/projects/kernel-config/Dockerfile @@ -13,7 +13,7 @@ RUN cat linux-${KERNEL_VERSION}.tar.xz | tar --absolute-names -xJ && mv /linux- RUN mkdir /config COPY kernel_config.* /config/ -COPY makeconfig.sh /config +COPY *.sh /config/ # Apply local patches COPY patches-${KERNEL_SERIES} /patches @@ -24,6 +24,7 @@ RUN set -e && for patch in /patches/*.patch; do \ done RUN /config/makeconfig.sh ${ARCH} ${KERNEL_SERIES} +RUN /config/check-kernel-config.sh /linux/.config RUN mkdir /out RUN printf "KERNEL_SOURCE=${KERNEL_SOURCE}\n" > /out/kernel-source-info diff --git a/projects/kernel-config/Makefile b/projects/kernel-config/Makefile index 5e666adaf..9462a65b5 100644 --- a/projects/kernel-config/Makefile +++ b/projects/kernel-config/Makefile @@ -35,6 +35,7 @@ sign: # build_4.9.x_dbg and adds "_dbg" to the hub image name. define kernel build_$(2)$(3): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard kernel_config.$(2)*) kernel_config.base kernel_config.$(ARCH) + cp ../../test/pkg/kernel-config/check-kernel-config.sh . docker pull linuxkit/$(IMAGE):$(1)$(3)-$(HASH) || \ docker build \ --build-arg KERNEL_VERSION=$(1) \ @@ -42,6 +43,7 @@ build_$(2)$(3): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard kernel --build-arg ARCH=$(ARCH) \ --build-arg DEBUG=$(3) \ --no-cache -t linuxkit/$(IMAGE):$(1)$(3)-$(HASH) . + -rm check-kernel-config.sh push_$(2)$(3): build_$(2)$(3) docker pull linuxkit/$(IMAGE):$(1)$(3)-$(HASH) || \