27 Jun 2024 |
bl0v3 | 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 |
bl0v3 | 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 |
bl0v3 | 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 |
bl0v3 |  Download image.png | 22:39:07 |
bl0v3 | its sorta old but this is how it looks, like that model I got here to play with | 22:39:27 |
bl0v3 | 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 |
trofi | 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 |
trofi | https://github.com/NixOS/nixpkgs/pull/314823 might also be useful | 05:23:54 |
bl0v3 | nice thanks | 12:52:47 |
bl0v3 | this should have it somewhat covered | 12:52:56 |
bl0v3 | 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 |
bl0v3 | 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 |
bl0v3 | 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 |
bl0v3 | 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 |
bl0v3 | currently i put this in excluded modules ${nixpkgs}/nixos/modules/profiles/base.nix" | 12:59:58 |
bl0v3 | and included the headless thing | 13:00:16 |
Alex | In reply to @bl0v3:matrix.org 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 It 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 |
bl0v3 | i went with libressl initially but that didn't work out | 13:57:34 |
bl0v3 | libressl removed support for s390x | 13:58:52 |
bl0v3 | as in their build system dosn't even detect it | 13:59:03 |
bl0v3 | i tried to patch it by copying some headers of the mips platform | 13:59:31 |
bl0v3 | (as these aren't platform specific) | 13:59:45 |
bl0v3 | but as it seems that doesn't really help , even alpine linux gave up on libressl on s390x these days | 13:59:59 |
bl0v3 | ok | 16:34:17 |
bl0v3 | so | 16:34:18 |
bl0v3 | .#nixosConfigurations.z10.config.system.build.toplevel 's drv finished building now | 16:34:31 |
bl0v3 | for s390x | 16:34:41 |
bl0v3 | now i gotta figure out how to turn this into a bootable image | 16:34:53 |
aleksana (force me to bed after 18:00 UTC) | In reply to @bl0v3:matrix.org now i gotta figure out how to turn this into a bootable image Does it work like traditional bios or UEFI? | 18:09:06 |
bl0v3 | In reply to @aleksana:mozilla.org Does it work like traditional bios or UEFI? hell idktbh | 18:09:46 |