curl -o openwrt-sdk-24.10.1-mediatek-filogic_gcc-13.3.0_musl.Linux-x86_64.tar.zst https://...
# https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem
sudo apt update
sudo apt install build-essential clang flex bison g++ gawk \
gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \
python3-setuptools rsync swig unzip zlib1g-dev file wget
# decompress
sudo apt install zstd
tar -xf openwrt-sdk-24.10.1-mediatek-filogic_gcc-13.3.0_musl.Linux-x86_64.tar.zst
cd openwrt-sdk-24.10.1-mediatek-filogic_gcc-13.3.0_musl.Linux-x86_64
./scripts/feeds update base
# Apply your changes now
# To avoid conflict, odhcp6c-${PKG_SOURCE_DATE}~61797806 must be unique, where 61797806 is extracted from ${PKG_SOURCE_VERSION}.
vim feeds/base/package/network/ipv6/odhcp6c/Makefile
./scripts/feeds install odhcp6c
make menuconfig
You probably want to disable some default settings, which build every available package. Enter Global Build Settings
and in the submenu, deselect/exclude the following options:
Select all target specific packages by default
Select all kernel module packages by default
Select all userspace packages by default
Still in the menu, find the package you want to build and select it by pressing “m”, this will also select all the dependencies, and you will see that they are all tagged with “<M>
” in the menu. You can select multiple packages too.
Save the configuration and exit the menu.
Run make
to build everything selected, or be more specific with
make package/odhcp6c/clean
make package/odhcp6c/compile
You may then copy the binary produced to your router:
cp ./build_dir/target-aarch64_cortex-a53_musl/odhcp6c-2024.09.25~61797806/.pkgdir/odhcp6c/usr/sbin/odhcp6c ~/
scp -O ~/odhcp6c root@192.168.1.1:/tmp/odhcp6c
Then, replace the binary and restart odhcp6c
.
mv /tmp/odhcp6c /usr/sbin/odhcp6c
killall -TERM odhcp6c