Remix.run Logo
KingMachiavelli 4 hours ago

I've been using Nix for "embedded" systems for few years now and it works fine. I don't quite understand why "embedded" has historically meant learning a completely separate tool. I've been building for x86 and ARM servers for 5+ years now, so why should targeting an ARM board be any different?

Like the article points out, the software stacks people use for embedded devices are the same as people use non-embedded use; Rust, Go, NodeJS, and sure still C++. The only real difference with embedded devices is non-OS components like the bootloader (u-boot, EDK2) and customizing the device tree. (And of course firmware flashing). Fundamentally those are all just packages that I can describe in Nix. I don't need a separate tool just because the board is small.

IMO the embedded space, especially in the US, is already pretty Niche. Most companies either just ship the vendors BSP example (Ubuntu/Debian/Yocto) and pay very little attention to the detail or re-useablity. Once you vendor declares the BSP EOL you are stuck unless you re-implement it yourself.

Using Nix (or Guix) has the massive advantage of a large and active community that isn't fractured like the Yoctoo/Buildroot community. (By fractured I mean there may by many, many people using those tools at $DAYJOB but due to vendor BSP customization they likely share much less with the upstream community maintained sources).

Palomides 3 hours ago | parent | next [-]

I'm not very familiar with nix, how well does it do with cross compiling? is anyone actually using it for yocto sorts of domains?

sollniss 2 hours ago | parent | next [-]

You can generally remotely build for any supported architecture[1]. The build process will be painfully slow though if you have cache misses.

[1] https://search.nixos.org/options?channel=26.05&query=boot.bi...

18 minutes ago | parent [-]
[deleted]
nine_k an hour ago | parent | prev | next [-]

We do Nix-based cross-compiling for non-embedded software (ARM vs x64). I'd say it works mostly transparently.

alright2565 2 hours ago | parent | prev [-]

[dead]

jimktrains2 3 hours ago | parent | prev | next [-]

> I don't quite understand why "embedded" has historically meant learning a completely separate tool.

Because historically, and I would argue should still, refer to very limited hardware, in terms of memory, processing power, and energy.

zamadatix 2 hours ago | parent [-]

If you're sticking the Linux kernel into something you've already past the scale this should require a separate build system to accomplish.

Brian_K_White 34 minutes ago | parent [-]

I guess this was just so true everyone found it uninteresting like saying water is wet eh?

3 hours ago | parent | prev [-]
[deleted]