Updated Compile firmware (markdown)

Erwin Ried 2020-05-26 10:13:47 +02:00
parent 429ff4d3c4
commit b1981de923

@ -1,13 +1,13 @@
The easiest way is to use Docker. After you install Docker in your machine, if you are inclined for using the command line, you can try the following:
For building:
* For building:
`docker build -t portapackccache -f dockerfile-nogit .`
For running (in the root of the repo):
* For running (in the root of the repo):
`docker run -it -v ${PWD}:/havoc portapackccache`
You have to create a `build` folder before running the image.
# Using Docker Hub and Kitematic
The required Docker image is also in Docker Hub, browse for it in [Kitematic](https://github.com/docker/kitematic):
@ -15,4 +15,41 @@ The required Docker image is also in Docker Hub, browse for it in [Kitematic](ht
You need to configure the path to the source code from the Volumes of the container as show in the image below. Everytime you run this container, it will compile the source and (if successful) leave the results in `build/firmware/`
[[img/Kitematic_VL5an8rufV.png]]
[[img/Kitematic_VL5an8rufV.png]]
# Using Buddy.Works (and other CI platforms)
You can use the following _yml _as your template for your CI platform (pipeline export from [buddy.works](https://buddy.works/)):
```
- pipeline: "Build firmware"`
`trigger_mode: "ON_EVERY_PUSH"`
`ref_name: "master"`
`ref_type: "BRANCH"`
`auto_clear_cache: true`
`trigger_condition: "ALWAYS"`
`actions:`
`- action: "Build Docker image"`
`type: "DOCKERFILE"`
`dockerfile_path: "dockerfile-nogit"`
`do_not_prune_images: true`
`trigger_condition: "ALWAYS"`
`- action: "Execute: mkdir build"`
`type: "BUILD"`
`working_directory: "/buddy/portapack-havoc"`
`docker_image_name: "library/ubuntu"`
`docker_image_tag: "18.04"`
`execute_commands:`
`- "mkdir -p build"`
`volume_mappings:`
`- "/:/buddy/portapack-havoc"`
`trigger_condition: "ALWAYS"`
`shell: "BASH"`
`- action: "Run Docker Image"`
`type: "RUN_DOCKER_CONTAINER"`
`use_image_from_action: true`
`volume_mappings:`
`- "/:/havoc"`
`trigger_condition: "ALWAYS"`
`shell: "SH"
```