Skip to content

Commit

Permalink
add support for customization overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
anuejn committed Jan 8, 2019
1 parent 45cca29 commit bf6fbf0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
8 changes: 8 additions & 0 deletions makefiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@ makefiles/docker-make.sh clean
makefiles/docker-make.sh clean-all
```
Then again follow the above build instructions.

## Customize it!
If you want to customize your image you can create a `overlay/` folter in the root of this repo.
An install.sh in this directory will be executed in a chroot of the camera. All the other contents
will be coppyed to the `/` of the camera.

This is especially usefull for adding your ssh keys to the camera or to install your preffered tools
(ie. gnu/emacs).
13 changes: 11 additions & 2 deletions makefiles/in_chroot/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ for script in software/scripts/*.py; do ln -sf $(pwd)/$script /opt/axiom/script/
(cd software/axiom-control-daemon/
[ -d build ] || mkdir -p build
cd build
[ ../CMakeLists.txt -nt Makefile ] && cmake ..
make -j $(nproc)
[ ../CMakeLists.txt -nt Makefile ] && cmake .. &&
make -j $(nproc) &&
./install_daemon.sh
true
)

# configure lighttpd
Expand Down Expand Up @@ -98,6 +99,14 @@ echo "i2c-dev" > /etc/modules-load.d/i2c-dev.conf
# configure bash
cp software/configs/bashrc /etc/bash.bashrc

# install overlay, if any is found
if [ -d overlay ]; then
rsync -aK --exclude install.sh overlay/ /
if [ -f overlay/install.sh ]; then
bash overlay/install.sh
fi
fi

# finish the update
echo "apertus\e{lightred}°\e{reset} $(cat /etc/hostname) running Arch Linux ARM [\m]" > /etc/issue
echo "Kernel \r" >> /etc/issue
Expand Down
1 change: 1 addition & 0 deletions makefiles/in_chroot/requirements_pacman.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ figlet
wget
hashdeep
pacman-contrib
rsync

# dependencies of tools
python
Expand Down

0 comments on commit bf6fbf0

Please sign in to comment.