mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
kernel: Remove support for v5.3.x kernels
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
This commit is contained in:
parent
4a06b88d1e
commit
c6164a4ca5
@ -253,7 +253,6 @@ endef
|
|||||||
#
|
#
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
$(eval $(call kernel,5.4.4,5.4.x,$(EXTRA),$(DEBUG)))
|
$(eval $(call kernel,5.4.4,5.4.x,$(EXTRA),$(DEBUG)))
|
||||||
$(eval $(call kernel,5.3.17,5.3.x,$(EXTRA),$(DEBUG)))
|
|
||||||
$(eval $(call kernel,4.19.90,4.19.x,$(EXTRA),$(DEBUG)))
|
$(eval $(call kernel,4.19.90,4.19.x,$(EXTRA),$(DEBUG)))
|
||||||
$(eval $(call kernel,4.19.90,4.19.x,,-dbg))
|
$(eval $(call kernel,4.19.90,4.19.x,,-dbg))
|
||||||
$(eval $(call kernel,4.19.59,4.19.x,-rt,))
|
$(eval $(call kernel,4.19.59,4.19.x,-rt,))
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,55 +0,0 @@
|
|||||||
From b0d01878810994958fccb117030fefb250f9f949 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Matt Redfearn <matt.redfearn@mips.com>
|
|
||||||
Date: Wed, 3 Jan 2018 09:57:30 +0000
|
|
||||||
Subject: [PATCH] include/uapi/linux/swab: Fix potentially missing
|
|
||||||
__always_inline
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Commit bc27fb68aaad ("include/uapi/linux/byteorder, swab: force inlining
|
|
||||||
of some byteswap operations") added __always_inline to swab functions
|
|
||||||
and commit 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to
|
|
||||||
userspace headers") added a definition of __always_inline for use in
|
|
||||||
exported headers when the kernel's compiler.h is not available.
|
|
||||||
|
|
||||||
However, since swab.h does not include stddef.h, if the header soup does
|
|
||||||
not indirectly include it, the definition of __always_inline is missing,
|
|
||||||
resulting in a compilation failure, which was observed compiling the
|
|
||||||
perf tool using exported headers containing this commit:
|
|
||||||
|
|
||||||
In file included from /usr/include/linux/byteorder/little_endian.h:12:0,
|
|
||||||
from /usr/include/asm/byteorder.h:14,
|
|
||||||
from tools/include/uapi/linux/perf_event.h:20,
|
|
||||||
from perf.h:8,
|
|
||||||
from builtin-bench.c:18:
|
|
||||||
/usr/include/linux/swab.h:160:8: error: unknown type name ‘__always_inline’
|
|
||||||
static __always_inline __u16 __swab16p(const __u16 *p)
|
|
||||||
|
|
||||||
Fix this by replacing the inclusion of linux/compiler.h with
|
|
||||||
linux/stddef.h to ensure that we pick up that definition if required,
|
|
||||||
without relying on it's indirect inclusion. compiler.h is then included
|
|
||||||
indirectly, via stddef.h.
|
|
||||||
|
|
||||||
Fixes: 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to userspace headers")
|
|
||||||
Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
|
|
||||||
---
|
|
||||||
include/uapi/linux/swab.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
|
|
||||||
index 23cd84868cc3..f6a8cf737abf 100644
|
|
||||||
--- a/include/uapi/linux/swab.h
|
|
||||||
+++ b/include/uapi/linux/swab.h
|
|
||||||
@@ -3,7 +3,7 @@
|
|
||||||
#define _UAPI_LINUX_SWAB_H
|
|
||||||
|
|
||||||
#include <linux/types.h>
|
|
||||||
-#include <linux/compiler.h>
|
|
||||||
+#include <linux/stddef.h>
|
|
||||||
#include <asm/swab.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
--
|
|
||||||
2.24.0
|
|
||||||
|
|
@ -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:5.3.17
|
|
||||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
|
||||||
init:
|
|
||||||
- linuxkit/init:a4fcf333298f644dfac6adf680b83140927aa85e
|
|
||||||
- linuxkit/runc:69b4a35eaa22eba4990ee52cccc8f48f6c08ed03
|
|
||||||
onboot:
|
|
||||||
- name: check-kernel-config
|
|
||||||
image: linuxkit/test-kernel-config:94fdeb494e09200fc05b6da39822aabfaca234e4
|
|
||||||
- name: poweroff
|
|
||||||
image: linuxkit/poweroff:b498d30dd9660090565537fceb9e757618737a85
|
|
||||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
|
||||||
trust:
|
|
||||||
org:
|
|
||||||
- linuxkit
|
|
@ -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:5.3.17 AS ksrc
|
|
||||||
|
|
||||||
# Extract headers and compile module
|
|
||||||
FROM linuxkit/alpine:3fdc49366257e53276c6f363956a4353f95d9a81 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.9
|
|
||||||
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:5.3.17
|
|
||||||
# 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:5.3.17
|
|
||||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
|
||||||
init:
|
|
||||||
- linuxkit/init:a4fcf333298f644dfac6adf680b83140927aa85e
|
|
||||||
- linuxkit/runc:69b4a35eaa22eba4990ee52cccc8f48f6c08ed03
|
|
||||||
onboot:
|
|
||||||
- name: check
|
|
||||||
image: kmod-test
|
|
||||||
binds:
|
|
||||||
- /dev:/dev
|
|
||||||
- /lib/modules:/lib/modules
|
|
||||||
capabilities:
|
|
||||||
- all
|
|
||||||
- name: poweroff
|
|
||||||
image: linuxkit/poweroff:b498d30dd9660090565537fceb9e757618737a85
|
|
||||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
|
||||||
trust:
|
|
||||||
org:
|
|
||||||
- linuxkit
|
|
Loading…
Reference in New Issue
Block a user