Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add s390 buildroot and qemu commands #28

Merged
merged 2 commits into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Required parameters:
* ppc64
* ppc64le
* riscv
* s390
* x86
* x86_64

Expand Down
8 changes: 7 additions & 1 deletion boot-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using "-smp", as done on x86-64 AFAIKs might reduce boot times further. SMP under QEMU/TCG with MTTCG (one thread per vCPU, usually the default) has been working reliably for some years now.

;;

x86 | x86_64)
KIMAGE=bzImage
APPEND_STRING+="console=ttyS0 "
Expand Down
2 changes: 1 addition & 1 deletion buildroot/rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions buildroot/s390.config
Original file line number Diff line number Diff line change
@@ -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
Binary file added images/s390/rootfs.cpio.zst
Binary file not shown.