mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Add s390 support for linuxkit kernel
Update building process to add s390 support. The patch serial-forbid-8250-on-s390.patch has been added to disable 8250 serial for s390. The patch is available upstream https://patchwork.kernel.org/patch/10106437/ but it is not backported. Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
This commit is contained in:
parent
adebf0377c
commit
db0045b0c9
@ -91,6 +91,9 @@ RUN case $(uname -m) in \
|
||||
aarch64) \
|
||||
KERNEL_DEF_CONF=/linux/arch/arm64/configs/defconfig; \
|
||||
;; \
|
||||
s390x) \
|
||||
KERNEL_DEF_CONF=/linux/arch/s390/defconfig; \
|
||||
;; \
|
||||
esac && \
|
||||
cp /config-${KERNEL_SERIES}-$(uname -m) ${KERNEL_DEF_CONF}; \
|
||||
if [ -n "${EXTRA}" ] && [ -f "/config-${KERNEL_SERIES}-$(uname -m)${EXTRA}" ]; then \
|
||||
@ -116,6 +119,9 @@ RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
|
||||
aarch64) \
|
||||
cp arch/arm64/boot/Image.gz /out/kernel; \
|
||||
;; \
|
||||
s390x) \
|
||||
cp arch/s390/boot/bzImage /out/kernel; \
|
||||
;; \
|
||||
esac && \
|
||||
cp System.map /out && \
|
||||
([ -n "${DEBUG}" ] && cp vmlinux /out || true)
|
||||
|
@ -36,6 +36,7 @@ RUN set -e && \
|
||||
fi && \
|
||||
[ ! -f /config-${SERIES}-x86_64 ] || mv /config-${SERIES}-x86_64 arch/x86/configs/x86_64_defconfig && \
|
||||
[ ! -f /config-${SERIES}-aarch64 ] || mv /config-${SERIES}-aarch64 arch/arm64/configs/defconfig ; \
|
||||
[ ! -f /config-${SERIES}-s390x ] || mv /config-${SERIES}-s390x arch/s390/defconfig; \
|
||||
done
|
||||
|
||||
ENTRYPOINT ["/bin/sh"]
|
||||
|
@ -47,6 +47,9 @@ endif
|
||||
ifeq ($(ARCH),aarch64)
|
||||
SUFFIX=-arm64
|
||||
endif
|
||||
ifeq ($(ARCH),s390x)
|
||||
SUFFIX=-s390x
|
||||
endif
|
||||
|
||||
TAG=$(HASH)$(DIRTY)
|
||||
|
||||
@ -216,10 +219,12 @@ endef
|
||||
#
|
||||
$(eval $(call kernel,4.15.7,4.15.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,4.14.23,4.14.x,$(EXTRA),$(DEBUG)))
|
||||
|
||||
ifneq ($(ARCH),s390x)
|
||||
$(eval $(call kernel,4.14.23,4.14.x,,-dbg))
|
||||
$(eval $(call kernel,4.14.18,4.14.x,-rt,))
|
||||
$(eval $(call kernel,4.9.85,4.9.x,$(EXTRA),$(DEBUG)))
|
||||
|
||||
endif
|
||||
ifeq ($(ARCH),x86_64)
|
||||
$(eval $(call kernel,4.4.119,4.4.x,$(EXTRA),$(DEBUG)))
|
||||
endif
|
||||
|
3533
kernel/config-4.14.x-s390x
Normal file
3533
kernel/config-4.14.x-s390x
Normal file
File diff suppressed because it is too large
Load Diff
3568
kernel/config-4.15.x-s390x
Normal file
3568
kernel/config-4.15.x-s390x
Normal file
File diff suppressed because it is too large
Load Diff
34
kernel/patches-4.14.x/0019-serial-forbid-8250-on-s390.patch
Normal file
34
kernel/patches-4.14.x/0019-serial-forbid-8250-on-s390.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 1598e38c0770b08c4d6371b670f9ee61a42ec68b Mon Sep 17 00:00:00 2001
|
||||
From: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Date: Tue, 12 Dec 2017 09:08:35 +0100
|
||||
Subject: [PATCH] serial: forbid 8250 on s390
|
||||
|
||||
Using "make kvmconfig" results in a potentially unusable linux image
|
||||
on s390. The reason is that both the (default on s390) sclp consoles
|
||||
as well as the 8250 console register a ttyS<x> as console. Since there
|
||||
will be no 8250 on s390 let's fence 8250. This will ensure that there
|
||||
is always a working sclp console.
|
||||
|
||||
Reported-by: Alice Frosi <alice@linux.vnet.ibm.com>
|
||||
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/tty/serial/8250/Kconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
|
||||
index a5c0ef1e7695..16b1496e6105 100644
|
||||
--- a/drivers/tty/serial/8250/Kconfig
|
||||
+++ b/drivers/tty/serial/8250/Kconfig
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config SERIAL_8250
|
||||
tristate "8250/16550 and compatible serial support"
|
||||
+ depends on !S390
|
||||
select SERIAL_CORE
|
||||
---help---
|
||||
This selects whether you want to include the driver for the standard
|
||||
--
|
||||
2.13.5
|
||||
|
34
kernel/patches-4.15.x/0001-serial-forbid-8250-on-s390.patch
Normal file
34
kernel/patches-4.15.x/0001-serial-forbid-8250-on-s390.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 1598e38c0770b08c4d6371b670f9ee61a42ec68b Mon Sep 17 00:00:00 2001
|
||||
From: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Date: Tue, 12 Dec 2017 09:08:35 +0100
|
||||
Subject: [PATCH] serial: forbid 8250 on s390
|
||||
|
||||
Using "make kvmconfig" results in a potentially unusable linux image
|
||||
on s390. The reason is that both the (default on s390) sclp consoles
|
||||
as well as the 8250 console register a ttyS<x> as console. Since there
|
||||
will be no 8250 on s390 let's fence 8250. This will ensure that there
|
||||
is always a working sclp console.
|
||||
|
||||
Reported-by: Alice Frosi <alice@linux.vnet.ibm.com>
|
||||
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/tty/serial/8250/Kconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
|
||||
index a5c0ef1e7695..16b1496e6105 100644
|
||||
--- a/drivers/tty/serial/8250/Kconfig
|
||||
+++ b/drivers/tty/serial/8250/Kconfig
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config SERIAL_8250
|
||||
tristate "8250/16550 and compatible serial support"
|
||||
+ depends on !S390
|
||||
select SERIAL_CORE
|
||||
---help---
|
||||
This selects whether you want to include the driver for the standard
|
||||
--
|
||||
2.13.5
|
||||
|
Loading…
Reference in New Issue
Block a user