rely on latest dtc, simplify
Subsystems (7)
v2 cover rely on latest dtc, simplify
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.
I'm sending V2 now that dtc-1.4.0 has been tagged/released, and hence there's a version number that patch 1/9 "Validate dtc is new enough" can check for. I'll leave it up to you whether this series is applicable for the current or next release.
This repost of V2 also picks up various Acked-by's that I've received
Stephen Warren (9):
Validate dtc is new enough
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 + Makefile | 8 +++++- 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 +- board/xilinx/dts/microblaze-generic.dts | 7 ++++++ board/xilinx/dts/microblaze.dts | 1 - board/xilinx/microblaze-generic/dts/microblaze.dts | 7 ------ config.mk | 1 + doc/README.fdt-control | 3 +-- dts/Makefile | 25 ++++++++----------- include/configs/exynos5250-dt.h | 1 - include/configs/microblaze-generic.h | 2 +- tools/dtc-version.sh | 20 +++++++++++++++ 19 files changed, 51 insertions(+), 120 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 create mode 100644 board/xilinx/dts/microblaze-generic.dts delete mode 100644 board/xilinx/dts/microblaze.dts delete mode 100644 board/xilinx/microblaze-generic/dts/microblaze.dts create mode 100755 tools/dtc-version.sh
Signature · 1 line
1.7.10.4
PATCH v2 1/9 Validate dtc is new enough
From: Stephen Warren <[email protected]>
Subsequent patches assume that dtc supports various recent features. These are available in dtc 1.4.0. Validate that dtc is at least that version.
---
v2: New patch.
--- Makefile | 8 +++++++- config.mk | 1 + tools/dtc-version.sh | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 tools/dtc-version.sh
Makefile +7 -1
@@ -429,7 +429,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 $@
@@ -683,6 +683,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) #
config.mk +1 -0
@@ -136,6 +136,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...)
tools/dtc-version.sh new file +20 -0
@@ -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
Signature · 1 line
1.7.10.4
PATCH v2 1/9 Validate dtc is new enough
Quoted 5 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Subsequent patches assume that dtc supports various recent features. These are available in dtc 1.4.0. Validate that dtc is at least that version.
Tom, do these patches look good?
PATCH v2 1/9 Validate dtc is new enough
Quoted 8 lines · Stephen Warren
Quoted 5 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Subsequent patches assume that dtc supports various recent features. These are available in dtc 1.4.0. Validate that dtc is at least that version.
Tom, do these patches look good?
So, Albert, Tom W, are we OK with some machines (say the 'tegra' SoCs for example) not building on some distros, until / unless the developer updates their dtc package?
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/20130802/3dc8c2a1/attachment.pgp>
PATCH v2 1/9 Validate dtc is new enough
Hi Tom,
Quoted 8 lines · Tom Rini
Quoted 7 lines · Stephen Warren
Quoted 5 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Subsequent patches assume that dtc supports various recent features. These are available in dtc 1.4.0. Validate that dtc is at least that version.
Quoted 5 lines
Quoted 1 line
Tom, do these patches look good?
So, Albert, Tom W, are we OK with some machines (say the 'tegra' SoCs for example) not building on some distros, until / unless the developer updates their dtc package?
I am fine with this as long as this is documented.
Amicalement,
Signature · 1 line
Albert.
PATCH v2 1/9 Validate dtc is new enough
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 12 lines · Albert ARIBAUD
Hi Tom,
Quoted 8 lines · Tom Rini
Quoted 7 lines · Stephen Warren
Quoted 5 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Subsequent patches assume that dtc supports various recent features. These are available in dtc 1.4.0. Validate that dtc is at least that version.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Tom, do these patches look good?
So, Albert, Tom W, are we OK with some machines (say the 'tegra' SoCs for example) not building on some distros, until / unless the developer updates their dtc package?
I am fine with this as long as this is documented.
Yes, the error produced is clear: "Your dtc is too old, please upgrade to dtc 1.4 or newer".
I shall push this shortly, thanks!
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJR/SJLAAoJENk4IS6UOR1WOvcP/31CCKPWepv6yxGWjWm3UO1/ ZC/0EB1y+3UkL+1pFYe2LuTDob3TjJQxKohlG3WWKH4NJ7Vcp29g364WJPkZYT+8 Lg438WS/kkgowpXkIreHNerLE0HKp19CsoBkS78Zci1rUSeUGuVSBg7SKCvrvLK8 3RBgTN5nx5/cTEU9D9DQINSb8P1bhSidoqov8npHULObVK6fo96wRqX5cW9401vU EhwjeAsjcdcbj4Nrgp3jAalZWu+EfwZeykfixbBUyP5pTKjDs4kLIzDpNbpFefDg xYWNNVPQ9DNJXK5kVojgwAyJuCzg77PNQfvREnUSvrAbKUJRY0SXiGYgQl8dpgdw lphSiU7R2yp4o3MVMU+T7uZKMlpz8rz/wqFIJxgoXL2vVvHvzDolnx0ymON6NPZ/ NL7evKtD4GADm5mUZc4JvRoOCZwOZRjC8dvDD0SoanzhSOk5rwBN8XdyC8yropu4 7hND7xdRc0i1ivRlqWZY8Mnj4URdhDeXufZp1DwIpNkyctSyTLUohJ8M/q4DBMyl 2FwlL3hauHPWJTL9Hs6tDxCSYgGCB2dQzpi9jzoISEqkVkq7ZDcDIbRN8itKwVrD jacFIHAiqTUaOSfsb2kVGrNXRqKlyZelxu7hFi1J17Lhq1Hxl7b3ZQX0DBps/kmg z4pdAcisRZqLlK3HGJ1h
=/6Du
-----END PGP SIGNATURE-----
PATCH v2 2/9 xilinx: move microblaze-generic .dts to standard location
In reply to Stephen WarrenFrom: 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.
--- board/xilinx/dts/microblaze-generic.dts | 7 +++++++ board/xilinx/dts/microblaze.dts | 1 - board/xilinx/microblaze-generic/dts/microblaze.dts | 7 ------- include/configs/microblaze-generic.h | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 board/xilinx/dts/microblaze-generic.dts delete mode 100644 board/xilinx/dts/microblaze.dts delete mode 100644 board/xilinx/microblaze-generic/dts/microblaze.dts
board/xilinx/dts/microblaze-generic.dts new file +7 -0
@@ -0,0 +1,7 @@ +/dts-v1/; +/ { + #address-cells = <1>; + #size-cells = <1>; + aliases { + } ; +} ;
board/xilinx/dts/microblaze.dts deleted +0 -1
@@ -1 +0,0 @@ -/include/ BOARD_DTS
board/xilinx/microblaze-generic/dts/microblaze.dts deleted +0 -7
@@ -1,7 +0,0 @@ -/dts-v1/; -/ { - #address-cells = <1>; - #size-cells = <1>; - aliases { - } ; -} ;
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.7.10.4
PATCH v2 3/9 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.
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.
---
v2:
* Added note to commit description re: line numbers.
* s/.dtstmp/dts.tmp/ in temporary filenames.
--- .gitignore | 1 + dts/Makefile | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-)
.gitignore +1 -0
@@ -16,6 +16,7 @@ *.patch *.bin *.cfgtmp +*.dts.tmp # 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).dts.tmp + $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $(DT_BIN).dts.tmp process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
Signature · 1 line
1.7.10.4
PATCH v2 4/9 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).dts.tmp - $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $(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'
Signature · 1 line
1.7.10.4
PATCH v2 5/9 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.7.10.4
PATCH v2 6/9 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.7.10.4
PATCH v2 7/9 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.7.10.4
PATCH v2 8/9 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).dts.tmp + $(CPP) $(DTS_CPPFLAGS) $< -o $(DT_BIN).dts.tmp $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dts.tmp process_lds = \
Signature · 1 line
1.7.10.4
PATCH v2 9/9 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.7.10.4
v2 cover rely on latest dtc, simplify
In reply to Stephen WarrenQuoted 13 lines · Stephen Warren
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.
I'm sending V2 now that dtc-1.4.0 has been tagged/released, and hence there's a version number that patch 1/9 "Validate dtc is new enough" can check for. I'll leave it up to you whether this series is applicable for the current or next release.
This repost of V2 also picks up various Acked-by's that I've received
Quoted 10 lines
Stephen Warren (9):
Validate dtc is new enough
xilinx: move microblaze-generic .dts to standard location dts/Makefile: simplify dtc invocation dts/Makefile: unify cpp/dtc include paths
dt: don't useARCH_CPU_DTS
dts/Makefile: don't defineARCH_CPU_DTS,BOARD_DTS
config: don't defineCONFIG_ARCH_DEVICE_TREEdts/Makefile: don't use cpp -P
dts/Makefile: pass -undef -D__DTS__ to cpp
Applied to u-boot/master, 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/20130803/5ac1fa24/attachment.pgp>