I can't set HDMI to Serial as RPI console as I failed to compile the RPI module

I changed the file of /rootfs_overlay/etc/erlinit.config to use serial as console.

#-c tty1     #HDMI
-c ttyS0

Then compiled as $mix deps.compile, and this error comes out.

The following Nerves packages need to be built:
The build process for each of these can take a significant amount of time so the maintainers have listed URLs for downloading pre-built packages.
If you have not modified these packages, please try running `mix deps.get`
or `mix deps.update` to download the precompiled versions.

If you have limited network access and are able to obtain the files via
other means, copy them to `~/.nerves/dl` or the location specified by `$NERVES_DL_DIR`.
If you are making modifications to one of the packages or want to force local compilation, add `nerves_compile: true` to the dependency. For example:
  {:nerves_system_rpi2, "~> 1.6.0", nerves: [compile: true]}
If the package is a dependency of a dependency, you will need to
override it on the parent project with `override: true`.

I followed error messages but I couldn’t resolve this problem.
This compile error always happens whenever I modify the file of erlinit.config as I enter the space into this.

Could you anyone please help me?

I’m not exactly sure what happened, but i think you are maybe adding a step that doesn’t need to be added.

You shouldn’t need to update any dependencies, or set nerves: [compile: true] unless you are building a custom system. (which isn’t required for updating erlinit.conf)

assuming you started a fresh project:

# create new app
mix nerves.new hello_nerves --target rpi2
cd hello_nerves
# create a copy of the existing erlinit.config
wget -P ./rootfs_overlay/etc https://raw.githubusercontent.com/nerves-project/nerves_system_rpi2/master/rootfs_overlay/etc/erlinit.config
# replace `ttyS0` with `ttyAMA0`
sed -i -e 's/ttyS0/ttyAMA0/g' ./rootfs_overlay/etc/erlinit.config
#  Build firmware
MIX_TARGET=rpi2 mix do deps.get, firmware
# ???
# profit?
1 Like

Thanks a lot.
As a result, I mistook to modify the following directory file.

There is ./rootfs_overlay on the project base directory I didn’t notice. I copy on the above directory to ./rootfs_overlay/etc so it works although I misused ttyS0 as ttyAMA0.

Thank you again for your help.