Sender | Message | Time |
---|---|---|
27 Jun 2024 | ||
yo | 22:23:18 | |
i got this IBM mainframe (Z10) | 22:23:44 | |
guess that means s390x (assuming X is the 64 bit one) | 22:24:02 | |
since these can run linux and rhel / ubuntu are officially supported | 22:24:41 | |
i was wondering if i should attempt to run nixos on that, does anyone have experience with these devices or even attempted to run nixos on them in the past? | 22:25:37 | |
i do know how to use pkgsCross / binfmt and how the outputs / stages etc etc work | 22:26:50 | |
and wrote/fixed countless drvs / modules but that was just fox riscv | 22:27:15 | |
i have no clue how these mainframes work though, what bootloaders are available and or if there are some special reqiurements for the kernel. D'de | 22:28:59 | |
if anyone has some thoughts or suggestions to share on how to go on about this most ideally please let me know, note however i do not plan to turn this into anything serious or think there'd be much use for it. Id essentially just see if it can be done, write a small blogpost about it. run the infamous neofetch on it once and thats about it | 22:32:29 | |
so i don't exactly need it to be lets say in the state risc-v is currently at, but it would be nice to actually generate a proper bootable image and have an install target (bootloader directive) or sth. Like im looking to close the gap between making a tarball or whatever and actually installing it | 22:35:14 | |
ideally id like to get this to a point where i could build an iso (or whatever this thing can boot from) and setup the drives ideally declarative via disko or sth | 22:36:43 | |
its ok if some packages wont' build right away or ever im already used to that from riscv but like it would still be nice to at least get the minimal profile or sth to work so that i don't have to use crossPackages and can select generations from the bootloader somehow | 22:38:17 | |
Download image.png | 22:39:07 | |
its sorta old but this is how it looks, like that model I got here to play with | 22:39:27 | |
as i recall what id need to do is get the bootstrap packages to compile and write a module to provide whatever is used as a bootloader on these | 22:40:16 | |
28 Jun 2024 | ||
yeah, getting bootstrap tools to cross-compile is a good first step. could start at https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix | 05:20:38 | |
https://github.com/NixOS/nixpkgs/pull/314823 might also be useful | 05:23:54 | |
nice thanks | 12:52:47 | |
this should have it somewhat covered | 12:52:56 | |
say, do you happen to know how i could build the absolute smallest nixos system possible. I may look at the stuff microvm.nix uses as they also shrink their system output.toplevel by a fair bit in terms of deps/size | 12:54:51 | |
its not like this mainframe would have any issues running a bigger system its just like the less deps i need to cross compile the better for now | 12:55:49 | |
because once in a while some package or its dependency fails and then some shitty make/ninja/cake/m4/autotools/built.sh whatever build helpers fail to compile it | 12:57:01 | |
so i then need to fix these and its a big waste of time id much rather focus on getting nixos/nix up and then compile the rest natively as best as possible | 12:57:56 | |
currently i put this in excluded modules ${nixpkgs}/nixos/modules/profiles/base.nix" | 12:59:58 | |
and included the headless thing | 13:00:16 | |
In reply to @bl0v3:matrix.orgIt is possible to go well under 1 GiB by removing systemd (and Nix itself, if you don't need it), but doing so involves a lot of blacklisting and deep hacking. For the absolute smallest, you also need to give up compatibility (e.g. by disabling unused kernel modules). | 13:48:50 | |
i went with libressl initially but that didn't work out | 13:57:34 | |
libressl removed support for s390x | 13:58:52 | |
as in their build system dosn't even detect it | 13:59:03 | |
i tried to patch it by copying some headers of the mips platform | 13:59:31 |