summaryrefslogtreecommitdiff
path: root/Makefile.dtc
Commit message (Collapse)AuthorAgeFilesLines
* Implement and use an xstrdup() functionJon Loeliger2008-10-031-2/+11
| | | | | | | | | | | | | | | | Many places in dtc use strdup(), but none of them actually check the return value to see if the implied allocation succeeded. This is a potential bug, which we fix in the patch below by replacing strdup() with an xstrdup() which in analogy to xmalloc() will quit with a fatal error if the allocation fails. I felt the introduciton of util.[ch] was a better choice for utility oriented code than directly using srcpos.c for the new string function. This patch is a re-factoring of Dave Gibson's similar patch. Signed-off-by: Jon Loeliger <jdl@freescale.com>
* dtc: Clean up included Makefile fragmentsDavid Gibson2008-05-191-17/+1
| | | | | | | | | | | | | | | | | | | Currently the Makefile.dtc and Makefile.libfdt fragments include a number of things that seemed like they might be useful for other projects embedding the pieces, or for a make dist target. Well, we have no make dist target, it's become fairly unclear that these things would actually be useful to embedders (the kernel certainly doesn't use them), and it's a bunch of stuff with no current users. This patch, therefore, removes a bunch of unused definitions from the Makefile fragments. It also removes a dependency declared in Makefile.libfdt (of libfdt.a on the constituent .o files) which was incorrect (wrong path), and if corrected would be redundant with the similar dependency in the top-level makefile. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* dtc: Move tree checking code to checks.cDavid Gibson2007-11-011-1/+2
| | | | | | | | | | This patch moves the dtc code for checking the device tree its processing into a new checks.c. The tree accessor functions from livetree.c which the checks use are exported and added to dtc.h. Another small step towards a flexible checking architecture. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* dtc: Refactor MakefilesDavid Gibson2007-10-151-0/+24
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>