#
✕ nick:ElvishJerricco[m]
#asahi · 2022-06-25 06:58
ElvishJerricco[m]So that's all pre-macos-stub stuff I guess? i.e. the use of a different macOS version for the stub doesn't protect us from updates to SFR?
#asahi · 2022-06-25 06:57
ElvishJerricco[m]ah
#asahi · 2022-06-25 06:57
ElvishJerricco[m]SFR?
#asahi · 2022-06-25 06:56
ElvishJerricco[m]marcan: I'm just curious about the instructions in that issue you linked. Makes it seem like the macOS update required changes to the asahi installation's stage 2 m1n1+u-boot and the linux kernel? But stage 1 m1n1 was intact?
#asahi · 2022-06-23 18:51
ElvishJerricco[m]What code calls out to Apple's framework
#asahi · 2022-06-23 18:51
ElvishJerricco[m]the code
#asahi · 2022-06-23 18:51
ElvishJerricco[m]agraf: Can you link where it does so? I couldn't find it
#asahi · 2022-06-23 16:48
ElvishJerricco[m]<sven> "i think that's more or less what..." <- btw, when I was looking at qemu's hvf code, it looks like they just reverse engineered hvf rather than calling the framework itself. Just curious if you know if that's the case or not.
#asahi · 2022-06-05 16:48
ElvishJerricco[m]This makes me think no: https://github.com/AsahiLinux/asahi-installer/blob/main/build.sh#L46-L55
#asahi · 2022-06-05 16:45
ElvishJerricco[m]Does stage 1 m1n1 have to have DTBs appended to it?
#asahi · 2022-06-05 16:01
ElvishJerricco[m]Excellent. That makes life easier
#asahi · 2022-06-05 16:00
ElvishJerricco[m]tpw_rules: Here you concatenated *all* the DTBs for Apple Silicon into the m1n1 payload: https://github.com/tpwrules/nixos-m1/blob/main/nix/m1-support/u-boot/default.nix#L33 Is that valid? Can `m1n1` just find the correct one when many are appended in?
#asahi · 2022-06-04 19:59
ElvishJerricco[m]What is the purpose of chainloading into another stage of m1n1 rather than chainloading straight into u-boot? I get wanting to chainload rather than embed the payload in stage 1, but why another m1n1?
#asahi · 2022-05-26 04:58
ElvishJerricco[m]I'm assuming turning those things off is just because they're literally completely unnecessary, not because they break anything?
#asahi · 2022-05-26 04:53
ElvishJerricco[m]jannau: Any instructions on reproducing it?
#asahi · 2022-05-26 04:52
ElvishJerricco[m]tpw_rules: It says at the top of the file `Automatically generated file; DO NOT EDIT.` :P
#asahi · 2022-05-26 04:15
ElvishJerricco[m]How was this file generated? https://github.com/AsahiLinux/PKGBUILDs/blob/main/linux-asahi/config
#asahi · 2022-05-23 06:28
ElvishJerricco[m]I diff'ed hexdumps of m1n1.bin as built on aarch64 and as cross built on x86_64, and there are 5698 lines of diff. For an 832K binary, I'd say that's pretty good as far as reproducibility across build architectures go
#asahi · 2022-05-23 06:27
ElvishJerricco[m]Well, I managed to get m1n1 building with Nix with a fairly simple derivation, as long as I build on aarch64 linux or x86_64 linux (cross compile). Still having issues with darwin, but it probably stems from nixpkgs stuff
#asahi · 2022-05-22 08:08
ElvishJerricco[m]But now is sleep time
#asahi · 2022-05-22 08:08
ElvishJerricco[m]But apparently some of them are needed because I get no such file errors if I use an unwrapped compiler
#asahi · 2022-05-22 08:07
ElvishJerricco[m]Well anyway the commands with `-n` look right to me. Issue seems to just be that nixpkgs adds a ton of includes args *after* all the args provided by the Makefile
#asahi · 2022-05-22 08:05
ElvishJerricco[m]Sorry, brain is not functioning this late at night :P
#asahi · 2022-05-22 08:05
ElvishJerricco[m]Oh I see
#asahi · 2022-05-22 08:05
ElvishJerricco[m]`buildFlags` are just passed to `make`, nothing else
#asahi · 2022-05-22 08:04
ElvishJerricco[m]I know. That's why this is weird
#asahi · 2022-05-22 08:04
ElvishJerricco[m]Literally the exact same nix expression, except one has `buildFlags = [... "-n"];`, and the "-n" one works
#asahi · 2022-05-22 08:03
ElvishJerricco[m]wtf. Adding `-n` to the make command made the build work?
#asahi · 2022-05-22 07:51
ElvishJerricco[m]Well even with a nix expression that's virtually identical to theirs, I still get my errors instead of theirs. Might have to bisect... But I'll leave that for tomorrow
#asahi · 2022-05-22 07:48
ElvishJerricco[m]nico_32: I hadn't even seen that. Sounds like they had a completely different problem with macOS and got much further. Interesting
#asahi · 2022-05-22 07:42
ElvishJerricco[m] * With the unwrapped compiler I get:... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/IjiDntDJLEAUBdQrgBksONpn)
#asahi · 2022-05-22 07:42
ElvishJerricco[m]With the unwrapped compiler I get:... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/dLVFHUilogRtfqMQhUthDrQs)
#asahi · 2022-05-22 07:39
ElvishJerricco[m]Looks like nixpkgs is adding a whole bunch of includes and stuff after. I can try an unwrapped clang
#asahi · 2022-05-22 07:36
ElvishJerricco[m]nico_32: I assume it must've been, since that's in the default CFLAGS in the Makefile. But Nixpkgs does wrap the compiler to mess with the flags a bit... maybe it's removing that for some reason
#asahi · 2022-05-22 07:27
ElvishJerricco[m]Hm. Trying to build m1n1 on macOS arm64 with Nix, I get:... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/gJnVTvJlSHYxuLpamEQAOXZS)
#asahi · 2022-05-22 06:33
ElvishJerricco[m]Well... never mind that. Apparently nixpkgs packages a number of things that require a nightly compiler, so they just set `RUSTC_BOOTSTRAP=1`, which apparently causes `rustc` to behave like a nightly compiler. Gross, but I can use it :P
#asahi · 2022-05-22 05:50
ElvishJerricco[m]Hm nightly will likely prevent me from packaging the installer in nixpkgs, as it doesn't have nightly. That's too bad. But at least I can have a separate Nix expression for it I guess
#asahi · 2022-05-22 05:49
ElvishJerricco[m]That is a very interesting way to accomplish that :)
#asahi · 2022-05-22 05:21
ElvishJerricco[m]Also, is Rust nightly still needed to build m1n1 with chainloading, or is a sufficiently recent stable release enough?
#asahi · 2022-05-22 05:10
ElvishJerricco[m]marcan: Cool. Out of curiosity, how does the Finish Installation app get started? Is it something about that IAPhysicalMedia thing?
#asahi · 2022-05-22 02:03
ElvishJerricco[m]I'm assuming that in the Asahi installer, "step2" refers to all the work that needs to be done in the recovery OS, right? If so, is it just the `step2.sh` script? None of the python stuff or any downloading or anything?
#asahi · 2022-05-21 17:09
ElvishJerricco[m]I guess the first thing is going to be packaging the installer with Nix-on-macOS. Don't get me wrong, I'm no stranger to `curl | sh` :P But it seems like it'd be nice to have it packaged with an actual package manager on macOS
#asahi · 2022-05-21 05:07
ElvishJerricco[m]No handling that should be fine. We can just add some scripting to the boot process that copies the firmware to a usable place (that's how tpw_rules did it in his nixos-m1 repo). The rootfs isn't readonly or anything like that, we just address *almost everything* by paths hashes in the names instead of normal FHS paths; we can still have things at more mutable paths.
#asahi · 2022-05-21 05:02
ElvishJerricco[m]Yea I have absolutely no intention of trying to automate the macOS stub from NixOS; we're just going to assume the user configured that
#asahi · 2022-05-21 05:01
ElvishJerricco[m]Yea ok. I'll think on it and talk to some NixOS people about it, but that's a fairly convincing point
#asahi · 2022-05-21 05:00
ElvishJerricco[m]One big reason for this is that we can do rollbacks to old OS configurations from the boot loader. But I guess in principle that would be flawed for firmware like this, which you probably don't want to rollback
#asahi · 2022-05-21 04:59
ElvishJerricco[m]Yea. We have some automation for nonredistributable firmware in NixOS, but it basically relies on the assumption that we can have the firmware in a content-addressed path on the root fs.
#asahi · 2022-05-21 04:58
ElvishJerricco[m]It should be workable either way, and I know just who to talk to in the NixOS rooms about what they think we should do :)
#asahi · 2022-05-21 04:57
ElvishJerricco[m]So I was just hoping to keep the basic assumptions about what the user will have configured the same; i.e. the EFI environment, not necessary firmware.
#asahi · 2022-05-21 04:56
ElvishJerricco[m]That's plausible; we're definitely trying to move toward EFI based booting on ARM in general, and just relying on the user to properly configure an EFI environment like u-boot outside of NixOS. We currently have... a lot of hacks because we don't do it that way

plus ›