mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
Merge pull request #3971 from deitch/update-alpine-base
bump alpine base for kernel, regenerate configs
This commit is contained in:
commit
6c29f580ae
@ -145,7 +145,7 @@ RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
|
||||
RUN make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
|
||||
( DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdepth 1)) && \
|
||||
cd /tmp/kernel-modules/lib/modules/$DVER && \
|
||||
rm build source && \
|
||||
rm -f build source && \
|
||||
ln -s /usr/src/linux-headers-$DVER build ) && \
|
||||
case $(uname -m) in \
|
||||
aarch64) \
|
||||
|
@ -26,19 +26,27 @@ RUN apk update && apk upgrade -a && \
|
||||
llvm \
|
||||
llvm-dev \
|
||||
llvm-static \
|
||||
llvm17-gtest \
|
||||
luajit-dev \
|
||||
m4 \
|
||||
musl-fts-dev \
|
||||
python3 \
|
||||
py3-pip \
|
||||
xz \
|
||||
zip \
|
||||
zlib-dev \
|
||||
&& true
|
||||
|
||||
# this is just here to make later copies easier; do not forget to change this if the python version updates
|
||||
ENV PYTHON_VERSION=3.11
|
||||
|
||||
RUN ln -s /usr/lib/cmake/llvm10/ /usr/lib/cmake/llvm && \
|
||||
ln -s /usr/include/llvm10/llvm-c/ /usr/include/llvm-c && \
|
||||
ln -s /usr/include/llvm10/llvm/ /usr/include/llvm
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
ENV BCC_COMMIT=14278bf1a52dd76ff66eed02cc9db7c7ec240da6
|
||||
ENV BCC_COMMIT=v0.29.1
|
||||
RUN git clone https://github.com/iovisor/bcc.git && \
|
||||
cd bcc && \
|
||||
git checkout $BCC_COMMIT && \
|
||||
@ -66,10 +74,9 @@ RUN mkdir -p /out/usr/ && \
|
||||
RUN mkdir -p /out/usr/lib && \
|
||||
cp -a /usr/lib/libelf* /out/usr/lib/ && \
|
||||
cp -a /usr/lib/libstdc* /out/usr/lib/ && \
|
||||
cp -a /usr/lib/libintl* /out/usr/lib/ && \
|
||||
cp -a /usr/lib64/* /out/usr/lib/
|
||||
RUN mkdir -p /out/usr/lib/python3.8 && \
|
||||
cp -a /usr/lib/python3.8/site-packages /out/usr/lib/python3.8/
|
||||
cp -a /usr/lib/libintl* /out/usr/lib/
|
||||
RUN mkdir -p /out/usr/lib/python${PYTHON_VERSION} && \
|
||||
cp -a /usr/lib/python${PYTHON_VERSION}/site-packages /out/usr/lib/python${PYTHON_VERSION}/
|
||||
RUN mkdir -p /out/usr/share && \
|
||||
cp -a /usr/share/bcc /out/usr/share/
|
||||
RUN mkdir -p /out/usr/bin && \
|
||||
@ -89,6 +96,6 @@ FROM scratch
|
||||
ENTRYPOINT []
|
||||
CMD []
|
||||
WORKDIR /
|
||||
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib64
|
||||
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
|
||||
COPY --from=mirror /out /
|
||||
COPY --from=build /out /
|
||||
|
@ -15,6 +15,7 @@ RUN apk add \
|
||||
build-base \
|
||||
diffutils \
|
||||
flex \
|
||||
git \
|
||||
gmp-dev \
|
||||
installkernel \
|
||||
kmod \
|
||||
@ -24,17 +25,30 @@ RUN apk add \
|
||||
mpc1-dev \
|
||||
mpfr-dev \
|
||||
python3 \
|
||||
python3-dev \
|
||||
sed \
|
||||
tar \
|
||||
xz \
|
||||
xz-dev \
|
||||
zlib-dev \
|
||||
zlib-static
|
||||
zlib-static \
|
||||
zstd \
|
||||
zstd-static
|
||||
|
||||
COPY --from=ksrc /linux.tar.xz /kernel-headers.tar /
|
||||
RUN tar xf linux.tar.xz && \
|
||||
tar xf kernel-headers.tar
|
||||
|
||||
# download and build libtraceevent.a
|
||||
|
||||
WORKDIR /build
|
||||
ENV LIBTRACE_COMMIT=libtraceevent-1.8.2
|
||||
RUN git clone https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git && \
|
||||
cd libtraceevent && \
|
||||
git checkout $LIBTRACE_COMMIT
|
||||
|
||||
RUN make -C libtraceevent all install V=1
|
||||
|
||||
WORKDIR /linux
|
||||
|
||||
RUN mkdir -p /out && \
|
||||
|
329
kernel/Makefile
329
kernel/Makefile
@ -12,23 +12,20 @@
|
||||
# which is specific to a given kernel. perf packages are tagged the same way
|
||||
# kernel packages.
|
||||
|
||||
RM = rm -f
|
||||
# Name and Org on Hub
|
||||
ORG?=linuxkit
|
||||
PLATFORMS?=linux/amd64,linux/arm64
|
||||
IMAGE?=kernel
|
||||
IMAGE_BCC:=kernel-bcc
|
||||
IMAGE_PERF:=kernel-perf
|
||||
IMAGE_ZFS:=zfs-kmod
|
||||
IMAGE_BUILDER=linuxkit/alpine:2be490394653b7967c250e86fd42cef88de428ba
|
||||
IMAGE_BUILDER=linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e
|
||||
|
||||
# You can specify an extra options for the Makefile. This will:
|
||||
# - append a config$(EXTRA) to the kernel config for your kernel/arch
|
||||
# - append $(EXTRA) to the CONFIG_LOCALVERSION of your kernel
|
||||
EXTRA?=
|
||||
|
||||
# You can enable debug options for the Makefile. This will:
|
||||
# - append a config-dbg to the kernel config for your kernel/arch
|
||||
# - append -dbg to the CONFIG_LOCALVERSION of your kernel
|
||||
DEBUG?=
|
||||
|
||||
ifeq ($(HASH),)
|
||||
@ -44,14 +41,16 @@ endif
|
||||
PUSH_MANIFEST:=$(shell git rev-parse --show-toplevel)/scripts/push-manifest.sh
|
||||
|
||||
ARCH := $(shell uname -m)
|
||||
ifeq ($(ARCH),x86_64)
|
||||
ifeq ($(ARCH),$(filter $(ARCH),x86_64 amd64))
|
||||
SUFFIX=-amd64
|
||||
ARCH=x86_64
|
||||
endif
|
||||
ifeq ($(ARCH),$(filter $(ARCH),aarch64 arm64))
|
||||
SUFFIX=-arm64
|
||||
ARCH=aarch64
|
||||
endif
|
||||
|
||||
TAG=$(HASH)$(DIRTY)
|
||||
HASHTAG=$(HASH)$(DIRTY)
|
||||
|
||||
BUILD_LABEL=--label org.mobyproject.linuxkit.kernel.buildimage=$(IMAGE_BUILDER)
|
||||
|
||||
@ -66,221 +65,127 @@ endif
|
||||
|
||||
LABELS=$(REPO_LABEL) $(COMMIT_LABEL) $(BUILD_LABEL)
|
||||
|
||||
KERNEL_VERSIONS=
|
||||
|
||||
.PHONY: build push
|
||||
# Targets:
|
||||
# build: Builds all kernels
|
||||
# push: Pushes and sign all tagged kernel images to hub
|
||||
build:
|
||||
push:
|
||||
|
||||
.PHONY: notdirty
|
||||
notdirty:
|
||||
@if [ x"$(DIRTY)" != x ]; then echo "Your repository is not clean. Will not push image"; exit 1; fi
|
||||
|
||||
# utility function
|
||||
SPACE := $(eval) $(eval)
|
||||
PERIOD := .
|
||||
series = $(word 1,$(subst ., ,$(1))).$(word 2,$(subst ., ,$(1))).x
|
||||
|
||||
# A template for defining kernel build
|
||||
# Arguments:
|
||||
# $1: Full kernel version, e.g., 4.9.22
|
||||
# $2: Kernel "series", e.g., 4.9.x
|
||||
# $3: Build a specific kernel like -rt: Preempt-RT (used as suffix for image)
|
||||
# This defines targets like:
|
||||
# build_4.9.x and push_4.9.x and adds them as dependencies
|
||||
# to the global targets
|
||||
# Set $3 to "-rt", to build Preempt-RT kernels. This defines targets like
|
||||
# build_4.14.x-rt and adds "-rt" to the hub image name.
|
||||
# Set $4 to "-dbg", to build debug kernels. This defines targets like
|
||||
# build_4.9.x-dbg and adds "-dbg" to the hub image name.
|
||||
# Set $3 to "-rt" and $4 to "-dbg" to build debug Preempt-RT kernel.
|
||||
define kernel
|
||||
# word 1 is the release, word 2 is the tool
|
||||
RELEASESEP := PART
|
||||
toolname = $(word 2, $(subst $(RELEASESEP), ,$(1)))
|
||||
toolkernel = $(word 1, $(subst $(RELEASESEP), ,$(1)))
|
||||
toolimageextension = -$(call toolname,$(1)):$(call toolkernel,$(1))$(EXTRA)$(DEBUG)
|
||||
toolimagebase = $(ORG)/$(IMAGE)$(call toolimageextension,$(1))
|
||||
toolimagehash = $(call toolimagebase,$(1))-$(HASHTAG)$(SUFFIX)
|
||||
toolimagenohash = $(call toolimagebase,$(1))$(SUFFIX)
|
||||
toolkernelimage = $(ORG)/$(IMAGE):$(call toolkernel,$(1))$(EXTRA)$(DEBUG)-$(HASHTAG)$(SUFFIX)
|
||||
baseimageextension = :$(1)$(EXTRA)$(DEBUG)
|
||||
baseimage = $(ORG)/$(IMAGE)$(call baseimageextension,$(1))
|
||||
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
|
||||
cross_product = $(foreach p,$(1),$(addprefix $(p),$(2)))
|
||||
|
||||
ifeq ($(4),)
|
||||
KERNEL_VERSIONS+=$(1)
|
||||
endif
|
||||
|
||||
buildx_$(2)$(3)$(4): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard config-$(2)*) config-dbg
|
||||
docker pull $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG) || \
|
||||
docker buildx build \
|
||||
--platform=$(PLATFORMS) --push \
|
||||
--build-arg KERNEL_VERSION=$(1) \
|
||||
--build-arg KERNEL_SERIES=$(2) \
|
||||
--build-arg EXTRA=$(3) \
|
||||
--build-arg DEBUG=$(4) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
$(LABELS) \
|
||||
--no-cache -t $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG) .
|
||||
|
||||
build_$(2)$(3)$(4): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard config-$(2)*) config-dbg
|
||||
docker pull $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
||||
docker build \
|
||||
--build-arg KERNEL_VERSION=$(1) \
|
||||
--build-arg KERNEL_SERIES=$(2) \
|
||||
--build-arg EXTRA=$(3) \
|
||||
--build-arg DEBUG=$(4) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
$(LABELS) \
|
||||
--no-cache -t $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
|
||||
|
||||
|
||||
forcebuild_$(2)$(3)$(4): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard config-$(2)*) config-dbg
|
||||
docker build \
|
||||
--build-arg KERNEL_VERSION=$(1) \
|
||||
--build-arg KERNEL_SERIES=$(2) \
|
||||
--build-arg EXTRA=$(3) \
|
||||
--build-arg DEBUG=$(4) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
$(LABELS) \
|
||||
--no-cache -t $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
|
||||
|
||||
push_$(2)$(3)$(4): notdirty build_$(2)$(3)$(4)
|
||||
docker pull $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
||||
(docker push $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
|
||||
docker tag $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
docker push $(ORG)/$(IMAGE):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)$(4))
|
||||
|
||||
forcepush_$(2)$(3)$(4): notdirty forcebuild_$(2)$(3)$(4)
|
||||
docker push $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
|
||||
docker tag $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
docker push $(ORG)/$(IMAGE):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)$(4)
|
||||
|
||||
# tag the builder and create the manifest
|
||||
tagbuilder_$(2)$(3)$(4): notdirty
|
||||
docker tag $(IMAGE_BUILDER) $(ORG)/$(IMAGE):$(1)$(3)$(4)-builder$(SUFFIX) && \
|
||||
docker push $(ORG)/$(IMAGE):$(1)$(3)$(4)-builder$(SUFFIX) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)$(4)-builder
|
||||
|
||||
|
||||
show-tag_$(2)$(3)$(4):
|
||||
@echo $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)
|
||||
|
||||
build: build_$(2)$(3)$(4)
|
||||
forcebuild: forcebuild_$(2)$(3)$(4)
|
||||
push: push_image tagbuilder
|
||||
push_image: push_$(2)$(3)$(4)
|
||||
forcepush: forcepush_image tagbuilder
|
||||
forcepush_image: forcepush_$(2)$(3)$(4)
|
||||
tagbuilder: tagbuilder_$(2)$(3)$(4)
|
||||
show-tags: show-tag_$(2)$(3)$(4)
|
||||
|
||||
# Only build perf only on x86 and recent LTS and latest stable kernels
|
||||
ifeq ($(ARCH),x86_64)
|
||||
ifeq ($(2), $(filter $(2),5.15.x 5.10.x 5.4.x))
|
||||
build_perf_$(2)$(3)$(4): build_$(2)$(3)$(4)
|
||||
docker pull $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
||||
docker build -f Dockerfile.perf \
|
||||
--build-arg IMAGE=$(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
--no-cache --network=none $(LABEL) -t $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
|
||||
|
||||
forcebuild_perf_$(2)$(3)$(4): build_$(2)$(3)$(4)
|
||||
docker build -f Dockerfile.perf \
|
||||
--build-arg IMAGE=$(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
--no-cache --network=none $(LABEL) -t $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
|
||||
|
||||
push_perf_$(2)$(3)$(4): notdirty build_perf_$(2)$(3)$(4)
|
||||
docker pull $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
||||
(docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
|
||||
docker tag $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4))
|
||||
|
||||
forcepush_perf_$(2)$(3)$(4): notdirty forcebuild_perf_$(2)$(3)$(4)
|
||||
docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
|
||||
docker tag $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)
|
||||
|
||||
build: build_perf_$(2)$(3)$(4)
|
||||
forcebuild: forcebuild_perf_$(2)$(3)$(4)
|
||||
push: push_perf_$(2)$(3)$(4)
|
||||
forcepush: forcepush_perf_$(2)$(3)$(4)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Only build bcc only on x86 and recent LTS and latest stable kernels
|
||||
ifeq ($(ARCH),x86_64)
|
||||
ifeq ($(2), $(filter $(2),5.15.x 5.10.x 5.4.x))
|
||||
build_bcc_$(2)$(3)$(4): build_$(2)$(3)$(4)
|
||||
docker pull $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
||||
docker build -f Dockerfile.bcc \
|
||||
--build-arg IMAGE=$(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
--no-cache $(LABEL) -t $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
|
||||
|
||||
forcebuild_bcc_$(2)$(3)$(4): build_$(2)$(3)$(4)
|
||||
docker build -f Dockerfile.bcc \
|
||||
--build-arg IMAGE=$(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
--no-cache $(LABEL) -t $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
|
||||
|
||||
push_bcc_$(2)$(3)$(4): notdirty build_bcc_$(2)$(3)$(4)
|
||||
docker pull $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
||||
(docker push $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
|
||||
docker tag $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
docker push $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4))
|
||||
|
||||
forcepush_bcc_$(2)$(3)$(4): notdirty forcebuild_bcc_$(2)$(3)$(4)
|
||||
docker push $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
|
||||
docker tag $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
docker push $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)$(SUFFIX) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)
|
||||
|
||||
build: build_bcc_$(2)$(3)$(4)
|
||||
forcebuild: forcebuild_bcc_$(2)$(3)$(4)
|
||||
push: push_bcc_$(2)$(3)$(4)
|
||||
forcepush: forcepush_bcc_$(2)$(3)$(4)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(4),)
|
||||
# ZFS does not compile against -dbg kernels because CONFIG_DEBUG_LOCK_ALLOC
|
||||
# is incompatible with CDDL, apparently (this is ./configure check)
|
||||
build_zfs_$(2)$(3): build_$(2)$(3)
|
||||
docker pull $(ORG)/$(IMAGE_ZFS):$(1)$(3)-$(TAG)$(SUFFIX) || \
|
||||
docker build -f Dockerfile.zfs \
|
||||
--build-arg IMAGE=$(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
--no-cache $(LABEL) -t $(ORG)/$(IMAGE_ZFS):$(1)$(3)-$(TAG)$(SUFFIX) .
|
||||
|
||||
push_zfs_$(2)$(3): notdirty build_zfs_$(2)$(3)
|
||||
docker pull $(ORG)/$(IMAGE_ZFS):$(1)$(3)-$(TAG)$(SUFFIX) || \
|
||||
(docker push $(ORG)/$(IMAGE_ZFS):$(1)$(3)-$(TAG)$(SUFFIX) && \
|
||||
docker tag $(ORG)/$(IMAGE_ZFS):$(1)$(3)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE_ZFS):$(1)$(3)$(SUFFIX) && \
|
||||
docker push $(ORG)/$(IMAGE_ZFS):$(1)$(3)$(SUFFIX) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_ZFS):$(1)$(3)-$(TAG) && \
|
||||
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_ZFS):$(1)$(3))
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
#
|
||||
# Build Targets
|
||||
# Debug targets only for latest stable and LTS stable
|
||||
#
|
||||
ifeq ($(ARCH),x86_64)
|
||||
$(eval $(call kernel,5.15.27,5.15.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,5.15.27,5.15.x,,-dbg))
|
||||
$(eval $(call kernel,5.10.104,5.10.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,5.4.172,5.4.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,5.11.4,5.11.x,-rt,))
|
||||
# Kernel versions to build.
|
||||
# Use all for kernels to be built on all platforms; use KERNELS_x86_64 or KERNELS_aarch64 for platform-specific kernels
|
||||
KERNELS_all=6.6.13 5.15.27
|
||||
KERNELS_x86_64=
|
||||
KERNELS_aarch64=
|
||||
|
||||
else ifeq ($(ARCH),$(filter $(ARCH),aarch64 arm64))
|
||||
$(eval $(call kernel,5.15.27,5.15.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,5.10.104,5.10.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,5.11.4,5.11.x,-rt,))
|
||||
# deprecated versions. You might still be able to build them, but they are not built by default or supported
|
||||
# Use all for kernels to be built on all platforms; use DEPRECATED_x86_64 or DEPRECATED_aarch64 for platform-specific kernels
|
||||
DEPRECATED_all=5.10.104 5.11.4-rt
|
||||
DEPRECATED_x86_64=5.4.172
|
||||
DEPRECATED_aarch64=
|
||||
|
||||
endif
|
||||
KERNELS?=$(KERNELS_all) $(KERNELS_$(ARCH))
|
||||
DEPRECATED?=$(DEPRECATED_all) $(DEPRECATED_$(ARCH))
|
||||
|
||||
# we build all tools across all platforms and kernels that we build
|
||||
TOOLS=bcc perf
|
||||
|
||||
# kernel versions used for kconfig
|
||||
KERNEL_VERSIONS=$(call uniq,$(foreach l,$(KERNELS),$(word 1,$(subst -, ,$(l)))))
|
||||
|
||||
.PHONY: build push setforce show-tags
|
||||
# Targets:
|
||||
# build: Builds all kernels
|
||||
# push: Pushes and sign all tagged kernel images to hub
|
||||
setforce:
|
||||
$(eval FORCE=1)
|
||||
build: $(addprefix build-,$(KERNELS))
|
||||
push: $(addprefix push-,$(KERNELS))
|
||||
show-tags: $(addprefix show-tag-,$(KERNELS))
|
||||
|
||||
build-%: buildkernel-% buildtools-%;
|
||||
|
||||
buildkernel-%: buildkerneldeps-% buildplainkernel-% builddebugkernel-%;
|
||||
|
||||
buildkerneldeps-%: Dockerfile Makefile $(wildcard patches-$(call series,$*)/*) $(wildcard config-$(call series,$*)*) ;
|
||||
|
||||
buildplainkernel-%: buildkerneldeps-%
|
||||
$(eval BASEIMAGE=$(call baseimage,$*))
|
||||
$(eval TARGETIMAGE=$(BASEIMAGE)-$(HASHTAG)$(SUFFIX))
|
||||
$(eval EXTRATOOL=$(addprefix -,$(word 2,$(subst -, ,$*))))
|
||||
([ -z "$(FORCE)" ] && docker pull $(TARGETIMAGE)) || \
|
||||
docker build \
|
||||
--build-arg KERNEL_VERSION=$* \
|
||||
--build-arg KERNEL_SERIES=$(call series,$*) \
|
||||
--build-arg EXTRA=$(EXTRATOOL) \
|
||||
--build-arg DEBUG=$(DEBUG) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
$(LABELS) \
|
||||
--no-cache -t $(TARGETIMAGE) .
|
||||
|
||||
builddebugkernel-%: buildkerneldeps-%
|
||||
$(MAKE) buildplainkernel-$* DEBUG=-dbg
|
||||
|
||||
push-%: notdirty build-% pushkernel-% tagbuilder-% pushtools-%;
|
||||
|
||||
tagbuilder-%: notdirty
|
||||
$(eval BUILDER_IMAGE=$(call baseimage,$*)-builder)
|
||||
docker tag $(IMAGE_BUILDER) $(BUILDER_IMAGE)$(SUFFIX) && \
|
||||
docker push $(BUILDER_IMAGE)$(SUFFIX) && \
|
||||
$(PUSH_MANIFEST) $(BUILDER_IMAGE)
|
||||
|
||||
pushtagpush-%:
|
||||
$(eval BASEIMAGE=$(ORG)/$(IMAGE)$*)
|
||||
$(eval HASHIMAGE=$(BASEIMAGE)-$(HASHTAG))
|
||||
$(eval SUFFIXEDIMAGE=$(BASEIMAGE)$(SUFFIX))
|
||||
$(eval HASHANDSUFFIXIMAGE=$(HASHIMAGE)$(SUFFIX))
|
||||
([ -z "$(FORCE)" ] && docker pull $(HASHANDSUFFIXIMAGE)) || \
|
||||
(docker push $(HASHANDSUFFIXIMAGE) && \
|
||||
docker tag $(HASHANDSUFFIXIMAGE) $(SUFFIXEDIMAGE) && \
|
||||
docker push $(SUFFIXEDIMAGE) && \
|
||||
$(PUSH_MANIFEST) $(HASHIMAGE) && \
|
||||
$(PUSH_MANIFEST) $(BASEIMAGE))
|
||||
|
||||
pushkernel-%:
|
||||
$(MAKE) pushtagpush-$(call baseimageextension,$*)
|
||||
|
||||
show-tag-%:
|
||||
@echo $(eval BASEIMAGE=$(call baseimage,$*))-$(HASHTAG)
|
||||
|
||||
buildtools-%: $(addprefix buildtool-%$(RELEASESEP),$(TOOLS));
|
||||
|
||||
buildtool-%:
|
||||
$(eval TARGETIMAGE=$(call toolimagehash,$*))
|
||||
$(eval KERNELIMAGE=$(call toolkernelimage,$*))
|
||||
$(eval TOOL=$(call toolname,$*))
|
||||
([ -z "$(FORCE)" ] && docker pull $(TARGETIMAGE)) || \
|
||||
docker build -f Dockerfile.$(TOOL) \
|
||||
--build-arg IMAGE=$(KERNELIMAGE) \
|
||||
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
|
||||
--no-cache $(LABEL) -t $(TARGETIMAGE) .
|
||||
|
||||
pushtools-%: $(addprefix pushtool-%$(RELEASESEP),$(TOOLS));
|
||||
|
||||
pushtool-%:
|
||||
$(MAKE) pushtagpush-$(call toolimageextension,$*)
|
||||
|
||||
# Target for kernel config
|
||||
kconfig:
|
||||
|
@ -2,15 +2,16 @@
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 5.10.104 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 10.2.1_pre1) 10.2.1 20201203"
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=100201
|
||||
CONFIG_LD_VERSION=235020000
|
||||
CONFIG_GCC_VERSION=120201
|
||||
CONFIG_LD_VERSION=239000000
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_BUILDTIME_TABLE_SORT=y
|
||||
@ -389,6 +390,7 @@ CONFIG_SYS_SUPPORTS_HUGETLBFS=y
|
||||
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
|
||||
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
|
||||
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
|
||||
CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
|
||||
CONFIG_PARAVIRT=y
|
||||
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
|
||||
# CONFIG_KEXEC_FILE is not set
|
||||
@ -706,6 +708,7 @@ CONFIG_HAVE_ARCH_STACKLEAK=y
|
||||
CONFIG_HAVE_STACKPROTECTOR=y
|
||||
CONFIG_STACKPROTECTOR=y
|
||||
CONFIG_STACKPROTECTOR_STRONG=y
|
||||
CONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y
|
||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
|
||||
@ -4513,10 +4516,14 @@ CONFIG_GCC_PLUGIN_STRUCTLEAK=y
|
||||
#
|
||||
# Memory initialization
|
||||
#
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
|
||||
# CONFIG_INIT_STACK_NONE is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
|
||||
CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
|
||||
# CONFIG_INIT_STACK_ALL_PATTERN is not set
|
||||
# CONFIG_INIT_STACK_ALL_ZERO is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE is not set
|
||||
CONFIG_GCC_PLUGIN_STACKLEAK=y
|
||||
CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
|
||||
@ -4932,6 +4939,7 @@ CONFIG_UBSAN_MISC=y
|
||||
# CONFIG_UBSAN_SANITIZE_ALL is not set
|
||||
# CONFIG_UBSAN_ALIGNMENT is not set
|
||||
# CONFIG_TEST_UBSAN is not set
|
||||
CONFIG_HAVE_KCSAN_COMPILER=y
|
||||
# end of Generic Kernel Debugging Instruments
|
||||
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
@ -4968,6 +4976,7 @@ CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_HAVE_ARCH_KASAN=y
|
||||
CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y
|
||||
CONFIG_CC_HAS_KASAN_GENERIC=y
|
||||
CONFIG_CC_HAS_KASAN_SW_TAGS=y
|
||||
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
|
||||
# CONFIG_KASAN is not set
|
||||
# end of Memory Debugging
|
||||
|
@ -2,15 +2,16 @@
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 5.10.104 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 10.2.1_pre1) 10.2.1 20201203"
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=100201
|
||||
CONFIG_LD_VERSION=235020000
|
||||
CONFIG_GCC_VERSION=120201
|
||||
CONFIG_LD_VERSION=239000000
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_BUILDTIME_TABLE_SORT=y
|
||||
@ -421,8 +422,7 @@ CONFIG_X86_INTEL_TSX_MODE_OFF=y
|
||||
# CONFIG_X86_INTEL_TSX_MODE_ON is not set
|
||||
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
|
||||
CONFIG_EFI=y
|
||||
CONFIG_EFI_STUB=y
|
||||
CONFIG_EFI_MIXED=y
|
||||
# CONFIG_EFI_STUB is not set
|
||||
# CONFIG_HZ_100 is not set
|
||||
# CONFIG_HZ_250 is not set
|
||||
# CONFIG_HZ_300 is not set
|
||||
@ -620,12 +620,9 @@ CONFIG_EFI_VARS_PSTORE=y
|
||||
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
|
||||
# CONFIG_EFI_FAKE_MEMMAP is not set
|
||||
CONFIG_EFI_RUNTIME_WRAPPERS=y
|
||||
CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
|
||||
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
|
||||
# CONFIG_EFI_CAPSULE_LOADER is not set
|
||||
# CONFIG_EFI_TEST is not set
|
||||
# CONFIG_APPLE_PROPERTIES is not set
|
||||
CONFIG_RESET_ATTACK_MITIGATION=y
|
||||
# CONFIG_EFI_RCI2_TABLE is not set
|
||||
# CONFIG_EFI_DISABLE_PCI_DMA is not set
|
||||
# end of EFI (Extensible Firmware Interface) Support
|
||||
@ -4089,10 +4086,14 @@ CONFIG_GCC_PLUGIN_STRUCTLEAK=y
|
||||
#
|
||||
# Memory initialization
|
||||
#
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
|
||||
# CONFIG_INIT_STACK_NONE is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
|
||||
CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
|
||||
# CONFIG_INIT_STACK_ALL_PATTERN is not set
|
||||
# CONFIG_INIT_STACK_ALL_ZERO is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE is not set
|
||||
CONFIG_GCC_PLUGIN_STACKLEAK=y
|
||||
CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
|
||||
@ -4520,6 +4521,8 @@ CONFIG_UBSAN_MISC=y
|
||||
# CONFIG_UBSAN_ALIGNMENT is not set
|
||||
# CONFIG_TEST_UBSAN is not set
|
||||
CONFIG_HAVE_ARCH_KCSAN=y
|
||||
CONFIG_HAVE_KCSAN_COMPILER=y
|
||||
# CONFIG_KCSAN is not set
|
||||
# end of Generic Kernel Debugging Instruments
|
||||
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
@ -2,15 +2,16 @@
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 5.11.4 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 10.2.1_pre1) 10.2.1 20201203"
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=100201
|
||||
CONFIG_LD_VERSION=235020000
|
||||
CONFIG_GCC_VERSION=120201
|
||||
CONFIG_LD_VERSION=239000000
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_BUILDTIME_TABLE_SORT=y
|
||||
@ -387,6 +388,7 @@ CONFIG_SYS_SUPPORTS_HUGETLBFS=y
|
||||
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
|
||||
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
|
||||
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
|
||||
CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
|
||||
CONFIG_PARAVIRT=y
|
||||
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
|
||||
# CONFIG_KEXEC_FILE is not set
|
||||
@ -703,6 +705,7 @@ CONFIG_HAVE_ARCH_STACKLEAK=y
|
||||
CONFIG_HAVE_STACKPROTECTOR=y
|
||||
CONFIG_STACKPROTECTOR=y
|
||||
CONFIG_STACKPROTECTOR_STRONG=y
|
||||
CONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y
|
||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
|
||||
@ -4521,10 +4524,14 @@ CONFIG_GCC_PLUGIN_STRUCTLEAK=y
|
||||
#
|
||||
# Memory initialization
|
||||
#
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
|
||||
# CONFIG_INIT_STACK_NONE is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
|
||||
CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
|
||||
# CONFIG_INIT_STACK_ALL_PATTERN is not set
|
||||
# CONFIG_INIT_STACK_ALL_ZERO is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE is not set
|
||||
CONFIG_GCC_PLUGIN_STACKLEAK=y
|
||||
CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
|
||||
@ -4949,6 +4956,7 @@ CONFIG_UBSAN_ENUM=y
|
||||
# CONFIG_UBSAN_ALIGNMENT is not set
|
||||
# CONFIG_UBSAN_SANITIZE_ALL is not set
|
||||
# CONFIG_TEST_UBSAN is not set
|
||||
CONFIG_HAVE_KCSAN_COMPILER=y
|
||||
# end of Generic Kernel Debugging Instruments
|
||||
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
@ -4984,6 +4992,7 @@ CONFIG_HAVE_ARCH_KASAN=y
|
||||
CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y
|
||||
CONFIG_HAVE_ARCH_KASAN_HW_TAGS=y
|
||||
CONFIG_CC_HAS_KASAN_GENERIC=y
|
||||
CONFIG_CC_HAS_KASAN_SW_TAGS=y
|
||||
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
|
||||
# CONFIG_KASAN is not set
|
||||
# end of Memory Debugging
|
||||
|
@ -2,15 +2,16 @@
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 5.11.4 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 10.2.1_pre1) 10.2.1 20201203"
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=100201
|
||||
CONFIG_LD_VERSION=235020000
|
||||
CONFIG_GCC_VERSION=120201
|
||||
CONFIG_LD_VERSION=239000000
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_BUILDTIME_TABLE_SORT=y
|
||||
@ -421,8 +422,7 @@ CONFIG_X86_INTEL_TSX_MODE_OFF=y
|
||||
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
|
||||
# CONFIG_X86_SGX is not set
|
||||
CONFIG_EFI=y
|
||||
CONFIG_EFI_STUB=y
|
||||
CONFIG_EFI_MIXED=y
|
||||
# CONFIG_EFI_STUB is not set
|
||||
# CONFIG_HZ_100 is not set
|
||||
# CONFIG_HZ_250 is not set
|
||||
# CONFIG_HZ_300 is not set
|
||||
@ -620,12 +620,9 @@ CONFIG_EFI_VARS_PSTORE=y
|
||||
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
|
||||
# CONFIG_EFI_FAKE_MEMMAP is not set
|
||||
CONFIG_EFI_RUNTIME_WRAPPERS=y
|
||||
CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
|
||||
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
|
||||
# CONFIG_EFI_CAPSULE_LOADER is not set
|
||||
# CONFIG_EFI_TEST is not set
|
||||
# CONFIG_APPLE_PROPERTIES is not set
|
||||
CONFIG_RESET_ATTACK_MITIGATION=y
|
||||
# CONFIG_EFI_RCI2_TABLE is not set
|
||||
# CONFIG_EFI_DISABLE_PCI_DMA is not set
|
||||
# end of EFI (Extensible Firmware Interface) Support
|
||||
@ -4107,10 +4104,14 @@ CONFIG_GCC_PLUGIN_STRUCTLEAK=y
|
||||
#
|
||||
# Memory initialization
|
||||
#
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
|
||||
# CONFIG_INIT_STACK_NONE is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
|
||||
CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
|
||||
# CONFIG_INIT_STACK_ALL_PATTERN is not set
|
||||
# CONFIG_INIT_STACK_ALL_ZERO is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE is not set
|
||||
CONFIG_GCC_PLUGIN_STACKLEAK=y
|
||||
CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
|
||||
@ -4545,6 +4546,8 @@ CONFIG_UBSAN_ENUM=y
|
||||
# CONFIG_UBSAN_SANITIZE_ALL is not set
|
||||
# CONFIG_TEST_UBSAN is not set
|
||||
CONFIG_HAVE_ARCH_KCSAN=y
|
||||
CONFIG_HAVE_KCSAN_COMPILER=y
|
||||
# CONFIG_KCSAN is not set
|
||||
# end of Generic Kernel Debugging Instruments
|
||||
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
@ -2,18 +2,19 @@
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 5.15.27 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 10.2.1_pre1) 10.2.1 20201203"
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=100201
|
||||
CONFIG_GCC_VERSION=130201
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_AS_IS_GNU=y
|
||||
CONFIG_AS_VERSION=23502
|
||||
CONFIG_AS_VERSION=24100
|
||||
CONFIG_LD_IS_BFD=y
|
||||
CONFIG_LD_VERSION=23502
|
||||
CONFIG_LD_VERSION=24100
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
@ -392,6 +393,7 @@ CONFIG_SCHED_HRTICK=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_HW_PERF_EVENTS=y
|
||||
CONFIG_ARCH_HAS_FILTER_PGPROT=y
|
||||
CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
|
||||
CONFIG_PARAVIRT=y
|
||||
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
|
||||
# CONFIG_KEXEC_FILE is not set
|
||||
@ -670,6 +672,7 @@ CONFIG_HAVE_ARCH_STACKLEAK=y
|
||||
CONFIG_HAVE_STACKPROTECTOR=y
|
||||
CONFIG_STACKPROTECTOR=y
|
||||
CONFIG_STACKPROTECTOR_STRONG=y
|
||||
CONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y
|
||||
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
|
||||
CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
|
||||
CONFIG_LTO_NONE=y
|
||||
@ -4621,10 +4624,14 @@ CONFIG_GCC_PLUGIN_STRUCTLEAK=y
|
||||
#
|
||||
# Memory initialization
|
||||
#
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
|
||||
# CONFIG_INIT_STACK_NONE is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
|
||||
CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
|
||||
# CONFIG_INIT_STACK_ALL_PATTERN is not set
|
||||
# CONFIG_INIT_STACK_ALL_ZERO is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE is not set
|
||||
CONFIG_GCC_PLUGIN_STACKLEAK=y
|
||||
CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
|
||||
@ -4632,6 +4639,8 @@ CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
|
||||
# CONFIG_STACKLEAK_RUNTIME_DISABLE is not set
|
||||
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
|
||||
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
|
||||
CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
|
||||
# CONFIG_ZERO_CALL_USED_REGS is not set
|
||||
# end of Memory initialization
|
||||
# end of Kernel hardening options
|
||||
# end of Security options
|
||||
@ -5052,6 +5061,7 @@ CONFIG_UBSAN_ENUM=y
|
||||
# CONFIG_UBSAN_ALIGNMENT is not set
|
||||
# CONFIG_UBSAN_SANITIZE_ALL is not set
|
||||
# CONFIG_TEST_UBSAN is not set
|
||||
CONFIG_HAVE_KCSAN_COMPILER=y
|
||||
# end of Generic Kernel Debugging Instruments
|
||||
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
@ -5088,6 +5098,7 @@ CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y
|
||||
CONFIG_HAVE_ARCH_KASAN_HW_TAGS=y
|
||||
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
|
||||
CONFIG_CC_HAS_KASAN_GENERIC=y
|
||||
CONFIG_CC_HAS_KASAN_SW_TAGS=y
|
||||
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
|
||||
# CONFIG_KASAN is not set
|
||||
CONFIG_HAVE_ARCH_KFENCE=y
|
||||
|
@ -2,18 +2,19 @@
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 5.15.27 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 10.2.1_pre1) 10.2.1 20201203"
|
||||
CONFIG_CC_VERSION_TEXT="gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=100201
|
||||
CONFIG_GCC_VERSION=130201
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_AS_IS_GNU=y
|
||||
CONFIG_AS_VERSION=23502
|
||||
CONFIG_AS_VERSION=24100
|
||||
CONFIG_LD_IS_BFD=y
|
||||
CONFIG_LD_VERSION=23502
|
||||
CONFIG_LD_VERSION=24100
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
@ -436,8 +437,7 @@ CONFIG_X86_INTEL_TSX_MODE_OFF=y
|
||||
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
|
||||
# CONFIG_X86_SGX is not set
|
||||
CONFIG_EFI=y
|
||||
CONFIG_EFI_STUB=y
|
||||
CONFIG_EFI_MIXED=y
|
||||
# CONFIG_EFI_STUB is not set
|
||||
# CONFIG_HZ_100 is not set
|
||||
# CONFIG_HZ_250 is not set
|
||||
# CONFIG_HZ_300 is not set
|
||||
@ -1755,12 +1755,9 @@ CONFIG_EFI_VARS_PSTORE=y
|
||||
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
|
||||
# CONFIG_EFI_FAKE_MEMMAP is not set
|
||||
CONFIG_EFI_RUNTIME_WRAPPERS=y
|
||||
CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
|
||||
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
|
||||
# CONFIG_EFI_CAPSULE_LOADER is not set
|
||||
# CONFIG_EFI_TEST is not set
|
||||
# CONFIG_APPLE_PROPERTIES is not set
|
||||
CONFIG_RESET_ATTACK_MITIGATION=y
|
||||
# CONFIG_EFI_RCI2_TABLE is not set
|
||||
# CONFIG_EFI_DISABLE_PCI_DMA is not set
|
||||
# end of EFI (Extensible Firmware Interface) Support
|
||||
@ -4199,10 +4196,14 @@ CONFIG_GCC_PLUGIN_STRUCTLEAK=y
|
||||
#
|
||||
# Memory initialization
|
||||
#
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
|
||||
# CONFIG_INIT_STACK_NONE is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
|
||||
CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
|
||||
# CONFIG_INIT_STACK_ALL_PATTERN is not set
|
||||
# CONFIG_INIT_STACK_ALL_ZERO is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE is not set
|
||||
CONFIG_GCC_PLUGIN_STACKLEAK=y
|
||||
CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
|
||||
@ -4210,6 +4211,8 @@ CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
|
||||
# CONFIG_STACKLEAK_RUNTIME_DISABLE is not set
|
||||
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
|
||||
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
|
||||
CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
|
||||
# CONFIG_ZERO_CALL_USED_REGS is not set
|
||||
# end of Memory initialization
|
||||
# end of Kernel hardening options
|
||||
# end of Security options
|
||||
@ -4637,6 +4640,8 @@ CONFIG_UBSAN_ENUM=y
|
||||
# CONFIG_UBSAN_SANITIZE_ALL is not set
|
||||
# CONFIG_TEST_UBSAN is not set
|
||||
CONFIG_HAVE_ARCH_KCSAN=y
|
||||
CONFIG_HAVE_KCSAN_COMPILER=y
|
||||
# CONFIG_KCSAN is not set
|
||||
# end of Generic Kernel Debugging Instruments
|
||||
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
|
@ -4,10 +4,10 @@
|
||||
#
|
||||
|
||||
#
|
||||
# Compiler: gcc (Alpine 10.2.1_pre1) 10.2.1 20201203
|
||||
# Compiler: gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924
|
||||
#
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=100201
|
||||
CONFIG_GCC_VERSION=120201
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
@ -756,13 +756,8 @@ CONFIG_ARCH_HAS_MEM_ENCRYPT=y
|
||||
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
|
||||
# end of GCOV-based kernel profiling
|
||||
|
||||
CONFIG_PLUGIN_HOSTCC="g++"
|
||||
CONFIG_PLUGIN_HOSTCC=""
|
||||
CONFIG_HAVE_GCC_PLUGINS=y
|
||||
CONFIG_GCC_PLUGINS=y
|
||||
# CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set
|
||||
# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set
|
||||
CONFIG_GCC_PLUGIN_RANDSTRUCT=y
|
||||
CONFIG_GCC_PLUGIN_RANDSTRUCT_PERFORMANCE=y
|
||||
# end of General architecture-dependent options
|
||||
|
||||
CONFIG_RT_MUTEXES=y
|
||||
@ -4028,20 +4023,13 @@ CONFIG_LSM="yama,loadpin,safesetid,integrity"
|
||||
#
|
||||
# Kernel hardening options
|
||||
#
|
||||
CONFIG_GCC_PLUGIN_STRUCTLEAK=y
|
||||
|
||||
#
|
||||
# Memory initialization
|
||||
#
|
||||
# CONFIG_INIT_STACK_NONE is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
|
||||
CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
|
||||
# CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE is not set
|
||||
CONFIG_GCC_PLUGIN_STACKLEAK=y
|
||||
CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
|
||||
# CONFIG_STACKLEAK_METRICS is not set
|
||||
# CONFIG_STACKLEAK_RUNTIME_DISABLE is not set
|
||||
CONFIG_CC_HAS_AUTO_VAR_INIT=y
|
||||
CONFIG_INIT_STACK_NONE=y
|
||||
# CONFIG_INIT_STACK_ALL is not set
|
||||
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
|
||||
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
|
||||
# end of Memory initialization
|
||||
|
5569
kernel/config-6.6.x-aarch64
Normal file
5569
kernel/config-6.6.x-aarch64
Normal file
File diff suppressed because it is too large
Load Diff
5223
kernel/config-6.6.x-x86_64
Normal file
5223
kernel/config-6.6.x-x86_64
Normal file
File diff suppressed because it is too large
Load Diff
58
kernel/patches-5.11.x/0002-gcc12-subcmd-build-issues.patch
Normal file
58
kernel/patches-5.11.x/0002-gcc12-subcmd-build-issues.patch
Normal file
@ -0,0 +1,58 @@
|
||||
From: Justin M. Forbes @ 2022-01-29 1:02 UTC (permalink / raw)
|
||||
To: Justin M. Forbes, linux-kernel; +Cc: jmforbes, Jakub Jelinek
|
||||
|
||||
While the current code builds fine with gcc 11, it does not with gcc 12,
|
||||
resulting in:
|
||||
|
||||
In file included from help.c:12:
|
||||
In function 'xrealloc',
|
||||
inlined from 'add_cmdname' at help.c:24:2:
|
||||
subcmd-util.h:56:23: error: pointer may be used after 'realloc' [-Werror=use-after-free]
|
||||
56 | ret = realloc(ptr, size);
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
subcmd-util.h:52:21: note: call to 'realloc' here
|
||||
52 | void *ret = realloc(ptr, size);
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
subcmd-util.h:58:31: error: pointer may be used after 'realloc' [-Werror=use-after-free]
|
||||
58 | ret = realloc(ptr, 1);
|
||||
| ^~~~~~~~~~~~~~~
|
||||
subcmd-util.h:52:21: note: call to 'realloc' here
|
||||
52 | void *ret = realloc(ptr, size);
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
|
||||
The was mentioned in upstream gcc bug
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 where it was
|
||||
determined that gcc was correct and the kernel needed to change. This
|
||||
fixes that use-after-free and makes things build again.
|
||||
|
||||
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
|
||||
Cc: Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
---
|
||||
tools/lib/subcmd/subcmd-util.h | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tools/lib/subcmd/subcmd-util.h b/tools/lib/subcmd/subcmd-util.h
|
||||
index 794a375dad36..7009fc176636 100644
|
||||
--- a/tools/lib/subcmd/subcmd-util.h
|
||||
+++ b/tools/lib/subcmd/subcmd-util.h
|
||||
@@ -49,13 +49,12 @@ static NORETURN inline void die(const char *err, ...)
|
||||
|
||||
static inline void *xrealloc(void *ptr, size_t size)
|
||||
{
|
||||
- void *ret = realloc(ptr, size);
|
||||
- if (!ret && !size)
|
||||
- ret = realloc(ptr, 1);
|
||||
+ void *ret;
|
||||
+ if (!size)
|
||||
+ size = 1;
|
||||
+ ret = realloc(ptr, size);
|
||||
if (!ret) {
|
||||
ret = realloc(ptr, size);
|
||||
- if (!ret && !size)
|
||||
- ret = realloc(ptr, 1);
|
||||
if (!ret)
|
||||
die("Out of memory, realloc failed");
|
||||
}
|
||||
--
|
||||
2.34.1
|
58
kernel/patches-5.4.x/0002-gcc12-subcmd-build-issues.patch
Normal file
58
kernel/patches-5.4.x/0002-gcc12-subcmd-build-issues.patch
Normal file
@ -0,0 +1,58 @@
|
||||
From: Justin M. Forbes @ 2022-01-29 1:02 UTC (permalink / raw)
|
||||
To: Justin M. Forbes, linux-kernel; +Cc: jmforbes, Jakub Jelinek
|
||||
|
||||
While the current code builds fine with gcc 11, it does not with gcc 12,
|
||||
resulting in:
|
||||
|
||||
In file included from help.c:12:
|
||||
In function 'xrealloc',
|
||||
inlined from 'add_cmdname' at help.c:24:2:
|
||||
subcmd-util.h:56:23: error: pointer may be used after 'realloc' [-Werror=use-after-free]
|
||||
56 | ret = realloc(ptr, size);
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
subcmd-util.h:52:21: note: call to 'realloc' here
|
||||
52 | void *ret = realloc(ptr, size);
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
subcmd-util.h:58:31: error: pointer may be used after 'realloc' [-Werror=use-after-free]
|
||||
58 | ret = realloc(ptr, 1);
|
||||
| ^~~~~~~~~~~~~~~
|
||||
subcmd-util.h:52:21: note: call to 'realloc' here
|
||||
52 | void *ret = realloc(ptr, size);
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
|
||||
The was mentioned in upstream gcc bug
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 where it was
|
||||
determined that gcc was correct and the kernel needed to change. This
|
||||
fixes that use-after-free and makes things build again.
|
||||
|
||||
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
|
||||
Cc: Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
---
|
||||
tools/lib/subcmd/subcmd-util.h | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tools/lib/subcmd/subcmd-util.h b/tools/lib/subcmd/subcmd-util.h
|
||||
index 794a375dad36..7009fc176636 100644
|
||||
--- a/tools/lib/subcmd/subcmd-util.h
|
||||
+++ b/tools/lib/subcmd/subcmd-util.h
|
||||
@@ -49,13 +49,12 @@ static NORETURN inline void die(const char *err, ...)
|
||||
|
||||
static inline void *xrealloc(void *ptr, size_t size)
|
||||
{
|
||||
- void *ret = realloc(ptr, size);
|
||||
- if (!ret && !size)
|
||||
- ret = realloc(ptr, 1);
|
||||
+ void *ret;
|
||||
+ if (!size)
|
||||
+ size = 1;
|
||||
+ ret = realloc(ptr, size);
|
||||
if (!ret) {
|
||||
ret = realloc(ptr, size);
|
||||
- if (!ret && !size)
|
||||
- ret = realloc(ptr, 1);
|
||||
if (!ret)
|
||||
die("Out of memory, realloc failed");
|
||||
}
|
||||
--
|
||||
2.34.1
|
@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:5.15.27
|
||||
image: linuxkit/kernel:6.6.13
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
|
||||
|
@ -6,7 +6,7 @@ init:
|
||||
- linuxkit/runc:92b1fea787c01cef46f07f783c80631a7071cfbb
|
||||
onboot:
|
||||
- name: check-kernel-config
|
||||
image: linuxkit/test-kernel-config:24e86218391ba1fab0ccee3c4482e690af772f53
|
||||
image: linuxkit/test-kernel-config:0c91e5ca5867aea246e2df5cd7641338066ea4ef
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:401dc53c604c0b2179ed0369a6968fd4179cc176
|
||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
||||
|
@ -6,7 +6,7 @@ init:
|
||||
- linuxkit/runc:92b1fea787c01cef46f07f783c80631a7071cfbb
|
||||
onboot:
|
||||
- name: check-kernel-config
|
||||
image: linuxkit/test-kernel-config:24e86218391ba1fab0ccee3c4482e690af772f53
|
||||
image: linuxkit/test-kernel-config:0c91e5ca5867aea246e2df5cd7641338066ea4ef
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:401dc53c604c0b2179ed0369a6968fd4179cc176
|
||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
||||
|
@ -6,7 +6,7 @@ init:
|
||||
- linuxkit/runc:92b1fea787c01cef46f07f783c80631a7071cfbb
|
||||
onboot:
|
||||
- name: check-kernel-config
|
||||
image: linuxkit/test-kernel-config:24e86218391ba1fab0ccee3c4482e690af772f53
|
||||
image: linuxkit/test-kernel-config:0c91e5ca5867aea246e2df5cd7641338066ea4ef
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:401dc53c604c0b2179ed0369a6968fd4179cc176
|
||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
||||
|
24
test/cases/020_kernel/019_config_6.6.x/test.sh
Normal file
24
test/cases/020_kernel/019_config_6.6.x/test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Sanity check on the kernel config file
|
||||
# LABELS:
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=kconfig
|
||||
|
||||
clean_up() {
|
||||
rm -rf ${NAME}-*
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
linuxkit build --format kernel+initrd --name "${NAME}" test.yml
|
||||
RESULT="$(linuxkit run ${NAME})"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
exit 0
|
12
test/cases/020_kernel/019_config_6.6.x/test.yml
Normal file
12
test/cases/020_kernel/019_config_6.6.x/test.yml
Normal file
@ -0,0 +1,12 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:6.6.13
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:07d37c3ae7fad5ddcb54c8dc65774ae050851f04
|
||||
- linuxkit/runc:2aabf16bc8a1b94e015ee53fa2e7a77ab1883a80
|
||||
onboot:
|
||||
- name: check-kernel-config
|
||||
image: linuxkit/test-kernel-config:0c91e5ca5867aea246e2df5cd7641338066ea4ef
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:992d9c7531166fe071d945e8b2728d8b61eb8d5a
|
||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
23
test/cases/020_kernel/119_kmod_6.6.x/Dockerfile
Normal file
23
test/cases/020_kernel/119_kmod_6.6.x/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
# This Dockerfile extracts the kernel headers from the kernel image
|
||||
# and then compiles a simple hello world kernel module against them.
|
||||
# In the last stage, it creates a package, which can be used for
|
||||
# testing.
|
||||
|
||||
FROM linuxkit/kernel:6.6.13 AS ksrc
|
||||
|
||||
# Extract headers and compile module
|
||||
FROM linuxkit/kernel:6.6.13-builder AS build
|
||||
RUN apk add build-base elfutils-dev
|
||||
|
||||
COPY --from=ksrc /kernel-dev.tar /
|
||||
RUN tar xf kernel-dev.tar
|
||||
|
||||
WORKDIR /kmod
|
||||
COPY ./src/* ./
|
||||
RUN make all
|
||||
|
||||
# Package
|
||||
FROM alpine:3.17
|
||||
COPY --from=build /kmod/hello_world.ko /
|
||||
COPY check.sh /check.sh
|
||||
ENTRYPOINT ["/bin/sh", "/check.sh"]
|
15
test/cases/020_kernel/119_kmod_6.6.x/check.sh
Executable file
15
test/cases/020_kernel/119_kmod_6.6.x/check.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
function failed {
|
||||
printf "Kernel module test suite FAILED\n"
|
||||
/sbin/poweroff -f
|
||||
}
|
||||
|
||||
uname -a
|
||||
modinfo hello_world.ko || failed
|
||||
insmod hello_world.ko || failed
|
||||
[ -n "$(dmesg | grep -o 'Hello LinuxKit')" ] || failed
|
||||
rmmod hello_world || failed
|
||||
|
||||
printf "Kernel module test suite PASSED\n"
|
||||
|
||||
/sbin/poweroff -f
|
6
test/cases/020_kernel/119_kmod_6.6.x/src/Makefile
Normal file
6
test/cases/020_kernel/119_kmod_6.6.x/src/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
obj-m += hello_world.o
|
||||
KVER=$(shell basename /usr/src/linux-headers-*)
|
||||
all:
|
||||
make -C /usr/src/$(KVER) M=$(PWD) modules
|
||||
clean:
|
||||
make -C /usr/src/$(KVER) M=$(PWD) clean
|
22
test/cases/020_kernel/119_kmod_6.6.x/src/hello_world.c
Normal file
22
test/cases/020_kernel/119_kmod_6.6.x/src/hello_world.c
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* A simple Hello World kernel module
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
int init_hello(void)
|
||||
{
|
||||
printk(KERN_INFO "Hello LinuxKit\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void exit_hello(void)
|
||||
{
|
||||
printk(KERN_INFO "Goodbye LinuxKit.\n");
|
||||
}
|
||||
|
||||
module_init(init_hello);
|
||||
module_exit(exit_hello);
|
||||
MODULE_AUTHOR("Rolf Neugebauer <rolf.neugebauer@docker.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("A simple Hello World kernel module for testing");
|
31
test/cases/020_kernel/119_kmod_6.6.x/test.sh
Normal file
31
test/cases/020_kernel/119_kmod_6.6.x/test.sh
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Test build and insertion of kernel modules
|
||||
# LABELS:
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=kmod
|
||||
IMAGE_NAME=kmod-test
|
||||
|
||||
clean_up() {
|
||||
docker rmi ${IMAGE_NAME} || true
|
||||
rm -rf ${NAME}-*
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Make sure we have the latest kernel image
|
||||
docker pull linuxkit/kernel:6.6.13
|
||||
# Build a package
|
||||
docker build -t ${IMAGE_NAME} .
|
||||
|
||||
# Build and run a LinuxKit image with kernel module (and test script)
|
||||
linuxkit build --docker --format kernel+initrd --name "${NAME}" test.yml
|
||||
RESULT="$(linuxkit run ${NAME})"
|
||||
echo "${RESULT}" | grep -q "Hello LinuxKit"
|
||||
|
||||
exit 0
|
17
test/cases/020_kernel/119_kmod_6.6.x/test.yml
Normal file
17
test/cases/020_kernel/119_kmod_6.6.x/test.yml
Normal file
@ -0,0 +1,17 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:6.6.13
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:07d37c3ae7fad5ddcb54c8dc65774ae050851f04
|
||||
- linuxkit/runc:2aabf16bc8a1b94e015ee53fa2e7a77ab1883a80
|
||||
onboot:
|
||||
- name: check
|
||||
image: kmod-test
|
||||
binds:
|
||||
- /dev:/dev
|
||||
- /lib/modules:/lib/modules
|
||||
capabilities:
|
||||
- all
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:992d9c7531166fe071d945e8b2728d8b61eb8d5a
|
||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
11
test/cases/020_kernel/219_tags_6.6.x/test.sh
Normal file
11
test/cases/020_kernel/219_tags_6.6.x/test.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Test existence and correctness of kernel builder tag, label and file
|
||||
# LABELS:
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
|
||||
KERNEL=linuxkit/kernel:6.6.13
|
||||
|
||||
# just include the common test
|
||||
. ../tags.sh
|
@ -1,18 +1,18 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:5.10.104
|
||||
image: linuxkit/kernel:6.6.13
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
|
||||
- linuxkit/runc:92b1fea787c01cef46f07f783c80631a7071cfbb
|
||||
onboot:
|
||||
- name: format
|
||||
image: linuxkit/format:5161fe240e5824da04d51bcf5e00afcb0c18dc25
|
||||
image: linuxkit/format:4686064ce75f8014a3cdf8c3227887a81a74180a
|
||||
command: ["/usr/bin/format", "-type", "xfs"]
|
||||
- name: mount
|
||||
image: linuxkit/mount:19ff89c251a4156bda8ed11c95faad2f40eb770e
|
||||
command: ["/usr/bin/mountie", "/var/lib/docker"]
|
||||
- name: test
|
||||
image: alpine:3.13
|
||||
image: alpine:3.19
|
||||
binds:
|
||||
- /var/lib/docker:/var/lib/docker
|
||||
command: ["touch", "/var/lib/docker/bar"]
|
||||
|
@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:5.10.104
|
||||
image: linuxkit/kernel:6.6.13
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
|
||||
|
@ -6,13 +6,13 @@ init:
|
||||
- linuxkit/runc:92b1fea787c01cef46f07f783c80631a7071cfbb
|
||||
onboot:
|
||||
- name: format
|
||||
image: linuxkit/format:5161fe240e5824da04d51bcf5e00afcb0c18dc25
|
||||
image: linuxkit/format:4686064ce75f8014a3cdf8c3227887a81a74180a
|
||||
command: ["/usr/bin/format", "-type", "xfs" ]
|
||||
- name: mount
|
||||
image: linuxkit/mount:19ff89c251a4156bda8ed11c95faad2f40eb770e
|
||||
command: ["/usr/bin/mountie", "/var/lib/docker"]
|
||||
- name: test
|
||||
image: alpine:3.13
|
||||
image: alpine:3.19
|
||||
binds:
|
||||
- /var/lib/docker:/var/lib/docker
|
||||
- /check.sh:/check.sh
|
||||
|
@ -12,7 +12,7 @@ onboot:
|
||||
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
- name: check-kernel-config
|
||||
image: linuxkit/test-kernel-config:24e86218391ba1fab0ccee3c4482e690af772f53
|
||||
image: linuxkit/test-kernel-config:0c91e5ca5867aea246e2df5cd7641338066ea4ef
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:401dc53c604c0b2179ed0369a6968fd4179cc176
|
||||
command: ["/bin/sh", "/poweroff.sh", "120"]
|
||||
|
@ -33,7 +33,6 @@ echo $UNZIPPED_CONFIG | grep -q CONFIG_BUG=y || fail "CONFIG_BUG=y"
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_DEBUG_KERNEL=y || fail "CONFIG_DEBUG_KERNEL=y"
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_STRICT_DEVMEM=y || fail "CONFIG_STRICT_DEVMEM=y"
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_SYN_COOKIES=y || fail "CONFIG_SYN_COOKIES=y"
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_DEBUG_CREDENTIALS=y || fail "CONFIG_DEBUG_CREDENTIALS=y"
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_DEBUG_NOTIFIERS=y || fail "CONFIG_DEBUG_NOTIFIERS=y"
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_DEBUG_LIST=y || fail "CONFIG_DEBUG_LIST=y"
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_SECCOMP=y || fail "CONFIG_SECCOMP=y"
|
||||
@ -46,6 +45,10 @@ echo $UNZIPPED_CONFIG | grep -q CONFIG_BPF_JIT_ALWAYS_ON=y || fail "CONFIG_BPF_J
|
||||
|
||||
|
||||
# Conditional on kernel version
|
||||
if [ "$kernelMajor" -lt 6 ]; then
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_DEBUG_CREDENTIALS=y || fail "CONFIG_DEBUG_CREDENTIALS=y"
|
||||
fi
|
||||
|
||||
if [ "$kernelMajor" -eq 4 -a "$kernelMinor" -le 10 ]; then
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_DEBUG_RODATA=y || fail "CONFIG_DEBUG_RODATA=y"
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_DEBUG_SET_MODULE_RONX=y || fail "CONFIG_DEBUG_SET_MODULE_RONX=y"
|
||||
@ -62,7 +65,7 @@ if [ "$kernelMajor" -eq 5 ] || [ "$kernelMajor" -eq 4 -a "$kernelMinor" -ge 8 ];
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_HARDENED_USERCOPY=y || fail "CONFIG_HARDENED_USERCOPY=y"
|
||||
fi
|
||||
# 4.18.x renamed this option (and re-introduced CC_STACKPROTECTOR as STACKPROTECTOR)
|
||||
if [ "$kernelMajor" -eq 5 ] || [ "$kernelMajor" -le 4 -a "$kernelMinor" -ge 18 ]; then
|
||||
if [ "$kernelMajor" -ge 5 ] || [ "$kernelMajor" -le 4 -a "$kernelMinor" -ge 18 ]; then
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_STACKPROTECTOR=y || fail "CONFIG_STACKPROTECTOR=y"
|
||||
echo $UNZIPPED_CONFIG | grep -q CONFIG_STACKPROTECTOR_STRONG=y || fail "CONFIG_STACKPROTECTOR_STRONG=y"
|
||||
else
|
||||
@ -112,7 +115,6 @@ if [ "$arch" = "x86_64" ]; then
|
||||
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_ACPI_CUSTOM_METHOD is not set' || fail "CONFIG_ACPI_CUSTOM_METHOD is not set"
|
||||
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_COMPAT_VDSO is not set' || fail "CONFIG_COMPAT_VDSO is not set"
|
||||
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_KEXEC is not set' || fail "CONFIG_KEXEC is not set"
|
||||
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_X86_X32 is not set' || fail "CONFIG_X86_X32 is not set"
|
||||
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_MODIFY_LDT_SYSCALL is not set' || fail "CONFIG_MODIFY_LDT_SYSCALL is not set"
|
||||
if [ "$kernelMajor" -eq 5 ] || [ "$kernelMajor" -eq 4 -a "$kernelMinor" -ge 5 ]; then
|
||||
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_LEGACY_PTYS is not set' || fail "CONFIG_LEGACY_PTYS is not set"
|
||||
@ -123,6 +125,12 @@ if [ "$arch" = "x86_64" ]; then
|
||||
if [ "$kernelMajor" -le 5 ] && [ "$kernelMinor" -lt 13 ]; then
|
||||
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_DEVKMEM is not set' || fail "CONFIG_DEVKMEM is not set"
|
||||
fi
|
||||
if [ "$kernelMajor" -lt 6 ]; then
|
||||
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_X86_X32 is not set' || fail "CONFIG_X86_X32 is not set"
|
||||
else
|
||||
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_X86_X32_ABI is not set' || fail "CONFIG_X86_X32_ABI is not set"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# modprobe
|
||||
|
Loading…
Reference in New Issue
Block a user