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 longer the case.
Having been down the cross compilation/emulation rabbit hole I now keep a remote VM running aarch64-linux for this purpose. I set it up as a remote builder.
Also see the nixos raspberry pi project, which has some cachix caching.
I have migrated my RPI4 to a generic kernel rpi4: migrate to UEFI boot · adomixaszvers/dotfiles-nix@6c05cd9 · GitHub but it was not straightforward because I did not know which kernel modules were needed to boot.
1 Like
I would like to go to the mainstream kernel also. But most of my RPI4 use the “Raspberry [7 inch] Pi Touch Display”[1]. And last time I tried to do that with the mainstream kernel I wasted hours and never got anywhere. While it has been a while since I tested this last, LLM seems to think I would still have problems - it says there are missing parts from the mainstream kernel still.
Notes
[1] There are other displays - of varying degrees of goodness - I can get that use HDMI, but none of them (that I could find) have integrated cases for both both Rpi4 and the display.
Not clear here, is nixos-raspberrypi something I use instead of nixos-hardware? Or in addition?
curious if anyone got pi5 to boot on generic kernel
I encountered similar problem. My pi5 kernel build ( only change was size optimizations ) took more than 6 hours ( and then I gave up ), only I had binfmt enabled instead of a proper cross comp setup, but I swear that QEMU doesn’t have this much overhead, a x86 kernel build took less than 2 hours on the same machine.
I’m building it over night. Never looked at the exact time it took but was always done the next morning.