NixOS, Raspberry Pi & Me

Just me crying into the void about failing to get cross compiling to work.
Lost a few hair follicles trying to figure it out; ultimately gave up and went with binfmt.

3 Likes

Cool! Regarding the cross-compiling of the image, the way I’ve always done it is by running a few remote builders at home. Now that you have an aarch64-linux machine in the form of a Raspberry Pi, turning it into a remote builder might be worth it. :wink:

I know, this isn’t really “cross-compiling”, but it has served me well over the years.

Building on the Pi was really slow though :sweat_smile:
Maybe something was not configured or it’s a quite old model ; it’s a 4B

I have been there recently too, as i am currently trying to build nixos for the pinephone pro in a way that can be up-streamed to nixos-hardware. After a few hundred CPU-hours i just setup a hydra instance on a pi4 instead of further turning my room into a sauna.

1 Like

I think you could also set up an aarch64-linux machine on AWS or something like that, and use that as a remote builder. I’m just not sure if the resulting artifacts will work the way I think they should.

I’m also still rooting for the day that there’s ARM powered NUC’s out there. I’ll enjoy that day, my wallet wont. :sweat_smile:

Due to the way crosscompiling works, you get cache misses, which requires you to recompile everything from scratch.

While binfmt is slower, it can use the cache, resulting in you compiling way less.

For me that made me decide that cross compiling is not worth it.