diff --git a/README.txt b/README.txt index dd48137..18fd724 100644 --- a/README.txt +++ b/README.txt @@ -15,6 +15,7 @@ Required parameters: * ppc64 * ppc64le * riscv + * s390 * x86 * x86_64 diff --git a/boot-qemu.sh b/boot-qemu.sh index bd55f1b..da3669c 100755 --- a/boot-qemu.sh +++ b/boot-qemu.sh @@ -29,7 +29,7 @@ function parse_parameters() { -a | --arch | --architecture) shift case ${1} in - arm32_v5 | arm32_v6 | arm32_v7 | arm64 | mips | mipsel | ppc32 | ppc64 | ppc64le | riscv | x86 | x86_64) ARCH=${1} ;; + arm32_v5 | arm32_v6 | arm32_v7 | arm64 | mips | mipsel | ppc32 | ppc64 | ppc64le | riscv | s390 | x86 | x86_64) ARCH=${1} ;; *) die "Invalid --arch value '${1}'" ;; esac ;; @@ -203,6 +203,12 @@ function setup_qemu_args() { QEMU=(qemu-system-riscv64) ;; + s390) + KIMAGE=bzImage + QEMU_ARCH_ARGS=(-M s390-ccw-virtio) + QEMU=(qemu-system-s390x) + ;; + x86 | x86_64) KIMAGE=bzImage APPEND_STRING+="console=ttyS0 " diff --git a/buildroot/rebuild.sh b/buildroot/rebuild.sh index 04e4282..fa898e9 100755 --- a/buildroot/rebuild.sh +++ b/buildroot/rebuild.sh @@ -32,7 +32,7 @@ CONFIGS=() while ((${#})); do case ${1} in all) for CONFIG in *.config; do CONFIGS+=("../${CONFIG}"); done ;; - arm64 | arm | mips | mipsel | ppc32 | ppc64 | ppc64le | riscv | x86 | x86_64) CONFIGS+=("../${1}.config") ;; + arm64 | arm | mips | mipsel | ppc32 | ppc64 | ppc64le | riscv | s390 | x86 | x86_64) CONFIGS+=("../${1}.config") ;; *) die "Unknown parameter '${1}', exiting!" ;; esac shift diff --git a/buildroot/s390.config b/buildroot/s390.config new file mode 100644 index 0000000..dbb416f --- /dev/null +++ b/buildroot/s390.config @@ -0,0 +1,15 @@ +BR2_s390x=y +BR2_OPTIMIZE_3=y +BR2_KERNEL_HEADERS_4_4=y +BR2_GCC_VERSION_8_X=y +BR2_TARGET_GENERIC_ROOT_PASSWD="root" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_OVERLAY="../overlay-poweroff" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_BASH=y +BR2_TARGET_ROOTFS_CPIO=y +# glibc required for s390, as per Ulrich Weigand. +BR2_TOOLCHAIN_USES_GLIBC=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc" +# BR2_TARGET_ROOTFS_TAR is not set diff --git a/images/s390/rootfs.cpio.zst b/images/s390/rootfs.cpio.zst new file mode 100644 index 0000000..9f8e97e Binary files /dev/null and b/images/s390/rootfs.cpio.zst differ