Browse Source

build: correctly ignore Initramfs image on error

Correctly ignore Initramfs image copy on error. This follows the pattern with
sysupgrade image where an image might fail as it's too big or the
generation command fails and there is nothing to copy to the bin
directory.

Signed-off-by: Christian Marangi <[email protected]>
Christian Marangi 1 year ago
parent
commit
618f079f5d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      include/image.mk

+ 3 - 0
include/image.mk

@@ -542,6 +542,9 @@ define Device/Build/initramfs
 	$(call Kernel/CompileImage/Initramfs,$(KDIR)/target-dir-$$(ROOTFS_ID/$(1)),.$$(ROOTFS_ID/$(1)))
 	$(call Kernel/CompileImage/Initramfs,$(KDIR)/target-dir-$$(ROOTFS_ID/$(1)),.$$(ROOTFS_ID/$(1)))
   endif
   endif
   $(1)-initramfs-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
   $(1)-initramfs-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
+
+  .IGNORE: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
+
   $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
   $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
 	cp $$^ $$@
 	cp $$^ $$@