# NixOS 26.05 raspberry pi 4 kernel cache missing?

**URL:** https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125
**Category:** Help
**Created:** [June 8, 2026, 7:47am UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125 "2026-06-08T07:47:04Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![phaeseeKe5Ee](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@phaeseeKe5Ee](https://discourse.nixos.org/u/phaeseeKe5Ee)
#### Post date: [June 8, 2026, 7:47am UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/1 "2026-06-08T07:47:04Z")

</div>

After upgrade from 25.11 to 26.05, no matter I use

```auto
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;

```

from nixpkgs or

```auto
inputs.nixos-hardware.nixosModules.raspberry-pi-4

```

from `nixos-hardware`, the kernel `linux-rpi-6.12.75-1+rpt` have to compile itself, and now it is over 12 hours and still going…

Am I doing something wrong? It did not happen in the previous release such as 25.11 and 25.05.

---

<div class="post-metadata">

### Author: ![eblechschmidt](https://discourse.nixos.org/user_avatar/discourse.nixos.org/eblechschmidt/32/27398_2.png) [@eblechschmidt](https://discourse.nixos.org/u/eblechschmidt)
#### Post date: [June 8, 2026, 8:04am UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/2 "2026-06-08T08:04:37Z")

</div>

No, you are not. There is no cache available. I just recompiled the other day on an x86 machine. It took a bit over 12 hours.

When I have time I will try to check if a mainline kernel does the job for me. Some people seem to be using it:

> [@Compiling rpi4 kernel in on x86\_64 nixos-hardware slow](https://discourse.nixos.org/t/compiling-rpi4-kernel-in-on-x86-64-nixos-hardware-slow/77817):
>
> As in it takes many hours, and there doesn’t appear to be any cached build available. Any better options? It is slow because it wants to build via emulator. So I guess in theory setting up a cross build would be faster. But my attempts to cross build the rpi4 kernel have been failures so far. As in it typically wants to cross compile all the build tools too, and that ends being very slow and failing. It use to be the rpi4 kernel was available in nixpkgs, and cached, but I think this is no lon…

---

<div class="post-metadata">

### Author: ![phaeseeKe5Ee](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@phaeseeKe5Ee](https://discourse.nixos.org/u/phaeseeKe5Ee)
#### Post date: [June 8, 2026, 3:23pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/3 "2026-06-08T15:23:19Z")

</div>

How can I build it in a x86\_64 machine? IIRC rpi 4 is aarch64.

---

<div class="post-metadata">

### Author: ![eblechschmidt](https://discourse.nixos.org/user_avatar/discourse.nixos.org/eblechschmidt/32/27398_2.png) [@eblechschmidt](https://discourse.nixos.org/u/eblechschmidt)
#### Post date: [June 8, 2026, 3:40pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/4 "2026-06-08T15:40:26Z")

</div>

You need to enable emulation on the x86 host:

```auto
boot.binfmt.emulatedSystems = ["aarch64-linux"];

```

Then you can run:

```auto
nixos-rebuild switch --build-host <IP of x86 system>

```

If you want you can also do the evaluation on the x86 machine then you can run. Depending on whether you use flakes or not you need to add the system you want to deploy:

```auto
nixos-rebuild switch --build-host <IP of x86 system> --target-host <IP of RPI>

```

---

<div class="post-metadata">

### Author: ![phaeseeKe5Ee](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@phaeseeKe5Ee](https://discourse.nixos.org/u/phaeseeKe5Ee)
#### Post date: [June 8, 2026, 5:34pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/5 "2026-06-08T17:34:50Z")

</div>

Thanks for your tip!  
But why is [this merged PR](https://github.com/NixOS/nixos-hardware/pull/1777) not functioning to make cache of the kernels?

---

<div class="post-metadata">

### Author: ![eblechschmidt](https://discourse.nixos.org/user_avatar/discourse.nixos.org/eblechschmidt/32/27398_2.png) [@eblechschmidt](https://discourse.nixos.org/u/eblechschmidt)
#### Post date: [June 8, 2026, 6:38pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/6 "2026-06-08T18:38:49Z")

</div>

I think it has been decided to not build downstream kernels on hydra anymore. Can’t find any link for the statement though.

---

<div class="post-metadata">

### Author: ![thislooksfun](https://discourse.nixos.org/user_avatar/discourse.nixos.org/thislooksfun/32/37698_2.png) [@thislooksfun](https://discourse.nixos.org/u/thislooksfun)
#### Post date: [June 8, 2026, 6:52pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/7 "2026-06-08T18:52:15Z")

</div>

@phaeseeKe5Ee that PR adds the repo-side config, but hydra itself is not pointing at the hardware repo yet. For more info and tracking see the following:

- [linux-rpi: warn to drop in the future by Cryolitia · Pull Request #477665 · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/pull/477665)
- [Add hydra jobset to repository · Issue #854 · NixOS/nixos-hardware · GitHub](https://github.com/NixOS/nixos-hardware/issues/854)
- [Add hydra jobs & flake packages by RossComputerGuy · Pull Request #1607 · NixOS/nixos-hardware · GitHub](https://github.com/NixOS/nixos-hardware/pull/1607)
- [Add hydra jobs & flake packages for Raspberry Pi kernels by florianvazelle · Pull Request #1777 · NixOS/nixos-hardware · GitHub](https://github.com/NixOS/nixos-hardware/pull/1777)
- [Store binary caches on Cachix? · Issue #325 · NixOS/nixos-hardware · GitHub](https://github.com/NixOS/nixos-hardware/issues/325)
- [QUESTION: how should vendored kernels be handled? (e.g. tuxedo kernel) · Issue #1741 · NixOS/nixos-hardware · GitHub](https://github.com/NixOS/nixos-hardware/issues/1741)

In more promising news, I just removed the `kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;` line from my rpi4 over the weekend and everything is working just fine, but I am also only using the built-in ethernet+usb, so if you use any hardware features (e.g. hats) then ymmv.

---

<div class="post-metadata">

### Author: ![penguin\_brian](https://discourse.nixos.org/user_avatar/discourse.nixos.org/penguin_brian/32/26377_2.png) [@penguin\_brian](https://discourse.nixos.org/u/penguin_brian)
#### Post date: [June 8, 2026, 9:41pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/8 "2026-06-08T21:41:24Z")

</div>

Also see [Compiling rpi4 kernel in on x86\_64 nixos-hardware slow - #10 by penguin\_brian](https://discourse.nixos.org/t/compiling-rpi4-kernel-in-on-x86-64-nixos-hardware-slow/77817/10)

---

<div class="post-metadata">

### Author: ![JamieMagee](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jamiemagee/32/36953_2.png) [@JamieMagee](https://discourse.nixos.org/u/JamieMagee)
#### Post date: [June 8, 2026, 9:51pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/9 "2026-06-08T21:51:33Z")

</div>

Depending on what your use case is, you might not need the `linux_rpi4` vendor kernel. A standard kernel may work.

---

<div class="post-metadata">

### Author: ![penguin\_brian](https://discourse.nixos.org/user_avatar/discourse.nixos.org/penguin_brian/32/26377_2.png) [@penguin\_brian](https://discourse.nixos.org/u/penguin_brian)
#### Post date: [June 8, 2026, 10:26pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/10 "2026-06-08T22:26:46Z")

</div>

In my case I need to use the DSI based touch 7” display on a number of my devices. Which I believe does require the vendor kernel.

But yes, otherwise would be using the standard kernel. Switched a headless RPI4 to the standard kernel, no problems so far.

---

<div class="post-metadata">

### Author: ![GenEric](https://discourse.nixos.org/user_avatar/discourse.nixos.org/generic/32/37705_2.png) [@GenEric](https://discourse.nixos.org/u/GenEric)
#### Post date: [June 9, 2026, 10:37am UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/11 "2026-06-09T10:37:13Z")

</div>

Since building with emulation can be quite slow I went a different route by cross compiling the kernel:

1. Setup my x86\_64 machine as a remote builder ([wiki entry](https://nixos.wiki/wiki/Distributed_build), actual config [here](https://github.com/Deric-W/home_network/blob/17ef8039ea052a5b5b36478dcf33a3d3d6c8eb25/modules/remote-builders.nix))
2. Cross compile the kernel provided by nixos-hardware on the remote builder (actual config [here](https://github.com/Deric-W/home_network/blob/17ef8039ea052a5b5b36478dcf33a3d3d6c8eb25/hosts/unimatrix-01/modules/hardware.nix#L10))

The actual build only took around 30 minutes on my (pretty powerful, I would say) machine and the result runs like normal.

The drawback of this approach is that Nix distinguishes between native and cross compiled packages, which means that cross compiling everything (not just the kernel) will result in many cache misses.

---

<div class="post-metadata">

### Author: ![phaeseeKe5Ee](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@phaeseeKe5Ee](https://discourse.nixos.org/u/phaeseeKe5Ee)
#### Post date: [June 9, 2026, 10:58am UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/12 "2026-06-09T10:58:41Z")

</div>

Just tested the standard kernel and my rpi4 failed to boot up. Maybe caused by my Argon case.

---

<div class="post-metadata">

### Author: ![penguin\_brian](https://discourse.nixos.org/user_avatar/discourse.nixos.org/penguin_brian/32/26377_2.png) [@penguin\_brian](https://discourse.nixos.org/u/penguin_brian)
#### Post date: [June 9, 2026, 9:18pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/13 "2026-06-09T21:18:11Z")

</div>

My box which I switched to standard kernel also had an argon case. Only issue I had was the fan stopped working with argononed from nixos 25.11, so I had to switch to argononed from unstable (this was before 26.05 was released which also works fine).

---

<div class="post-metadata">

### Author: ![penguin\_brian](https://discourse.nixos.org/user_avatar/discourse.nixos.org/penguin_brian/32/26377_2.png) [@penguin\_brian](https://discourse.nixos.org/u/penguin_brian)
#### Post date: [June 10, 2026, 9:37pm UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/14 "2026-06-10T21:37:38Z")

</div>

On 2nd thoughts just noticed that rpi4 in the argon case now has fan on continuously. Suspect the switch to mainline kernel did this. Haven’t had a chance to investigate yet.

---

<div class="post-metadata">

### Author: ![strb173](https://discourse.nixos.org/user_avatar/discourse.nixos.org/strb173/32/38174_2.png) [@strb173](https://discourse.nixos.org/u/strb173)
#### Post date: [July 24, 2026, 10:09am UTC](https://discourse.nixos.org/t/nixos-26-05-raspberry-pi-4-kernel-cache-missing/78125/15 "2026-07-24T10:09:27Z")

</div>

I switched to mainline and had to fix two things:

1. argon one case fan add:

2. An issue with the ethernet not passing traffic, fixed by adding:  
`boot.initrd.kernelModules = ["bcm_phy_lib" "broadcom" "mdio_bcm_unimac" "bcmgenet"];`
