Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The firmware location appears incorrect. #172

Open
ityspace opened this issue Mar 6, 2024 · 8 comments
Open

The firmware location appears incorrect. #172

ityspace opened this issue Mar 6, 2024 · 8 comments

Comments

@ityspace
Copy link

ityspace commented Mar 6, 2024

When I use my flakes configurations, and add apple-silicon-support to configuration, it reports that Asahi perpheral firmware extraction is enabled but the firmware location appears incorrect.

@heywoodlh
Copy link

I ran into this whilst attempting to build my NixOS+Asahi Configuration while on a MacOS, so I dug into this. You can see the relevant bits here:

assertions = lib.mkIf config.hardware.asahi.extractPeripheralFirmware [
{ assertion = config.hardware.asahi.peripheralFirmwareDirectory != null;
message = ''
Asahi peripheral firmware extraction is enabled but the firmware
location appears incorrect.
'';
}
];

default = lib.findFirst (path: builtins.pathExists (path + "/all_firmware.tar.gz")) null
[
# path when the system is operating normally
/boot/asahi
# path when the system is mounted in the installer
/mnt/boot/asahi
];

In essence, you have to have the peripheral firmware installed at the default locations of either /boot/asahi or /mnt/boot/asahi. If you have it at a different location, you should specify a different peripheralFirmwareDirectory or you could disable firmware extraction with extractPeripheralFirmware = false;. These directories should exist when installing Asahi Linux via this repo (or after).

In my case, it won't work because I'm building my NixOS configuration on a NixOS VM (the Nix-Darwin Linux builder) that doesn't have the /boot/asahi or /mnt/boot/asahi directory (this is fine for me as I was just testing my build).

Hope this information is helpful as I also wanted to understand why my test build was failing.

@aspauldingcode
Copy link

aspauldingcode commented May 4, 2024

I'm having issues with this.
I was able to rebuild by setting extractPeripheralFirmware = false;
But, now I can't use internet, seems like other things are broken?

But I can't build if I turn it on..
and its definitely located at /boot/asahi/all_firmware.tar.gz...

Edit:
I can rebuild if I pass --impure to the command..

Edit2:
But I donnwaanna have to pass --impure.. I like pure

@wahjava
Copy link

wahjava commented May 5, 2024

You need to copy the firmware into your NixOS configuration repository as the README reads:

mkdir -p /mnt/etc/nixos/firmware && cp /mnt/boot/asahi/{all_firmware.tar.gz,kernelcache*} /mnt/etc/nixos/firmware

And then reference it in your NixOS configuration (and make sure firmware sub-directory is check-ed in to your NixOS configuration repository):

{
  # Specify path to peripheral firmware files.
  hardware.asahi.peripheralFirmwareDirectory = ./firmware;
}

@aspauldingcode
Copy link

You need to copy the firmware into your NixOS configuration repository as the README reads:

mkdir -p /mnt/etc/nixos/firmware && cp /mnt/boot/asahi/{all_firmware.tar.gz,kernelcache*} /mnt/etc/nixos/firmware

And then reference it in your NixOS configuration (and make sure firmware sub-directory is check-ed in to your NixOS configuration repository):

{

  # Specify path to peripheral firmware files.

  hardware.asahi.peripheralFirmwareDirectory = ./firmware;

}

I added that line, got a new error (yay, progress) but what’s going on with this? What’s preventing a rebuild here? https://paste.ee/p/XqAK2

@wahjava
Copy link

wahjava commented May 9, 2024

You need to copy the firmware into your NixOS configuration repository as the README reads:

mkdir -p /mnt/etc/nixos/firmware && cp /mnt/boot/asahi/{all_firmware.tar.gz,kernelcache*} /mnt/etc/nixos/firmware

And then reference it in your NixOS configuration (and make sure firmware sub-directory is check-ed in to your NixOS configuration repository):

{

  # Specify path to peripheral firmware files.

  hardware.asahi.peripheralFirmwareDirectory = ./firmware;

}

I added that line, got a new error (yay, progress) but what’s going on with this? What’s preventing a rebuild here? https://paste.ee/p/XqAK2

Did you commit the firmware subdirectory to your repository ?

@aspauldingcode
Copy link

Did you commit the firmware subdirectory to your repository ?

https://github.com/aspauldingcode/.dotfiles/tree/main/system/NIXY2/firmware

Think so?

@wahjava
Copy link

wahjava commented May 9, 2024

Sorry, at a glance, this seems like a problem with your flake inputs, and esp. processing flake-parts flake in here. Nothing to do with firmware as I mis-assumed.

@aspauldingcode
Copy link

Sorry, at a glance, this seems like a problem with your flake inputs, and esp. processing flake-parts flake in here. Nothing to do with firmware as I mis-assumed.

How do I fix it?
All my other systems use that.. I'm not really sure what it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants