This version adds support for Elixir ~> 1.7 which requires updates to your Mix project.
Modify the release config
It is required to modify the rel/config.exs
file.
Change this:
release :my_app do
set version: current_version(:my_app)
plugin Shoehorn
if System.get_env("NERVES_SYSTEM") do
set dev_mode: false
set include_src: false
set include_erts: System.get_env("ERL_LIB_DIR")
set include_system_libs: System.get_env("ERL_SYSTEM_LIB_DIR")
set vm_args: "rel/vm.args"
end
end
To this:
release :my_app do
set version: current_version(:my_app)
plugin Shoehorn
plugin Nerves
end
Update shoehorn
You will need to update your version of shoehorn to {:shoehorn, "~> 0.4"}
.
- Enhancements
- Update minimum required version for fwup to at least 1.2.5
- Enhancements
-
Added ability to override provisioning.conf in the project mix config. This can be done by setting the key
provisioning
.Example:
config :nerves, :firmware, provisioning: "config/provisioning.conf" # or delgate it to an app that sets nerves_provisioning: "path/to/file" config :nerves, :firmware, provisioning: :nerves_hub
-
Bug Fixes
- Fix issue with setting provisioning environment vairables when calling
mix firmware.burn
on Linux systems. Environment variables prefixed withNERVES_
and the variableSERIAL_NUMBER
will be copied into the environment.
- Fix issue with setting provisioning environment vairables when calling
-
-
Enhancements
- Updated docs to bump required versions of tools.
-
Bug Fixes
- Docker build runner
- Use the version of the
nerves_system_br
as the tag for the docker image to pull by default. - Create and set the user id and group id in the docker entrypoint. This fixes issues with building buildroot packages that require access to the users home folder.
- Use the version of the
- Docker build runner
-
Enhancements
mix firmware.burn
can run within Windows Subsystem for Linux- Added
make_args
tobuild_runner_opts
For example:
You can configure the number of parallel jobs that buildroot can use for execution. This is useful for situations where you may have a machine with a lot of CPUs but not enough ram.
# mix.exs defp nerves_package do [ # ... build_runner_opts: [make_args: ["PARALLEL_JOBS=8"]], ] end
- Enhancements
- General documentation updates.
- Bug fixes
- Do not fetch artifacts on deps.get if they are overridden using environment
variables like
NERVES_SYSTEM=/path/to/system
.
- Do not fetch artifacts on deps.get if they are overridden using environment
variables like
- Bug Fixes
Nerves.Artifact.BuildRunners.Docker
was running as root and caused file permission issues with thedeps
directory of the rootmix
project. TheDocker
build runner now executes as the same user id and group id as the host.
This version renames the module Nerves.Artifact.Provider
to
Nerves.Artifact.BuildRunner
. This change should only affect custom systems
and host tools that override the defaults in nerves_package
config.
- Enhancements
- Allow specifying multiple rootfs_overlay directories in the config.
- Automatically remove corrupt files from the download directory.
- Updated System documentation.
- Bug Fixes
- Check the download directory before attempting to download the artifact.
- Changed the host tool check to use
System.find_executable("command")
instead of calling out toSystem.cmd("which", ["command"])
. This addressed an issue with NodeJS breaking anything that called intowhich
resulting in an obscure error.
This rc contains documentation cleanup and updates through out.
-
Enhancements
-
Support forwarding the ssh-agent through Docker for the Nerves system shell.
-
Allow headers and query params to be passed to the
:prefix
artifact_sites
helper.Example:
{:prefix, "https://my_server.com/", headers: [{"Authorization", "Basic 1234"}]}
{:prefix, "https://my_server.com/", query_params: %{"id" => "1234"}}
-
Added
github_api
toartifact_sites
for accessing release artifacts on private github repositories.Example:
{:github_api, "owner/repo", username: "skroob", token: "1234567", tag: "v0.1.0"}
-
-
Bug Fixes
-
Disable the nerves_package compiler if the
NERVES_ENV_DISABLED
is set. This makes it easier to executemix
tasks without building the system.Example:
NERVES_ENV_DISABLED=1 mix docs
-
Nerves no longer automatically compiles any nerves_package
that is missing its
pre-compiled artifact. This turned out to rarely be desired and caused
unexpectedly long compilation times when things like the Linux kernel or gcc got
compiled.
When a pre-compiled artifact is missing, Nerves will now tell you what your
options are to resolve this. It could be retrying mix deps.get
to download it
again. If you want to force compilation to happen, add a :nerves
option for
the desired package in your top level project:
{:nerves_system_rpi0, "~> 1.0-rc", nerves: [compile: true]}
- Bug Fixes
- Mix raises a more informative error if the
nerves_package
compiler attempts to run and thenerves_bootstrap
application has not been started. This also produces more informative errors when trying to compile from the top of an umbrella.
- Mix raises a more informative error if the
- Bug Fixes
- Including the entire artifact checksum in artifact download file name was causing issues with file encryption libraries. Fixed by changing the artifact download name to only use the first 7 of the artifact checksum.
- Bug Fixes
- Ensure the artifact cache dir is clean and created before putting artifacts.
-
Enhancements
- Call
bootstrap/1
on any package that defines a platform - Added Nerves.Utils.File.tar helper for creating archives
- Only apply the host tuple
portable
to packages with typesystem
- Packages other then toolchains and systems can override their artifact
paths using an env var of their app name. For example. a package called
:host_tool
would be able to override the artifact path by settingHOST_TOOL
in the environment. - Allow any package that declares a provider to create an artifact.
- Fixed up test fixtures and added integration test.
- Call
-
Bug Fixes
- Do not raise when trying to make a directory when putting an artifact in the global cache.
- Ensure the Nerves environment has been started when calling
nerves artifact
- Bug Fixes
- Fix artifact archiver to use
Artifact.download_name/1
instead ofArtifact.name/1
. Fixes issues with the Docker provider andmix nerves.artifact
- Fix issue with
nerves.system.shell
not rendering properly
- Fix artifact archiver to use
- Bug Fixes
- Artifact download_path should use download_name. This was causing a mismatch between dl files from buildroot and the resolver causing it to have to download them twice
- Fixed issue with compiling certain nerves packages when calling
mix deps.compile
- Bug Fixes
- Fixed issue where env var artifact path overides were being calculated instead of honored.
- Bug Fixes
- Fixed issue with artifact default path containing duplicate names
Nerves.Env.host_os
can be set from$HOST_OS
for use with canadian cross compileNerves.Env.host_arch
can be set from$HOST_ARCH
for use with canadian cross compile- mkdir -p on
Artifact.base_dir
before trying to link to build path artifacts - raise if artifact_urls are not binaries.
- Update Notes
Starting in Nerves v0.9.0, artifacts will no longer be fetched during mix compile
. Artifact archives are intended to be fetched following mix deps.get
.
To handle this, you will need to update your installed version of
nerves_bootstrap
by calling mix nerves.local
. After updating
nerves_bootstrap
, you should update your mix.exs
file to add the new
required mix aliases found there. A helper function is available named
Nerves.Bootstrap.add_aliases
that you can pipe your existing aliases to like
this:
defp aliases(_target) do
[
# Add custom mix aliases here
]
|> Nerves.Bootstrap.add_aliases()
end
Also, update your nerves dependency to:
{:nerves, "~> 0.9", runtime: false}
-
API Changes
- Moved
Nerves.Package.Providers
toNerves.Artifact.Providers
- Moved
Nerves.Package.Providers.HTTP
toNerves.Artifact.Resolver
Nerves.Artifact.Resolver
no longer implements theNerves.Artifact.Provider
behaviour.
- Moved
-
Enhancements
-
Added Mix task
nerves.artifact.get
. Use to fetch the artifact archive from anartifact_url
location. Once downloaded its checksum will be checked againstartifact_checksum
from thenerves_package
config inmix.exs
. The Mix tasknerves.deps.get
will recursively callnerves.artifact.get
to fetch archives. -
Added Mix task
nerves.artifact
. This task will produce the artifact archive file which are used when callingnerves.artifact.get
. -
Nerves packages can override the Provider in the
nerves_package
config inmix.exs
using the keysprovider
andprovider_opts
. This is useful to force a package to build using a specific provider likeNerves.Artifact.Providers.Docker
. See the package configuration docs for more information. -
Added
artifact_sites
to thenerves_package
config. Artifact sites are helpers that are useful for cleanly specifying locations where artifacts can be fetched. If you are hosting your artifacts using Github releases you can specify it like this:artifact_sites: [ {:github_releases, "organization/project"} ]
You can also specify your own custom server location by using the
:prefix
helper by passing a url or file path:artifact_sites: [ {:prefix, "/path/to/artifacts"} {:prefix, "https://my_bucket.s3-east.amazonaws.com/artifacts"} ]
Artifact sites will be tried in order until one successfully downloads the artifact.
-
-
Bug Fixes
- Fixed issue with
Nerves.Utils.HTTPResolver
crashing when missing thecontent-disposition
andcontent-length
headers. - Run integrity check on tar files to validate they are not corrupted on download.
- Fixed issue with
- Bug Fixes
- Revert plugin Nerves in new project generator until
the fix can be made in distillery.
This issue was causing the release to contain compiled
libraries from the host instead of the target.
The error would look similar to this
You can fix this by updating and regenerating the new project.
Got: ELF 64-bit LSB relocatable, x86-64, version 1 If binary, expecting: ELF 32-bit LSB executable, ARM, EABI5 version 1, interpreter /lib/ld-linux.so.3, for GNU/Linux 4.1.39
- Revert plugin Nerves in new project generator until
the fix can be made in distillery.
This issue was causing the release to contain compiled
libraries from the host instead of the target.
The error would look similar to this
-
Enhancements
- Added contributing guide
- Improved error messages when
NERVES_SYSTEM
orNERVES_TOOLCHAIN
are unset.
-
Bug Fixes
- Don't override the output_dir in the Distillery Plugin.
- Bug Fixes
- Fixed an error in the
Nerves
Distillery plugin that was causing the following error message:Plugin failed: no function clause matching in IO.chardata_to_string/1
- Fixed an error in the
-
Enhancements
- Removed legacy compiler key from the package struct. The
nerves_package
compiler will be chosen by default. - Simplified the distillery release config by making Nerves a distillery plugin
- Skip archival phase when making firmware.
- Allow the progress bar to be disabled for use in CI systems by setting
NERVES_LOG_DISABLE_PROGRESS_BAR=1
- Deprecate nerves.exs. The contents of nerves.exs files have been moved into mix.exs under the project key
nerves_package
- Removed legacy compiler key from the package struct. The
-
Bug Fixes
- raise an exception when the artifact build encounters an error
-
Enhancements
- Docker
- Reduced the image size by optimizing docker file.
- Images are pulled from Docker Hub instead of building locally.
- Containers are transient and build files are stored in docker volumes.
- NERVES_BR_DL_DIR is mounted as a host volume instead of a docker volume.
- Docker
-
Bug Fixes
- Docker
- Fixed issue where moving the project location on the host would require the container to be force deleted.
- Docker
- Bug Fixes
- Make sure the path NERVES_DL_DIR exists before writing artifacts to it.
- Enhancements
- [mix firmware.image] remove the need to pass an image name. Default to the app name.
- [mix] added shortdocs to all mix tasks.
- [fwup] bumped requirement to ~> 0.15 and support 1.0.0 pre release.
- Cache downloads to ~/.nerves/dl or $NERVES_DL_DIR if defined.
- Bug Fixes
- Fixed issue where
nerves.system.shell
would hang and load improperly.
- Fixed issue where
- Enhancements
- Deprecated the
rootfs_additions
configuration option, to be superseded by therootfs_overlay
option, which matches the convention used by the Buildroot community.
- Deprecated the
- Bug Fixes
- The
nerves.system.shell
Mix task should not domake clean
by default.
- The
- Enhancements
- The "Customizing Your Own Nerves System" documentation has been updated to
include the
mix nerves.system.shell
functionality, including a blurb to recommend running a clean build any time it's not working as expected.
- The "Customizing Your Own Nerves System" documentation has been updated to
include the
- Bug Fixes
- Try to include the parent project when loading Nerves packages
- Better error message from the Docker provider when Docker is not installed
- Delete system artifact directories only when instructed by
mix nerves.clean
on Linux. This prevents triggering a full rebuild for every change made to a custom system.
- Enhancements
- Added support for the new
nerves.system.shell
task, provided bynerves_bootstrap
, toNerves.Package.Providers.Docker
andNerves.Package.Providers.Local
, which provides a consistent way to configure a Buildroot-based Nerves system on both OSX and Linux. This replaces thenerves.shell
Mix task, which had not been fully implemented. mix firmware.burn
no longer asks for your password if using Linux and have read/write permissions on the SD card device.
- Added support for the new
- Bug Fixes
- Docker Provider: Fix version parsing issue when major, minor, or patch contains leading zeros.
- Bug Fixes
- Require Nerves Packages to have a version
- Enhancements
- Propagate Mix.Project.config settings into the firmware metadata
- Removed checksum from docker container name. Docker provider now only builds changes
- Added Nerves.Env.clean for cleaning package providers
- BugFixes
- Handle redirects manually as a fix to OTP 19.3 caused by ERL-316
- BugFixes
- Handle redirects manually as a fix to OTP 19.3 caused by ERL-316
- Bug Fixes
:nocache
the HTTP provider if the download list is empty- return an error when tar is unsuccessful at decompressing an artifact
- return
:error
for any error in downloading artifacts - clean up temp files after downloading artifacts
- expand path before comparing for dep type: Fixes path deps in umbrella
- clean up artifact dir before copying new artifact
- Enhancements
- changed console output for higher visibility Nerves compiler messages
- added ability to specify the images_path in the Mix.Project config
- changed default images_path to
#{build_path}/nerves/images
- updated docs to reflect changes made to project structure
- added
mix nerves.info
task. Can be used to gain information about the Nerves env
- Bug Fixes
- removed
--silent
frommix release.clean
for compatibility with:distillery ~> 1.2.0
- removed
- Bug Fixes
- [Providers.Local] Fix return error on non zero exit status code
- Fixed IO stream split to handle ANSI code case regression
- Bug Fixes
- fix artifact http download manager to take as long as it needs unless idle for more than 2 minutes.
- [Providers.Docker] Fixed IO stream parsing to handle occasions where ANSI codes are not being passed.
- loosened dependency on distillery
- Bug Fixes
- catch exits from mix release.clean when calling mix firmware
- Bug Fixes
- return an
{:error, message}
response from the http provider when a resource is not found
- return an
-
Enhancements
- Mix will display a progress bar, percentage, and total / expected bytes when downloading artifacts.
- Added task
mix firmware.image my_app.img
for producing images for use with applications like dd - Silenced output from distillery which would contain misleading information for the nerves project
-
Bug Fixes
- Docker provider could potentially produce application id's that were invalid
- Bug Fixes
- Fixed issue where artifact paths could not be set by system env var
- Mix Task
nerves.release.init
was failing due to missing template. Include priv in hex package files.
- Bug Fixes
- Do not stop the Nerves.Env at the end of the package compiler. This would cause the packages to resolve the wrong dep type.
- Fixed issue where remote artifacts would not be globally cached
- Fixed issue with package compiler where it would always force systems to be built
- Enhancements
- Improved test suite
- Added documentation for modules
- Consolidated the Nerves Environment to the Nerves package
- Enhancements
- Consolidated compilers into
nerves_package
. - Removed dependency for
nerves_system
- Removed dependency for
nerves_toolchain
- Added Docker provider for building custom systems on machines other than linux
- Consolidated compilers into
- Bug Fixes
- Fixed regression with
mix firmware.burn
to allow prompts
- Fixed regression with
- Enhancements
- Added ability to override task in
mix firmware.burn
. You can now pass-t
or--task
to performupgrade
or anything else. Default iscomplete
- Added ability to override task in
- Bug Fixes
- Updated nerves.precompile / loadpaths to support Elixir 1.3.x aliases.
- Enhancements
- Removed dependency on porcelain
- Bug Fixes
- Support for elixir 1.3.0-dev
- Invoke
nerves.loadpaths
on preflight ofmix firmware
andmix firmware.burn
. FixesERROR: It looks like the system hasn't been built!
- Enhancements
- Perform host tool checks before executing scripts
- Enhancements
- Added nerves_bootstrap archive
mix firmware
Create firmware bundles from mixmix firmware.burn
Burn Firmware bundles to SD cards
- Enhancements
- Added support for 0.4.0 system paths