Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support firmware build using Docker #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM debian:stable

RUN apt-get update && \
apt-get install -y build-essential gcc-avr avr-libc git python2.7 && \
ln /usr/bin/python2.7 /usr/bin/python

COPY p600fw-build.sh /bin/p600fw-build
RUN chmod +x /bin/p600fw-build

CMD [ "/bin/p600fw-build" ]
35 changes: 35 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
p600fw-builder
==============

This directory contains a `Dockerfile` that you can use to build the
firmware for your Prophet 600 without having to install anything other
than Docker.

How-To
------

1. Clone this repo to your local system.
2. Install Docker CE; at least version 17.06
3. Follow instructions for your OS below to do the build and obtain the
firmware file.
4. After completing the build, the file p600firmware.syx in the current
directory is a SysEx file containing the firmware. Follow the instructions
in the user guide to install it in your Prophet 600.

### Mac OS X, Linux, other Unix-ish OS using Bash

Run the following commands in your shell:
```
cd p600fw/docker
docker image build -t p600fw-builder .
id=$(docker container create p600fw-builder)
docker container start -ai $id
docker container cp $id:/dist/p600firmware.syx .
docker container rm $id
```

### Windows

> Hopefully someone who knows both Bash and the Windows shell can
> translate the Bash instructions above and will submit a pull request
> to add the right instructions here. :-)
24 changes: 24 additions & 0 deletions docker/p600fw-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

BRANCH=master
REPO_URL=https://github.com/gligli/p600fw.git
DIR=p600fw

DIST=/dist
FILES="p600firmware.bin p600firmware.hex p600firmware.syx"

set -e
set -x
git clone $REPO_URL $DIR
cd $DIR
if [ "$BRANCH" != "master" ]; then
git checkout $BRANCH
fi

cd firmware
make

mkdir $DIST
for f in $FILES; do
cp $f /dist/$f
done