tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
742 stars 73 forks source link

Issue with Asahi peripheral firmware extraction is ewnabled but the firmware location appears incorrect #163

Closed jjgarcianorway closed 4 months ago

jjgarcianorway commented 4 months ago

Hello!

I'm tryingo to make the installation but I've got the error on the title... seems to me that can be related to all_firmware.tar.gz and kernelcache* not existing... but I do not know why they do not exist...

Here my latest commands that I hope they help to find what I'm doing wrong:

[root@nixos:/home/nixos]# cp -r /etc/nixos/apple-silicon-support /mnt/etc/nixos/

[root@nixos:/home/nixos]# chmod -R +w /mnt/etc/nixos/

[root@nixos:/home/nixos]# nano /mnt/etc/nixos/configuration.nix 

[root@nixos:/home/nixos]# mkdir -p /mnt/etc/nixos/firmware && cp /mnt/boot/asahi/{all_firmware.tar.gz,kernelcache*} /mnt/etc/nixos/firmware
cp: cannot stat '/mnt/boot/asahi/all_firmware.tar.gz': No such file or directory
cp: cannot stat '/mnt/boot/asahi/kernelcache*': No such file or directory
[root@nixos:/home/nixos]# nixos-install
copying channel...
building the configuration in /mnt/etc/nixos/configuration.nix...
error:
       … while calling the 'head' builtin

         at /nix/store/xpz3fzi1yjhh2sbzvy5kx8h3jghhh8qh-nixos-24.05.20240115.c3e128f/nixos/lib/attrsets.nix:960:11:

          959|         || pred here (elemAt values 1) (head values) then
          960|           head values
             |           ^
          961|         else

       … while evaluating the attribute 'value'

         at /nix/store/xpz3fzi1yjhh2sbzvy5kx8h3jghhh8qh-nixos-24.05.20240115.c3e128f/nixos/lib/modules.nix:809:9:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error:
       Failed assertions:
       - Asahi peripheral firmware extraction is enabled but the firmware
       location appears incorrect.

[root@nixos:/home/nixos]# 

Thanks a lot in advance!

jjgarcianorway commented 4 months ago

I did a lot of research on this... and I hope this points someone into the right direction to solve it... because I'm still not able to find the solution:

So if I understood correctly... I'm missing all_firmware.tar.gz: This file is generated by asahi-fwextrtact (available inside the /nix/.ro-store/) but that to work needs the RAW firmware and the VENDOR firmware as source and destination.

If I'm not mistaken, these firmware should be here: "/run/.system-efi/asahi/" "/run/.system-efi/vendorfw/"

But I cannot find this anywhere after booting with the NixOS iso...

For sure I'm doing something wrong... Can anyone please help?

zzywysm commented 4 months ago

Regardless of how your /boot partition got so screwed up, it's not this project's fault. The Asahi Linux installer is responsible for creating your EFI system partition and making sure the necessary files are present. This issue should probably be closed.

jjgarcianorway commented 4 months ago

Yes, please, you can close the issue… it is completely my fault and now I have understood where the problem was…

I did not used the Asahi original boot partition so mine was completely empty… probably I was blindly following the instructions and affected by my experience is Arch so completely my fault.

Just right now, I’m successfully finishing the installation.

Apologize for the inconvenience and thank you for replying me but also for your work.

Best regards,

Juanjo

On Thu, Feb 22, 2024 at 21:09 Zzy Wysm @.***> wrote:

Regardless of how your /boot partition got so screwed up, it's not this project's fault. The Asahi Linux installer is responsible for creating your EFI system partition and making sure the necessary files are present. This issue should probably be closed.

— Reply to this email directly, view it on GitHub https://github.com/tpwrules/nixos-apple-silicon/issues/163#issuecomment-1960209769, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JAZNWFFXZ7ARDGPWZF7LYU6QVZAVCNFSM6AAAAABDSXAMJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQGIYDSNZWHE . You are receiving this because you authored the thread.Message ID: @.***>

jjgarcianorway commented 4 months ago

Succesfully installed nixOS. I'll close this issue.