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

Conversation

nickdesaulniers
Copy link
Member

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.

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.
@nickdesaulniers
Copy link
Member Author

cc @davidhildenbrand

@nickdesaulniers nickdesaulniers changed the title upgrade buildroot and add s390 buildroot and qemu commands add s390 buildroot and qemu commands Jan 8, 2021
Copy link
Member

@nathanchance nathanchance left a 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

@nickdesaulniers nickdesaulniers merged commit 0ac71e4 into master Jan 8, 2021
@nickdesaulniers nickdesaulniers deleted the buildroot_2020_11 branch January 8, 2021 20:59
This was referenced Jan 8, 2021
@davidhildenbrand
Copy link

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)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants