rely on latest dtc, simplify
Subsystems (6)
cover rely on latest dtc, simplify
From: Stephen Warren <[email protected]>
This is a series of patches which simplifies the rules to build *.dts in U-Boot by relying on features in the latest dtc. The include rules are made more consistent between cpp (when processing *.dts) and dtc. The cpp flags are made more consistent with the way the kernel processes *.dts to allow better portability of *.dts between the two.
Stephen Warren (8):
xilinx: move microblaze-generic .dts to standard location dts/Makefile: simplify dtc invocation dts/Makefile: unify cpp/dtc include paths
dt: don't use ARCH_CPU_DTS
dts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS
config: don't define CONFIG_ARCH_DEVICE_TREE dts/Makefile: don't use cpp -P
dts/Makefile: pass -undef -D__DTS__ to cpp
.gitignore | 1 +
arch/arm/cpu/armv7/tegra114/config.mk | 19 ----------------
arch/arm/cpu/armv7/tegra20/config.mk | 26 ----------------------
arch/arm/cpu/armv7/tegra30/config.mk | 19 ----------------
arch/microblaze/config.mk | 2 --
arch/x86/cpu/coreboot/config.mk | 23 -------------------
board/chromebook-x86/dts/link.dts | 2 +-
board/samsung/dts/exynos5250-smdk5250.dts | 2 +-
board/samsung/dts/exynos5250-snow.dts | 2 +-
.../microblaze.dts => dts/microblaze-generic.dts} | 0
board/xilinx/dts/microblaze.dts | 1 -
doc/README.fdt-control | 3 +--
dts/Makefile | 25 +++++++++------------
include/configs/exynos5250-dt.h | 1 -
include/configs/microblaze-generic.h | 2 +-
15 files changed, 16 insertions(+), 112 deletions(-)
delete mode 100644 arch/arm/cpu/armv7/tegra114/config.mk
delete mode 100644 arch/arm/cpu/armv7/tegra20/config.mk
delete mode 100644 arch/arm/cpu/armv7/tegra30/config.mk
delete mode 100644 arch/x86/cpu/coreboot/config.mk
rename board/xilinx/{microblaze-generic/dts/microblaze.dts => dts/microblaze-generic.dts} (100%)
delete mode 100644 board/xilinx/dts/microblaze.dtsSignature · 1 line
1.8.1.5
PATCH 1/8 xilinx: move microblaze-generic .dts to standard location
From: Stephen Warren <[email protected]>
Aside from microblaze, all other SoCs/boards/vendors store their DT files in board/$vendor/dts/$soc-$board.dts. Move microblaze-generic.dts to this location for consistency.
---
.../dts/microblaze.dts => dts/microblaze-generic.dts} | 0
board/xilinx/dts/microblaze.dts | 1 -
include/configs/microblaze-generic.h | 2 +-
3 files changed, 1 insertion(+), 2 deletions(-)
rename board/xilinx/{microblaze-generic/dts/microblaze.dts => dts/microblaze-generic.dts} (100%)
delete mode 100644 board/xilinx/dts/microblaze.dtsboard/xilinx/dts/microblaze-generic.dts renamed from board/xilinx/microblaze-generic/dts/microblaze.dts +0 -0
board/xilinx/dts/microblaze.dts deleted +0 -1
@@ -1 +0,0 @@ -/include/ BOARD_DTS
include/configs/microblaze-generic.h +1 -1
@@ -34,7 +34,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
Signature · 1 line
1.8.1.5
PATCH 1/8 xilinx: move microblaze-generic .dts to standard location
Quoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Aside from microblaze, all other SoCs/boards/vendors store their DT files in
board/$vendor/dts/$soc-$board.dts. Movemicroblaze-generic.dtsto this location for consistency.Signed-off-by Stephen Warren <[email protected]>
Michal Simek
maintainerPATCH 1/8 xilinx: move microblaze-generic .dts to standard location
Quoted 4 lines · Simon Glass
Quoted 2 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Quoted 8 lines
Quoted 6 lines
Aside from microblaze, all other SoCs/boards/vendors store their DT files in
board/$vendor/dts/$soc-$board.dts. Movemicroblaze-generic.dtsto this location for consistency.Signed-off-by Stephen Warren <[email protected]>Acked-by Simon Glass <[email protected]>
M
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130620/c347a9a6/attachment.pgp>
PATCH 2/8 dts/Makefile: simplify dtc invocation
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
The invocation of dtc is significantly more complex that it could be, in order to work around an issue on old versions of dtc, which print a message to stdout every time they run.
Remove this workaround, on the assumption that people have or will upgrade to a newer version of dtc. This simplifies the build rule significantly.
Related, split the invocation of cpp and dtc into separate commands rather than a pipeline, so that if either fail, it is detected. This has the nice benefit of saving off the result of the pre-processing step, allowing it to be easily inspected.
--- .gitignore | 1 + dts/Makefile | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-)
.gitignore +1 -0
@@ -16,6 +16,7 @@ *.patch *.bin *.cfgtmp +*.dtstmp # Build tree /build-*
dts/Makefile +2 -7
@@ -51,13 +51,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) -P $(DTS_CPPFLAGS) $< -o $(DT_BIN).dtstmp + $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $(DT_BIN).dtstmp process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
Signature · 1 line
1.8.1.5
PATCH 2/8 dts/Makefile: simplify dtc invocation
Hi Stephen,
Quoted 41 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The invocation of dtc is significantly more complex that it could be, in order to work around an issue on old versions of dtc, which print a message to stdout every time they run.
Remove this workaround, on the assumption that people have or will upgrade to a newer version of dtc. This simplifies the build rule significantly.
Related, split the invocation of cpp and dtc into separate commands rather than a pipeline, so that if either fail, it is detected. This has the nice benefit of saving off the result of the pre-processing step, allowing it to be easily inspected.
Signed-off-by Stephen Warren <[email protected]>--- .gitignore | 1 + dts/Makefile | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-).gitignore +1
-0@@ -16,6 +16,7 @@ *.patch *.bin *.cfgtmp +*.dtstmp # Build tree /build-*dts/Makefile +0
-0@@ -51,13 +51,8 @@ all: $(obj).depend $(LIB) DT_BIN := $(obj)dt.dtb $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
dts/Makefile all: $(obj).depend $(LIB) · line 56
Quoted 10 lines
dts/Makefile +2
-7- 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) -P $(DTS_CPPFLAGS) $< -o $(DT_BIN).dtstmp + $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $(DT_BIN).dtstmp
When you get an error here, will dtc report a bogus filename? Or will the CPP line information deal with that> - iwc please add a comment to the commit message.
Quoted 7 lines
dts/Makefile +0
-1process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p' --1.8.1.5
Regards,
Simon
PATCH 2/8 dts/Makefile: simplify dtc invocation
Quoted 4 lines · Simon Glass
Hi Stephen,
On Mon, Jun 10, 2013 at 4:16 PM, Stephen Warren <[email protected] <mailto:[email protected]>> wrote:
...
Quoted 4 lines
Related, split the invocation of cpp and dtc into separate commands rather than a pipeline, so that if either fail, it is detected. This has the nice benefit of saving off the result of the pre-processing step, allowing it to be easily inspected.
...
Quoted 1 line
diff --git a/.gitignore b/.gitignore
...
Quoted 1 line
$(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
...
Quoted 7 lines
+ $(CPP) -P $(DTS_CPPFLAGS) $< -o $(DT_BIN).dtstmp
+ $(DTC) -R 4 -p0x1000-O dtb -o ${DT_BIN} $(DT_BIN).dtstmpWhen you get an error here, will dtc report a bogus filename? Or will the CPP line information deal with that> - iwc please add a comment to the commit message.
Added this to commit description:
Assuming a new enough dtc (which an earlier patch enforces), dtc will parse #line directives in its input file, and generate correct file and line numbers in error messages, even though cpp is unconditionally applied to its input file.
(note the patch that refers to will be new in v2 of the series).
PATCH 3/8 dts/Makefile: unify cpp/dtc include paths
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
*.dts may use #include (via cpp) or /include/ (via dtc; assuming a newer dtc). The choice is up to the creator of the DT. Create a common variable DTC_INCDIRS that lists the paths searched by include statements, and update cpp and dtc invocation to use them.
For cpp, also specify -nostdinc to ensure the same set of paths is available to both type of include statement.
For dtc, create a new DTC_FLAGS variable to hold all the flags passed to dtc.
--- dts/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
dts/Makefile +9 -2
@@ -37,11 +37,18 @@ $(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 + -nostdinc $(addprefix -I,$(DTS_INCDIRS)) + +DTC_FLAGS := -R 4 -p 0x1000 \ + $(addprefix -i ,$(DTS_INCDIRS)) all: $(obj).depend $(LIB)
@@ -52,7 +59,7 @@ DT_BIN := $(obj)dt.dtb $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts $(CPP) -P $(DTS_CPPFLAGS) $< -o $(DT_BIN).dtstmp - $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $(DT_BIN).dtstmp + $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dtstmp process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
Signature · 1 line
1.8.1.5
PATCH 3/8 dts/Makefile: unify cpp/dtc include paths
Hi Stephen,
Quoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
*.dts may use #include (via cpp) or /include/ (via dtc; assuming a newer dtc). The choice is up to the creator of the DT. Create a common variable
DTC_INCDIRSthat lists the paths searched by include statements, and update cpp and dtc invocation to use them.
Quoted 8 lines
For cpp, also specify -nostdinc to ensure the same set of paths is available to both type of include statement.
For dtc, create a new
DTC_FLAGSvariable to hold all the flags passed to dtc.Signed-off-by Stephen Warren <[email protected]>
Quoted 9 lines
--- dts/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)dts/Makefile +0
-0
dts/Makefile DT_BIN := $(obj)dt.dtb · line 63
Quoted 6 lines
dts/Makefile +1
-1@@ -52,7 +59,7 @@ DT_BIN := $(obj)dt.dtb $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts $(CPP) -P $(DTS_CPPFLAGS) $< -o $(DT_BIN).dtstmp - $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $(DT_BIN).dtstmp + $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dtstmp
.dts.tmp perhaps?
Quoted 7 lines
dts/Makefile +0
-1process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p' --1.8.1.5
Regards,
Simon
PATCH 3/8 dts/Makefile: unify cpp/dtc include paths
Quoted 13 lines · Simon Glass
Hi Stephen,
On Mon, Jun 10, 2013 at 4:16 PM, Stephen Warren <[email protected] <mailto:[email protected]>> wrote:
From: Stephen Warren <swarren at nvidia.com <mailto:[email protected]>>
*.dts may use #include (via cpp) or /include/ (via dtc; assuming a newer dtc). The choice is up to the creator of the DT. Create a common variable
DTC_INCDIRSthat lists the paths searched by include statements, and update cpp and dtc invocation to use them.
Quoted 7 lines
$(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
$(CPP) -P $(DTS_CPPFLAGS) $< -o $(DT_BIN).dtstmp
- $(DTC) -R 4 -p0x1000-O dtb -o ${DT_BIN} $(DT_BIN).dtstmp
+ $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dtstmp.dts.tmp perhaps?
I chose dtstmp to match *.cfgtmp which I found in .gitignore. Still, I have no idea what those files are, so there's probably no reason to be consistent with them. I can change this if you want (in patch 2/8).
PATCH 3/8 dts/Makefile: unify cpp/dtc include paths
Quoted 22 lines · Stephen Warren
Quoted 9 lines · Simon Glass
Hi Stephen,
On Mon, Jun 10, 2013 at 4:16 PM, Stephen Warren <[email protected] <mailto:[email protected]>> wrote:
From: Stephen Warren <swarren at nvidia.com <mailto:[email protected]
Quoted 1 line
*.dts may use #include (via cpp) or /include/ (via dtc; assuming a
newer
Quoted 11 lines
dtc). The choice is up to the creator of the DT. Create a common variable
DTC_INCDIRSthat lists the paths searched by include statements, and update cpp and dtc invocation to use them.$(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
$(CPP) -P $(DTS_CPPFLAGS) $< -o $(DT_BIN).dtstmp
- $(DTC) -R 4 -p0x1000-O dtb -o ${DT_BIN} $(DT_BIN).dtstmp
+ $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dtstmp
Quoted 6 lines
Quoted 1 line
.dts.tmp perhaps?
I chose dtstmp to match *.cfgtmp which I found in .gitignore. Still, I have no idea what those files are, so there's probably no reason to be consistent with them. I can change this if you want (in patch 2/8).
OK thanks.
Regards,
Simon
PATCH 4/8 dt: don't use ARCH_CPU_DTS
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
Now that we assume dtc supports the -i option, we don't need to use ARCH_CPU_DTS in *.dts{,i}; we simply specify the include filename directly, and dtc will find it.
--- board/chromebook-x86/dts/link.dts | 2 +- board/samsung/dts/exynos5250-smdk5250.dts | 2 +- board/samsung/dts/exynos5250-snow.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
board/chromebook-x86/dts/link.dts +1 -1
@@ -1,6 +1,6 @@ /dts-v1/; -/include/ ARCH_CPU_DTS +/include/ "coreboot.dtsi" / { #address-cells = <1>;
board/samsung/dts/exynos5250-smdk5250.dts +1 -1
@@ -10,7 +10,7 @@ */ /dts-v1/; -/include/ ARCH_CPU_DTS +/include/ "exynos5250.dtsi" / { model = "SAMSUNG SMDK5250 board based on EXYNOS5250";
board/samsung/dts/exynos5250-snow.dts +1 -1
@@ -10,7 +10,7 @@ */ /dts-v1/; -/include/ ARCH_CPU_DTS +/include/ "exynos5250.dtsi" / { model = "Google Snow";
Signature · 1 line
1.8.1.5
PATCH 4/8 dt: don't use ARCH_CPU_DTS
Quoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Now that we assume dtc supports the -i option, we don't need to use
ARCH_CPU_DTSin *.dts{,i}; we simply specify the include filename directly, and dtc will find it.Signed-off-by Stephen Warren <[email protected]>
PATCH 5/8 dts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
Now that nothing uses the defines ARCH_CPU_DTS, BOARD_DTS, stop defining them.
--- dts/Makefile | 7 ------- 1 file changed, 7 deletions(-)
dts/Makefile +0 -7
@@ -33,18 +33,11 @@ $(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\" \ -nostdinc $(addprefix -I,$(DTS_INCDIRS)) DTC_FLAGS := -R 4 -p 0x1000 \
Signature · 1 line
1.8.1.5
PATCH 5/8 dts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS
Quoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Now that nothing uses the defines
ARCH_CPU_DTS,BOARD_DTS, stop defining them.Signed-off-by Stephen Warren <[email protected]>
PATCH 6/8 config: don't define CONFIG_ARCH_DEVICE_TREE
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
Now that nothing uses CONFIG_ARCH_DEVICE_TREE, stop defining it.
--- arch/arm/cpu/armv7/tegra114/config.mk | 19 ------------------- arch/arm/cpu/armv7/tegra20/config.mk | 26 -------------------------- arch/arm/cpu/armv7/tegra30/config.mk | 19 ------------------- arch/microblaze/config.mk | 2 -- arch/x86/cpu/coreboot/config.mk | 23 ----------------------- doc/README.fdt-control | 3 +-- include/configs/exynos5250-dt.h | 1 - 7 files changed, 1 insertion(+), 92 deletions(-) delete mode 100644 arch/arm/cpu/armv7/tegra114/config.mk delete mode 100644 arch/arm/cpu/armv7/tegra20/config.mk delete mode 100644 arch/arm/cpu/armv7/tegra30/config.mk delete mode 100644 arch/x86/cpu/coreboot/config.mk
arch/arm/cpu/armv7/tegra114/config.mk deleted +0 -19
@@ -1,19 +0,0 @@ -# -# Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# -# 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
arch/arm/cpu/armv7/tegra20/config.mk deleted +0 -26
@@ -1,26 +0,0 @@ -# -# (C) Copyright 2010,2011 -# NVIDIA Corporation <www.nvidia.com> -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# -# See file CREDITS for list of people who contributed to this -# project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that 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, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# -CONFIG_ARCH_DEVICE_TREE := tegra20
arch/arm/cpu/armv7/tegra30/config.mk deleted +0 -19
@@ -1,19 +0,0 @@ -# -# Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved. -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# -# 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
arch/microblaze/config.mk +0 -2
@@ -31,5 +31,3 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__ LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds - -CONFIG_ARCH_DEVICE_TREE := microblaze
arch/x86/cpu/coreboot/config.mk deleted +0 -23
@@ -1,23 +0,0 @@ -# -# Copyright (c) 2012 The Chromium OS Authors. -# -# See file CREDITS for list of people who contributed to this -# project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that 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, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# - -CONFIG_ARCH_DEVICE_TREE := coreboot
doc/README.fdt-control +1 -2
@@ -135,8 +135,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).
include/configs/exynos5250-dt.h +0 -1
@@ -39,7 +39,6 @@#define CONFIG_DISPLAY_BOARDINFO /* Enable fdt support for Exynos5250 */ -#define CONFIG_ARCH_DEVICE_TREE exynos5250#define CONFIG_OF_CONTROL #define CONFIG_OF_SEPARATE
Signature · 1 line
1.8.1.5
PATCH 6/8 config: don't define CONFIG_ARCH_DEVICE_TREE
Hi,
I think we can wait some more time to mature the fdt support on u-boot, as not many boards were using this future. may be I am also incorrect.
And need to remove the CONFIG_ARCH_DEVICE_TREE references in dts/Makefile to for working this.
--
Thanks,
Jagan.
Quoted 173 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Now that nothing uses
CONFIG_ARCH_DEVICE_TREE, stop defining it.Signed-off-by Stephen Warren <[email protected]>--- arch/arm/cpu/armv7/tegra114/config.mk | 19 ------------------- arch/arm/cpu/armv7/tegra20/config.mk | 26 -------------------------- arch/arm/cpu/armv7/tegra30/config.mk | 19 ------------------- arch/microblaze/config.mk | 2 -- arch/x86/cpu/coreboot/config.mk | 23 ----------------------- doc/README.fdt-control | 3 +-- include/configs/exynos5250-dt.h | 1 - 7 files changed, 1 insertion(+), 92 deletions(-) delete mode 100644 arch/arm/cpu/armv7/tegra114/config.mk delete mode 100644 arch/arm/cpu/armv7/tegra20/config.mk delete mode 100644 arch/arm/cpu/armv7/tegra30/config.mk delete mode 100644 arch/x86/cpu/coreboot/config.mkarch/arm/cpu/armv7/tegra114/config.mk deleted +0
-19@@ -1,19 +0,0 @@ -# -# Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# -# 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 := tegra114arch/arm/cpu/armv7/tegra20/config.mk deleted +0
-26@@ -1,26 +0,0 @@ -# -# (C) Copyright 2010,2011 -# NVIDIA Corporation <www.nvidia.com> -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# -# See file CREDITS for list of people who contributed to this -# project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that 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, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# -CONFIG_ARCH_DEVICE_TREE := tegra20arch/arm/cpu/armv7/tegra30/config.mk deleted +0
-19@@ -1,19 +0,0 @@ -# -# Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved. -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# -# 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 := tegra30arch/microblaze/config.mk +0
-2@@ -31,5 +31,3 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__ LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds - -CONFIG_ARCH_DEVICE_TREE := microblazearch/x86/cpu/coreboot/config.mk deleted +0
-23@@ -1,23 +0,0 @@ -# -# Copyright (c) 2012 The Chromium OS Authors. -# -# See file CREDITS for list of people who contributed to this -# project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that 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, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# - -CONFIG_ARCH_DEVICE_TREE := corebootdoc/README.fdt-control +1
-2@@ -135,8 +135,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).include/configs/exynos5250-dt.h +0
-2@@ -39,7 +39,6 @@#define CONFIG_DISPLAY_BOARDINFO /* Enable fdt support for Exynos5250 */ -#define CONFIG_ARCH_DEVICE_TREE exynos5250#define CONFIG_OF_CONTROL #define CONFIG_OF_SEPARATE --1.8.1.5
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 6/8 config: don't define CONFIG_ARCH_DEVICE_TREE
Quoted 5 lines · Jagan Teki
Hi,
I think we can wait some more time to mature the fdt support on u-boot, as not many boards were using this future. may be I am also incorrect.
Sorry, I don't understand what this means.
Quoted 2 lines
And need to remove the
CONFIG_ARCH_DEVICE_TREEreferences in dts/Makefile to for working this.
That's what patch 5/8 does.
PATCH 6/8 config: don't define CONFIG_ARCH_DEVICE_TREE
In reply to Stephen WarrenQuoted 6 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Now that nothing uses
CONFIG_ARCH_DEVICE_TREE, stop defining it.Signed-off-by Stephen Warren <[email protected]>
Quoted 15 lines
--- arch/arm/cpu/armv7/tegra114/config.mk | 19 ------------------- arch/arm/cpu/armv7/tegra20/config.mk | 26 -------------------------- arch/arm/cpu/armv7/tegra30/config.mk | 19 ------------------- arch/microblaze/config.mk | 2 -- arch/x86/cpu/coreboot/config.mk | 23 ----------------------- doc/README.fdt-control | 3 +-- include/configs/exynos5250-dt.h | 1 - 7 files changed, 1 insertion(+), 92 deletions(-) delete mode 100644 arch/arm/cpu/armv7/tegra114/config.mk delete mode 100644 arch/arm/cpu/armv7/tegra20/config.mk delete mode 100644 arch/arm/cpu/armv7/tegra30/config.mk delete mode 100644 arch/x86/cpu/coreboot/config.mk
PATCH 7/8 dts/Makefile: don't use cpp -P
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
Recent dtc supports #line directives in the input source code, and even uses them to generate useful line numbers in any messages it emits. Stop passing -P to cpp, since there's no need any more.
--- dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
dts/Makefile +1 -1
@@ -51,7 +51,7 @@ all: $(obj).depend $(LIB) DT_BIN := $(obj)dt.dtb $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts - $(CPP) -P $(DTS_CPPFLAGS) $< -o $(DT_BIN).dtstmp + $(CPP) $(DTS_CPPFLAGS) $< -o $(DT_BIN).dtstmp $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dtstmp process_lds = \
Signature · 1 line
1.8.1.5
PATCH 7/8 dts/Makefile: don't use cpp -P
Quoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Recent dtc supports #line directives in the input source code, and even uses them to generate useful line numbers in any messages it emits. Stop passing -P to cpp, since there's no need any more.
Signed-off-by Stephen Warren <[email protected]>
PATCH 8/8 dts/Makefile: pass -undef -D__DTS__ to cpp
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
This brings U-Boot's cpp invocation into line with the way the Linux kernel invokes cpp on device trees. Consistency will be useful to ensure *.dts is portable between the two.
-undef also has the added advantage of not defining "linux", so DT property names such as "linux,keymap" don't get mangled.
--- dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
dts/Makefile +1 -1
@@ -37,7 +37,7 @@ DTS_INCDIRS = $(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts DTS_INCDIRS += $(SRCTREE)/board/$(VENDOR)/dts DTS_INCDIRS += $(SRCTREE)/arch/$(ARCH)/dts -DTS_CPPFLAGS := -x assembler-with-cpp \ +DTS_CPPFLAGS := -x assembler-with-cpp -undef -D__DTS__ \ -nostdinc $(addprefix -I,$(DTS_INCDIRS)) DTC_FLAGS := -R 4 -p 0x1000 \
Signature · 1 line
1.8.1.5
PATCH 8/8 dts/Makefile: pass -undef -D__DTS__ to cpp
Quoted 11 lines · Stephen Warren
From: Stephen Warren <[email protected]>
This brings U-Boot's cpp invocation into line with the way the Linux kernel invokes cpp on device trees. Consistency will be useful to ensure *.dts is portable between the two.
-undef also has the added advantage of not defining "linux", so DT property names such as "linux,keymap" don't get mangled.
Signed-off-by Stephen Warren <[email protected]>
This series looks good and I'm pleased that it seems we are now able to drop support for the older dtc. It is slightly concerning that there has been no new dtc release for so long, but we should try to minimise the pain caused to U-Boot.
We have local patches which enable building multiple .dts files as the kernel does. Once this lands we can perhaps send out a patch or two for that.
Regards,
Simon
cover rely on latest dtc, simplify
In reply to Stephen WarrenQuoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
This is a series of patches which simplifies the rules to build *.dts in U-Boot by relying on features in the latest dtc. The include rules are made more consistent between cpp (when processing *.dts) and dtc. The cpp flags are made more consistent with the way the kernel processes *.dts to allow better portability of *.dts between the two.
Please add a dtc-version Makefile variable and corresponding tools/dtc-version.sh script, ala gcc/binutils so that we can error out gracefully if dtc isn't supporting the options we need.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130611/24bf860a/attachment.pgp>
cover rely on latest dtc, simplify
Quoted 11 lines · Tom Rini
Quoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
This is a series of patches which simplifies the rules to build *.dts in U-Boot by relying on features in the latest dtc. The include rules are made more consistent between cpp (when processing *.dts) and dtc. The cpp flags are made more consistent with the way the kernel processes *.dts to allow better portability of *.dts between the two.
Quoted 3 lines
Please add a dtc-version
Makefilevariable and correspondingtools/dtc-version.shscript, ala gcc/binutils so that we can error out gracefully if dtc isn't supporting the options we need.
Hmm. dtc doesn't really seem to do releases. Hence, there's no version number available to check for here:-( (i.e. the features this series rely on were added after 1.3.0, which is the most recent, but quite old, tagged release).
I suppose I could ping them yet again on tagging a release...
cover rely on latest dtc, simplify
Quoted 16 lines · Stephen Warren
Quoted 11 lines · Tom Rini
Quoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
This is a series of patches which simplifies the rules to build *.dts in U-Boot by relying on features in the latest dtc. The include rules are made more consistent between cpp (when processing *.dts) and dtc. The cpp flags are made more consistent with the way the kernel processes *.dts to allow better portability of *.dts between the two.
Quoted 3 lines
Please add a dtc-version
Makefilevariable and correspondingtools/dtc-version.shscript, ala gcc/binutils so that we can error out gracefully if dtc isn't supporting the options we need.
Quoted 6 lines
Hmm. dtc doesn't really seem to do releases. Hence, there's no version number available to check for here:-( (i.e. the features this series rely on were added after 1.3.0, which is the most recent, but quite old, tagged release).
I suppose I could ping them yet again on tagging a release...
Yeah, I can imagine a release might also help encourage distributions to update...
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130611/29ecc755/attachment.pgp>
cover rely on latest dtc, simplify
In reply to Tom RiniQuoted 10 lines · Tom Rini
Quoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
This is a series of patches which simplifies the rules to build *.dts in U-Boot by relying on features in the latest dtc. The include rules are made more consistent between cpp (when processing *.dts) and dtc. The cpp flags are made more consistent with the way the kernel processes *.dts to allow better portability of *.dts between the two.
Quoted 3 lines
Please add a dtc-version
Makefilevariable and correspondingtools/dtc-version.shscript, ala gcc/binutils so that we can error out gracefully if dtc isn't supporting the options we need.
For clarity, we need some sort of graceful error-out, be it version check or flag-is-supported check. I fear this is going to lead to a lot of people not being able to compile and I'd like to be able to give a clear error message.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130619/111c089e/attachment.pgp>
cover rely on latest dtc, simplify
Quoted 17 lines · Tom Rini
Quoted 11 lines · Tom Rini
Quoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
This is a series of patches which simplifies the rules to build *.dts in U-Boot by relying on features in the latest dtc. The include rules are made more consistent between cpp (when processing *.dts) and dtc. The cpp flags are made more consistent with the way the kernel processes *.dts to allow better portability of *.dts between the two.
Quoted 4 lines
Please add a dtc-version
Makefilevariable and correspondingtools/dtc-version.shscript, ala gcc/binutils so that we can error out gracefully if dtc isn't supporting the options we need.
Quoted 4 lines
For clarity, we need some sort of graceful error-out, be it version check or flag-is-supported check. I fear this is going to lead to a lot of people not being able to compile and I'd like to be able to give a clear error message.
I've implemented this check and have the patches ready. I'm just waiting for a dtc release that has all the required features, so that there actually is a version number the code can check for.
It sounds like there's agreement to make the dtc release by the end of this week, unless anyone comes forward and objects, and they haven't yet:-)
cover rely on latest dtc, simplify
Quoted 23 lines · Stephen Warren
Quoted 17 lines · Tom Rini
Quoted 11 lines · Tom Rini
Quoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
This is a series of patches which simplifies the rules to build *.dts in U-Boot by relying on features in the latest dtc. The include rules are made more consistent between cpp (when processing *.dts) and dtc. The cpp flags are made more consistent with the way the kernel processes *.dts to allow better portability of *.dts between the two.
Quoted 4 lines
Please add a dtc-version
Makefilevariable and correspondingtools/dtc-version.shscript, ala gcc/binutils so that we can error out gracefully if dtc isn't supporting the options we need.Quoted 4 lines
For clarity, we need some sort of graceful error-out, be it version check or flag-is-supported check. I fear this is going to lead to a lot of people not being able to compile and I'd like to be able to give a clear error message.
Quoted 7 lines
I've implemented this check and have the patches ready. I'm just waiting for a dtc release that has all the required features, so that there actually is a version number the code can check for.
It sounds like there's agreement to make the dtc release by the end of this week, unless anyone comes forward and objects, and they haven't yet:-)
Sounds good to me, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130619/81ba498b/attachment.pgp>