Commit Graph

30 Commits (d8b69426662f29f0cdaf67d380a0b366ba420abd)

Author SHA1 Message Date
Jon Loeliger 202863e4dd Tag Version 1.1.0
Signed-off-by: Jon Loeliger <jdl@jdl.com>
2008-01-24 10:16:07 -06:00
Jon Loeliger 7364cc79b5 Tag Version 1.1.0-rc1
Signed-off-by: Jon Loeliger <jdl@jdl.com>
2008-01-10 09:09:44 -06:00
David Gibson d6f9b62fe1 dtc: Don't build tests as part of "all"
Currently "make all" for dtc will build (but not run) the testcase
binaries.  This is a problem for cross compiles, because building the
tests will attempt to run the dumptrees utility on the host system,
which won't work if it's cross-compiled of course.

Although it would be possible to separately build host binaries,
there's not a lot of value in doing so since we don't have a facility
for cross-executing the testsuite anyway.

Therefore, remove the tests from the "all" target.  It will still, of
course, be build as a prerequisite to "make check" which will run the
testsuite.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-17 07:41:13 -06:00
David Gibson d6060bd231 dtc: Remove space from flex command line
Author: Geoff Levand <geoffrey.levand@am.sony.com>

Apparently some versions of flex don't correctly parse the -o
parameter, if there's a space between the -o and its argument.  So,
this patch removes it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-06 09:14:12 -06:00
David Gibson f6588bc32f dtc: Add missing dependencies for tests
At present, the Makefiles will not rebuild trees.o or the dtb files
derived from it if testdata.h is updated.  This is incorrect, and is
because of missing dependency information.

This patch fixes the problem by making sure that dependency
information is generated from trees.S and dumptrees.c.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-13 07:33:01 -06:00
Emil Medve e0f2989809 dtc: Fix the install target
/usr/bin/install: cannot stat `fdt.h': No such file or directory
/usr/bin/install: cannot stat `libfdt.h': No such file or directory

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-05 08:48:42 -06:00
David Gibson bf141b96cd dtc: Don't include libfdt in global LDFLAGS
Remove the uneccessary LDFLAGS from the top-level makefile.  It only
added libfdt/ to the link path.  dtc doesn't need libfdt at all, and
the testcases which do, already link libfdt.a by explicit path.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-05 08:40:52 -06:00
Jon Loeliger 7b3fb789d2 DTC: Remove the need for the GLR Parser.
Previously, there were a few shift/reduce and reduce/reduce
errors in the grammar that were being handled by the not-so-popular
GLR Parser technique.

Flip a right-recursive stack-abusing rule into a left-recursive
stack-friendly rule and clear up three messes in one shot: No more
conflicts, no need for the GLR parser, and friendlier stackness.
Compensate by reversing the property list on the node.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-10-25 11:13:29 -05:00
Jon Loeliger 9e32930ebc Restore warning message about bison expected output.
It was dropped in ad9593f229.

Signed-off-by: Jon Loeliger <jdl@jdl.com>
2007-10-16 07:36:30 -05:00
David Gibson ad9593f229 dtc: Refactor Makefiles
This patch makes a number of Makefile cleanups and improvements:
	- We use more generic rules to invoke flex and bison, which is
useful for some of the other changes.
	- We use the name dtc-lexer.lex.c for the flex output, instead
of the default lex.yy.c.  That means less potential for confusion if
dtc is embedded into other projects (e.g. the kernel).
	- We separate out a Makefile.dtc designed for embedding into
other projects, analagous to Makefile.libfdt.
	- Makefile.libfdt is cleaned up to be more useful based on
some actual trial runs of embedding libfdt in the kernel bootwrapper.
	- Versioning related rules and variables are collected into
one place in the Makefile.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-10-15 08:28:07 -05:00
David Gibson 63dc9c7113 dtc: Whitespace cleanup
This large patch removes all trailing whitespace from dtc (including
libfdt, the testsuite and documentation).  It also removes a handful
of redundant blank lines (at the end of functions, or when there are
two blank lines together for no particular reason).

As well as anything else, this means that quilt won't whinge when I go
to convert the whole of libfdt into a patch to apply to the kernel.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-09-18 09:43:26 -05:00
David Gibson bf94497031 dtc: Optimise by default, fix warnings thus uncovered
This patch turns on optimisation in the Makefile by default.  With the
optimizer on, some uninitialized variable warnings (one real, two
bogus) are now generated.  This patch also squashes those again.
2007-08-31 08:34:18 -05:00
David Gibson ed0117a0c0 dtc: Make make print a message when linking testcases
Currently, dtc relies on make's implicit rule to build the testcases.
This means that when not making verbosely (V=0, the default) there is
no message at all while relinking the testsuites.  This can be very
confusing when updating libfdt.a (upon which the testcases depend) and
make appears to do nothing.

