* [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
@ 2013-07-24 17:09 ` Stephen Warren
2013-08-02 22:23 ` Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 2/9] xilinx: move microblaze-generic .dts to standard location Stephen Warren
` (8 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: Stephen Warren @ 2013-07-24 17:09 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
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.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/Makefile b/Makefile
index 4218226..1cb9203 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
#
diff --git a/config.mk b/config.mk
index e21d698..efb70a6 100644
--- a/config.mk
+++ b/config.mk
@@ -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...)
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
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough Stephen Warren
@ 2013-08-02 22:23 ` Stephen Warren
2013-08-03 0:32 ` Tom Rini
0 siblings, 1 reply; 15+ messages in thread
From: Stephen Warren @ 2013-08-02 22:23 UTC (permalink / raw)
To: u-boot
On 07/24/2013 11:09 AM, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> 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?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough
2013-08-02 22:23 ` Stephen Warren
@ 2013-08-03 0:32 ` Tom Rini
2013-08-03 14:11 ` Albert ARIBAUD
0 siblings, 1 reply; 15+ messages in thread
From: Tom Rini @ 2013-08-03 0:32 UTC (permalink / raw)
To: u-boot
On Fri, Aug 02, 2013 at 04:23:37PM -0600, Stephen Warren wrote:
> On 07/24/2013 11:09 AM, Stephen Warren wrote:
> > From: Stephen Warren <swarren@nvidia.com>
> >
> > 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?
--
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>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough
2013-08-03 0:32 ` Tom Rini
@ 2013-08-03 14:11 ` Albert ARIBAUD
2013-08-03 15:31 ` Tom Rini
0 siblings, 1 reply; 15+ messages in thread
From: Albert ARIBAUD @ 2013-08-03 14:11 UTC (permalink / raw)
To: u-boot
Hi Tom,
On Fri, 2 Aug 2013 20:32:03 -0400, Tom Rini <trini@ti.com> wrote:
> On Fri, Aug 02, 2013 at 04:23:37PM -0600, Stephen Warren wrote:
> > On 07/24/2013 11:09 AM, Stephen Warren wrote:
> > > From: Stephen Warren <swarren@nvidia.com>
> > >
> > > 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?
I am fine with this as long as this is documented.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough
2013-08-03 14:11 ` Albert ARIBAUD
@ 2013-08-03 15:31 ` Tom Rini
0 siblings, 0 replies; 15+ messages in thread
From: Tom Rini @ 2013-08-03 15:31 UTC (permalink / raw)
To: u-boot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/03/2013 10:11 AM, Albert ARIBAUD wrote:
> Hi Tom,
>
> On Fri, 2 Aug 2013 20:32:03 -0400, Tom Rini <trini@ti.com> wrote:
>
>> On Fri, Aug 02, 2013 at 04:23:37PM -0600, Stephen Warren wrote:
>>> On 07/24/2013 11:09 AM, Stephen Warren wrote:
>>>> From: Stephen Warren <swarren@nvidia.com>
>>>>
>>>> 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?
>
> 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-----
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH V2 REPOST 2/9] xilinx: move microblaze-generic .dts to standard location
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough Stephen Warren
@ 2013-07-24 17:09 ` Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 3/9] dts/Makefile: simplify dtc invocation Stephen Warren
` (7 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Stephen Warren @ 2013-07-24 17:09 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
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.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <monstr@monstr.eu>
---
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
diff --git a/board/xilinx/dts/microblaze-generic.dts b/board/xilinx/dts/microblaze-generic.dts
new file mode 100644
index 0000000..2033309
--- /dev/null
+++ b/board/xilinx/dts/microblaze-generic.dts
@@ -0,0 +1,7 @@
+/dts-v1/;
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ aliases {
+ } ;
+} ;
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
diff --git a/board/xilinx/microblaze-generic/dts/microblaze.dts b/board/xilinx/microblaze-generic/dts/microblaze.dts
deleted file mode 100644
index 2033309..0000000
--- a/board/xilinx/microblaze-generic/dts/microblaze.dts
+++ /dev/null
@@ -1,7 +0,0 @@
-/dts-v1/;
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- aliases {
- } ;
-} ;
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 17f53ba..ad91d21 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -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
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH V2 REPOST 3/9] dts/Makefile: simplify dtc invocation
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 2/9] xilinx: move microblaze-generic .dts to standard location Stephen Warren
@ 2013-07-24 17:09 ` Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 4/9] dts/Makefile: unify cpp/dtc include paths Stephen Warren
` (6 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Stephen Warren @ 2013-07-24 17:09 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
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.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
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(-)
diff --git a/.gitignore b/.gitignore
index 771b860..43e957a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,6 +16,7 @@
*.patch
*.bin
*.cfgtmp
+*.dts.tmp
# Build tree
/build-*
diff --git a/dts/Makefile b/dts/Makefile
index 03e163e..722cc37 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -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'
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH V2 REPOST 4/9] dts/Makefile: unify cpp/dtc include paths
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
` (2 preceding siblings ...)
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 3/9] dts/Makefile: simplify dtc invocation Stephen Warren
@ 2013-07-24 17:09 ` Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 5/9] dt: don't use ARCH_CPU_DTS Stephen Warren
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Stephen Warren @ 2013-07-24 17:09 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
*.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.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
dts/Makefile | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dts/Makefile b/dts/Makefile
index 722cc37..ce774e0 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -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'
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH V2 REPOST 5/9] dt: don't use ARCH_CPU_DTS
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
` (3 preceding siblings ...)
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 4/9] dts/Makefile: unify cpp/dtc include paths Stephen Warren
@ 2013-07-24 17:09 ` Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 6/9] dts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS Stephen Warren
` (4 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Stephen Warren @ 2013-07-24 17:09 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
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.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
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(-)
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";
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH V2 REPOST 6/9] dts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
` (4 preceding siblings ...)
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 5/9] dt: don't use ARCH_CPU_DTS Stephen Warren
@ 2013-07-24 17:09 ` Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 7/9] config: don't define CONFIG_ARCH_DEVICE_TREE Stephen Warren
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Stephen Warren @ 2013-07-24 17:09 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
Now that nothing uses the defines ARCH_CPU_DTS, BOARD_DTS, stop defining
them.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
dts/Makefile | 7 -------
1 file changed, 7 deletions(-)
diff --git a/dts/Makefile b/dts/Makefile
index ce774e0..42ba42f 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -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 \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH V2 REPOST 7/9] config: don't define CONFIG_ARCH_DEVICE_TREE
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
` (5 preceding siblings ...)
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 6/9] dts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS Stephen Warren
@ 2013-07-24 17:09 ` Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 8/9] dts/Makefile: don't use cpp -P Stephen Warren
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Stephen Warren @ 2013-07-24 17:09 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
Now that nothing uses CONFIG_ARCH_DEVICE_TREE, stop defining it.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
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
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 6432e75..0000000
--- a/arch/arm/cpu/armv7/tegra20/config.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# (C) Copyright 2010,2011
-# NVIDIA Corporation <www.nvidia.com>
-#
-# (C) Copyright 2002
-# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
-#
-# 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
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 b4935f0..aca79e2 100644
--- a/arch/microblaze/config.mk
+++ b/arch/microblaze/config.mk
@@ -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
diff --git a/arch/x86/cpu/coreboot/config.mk b/arch/x86/cpu/coreboot/config.mk
deleted file mode 100644
index 4858fc3..0000000
--- a/arch/x86/cpu/coreboot/config.mk
+++ /dev/null
@@ -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
diff --git a/doc/README.fdt-control b/doc/README.fdt-control
index 95a88a7..8512beb 100644
--- a/doc/README.fdt-control
+++ b/doc/README.fdt-control
@@ -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).
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index 582c584..0fd61a3 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -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.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH V2 REPOST 8/9] dts/Makefile: don't use cpp -P
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
` (6 preceding siblings ...)
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 7/9] config: don't define CONFIG_ARCH_DEVICE_TREE Stephen Warren
@ 2013-07-24 17:09 ` Stephen Warren
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 9/9] dts/Makefile: pass -undef -D__DTS__ to cpp Stephen Warren
2013-08-03 19:30 ` [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Tom Rini
9 siblings, 0 replies; 15+ messages in thread
From: Stephen Warren @ 2013-07-24 17:09 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
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 <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
dts/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dts/Makefile b/dts/Makefile
index 42ba42f..805d2cc 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -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 = \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH V2 REPOST 9/9] dts/Makefile: pass -undef -D__DTS__ to cpp
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
` (7 preceding siblings ...)
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 8/9] dts/Makefile: don't use cpp -P Stephen Warren
@ 2013-07-24 17:09 ` Stephen Warren
2013-08-03 19:30 ` [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Tom Rini
9 siblings, 0 replies; 15+ messages in thread
From: Stephen Warren @ 2013-07-24 17:09 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
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 <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
dts/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dts/Makefile b/dts/Makefile
index 805d2cc..b125bd3 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -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 \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify
2013-07-24 17:09 [U-Boot] [PATCH V2 REPOST 0/9] rely on latest dtc, simplify Stephen Warren
` (8 preceding siblings ...)
2013-07-24 17:09 ` [U-Boot] [PATCH V2 REPOST 9/9] dts/Makefile: pass -undef -D__DTS__ to cpp Stephen Warren
@ 2013-08-03 19:30 ` Tom Rini
9 siblings, 0 replies; 15+ messages in thread
From: Tom Rini @ 2013-08-03 19:30 UTC (permalink / raw)
To: u-boot
On Wed, Jul 24, 2013 at 10:09:15AM -0700, Stephen Warren wrote:
> 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
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 15+ messages in thread