Booting Nerves on Raspberry Pi 2

Hi!
Downloaded “nerves_livebook_rpi2.fw”.
Flashed nerves in Raspberyy Pi2.

sudo fwup nerves_livebook_rpi2.fw 
Use 4.00 GB memory card found at /dev/sdb? [y/N] y
100% [====================================] 39.74 MB in / 42.44 MB out       
Success!
Elapsed time: 10.492 s

The booting of Nerves stops at the lines

[   16.445075] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp                 
[   16.497727] snd_bcm2835: module is from the staging directory, the quality i.
[   16.516416] bcm2835_audio bcm2835_audio: card created with 8 channels        
[   16.582991] smsc95xx v2.0.0                                                  
[   16.758377] SMSC LAN8700 usb-001:003:01: attached PHY driver (mii_bus:phy_ad)
[   16.773559] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usbe
[   16.789871] usbcore: registered new interface driver smsc95xx                
[   16.839043] input: raspberrypi-ts as /devices/platform/soc/soc:firmware/soc:6
[   16.898770] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup 
[   17.056892] smsc95xx 1-1.1:1.0 eth0: Link is Down                            
[   33.115943] cam-dummy-reg: disabling 

The cursor blinks, the keyboard does not respond to pressing.
there is no prompt “iex(1)>” to elixir.
Why doesn’t Nerves boot to the end?

The IEx console on the Raspberry Pi 2 goes to the HDMI output. I’m guessing that since you had nice boot logs that you are copy/pasting boot logs from the UART pins on the GPIO header. Nerves Livebook booted, but there weren’t any more messages on the UART.

You should still be able to get to the RPi2 via the network by running ssh nerves.local. Since you’re using Nerves Livebook, going to http://nerves.local in your browser should work too.

The root IEx console location depends on the Nerves System that you’re using. In this case, it’s nerves_system_rpi2 and it’s specified midway down the readme. There can be only one root IEx console, and for reasons it was chosen to be the HDMI output for the RPi2.

If you’d like to change the root IEx console location, you’ll need to recompile Nerves Livebook. See Changing the IEx console output. Specifically, you’ll need to add the following to rpi2.exs:

config :nerves, :erlinit,
  ctty: "ttyAMA0"

Hope this helps.

1 Like