diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -141,6 +141,15 @@ .endfor .endif +# Generate the .bin (booti images) kernel as an extra build output. +# The targets and rules to generate these appear in Makefile.$MACHINE +# if the platform supports it. +.if ${MK_KERNEL_BIN} != "no" +KERNEL_EXTRA+= ${KERNEL_KO}.bin +KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin +CLEAN+= ${KERNEL_KO}.bin +.endif + .ORDER: kernel-install modules-install beforebuild: .PHONY @@ -466,13 +475,4 @@ .endif .endif -# Generate the .bin (booti images) kernel as an extra build output. -# The targets and rules to generate these appear in Makefile.$MACHINE -# if the platform supports it. -.if ${MK_KERNEL_BIN} != "no" -KERNEL_EXTRA+= ${KERNEL_KO}.bin -KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin -CLEAN+= ${KERNEL_KO}.bin -.endif - .include "kern.mk"