build: correctly ignore Initramfs image on error
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 30 Oct 2024 10:19:33 +0000 (11:19 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 30 Oct 2024 13:17:33 +0000 (14:17 +0100)
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 <ansuelsmth@gmail.com>
include/image.mk

index c476f6674f5876600926e8191da16a9d5f57ae35..a4ac1b49cf8aa4de454d5ff4b94b0a43d49c0236 100644 (file)
@@ -542,6 +542,9 @@ define Device/Build/initramfs
        $(call Kernel/CompileImage/Initramfs,$(KDIR)/target-dir-$$(ROOTFS_ID/$(1)),.$$(ROOTFS_ID/$(1)))
   endif
   $(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)
        cp $$^ $$@