Docker

HomePage | RecentChanges | Preferences

Docker

Building a Nerves System

$ docker run -it ubuntu /bin/bash
# apt-get update
# apt-get install ... [list from Nerves docs]
# apt-get install wget cpio python bzip2 [if still missing from Nerves docs]
# git clone https://github.com/nerves-project/nerves_system_br.git
# git clone https://github.com/wsmoak/nerves_system_rpi2.git # forked from nerves-project
# ./nerves_system_br/create-build.sh nerves_system_rpi2/nerves_defconfig rpi2_out
# cd rpi2_out
# make

... wait while it downloads half the internet and builds stuff ...

To get a tarball

# cd rpi2_out
# make system

# exit
$ docker ps -a      # copy the id
$ docker commit [the_id] wsmoak/nerves_build

... wait a long time

$ docker images
$ docker run -it wsmoak/nerves_build /bin/bash
# ls rpi2_out/images
# exit

$ docker ps -a
$ docker start [name]
$ docker attach [name]
(and press enter to get a # prompt)

Making files available outside the container

$ docker run -it -v /Users/wsmoak/docker_stuff/:/tmp/on_my_mac wsmoak/nerves_build /bin/bash
# cp /path/to/whatever /tmp/on_my_mac/
# exit
$ ls ~/docker_stuff

Making changes

# cd rpi2_out
# make menuconfig
... use buildroot menu to find and select things ...
<Save> writes .config file
# make savedefconfig
... updates the nervesdefconfig _over_ in the nerves_system_rpi2 directory
# cd ..
# ./nerves_system_br/create-build.sh nerves_system_rpi2/nerves_defconfig rpi2_out2
... different output directory ...
cd rpi2_out2
make
... wait while it builds everything. at least no downloads this time?...
make system
... creates a tarball

Copy tarball to `/tmp/on_my_mac` which is mapped to `~/docker_stuff`

Misc

Mount the data partition of a Nerves built SD card docker run -it --rm -v /Volumes/APPDATA:/appdata busybox


HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited October 2, 2016 6:43 pm by 133-94-98-198.dsl.wavetel.us (diff)
Search: