About ZXFoundation™
Overview
ZXFoundation™ is a monolithic kernel that exclusively targets z/Architecture. It is packaged with ZXFoundationLoader™, the official "bootloader" for the kernel, and is probably the only possible way. The project is a PoC that z/Architecture is in fact, a fascinating architecture and not just expensive mainframes that only a fraction of the population know what it is and OSDev-ing on it is entirely possible. It is purely intended for research and educational purposes. Licensed under the Apache-2.0 Open-Source license.
History
The reason that lead to the creation of the ZXFoundation kernel is somewhat... ramdom. Initially, when i moved to macOS (a Hackintosh to be precise), most of my project were pretty much incompatible due to the lack of proper toolchain setup for the build system (primarily CMake). And at that time, I was quite tired of old concepts of x86_64. So, I had a small thought of making a kernel, on an architecture that I have never tried before that was not x86_64, riscv, or arm. Then I did the research (for hours), and actually end up with sparc64. Mostly because HomeBrew clang (llvm) is built with sparc support and it is somewhat a historically well-known platform, the project name was UltraSpark. But oh-boy was i wrong! unfortunately luck was not on my side. It took me over 2 whole weeks eyes gluing to the computer, not even a single "Hello, Wolrd!". Then i gave up. The project sources are still there, untouched. And that, indirectly gave birth to ZXFoundation later. Fun fact: that folder, today, contains the ZXFoundation sources, still under the name "UltraSpark".
A few days later, when I was reading OSDev pages for fun, I came across the FLATBOOT bootloader, a multi-stage loader which targets S/360 to z/Architecture machines, designed for Hercules (the emulator). And that is where I got my first interest in z/Architecture. While FLATBOOT is a fascinating kickstart, but it was flawed. It only loads ELF32, awkwardly and partially implements x86_64 stivale2 protocol, and the legacy baggage, (and of course, GNU Autotools). And i wasn't able to get it to co-operate with my kernel either. Though remnants of it are still used in the current versions of ZXFoundation-namely the bin2rec utility.
So I said: "Fuck it, i will make my own ecosystem". I labeled the project as "ZXFoundation - z/Architecture PoC kernel". The first days were... hard. It is mostly "loading the kernel", well, you see, on z/Architecture there obviously isn't BIOS/UEFI or a standardized firmware to even start with. It is all around IPLs and CCWs. At the time, I was trying to mirror existing implementations like zIPL, and FLATBOOT itself. Which was basically a chainloader but with small early stages just contain raw CCW chains which loads the later stages. The architecture overall is somewhat similar to a classic legacy BIOS machine. Though i did it differently and minimize the use of raw CCW chains in ASM and use a full C disk driver instead. And that become ZXFoundationLoader the official freestanding "bootloader" for ZXFoundation, exclusively for ZXFoundation.
Before all the bootloader hassle and stuff, life was actually... easy! Because of a single option the "-kernel" option in "qemu-system-s390x", I literally just have to compile my kernel and run it there, no wondering about the IPL and all that stuff, but reality strikes. I can't use it that way! For obvious reasons, it is the "cheater" way to get started quickly.