- Bug fixes
- Fix potential process accumulation from the kmsg_tailer process ignoring stdin being closed on it.
- Tightened deps to avoid combinations that would be difficult to support
-
Bug fixes
- Fix off-by-one error when processing uevent messages with device paths longer than 16 segments. This also bumps the max number of segments to 32.
- Fix logger message about
rngd
failing when it was successful - Log errors when required commands aren't available rather than raising. It turned out that raising was disabling logging and that was making it hard to figure out the root cause.
-
Enhancements
- Switch from parsing
/proc/kmsg
to/dev/kmsg
for kernel messages. The device interface supplies a little more information and is unaffected by other programs reading from it. This change refactored syslog/kmsg parsing to improve test coverage. This is considered to be an internal API. If you were using it, you will need to update your code.
- Switch from parsing
- Bug fixes
- Fix exception on init when mounting the application data partition.
This addresses an issue where
:nerves_runtime
would exit due to an unmatched call toSystem.cmd/3
.
- Fix exception on init when mounting the application data partition.
This addresses an issue where
- New feature
- Added
Nerves.Runtime.KV.put
andNerves.Runtime.KV.put_active
to support setting environment. This removes the need to runfw_setenv
and also updates the cached key/value pairs. Thanks to Troels Brødsgaard for implementing.
- Added
- Bug fixes
- Fix C compiler error (PATH_MAX undeclared) on x86_64/muslc systems
- Enhancements
- Reduced number of syscalls needed for transferring device detection events (uevents) to Elixir by batching them
- Improved start up performance by moving initial device enumeration to C
- Handle uevent overloads by dropping messages rather than crashing. Uevent bursts are handled better by the new batching, but can be more severe due to faster enumeration. Both dropping and crashing have drawbacks, but dropping made it possible to recover on a 32-processor machine with many peripherals.
- Enhancements
- Move C build products to under
_build
- Move C build products to under
- Enhancements
- Support disabling SystemRegistry integration. This is not a recommended setting and should only be used on slow devices that don't need device insertion/removal notifications.
- Enhancements
- Filter out
synth_uuid
from uevent reports since it's not supported by the current uevent handling code. - Further reduce garbage produced by processing uevent reports
- Filter out
The Nerves Runtime Helpers have been extracted and are now part of
Toolshed. The helpers included things like
cmd/1
and reboot/0
that you could run at the IEx prompt. Toolshed is not
included as a dependency. If you would like it, please add toolshed
to your
application dependencies. You'll find that Toolshed contains more helpers. It is
also easier for us to maintain since changes to the helpers no longer affect
all Nerves projects.
- Enhancements
- Further optimize enumeration of devices at boot. This fixes an issue where uniprocessor boards (like the RPi Zero and BBB) would appear to stall momentarily on boot.
- The U-Boot environment processing code has been factored out of
nerves_runtime
so that it can be used independently from Nerves. It can be found at uboot_env.
-
Enhancements
- Optimized enumeration of devices at boot. You will likely notice devices becoming available more quickly. This may uncover race conditions in application initialization code.
- The
syslog
monitoring code has been rewritten in pure Elixir. This component captures log messages sent by C programs using thesyslog
system call so that they can be handled by Elixir Logger backends. - The kmsg log monitor still requires C, but the C code is simpler now that it
doesn't process
syslog
messages as well. - The Linux
uevent
processing code was simplified and the C to Elixir communications refactored to minimize processing of events.
-
Bug fixes
- Fixed a race condition with the Linux kernel and processing
/sys/devices
that could cause an exception during device enumeration. - Syslog messages w/o terminating newlines are logged now.
- Fixed a race condition with the Linux kernel and processing
-
Enhancements
-
Documentation updates to
nerves_serial_number
,nerves_validated
, andnerves_autovalidate
. -
Added helper function
Nerves.Runtime.KV.UBootEnv.put/2
for writing to the UBoot env. This is useful for setting provisioning information at runtime. -
Added the ability to mock the contents of
Nerves.Runtime.KV
for use in test and dev. The contents can be set in your application config.config :nerves_runtime, :modules, [ {Nerves.Runtime.KV.Mock, %{"key" => "value"}} ]
-
-
Bug fixes
- Kernel uevent
change
messages no longer cause modifications to system_registry.
- Kernel uevent
Update dependencies to only include dialyxir
for [:dev, :test]
, preventing
it from being distributed in the with the hex package. This addresses an issue
where dialyxir
and its dependencies would be included in the applications list
when producing the OTP release and cause :wx
to raise because the target
version of erts
was compiled without it.
- Bug fixes
- Fix U-Boot environment load issue and add unit tests to cover environment block generation using either U-Boot tools or fwup
- Load rngd if available. If it's available, this greatly shortens the time for the Linux kernel's random number entropy pool to initialize. This improves boot time for applications that need random numbers right away.
- Bug fixes
- Fix issue with parsing fw_env.config files with space separated values.
-
Enhancements
- Updates to docs and typespecs.
-
Bug fixes
- Read the U-Boot environment directly using :file if possible. (OTP-21)
This fixes an issue with
fw_printenv
where multi-line values cause the output to be unparseable.
- Read the U-Boot environment directly using :file if possible. (OTP-21)
This fixes an issue with
- Bug fixes
- Log the output of system commands to that they're easier to review
- Support mounting
f2fs
(requires support in the Nerves system to work)
-
New features
- Forward operating system messages from
/dev/log
and/proc/kmsg
to Elixir'sLogger
. If the log volume is too much to the console, consider replacing the console logger withring_logger
or another logger backend.
- Forward operating system messages from
-
Bug Fixes
cmd/1
helper improvements to interactively print output from long running commands.Nerves.Runtime.revert
would always reboot even if told not to.- Cleanup throughout to improve docs, formatting, and newer Elixir stylistic conventions
- Remove scary suid printout when crosscompiling since nothing setuid related was going on.
-
Enhancements
- Added
Nerves.Runtime.revert
to revert the device to the inactive firmware. To use this, the Nerves system needs to include revert instructions. This is currently being implemented.
- Added
-
Bug Fixes
- Setuid the
uevent
port binary for debugging on the host.
- Setuid the
- Bug Fixes
- Split device attributes into only two parts
-
The Nerves runtime shell (the bash shell-like shell from CTRL+G) has been moved to a separate project so that it can evolve independently from
nerves_runtime
. As such, it's no longer available, but see thenerves_runtime_shell
project to include it again. -
Enhancements
- Force application partition UUID. The UUID has previously been random. The main reason for change is to avoid a delay when waiting for the urandom pool to initialize. Having a known UUID for the application partition may come in handy in the future, though.
- Enhancements
- Added installation helper for
Nerves.Runtime.Helpers
- Privatized methods in KV so that they don't show up in the tab complete and help screens.
- Added installation helper for
- Enhancements
- The
Nerves.Runtime.Helpers
module provides a number of functions that are useful when working at the IEx prompt on a target.
- The
- Enhancements
- Makefile only builds for Linux hosts or cross compile environments. Allows package to compile on other platforms.
- Bug Fixes
- Fixed issue with the order of args being passed to mkfs
- Enhancements
- Loosen dependency requirements on SystemRegistry
- Bug Fixes
- Increased erl_cmd buffer size to 2048 to prevent segfaults with uevents for devices with many attributes.
- Enhancements
- Removed GenStage in favor of SystemRegistry
- Added KV firmware variable key value store
- Added Init worker for initializing the application partition
- Enhancements
- Moved hardware abstraction layer to separate project for further development
- Start the shell using the name
sh
instead of'Elixir.Nerves.Runtime.Shell'
- Bug fixes
- Cleaned up IO
- Rename host to sh