Skip to content

Commit

Permalink
attempt to simplify entrypoint.sh for docker container build. related…
Browse files Browse the repository at this point in the history
… to #105 #110
  • Loading branch information
jhpoelen committed Nov 8, 2017
1 parent 53353ec commit aa98e2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 33 deletions.
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,16 @@ Collect all the sudowrt-firmware dependencies into a docker image using:
docker build -t sudowrt .
```

After building the image, run it using:
After creating the container image, build the ar71xx and ar71xx.extender-node firmware using:
```
docker run -v $PWD/firmware_images:/firmware_images sudowrt [architecture]
docker run -v $PWD/firmware_images:/firmware_images sudowrt
```

After running the container, the built firmware images will be in the `/firmware_images` directory of the repo.

In order to build the extender node firmware, you currently have to build home
node firmware first even if you just built it (someone should fix this). To build the home node and
extender node within in the same docker container, run the following:
```
docker run -v $PWD/firmware_images:/firmware_images sudowrt ar71xx ar71xx.extender-node
```
(note: entrypoint currently hardcoded for building both the home node and extender node firmware and it will stay this way until someone rewrites it to work properly within the docker container, if you would like to work on this, look at entrypoint-old.sh and [this](https://github.com/sudomesh/sudowrt-firmware/issues/105) issue)
This command executes [entrypoint.sh](../blob/master/entrypoint.sh) in the docker container. If the process completes successfully, the built firmware images `/firmware_images` directory of the repo. For some history on this topics please see https://github.com/sudomesh/sudowrt-firmware/issues/110 and https://github.com/sudomesh/sudowrt-firmware/issues/105 .

If the build fails, capture the console output, yell loudly, talk to someone or create [a new issue](https://github.com/sudomesh/meshwrt-firmware/issues/new).

Now go to https://sudoroom.org/wiki/Mesh/WalkThrough to flash the firmware onto your router.
Now go to https://peoplesopen.net/walkthrough and follow the instructions to flash the firmware onto your router.

# the "hard" way
If you'd rather build the firmware without Docker, please keep reading.
Expand Down
25 changes: 4 additions & 21 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
#!/bin/bash
ARCH=ar71xx
time ./build $ARCH
time ./build_extender-node $ARCH

# this is part is an attempt at generalizing, took too long to test
build="build"
architecture=$1
directory="ar71xx"
if [ -z "$architecture" ]
then
architecture="ar71xx"
elif [ "$architecture" = "ar71xx.extender-node" ]
then
build="build_extender-node"
directory="ar71xx.extender-node"
fi
#end of generalization attempt

# this is the current method which is hardcoded, but works
time ./build ar71xx
time ./build_extender-node ar71xx
mkdir -p ./firmware_images
read -p "Check for home node images"
cp -r ./built_firmware/builder.ar71xx/bin/ar71xx/ /firmware_images
read -p "Check for extender node images"
cp -r ./built_firmware/builder.ar71xx.extender-node/bin/ /firmware_images
cp -r ./built_firmware /firmware_images

0 comments on commit aa98e2b

Please sign in to comment.