I am new to Nerves/Elixir and have inherited a Nerves project running on the Beaglebone Black. I have been tasked with bringing up our software, including Nerves, on the Octavo OSD3358-SM-RED eval board which is an SoC variant of the BBB.
I have built the nerves_examples/hello_network example and burned it to a SD card; when booted on a true BBB eth0 comes up and works as expected (gets DHCP addr, is pingable); when booted on the Octavo board eth0 does not work. I found, and worked around, an issue where the Octavo’s EEPROM incorrectly identifies the board - but fixing this did not help eth0. I have also tried setting a static IP via Nerves console commands but this does not help.
The Octavo board has a version of Debian Linux on its EMMC that is able to correctly bring up eth0; I noticed that this Linux uses kernel version 4.9.45-ti-r57 and tried in vain to get a local copy of the nerves_system_bbb repo to build with 4.9.45-ti-r57 (patching errors). I was successful at getting nerves_system_bbb built with a kernel later than the “default” version of the 4.19.50 kernel but this did not help either.
Wondering if anybody has a specific experience or can offer some advice?
Thanks!
Greg
I followed the Nerves install/getting started tutorial (MacOS) and am using the following:
Erlang/OTP 22 [erts-10.4.4] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1] [hipe]
Elixir 1.9.1 (compiled with Erlang/OTP 22)
Mix.exs
defmodule HelloNetwork.MixProject do
use Mix.Project
@app :hello_network
@version "0.1.0"
@all_targets [:rpi, :rpi0, :rpi2, :rpi3, :rpi3a, :rpi4, :bbb, :x86_64]
def project do
[
app: @app,
version: @version,
elixir: "~> 1.9",
archives: [nerves_bootstrap: "~> 1.6"],
start_permanent: Mix.env() == :prod,
build_embedded: true,
aliases: [loadconfig: [&bootstrap/1]],
deps: deps(),
releases: [{@app, release()}],
preferred_cli_target: [run: :host, test: :host]
]
end
# Starting nerves_bootstrap adds the required aliases to Mix.Project.config()
# Aliases are only added if MIX_TARGET is set.
def bootstrap(args) do
Application.start(:nerves_bootstrap)
Mix.Task.run("loadconfig", args)
end
# Run "mix help compile.app" to learn about applications.
def application do
[
mod: {HelloNetwork, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# Dependencies for all targets
{:nerves, "~> 1.5.0", runtime: false},
{:shoehorn, "~> 0.6"},
{:ring_logger, "~> 0.6"},
{:toolshed, "~> 0.2"},
# Dependencies for all targets except :host
{:nerves_runtime, "~> 0.6", targets: @all_targets},
{:nerves_init_gadget, "~> 0.4", targets: @all_targets},
# Dependencies for specific targets
#{:nerves_system_bbb, "~> 2.3", runtime: false, targets: :bbb},
#{:nerves_system_bbb, "~> 2.4.0", nerves: [compile: true], targets: :bbb},
#{:nerves_system_bbb, path: "../../nerves_system_bbb", runtime: false, targets: :bbb},
{:nerves_system_bbb, path: "../../nerves_system_bbb", nerves: [compile: true], targets: :bbb},
{:nerves_system_x86_64, "~> 1.8", runtime: false, targets: :x86_64},
]
end
def release do
[
overwrite: true,
cookie: "#{@app}_cookie",
include_erts: &Nerves.Release.erts/0,
steps: [&Nerves.Release.init/1, :assemble],
strip_beams: Mix.env() == :prod
]
end
end