Conversation

Anyone have a favored (probably nix-based) setup for doing CI-like builds for and tests on an embedded system? Eg, I build and push to a separate box for running tests. I feel like maybe hercules-ci could do this, but I’m not familiar with it.
1
1
Replying to
You’re right, really. I’m not sure if I should cross compile or build on the target. The last time I used cross compilation with nix was maybe two years ago, and I’m not sure how it’s changed since.
1
1
Replying to
Can't say. I rolled my own buildroot Nix wrapper a couple of years ago and that was a real pain. Mostly doing bare metal these days, where the firmware reload + board reset is all custom scripts triggered from the incremental build. I use NFS when possible (pull instead of push).
1
1
Replying to
Nix+buildroot+ssh+rsync was VF6xx + AM335x. Later raw buildroot+ssh+rsync was SAMA5. Most of that later code I can test on x86, which uses separate build host + test PC mounting NFS. Bare metal is STM32 with gdbstub + relay board for power cycle + udev rule for firmware load.
1
1
Replying to and
Another thing that helps is to keep target image read-only, so no "patching on startup" as many distributions seem to require. This means you need to do more work during build (e.g. generating keys), but having 1-to-1 copies between build and target is worth a lot.
1