Fastest way to recompile OpenWrt firmwares

For firmware development, which is the fastest way to recompile firmwares?

I mean, not having to do the whole package compilation everytime, just the firmware

According to the docs with clean, all 3 firmware/package/kernel compilation are wiped, but I would not like to recompile packages every time I do a build, since it's the thing that by far takes longer.

Any tricks of the trade for making firmware compilation much more comfortable?

Do you just switch out some packages, add new ones and remove others while keeping the core intact? If so, you can just use update/install feeds, make menuconfig, adjust package selection and then make.

I do this all the time for minor version/package updates within my own build flow, while building with master, and it speeds up the build process by a huge margin.

I don't think there is any downside to it.

1 Like

yeah, don't do make clean, it'll make it start from scratch.
it'll compile the delta, if you skip it.


The build system is pretty good in figuring out when to do a rebuild, so I usually just run make -j9 V=s. If something goes wrong, I often have to remove the -j9 to get more sane output. This included messing around with DTS files (at least on your ramips target), they are automagically copied into the build directory if you change something.


I've recompiled with just make modifying the target/linux/ramips/image/ file (to remove packages deps) and it did not compile with the modificaiton (the packages where still there installed)

So I had to do a make clean to solve this

This is a change to the build system, not the code. Make the same change in make menuconfig (or manually in .config) and no recompile is necessary. Running make defconfig usually doesn't work for me, although it should, according to the docs (or did I misinterpret the behavior of make defconfig)?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.