Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for building systems on macOS, and $TMPDIR #951

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions guides/advanced/customizing-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,3 +420,14 @@ You can also use the GitHub interface to do this:
```text
https://github.com/YourGitHubUserName/custom_rpi3/compare/main...nerves-project:main?expand=1
```

## Building Systems on macOS

The primary Apple File System (APFS) volume on Macs is case-insensitive, but the Nerves filesystem is case-sensitive. This can cause filename conflicts when including some packages.

To get around this limitation, use Disk Utility to create a new volume with the format "APFS (Case-sensitive)". Then set the following [environment variables](environment-variables.md) so that Nerves will use the new volume (named "Nerves" in this example):

```sh
export XDG_DATA_HOME='/Volumes/Nerves'
export TMPDIR='/Volumes/Nerves/tmp'
```
1 change: 1 addition & 0 deletions guides/advanced/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ device-specific code.
| `NERVES_DEBUG` | Set to `1` to print out debug info during compilation |
| `NERVES_LOG_DISABLE_PROGRESS_BAR` | Set to `1` to disable progress bar output when fetching artifacts (typically for CI) |
| `SOURCE_DATE_EPOCH` | Used for [reproducable builds](https://reproducible-builds.org). Can also be set via `config :nerves, source_date_epoch: val` |
| `TMPDIR` | Root directory for temporary files. Usually already set by the shell. |

## Nerves-provided environment variables

Expand Down