fhunleth / nerves_system_rpi0_2

64-bit Nerves System for RPi Zero 2 W and RPi 3A
Apache License 2.0
2 stars 3 forks source link

rpi0_2 tag #26

Open tomazbracic opened 6 months ago

tomazbracic commented 6 months ago

Instructions on how to work with this tag were not working for me. I changed tag as suggested to rpi0_2 in command line and withing mix.exs, but somehow had issue with mix firmware.

In my mix.exs i added {:nerves_system_rpi3a, "~> 1.24", runtime: false, targets: :rpi0_2} and commented out the line for targets: :rpi3a

This is the output of the mix firmware command

➜  zeroleds 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_rpi3a
Generated nerves_system_rpi3a app
==> zeroleds

Nerves environment
  MIX_TARGET:   rpi0_2
  MIX_ENV:      dev

==> shoehorn
Compiling 7 files (.ex)
Generated shoehorn app
==> circular_buffer
Compiling 1 file (.ex)
Generated circular_buffer app
==> ring_logger
Compiling 6 files (.ex)
Generated ring_logger app
==> uboot_env
Compiling 5 files (.ex)
Generated uboot_env app
==> property_table
Compiling 8 files (.ex)
Generated property_table app
==> circuits_gpio
"**** CIRCUITS_GPIO_BACKEND set to [cdev] ****"
 CC hal_cdev_gpio.o
 CC hal_cdev_gpio_interrupts.o
 CC nif_utils.o
 CC gpio_nif.o
 LD gpio_nif.so
Compiling 7 files (.ex)
Generated circuits_gpio app
==> nerves_logging
 CC kmsg_tailer.o
 LD kmsg_tailer
Compiling 5 files (.ex)
Generated nerves_logging app
==> nerves_uevent
 CC uevent.o
 LD uevent
Compiling 3 files (.ex)
Generated nerves_uevent app
==> nerves_runtime
Compiling 13 files (.ex)
Generated nerves_runtime app
==> toolshed
Compiling 5 files (.ex)
Generated toolshed app
==> zeroleds
Compiling 2 files (.ex)
Generated zeroleds app
|nerves| Building OTP Release...

* [Nerves] validating vm.args
** (Shoehorn.ReleaseError) nerves_pack is not a known OTP application
    (shoehorn 0.9.1) lib/shoehorn/release.ex:182: Shoehorn.Release.check_app/2
    (elixir 1.16.0) lib/enum.ex:987: Enum."-each/2-lists^foreach/1-0-"/2
    (shoehorn 0.9.1) lib/shoehorn/release.ex:32: Shoehorn.Release.init/1
    (mix 1.16.0) lib/mix/tasks/release.ex:1076: Mix.Tasks.Release.run_steps/1
    (mix 1.16.0) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5
    (nerves 1.10.5) lib/mix/tasks/firmware.ex:51: Mix.Tasks.Firmware.run/1
    (mix 1.16.0) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.16.0) lib/mix/cli.ex:96: Mix.CLI.run_task/2

I assume I have mis configuration issue, but from the docs on https://hexdocs.pm/nerves_system_rpi0_2/readme.html#using I didn't find any further suggestion on what to change.

Any suggestion is welcome.

Thnx.

fhunleth commented 6 months ago

In your project's mix.exs, take a look for nerves_pack in the dependency list. This looks like the error that you get when the targets specification for it doesn't include the target that you're building. That means that Elixir won't add the nerves_pack library to the Mix release that it makes. The fix is to add :rpi0_2 to your @all_targets list.