mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-11-27 12:05:34 +00:00
Updated Compile firmware (markdown)
parent
29e00361c3
commit
ae72bb9e41
@ -1,4 +1,45 @@
|
||||
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:
|
||||
There are severals ways to compile the firmware. As the traditional way, check the original [Building from Source](https://github.com/furrtek/portapack-havoc/wiki/Building-from-source) document, however, Docker is recommended because it provides a very clean way to compile the firmware.
|
||||
|
||||
# Using Docker Hub and Kitematic
|
||||
|
||||
## Step 1: Prepare environment
|
||||
1. Install Docker
|
||||
https://docs.docker.com/get-docker/
|
||||
|
||||
2. Get Kitematic
|
||||
https://github.com/docker/kitematic/releases/
|
||||
|
||||
3. Install GitHub Desktop
|
||||
https://desktop.github.com/
|
||||
|
||||
## Step 2: Clone the repository
|
||||
|
||||
If you are using Windows, line endings may produce some errors. For example: ``python/r` not found` messages are generated by the line endings. To prevent this, configure git to not manipulate the line endings, open a terminal and execute:
|
||||
|
||||
<img src="img/git_linefeed.png" width="600">
|
||||
|
||||
`git config --global core.autocrlf false`
|
||||
|
||||
Open Github Desktop, and click "Open with Github Desktop" from the main page of the repository, under the button "Code". Next, create a "build" folder inside of the repository.
|
||||
|
||||
<img src="img/github_clone.png" width="400">
|
||||
|
||||
## Step 3: Prepare the Docker container
|
||||
[[img/Kitematic_MChWCyp6g1.png]]
|
||||
|
||||
You need to configure the path to the source code from the Volumes of the container as show in the image below.
|
||||
|
||||
[[img/Kitematic_VL5an8rufV.png]]
|
||||
|
||||
## Step 4: Compile!
|
||||
|
||||
Everytime you run the container you prepared in the previous step, it will compile the source and (if successful) leave the results in `build/firmware/`
|
||||
|
||||
[[img/Kitematic_uvIvGXRbFR.png]]
|
||||
|
||||
# Docker - Command line reference
|
||||
|
||||
If you are inclined for using the command line, you can try the following:
|
||||
|
||||
* For building:
|
||||
`docker build -t portapackccache -f dockerfile-nogit .`
|
||||
@ -6,22 +47,7 @@ The easiest way is to use Docker. After you install Docker in your machine, if y
|
||||
* 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):
|
||||
|
||||
[[img/Kitematic_MChWCyp6g1.png]]
|
||||
|
||||
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]]
|
||||
|
||||
In Windows, the line endings may produce some errors. If you get some `python/r` not found messages, then the easiest way to fix this is to configure git to not manipulate the line endings with:
|
||||
|
||||
`git config --global core.autocrlf false`
|
||||
|
||||
And subsequently, download another copy of the repository.
|
||||
Remember that you have to create a `build` folder before running the image.
|
||||
|
||||
# Using Buddy.Works (and other CI platforms)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user