Due to the specific hardware, I need to add some extra firmware packages:
hardware.firmware = lib.mkBefore [ pkgs.linux-firmware-xxx ];
I used nix repl to inspect the corresponding derivation and its output, and confirmed that the files do exist.
However, after rebuilding the system and rebooting, I still get βfile not foundβ errors in dmesg:
remoteproc remoteproc1: Direct firmware load for qcom/sm8150/xiaomi/nabu/cdsp.mbn failed with error -2
remoteproc remoteproc2: Direct firmware load for qcom/sm8150/xiaomi/nabu/adsp.mbn failed with error -2
remoteproc remoteproc1: request_firmware failed: -2
remoteproc remoteproc2: request_firmware failed: -2
On other distros, the expected output looks like this:
remoteproc remoteproc1: Booting fw image qcom/sm8150/xiaomi/nabu/cdsp.mbn, size 9455252
remoteproc remoteproc1: remote processor cdsp is now up
remoteproc remoteproc2: Booting fw image qcom/sm8150/xiaomi/nabu/adsp.mbn, size 14430684
remoteproc remoteproc2: remote processor adsp is now up
Any ideas on how to fix this? Am I doing something wrong?
1 Like
Hrm⦠I lost you at -xxx. What is that? Did you make that package? Can you confirm the file layout of its out path?
Yes, itβs a package I built myself. Hereβs how I verified it:
# First, get the output path
nix path-info --impure .#nixosConfigurations.XiaomiNabu.config.hardware.firmware.outPath
# Then inspect it with tree
tree -l /nix/store/xxxxxxxx
part of the output:
/nix/store/15mb693r73cyid19vz35s7w6sn7v6ir0-firmware
βββ lib
βββ firmware
βββ qcom
β βββ sm8150
β β βββ xiaomi -> /nix/store/rim02j2isk0ch9065fj15qcxgkbkh9ms-linux-firmware-xiaomi-nabu-25.04.26-zstd/lib/firmware/qcom/sm8150/xiaomi
β β βββ nabu
β β βββ a640_zap.mbn.zst
β β βββ adsp.mbn.zst
β β βββ cdsp.mbn.zst
β β βββ modem.mbn.zst
β β βββ modemuw.jsn.zst
β β βββ slpi_nb.mbn.zst
β β βββ venus.mbn.zst
β β βββ wlanmdsp.mbn.zst
That firmware doesnβt seem to be referenced by mainline Linux, is there an out of tree module thatβs trying to load the firmware?
1 Like
You could also try disabling firmware compression (NixOS Search) as itβs incompatible with partial firmware reads.
Actually, this is a custom kernel. You can find the βlinux-firmwareβ package here.
Whatβs interesting is that other files packaged alongside themare being recognized:
[ 12.360025] remoteproc remoteproc0: powering up modem
[ 12.417207] remoteproc remoteproc0: Booting fw image qcom/sm8150/xiaomi/nabu/modem.mbn, size 5101612
So modem.mbn loads fine from the same package, but cdsp.mbn and adsp.mbn donβt. Theyβre all in the same directory, same derivation output. This is really puzzling.