Hermanverschooten

Hermanverschooten

I am going out of the frying pan into the fire today…

I wanted to create a custom firmware for my RPi5, I need nftables.
So I cloned the repo at the latest tag (v0.3.1), set my MIX_TARGET, changed the mix.exs file, as I have done several times in the past.
I got my dependencies and compiled, so far so good.
Now I need to get to the make menuconfig, so I ran mix nerves.system.shell copied the docker command and ran it. Still good.

But when I do make menuconfig I just get a blank screen, with a single line on the bottom

/home/nerves/project/.config - Buildroot 2024.05.2 Configuration----------

That’s all. No menus, nothing and I have to ctrl-c to get out of it.

I assumed it has something to do with me being on an M2-Mac, so I ssh-d into my Ubuntu development machine and did the same dance.
But here I cannot even get the firmware to compile.

==> nerves
==> nerves_system_br
Generated nerves_system_br app
==> nerves_toolchain_ctng
Compiling 1 file (.ex)
Generated nerves_toolchain_ctng app
==> nerves_toolchain_aarch64_nerves_linux_gnu
Generated nerves_toolchain_aarch64_nerves_linux_gnu app
==> gratwifi_rpi5
Generated gratwifi_rpi5 app
Buildroot extracted to /home/herman/Projects/nerves/custom_rpi5/deps/nerves_system_br/buildroot.

Applying 0001-erlang-clean-up-target-installation.patch using patch:
patching file package/erlang/erlang.mk
Hunk #1 succeeded at 93 (offset -2 lines).

Applying 0002-mtools-Disable-iconv-use-on-target.patch using patch:
patching file package/mtools/mtools.mk

Applying 0003-NERVES_DEFCONFIG_DIR-support.patch using patch:
patching file Makefile
Hunk #2 succeeded at 995 (offset 6 lines).

Applying 0004-Add-customizable-linux-logo.patch using patch:
patching file linux/Config.ext.in
patching file linux/linux-ext-customlogo.mk
patching file package/Config.in
Hunk #1 succeeded at 282 (offset 2 lines).
patching file package/customlogo/Config.in
patching file package/customlogo/customlogo.mk

Applying 0005-kernel-wireless-regdb-install-regdb-in-kernel.patch using patch:
patching file linux/Config.ext.in
patching file linux/linux-ext-kernel-wireless-regdb.mk
patching file package/Config.in
Hunk #1 succeeded at 2459 (offset 101 lines).
patching file package/kernel-wireless-regdb/Config.in
patching symbolic link package/kernel-wireless-regdb/kernel-wireless-regdb.hash
patching file package/kernel-wireless-regdb/kernel-wireless-regdb.mk

Applying 0006-erlang-force-configure-options.patch using patch:
patching file package/erlang/erlang.mk
Hunk #1 succeeded at 39 (offset 8 lines).

Applying 0007-erlang-support-OTP-21-27.patch using patch:
patching file package/erlang/21.3.8.24/0001-erts-ethread-instruct-libatomic_ops-we-do-require-CA.patch
patching file package/erlang/21.3.8.24/0002-erts-emulator-reorder-inclued-headers-paths.patch
patching file package/erlang/21.3.8.24/0003-Link-with-LDLIBS-instead-of-LIBS-for-DED.patch
patching file package/erlang/21.3.8.24/0004-erlang-enable-deterministic-builds.patch
patching file package/erlang/22.3.4.26/0001-erts-ethread-instruct-libatomic_ops-we-do-require-CA.patch
patching file package/erlang/22.3.4.26/0002-erts-emulator-reorder-inclued-headers-paths.patch
patching file package/erlang/22.3.4.26/0003-erlang-enable-deterministic-builds.patch
patching file package/erlang/22.3.4.26/0004-disksup-update-df-call-to-work-with-Busybox.patch
patching file package/erlang/23.3.4.14/0001-erts-ethread-instruct-libatomic_ops-we-do-require-CA.patch
patching file package/erlang/23.3.4.14/0002-erts-emulator-reorder-inclued-headers-paths.patch
patching file package/erlang/23.3.4.14/0003-erlang-enable-deterministic-builds.patch
patching file package/erlang/23.3.4.14/0004-disksup-update-df-call-to-work-with-Busybox.patch
patching file package/erlang/24.3.2/0001-erts-ethread-instruct-libatomic_ops-we-do-require-CA.patch
patching file package/erlang/24.3.2/0002-erts-emulator-reorder-inclued-headers-paths.patch
patching file package/erlang/24.3.2/0003-erlang-enable-deterministic-builds.patch
patching file package/erlang/24.3.2/0004-disksup-update-df-call-to-work-with-Busybox.patch
patching file package/erlang/25.3.2/0001-erts-emulator-reorder-inclued-headers-paths.patch
patching file package/erlang/25.3.2/0003-disksup-update-df-call-to-work-with-Busybox.patch
patching file package/erlang/26.2.5/0001-disksup-update-df-call-to-work-with-Busybox.patch
patching file package/erlang/26.2.5/0002-erlang-libei-arch-compile.patch
patching file package/erlang/27.0.1/0001-disksup-update-df-call-to-work-with-Busybox.patch
patching file package/erlang/Config.in
patching file package/erlang/erlang.hash
patching file package/erlang/erlang.mk

