Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

S390 support#229

Merged
nathanchance merged 4 commits into
ClangBuiltLinux:masterfrom
nathanchance:s390
Feb 8, 2020
Merged

S390 support#229
nathanchance merged 4 commits into
ClangBuiltLinux:masterfrom
nathanchance:s390

Conversation

@nathanchance

Copy link
Copy Markdown
Member

Some architectures like hexagon and s390 will skip booting with QEMU for
the time being.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
We do not boot with QEMU because it only supports MARCH_Z900, which is
disabled with clang:

https://github.com/groeck/linux-build-test/blob/b8650ca8cdef921992b71db582b9bbdc4efb0ab3/rootfs/s390/run-qemu-s390.sh#L22
https://git.kernel.org/linus/c263a4e990b7296b074e33aa077239a0a28a818e

We do not use llvm-objdump for the time being because of
ClangBuiltLinux/linux#859.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Presubmit: https://travis-ci.com/nathanchance/continuous-integration/builds/147875953

[skip ci]

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
@nickdesaulniers

Copy link
Copy Markdown
Member

it doesn't boot? (we could reuse that qemu skip for hexagon (cc @androm3da )

@nathanchance

Copy link
Copy Markdown
Member Author

@nickdesaulniers

Copy link
Copy Markdown
Member

but it looks like @groeck still boot tests s390, he just does defconfig+CONFIG_MARCH_Z900=y, which is what we should do, too.

We already do this for a few arch's, a la:

[[ $ARCH == "arm" ]] && ./scripts/config -d CONFIG_FTRACE

@nathanchance

Copy link
Copy Markdown
Member Author

We can’t do that with clang because of https://git.kernel.org/linus/c263a4e990b7296b074e33aa077239a0a28a818e.

Comment thread .travis.yml Outdated
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Comment thread driver.sh
@tpimh

tpimh commented Feb 7, 2020

Copy link
Copy Markdown
Contributor

Instead of db908a6 we should add qemu-system-misc package to dockerimage, create a rootfs image (need some research, s390 support seems to be removed from buildroot: buildroot/buildroot@b24c321) and run it like this:
qemu-system-s390x -m 512m -machine s390-ccw-virtio -initrd images/s390/rootfs.cpio -display none -serial mon:stdio -kernel linux/arch/s390/boot/bzImage

@tpimh

tpimh commented Feb 7, 2020

Copy link
Copy Markdown
Contributor

I wonder if we can use initrd from moonbuggy image from the 2014 QEMU Advent Calendar

@tpimh

tpimh commented Feb 8, 2020

Copy link
Copy Markdown
Contributor

Just checked the moonbuggy image, it's not very useful: only a couple shared libraries and a game binary as init. I'm now checking out gentoo netboot initramfs for s390x, it has busybox in it.

@nickdesaulniers nickdesaulniers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's merge this and start build testing asap while the qemu details are being worked out. Thanks @nathanchance and @tpimh for pursuing this!

@tpimh

tpimh commented Feb 8, 2020

Copy link
Copy Markdown
Contributor

Just built the kernel, tried to boot with QEMU, got Kernel fault:

KASLR disabled: CPU has no PRNG
Linux version 5.5.0-gf75716570 (driver@clangbuiltlinux) #1 SMP Thu Jan 1 00:00:00 UTC 1970Kernel fault: interruption code 0005 ilc:2
PSW : 0000200180000000 00000000000175d4
      R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
GPRS: 00000000fffffff8 0000000c00000009 00000003fffffff4 0000000000000008
      0000000000000010 00000000fffffff0 00000000fffffff4 0000000000000004
      000000000000000c 0000000000000000 00000000fffffffc 00000000009495a8
      0000000000000002 0000000000000001 0000000000000000 000000000000bb58

At least the console is functional.

@nathanchance nathanchance merged commit 4e86683 into ClangBuiltLinux:master Feb 8, 2020
@nathanchance nathanchance deleted the s390 branch February 8, 2020 23:49
@tpimh tpimh mentioned this pull request Feb 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

s390 support

3 participants