Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boot hangs. #12

Closed
nicolafiorillo opened this issue Oct 8, 2019 · 4 comments
Closed

Boot hangs. #12

nicolafiorillo opened this issue Oct 8, 2019 · 4 comments

Comments

@nicolafiorillo
Copy link

Environment

  • Host:
Mac 10.14 Mojave
  • Elixir version (elixir -v):
Erlang/OTP 22 [erts-10.5.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Elixir 1.9.1 (compiled with Erlang/OTP 22)

(via asdf tool)

  • Nerves environment: (mix nerves.env --info):
|nerves_bootstrap| Environment Package List

  Pkg:         nerves_system_br
  Vsn:         1.9.2
  Type:        system_platform
  BuildRunner: {nil, []}

  Pkg:         nerves_system_rpi4
  Vsn:         1.9.0
  Type:        system
  BuildRunner: {Nerves.Artifact.BuildRunners.Docker, []}

  Pkg:         nerves_toolchain_arm_unknown_linux_gnueabihf
  Vsn:         1.2.0
  Type:        toolchain
  BuildRunner: {Nerves.Artifact.BuildRunners.Local, []}

  Pkg:         nerves_toolchain_ctng
  Vsn:         1.6.0
  Type:        toolchain_platform
  BuildRunner: {nil, []}

|nerves_bootstrap| Loadpaths Start


Nerves environment
  MIX_TARGET:   rpi4
  MIX_ENV:      dev

|nerves_bootstrap| Environment Variable List
  target:     rpi4
  toolchain:  /Users/nicolafiorillo/.nerves/artifacts/nerves_toolchain_arm_unknown_linux_gnueabihf-darwin_x86_64-1.2.0
  system:     /Users/nicolafiorillo/.nerves/artifacts/nerves_system_rpi4-portable-1.9.0
  app:        /Users/nicolafiorillo/Projects/nerves/hello_nerves

|nerves_bootstrap| Loadpaths End

Current behavior

I'm new on both Raspberry Pi and Nerves. I followed documentation from https://hexdocs.pm/nerves/installation.html and https://hexdocs.pm/nerves/getting-started.html#creating-a-new-nerves-app creating a clean app (adding no customization) using

export MIX_TARGET=rpi4
mix nerves.new hello_nerves
cd hello_nerves/
mix do deps.get, firmware, firmware.burn

Build and burn seem end correctly but RPI4 boot hangs as in screenshot:
IMG_3249

Expected behavior

iex console

Thanks for help!

@fhunleth
Copy link
Member

fhunleth commented Oct 8, 2019

The important message is buried in that text:

erlinit: The shell will be launched on tty 'ttyS0'
erlinit: If you would like the shell to be on this tty,
erlinit: configure erlinit with '-c tty1'

Your RPi4 isn't hung. It's just waiting for input on the Raspberry Pi 4's UART pins. This and connecting via ssh are the more convenient setups for development, but it shouldn't be the default for new projects. Do you have a rootfs_overlay/etc/erlinit.conf file that overrides the default tty?

@nicolafiorillo
Copy link
Author

Thanks @fhunleth. No, I did not override anything.
I'm sorry, I expected iex console because of the documentation:

Now that you have your SD card burned, you can insert it into your device and boot it up. For Raspberry Pi, be sure to connect it to an HDMI display and USB keyboard so you can see it boot to the IEx console.

@fhunleth
Copy link
Member

fhunleth commented Oct 8, 2019

You're right. The tty is set to the UART in this system. https://github.com/nerves-project/nerves_system_rpi4/blob/master/rootfs_overlay/etc/erlinit.config#L8. That's inconsistent with our other Raspberry Pi systems. I'll make a PR to fix that.

To get you working more quickly, create a rootfs_overlay/etc directory in your project and add it to your configuration. See https://hexdocs.pm/nerves/advanced-configuration.html#root-filesystem-overlays.

Then copy https://github.com/nerves-project/nerves_system_rpi4/blob/master/rootfs_overlay/etc/erlinit.config to rootfs_overlay/etc/erlinit.config and comment out -c ttyS0 and comment in -c tty1.

@nicolafiorillo
Copy link
Author

Works fine, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants