| 8 Jul 2022 |
samueldr | as it creates a burden to maintain, and fosters bad habits | 18:23:02 |
samueldr | and here's the main underlying reason NixOS shouldn't manage platform firmware images: it's outside the lifecycle of a generation | 18:23:50 |
samueldr | and here's the main underlying reason all distros shouldn't manage platform firmware: it makes things awfully impossible to reason about | 18:24:17 |
samueldr | the onus of providing platform firmware in a sensible manner should be placed on the vendor, and failing that, a trusted third party that is common and shared between all distros | 18:25:03 |
samueldr | it's needless churn to have all distros micromanage board specific details | 18:25:32 |
matthewcroughan - nix.how | In reply to @samueldr:matrix.org the onus of providing platform firmware in a sensible manner should be placed on the vendor, and failing that, a trusted third party that is common and shared between all distros Is there an example of anything doing it correctly right now? | 18:25:55 |
samueldr | yes, the iso image | 18:26:12 |
samueldr | if you were to remove the FAT32 partition from the SD image, the SD image would be more correct | 18:26:31 |
samueldr | but arguably it doesn't use an actually standard interface for boot | 18:26:45 |
samueldr | yes, RISC-V can boot UEFI | 18:26:54 |
samueldr | I don't know about your particular board | 18:27:00 |
matthewcroughan - nix.how | In the case of the visionfive board, OpenSBI/Uboot does mention that | 18:27:16 |
samueldr | it probably can through U-Boot, but the vendor might have messed with the defaults enough to make things awkward | 18:27:23 |
matthewcroughan - nix.how | So what do we do about the fact that right now, everything kind of "Just works" even if it's ugly behind the scenes in Nixpkgs, regarding vendor kernels?
| 18:27:52 |
samueldr | since it's the visionfive, I figure you've seen https://github.com/NixOS/nixpkgs/pull/168826 | 18:27:57 |
matthewcroughan - nix.how | do we move sd image generation to nixos-hardware? Do we just say "Broken is better than working, express it yourself in Nix?"
| 18:28:12 |
matthewcroughan - nix.how | In reply to @samueldr:matrix.org since it's the visionfive, I figure you've seen https://github.com/NixOS/nixpkgs/pull/168826 yeah I've been playing a lot with it. | 18:28:28 |
matthewcroughan - nix.how | https://github.com/MatthewCroughan/visionfive-nix/blob/master/flake.nix | 18:28:52 |
matthewcroughan - nix.how | see this for the work I've been doig | 18:28:58 |
matthewcroughan - nix.how | * see this for the work I've been doin | 18:28:59 |
matthewcroughan - nix.how | * see this for the work I've been doing | 18:29:00 |
matthewcroughan - nix.how | nix build .#images.visionfive and anyone can just add their config to ./configuration.nix and it'll produce something they can flash to an sd and boot | 18:29:25 |
matthewcroughan - nix.how | and nix run .#flashBootloader /dev/ttyUSB0 for flashing the board's OpenSBI/Uboot via the mask rom | 18:29:46 |
matthewcroughan - nix.how | So, let's imagine your perfect utopia existed. What would become of my nix build .#images.visionfive ? | 18:30:12 |
samueldr | so, the way you need to think about is is to completely dissociate handling the platform firmware from the distro | 18:31:16 |
samueldr | so in a way your flake already kinda does this; you have a thing to flash the firmware, and once it's flashed, it's flashed and respects standard (enough) interfaces for booting | 18:31:51 |
samueldr | so that's one component down, and you have to think about it like it's its own separate thing, because it is | 18:32:28 |
samueldr | it's the bios | 18:32:31 |
matthewcroughan - nix.how | Yes, the flake approach I'm using is beginning to feel good | 18:32:51 |
matthewcroughan - nix.how | But how do we put it all into a more centralized location? Is nixos-hardware the answer? Or would you avoid that? | 18:33:14 |