toolshed v0.2.6 Toolshed.Nerves

Helpers that are useful on Nerves devices

Helpers include:

  • dmesg/0 - print kernel messages
  • fw_validate/0 - marks the current image as valid (check Nerves system if supported)
  • reboot/0 - reboots gracefully
  • reboot!/0 - reboots immediately
  • uname/0 - print information about the running system

Link to this section Summary

Functions

Print out kernel log messages

Validate a firmware image

Shortcut to reboot a board. This is a graceful reboot, so it takes some time before the real reboot

Reboot immediately without a graceful shutdown. This is for the impatient

Print out information about the running software

Link to this section Functions

Link to this function

dmesg()
dmesg() :: :"do not show this result in output"

Print out kernel log messages

Link to this function

fw_validate()
fw_validate() :: :ok | {:error, String.t()}

Validate a firmware image

All official Nerves Systems automatically validate newly installed firmware. For some systems, it's possible to disable this so that new firmware gets one chance to boot. If it's not "validated" before a reboot, then the device reverts to the old firmware.

Link to this function

reboot()
reboot() :: no_return()

Shortcut to reboot a board. This is a graceful reboot, so it takes some time before the real reboot.

Link to this function

reboot!()
reboot!() :: no_return()

Reboot immediately without a graceful shutdown. This is for the impatient.

Link to this function

uname()
uname() :: :"do not show this result in output"

Print out information about the running software

This is similar to the Linux uname to help people remember what to type.