Supporting scripts and config to easily build OpenWRT packages using the OpenWRT SDK
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 packages (based on source code in a Git repo) for deployment.
bash onion_buildenv setup_sdk
to download and setup the OpenWRT SDKbash onion_buildenv build_all_packages
to build all packages listed in the SDK_PACKAGES
variable in profile
bash onion_buildenv build_packages <pkg1> <pkg2> ... <pkgN>
to build the specified packagesopenwrt-sdk/bin/packages/mipsel_24kc/onion
The bash onion_buildenv setup_sdk
command:
PACKAGE_FEEDS
in a build profile
to the SDKThe bash onion_buildenv build_packages <pkg1> <pkg2> ... <pkgN>
command:
<pkg1> <pkg2> ... <pkgN>
argumentsThe bash onion_buildenv build_all_packages
command:
SDK_PACKAGES
in a build profile
to the SDKkeys/
directory (learn more about package signing here and here)openwrt-sdk/bin/packages/mipsel_24kc/onion
directoryBy default, the packages are built from source code in git repo specified as env variable PACKAGE_FEEDS
in a build profile to SDK.
While your packages are still under development and you are iterating on the package source code, it will be more straight-forward to work from a local copy of the package source instead.
To work from a local copy of your source code:
PACKAGE_FEEDS
in a profile
to the local source. See profiles/README.md for details.bash onion_buildenv setup_sdk
to download and setup the OpenWRT SDKbash onion_buildenv build_packages <pkg1> <pkg2> ... <pkgN>
to build the desired packagesopenwrt-sdk/bin/packages/mipsel_24kc/<feed>/
directoryIf we wanted to build the packages from the Onion OpenWRT-Packages repo for development, the steps would be as follows:
git clone https://github.com/OnionIoT/OpenWRT-Packages.git
note the path to the cloned directory, in our case it's /home/ubuntu/OpenWRT-Packages
PACKAGE_FEEDS
in a profile
:
PACKAGE_FEEDS="src-link custom /home/ubuntu/OpenWRT-Packages"
, since /home/ubuntu/OpenWRT-Packages
is the absolute path to the cloned directory from step 1/home/ubuntu/OpenWRT-Packages
bash onion_buildenv setup_sdk
to download and setup the OpenWRT SDKbash onion_buildenv build_packages
to build the desired packagesopenwrt-sdk/bin/packages/mipsel_24kc/custom/
directory