-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
The SystemZ maintainer in LLVM, Ulrich Weigand, sugguested that buildroot should work if manually switched to use glibc. Add a buildroot config, and qemu command to boot. Currently require's David Hildenbrand <david@redhat.com>'s QEMU patches at https://lists.nongnu.org/archive/html/qemu-s390x/2021-01/msg00035.html to boot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
For others wanting to test this, grab b4
and run the following commands (assuming that ninja
, s390x-linux-gnu
tools, and clang
are in your PATH
).
Building QEMU:
$ git clone --recursive https://git.qemu.org/git/qemu.git
$ cd qemu
$ b4 am -o - https://lore.kernel.org/qemu-devel/20210108132049.8501-1-david@redhat.com/ | git apply -3v
$ mkdir build
$ cd build
$ ../configure --target-list=s390x-softmmu
$ ninja
Building Linux:
$ cd ../..
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
$ cd linux
$ make -skj"$(nproc)" ARCH=s390 CC=clang CROSS_COMPILE=s390x-linux-gnu- O=out/s390 distclean defconfig bzImage
Testing it all with this pull:
$ cd ..
$ git clone -b buildroot_2020_11 https://github.com/ClangBuiltLinux/boot-utils
$ PATH=${PWD}/qemu/build:${PATH} boot-utils/boot-qemu.sh -a s390 -k linux/out/s390 -t 45s
QEMU patches were reviewed, so they should land in qemu/master in a 1-3 weeks. |
s390) | ||
KIMAGE=bzImage | ||
QEMU_ARCH_ARGS=(-M s390-ccw-virtio) | ||
QEMU=(qemu-system-s390x) |
There was a problem hiding this comment.
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.
The SystemZ maintainer in LLVM, Ulrich Weigand, sugguested that
buildroot should work if manually switched to use glibc.
Add a buildroot config, and qemu command to boot.
Currently require's David Hildenbrand david@redhat.com's QEMU patches
at
https://lists.nongnu.org/archive/html/qemu-s390x/2021-01/msg00035.html
to boot.