-
Notifications
You must be signed in to change notification settings - Fork 0
Manually building the package
The following steps are derived from the "Hello, world!" for OpenWrt guide.
-
Prepare a local OpenWrt build system environment.
If you are not running a compatible GNU/Linux environment or would rather avoid cluttering your local environment, a virtual machine or even a container should work just as fine. -
Clone the OpenWrt repository in a directory named
source
, then checkout the branch corresponding to the version of OpenWrt you are running on your target device (as of May 2024, the latest stable release isv23.05.3
):git clone https://git.openwrt.org/openwrt/openwrt.git source cd source git checkout v23.05.3 make distclean
-
Clone this repository in a directory named
mypackages
, which should be a sibling of thesource
directory:git clone https://github.com/alex-massa/ifmqtoggle $(dirname $(pwd))/mypackages/ifmqtoggle
-
Define a new package feed, update all package feeds, then install the packages from the newly created feed:
echo "src-link mypackages $(dirname $(pwd))/mypackages" >> feeds.conf.default ./scripts/feeds update -a ./scripts/feeds install -a -p mypackages
-
Configure the cross-compilation environment for the target device:
make menuconfig
- From the menu, chose the values for Target System, Subtarget, and Target Profile that are suitable for your target device.
The correct values can usually be inferred by checking the content of/etc/openwrt_release
on the target device.
- Navigate to Network, select
ifmqtoggle
from the list of available packages, then use the Y key to include the package in the firmware configuration. - Exit the configuration menu and save the changes.
- From the menu, chose the values for Target System, Subtarget, and Target Profile that are suitable for your target device.
Note
The package should be installable on any OpenWrt installation regardless of the targets specified above, as long as its version is aligned to that of the present SDK, though this is not thoroughly tested.
As such, the default values for Target System, Subtarget and Target Profile should be sufficient.
-
Build the target-independent tools and the cross-compilation toolchain (this might take some time):
make toolchain/install
-
Build the package:
make package/ifmqtoggle/{clean,compile}
With the above steps completed, the package should be built in the bin/packages/<arch>/mypackages
directory as a bundled archive having the .ipk
extension.