diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/tegra114/config.mk | 19 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/tegra20/config.mk | 10 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/tegra30/config.mk | 19 | ||||
-rw-r--r-- | arch/microblaze/config.mk | 2 | ||||
-rw-r--r-- | arch/x86/cpu/coreboot/config.mk | 7 | ||||
-rw-r--r-- | board/chromebook-x86/dts/link.dts | 2 | ||||
-rw-r--r-- | board/samsung/dts/exynos5250-smdk5250.dts | 2 | ||||
-rw-r--r-- | board/samsung/dts/exynos5250-snow.dts | 2 | ||||
-rw-r--r-- | board/xilinx/dts/microblaze-generic.dts (renamed from board/xilinx/microblaze-generic/dts/microblaze.dts) | 0 | ||||
-rw-r--r-- | board/xilinx/dts/microblaze.dts | 1 | ||||
-rw-r--r-- | config.mk | 1 | ||||
-rw-r--r-- | doc/README.fdt-control | 3 | ||||
-rw-r--r-- | dts/Makefile | 25 | ||||
-rw-r--r-- | include/configs/exynos5250-dt.h | 1 | ||||
-rw-r--r-- | include/configs/microblaze-generic.h | 2 | ||||
-rwxr-xr-x | tools/dtc-version.sh | 20 |
18 files changed, 44 insertions, 81 deletions
@@ -16,6 +16,7 @@ *.patch *.bin *.cfgtmp +*.dts.tmp # Build tree /build-* @@ -413,7 +413,7 @@ endif all: $(ALL-y) $(SUBDIR_EXAMPLES) -$(obj)u-boot.dtb: $(obj)u-boot +$(obj)u-boot.dtb: checkdtc $(obj)u-boot $(MAKE) -C dts binary mv $(obj)dts/dt.dtb $@ @@ -667,6 +667,12 @@ checkgcc4: false; \ fi +checkdtc: + @if test $(call dtc-version) -lt 0104; then \ + echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \ + false; \ + fi + # # Auto-generate the autoconf.mk file (which is included by all makefiles) # diff --git a/arch/arm/cpu/armv7/tegra114/config.mk b/arch/arm/cpu/armv7/tegra114/config.mk deleted file mode 100644 index cb1a19d..0000000 --- a/arch/arm/cpu/armv7/tegra114/config.mk +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -CONFIG_ARCH_DEVICE_TREE := tegra114 diff --git a/arch/arm/cpu/armv7/tegra20/config.mk b/arch/arm/cpu/armv7/tegra20/config.mk deleted file mode 100644 index 3cac79b..0000000 --- a/arch/arm/cpu/armv7/tegra20/config.mk +++ /dev/null @@ -1,10 +0,0 @@ -# -# (C) Copyright 2010,2011 -# NVIDIA Corporation <www.nvidia.com> -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> -# -# SPDX-License-Identifier: GPL-2.0+ -# -CONFIG_ARCH_DEVICE_TREE := tegra20 diff --git a/arch/arm/cpu/armv7/tegra30/config.mk b/arch/arm/cpu/armv7/tegra30/config.mk deleted file mode 100644 index 719ca81..0000000 --- a/arch/arm/cpu/armv7/tegra30/config.mk +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved. -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -CONFIG_ARCH_DEVICE_TREE := tegra30 diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk index 6692f24..fc545a9 100644 --- a/arch/microblaze/config.mk +++ b/arch/microblaze/config.mk @@ -15,5 +15,3 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__ LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds - -CONFIG_ARCH_DEVICE_TREE := microblaze diff --git a/arch/x86/cpu/coreboot/config.mk b/arch/x86/cpu/coreboot/config.mk deleted file mode 100644 index 0bbd2ff..0000000 --- a/arch/x86/cpu/coreboot/config.mk +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (c) 2012 The Chromium OS Authors. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -CONFIG_ARCH_DEVICE_TREE := coreboot diff --git a/board/chromebook-x86/dts/link.dts b/board/chromebook-x86/dts/link.dts index d0738cb..c95ee8a 100644 --- a/board/chromebook-x86/dts/link.dts +++ b/board/chromebook-x86/dts/link.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ ARCH_CPU_DTS +/include/ "coreboot.dtsi" / { #address-cells = <1>; diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts index 80ffe30..1e94c7f 100644 --- a/board/samsung/dts/exynos5250-smdk5250.dts +++ b/board/samsung/dts/exynos5250-smdk5250.dts @@ -10,7 +10,7 @@ */ /dts-v1/; -/include/ ARCH_CPU_DTS +/include/ "exynos5250.dtsi" / { model = "SAMSUNG SMDK5250 board based on EXYNOS5250"; diff --git a/board/samsung/dts/exynos5250-snow.dts b/board/samsung/dts/exynos5250-snow.dts index dca3386..7832e4e 100644 --- a/board/samsung/dts/exynos5250-snow.dts +++ b/board/samsung/dts/exynos5250-snow.dts @@ -10,7 +10,7 @@ */ /dts-v1/; -/include/ ARCH_CPU_DTS +/include/ "exynos5250.dtsi" / { model = "Google Snow"; diff --git a/board/xilinx/microblaze-generic/dts/microblaze.dts b/board/xilinx/dts/microblaze-generic.dts index 2033309..2033309 100644 --- a/board/xilinx/microblaze-generic/dts/microblaze.dts +++ b/board/xilinx/dts/microblaze-generic.dts diff --git a/board/xilinx/dts/microblaze.dts b/board/xilinx/dts/microblaze.dts deleted file mode 100644 index bf984b0..0000000 --- a/board/xilinx/dts/microblaze.dts +++ /dev/null @@ -1 +0,0 @@ -/include/ BOARD_DTS @@ -119,6 +119,7 @@ endif # Usage gcc-ver := $(call cc-version) cc-version = $(shell $(SHELL) $(SRCTREE)/tools/gcc-version.sh $(CC)) binutils-version = $(shell $(SHELL) $(SRCTREE)/tools/binutils-version.sh $(AS)) +dtc-version = $(shell $(SHELL) $(SRCTREE)/tools/dtc-version.sh $(DTC)) # # Include the make variables (CC, etc...) diff --git a/doc/README.fdt-control b/doc/README.fdt-control index 4b29060..86bae68 100644 --- a/doc/README.fdt-control +++ b/doc/README.fdt-control @@ -119,8 +119,7 @@ file into board/<vendor>/dts/<name>.dts This should include your CPU or SOC's device tree file, placed in -arch/<arch>/dts, and then make any adjustments required. The name of this -is CONFIG_ARCH_DEVICE_TREE.dts. +arch/<arch>/dts, and then make any adjustments required. If CONFIG_OF_EMBED is defined, then it will be picked up and built into the U-Boot image (including u-boot.bin). diff --git a/dts/Makefile b/dts/Makefile index 35303f7..3cf991e 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -17,15 +17,15 @@ $(error Please define CONFIG_DEFAULT_DEVICE_TREE in your board header file)) DEVICE_TREE = $(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE)) endif -$(if $(CONFIG_ARCH_DEVICE_TREE),,\ -$(error Your architecture does not have device tree support enabled. \ -Please define CONFIG_ARCH_DEVICE_TREE)) +DTS_INCDIRS = $(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts +DTS_INCDIRS += $(SRCTREE)/board/$(VENDOR)/dts +DTS_INCDIRS += $(SRCTREE)/arch/$(ARCH)/dts -# We preprocess the device tree file provide a useful define -DTS_CPPFLAGS := -x assembler-with-cpp \ - -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\" \ - -DBOARD_DTS=\"$(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts/$(DEVICE_TREE).dts\" \ - -I$(SRCTREE)/board/$(VENDOR)/dts -I$(SRCTREE)/arch/$(ARCH)/dts +DTS_CPPFLAGS := -x assembler-with-cpp -undef -D__DTS__ \ + -nostdinc $(addprefix -I,$(DTS_INCDIRS)) + +DTC_FLAGS := -R 4 -p 0x1000 \ + $(addprefix -i ,$(DTS_INCDIRS)) all: $(obj).depend $(LIB) @@ -35,13 +35,8 @@ all: $(obj).depend $(LIB) DT_BIN := $(obj)dt.dtb $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts - rc=$$( \ - cat $< | $(CPP) -P $(DTS_CPPFLAGS) - | \ - { { $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} - 2>&1 ; \ - echo $$? >&3 ; } | \ - grep -v '^DTC: dts->dtb on file' ; \ - } 3>&1 1>&2 ) ; \ - exit $$rc + $(CPP) $(DTS_CPPFLAGS) $< -o $(DT_BIN).dts.tmp + $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dts.tmp process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p' diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index 2ce5a78..8f8f85f 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -23,7 +23,6 @@ #define CONFIG_DISPLAY_BOARDINFO /* Enable fdt support for Exynos5250 */ -#define CONFIG_ARCH_DEVICE_TREE exynos5250 #define CONFIG_OF_CONTROL #define CONFIG_OF_SEPARATE diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 87f3d13..0e3de77 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -18,7 +18,7 @@ /* Open Firmware DTS */ #define CONFIG_OF_CONTROL 1 #define CONFIG_OF_EMBED 1 -#define CONFIG_DEFAULT_DEVICE_TREE microblaze +#define CONFIG_DEFAULT_DEVICE_TREE microblaze-generic /* linear and spi flash memory */ #ifdef XILINX_FLASH_START diff --git a/tools/dtc-version.sh b/tools/dtc-version.sh new file mode 100755 index 0000000..e8c94d3 --- /dev/null +++ b/tools/dtc-version.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# dtc-version dtc-command +# +# Prints the dtc version of `dtc-command' in a canonical 4-digit form +# such as `0222' for binutils 2.22 +# + +dtc="$*" + +if [ ${#dtc} -eq 0 ]; then + echo "Error: No dtc command specified." + printf "Usage:\n\t$0 <dtc-command>\n" + exit 1 +fi + +MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1) +MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2) + +printf "%02d%02d\\n" $MAJOR $MINOR |