Add details ta Custom-Firmware.md (#503)
* Add details ta Custom-Firmware.md * OK blank lines * Blankety Blank Blank
This commit is contained in:
parent
9bb4d414aa
commit
2f396c7816
|
@ -6,6 +6,44 @@ https://github.com/rusefi/fw-custom-example is an example of a custom rusEFI fir
|
||||||
|
|
||||||
https://github.com/rusefi/fw-custom-paralela and https://github.com/rusefi/fw-custom-core8/ are the best example as of right now. https://github.com/rusefi/rusefi/tree/master/firmware/config/boards should be another source of inspiration.
|
https://github.com/rusefi/fw-custom-paralela and https://github.com/rusefi/fw-custom-core8/ are the best example as of right now. https://github.com/rusefi/rusefi/tree/master/firmware/config/boards should be another source of inspiration.
|
||||||
|
|
||||||
|
If you have a more complex situation, with several different board variants you need to build, you can still achieve this with one repo.
|
||||||
|
If, for example, your variants only need different compile flags, having multiple meta-info files within the same repository would be a good way to achieve it.
|
||||||
|
For example:
|
||||||
|
|
||||||
|
- meta-info-brainboard.env
|
||||||
|
- meta-info-brainboard-debug.env
|
||||||
|
|
||||||
|
Now, in `.github/workflows/build-firmware.yaml`, you need a [matrix](https://docs.github.com/en/actions/learn-github-actions/contexts#example-usage-of-the-matrix-context) to run the build firmware action for two different targets. It should look something like this:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Create Board Firmware
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
bundle-name:
|
||||||
|
- brainboard
|
||||||
|
- brainboard-debug
|
||||||
|
|
||||||
|
steps:
|
||||||
|
call-workflow-passing-data:
|
||||||
|
uses: rusefi/rusefi/.github/workflows/custom-board-build.yaml@master
|
||||||
|
secrets: inherit
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
with:
|
||||||
|
bundle-name: ${{matrix.bundle-name}}
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to have several different boards in the same repo, you should put them in different sub-directories, then pass a `board-dir` to the workflow.
|
||||||
|
|
||||||
|
There is also a `rusefi-dir` option you can use if you want to put your rusefi submodule somewhere other than `ext/rusefi`.
|
||||||
|
|
||||||
## Update rusEFI Reference
|
## Update rusEFI Reference
|
||||||
|
|
||||||
Happens daily.
|
Happens daily.
|
||||||
|
|
Loading…
Reference in New Issue