2024-q1

Fri, 05 Apr 2024 13:07:00 +0200

Hello! Welcome to a new qoth. This qoth covers new and interesting GNU/Hurd developments in Q1 of 2024! Details.

Etienne Brateau modified console-client to use xkbcommon instead of x11 for xkb extended support, which improves keyboard layout coverage a lot!

Flavio Cruz also worked on porting GDB to the 64-bit Hurd, implemented setcontext/getcontext/makecontext/swapcontex () in glibc, and implemented child process resource accounting. The latter implementsgetrusage(RUSAGE_CHILDREN, ) and populates child related data in times().

He fixed the perl testsuite for the Hurd, and he also posted a RFC to enhance tracing utilities, which he used to port the RPC format to 64 bit.

Flavio also had a smattering of fixes here, here, here, here, and here.

Damien Zammit had some fixes including fixing the console with APIC enabled, patching GNU Mach to support ACPI v2, fixing baud rate on com ports, porting the Hurd to some AMD CPUs (WIP), adding HPET (high precision timers). He also worked on making ext2fs use xattr by default to store translators.

Damien also worked on more SMP fixes here, here, here, here, here, and here. Hurd currently boots in SMP mode on the BSP. Damien wrote a test program that lets you run a task on the APs.

Sergey Bugaev patched binutils to support the GNU/Hurd on AArch64, and he wrote some patches to make the Hurd easier to port here, here, and here,

Sergey also posted a fairly large RFC patch series for his AArch64 port. He writes:

MIG seems to just work (thanks to all of Flávio's work!). I'm using
 the same message ABI as on x86_64, and haven't seen any issues so far
 — neither compiler errors / failed static assertions (about struct
 sizes and such), nor hardware errors from misaligned accesses.

He also mentions that "the hardware hardening features (BTI, MTE, PAC) are currently 'not really supported', but I do want to support them in the future." Samuel merged many of the patches.

In Sergey's later glibc patch series, he wrote about the AArch64 port progress. He wrote:

Last time, there was no AArch64 port of GNU Mach, and so the only testing
 I have done was running a simple statically-linked executable on Linux under
 GDB, which, nevertheless, helped me identify and fix a number of issues.

 Since then, however, I have been (some may say, relentlessly) working on
 filling in the missing piece, namely porting GNU Mach (with important help &
 contributions by Luca D.). I am happy to report that we now have an
 experimental port of GNU Mach that builds and works on AArch64! While that may
 sound impressive, note that various things about it are in an extremely basic,
 proof-of-concept state rather than being seriously production-ready; and also
 that Mach is a small kernel (indeed, a microkernel), and it was designed from
 the start (back in the 80s) to be portable, so most of the "buisness logic"
 functionality (virtual memory, IPC, tasks/threads/scheduler) is explicitly
 arch-independent.

 Despite the scary "WIP proof-of-concept" status, there is enough
 functionality in Mach to run userland code, handle exceptions and
 syscalls, interact with the MMU to implement all the expected virtual
 memory semantics, schedule/switch tasks and threads, and so on.
 Moreover, all of GNU Mach's userspace self-tests pass!

 This meant there was enough things in place for me to try running
 glibc on it, and the amazing thing is my simple test executable, the
 same one I previously tested on Linux with GDB, just worked on real
 Mach without me having to make any additional changes to the glibc
 side, or even recompile it.

 But I did not stop there, and I got several of the core Hurd servers
 working!  Namely, these are ext2fs, exec, startup, auth, and proc
 servers. All of them but ext2fs are dynamically linked; ld
 aarch64.so.1 sucessfully locates and maps the programs themselves
 and their required dependencies, and Mach pages in code and data
 pages from ext2fs as they are accessed, transparently to the
 program, just as one would expect it to.

Be sure to read more from his announcement email.

Sergey also announced a new Alpine distro based on Hurd (it currently does not have a name). His goal is to add another Hurd distribution, which will force the Hurd to work with different software and hopefully fix more bugs. Alpine Linux also usually runs the latest software, so this new Hurd distribution will be for those who like living on the bleeding edge. He writes:

I have ported many Alpine packages to build with (i386, for now) GNU
 Mach, the Hurd, and glibc, replacing Linux and musl. If you want a
 specific number: as of yesterday, I have 299 installable packages; the
 number of source packages is of course several times less than that.
 Still, this includes things like curl, ncurses, nano, native binutils
 & gcc & mig, libffi, openrc, openssl, util-linux, busybox, apk-tools,
 ... and of course gnumach, hurd (with dependencies like libdaemon,
 parted, ...), and glibc. Importantly, all this cleanly bootstraps
 using the scripts/bootstrap.sh script that they provide; this is too
 somewhat like Flávio's scripts, but it uses the real full Alpine
 package definitions for e.g. GCC (patched by me for glibc / Hurd
 support).

 Above the kernel and libc, things remain much as they were in upstream
 Alpine: the system boots (will boot — I haven't tried it yet) with
 busybox init & OpenRC, and uses busybox as its basic userland. GNU
 software such as Bash is installable, too.

This new Hurd distribution currently does not have a mailing list, irc room, or website. If you are interesting in helping Sergei to develop it further, then please email bug-hurd@gnu.org.

Luca Dariz added userspace tests, which work with qemu. We currently test the Hurd in qemu on a GNU/Linux host. He also described how he currently uses the 64-bit Hurd. Perhaps you should follow that advice if you want to try running a 64-bit Hurd on qemu.

Manolo de Medici made a WIP patch series that gets qemu to run on the Hurd.

I organized a belated GNU/Hurd Christmas party. We had 6 or 7 attenders, which was pretty awesome! I was not able to record the event, so perhaps we should try for another meet perhaps at the end of Q2. If you would like to help me plan/organize/join such a party, then please email bug-hurd@gnu.org.

If you want to test if your favorite packages work on the Hurd and contribute towards making the full GNU system usable for a wider range of people, please check the contributing page.