mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 18:11:35 +00:00
Merge pull request #3175 from rn/kmisc
EOL 4.17.x, update to 4.4.153, fix BCC build
This commit is contained in:
commit
c8449ba2db
@ -194,9 +194,9 @@ forcepush: forcepush_perf_$(2)$(3)$(4)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# For BCC, only build on x86 and only on latest LTS and latest stable.
|
# For BCC, only build on x86 and only on latest LTS and latest stable.
|
||||||
# That's 4.14.x and 4.17.x at time of authorship.
|
# That's 4.14.x and 4.18.x at time of authorship.
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
ifeq ($(2), $(filter $(2),4.14.x 4.17.x))
|
ifeq ($(2), $(filter $(2),4.14.x 4.18.x))
|
||||||
build_bcc_$(2)$(3)$(4): build_$(2)$(3)$(4)
|
build_bcc_$(2)$(3)$(4): build_$(2)$(3)$(4)
|
||||||
docker pull $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
docker pull $(ORG)/$(IMAGE_BCC):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
||||||
DOCKER_CONTENT_TRUST=0 docker build -f Dockerfile.bcc \
|
DOCKER_CONTENT_TRUST=0 docker build -f Dockerfile.bcc \
|
||||||
@ -260,12 +260,11 @@ endef
|
|||||||
#
|
#
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
$(eval $(call kernel,4.18.5,4.18.x,$(EXTRA),$(DEBUG)))
|
$(eval $(call kernel,4.18.5,4.18.x,$(EXTRA),$(DEBUG)))
|
||||||
$(eval $(call kernel,4.17.19,4.17.x,$(EXTRA),$(DEBUG)))
|
|
||||||
$(eval $(call kernel,4.14.67,4.14.x,$(EXTRA),$(DEBUG)))
|
$(eval $(call kernel,4.14.67,4.14.x,$(EXTRA),$(DEBUG)))
|
||||||
$(eval $(call kernel,4.14.67,4.14.x,,-dbg))
|
$(eval $(call kernel,4.14.67,4.14.x,,-dbg))
|
||||||
$(eval $(call kernel,4.14.63,4.14.x,-rt,))
|
$(eval $(call kernel,4.14.63,4.14.x,-rt,))
|
||||||
$(eval $(call kernel,4.9.124,4.9.x,$(EXTRA),$(DEBUG)))
|
$(eval $(call kernel,4.9.124,4.9.x,$(EXTRA),$(DEBUG)))
|
||||||
$(eval $(call kernel,4.4.152,4.4.x,$(EXTRA),$(DEBUG)))
|
$(eval $(call kernel,4.4.153,4.4.x,$(EXTRA),$(DEBUG)))
|
||||||
|
|
||||||
else ifeq ($(ARCH),aarch64)
|
else ifeq ($(ARCH),aarch64)
|
||||||
$(eval $(call kernel,4.18.5,4.18.x,$(EXTRA),$(DEBUG)))
|
$(eval $(call kernel,4.18.5,4.18.x,$(EXTRA),$(DEBUG)))
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Automatically generated file; DO NOT EDIT.
|
# Automatically generated file; DO NOT EDIT.
|
||||||
# Linux/x86 4.4.152 Kernel Configuration
|
# Linux/x86 4.4.153 Kernel Configuration
|
||||||
#
|
#
|
||||||
CONFIG_64BIT=y
|
CONFIG_64BIT=y
|
||||||
CONFIG_X86_64=y
|
CONFIG_X86_64=y
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
kernel:
|
kernel:
|
||||||
image: linuxkit/kernel:4.4.152
|
image: linuxkit/kernel:4.4.153
|
||||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:e24105ebb339e1a2e578fde7ec8bccf844a633d5
|
- linuxkit/init:e24105ebb339e1a2e578fde7ec8bccf844a633d5
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
#!/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
|
|
@ -1,15 +0,0 @@
|
|||||||
kernel:
|
|
||||||
image: linuxkit/kernel:4.17.19
|
|
||||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
|
||||||
init:
|
|
||||||
- linuxkit/init:e24105ebb339e1a2e578fde7ec8bccf844a633d5
|
|
||||||
- linuxkit/runc:1dc6559fd0a9a332c740312637af0c3fbe6bafa3
|
|
||||||
onboot:
|
|
||||||
- name: check-kernel-config
|
|
||||||
image: linuxkit/test-kernel-config:1aaef970b5f70791d74d6f980ad38af4035948f8
|
|
||||||
- name: poweroff
|
|
||||||
image: linuxkit/poweroff:afe8f7dd0d47a7991c54519b0f09124cb8c4e300
|
|
||||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
|
||||||
trust:
|
|
||||||
org:
|
|
||||||
- linuxkit
|
|
@ -3,7 +3,7 @@
|
|||||||
# In the last stage, it creates a package, which can be used for
|
# In the last stage, it creates a package, which can be used for
|
||||||
# testing.
|
# testing.
|
||||||
|
|
||||||
FROM linuxkit/kernel:4.4.152 AS ksrc
|
FROM linuxkit/kernel:4.4.153 AS ksrc
|
||||||
|
|
||||||
# Extract headers and compile module
|
# Extract headers and compile module
|
||||||
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS build
|
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS build
|
||||||
|
@ -19,7 +19,7 @@ clean_up() {
|
|||||||
trap clean_up EXIT
|
trap clean_up EXIT
|
||||||
|
|
||||||
# Make sure we have the latest kernel image
|
# Make sure we have the latest kernel image
|
||||||
docker pull linuxkit/kernel:4.4.152
|
docker pull linuxkit/kernel:4.4.153
|
||||||
# Build a package
|
# Build a package
|
||||||
docker build -t ${IMAGE_NAME} .
|
docker build -t ${IMAGE_NAME} .
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
kernel:
|
kernel:
|
||||||
image: linuxkit/kernel:4.4.152
|
image: linuxkit/kernel:4.4.153
|
||||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:e24105ebb339e1a2e578fde7ec8bccf844a633d5
|
- linuxkit/init:e24105ebb339e1a2e578fde7ec8bccf844a633d5
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
# 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:4.17.19 AS ksrc
|
|
||||||
|
|
||||||
# Extract headers and compile module
|
|
||||||
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS build
|
|
||||||
RUN apk add build-base libelf-dev
|
|
||||||
|
|
||||||
COPY --from=ksrc /kernel-dev.tar /
|
|
||||||
RUN tar xf kernel-dev.tar
|
|
||||||
|
|
||||||
WORKDIR /kmod
|
|
||||||
COPY ./src/* ./
|
|
||||||
RUN make all
|
|
||||||
|
|
||||||
# Package
|
|
||||||
FROM alpine:3.8
|
|
||||||
COPY --from=build /kmod/hello_world.ko /
|
|
||||||
COPY check.sh /check.sh
|
|
||||||
ENTRYPOINT ["/bin/sh", "/check.sh"]
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/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
|
|
@ -1,6 +0,0 @@
|
|||||||
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
|
|
@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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");
|
|
@ -1,31 +0,0 @@
|
|||||||
#!/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:4.17.19
|
|
||||||
# Build a package
|
|
||||||
docker build -t ${IMAGE_NAME} .
|
|
||||||
|
|
||||||
# Build and run a LinuxKit image with kernel module (and test script)
|
|
||||||
linuxkit build -format kernel+initrd -name "${NAME}" test.yml
|
|
||||||
RESULT="$(linuxkit run ${NAME})"
|
|
||||||
echo "${RESULT}" | grep -q "Hello LinuxKit"
|
|
||||||
|
|
||||||
exit 0
|
|
@ -1,20 +0,0 @@
|
|||||||
kernel:
|
|
||||||
image: linuxkit/kernel:4.17.19
|
|
||||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
|
||||||
init:
|
|
||||||
- linuxkit/init:e24105ebb339e1a2e578fde7ec8bccf844a633d5
|
|
||||||
- linuxkit/runc:1dc6559fd0a9a332c740312637af0c3fbe6bafa3
|
|
||||||
onboot:
|
|
||||||
- name: check
|
|
||||||
image: kmod-test
|
|
||||||
binds:
|
|
||||||
- /dev:/dev
|
|
||||||
- /lib/modules:/lib/modules
|
|
||||||
capabilities:
|
|
||||||
- all
|
|
||||||
- name: poweroff
|
|
||||||
image: linuxkit/poweroff:afe8f7dd0d47a7991c54519b0f09124cb8c4e300
|
|
||||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
|
||||||
trust:
|
|
||||||
org:
|
|
||||||
- linuxkit
|
|
Loading…
Reference in New Issue
Block a user