Build target/linux/<platform>/image/<package> directly

Is there a way to just build "target/linux//image/" directly?

I've specified my platform through menuconfig and running make will eventually build . However, I'd like to reduce the build time and just rebuild itself.

make target/linux/{clean,compile} V=s

Thanks, anomeome, but that command doesn't build image/<package> or create build_dir/target-aarch64_cortex-a53_musl/linux-<platform>/linux-4.14.180/vmlinux. The kernel directory contains my platform's files-4.14 and patches-4.14 changes but the kernel looks like it only built the modules.

However, just running make builds image/<package> as well as vmlinux.

To rule out my platform's Makefile, I also tried this using an existing target.


After running make, build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.180/vmlinux exists.

After running make target/linux/{clean,compile} V=s, build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.180/vmlinux does not exist.

Am I misunderstanding what make target/linux/{clean,compile} V=s actually builds?

You're looking at it the wrong way. You need to select your target, enable the package you'd like to build. Then you just issue the following command:

$ make package/network/services/wireguard/compile

As you can see there is no target specific path involved. The above is all you need. And yes, it will only build for the target you set in the OpenWrt config.

In this case, the package I am building hangs off the target and is not in the common package folder. I can build common packages individually without any issue.


I am basing this off of the old arm64 target. Again, the kernel and boot-wrapper build when I run make but not make target/linux/{clean,compile} V=s.

Should make target/linux/{clean,compile} V=s build my target's kernel (vmlinux) and boot-wrapper or just the kernel modules?