No description
Find a file
Mathieu Benoit dcaa55b19a [ADD] host deps: the tools six packages needed and nobody declared
--nodeps means every makedepend must be named here by hand. Seven builds
stopped on one, each naming a different tool: itstool, convert, fig2dev,
asciidoctor, libnsl, python -m build, libbpf, history.

The list was also a lie by omission. libreadline-dev, libncurses-dev,
zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and
libcap2-bin were on this VM by hand and never declared. They made the
builds pass here and would fail on a fresh Ubuntu, for reasons that have
nothing to do with s390x.

history.pc is generated rather than copied: our own readline package
ships a correct one, but its libdir names /usr/lib, which on a multiarch
host holds no libhistory. The .pc has to describe THIS host.

Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x
does not have -- and says "python3 is missing modules: elftools", which
sends you to apt for four lines before admitting the real reason.

--- FR ---

--nodeps veut dire que chaque makedepend doit être nommé ici à la main.
Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant
un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl,
python -m build, libbpf, history.

La liste mentait aussi par omission. libreadline-dev, libncurses-dev,
zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et
libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils
faisaient passer les compilations ici et auraient échoué sur un Ubuntu
neuf, pour des raisons étrangères à s390x.

history.pc est généré et non copié : notre propre paquet readline en
livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte
multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci.

Trois crochets pour ce qu'apt n'achète pas. systemd réclame une
architecture EFI que s390x n'a pas — et annonce « python3 is missing
modules: elftools », ce qui envoie chez apt pour quatre lignes avant
d'avouer la vraie raison.

Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
.github/workflows making the house a home 2026-01-27 23:26:31 +01:00
arch-kernel making the house a home 2026-01-27 23:26:31 +01:00
boot making the house a home 2026-01-27 23:26:31 +01:00
patches [ADD] host deps: the tools six packages needed and nobody declared 2026-08-17 01:33:41 -04:00
scripts [ADD] host deps: the tools six packages needed and nobody declared 2026-08-17 01:33:41 -04:00
.env.example full boot with systemd 2025-06-05 12:32:34 +02:00
.gitignore making the house a home 2026-01-27 23:26:31 +01:00
CODEOWNERS making the house a home 2026-01-27 23:26:31 +01:00
Containerfile making the house a home 2026-01-27 23:26:31 +01:00
LICENSE use arch kernel patches 2025-06-02 21:53:33 +02:00
Makefile making the house a home 2026-01-27 23:26:31 +01:00
README.md making the house a home 2026-01-27 23:26:31 +01:00
TODO.md [ADD] TODO.md: track every divergence from upstream Arch 2026-08-16 05:47:47 -04:00

Arch Linux s390x

A port of Arch Linux to IBM s390x mainframe architecture with systemd support.

Boots a full Arch Linux system on IBM mainframes (or QEMU s390x emulation) using a hybrid build: cross-compilation for the kernel, native s390x compilation on z/VM for userspace.

Quick Start

make container        # build dev container (first time)
cp .env.example .env  # configure z/VM access
make all              # build kernel + initramfs + systemd
make test-systemd     # boot it

What Works

  • Arch Linux kernel 6.18.6-arch1 with Arch patches, cross-compiled
  • Initramfs via modified mkinitcpio
  • Static busybox built natively on z/VM, 2.3MB
  • Root filesystem with ext4, switch_root to real rootfs
  • Systemd as PID 1

Pacman, bash, and GNU coreutils are not yet ported.

Build System

The build uses two tiers:

Cross-compilation (x86_64 host): Kernel is built in a Fedora 43 container with s390x-linux-gnu-gcc. Initramfs is generated with a patched mkinitcpio that handles cross-architecture binary injection.

Native compilation (s390x z/VM): Busybox and systemd must be built on real s390x hardware. The z/VM system runs RHEL 9.6 with GCC 11.5.0. Scripts handle SSH deployment and retrieval automatically via .env configuration.