add s390 buildroot and qemu commands#28
Merged
Merged
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.
Member
Author
nathanchance
approved these changes
Jan 8, 2021
nathanchance
left a comment
Member
There was a problem hiding this comment.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.