projects: run check-kernel-config.sh at kernel build time

Signed-off-by: Tycho Andersen <tycho@docker.com>
This commit is contained in:
Tycho Andersen 2017-05-19 13:52:29 -06:00
parent b97bb70cda
commit e60f9d3946
3 changed files with 5 additions and 1 deletions

1
projects/kernel-config/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
check-kernel-config.sh

View File

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

View File

@ -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) || \