Tools to build OpenWRT firwmare for the Omega2 and Omega2+ using the OpenWRT Image Builder in an easily repeatable and maintainable way.
We recommend using Ubuntu 22.04 Linux to build this repo. See the OpenWRT Build System Setup instructions for details on what packages are required.
By default, this repo is setup to build OpenWRT firmware for the Onion Omega2 and Omega2+
bash onion_buildenv setup_imagebuilder
to download and setup the image builderbash onion_buildenv build_all_firmware
to build the Omega2 and Omega2+ firmwareoutput
directoryThe bash onion_buildenv setup_imagebuilder
script:
PACKAGE_REPOS
in a build profile
to the image builderThe bash onion_buildenv build_all_firmware
script:
output
directoryBy default, the bash onion_buildenv build_all_firmware
command will build firmware for the target devices specified in the BUILD_MODELS
variable in profiles
.
To build for a specific target device, use this command: bash onion_buildenv build_firmware <target>
OpenWRT packages can be added to the compiled firmware.
In the bash onion_buildenv build_all_firmware
script, the env variable IMAGE_BUILDER_PACKAGES
controls which packages are included in the firmware. Each package has to be added in na new line or in a space separated list.
additions/
DirectoryEverything from the additions/
directory will be copied into the image builder directory before build.
For example, adding a additions/files
directory will allow you to include custom files (like custom configuration files) in the firmware image.
Note: adding .hidden files/directories to the firmware image works, but just not in the
/
directory.
By default, the firmware will be built including packages from published package repos. Like the the Onion Package Repo or the OpenWRT package repo.
While your packages are still in development, it might be useful to work with local copies of the packages.
To work with local copies of your packages:
PACKAGE_REPOS
env variable to point to the local packages. See profiles/README.md
for details.bash onion_buildenv setup_imagebuilder
to download and setup the image builderbash onion_buildenv build_firmware <target>
to build the firmwareoutput
directorySay we've used the OpenWRT SDK to build packages locally and the output files can be found at the /home/ubuntu/openwrt-sdk-wrapper/openwrt-sdk/bin/packages/mipsel_24kc/custom/
directory.
And say we wanted to build firmware that uses those locally compiled packages, we would do the following:
PACKAGE_REPOS
env variable in a profile file:
PACKAGE_REPOS="src custom file:///home/ubuntu/openwrt-sdk-wrapper/openwrt-sdk/bin/packages/mipsel_24kc/custom/"
bash onion_buildenv setup_imagebuilder
to download and setup the image builderbash onion_buildenv build_firmware <target>
to build the firmwareoutput
directory