build: in new image building code, do not rebuild kernel images in the image builder
[openwrt/staging/rmilecki.git] / include / image.mk
index 8e8ddc29ac0eb6d31adc6391315a3e30551a8798..051f0f7e53dd11248b9bba4b1b30aeca656e5fe7 100644 (file)
@@ -397,10 +397,15 @@ define Device/Build/kernel
   $$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
   $(BIN_DIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_IMAGE)
        cp $$^ $$@
-  $(KDIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME)
+  ifndef IB
+    ifdef CONFIG_IB
+      install: $(KDIR)/$$(KERNEL_IMAGE)
+    endif
+    $(KDIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME)
        @rm -f $$@
        $$(call concat_cmd,$$(KERNEL))
        $$(if $$(KERNEL_SIZE),$$(call Device/Build/check_size,$$(KERNEL_SIZE)))
+  endif
 endef
 
 define Device/Build/image