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>

SVN-Revision: 46597
This commit is contained in:
Jonas Gorski
2015-08-14 13:05:22 +00:00
parent 4ecae78c16
commit 8e69c9f7ef
3 changed files with 4 additions and 16 deletions

View File

@@ -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)