This patch corrects the situation, borrowing the rule used to link dtc
itself to link all the testcases as well.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-08-31 08:34:15 -05:00
Jon Loeliger 5cb1fbdd7c DTC 1.0.0
For better or worse, it's about damned time!

Signed-off-by: Jon Loeliger <jdl@jdl.com>
2007-08-09 19:31:32 -05:00
Jon Loeliger 74ce242bf3 Make release 1.0.0-rc1!
Signed-off-by: Jon Loeliger
2007-07-25 10:53:42 -05:00
David Gibson 4f61ae1627 dtc: Improve the make install target
This patch makes various improvements to dtc's make install target:
	- libfdt is also installed.  Specifically, libfdt.a and the
two export relevant header files, fdt.h and libfdt.h are installed.
	- ftdump is no longer installed.  It was only ever a
development debugging tool and may well go away at some point.
	- In keeping with normal conventions, there is now a PREFIX
variable, allowing control of where things are installed (in /usr,
/usr/local, /opt, etc.).
	- By default, installed into the user's home directory,
instead of /usr.  This is friendlier for self-installers, package
builders can easily override PREFIX to restore the old behaviour.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-07-25 10:26:36 -05:00
Jon Loeliger fdd2e6f945 Reorganized Makefile into better top-down structure.
Also removed a generic "LD" target that wasn't actually used.

Signed-off-by: Jon Loeliger <jdl@jdl.com>
2007-07-07 14:18:02 -05:00
Jon Loeliger a657ce8fb7 Add DTC release version information.
Adopted the version information and implementation
from of the Linux Kernel Makefiles.

Signed-off-by: Jon Loeliger <jdl@jdl.com>
2007-07-07 13:52:25 -05:00
Jon Loeliger 74e6d21284 Add a note to the build about the expected parser warnings.
Signed-off-by: Jon Loeliger
2007-07-07 10:38:27 -05:00
Josh Boyer 8cd4196ee3 dtc: Add install makefile target
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-07-02 08:44:37 -05:00
David Gibson d9d679fb96 dtc: Improve and better integrate dtc and libfdt Makefiles
This patch substantially revamps the dtc Makefiles, in particular
better integrating the Makefile for dtc proper with the Makefiles
imported from libfdt for libfdt and the shared testsuite.  Notable
changes:
	- No recursive make calls.  Instead subsidiary Makefiles are
included into the top-level Makefile so we get a complete dependency
information.
	- Common pattern rules, CFLAGS etc. shared between dtc, libfdt
and testsuite, rather than separate copies.
	- Vaguely Kbuild-like non-verbose mode used by default, which
makes warnings more prominent.
	- libfdt Makefile consists only of variable definitions and
helper rules, to make it more easily embeddable into other Makefile
systems.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-06-25 21:50:14 -05:00
David Gibson 12578976fe Merge libfdt into dtc.
Having pulled the libfdt repository into dtc, merge the makefiles and
testsuites so that they build together usefully.
2007-06-14 15:05:55 +10:00
Jon Loeliger e45e6fd274 DTC: Add support for a C-like #include "file" mechanism.
Keeps track of open files in a stack, and assigns
a filenum to source positions for each lexical token.
Modified error reporting to show source file as well.
No policy on file directory basis has been decided.
Still handles stdin.

Tested on all arch/powerpc/boot/dts DTS files

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-03-26 08:36:07 -05:00
David Gibson b299ac76a7 Get rid of libdt.c
libdt.c was an attempt at creating a device tree handling library
within the dtc codebase.  However, it was never even close to
completion, and is entirely obsoleted by it's spiritual descendent,
libfdt (currently a separate package).  This patch, therefore, removes
libdt.c entirely, along with its only reference in the Makefile, an
unused variable.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-03-14 15:36:42 -05:00
David Gibson b2543fc875 Add ftdump utility, contributed by Pantelis Antoniou. 2005-08-29 14:58:27 +10:00
David Gibson f0517db250 Support for specifying memreserve ranges in the source format, based on
a patch by Jon Loeliger <jdl AT freescale.com>, although tweaked
substantially.
2005-07-15 17:14:24 +10:00
David Gibson 1cb934b3aa Add automatic dependency generation. 2005-07-11 16:29:25 +10:00
David Gibson ab870cadb4 First cut at a "libdt" set of routines for extracting things from the
flattened tree.  Could be used in firmware.
2005-06-23 15:45:13 +10:00
David Gibson 4102d840d9 Initial label support. Also switch to glr-parser mode and get rid of
hacks that were necessary without it.
2005-06-16 14:36:37 +10:00
David Gibson fc14dad769 Initial commit 2005-06-08 17:18:34 +10:00