build: fix build for devices without initramfs
authorDavid Bauer <mail@david-bauer.net>
Tue, 8 Jun 2021 17:30:12 +0000 (19:30 +0200)
committerDavid Bauer <mail@david-bauer.net>
Tue, 8 Jun 2021 20:53:14 +0000 (22:53 +0200)
Don't attempt to copy initramfs images for devices which do not output
an initramfs image.

This was breaking builds for mpc85xx-p1010 since mid-march.

Signed-off-by: David Bauer <mail@david-bauer.net>
include/image.mk

index 0d0e3eaba1481016e663994a02517f4a9df4e67f..a7473abe68f4fd61c7e7f6bbb0454744394e0db7 100644 (file)
@@ -478,7 +478,7 @@ define Device/Build/initramfs
          $$(if $$(CONFIG_JSON_OVERVIEW_IMAGE_INFO), $(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,))
 
   $(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare
-  $(1)-images: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
+  $(1)-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
   $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
        cp $$^ $$@