From fe50e557c500be7729af76c982e44fd4cd94a7f1 Mon Sep 17 00:00:00 2001 From: Ethan Zuo Date: Fri, 26 Jul 2024 01:49:55 +0800 Subject: [PATCH] image: skip generating hash info of rootfs for unselected profiles Signed-off-by: Ethan Zuo --- include/image.mk | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/include/image.mk b/include/image.mk index 4ee7f1449b..aa803f0f38 100644 --- a/include/image.mk +++ b/include/image.mk @@ -554,15 +554,17 @@ define Device/Build/kernel ifdef CONFIG_IB install: $$(KDIR_KERNEL_IMAGE) endif - ifneq ($$(filter squashfs,$(2)),) - # Force squashfs to be built before generating kernel image - ROOTFS/squashfs/$(1) := \ - $(KDIR)/root.squashfs$$(strip \ - $$(if $$(FS_OPTIONS/squashfs),+fs=$$(call param_mangle,$$(FS_OPTIONS/squashfs))) \ - )$$(strip \ - $(if $(TARGET_PER_DEVICE_ROOTFS),+pkg=$$(ROOTFS_ID/$(1))) \ - ) - $$(KDIR_KERNEL_IMAGE): $$(ROOTFS/squashfs/$(1)) + ifeq ($(CONFIG_TARGET_DEVICE_$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_DEVICE_$(1)),y) + ifneq ($$(filter squashfs,$(2)),) + # Force squashfs to be built before generating kernel image + ROOTFS/squashfs/$(1) := \ + $(KDIR)/root.squashfs$$(strip \ + $$(if $$(FS_OPTIONS/squashfs),+fs=$$(call param_mangle,$$(FS_OPTIONS/squashfs))) \ + )$$(strip \ + $(if $(TARGET_PER_DEVICE_ROOTFS),+pkg=$$(ROOTFS_ID/$(1))) \ + ) + $$(KDIR_KERNEL_IMAGE): $$(ROOTFS/squashfs/$(1)) + endif endif $$(KDIR_KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare @rm -f $$@