Skip to content

Commit

Permalink
add a rootfs overlay, drop to sh on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
phanimahesh committed Sep 4, 2017
1 parent 10506c3 commit 9dd6fff
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/proxy42_firmware/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ use Mix.Config
# to add files to the root filesystem or modify the firmware
# archive.

# config :nerves, :firmware,
# rootfs_additions: "config/rootfs_additions",

config :nerves, :firmware,
rootfs_overlay: "rootfs_overlay"
# fwup_conf: "config/fwup.conf"

# Import target specific config. This must remain at the bottom
Expand All @@ -22,3 +23,4 @@ use Mix.Config
config :bootloader,
init: [:nerves_runtime],
app: :proxy42_firmware

40 changes: 40 additions & 0 deletions apps/proxy42_firmware/rootfs_overlay/etc/erlinit.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Additional configuration for erlinit

# Turn on the debug prints
#-v

# Specify the UART port that the shell should use.
-c tty1

# If more than one tty are available, always warn if the user is looking at
# the wrong one.
--warn-unused-tty

# Use dtach to capture the iex session so that it can be redirected
# to the app's GUI
#-s "/usr/bin/dtach -N /tmp/iex_prompt"

# Specify the user and group IDs for the Erlang VM
#--uid 100
#--gid 200

# Uncomment to hang the board rather than rebooting when Erlang exits
#--hang-on-exit

# Optionally run a program if the Erlang VM exits
--run-on-exit /bin/sh

# Enable UTF-8 filename handling in Erlang and custom inet configuration
-e LANG=en_US.UTF-8;LANGUAGE=en;ERL_INETRC=/etc/erl_inetrc

# Mount the application partition
# See http://www.linuxfromscratch.org/lfs/view/6.3/chapter08/fstab.html about
# ignoring warning the Linux kernel warning about using UTF8 with vfat.
-m /dev/mmcblk0p3:/root:vfat::

# Erlang release search path
-r /srv/erlang

# Assign a unique hostname based on the board id
-d "/usr/bin/boardid -b rpi -n 4"
-n nerves-%.4s

0 comments on commit 9dd6fff

Please sign in to comment.