image.mk: store the device name variable
[openwrt/openwrt.git] / include / image.mk
index 979db5f554f65513a1374226fb9168253ad04818..572223104462dd28e553a6158529b19b6624fcb2 100644 (file)
@@ -299,6 +299,15 @@ define Build/uImage
        @mv $@.new $@
 endef
 
+define Build/netgear-chk
+       $(STAGING_DIR_HOST)/bin/mkchkimg \
+               -o $@.new \
+               -k $@ \
+               -b $(NETGEAR_BOARD_ID) \
+               -r $(NETGEAR_REGION)
+       mv $@.new $@
+endef
+
 define Build/lzma
        $(STAGING_DIR_HOST)/bin/lzma e $@ -lc1 -lp2 -pb2 $(1) $@.new
        @mv $@.new $@
@@ -358,6 +367,7 @@ endef
 
 define Device/Init
   PROFILES := $(PROFILE)
+  DEVICE_NAME := $(1)
   KERNEL:=
   KERNEL_INITRAMFS = $$(KERNEL)
   KERNEL_SIZE:=
@@ -382,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