diff --git a/ChangeLog b/ChangeLog index 2b8e8742cd6..8ffb11d47fe 100644 --- a/ChangeLog +++ b/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/Makefile.unix b/Makefile.unix index 273024f6d38..d76c34859a7 100644 --- a/Makefile.unix +++ b/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/Makefile.win b/Makefile.win index 3acf4187b10..533ebc1b223 100644 --- a/Makefile.win +++ b/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/configs/Kconfig b/configs/Kconfig index 17e9fdbd318..c4565dbe7d5 100644 --- a/configs/Kconfig +++ b/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"