Skip to content
Snippets Groups Projects
Commit 4acc2a39 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

build: add support for adding a per-device compile step in the new image building code


Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>

SVN-Revision: 45670
parent ac0e2479
No related branches found
No related tags found
No related merge requests found
...@@ -359,6 +359,7 @@ endef ...@@ -359,6 +359,7 @@ endef
define Device/Check define Device/Check
_TARGET = $$(if $$(filter $(PROFILE),$$(PROFILES)),install,install-disabled) _TARGET = $$(if $$(filter $(PROFILE),$$(PROFILES)),install,install-disabled)
_COMPILE_TARGET = $$(if $(CONFIG_IB)$$(filter $(PROFILE),$$(PROFILES)),compile,compile-disabled)
endef endef
define Device/Build/initramfs define Device/Build/initramfs
...@@ -379,6 +380,14 @@ define Device/Build/check_size ...@@ -379,6 +380,14 @@ define Device/Build/check_size
} }
endef endef
define Device/Build/compile
$$(_COMPILE_TARGET): $(KDIR)/$(1)
$(eval $(call Device/Export,$(KDIR)/$(1)))
$(KDIR)/$(1):
$$(call concat_cmd,$(COMPILE/$(1)))
endef
define Device/Build/kernel define Device/Build/kernel
_KERNEL_IMAGES += $(KDIR)/$$(KERNEL_NAME) _KERNEL_IMAGES += $(KDIR)/$$(KERNEL_NAME)
$(KDIR)/$$(KERNEL_NAME): image_prepare $(KDIR)/$$(KERNEL_NAME): image_prepare
...@@ -411,6 +420,9 @@ define Device/Build ...@@ -411,6 +420,9 @@ define Device/Build
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1))) $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1)))
$(call Device/Build/kernel,$(1)) $(call Device/Build/kernel,$(1))
$$(eval $$(foreach compile,$$(COMPILE), \
$$(call Device/Build/compile,$$(compile),$(1))))
$$(eval $$(foreach image,$$(IMAGES), \ $$(eval $$(foreach image,$$(IMAGES), \
$$(foreach fs,$$(filter $(TARGET_FILESYSTEMS),$$(FILESYSTEMS)), \ $$(foreach fs,$$(filter $(TARGET_FILESYSTEMS),$$(FILESYSTEMS)), \
$$(call Device/Build/image,$$(fs),$$(image),$(1))))) $$(call Device/Build/image,$$(fs),$$(image),$(1)))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment