diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-06-16 13:29:47 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:29 -0700 |
commit | 50d5b04a93a5ba7fb1762615d410932392c3fe30 (patch) | |
tree | 9bec45fc196d683f0f92d3c3c0581bd13a6de42f | |
parent | ee8eb6e15d3aad43744b68661bed4c2f22d26fb5 (diff) |
Allow pick device tree by specifying an environment variable.
The default device tree used by the make system is
board/nvidia/seaboard/tegra2-seaboard.dts, it is expected to be
defined in the main config file used by the related targets. If
'DEV_TREE_SRC' is defined in the environment, the file
board/nvidia/seaboard/${DEV_TREE_SRC} is used as the device tree
source instead. ./mkconfig is being restored to remove the device
tree related changes.
BUG=chromium-os:834
TEST=manual
Change-Id: I2232c5f4413b719057ec3def77ca03a78068c3c9
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/2776
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | dts/Makefile | 6 | ||||
-rw-r--r-- | include/configs/seaboard.h | 2 | ||||
-rwxr-xr-x | mkconfig | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/dts/Makefile b/dts/Makefile index 9e4cc841e6c..47b707ec7da 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -24,6 +24,12 @@ include $(TOPDIR)/config.mk LIB = $(obj)libdts.o +ifeq ($(DEV_TREE_SRC),) +DEVICE_TREE = $(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE)) +else +DEVICE_TREE = $(DEV_TREE_SRC) +endif + # Use a constant name for this so we can access it from C code. # objcopy doesn't seem to allow us to set the symbol name independently of # the filename. diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 5c4aa4b00bf..57af139666c 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -192,4 +192,6 @@ CONFIG_EXTRA_ENV_SETTINGS_COMMON \ "board=seaboard\0" \ +#define CONFIG_DEFAULT_DEVICE_TREE "tegra2-seaboard" + #endif /* __CONFIG_H */ @@ -127,10 +127,7 @@ echo "BOARD = ${board}" >> config.mk [ "${vendor}" ] && echo "VENDOR = ${vendor}" >> config.mk -if [ -n "${soc}" ] ; then - echo "SOC = ${soc}" >> config.mk - echo "DEVICE_TREE = ${soc}-${board}" >> config.mk -fi +[ "${soc}" ] && echo "SOC = ${soc}" >> config.mk # Assign board directory to BOARDIR variable if [ -z "${vendor}" ] ; then |