summaryrefslogtreecommitdiff
path: root/usr.bin/dtc
Commit message (Collapse)AuthorAgeFilesLines
* Fix build issue with clang 8.0.1Leandro Lupori2019-05-101-0/+1
| | | | | | | The algorithm header is needed to use std::remove_if Notes: svn path=/head/; revision=347445
* Rework CXXSTD setting via r345708Enji Cooper2019-04-221-0/+2
| | | | | | | | | | | | | | | | | | This change allows the user to once again override the C++ standard, restoring high-level pre-r345708 behavior. This also unbreaks building lib/ofed/libibnetdisc/Makefile with a non-C++11 capable compiler, e.g., g++ 4.2.1, as the library supported being built with older C++ standards. MFC after: 2 weeks MFC with: r345708 Reviewed by: emaste Reported by: jbeich Differential Revision: https://reviews.freebsd.org/D19895 (as part of a larger change) Notes: svn path=/head/; revision=346574
* dtc(1): Pull in fix for segfault-upon-error conditionKyle Evans2019-04-211-1/+4
| | | | | | | | | | | Specifically, parse errors within a node would lead to a segfault due to an unconditional dereference after emitting the error. Obtained from: https://github.com/davidchisnall/dtc/commit/e5ecf9319fd3f MFC after: 3 days Notes: svn path=/head/; revision=346469
* Standardize `-std=c++* as `CXXSTD`Enji Cooper2019-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CXXSTD was added as the C++ analogue to CSTD. CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`, otherwise for older versions of g++. This change standardizes the CXXSTD variable, originally added to googletest.test.inc.mk as part of r345203. As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`. Notes: This value is not sanity checked in bsd.sys.mk, however, given the two most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is likely to work with both toolchains. This method will be refined in the future to support more variants of C++, as not all versions of clang++ and g++ (for instance) support C++14, C++17, etc. Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD. Example: Before this commit: ``` CXXFLAGS+= -std=c++14 ``` After this commit: ``` CXXSTD= c++14 ``` Reviewed by: asomers Approved by: emaste (mentor) MFC after: 1 month MFC with: r345203, r345704, r345705 Relnotes: yes Tested with: make tinderbox Differential Revision: https://reviews.freebsd.org/D19732 Notes: svn path=/head/; revision=345708
* Revert r345706: the third time will be the charmEnji Cooper2019-03-291-1/+1
| | | | | | | | | | | | | | | | When a review is closed via Phabricator it updates the patch attached to the review. I downloaded the raw patch from Phabricator, applied it, and repeated my mistake from r345704 by accident mixing content from D19732 and D19738. For my own personal sanity, I will try not to mix reviews like this in the future. MFC after: 1 month MFC with: r345706 Approved by: emaste (mentor, implicit) Notes: svn path=/head/; revision=345707
* Standardize `-std=c++* as `CXXSTD`Enji Cooper2019-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CXXSTD was added as the C++ analogue to CSTD. CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`, otherwise for older versions of g++. This change standardizes the CXXSTD variable, originally added to googletest.test.inc.mk as part of r345203. As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`. Notes: This value is not sanity checked in bsd.sys.mk, however, given the two most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is likely to work with both toolchains. This method will be refined in the future to support more variants of C++, as not all versions of clang++ and g++ (for instance) support C++14, C++17, etc. Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD. Example: Before this commit: ``` CXXFLAGS+= -std=c++14 ``` After this commit: ``` CXXSTD= c++14 ``` Reviewed by: asomers Approved by: emaste (mentor) MFC after: 1 month MFC with: r345203, r345704, r345705 Relnotes: yes Tested with: make tinderbox Differential Revision: https://reviews.freebsd.org/D19732 Notes: svn path=/head/; revision=345706
* Revert r345704Enji Cooper2019-03-291-1/+1
| | | | | | | | | | | | I accidentally committed code from two reviews. I will reintroduce the code to bsd.progs.mk as part of a separate commit from r345704. Approved by: emaste (mentor, implicit) MFC after: 2 months MFC with: r345704 Notes: svn path=/head/; revision=345705
* CXXSTD is the C++ analogue to CSTD.Enji Cooper2019-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`, otherwise for older versions of g++. This change standardizes the CXXSTD variable, originally added to googletest.test.inc.mk as part of r345203. As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`. Notes: This value is not sanity checked in bsd.sys.mk, however, given the two most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is likely to work with both toolchains. This method will be refined in the future to support more variants of C++, as not all versions of clang++ and g++ (for instance) support C++14, C++17, etc. Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD. Example: Before this commit: ``` CXXFLAGS+= -std=c++14 ``` After this commit: ``` CXXSTD= c++14 ``` Reviewed by: asomers Approved by: emaste (mentor) MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D19732 Notes: svn path=/head/; revision=345704
* dtc(1): Update to 1a79f5f26631Kyle Evans2019-03-288-47/+299
| | | | | | | | | | | | | | | | Highlights: - Bugfix for order in which /delete-node/ and /delete-property/ are processed [0] - /omit-if-no-ref/ support has been added (used only by U-Boot at this point, in theory) - GPL dtc compat version bumped to 1.4.7 - Various small fixes and compatibility improvements Reported by: strejda [0] MFC after: 1 week Notes: svn path=/head/; revision=345628
* dtc(1): Update to 0892ec7; HACKING and implicit header fixesKyle Evans2018-08-233-2/+6
| | | | | | | | | | | | Fixes courtesy of arichardson and jmg: - HACKING was pointing to the wrong place - Added headers were being relied on implicitly, but libstdc++ did not comply with the unspoken wishes of dtc. MFC after: 1 week Notes: svn path=/head/; revision=338232
* minor grammar nit, to what? between them..John-Mark Gurney2018-08-211-1/+1
| | | | Notes: svn path=/head/; revision=338140
* dtc(1): Update to 97d2d5715eeb45108cc60367fdf6bd5b2046b050Kyle Evans2018-08-172-94/+104
| | | | | | | | | | | | | | Notable fixes: - Overlays may now be generated properly without -@ - /__local_fixups__ were not including unit address in their structure - The error reporting a magic token was misleading, reporting "Bad magic token in header. Got d00dfeed expected 0xd00dfeed" if the token was missing. This has been split out into a separate message. MFC after: 1 week Notes: svn path=/head/; revision=337964
* dtc(1): Update to upstream 006664aKyle Evans2018-04-134-19/+107
| | | | | | | | | | | | | | | | | | | | | | | Highlights: - Passing "-" to -o will now cause output to go to stdout - Path-based syntactic sugar for overlays is now accepted. This looks like: /dts-v1/; /plugin/; &{/soc} { sid: eeprom@1c14000 { compatible = "allwinner,sun8i-h3-sid"; reg = <0x1c14000 0x400>; status = "okay"; }; }; MFC after: 3 days Notes: svn path=/head/; revision=332483
* dtc(1): Revert WARNS change from r328173Kyle Evans2018-01-311-0/+2
| | | | | | | | | | WARNS > 3 breaks xtoolchain builds to varying degrees. Revert it. Reported by: lwhsu, jhb MFC after: 3 days Notes: svn path=/head/; revision=328641
* dtc(1): Update to upstream ea3c233Kyle Evans2018-01-197-80/+439
| | | | | | | | | | | | | | | | | | | | | | | | | | Highlights of this update: - /__local_fixups__ is now generated to be GPL dtc and libfdt compliant - Compiling with -@ will now cause dtc to assign phandles to all labelled nodes - /include/ and /incbin/ now handle absolute paths correctly - The manpage now has information about overlays, including how to apply them and how to generate them - Syntactic sugar for overlays is now supported, allowing an overlay DTS like: = /dts-v1/; /plugin/; &foo { foo,status = "okay"; }; = to generate a fragment targetting <&foo>. Notes: svn path=/head/; revision=328173
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2711-0/+22
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* dtc: Update to upstream 9ce35ff8Emmanuel Vadot2017-06-232-3/+8
| | | | | | | | | | - Add "compatible with gpl dtc X.Y.Z" to version output so U-Boot doesn't complain - Fix cross reference node This fixes some Allwinner DTS (and probably others). Notes: svn path=/head/; revision=320296
* dtc: Update to upstream 917526Emmanuel Vadot2017-06-201-1/+1
| | | | | | | - Add missing "typename" in divmod's "using" of binary_operator_base::result. Notes: svn path=/head/; revision=320160
* dtc: update to upstream 227d6a3Ed Maste2017-04-178-63/+287
| | | | | | | | | | | - Report missing includes at the correct location. - Add initial support for the -@ option emitting a symbol table. - Add support for running tests with and without -@ - Add support for generating __fixups__ and __local_fixups__ - Attach the to-string transform to the node path. Notes: svn path=/head/; revision=317060
* dtc: remove unused (since r306806) string.hhEd Maste2017-04-171-164/+0
| | | | Notes: svn path=/head/; revision=317058
* Fix build of BSD dtc when NDEBUG is defined (MK_ASSERT_DEBUG=no):Dimitry Andric2017-02-131-1/+3
| | | | | | | | | | | | * Initialize correct parent in binary_operator's constructor. * Include <errno.h> explicitly, otherwise errno is undefined (without NDEBUG, this is accidentally 'fixed' by including <iostream>). Reported by: matteo MFC after: 3 days Notes: svn path=/head/; revision=313709
* fdt: Expect strchr() to return a const char*Raphael Kubo da Costa2016-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | In C, strchr(3) returns a char*, whereas C++ defines two overloads: * const char *strchr(const char*, int) * char *strchr(char*, int) Building fdt.cc (with the WITHOUT_GPL_DTC knob set) with libc++ 3.9.0 (imported in r309124) was failing because libc++ r260377 added the first overload to string.h, leading to failures such as: fdt.cc:1638:8: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' Just define val as a const char* to fix it. Upstreamed in https://github.com/davidchisnall/dtc/pull/14 Reviewed by: emaste Approved by: emaste Notes: svn path=/head/; revision=309191
* Improvements to BSD-licensed DTC.Ed Maste2016-10-0712-735/+1373
| | | | | | | | | | | | | | | | | | - Numerous crash and bug fixes - Improved warning and error messages - Permit multiple labels on nodes and properties - Fix node@address references - Add support for /delete-node/ - Consume whitespace after a node - Read the next token before the second /memreserve/ - Fix parsing of whitespace - Clean up /delete-node/ and add support for /delete-property/ - Handle /delete-node/ specifying a unit address Obtained from: https://github.com/davidchisnall/dtc @df5ede4 Notes: svn path=/head/; revision=306806
* Improvements to BSD-licensed DTC.David Chisnall2015-12-298-136/+792
| | | | | | | | | | - Added an expression parser so that expressions from headers are now working - Fixed missing null terminators on cross references - Disabled exceptions / RTTI in the build for smaller binaries - Changed phandle order generation to be identical to GPL'd dtc Notes: svn path=/head/; revision=292876
* META MODE: Update dependencies with 'the-lot' and add missing directories.Bryan Drewery2015-12-011-0/+21
| | | | | | | | | | | | | | | | | This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291563
* Update some obsolete information in the HACKING document.David Chisnall2015-10-261-13/+11
| | | | | | | Reported by: bapt Notes: svn path=/head/; revision=289996
* Ensure that dtc is built in C++11 mode.David Chisnall2015-10-261-0/+2
| | | | | | | Reported by: George Abdelmalik Notes: svn path=/head/; revision=289995
* Lots of improvements to the BSD-licensed dtcDavid Chisnall2015-10-259-352/+509
| | | | | | | | | | | | | - Various fixes to includes (including recursive includes) - Lots of testing that the output exactly matches GPL'd dtc - Lots of bug fixes to merging - Fix incorrect mmap usage - Ad-hoc memory management replaced with C++11 unique_ptr and similar Patrick Wildt has successfully run many (all?) of the GPL dtc test suite. Notes: svn path=/head/; revision=289935
* Fix a ton of speelling errorsEitan Adler2015-10-211-1/+1
| | | | | | | | | | arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337 Notes: svn path=/head/; revision=289677
* dtc: ignore lines starting with #.Rui Paulo2014-06-101-4/+5
| | | | | | | | This is necessary because we use the C pre-processor to parse #include lines and cpp adds line markings that start with #. Notes: svn path=/head/; revision=267318
* dtc: don't crash if the argument is a directory.Rui Paulo2014-06-101-0/+9
| | | | Notes: svn path=/head/; revision=267317
* The, currently undocumented, -i option takes an argument.Rui Paulo2014-06-101-1/+1
| | | | Notes: svn path=/head/; revision=267316
* Fix cut-and-paste error message.Warner Losh2014-03-151-1/+1
| | | | Notes: svn path=/head/; revision=263199
* Fix parsing multiple roots with whitespace between them.David Chisnall2014-02-231-0/+1
| | | | | | | Patch by: Patrick Wildt Notes: svn path=/head/; revision=262394
* Some more cleanups and bug fixes in dtc for property printing / parsing.David Chisnall2013-12-121-2/+7
| | | | | | | Submitted by: Patrick Wildt Notes: svn path=/head/; revision=259250
* Fix the version string in dts emission.David Chisnall2013-12-121-1/+1
| | | | | | | | Reported by: Patrick Wildt MFC after: 1 week Notes: svn path=/head/; revision=259249
* When writing DTS to a file, don't write some of it to stderr.David Chisnall2013-11-051-1/+1
| | | | | | | Reported by: ray Notes: svn path=/head/; revision=257703
* Remove EOL whitespace.Joel Dahl2013-08-221-2/+2
| | | | Notes: svn path=/head/; revision=254659
* Add support for parameterised device tree sources to the device tree compiler.David Chisnall2013-08-194-18/+145
| | | | | | | | Reviewed by: brooks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=254522
* Make carets line up in dtc diagnostics if the line starts with a tab.David Chisnall2013-08-141-1/+2
| | | | Notes: svn path=/head/; revision=254327
* Report error for out-of-range numerical inputs. Requested by brooks.David Chisnall2013-07-101-0/+8
| | | | Notes: svn path=/head/; revision=253149
* Fix bug in destructor for checker manager in DTC that caused segfaults onDavid Chisnall2013-06-181-0/+1
| | | | | | | exit. Notes: svn path=/head/; revision=251934
* Add a checker to dtc, based on a feature request from rwatson / brooks.David Chisnall2013-06-172-0/+58
| | | | | | | | | | This checks that every node that has children specifies their register sizes. This is not enabled by default, as the default sizes are sometimes required (including by some DTS in the tree), but can help when writing new device trees so that you can check that you actually meant the defaults. Notes: svn path=/head/; revision=251856
* dtc: fix bootstrapping from 8.2-STABLEUlrich Spörlein2013-02-191-0/+4
| | | | | | | | MFC after: 1 week Approved by: theraven Notes: svn path=/head/; revision=247006
* Fix style nit in dtc man page: sentences should start on new lines.David Chisnall2013-01-251-58/+86
| | | | | | | Reported By: joel Notes: svn path=/head/; revision=245901
* Explicitly include headers that are implicitly included by libstdc++. FixesDavid Chisnall2013-01-236-4/+24
| | | | | | | building dtc with libc++. Notes: svn path=/head/; revision=245839
* Remove EOL whitespace.Joel Dahl2013-01-221-11/+11
| | | | Notes: svn path=/head/; revision=245816
* Minor mdoc fixes.Joel Dahl2013-01-221-4/+2
| | | | Notes: svn path=/head/; revision=245815
* Fix the missing sentence that ended in the middle in the man page for dtc (alsoDavid Chisnall2013-01-221-1/+4
| | | | | | | spotted by gavin). Notes: svn path=/head/; revision=245809