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 support for s390x (IBM z/Arch) #296

Closed
crazy-max opened this issue May 21, 2020 · 8 comments
Closed

Add support for s390x (IBM z/Arch) #296

crazy-max opened this issue May 21, 2020 · 8 comments

Comments

@crazy-max
Copy link

crazy-max commented May 21, 2020

Hi,

It would be nice to bring support for s390x platform like you have done for ppc64le (IBM Power). Thanks!

@skarnet
Copy link
Contributor

skarnet commented Jan 20, 2022

With v3.0.0.0 out, supporting a new architecture is only a matter of building a musl cross-toolchain for that architecture. I will try to build a s390x toolchain.

@crazy-max
Copy link
Author

crazy-max commented Jan 20, 2022

This is supported with my alpine-s6 docker image with 2.2.0.3 but will refactor a bit for 3.0.0.0 and also use a proper toolchain to avoid using QEMU. Thanks for your work on this @skarnet

@skarnet
Copy link
Contributor

skarnet commented Jan 20, 2022

The build system has been greatly simplified; you won't need qemu or anything with 3.0.0.0, you will just need a proper toolchain and make. And since by default the build system fetches toolchains from my site, I need to make one available there for every supported architecture 😅

@crazy-max
Copy link
Author

Roh wonderful!

@skarnet
Copy link
Contributor

skarnet commented Jan 24, 2022

I added a s390x target in the latest git, with a toolchain that targets z196 or higher (similar to what Alpine does). Please tell me if it works for you.

@crazy-max
Copy link
Author

d480b99 lgtm thx.

#22 0.091 + make 'VERSION=3.0.0.0' 'OUTPUT=/out' 'ARCH=s390x-linux-musl'
#22 0.100 exec mkdir -p /out/sources
#22 0.101 cd /out/sources && wget https://skarnet.org/toolchains/cross/s390x-linux-musl_z196-11.2.0.tar.xz
#22 0.222 Connecting to skarnet.org (95.142.172.232:443)
#22 0.366 saving to 's390x-linux-musl_z196-11.2.0.tar.xz'
#22 0.392 s390x-linux-musl_z19   0% |                                |  8192  1:17:49 ETA
#22 1.397 s390x-linux-musl_z19  18% |*****                           | 6760k  0:00:09 ETA
#22 2.411 s390x-linux-musl_z19  32% |**********                      | 11.9M  0:00:06 ETA
#22 3.404 s390x-linux-musl_z19  44% |**************                  | 16.3M  0:00:04 ETA
...
$ docker run --rm -it --entrypoint s6-ps alpine-s6:local
WARNING: The requested image's platform (linux/s390x) does not match the detected host platform (linux/amd64) and no specific platform was requested
USER  PID  TTY    STAT  START     COMMAND
root    1  pts/0  Rsl+  15:31:51  /usr/bin/qemu-s390x /usr/bin/s6-ps

@crazy-max
Copy link
Author

btw, is there a test suite we could run to check if everything is ok?

@skarnet
Copy link
Contributor

skarnet commented Jan 25, 2022

Not that I know of, but booting an s6-overlay container with /init as the entrypoint and s6-ps as CMD should show very quickly if anything's wrong. ;-)

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

No branches or pull requests

2 participants