I am currently trying to include a locally patched version of netifd into an OpenWrt sysupgrade image for a MikroTik RB5009 running version 25.12.2. For verification, I added custom log outputs prefixed with PROOF in interface.c, which are present in the resulting binary within the build_dir. However, these changes do not seem to make it into the final image, as the /sbin/netifd binary on the target system lacks these strings after flashing. Manually replacing the binary on the live system also fails due to ABI issues and missing symbols. It appears that the image builder prefers a pre-compiled or cached package over the locally modified source from the build directory. I would like to know how to ensure that the local build of a base package like netifd is actually used for the rootfs, whether this is a known issue with stable releases compared to snapshots, and which specific cache or staging files need to be cleared to force a clean re-packaging into the final image.
Then you aren't changing the correct files.
If you want to modify source code, just use the full toolchain and compile the whole firmware.
Imagebuilder etc. are tools for just gluing together ready-made components. Not really meant for combining locally modified packages to the default ones.
After extensive testing I was able to identify the root cause. The problem was a missing step after recompiling the package. Without running make package/index V=s after compiling netifd, the package index still references the old version and the build system picks the old package for the final image — even if the freshly compiled one is already present in bin/packages . Adding this step after compile resolved the issue. Hope this helps anyone running into the same problem.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.