Merge pull request #2939 from alicefr/support_s390_kernel

Add s390 support for linuxkit kernel
This commit is contained in:
Rolf Neugebauer 2018-03-02 15:56:11 +00:00 committed by GitHub
commit 6de74c2883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7182 additions and 1 deletions

View File

@ -91,6 +91,9 @@ RUN case $(uname -m) in \
aarch64) \ aarch64) \
KERNEL_DEF_CONF=/linux/arch/arm64/configs/defconfig; \ KERNEL_DEF_CONF=/linux/arch/arm64/configs/defconfig; \
;; \ ;; \
s390x) \
KERNEL_DEF_CONF=/linux/arch/s390/defconfig; \
;; \
esac && \ esac && \
cp /config-${KERNEL_SERIES}-$(uname -m) ${KERNEL_DEF_CONF}; \ cp /config-${KERNEL_SERIES}-$(uname -m) ${KERNEL_DEF_CONF}; \
if [ -n "${EXTRA}" ] && [ -f "/config-${KERNEL_SERIES}-$(uname -m)${EXTRA}" ]; then \ 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) \ aarch64) \
cp arch/arm64/boot/Image.gz /out/kernel; \ cp arch/arm64/boot/Image.gz /out/kernel; \
;; \ ;; \
s390x) \
cp arch/s390/boot/bzImage /out/kernel; \
;; \
esac && \ esac && \
cp System.map /out && \ cp System.map /out && \
([ -n "${DEBUG}" ] && cp vmlinux /out || true) ([ -n "${DEBUG}" ] && cp vmlinux /out || true)

View File

@ -36,6 +36,7 @@ RUN set -e && \
fi && \ fi && \
[ ! -f /config-${SERIES}-x86_64 ] || mv /config-${SERIES}-x86_64 arch/x86/configs/x86_64_defconfig && \ [ ! -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}-aarch64 ] || mv /config-${SERIES}-aarch64 arch/arm64/configs/defconfig ; \
[ ! -f /config-${SERIES}-s390x ] || mv /config-${SERIES}-s390x arch/s390/defconfig; \
done done
ENTRYPOINT ["/bin/sh"] ENTRYPOINT ["/bin/sh"]

View File

@ -47,6 +47,9 @@ endif
ifeq ($(ARCH),aarch64) ifeq ($(ARCH),aarch64)
SUFFIX=-arm64 SUFFIX=-arm64
endif endif
ifeq ($(ARCH),s390x)
SUFFIX=-s390x
endif
TAG=$(HASH)$(DIRTY) TAG=$(HASH)$(DIRTY)
@ -216,10 +219,12 @@ endef
# #
$(eval $(call kernel,4.15.7,4.15.x,$(EXTRA),$(DEBUG))) $(eval $(call kernel,4.15.7,4.15.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.23,4.14.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.23,4.14.x,,-dbg))
$(eval $(call kernel,4.14.18,4.14.x,-rt,)) $(eval $(call kernel,4.14.18,4.14.x,-rt,))
$(eval $(call kernel,4.9.85,4.9.x,$(EXTRA),$(DEBUG))) $(eval $(call kernel,4.9.85,4.9.x,$(EXTRA),$(DEBUG)))
endif
ifeq ($(ARCH),x86_64) ifeq ($(ARCH),x86_64)
$(eval $(call kernel,4.4.119,4.4.x,$(EXTRA),$(DEBUG))) $(eval $(call kernel,4.4.119,4.4.x,$(EXTRA),$(DEBUG)))
endif endif

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

File diff suppressed because it is too large Load Diff

View 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

View 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