Applying 0008-erlang-don-t-install-to-target.patch using patch:
patching file package/erlang/erlang.mk
Hunk #1 succeeded at 48 with fuzz 2 (offset 3 lines).

Applying 0009-rpi-firmware-support-custom-version-selection.patch using patch:
patching file package/rpi-firmware/Config.in
patching file package/rpi-firmware/rpi-firmware.mk

Applying 0010-Revert-package-libp11-bump-to-version-0.4.12.patch using patch:
patching file package/libp11/0001-Update-wp11_rsa.c.patch
patching file package/libp11/0001-src-p11_attr.c-fix-build-with-gcc-4.8.patch
patching file package/libp11/libp11.hash
patching file package/libp11/libp11.mk

Applying 0011-toolchain-external-refine-support-library-search-to-.patch using patch:
patching file toolchain/toolchain-external/pkg-toolchain-external.mk
Hunk #1 succeeded at 451 (offset 16 lines).

Applying 0012-fwup-bump-to-v1.10.1.patch using patch:
patching file package/fwup/fwup.hash
patching file package/fwup/fwup.mk

Applying 0013-uboot-support-alternative-TEE-filenames.patch using patch:
patching file boot/uboot/Config.in
patching file boot/uboot/uboot.mk

Applying 0014-Install-Linux-headers-to-staging.patch using patch:
patching file linux/linux.mk
Hunk #1 succeeded at 553 (offset 4 lines).
make: Entering directory '/home/herman/Projects/nerves/custom_rpi5/deps/nerves_system_br/buildroot-2024.05.2'
  GEN     /home/herman/Projects/nerves/custom_rpi5/.nerves/artifacts/gratwifi_rpi5-portable-0.3.1/Makefile
#
# configuration written to /home/herman/Projects/nerves/custom_rpi5/.nerves/artifacts/gratwifi_rpi5-portable-0.3.1/.config
#
make: Leaving directory '/home/herman/Projects/nerves/custom_rpi5/deps/nerves_system_br/buildroot-2024.05.2'
------------

Build directory successfully created.

Configuration: /home/herman/Projects/nerves/custom_rpi5/nerves_defconfig

Next, do the following:
   1. cd /home/herman/Projects/nerves/custom_rpi5/.nerves/artifacts/gratwifi_rpi5-portable-0.3.1
   2. make

For additional options, run 'make help' in the build directory.

IMPORTANT: If you update nerves_system_br, you should rerun this script.
.** (Mix) Nerves encountered an error while constructing the artifact
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
/bin/bash: line 1: ./bin/cat: cannot execute binary file: Exec format error
make[1]: *** [Makefile:750: target-finalize] Error 126
make: *** [Makefile:23: _all] Error 2

I traced the error back to the installation of the certificates, apparently it is trying to call the target cat command instead of the host’s.

So now I am stuck, on my Mac the firmware compiles, but make menuconfig is empty, on Ubuntu it doesn’t compile.

Help?

Marked As Solved

tomfarm

tomfarm

Are you using Kitty as your terminal? It sets TERM to xterm-kitty, which can lead to strange problems.

https://github.com/kovidgoyal/kitty/issues/713

Setting TERM to xterm in the nerves shell might solve the blank screen

mix nerves.system.shell
## wait a bit :) 
export TERM=xterm
make menuconfig

Also Liked

Hermanverschooten

Hermanverschooten OP

OMG, it’s not kiity, but iTerm2, but the issue was the same.

when I started the shell and echo $TERM it replied dumb.
So I set it to xterm and now it works.

Hermanverschooten

Hermanverschooten OP

I added it as an extra environment variable on the docker command.

gus

gus

Nerves Core Team

Thank you for this! I’ve been having the same problem on my recent custom systems using Elixir 1.17/Nerves Buildroot 1.28 (not sure which dependency changed to cause this issue), I just hadn’t got around to posting here or slack yet.

My TERM variable was also set to “dumb” on both Alacritty and iTerm2. Is there a way to persist this setting between calls to mix nerves.system.shell?

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New
dillonoconnor
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews