Rehan

Rehan

Mix firmware is generating version error

Hello,
I’m trying to build a sample application and deploy on beaglebone black.
I’m able to get the nerves shell up and running.
Also i was able to build the zImage, however when I try to execute mix firmware i’m getting error

packetp@pp:~/nerves_ramoops/nerves_system_bbb/test_bb$ mix firmware
==> nerves
==> nerves_system_br
Generated nerves_system_br app
==> nerves_toolchain_ctng
Compiling 1 file (.ex)
Generated nerves_toolchain_ctng app
==> nerves_toolchain_armv7_nerves_linux_gnueabihf
Generated nerves_toolchain_armv7_nerves_linux_gnueabihf app
==> nerves_system_bbb
Generated nerves_system_bbb app
==> test_bb

Nerves environment
  MIX_TARGET:   bbb
  MIX_ENV:      dev

** (Mix) Major version mismatch between host and target Erlang/OTP versions
  Host version: 25
  Target version: 26

This will likely cause Erlang code compiled for the target to fail in
unexpected ways.

The easiest way to resolve this issue is to install the same version of
Erlang/OTP on your host. See the Nerves installation guide for doing this
using the `asdf` version manager.

The Nerves System (nerves_system_*) dependency determines the OTP version
running on the target. It is possible that a recent update to the Nerves
System pulled in a new version of Erlang/OTP. If you are using an official
Nerves System, you can verify this by reviewing the CHANGELOG.md file that
comes with the release. Run 'mix deps' to see the Nerves System version and
go to that system's repository on https://github.com/nerves-project.

If you need to run a particular version of Erlang/OTP on your target, you can
either lock the nerves_system_* dependency in your mix.exs to an older
version. Note that this route prevents you from receiving security updates
from the official systems. The other option is to build a custom Nerves
system. See the Nerves documentation for building a custom system and then
run 'make menuconfig' and look for the Erlang options.

Below are the current active versions of erlang and elixir

packetp@pp:~/nerves_ramoops/nerves_system_bbb$ asdf current erlang
erlang          25.0.3          /home/packetp/.tool-versions
packetp@pp:~/nerves_ramoops/nerves_system_bbb$ asdf current elixir
elixir          1.13.4-otp-25   /home/packetp/.tool-versions

Initially elixir version i used was 1.15.5-otp-26 and erlang version was 25.0.2. With this I was successfully able to build the image and deployed it on BBB as well, but i was not able to get launch nerves shell.

Do i need to use any other versions of erlang and elixir?
Or is there anything I can change in mix.exs

Thanks & Regards,
Rehan

Most Liked

LostKobrakai

LostKobrakai

OTP is baked into nerves firmware (installed by buildroot). To successfully build a release to run on that firmware you need to make sure the otp version you’re using to build the release matches the otp version of the firmware. In your case it seems the firmware expects OTP 26, but your local system is running 25.

Where Next?

Popular in Questions Top

Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44608 311
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New

We're in Beta

About us Mission Statement