summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-01-16 10:42:54 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-01-16 10:42:54 -0600
commita40df14d66e0608caef06170985b654e7a89743d (patch)
tree45fba22704439a3860a0f7015891619bdb04cd1b
parent41bc327c19c9b05329ccd00b8b5c650e698c2a00 (diff)
downloadnuttx-a40df14d66e0608caef06170985b654e7a89743d.tar.gz
nuttx-a40df14d66e0608caef06170985b654e7a89743d.tar.bz2
nuttx-a40df14d66e0608caef06170985b654e7a89743d.zip
You can again specify the default board sub-directory when CONFIG_ARCH_BOARD_CUSTOM is used
-rw-r--r--nuttx/ChangeLog5
-rw-r--r--nuttx/Makefile.unix7
-rw-r--r--nuttx/Makefile.win7
-rw-r--r--nuttx/configs/Kconfig13
4 files changed, 27 insertions, 5 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 2b8e8742c..8ffb11d47 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -6476,4 +6476,7 @@
(1) it has a bad side effect in that the sub-directory setting
no longer tracks the board setting, and (2) you still can't
source the Kconfig file from the custom board directory (2014-1-16).
-
+ * Makefile.unix, Makefile.win, and configs/Kconfig: After thinking a
+ little harder, I re-implemented the backed-out custom configuration
+ feature. The new version does not have bad side-effect (1) (but stil
+ has bad side-effect (2)) (2014-1-16).
diff --git a/nuttx/Makefile.unix b/nuttx/Makefile.unix
index 273024f6d..d76c34859 100644
--- a/nuttx/Makefile.unix
+++ b/nuttx/Makefile.unix
@@ -63,7 +63,12 @@ KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
ARCH_DIR = arch/$(CONFIG_ARCH)
ARCH_SRC = $(ARCH_DIR)/src
ARCH_INC = $(ARCH_DIR)/include
-BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
+
+ifeq ($(CONFIG_ARCH_BOARD_CUSTOM),y)
+ BOARD_DIR = $(CONFIG_ARCH_BOARD_CUSTOM_DIR)
+else
+ BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
+endif
# Add-on directories. These may or may not be in place in the
# NuttX source tree (they must be specifically installed)
diff --git a/nuttx/Makefile.win b/nuttx/Makefile.win
index 3acf4187b..533ebc1b2 100644
--- a/nuttx/Makefile.win
+++ b/nuttx/Makefile.win
@@ -56,7 +56,12 @@ KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
ARCH_DIR = arch\$(CONFIG_ARCH)
ARCH_SRC = $(ARCH_DIR)\src
ARCH_INC = $(ARCH_DIR)\include
-BOARD_DIR = configs\$(CONFIG_ARCH_BOARD)
+
+ifeq ($(CONFIG_ARCH_BOARD_CUSTOM),y)
+ BOARD_DIR = $(CONFIG_ARCH_BOARD_CUSTOM_DIR)
+else
+ BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
+endif
# Add-on directories. These may or may not be in place in the
# NuttX source tree (they must be specifically installed)
diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig
index 17e9fdbd3..c4565dbe7 100644
--- a/nuttx/configs/Kconfig
+++ b/nuttx/configs/Kconfig
@@ -858,8 +858,18 @@ config ARCH_BOARD_CUSTOM
endchoice
+config ARCH_BOARD_CUSTOM_DIR
+ string "Custom board directory"
+ depends on ARCH_BOARD_CUSTOM
+ ---help---
+ If the custom board configuration is selected, then it is necessary
+ to also tell the build system where it can find the board directory
+ for the custom board. This may be either a relative path from the
+ toplevel NuttX directory (like "configs/myboard") or an absolute path
+ to some location outside of the NuttX source tree (like
+ "~/projects/myboard").
+
config ARCH_BOARD
- string
default "amber" if ARCH_BOARD_AMBER
default "arduino-due" if ARCH_BOARD_ARDUINO_DUE
default "avr32dev1" if ARCH_BOARD_AVR32DEV1
@@ -946,7 +956,6 @@ config ARCH_BOARD
default "zp214xpa" if ARCH_BOARD_ZP214XPA
default "zkit-arm-1769" if ARCH_BOARD_ZKITARM
default "sim" if ARCH_BOARD_SIM
- default "" if ARCH_BOARD_CUSTOM
comment "Common Board Options"