aboutsummaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2019-03-06Bump version to v1.5.0v1.5.0David Gibson1-2/+2
We've accumulated several new features as well as a number of bugfixes, so prepare for another release. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-23Remove broken objdir / srcdir supportDavid Gibson1-14/+12
The dtc makefiles have support for building into a separate directory from the sources... except that it's broken and probably always has been. Remove the pretense. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-23Refine pylibfdt_clean targetDavid Gibson1-4/+0
Move it to the subdir Makefile, generalize some of the patterns, remove the 'build' directory made by setup.py and __pycache__ directory made by Python3. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-23Refine libfdt_clean targetDavid Gibson1-5/+0
Move it to the libfdt Makefile piece, use neater make syntax, and remove redundant command (already included in STD_CLEANFILES). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-23pylibfdt: Allow switch to Python 3 via environment variable PYTHONLumir Balhar1-1/+2
Python 2 is still the default but it can be changed by setting environment variable PYTHON before build/test. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-09-13Add support for YAML encoded outputGrant Likely1-1/+8
YAML encoded DT is useful for validation of DTs using binding schemas. The YAML encoding is an intermediate format used for validation and is therefore subject to change as needed. The YAML output is dependent on DTS input with type information preserved. Signed-off-by: Grant Likely <grant.likely@arm.com> [robh: make YAML support optional, build fixes, Travis CI test, preserve type information in paths and phandles] Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-09-10Make valgrind optionalDavid Gibson1-0/+7
Some platforms don't have valgrind support, and sometimes you simply might not want to use valgrind. But at present, dtc, or more specifically its testsuite, won't compile without valgrind because we use the valgrind client interface in some places to improve our testing and suppress false positives. This adds some Makefile detection to correctly handle the case where valgrind is not available. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-23dtc: Bump version to v1.4.7v1.4.7David Gibson1-1/+1
We've accumulated a bunch of bugfixes, including considerable improvements to libfdt's memory safety, so get ready for another release. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-01-08Avoid installing pylibfdt when dependencies are missingSimon Glass1-8/+16
At present we have a build check that python-dev and swig are available. If they are not, we print a message and skip building pylibfdt. However this check is not currently present with 'make install'. The install is attempted, and fails. See crbug.com/789189 Split the check out into a separate script and use it twice, once for the build and once for the install. This corrects the error. Reported-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-01-04Makefile: Split INSTALL out into INSTALL_{PROGRAM,LIB,DATA,SCRIPT}kevans@FreeBSD.org1-4/+9
For adoption into systems that may have additional arguments to be passed into install(1) upon install, split out INSTALL into the different types of files to be installed and use them appropriately. This allows, for instance, passing -s to strip binaries and libs while not botching directory installs or data/script installations. Signed-off-by: Kyle Evans <kevans@FreeBSD.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-01-03dtc: Bump version to v1.4.6v1.4.6David Gibson1-1/+1
We've accumulated a number of bugfixes since v1.4.5, so prepare for another release. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-09-27dtc: Bump version to v1.4.5v1.4.5David Gibson1-1/+1
Preparing for another release. No particular trigger for this, just a number of accumulated enhancements since v1.4.4. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-09-27pylibfdt: Use Python2 explicitlyDavid Gibson1-1/+1
The pylibfdt code is written for Python2, not Python3. So, it's safer to explicitly request Python2 in our scripts and when checking pkg-config. On Arch Linux at least, there isn't actually a plain "python" link, just "python2" and "python3", so the current setup won't work at all. According to https://www.python.org/dev/peps/pep-0394/ using "python2" should work, and is preferred. Updating pylibfdt to work with Python3 would be nice, but is a problem for another day. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-06-15fdtoverlay: A tool that applies overlaysPantelis Antoniou1-0/+5
Since libfdt support overlay application on FDT blobs, provide a command line tool that applies an arbitrary number of overlays, one after another to a base fdt blob and output the result in the given file. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-05-20Makefile: Fix build on MSYS2 and CygwinCufi, Carles1-1/+5
The host compiler on MSYS2 and Cygwin does not allow the -fPIC option, issuing a warning that is treated as an error and stops the build. Detect whether we're running under MSYS2 or Cygwin and avoid adding -fPIC to prevent the error from happening. Tested on Linux, MSYS2 and Cygwin. Signed-off-by: Carles Cufi <carles.cufi@gmail.com> [dwg: Added explicit empty CFLAGS for clarity] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-05-19Clean up shared library compile/link optionsDavid Gibson1-6/+8
- Allow overriding of shared library compile time flags for platforms whic need it - Include -fPIC in the link flags variable instead of including it raw in the target rule - Cosmetic formatting tweaks Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-04-08pylibfdt: Use Makefile constructs to implement NO_PYTHONSimon Glass1-3/+12
The current mechanism uses a shell construct, but it seems better to use a Makefile approach. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-04-08pylibfdt: Allow setup.py to operate stand-aloneSimon Glass1-0/+1
At present we require that setup.py is executed from the Makefile, which sets up various important things like the list of files to build and the version number. However many installation systems expect to be able to change to the directory containing setup.py and run it. This allows them to support (for example) building/installing for multiple Python versions, varying installation paths, particular C flags, etc. The problem in implementing this is that we don't want to duplicate the information in the Makefile. A common solution (so I am told) is to parse the Makefile to obtain the required information. Update the setup.py script to read a few Makefiles when it does not see the required information in its environment. This allows installation using: ./pylibfdt/setup.py install Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-29pylibfdt: Enable installation of Python moduleSimon Glass1-1/+1
Adjust the setup script to support installation, and call it from the Makefile if enabled. It will be disabled if we were unable to build the module (e.g. due to swig being missing), or the NO_PYTHON environment variable is set. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-29pylibfdt: Allow building to be disabledSimon Glass1-0/+1
Some build systems want to build python libraries separately from the rest of the build. Add a NO_PYTHON option to enable this. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-27pylibfdt: Allow pkg-config to be supplied in the environmentSimon Glass1-1/+2
Some build systems have their own version of the pkg-config tool. Use a variable for this instead of hard-coding it, to allow for this. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-22Correct typo: s/pylibgfdt/pylibfdt/David Gibson1-1/+1
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-21Build pylibfdt as part of the normal build processSimon Glass1-2/+32
If swig and the Python are available, build pylibfdt automatically. Adjust the tests to run Python tests too in this case. Signed-off-by: Simon Glass <sjg@chromium.org> [dwg: Make error message clearer that missing swig or python-dev isn't fatal to the whole build] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-21Add an initial Python library for libfdtSimon Glass1-0/+1
Add Python bindings for a bare-bones set of libfdt functions. These allow navigating the tree and reading node names and properties. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-10dtc: Bump version to v1.4.4v1.4.4David Gibson1-1/+1
Preparing for yet another release, due to a build bug in v1.4.3. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-02-28dtc: Bump version to v1.4.3v1.4.3David Gibson1-1/+1
Preparing for new release. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-01-30Makefile: Add tags ruleStephen Boyd1-0/+6
It's useful to have some tags to jump around sources. We don't include test sources in the toplevel Makefile because they probably aren't useful to main program development. Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-09-03dtc: Makefile improvements for release uploadingv1.4.2David Gibson1-4/+20
This has some fixes to the make dist target, and a new make kup target for maintainer convenience uploading new releases. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-09-03dtc: Bump version to 1.4.2David Gibson1-1/+1
Bump version in preparation for a new release. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-11-16Remove duplicated -Werror in dtc MakefileDavid Gibson1-1/+1
The "-Werror" compiler flag is currently declared twice in the Makefile, one time in WARNINGS, and one time in CFLAGS. Let's remove one of them. Signed-off-by: Thomas Huth <thuth@redhat.com> [Moved remaining -Werror from WARNINGS to CFLAGS --dwg] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2014-11-12dtc: Bump version to 1.4.1v1.4.1David Gibson1-1/+1
Bump version number in preparation for a release. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2014-11-12dtc: Add maintainer script for signing and upload to kernel.orgDavid Gibson1-0/+1
This patch adds scripts/kup-dtc which builds a tarball from a specified git tag, signs it and uploads to kernel.org with kup. This is useful only for dtc maintainers. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2014-06-18Add a basic test for fdtdumpSimon Glass1-0/+1
We can test fdtdump by comparing its output with the source file that was compiled by dtc. Add a simple test that should at least catch regressions in basic functionality. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2014-02-04Makefile: add a make "dist" targetFlorian Fainelli1-0/+5
make dist can be used to produce tarballs directly from the git repository, which can be useful to automate the release process as well as shipping custom releases. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2014-01-25Makefile: enable -Wshadow by defaultFlorian Fainelli1-1/+1
Now that all -Wshadow build warnings/errors are fixed, turn on -Wshadow by default to make sure we would catch new potential shadow warnings. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2013-08-15Makefile: provide separate install targetsDavid Gibson1-2/+10
Currently `make install` will install the binaries, libraries and includes. This change separates the install target into install-bin, install-lib and install-includes, so we have more flexibility, particularly when we're just using libfdt. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2013-06-22Tag Version 1.4.0v1.4.0Jon Loeliger1-1/+1
Signed-off-by: Jon Loeliger <jdl@jdl.com>
2012-01-21Introduce ${TESTS_BIN} in Makefiles to identify tested executables.Jon Loeliger1-0/+6
2012-01-21Add fdtput utility to write property values to a device treeSimon Glass1-0/+4
This simple utility allows writing of values into a device tree from the command line. It aimes to be the opposite of fdtget. What is it for: - Updating fdt values when a binary blob already exists (even though source may be available it might be easier to use this utility rather than sed, etc.) - Writing machine-specific fdt values within a build system To use it, specify the fdt binary file on command line followed by the node and property to set. Then, provide a list of values to put into that property. Often there will be just one, but fdtput also supports arrays and string lists. fdtput does not try to guess the type of the property based on looking at the arguments. Instead it always assumes that an integer is provided. To indicate that you want to write a string, use -ts. You can also provide hex values with -tx. The command line arguments are joined together into a single value. For strings, a nul terminator is placed between each string when it is packed into the property. To avoid this, pass the string as a single argument. Usage: fdtput <options> <dt file> <<node> <property> [<value>...] Options: -t <type> Type of data -v Verbose: display each value decoded from command line -h Print this help <type> s=string, i=int, u=unsigned, x=hex Optional modifier prefix: hh or b=byte, h=2 byte, l=4 byte (default) To read from stdin and write to stdout, use - as the file. So you can do: cat somefile.dtb | fdtput -ts - /node prop "My string value" > newfile.dtb This commit also adds basic tests to verify the major features. Signed-off-by: Simon Glass <sjg@chromium.org>
2012-01-21Add fdtget utility to read property values from a device treeSimon Glass1-0/+4
This simply utility makes it easy for scripts to read values from the device tree. It is written in C and uses the same libfdt as the rest of the dtc package. What is it for: - Reading fdt values from scripts - Extracting fdt information within build systems - Looking at particular values without having to dump the entire tree To use it, specify the fdt binary file on command line followed by a list of node, property pairs. The utility then looks up each node, finds the property and displays the value. Each value is printed on a new line. fdtget tries to guess the type of each property based on its contents. This is not always reliable, so you can use the -t option to force fdtget to decode the value as a string, or byte, etc. To read from stdin, use - as the file. Usage: fdtget <options> <dt file> [<node> <property>]... Options: -t <type> Type of data -h Print this help <type> s=string, i=int, u=unsigned, x=hex Optional modifier prefix: hh or b=byte, h=2 byte, l=4 byte (default) Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-26fdtdump: rename from ftdumpMike Frysinger1-3/+3
The freetype package already installs a binary named "ftdump", so the dtc package conflicts with that. So rename the newer dtc tool to "fdtdump". This even makes a bit more sense: ftdump: [F]lat device [T]ree [dump] fdtdump: [F]lat [D]evice [T]ree [dump] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
2011-09-22Add fdt read/write utility functionsSimon Glass1-1/+1
This adds higher-level libfdt operations for reading/writing an fdt blob from/to a file, as well as a function to decode a data type string as will be used by fdtget, fdtput. This also adds a few tests for the simple type argument supported by utilfdt_decode_type. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
2011-09-22Create Makefile.utils and move ftdump into itSimon Glass1-1/+1
We want to avoid a separate Makefile include for each utility, so this sets up a general one for utilities. Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Simon Glass <sjg@chromium.org>
2011-05-08Tag Version 1.3.0v1.3.0Jon Loeliger1-1/+1
Signed-off-by: Jon Loeliger <jdl@jdl.com>
2011-04-29libfdt: include version number in sonamePaolo Bonzini1-4/+5
The libfdt shared library is only installed by its unversioned name. Including it properly in a distribution requires installation of both the versioned name (used in the binary-only package) and the unversioned name (used in the development package). The latter is just a symbolic link, so you need to change the soname in turn to include the version. While at it, use Makefile variables to shorten some lines and avoid cut-and-paste typos; and clean up remnants of when shared libraries were not supported on Darwin. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2010-11-13dtc: Add code to make diffing trees easierDavid Gibson1-2/+3
This patch adds a "dtdiff" script to do a useful form diff of two device trees. This automatically converts the tree to dts form (if it's not already) and uses a new "-s" option in dtc to "sort" the tree. That is, it sorts the reserve entries, it sorts the properties within each node by name, and it sorts nodes by name within their parent. This gives a pretty sensible diff between the trees, which will ignore semantically null internal rearrangements (directly diffing the dts files can give a lot of noise due to the order changes). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2010-04-30dtc: Add -Wredundant-decls (resend)David Gibson1-1/+1
We are almost clean already with the -Wredundant-decls warning. The only exception is a declaration for isatty() inside the flex-generated code. This can be removed by using flex's "never-interactive" option, which we probably should be using anyway, since we never parse interactively in the sense that this option implies. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2010-03-10dtc: Enable more warningsDavid Gibson1-1/+3
This patch turns on a bunch of extra gcc warnings, most of which are probably a good idea. Of the new warnings -Wnested-externs and -Wstrict-prototypes need no code changes, we're already warning-clean. The remaining one, -Wmissing-prototypes requires trivial changes in some of the tests (making functions local). This patch also rearranges the warnings flags into a separate make variable for convenience, and turns on -Werror, to really encourage people to keep the code warning-clean. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2009-07-15add Mac OS X supportJean-Christophe PLAGNIOL-VILLARD1-3/+14
use dylib shared lib extention allow to specifiy os specific shared lib link option Mac OS use -dynamiclib instead of -shared, -install_name instead of -soname and does not support --version-script add HOSTOS macro to detect the current os you are Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-02-17Fix libraries (static and dynamic) installationEmil Medve1-4/+3
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>