Setting up Fuchsia for Earth and Linux CrossBox
Elements compiles and links Fuchsia applications using the Elements Fuchsia platform SDK. Creating a .far package additionally requires the Fuchsia IDK host tools. Running and debugging require a Linux host that can communicate with the Fuchsia device or emulator.
These are separate installations: the Elements SDK provides compile-time libraries and metadata; the IDK provides tools such as ffx, cmc, ffx-package, and zxdb. Docker does not include the IDK.
This page applies both to Earth running locally on Linux and to a Linux CrossBox host used by Fire on macOS or Water on Windows.
For debugging, also complete device debugger package setup. Obtain the exact device-build/architecture debug_agent archive once and configure its path and version on the IDE machine. The IDK does not include it, and a product bundle may omit it. CrossBox stages and serves that archive during deployment, manages its debugger-specific route, and cleans up its server/tunnels; no manually maintained helper server is required.
Installing the IDK
Obtain a Linux IDK compatible with your Elements Fuchsia SDK and target system from the Fuchsia IDK download page. Keep the selected version pinned for reproducible builds; do not assume the latest IDK matches an existing device image.
Install it into a persistent tools folder, such as ~/fuchsia-idk. The Linux x64 packaging payload must contain:
~/fuchsia-idk/tools/x64/ffx
~/fuchsia-idk/tools/x64/cmc
~/fuchsia-idk/tools/x64/ffx_tools/ffx-package
Fuchsia distributes the IDK through CIPD. On x86-64 Linux, a CIPD client can be installed into your user account:
mkdir -p ~/bin
curl -L 'https://chrome-infra-packages.appspot.com/client?platform=linux-amd64' -o ~/bin/cipd
chmod +x ~/bin/cipd
Then install the selected Linux IDK version, replacing <instance-id> with its pinned CIPD instance:
~/bin/cipd install fuchsia/sdk/core/linux-amd64 <instance-id> -root ~/fuchsia-idk
For example, the previously used Elements Fuchsia 32.20260726.1.1 SDK corresponds to instance tZ8pNT2_HRcT5h7Jzd9E2VbHIaMm-djzV_JG2CSA36gC. This is a version-specific example, not a recommendation to use it with newer SDKs or device images.
On another host architecture, extract or copy the matching Linux x64 IDK into the same folder. Downloading the payload does not require executing its tools.
Packaging on Linux
Check the host architecture:
uname -m
On x86-64 Linux, EBuild runs the packaging tools directly. Verify the payload:
~/fuchsia-idk/tools/x64/ffx version
test -x ~/fuchsia-idk/tools/x64/cmc && echo cmc-ok
test -x ~/fuchsia-idk/tools/x64/ffx_tools/ffx-package && echo package-ok
On ARM64 Linux, the current EBuild packaging path runs the Linux x64 tools in Docker using --platform linux/amd64. Compilation and linking still run on the development machine. Install Docker Engine and ensure the user running Earth or CrossBox can access its daemon.
The host also needs working amd64 emulation. If your Linux installation does not already provide it, an administrator can register it with:
docker run --privileged --rm tonistiigi/binfmt --install amd64
This privileged command changes the host's binary-format handlers; it is a host setup step, not something EBuild performs. Verify emulation and the mounted IDK:
docker run --rm --platform linux/amd64 ubuntu:24.04 uname -m
docker run --rm --platform linux/amd64 \
--mount type=bind,source="$HOME/fuchsia-idk/tools/x64",target=/fuchsia-tools,readonly \
ubuntu:24.04 /fuchsia-tools/cmc --help
The first command should print x86_64. An exec format error means amd64 emulation is unavailable; check it again after a host or VM restart.
On ARM64 Linux, if local Docker is unavailable, EBuild can package on the selected remote Linux CrossBox instead. If local Docker is available but the local IDK is missing or incomplete, EBuild reports that configuration error rather than silently switching hosts.
Configuring Earth
Open Tools > Preferences > Base Paths, then set Fuchsia IDK: under Island Paths to the IDK root, for example:
/home/user/fuchsia-idk
Select the root, not tools/x64. This is a user-level setting for local package creation, shared by Fuchsia projects. It can remain empty when the IDK is discovered at ~/fuchsia-idk or ~/fuchsia-sdk.
For a nonstandard Docker installation, use the general Docker executable path. EBuild also recognizes DOCKER_PATH or its DockerPath setting; FUCHSIA_DOCKER_PATH and FuchsiaDockerPath remain compatibility aliases.
When Earth runs as a Flatpak, EBuild can use a host Docker executable under /run/host, such as /run/host/usr/bin/docker, through flatpak-spawn --host. The IDK and build folders must be accessible to the host Docker daemon.
Configuring a Linux CrossBox Host
For Fire, Water, or another Earth installation, register the Linux machine through SSH as a CrossBox server. The configured SSH user must be able to run the tools and reach the Fuchsia target. A successful SSH validation alone does not verify Fuchsia discovery or debugging.
There are two separate tool lookups:
- Remote packaging looks for the Linux x64 packaging tools under
FUCHSIA_FFX_PATH,FUCHSIA_IDK_ROOT,FUCHSIA_SDK_ROOT,~/fuchsia-idk, or~/fuchsia-sdk. ARM64 CrossBox hosts additionally need Docker and amd64 emulation for packaging. - Device discovery and debugging use
FUCHSIA_FFX_PATH, the host-architecture tools directory under~/fuchsia-idkor~/fuchsia-sdk(tools/x64ortools/arm64), standard executable locations, orffxfound on the host'sPATH.
For a nonstandard installation, set the variables in the Linux account's login-shell environment, using absolute paths:
export FUCHSIA_IDK_ROOT=/path/to/fuchsia-idk
export FUCHSIA_FFX_PATH=/path/to/runnable/ffx
The selected ffx and its debugger tools must actually run on that Linux host. Docker packaging does not provide a long-running device/debugging service. For ARM64 Linux, use a compatible ARM64 host-tool installation or a separately configured working execution environment for x64 tools. If neither is available, use an x86-64 Linux CrossBox host.
A local IDE's Base Paths setting does not configure a remote Linux account. Configure and verify that account separately.
Command-Line Builds
For local builds with an IDK outside the default locations:
export FUCHSIA_IDK_ROOT=/path/to/fuchsia-idk
ebuild MyProject.elements
Local IDK discovery also recognizes FUCHSIA_SDK_ROOT, FUCHSIA_SDK_PATH, and an IDK located from FUCHSIA_FFX_PATH or ffx on PATH. These local discovery rules are not identical to the remote-host rules above.
For remote packaging, select the registered Linux CrossBox using the CrossBox EBuild setting. Package creation requires CreatePackage to be enabled on the executable project.
Verify Device Access
From the Linux account used by Earth or CrossBox, run the selected ffx:
ffx target list
ffx --target <target-name> target show
ffx --target <target-name> debug connect --new-agent
Use the full path if ffx is not on PATH. In the debugger, enter status and verify it is connected, then quit. Device connectivity, debugger prerequisites, and IDE operation are covered in Debugging Fuchsia Applications.
See Also
- Fuchsia
- Setting up Fire on macOS
- Setting up Water on Windows
- Installing RemObjects Earth
- EBuild