No description
Find a file
Mathieu Benoit 0e00b161c4 [FIX] the chroot had no /dev/shm, and systemd links man pages too
nss failed with

  ImportError: This platform lacks a functioning sem_open implementation.
  https://github.com/python/cpython/issues/48020

multiprocessing.Semaphore is built on POSIX named semaphores, which glibc
implements as files under /dev/shm. The chroot had no such mount, sem_open
returned ENOSYS, and CPython reported it as the PLATFORM lacking the feature --
which reads like an s390x limitation and is a missing tmpfs.

`mount --bind /dev` does not carry submounts. That is why /dev/pts already had a
line of its own, and /dev/shm was simply missing from the same list. Mounted as
its own tmpfs, mode 1777, and added to the umount order ahead of /dev.

systemd's man page hook listed mv and rm and missed ln, so package_systemd() got
one step further and stopped on a symlink between two man pages where neither
exists. Sixteenth instance, and the lesson is narrower than the last: the
procedure said grep for the output PATHS, and the paths were found -- what was
missed was a VERB. Seven moves and links now, up from five.

--- FR ---

nss échouait sur

  ImportError: This platform lacks a functioning sem_open implementation.
  https://github.com/python/cpython/issues/48020

multiprocessing.Semaphore repose sur les sémaphores nommés POSIX, que glibc
implémente en fichiers sous /dev/shm. Le chroot n'avait pas ce montage, sem_open
renvoyait ENOSYS, et CPython l'a rapporté comme une absence de la PLATEFORME — ce
qui se lit comme une limite de s390x et n'est qu'un tmpfs manquant.

`mount --bind /dev` ne porte pas les sous-montages. C'est pourquoi /dev/pts avait
déjà sa ligne, et /dev/shm manquait simplement dans la même liste. Monté en tmpfs
propre, mode 1777, et ajouté au démontage avant /dev.

Le hook des pages de manuel de systemd listait mv et rm et oubliait ln :
package_systemd() est allé un cran plus loin et s'est arrêté sur un lien entre
deux pages dont aucune n'existe. Seizième occurrence, et la leçon est plus fine
que la précédente : la procédure disait de chercher les CHEMINS de sortie, et les
chemins étaient trouvés — ce qui manquait était un VERBE. Sept déplacements et
liens désormais, contre cinq.

Assisted-by: Claude Opus 5
2026-08-24 00:29:13 -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 [FIX] the chroot had no /dev/shm, and systemd links man pages too 2026-08-24 00:29:13 -04:00
scripts [FIX] the chroot had no /dev/shm, and systemd links man pages too 2026-08-24 00:29:13 -04:00
.env.example [ADD] upstream.lock, and keep the machine out of the repository 2026-08-22 22:52:04 -04: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
RELAIS.md [ADD] upstream.lock, and keep the machine out of the repository 2026-08-22 22:52:04 -04:00
TODO.md [FIX] help2man was uninstallable, which stopped the whole pass 2026-08-21 00:33:07 -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.