--- title: Port Linux software natively; save LX zones for binaries with no illumos build area: lx impact: HIGH tags: [lx, brands, porting, linux-binaries, epoll, systemd, smf, nix] verified: 2026-11-04 --- # Port Linux software natively; save LX zones for binaries with no illumos build On illumos an LX-branded zone runs a Linux binary that cannot be ported. LX is not built yet on Solnix (handbook: LX zones, Honest status), so port natively, as a Nix derivation for `x86_64-solaris` or `aarch64-solaris`. **Antipattern** ```sh # Linux habit: copy the Linux build over and run it (the T3.6 spec's control: refused with SIGSYS in a native zone) scp linux-host:/usr/local/bin/tool . && ./tool # upstream illumos habit: put it in an LX zone (zonecfg(8) Example 2); no lx brand exists on Solnix yet pfexec zonecfg -z lxzone "create -t SUNWlx; set zonepath=/export/zones/lxzone" # NixOS habit, in configuration.nix: accepted by an ignore-everything stub, no service is made # systemd.services.tool = { ... }; ``` **The Solnix way** ```sh elfdump -c -N .note.ABI-tag ./tool # a .note.ABI-tag section: elfdump takes a generic-ABI object as linux nix search nixpkgs tool # already packaged? (or https://search.solnix.io) # not packaged: build the source as a pkgs.solnix.* derivation for x86_64-solaris / aarch64-solaris elfdump -i /nix/store/-tool-/bin/tool # .interp names the illumos runtime linker, ld.so.1 ``` ```nix smf.services.tool = { # replaces systemd.services.tool; rendered to an SMF manifest enable = true; category = "site"; # svc:/site/tool:default start.exec = "${pkgs.solnix.tool}/bin/toold &"; # a contract service's start method must return (svc.startd(8): a start method that does not return before its timeout is killed); `&` backgrounds a foreground # daemon, as census.nix does, though smf_method(7) asks a start method to wait until the service is ready }; ``` Linux APIs that exist natively need no LX: `` (epoll(7)), eventfd(7), timerfd(7) and signalfd(3C) are illumos interfaces. epoll(7) says new native code should prefer event ports (`port_create(3C)`). **The illumos way** (OmniOS, SmartOS; OpenIndiana has no LX) (the template name is unverified; see below) ```sh zonecfg -z lxzone "create -t SUNWlx; set zonepath=/export/zones/lxzone; set autoboot=true" zoneadm list -cv # -v shows each zone's brand type ``` The SmartOS community built the modern LX brand and runs Linux workloads in it. The illumos distribution chart marks LX for OmniOS and SmartOS, not OpenIndiana. A zone's brand cannot be changed once it is installed (zonecfg(8)). **The difference.** SmartOS and OmniOS can put a Linux-only binary in an LX zone; Solnix cannot yet. Its pinned gate has no lx brand (roadmap: "sn1/solaris10 only"), and LX is spec T3.6, sized at several quarters. So port natively: on Solnix every package is a Nix derivation in `/nix/store` (served from the binary cache once it is published); the finished system has no IPS (product.md). epoll comes with the port, but closing a watched fd stops its events even if a fork(2) child still holds the file. **Check.** `elfdump -i /bin/tool` prints an `.interp` ending in `ld.so.1`, the illumos runtime linker: the port is a native illumos executable. **Unverified** - Whether any current distribution ships the `SUNWlx` template: the only source is zonecfg(8) Example 2. - The OS repo's steering (illumos-domain.md) calls LX "in-gate"; the roadmap and spec T3.6 say it is not in the pinned gate. This rule follows the roadmap. No `lx(7)` page ships, so LX-specific zone properties are left out. **Sources** - [smf_method(7)](https://solnix.io/docs/man/smf_method.7) (illumos, CDDL), start method ("delay exiting until the service instance is ready") - [svc.startd(8)](https://solnix.io/docs/man/svc.startd.8) (illumos, CDDL), a contract or transient start method that does not return before its timeout gets SIGKILL - [brands(7)](https://solnix.io/docs/man/brands.7) (illumos, CDDL), DESCRIPTION (brand set at create time, cannot be changed) - [zonecfg(8)](https://solnix.io/docs/man/zonecfg.8) (illumos, CDDL), brand ("Once a zone has been installed the brand cannot be changed"); SUBCOMMANDS (semicolon-separated list); EXAMPLES, Example 2 Creating a Non-Native Zone - [zoneadm(8)](https://solnix.io/docs/man/zoneadm.8) (illumos, CDDL), SUBCOMMANDS list -c, -v - [epoll(7)](https://solnix.io/docs/man/epoll.7) (illumos, CDDL), DESCRIPTION; NOTES (prefer event ports; close(2) races; closed-fd semantics) - [eventfd(7)](https://solnix.io/docs/man/eventfd.7), [timerfd(7)](https://solnix.io/docs/man/timerfd.7), [signalfd(3C)](https://solnix.io/docs/man/signalfd.3c) (illumos), NAME, DESCRIPTION - [elfdump(1)](https://solnix.io/docs/man/elfdump.1) (illumos, CDDL), OPTIONS -c, -i, -N, -O (`.note.ABI-tag` means the linux ABI) - [ld.so.1(1)](https://solnix.io/docs/man/ld.so.1.1) (illumos, CDDL), DESCRIPTION (`.interp`; default interpreter ld.so.1) - [Handbook: LX-branded zones](https://solnix.io/docs/handbook/lx-zones#honest-status) (site 307b67f), What an LX-branded zone is; How SmartOS pioneered the modern LX brand; Why it matters; Honest status - [Handbook: SMF](https://solnix.io/docs/handbook/smf#how-solnix-manages-services) (site 307b67f), How Solnix manages services - [Handbook: Learning Nix](https://solnix.io/docs/handbook/learning-nix#pkg--nix-command-by-command) (site 307b67f), `pkg` → Nix, command by command (`nix search nixpkgs X`, search.solnix.io) - [Handbook: CPU architecture support](https://solnix.io/docs/handbook/cpu-support#the-four-targets) (site 307b67f), The four targets (`x86_64-solaris`, `aarch64-solaris`) - [modules/system/boot/init/smf.nix](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/modules/system/boot/init/smf.nix) (solnix 5a8e5ce), options enable, category, instance, start.exec - [modules/nixos-compat.nix](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/modules/nixos-compat.nix) (solnix 5a8e5ce), `systemd.services` "IGNORED compat stub" - [modules/config/community/census.nix](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/modules/config/community/census.nix) (solnix 5a8e5ce), `start.exec = "... &"` (backgrounded start method) - [.kiro/steering/illumos-domain.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/steering/illumos-domain.md) (solnix 5a8e5ce), Forks & the "everything for illumos" scope (LX listed "in-gate") - [docs/roadmap.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/docs/roadmap.md) (solnix 5a8e5ce), LX-branded zones: run Linux binaries unchanged - [.kiro/specs/solnix-phase3-breadth/tasks.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/specs/solnix-phase3-breadth/tasks.md) (solnix 5a8e5ce), T3.6 LX-1 to LX-5 (LX-4 SIGSYS negative control) - [.kiro/steering/product.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/steering/product.md) (solnix 5a8e5ce), No IPS/`pkg` in the end product; pillar 3 SMF is the init system - [.kiro/steering/nix-conventions.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/steering/nix-conventions.md) (solnix 5a8e5ce), Platform tuples; Package namespace (`pkgs.solnix.*`, `-` store names) - [illumos: Distributions](https://illumos.org/docs/about/distro/) (MPL-2.0), feature chart, LX column - [illumos: Features](https://illumos.org/docs/about/features/) (MPL-2.0), LX (Linux Emulation)