#
✕ nick:ElvishJerricco[m]
#asahi · 2022-05-21 04:55
ElvishJerricco[m]Yea we don't fully wipe the ESP; we just configure our boot loader automatically
#asahi · 2022-05-21 04:53
ElvishJerricco[m]Well the stub partition is; NixOS usually controls the ESP with automation (and little hacks if you want other OSes in your boot loader menu).
#asahi · 2022-05-21 04:51
ElvishJerricco[m]Oh, that seems a bit odd, but easy enough to work with
#asahi · 2022-05-21 04:51
ElvishJerricco[m]So alright, plan will be to have the firmware match the macOS stub. The "NixOS way" will probably be to have the user specify which version they need, and automatically download that, rather than copying existing files from the ESP (NixOS tries to be stateless outside of your config file), but that's not strictly necessary. I'll see what ends up making most sense.
#asahi · 2022-05-21 04:49
ElvishJerricco[m]Ok that makes sense.
#asahi · 2022-05-21 04:47
ElvishJerricco[m]I'm guessing?
#asahi · 2022-05-21 04:47
ElvishJerricco[m]Oh, so in theory m1n1 could do it, but we just have linux do it since linux already can
#asahi · 2022-05-21 04:47
ElvishJerricco[m]Interesting. I'm curious, what causes a piece of firmware to require being loaded out of /lib/firmware by the linux OS instead of the previous boot stages?
#asahi · 2022-05-21 04:44
ElvishJerricco[m]Thanks!
#asahi · 2022-05-21 04:44
ElvishJerricco[m]Cool
#asahi · 2022-05-21 04:44
ElvishJerricco[m]Ok, but I'll make sure to plan around trying to match the macOS stub
#asahi · 2022-05-21 04:42
ElvishJerricco[m]marcan: That's good news. Does the firmware that we copy into /lib/firmware need to be from the same version as the currently installed macOS stub?
#asahi · 2022-05-20 22:01
ElvishJerricco[m]right
#asahi · 2022-05-20 22:01
ElvishJerricco[m]and the OS loads firmware from ESP I guess
#asahi · 2022-05-20 22:01
ElvishJerricco[m]got it
#asahi · 2022-05-20 22:00
ElvishJerricco[m]wait the Asahi kernel copies stuff from the stub? It can read APFS?
#asahi · 2022-05-20 21:58
ElvishJerricco[m]So I'm still not clear on my original question. To what degree is the Asahi kernel tied to the version of macOS stub that's installed, and the version of the firmware intended to be copied to /lib/firmware?
#asahi · 2022-05-20 21:56
ElvishJerricco[m]m1n1 is tied to the kernel? I thought we could just use it to boot u-boot and then EFI boot the OS
#asahi · 2022-05-20 21:53
ElvishJerricco[m]But for that I want a level of certainty that firmware versions and macOS stub versions won't be problematic
#asahi · 2022-05-20 21:53
ElvishJerricco[m]tpw_rules: Yea. I'm looking into how we might integrate something like it into nixos proper
#asahi · 2022-05-20 21:50
ElvishJerricco[m]j`ey: NixOS is going to want to manage /lib/firmware
#asahi · 2022-05-20 21:48
ElvishJerricco[m]Just on the basis that it's literally only designed to run one OS, and that OS manages installing the firmware too
#asahi · 2022-05-20 21:47
ElvishJerricco[m]mps: Yea I don't know if the same stability can be expected from a platform like Apple Silicon
#asahi · 2022-05-20 21:46
ElvishJerricco[m]j`ey: Ah, so the goal is that any firmware that was previously supported with Asahi will remain supported in future versions? That certainly helps a lot, but *then* we might have /lib/firmware not matching macOS stub. I don't know if that would be a problem.
#asahi · 2022-05-20 21:43
ElvishJerricco[m]mps: I'm not holding my breath :P
#asahi · 2022-05-20 21:41
ElvishJerricco[m]oh wow Element really screwed up your name...
#asahi · 2022-05-20 21:40
ElvishJerricco[m]j`ey: Well the concern is updating the kernel. If that one day requires a new version of macOS stub, then we can't automate that in NixOS. If all I need to automate is /lib/firmware on the linux side and stage 2 m1n1, then no problem
#asahi · 2022-05-20 21:38
ElvishJerricco[m]provide to the kernel (we have good support for automating non-redistributeable firmware), I wouldn't be able to automate setting up the macOS stub (given that I think you have to do that from macOS, not to mention lack of APFS support in Linux)
#asahi · 2022-05-20 21:38
ElvishJerricco[m]So I'm considering adding some infra in NixOS for booting with the Asahi kernel and m1n1, but I'm a tad concerned about the firmware stuff. I remember reading at one point that the Asahi kernel has to be written for a specific version of the firmware. Does that also mean the system has to have been booted with a macOS stub based on that version? Because while I'm happy to write some code for pulling the firmware out of IPSWs in Nix to