This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% iex --name 'master@192.168.213.95' --cookie '1mk0ulenVwtz4bktF15Xu2OH8xn0CjgC4Vp4KVU5QC/kIqsbXuEoF4nPTgB04zys' | |
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] | |
Interactive Elixir (1.4.5) - press Ctrl+C to exit (type h() ENTER for help) | |
iex(master@192.168.213.95)1> Node.connect :'brainz@192.168.213.81' | |
true | |
iex(master@192.168.213.95)2> :observer.start | |
:ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def init_kernel_modules() do | |
Enum.each(@kernel_modules, & System.cmd("modprobe", [&1])) | |
end | |
def init_network() do | |
opts = Application.get_env(:brainz, @interface) | |
Nerves.InterimWiFi.setup(@interface, opts) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% iex --name 'master@192.168.213.95' --cookie '1mk0ulenVwtz4bktF15Xu2OH8xn0CjgC4Vp4KVU5QC/kIqsbXuEoF4nPTgB04zys' --remsh 'brainz@192.168.213.81' | |
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] | |
Interactive Elixir (1.4.5) - press Ctrl+C to exit (type h() ENTER for help) | |
iex(brainz@192.168.213.81)1> System.cmd("pwd", []) | |
{"/srv/erlang\n", 0} | |
iex(brainz@192.168.213.81)2> System.cmd("ls", ["/etc"]) | |
{"ssl\nshadow\nresolv.conf\nprofile.d\npasswd\nos-release\nnsswitch.conf\nnetwork\nmtab\nmodprobe.d\nmke2fs.conf\nlibnl\nhosts\ngroup\nfw_env.config\nerlinit.config\nerl_inetrc\n", | |
0} | |
iex(brainz@192.168.213.81)3> model_bin = File.read!("/proc/device-tree/model") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Distributed Erlang Options | |
## The cookie needs to be configured prior to vm boot for | |
## for read only filesystem. | |
-name brainz@192.168.213.81 | |
-setcookie 1mk0ulenVwtz4bktF15Xu2OH8xn0CjgC4Vp4KVU5QC/kIqsbXuEoF4nPTgB04zys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def application(_target) do | |
[mod: {Brainz.Application, []}, | |
extra_applications: [:logger, :runtime_tools]] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% mix firmware | |
Mix environment | |
MIX_TARGET: bbb | |
MIX_ENV: dev | |
Compiling 1 file (.ex) | |
|nerves_bootstrap| Building OTP Release... | |
==> Cleaning all releases.. | |
==> Clean successful! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deps(target) do | |
[ system(target), | |
{:bootloader, "~> 0.1"}, | |
{:nerves_runtime, "~> 0.4"}, | |
{:logger_multicast_backend, "~> 0.2.2"}, | |
{:nerves_interim_wifi, "~> 0.2.0"} | |
] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deps(target) do | |
[ system(target), | |
{:bootloader, "~> 0.1"}, | |
{:nerves_runtime, "~> 0.4"}, | |
{:nerves_interim_wifi, "~> 0.2.0"} | |
] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config :logger, | |
backends: [ :console, | |
{LoggerMulticastBackend, | |
target: {{192,168,213,95}, 514}, | |
level: :debug} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule NervesBBBEEPROM do | |
@moduledoc """ | |
Documentation for NervesBbbEeprom. | |
""" | |
@doc """ | |
Hello world. | |
## Examples |
OlderNewer