A tool to combine all parts of a Mongoose OS firmware ZIP-file into a single binary.
Download the latest binary from the release page.
There are two options, the Linux binary (named mgos-combine-ubuntu
as it is
compiled on ubuntu), and a version for Mac OS named mgos-combine-macos
.
Move the downloaded binary to a folder within you path variable, make it executable, and you are good to go:
sudo mv mgos-combine-ubuntu /usr/local/bin/mgos-combine
sudo chmod a+x /usr/local/bin/mgos-combine
The docker image is mainly provided for use in CI/CD pipelines. It is located at
docker.pkg.github.com/yaourdt/mgos-combine/mgos-combine
, starting from version 0.2.2 upwards,
tag names correspond to release versions.
Run it as
docker run -v /path/to/host/fw/dir:/build docker.pkg.github.com/yaourdt/mgos-combine/mgos-combine -o /build/out.bin
(The docker image is public. If your docker pull still fails with Error response from daemon: [...] no basic auth credentials.
, it is due to Githubs erratic behaviour,
which requires you to login before pulling public packages. If this behaviour does not
change, we'll move to another registry eventually.)
Usage: mgos-combine [options]
-i, --input Path to the firmware zip file (default: ./build/fw.zip)
-o, --output Name of the output file (default: output.bin)
-s, --size Output file size in KB (default: 4096)
-f, --force Force writing to an output file that is too small
-h, --help Show this help
-v, --version Prints current version and exits. All other options will be ignored
With a working go environment on your machine, just git clone
this repository,
run go get
to install missing libraries, and run go build -o mgos-combine .
to compile.
Parts of the initial code were developed by ert as part of a coding exercise.
Copyright (C) 2020, Mark Dornbach
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.