Small, general initialization and utilities for Nerves devices
Nerves.Runtime.Heart.guarded_immediate_reboot/0
to ungracefully reboot.Nerves.Runtime.FwupOps.factory_reset/1
to immediately reboot to
avoid a graceful shutdown unintentionally partially undoing the factory
reset work.Nerves.Runtime.reboot
when using guarded reboots.
This resulted in code running after the reboot call that wasn't expected to
have been run.Nerves.Runtime.FwupOps
to make it easier to run commands from the
revert.fw
(older) and ops.fw
(newer) files. The firmware revert logic
had always used this, and this makes getting to factory reset and preventing
reverts easier. Some operations aren't available on all Nerves systems.Nerves.Runtime.Heart.snooze/0
will request that heart
continues to pet
the hardware watchdog and ignore lack of updates from Erlang for a short
amount of time to allow debug of conditions that would otherwise be
interrupted by a watchdog timeout.:heart
is unresponsive.Support Nerves Heart v2.0.0 attributes and features. Nerves Heart v2.0.0 is a major update that addresses rare cases where devices would fail to reboot or detect an issue. It also adds helpful statistics. See the docs for details. Nerves Heart v1.x versions are still supported.
reboot
or poweroff
, and they stop petting the hardware
watchdog to set a hard limit.:heart.set_callback/1
should something
happen that prevents the callback from being set. This addresses an issue
where the VM would think everything is great since it wasn't calling the
callback to find out that it was not.boardid_path
in mix.exsThis update replaces Nerves.Runtime.target/0
with
Nerves.Runtime.mix_target/0
. It is not believed that the former function was
used much, but if you do use it, note the return value change in mix_target/0
.
:kv_backend
configuration option.:revert_fw_path
)This is a major update to nerves_runtime
that removes SystemRegistry. SystemRegistry has been disabled by default for years, but it could be re-enabled if device insertion and removal events were needed. That functionality has been moved to nerves_uevent
and updated to use the property_table
library used by VintageNet.
Elixir 1.11 is the minimum supported Elixir version now.
To upgrade from prior versions of nerves_runtime
:
:system_registry
at all, please review the :nerves_uevent
documentation for new library.config :nerves_runtime, :kernel, use_system_registry: false
from your target.exs
. It's not used any more.config :nerves_runtime, :kernel, autoload_modules: false
in your target.exs
, change it to config :nerves_uevent, autoload_modules: false
.Bug fixes
reboot
and poweroff
sequences in their own Erlang process. This fixes a bug were the process that calls reboot
gets killed partway through the reboot process and the system doesn't actually reboot.Changes
nerves_logging
. The
functionality is the same as before, but it's now possible to use without nerves_runtime
.nerves_heart
.