Skip to content

Instantly share code, notes, and snippets.

@kfatehi
Last active December 4, 2015 23:26
Show Gist options
  • Save kfatehi/f04be4e43602cd014c13 to your computer and use it in GitHub Desktop.
Save kfatehi/f04be4e43602cd014c13 to your computer and use it in GitHub Desktop.

Get the System

You need Linux to build it

git clone https://github.com/nerves-project/nerves-sdk.git
make nerves_bbb_defconfig 
make system               

Copy system.tar.gz to the Mac

Alternatively, download it:

# nerves_bbb_defconfig
curl -LO https://s3.amazonaws.com/nerves-project/fatehitech/nerves-sdk/9/9.1/system.tar.gz

# nerves_rpi_elixir_defconfig
curl -LO https://s3.amazonaws.com/nerves-project/fatehitech/nerves-sdk/9/9.2/system.tar.gz

# nerves_rpi2_elixir_defconfig
curl -LO https://s3.amazonaws.com/nerves-project/fatehitech/nerves-sdk/9/9.3/system.tar.gz

On the Mac

Install mksquashfs (used to create release firmware):

brew install squashfs

Install fwup (used to write firmware to memory card):

brew install fwup

Or you can install from source via https://github.com/fhunleth/fwup.

Get the toolchain. It doesn't matter where this is placed.

curl -LO https://github.com/nerves-project/nerves-toolchain/releases/download/0.3/nerves-toolchain-arm-unknown-linux-gnueabihf-linux-x86_64-0.3.dmg
hdiutil mount nerves-toolchain-arm-unknown-linux-gnueabihf-linux-x86_64-0.3.dmg
export NERVES_TOOLCHAIN=/Volumes/nerves-toolchain

Create a nerves project

git clone https://github.com/fhunleth/nerves_elixir_trivial.git
cd nerves_elixir_trivial  

Extract the system. It doesn't matter where this is placed either.

tar xf ../system.tar.gz         
source system/nerves-env.sh       

Build the Elixir project

make

Write firmware to the SD card

make burn-complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment