diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-08-14 13:05:22 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2015-08-14 13:05:22 +0000 |
commit | bbf13d61b7377b5114d9c716b7326f3f2bc468c1 (patch) | |
tree | 49c57d1eb3a67cf87f3072d933bda0faff33973d | |
parent | e0d21348b5527b507648cd87898501eade36a94f (diff) | |
download | master-187ad058-bbf13d61b7377b5114d9c716b7326f3f2bc468c1.tar.gz master-187ad058-bbf13d61b7377b5114d9c716b7326f3f2bc468c1.tar.bz2 master-187ad058-bbf13d61b7377b5114d9c716b7326f3f2bc468c1.zip |
image.mk: store the device name variable
Make the device name accessible for any build commands instead of
forcing targets to define it themselves.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46597 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | include/image.mk | 3 | ||||
-rw-r--r-- | target/linux/brcm2708/image/Makefile | 4 | ||||
-rwxr-xr-x | target/linux/brcm63xx/image/Makefile | 13 |
3 files changed, 4 insertions, 16 deletions
diff --git a/include/image.mk b/include/image.mk index 583bc66157..5722231044 100644 --- a/include/image.mk +++ b/include/image.mk @@ -367,6 +367,7 @@ endef define Device/Init PROFILES := $(PROFILE) + DEVICE_NAME := $(1) KERNEL:= KERNEL_INITRAMFS = $$(KERNEL) KERNEL_SIZE:= @@ -391,7 +392,7 @@ define Device/ExportVar endef define Device/Export - $(foreach var,$(DEVICE_VARS) KERNEL KERNEL_INITRAMFS,$(call Device/ExportVar,$(1),$(var))) + $(foreach var,$(DEVICE_VARS) DEVICE_NAME KERNEL KERNEL_INITRAMFS,$(call Device/ExportVar,$(1),$(var))) $(1) : FILESYSTEM:=$(2) endef diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile index 2afd29b592..76e0abff1d 100644 --- a/target/linux/brcm2708/image/Makefile +++ b/target/linux/brcm2708/image/Makefile @@ -61,10 +61,9 @@ define Device/Default IMAGES := sdcard.bin IMAGE/sdcard.bin := build-dtb | gen-cfg | boot-img | sdcard-img DEVICE_PROFILE := - DEVICE_NAME := DEVICE_DTS := endef -DEVICE_VARS += DEVICE_PROFILE DEVICE_NAME DEVICE_DTS +DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS # $(1) = profile # $(2) = image name @@ -72,7 +71,6 @@ DEVICE_VARS += DEVICE_PROFILE DEVICE_NAME DEVICE_DTS define add_bcm2708 define Device/$(2) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) endef TARGET_DEVICES += $(2) diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index c5c982f5e1..f15b30b5f1 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -175,10 +175,9 @@ define Device/Default PROFILES = Default $$(DEVICE_PROFILE) KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX).elf DEVICE_PROFILE := - DEVICE_NAME := DEVICE_DTS := endef -DEVICE_VARS += DEVICE_PROFILE DEVICE_NAME DEVICE_DTS +DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS # BCM33xx HCS devices: only generates ramdisks (unsupported bin images) define Device/bcm33xxHcsRamdisk @@ -313,7 +312,6 @@ define bcm33xxHcsRamdisk define Device/$(2) $$(Device/bcm33xxHcsRamdisk) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) HCS_MAGIC_BYTES := $(4) HCS_REV_MIN := $(5) @@ -329,7 +327,6 @@ define bcm63xxCfeRamdisk define Device/$(2) $$(Device/bcm63xxCfeRamdisk) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) endef TARGET_DEVICES += $(2) @@ -345,7 +342,6 @@ define bcm63xxCfe define Device/$(2) $$(Device/bcm63xxCfe) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) CFE_BOARD_ID := $(4) CFE_CHIP_ID := $(5) @@ -364,7 +360,6 @@ define bcm63xxCfeMultiFlash define Device/$(2) $$(Device/bcm63xxCfeMultiFlash) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) CFE_BOARD_ID := $(4) CFE_CHIP_ID := $(5) @@ -383,7 +378,6 @@ define bcm63xxCfeBc221 define Device/$(2) $$(Device/bcm63xxCfeBc221) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) CFE_BOARD_ID := $(4) CFE_CHIP_ID := $(5) @@ -404,7 +398,6 @@ define bcm63xxCfeNetgear define Device/$(2) $$(Device/bcm63xxCfeNetgear) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) CFE_BOARD_ID := $(4) CFE_CHIP_ID := $(5) @@ -425,7 +418,6 @@ define bcm63xxCfeOld define Device/$(2) $$(Device/bcm63xxCfeOld) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) CFE_BOARD_ID := $(4) CFE_CHIP_ID := $(5) @@ -444,7 +436,6 @@ define bcm63xxCfeSpw303v define Device/$(2) $$(Device/bcm63xxCfeSpw303v) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) CFE_BOARD_ID := $(4) CFE_CHIP_ID := $(5) @@ -463,7 +454,6 @@ define bcm63xxCfeZyxel define Device/$(2) $$(Device/bcm63xxCfeZyxel) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) CFE_BOARD_ID := $(4) CFE_CHIP_ID := $(5) @@ -479,7 +469,6 @@ define bcm63xxRedBoot define Device/$(2) $$(Device/bcm63xxRedBoot) DEVICE_PROFILE := $(1) - DEVICE_NAME := $(2) DEVICE_DTS := $(3) endef TARGET_DEVICES += $(2) |