image: clean up UBI related device variable definitions

Move UBI related variable export to core, since the variables are used
by a core Build/ template

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2016-07-13 17:19:00 +02:00
parent 1729a089fe
commit e0ed6ec667
4 changed files with 17 additions and 7 deletions

View File

@@ -322,15 +322,26 @@ define Device/Init
KERNEL_DEPENDS :=
KERNEL_SIZE :=
UBOOTENV_IN_UBI :=
KERNEL_IN_UBI :=
BLOCKSIZE :=
PAGESIZE :=
SUBPAGESIZE :=
FILESYSTEMS := $(TARGET_FILESYSTEMS)
endef
DEFAULT_DEVICE_VARS := \
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE \
UBOOTENV_IN_UBI KERNEL_IN_UBI \
BLOCKSIZE PAGESIZE SUBPAGESIZE
define Device/ExportVar
$(1) : $(2):=$$($(2))
endef
define Device/Export
$(foreach var,$(DEVICE_VARS) DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE,$(call Device/ExportVar,$(1),$(var)))
$(foreach var,$(DEVICE_VARS) $(DEFAULT_DEVICE_VARS),$(call Device/ExportVar,$(1),$(var)))
$(1) : FILESYSTEM:=$(2)
endef