changeset 416:c46079649662

Allow per-vendor variables in boards/${VENDOR}/vendor.mk file.
author Aleksandr Rybalko <ray@ddteam.net>
date Fri, 14 Sep 2012 00:25:01 +0300
parents c2163079c392
children 53ceb7208ffc
files boards/D-Link/DIR-632/board.mk boards/D-Link/vendor.mk boards/boards.mk
diffstat 3 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/boards/D-Link/DIR-632/board.mk	Thu Sep 13 23:29:54 2012 +0300
+++ b/boards/D-Link/DIR-632/board.mk	Fri Sep 14 00:25:01 2012 +0300
@@ -12,7 +12,6 @@
 # TODO: size suffixes
 BOARD_FLASH_SIZE=8388608
 
-
 ###################################################
 #
 # Vars for kernel config 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/vendor.mk	Fri Sep 14 00:25:01 2012 +0300
@@ -0,0 +1,1 @@
+# Something required for by this vendor.
--- a/boards/boards.mk	Thu Sep 13 23:29:54 2012 +0300
+++ b/boards/boards.mk	Fri Sep 14 00:25:01 2012 +0300
@@ -6,7 +6,9 @@
 TARGET_DEVICE=${TARGET_PAIR:C/.*\///}
 .endif
 
-.if exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/) && exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/${TARGET_DEVICE}/)
+.if exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/)
+
+.if exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/${TARGET_DEVICE}/)
 TARGET_BOARDDIR= ${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/${TARGET_DEVICE}
 .include "${TARGET_BOARDDIR}/board.mk"
 
@@ -18,5 +20,14 @@
 BOARD_FIRMWARE_SIGNATURE_FILE=${TARGET_BOARDDIR}/board_firmware.sig
 .endif
 
-.endif
+.else
+.error "No ${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/ board model directory found"
+.endif # exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/${TARGET_DEVICE}/)
 
+.if exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/vendor.mk)
+.include "${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/vendor.mk"
+.endif # exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/vendor.mk)
+
+.else
+.error "No ${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/ board vendor directory found"
+.endif # exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/)