Commit graph

1045 commits

Author SHA1 Message Date
Thierry Reding
2bc5b66d7f libfdt: Add new maximum phandle lookup function
The fdt_get_max_phandle() function has some shortcomings. On one hand
it returns just a uint32_t which means to check for the "negative"
error code a caller has to explicitly check against the error code
(uint32_t)-1. In addition, the -1 is the only error code that can be
returned, so a caller cannot tell the difference between the various
failures.

Fix this by adding a new fdt_find_max_phandle() function that returns an
error code on failure and 0 on success, just like other APIs, and stores
the maximum phandle value in an output argument on success.

This also refactors fdt_get_max_phandle() to use the new function. Add a
note pointing out that the new fdt_find_max_phandle() function should be
preferred over fdt_get_max_phandle().

Signed-off-by: Thierry Reding <treding@nvidia.com>
Message-Id: <20190326153302.17109-1-thierry.reding@gmail.com>
[dwg: Reword for some inaccuracies in the commit message]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-29 13:29:51 +11:00
AKASHI Takahiro
7fcf8208b8 libfdt: add fdt_append_addrrange()
This function will append an address range property using parent node's
"#address-cells" and "#size-cells" properties.

It will be used in implementing kdump with kexec_file_load system call
at linux kernel for arm64 once it is merged into kernel tree.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Message-Id: <20190327061552.17170-2-takahiro.akashi@linaro.org>
[dwg: Correct a SEGV error in the testcase]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-29 12:12:29 +11:00
Chen-Yu Tsai
ae795b2db7 checks: Do not omit nodes with labels if symbol generation is requested
Commit 4038fd9005 ("dtc: add ability to make nodes conditional on them
being referenced") added the new /omit-if-no-ref/ directive to mark
nodes as eligible to be discarded if not referenced. The mechanism to
process this happens before the symbol generation phase. This means even
if symbol generation is requested and the node has a label, it will be
discarded if there are no references to it within the same file.

This is probably not what people expect. When using symbol generation to
compile base device trees for applying overlays, nodes with labels could
be referenced by the overlays, and therefore should be preserved.

Check if the node has a label and symbol generation was requested before
dropping the node.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Message-Id: <20190327035352.24036-1-wens@csie.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-27 17:02:54 +11:00
David Gibson
eac2ad495b Update version.lds again
Yet again, we've added several functions to libfdt that were supposed
to be exported, but forgotten to add them to the versio.lds script.
This adds them.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-25 14:52:47 +11:00
David Gibson
f67b471355 Revert "libfdt: Add phandle generation helper"
This reverts commit 54ea41c224.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-25 14:51:27 +11:00
Thierry Reding
54ea41c224 libfdt: Add phandle generation helper
The new fdt_generate_phandle() function can be used to generate a new,
unused phandle given a specific device tree blob. The implementation is
somewhat naive in that it simply walks the entire device tree to find
the highest phandle value and then returns a phandle value one higher
than that. A more clever implementation might try to find holes in the
current set of phandle values and fill them. But this implementation is
relatively simple and works reliably.

Also add a test that validates that phandles generated by this new API
are indeed unique.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Message-Id: <20190320151003.28941-1-thierry.reding@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-21 11:37:44 +11:00
Leonard Crestez
4762ad051e checks: Fix spelling in check_graph_endpoint
Should be "endpoint" rather than "endpont"

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Message-Id: <6fcb6e160163467b706c312ffe307ee8a5d9255d.1552328099.git.leonard.crestez@nxp.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-12 19:16:14 +11:00
David Gibson
d37f6b2010 Bump version to v1.5.0
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>
2019-03-06 15:51:37 +11:00
Lumir Balhar
a4b1a307ff pylibfdt:tests: Extend the way how to find a Python module
Python 3 C extensions have suffix containing platform, Python version
and another details in the name so the condition has to be extended.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Message-Id: <20190218164856.23861-5-frenzy@frenzy.cz>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-02-19 16:07:58 +11:00
Lumir Balhar
625dd8aaf2 pylibfdt: Change how passing tests are recognized
When some warning appears in test result, "ok" is still
at the end of the line but without three dots.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Message-Id: <20190218164856.23861-4-frenzy@frenzy.cz>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-02-19 13:51:48 +11:00
Petr Viktorin
364631626b pylibfdt: Test fdt.setprop take bytes on Python 3, add error handling
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Message-Id: <20190218164856.23861-3-frenzy@frenzy.cz>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-02-19 13:51:48 +11:00
Lumir Balhar
cb0f454f73 pylibfdt: check_err accepts only integer as a first argument.
A list passed as an argument to check_err() means that
there is no error code to check and therefore it should
be returned back.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Message-Id: <20190218164856.23861-2-frenzy@frenzy.cz>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-02-19 13:49:27 +11:00
Lumir Balhar
4b68c6b360 pylibfdt: Proper handling of bytes/unicode strings and octal literals
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Message-Id: <20190218164856.23861-1-frenzy@frenzy.cz>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-02-19 13:43:27 +11:00
Andreas Schwab
78e113e81c Use PRIxPTR for printing uintptr_t values
Fixes: 49903aed77 ("use ptrdiff_t modifier for printing pointer differences")
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
2019-01-02 12:35:12 +01:00
Geert Uytterhoeven
ea7a8f6dad libfdt: Fix FDT_ERR_NOTFOUND typos in documentation
The actual error is FDT_ERR_NOTFOUND, not FDT_ERR_NOT_FOUND.

Fixes: d29126c90a ("libfdt: Add iterator over properties")
Fixes: 902d0f0953 ("libfdt: Add a subnodes iterator macro")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-12-23 13:34:57 +11:00
Geert Uytterhoeven
5aafd7ca43 libfdt: Fix fdt_getprop_by_offset() parameter name in documentation
The second parameter of fdt_getprop_by_offset() is called "offset", not
"ffset".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-12-22 00:02:58 +11:00
Kumar Gala
7cbc550f90 checks: Add unit address check if node is enabled
There are various SoCs that have 2 different peripheral blocks at the
same register offset.  However, we might have one block marked as
status = "disabled" and the other status = "ok".  In such cases we
shouldn't warn about duplicate unit-address.

Here's a cut down example that we would warning about before:

/dts-v1/;

/ {
	#address-cells = <0x01>;
	#size-cells = <0x01>;

	soc {
		#address-cells = <0x01>;
		#size-cells = <0x01>;
		compatible = "simple-bus";
		ranges;

		i2c0: i2c@40003000 {
			compatible = "nordic,nrf-i2c";
			reg = <0x40003000 0x1000>;
			status = "ok";
		};

		spi0: spi@40003000 {
			compatible = "nordic,nrf-spi";
			reg = <0x40003000 0x1000>;
			status = "disabled";
		};
	};
};

We introduce 'unique_unit_address_if_enabled' check that is disabled by
default.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-12-15 18:47:55 +11:00
Rob Herring
f267e674d1 checks: Fix crash with multiple source annotations
Commit 3616b9a811 ("checks: Use source position information for check
failures") causes crashes when there's a check message with multiple
source annotations. Drop the errant addition to the str pointer left
over from the previous version.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-28 09:35:13 +11:00
Rob Herring
3616b9a811 checks: Use source position information for check failures
Now that we retain source position information of nodes and properties,
make that the preferred file name (and position) to print out in check
failures. This will greatly simplify finding and fixing check errors
because most errors are in included source .dtsi files and they get
duplicated every time the source file is included.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-25 18:24:00 +11:00
Rob Herring
2bdbd07a12 checks: Make each message output atomic
Printing to stderr as we build up the check message results in
interleaving of messages when multiple instances of dtc are running.
Change the message output to use an intermediate buffer for constructing
the message and then output the message to stderr with a single fputs.

While perhaps there is no guarantee that fputs will be atomic, this gets
rid of any interleaved output that previously occurred on Linux.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-25 18:23:31 +11:00
Rob Herring
a1eff70c02 util: Add xa{v}sprintf_append functions
Add variadic and va_list functions, xa{v}sprintf, which appends a
formatted string to an existing string and re-allocate the string buffer
if necessary. xasprintf becomes just a special case of xasprintf_append
with a NULL starting string.

Rather than looping to get a big enough buffer, simply the implementation
by assuming we have a C99 compliant vsnprintf implementation to return the
necessary size. A side effect is glibc 2.0 support is dropped which seems
unnecessary.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-25 18:21:48 +11:00
Simon Glass
82a52ce457 libfdt: Add a test for fdt_getprop_by_offset()
This function does not have its own test at present. Add one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-24 23:20:16 +11:00
David Gibson
607b8586b3 PEP8 / Flake8 cleanups for setup.py
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-23 22:11:33 +11:00
David Gibson
f9c0a425b6 Remove broken objdir / srcdir support
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-23 21:58:42 +11:00
David Gibson
5182b5e6f2 pylibfdt: Use common PREFIX variable
For no particularly good reason, the install target for the Python library
uses a different PREFIX variable to give the installation destination
to the rest of dtc & libfdt.  Make it use the same one.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-23 21:51:35 +11:00
David Gibson
d45bf1f5f2 Refine make tests_clean target
Remove some redundancy, and also clean up *.test.dt.yaml files generated
during the tests.  Also add the latter to gitignore.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-23 21:39:57 +11:00
David Gibson
99284c4db9 Refine pylibfdt_clean target
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-23 21:24:44 +11:00
David Gibson
a4629cfaed Refine libfdt_clean target
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-23 21:11:47 +11:00
David Gibson
08380fc43a tests: Use modern octal literals for Python
Python3 removes support for C-style octal literals, using 0oXXXX instead.
Python2 also supports this form, so move to the new style.

Reported-by: Lumir Balhar <lbalhar@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-23 17:47:41 +11:00
Lumir Balhar
8113c00b99 pylibfdt: Allow switch to Python 3 via environment variable PYTHON
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-11-23 17:37:56 +11:00
David Gibson
11738cf01f libfdt: Don't use memcpy to handle unaligned reads on ARM
6dcb8ba4 "libfdt: Add helpers for accessing unaligned words" introduced
the fdt32_ld() and fdt64_ld() helpers for loading values from the FDT blob
which might not be naturally aligned.  This matters for ARM, where
attempting a plain unaligned load will often cause an exception.

However, it seems the memcpy() we used here was surprisingly expensive,
making libfdt nearly 6x slower on at least some ARM platforms.

This patch takes an alternative approach, using a bunch of 1-byte loads
and shifts to implement the helpers.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-22 23:37:07 +11:00
Rob Herring
86a288a736 checks: Restructure check_msg to decrease indentation
The entire check_msg function is under the if condition except for
va_start/va_end. Move these and invert the if condition saving a level
of indentation.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-22 17:14:19 +11:00
Julia Lawall
5667e7ef9a annotations: add the annotation functionality
Provide the new command-line option:

--annotate (abbreviated -T)

--annotate provides one or more filenames and line numbers indicating
the origin of a given line.  The filename is expressed relative the the
filename provided on the command line.  Nothing is printed for overlays,
etc.

-T can be repeated giving more verbose annotations.  These consist of
one or more tuples of: filename, starting line, starting column, ending
line ending column.  The full path is given for the file name.
Overlays, etc are annotated with <no-file>:<no-line>.

The verbose annotations may be too verbose for normal use.

There are numerous changes in srcpos.c to provide the relative filenames
(variables initial_path, initial_pathlen and initial_cpp, new functions
set_initial_path and shorten_to_initial_path, and changes in
srcfile_push and srcpos_set_line).  The change in srcpos_set_line takes
care of the case where cpp is used as a preprocessor.  In that case the
initial file name is not the one provided on the command line but the
one found at the beginnning of the cpp output.

shorten_to_initial_path only returns a string if it has some shortening
to do.  Otherwise it returns NULL and relies on the caller to use the
initial string.  This simplifies memory management, by making clear to
the caller whether a new string is allocated.

The new functions srcpos_string_comment, srcpos_string_first, and
srcpos_string_last print the annotations.  srcpos_string_comment is
recursive to print a list of source file positions.

Various changes are sprinkled throughout treesource.c to print the
annotations.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-19 11:18:12 +11:00
Julia Lawall
8e20ccf52f annotations: add positions
Extend the parser to record positions, in build_node,
build_node_delete, and build_property.

srcpos structures are added to the property and node types, and to the
parameter lists of the above functions that construct these types.
Nodes and properties that are created by the compiler rather than from
parsing source code have NULL as the srcpos value.

merge_nodes, defined in livetree.c, uses srcpos_extend to combine
multiple positions, resulting in a list of positions.  srcpos_extend
is defined in srcpos.c.  New elements are added at the end.  This
requires the srcpos type, define in srcpos.h, to be a list structure
with a next field.  This next field is initialized to NULL in
srcpos.h, in the macro YYLLOC_DEFAULT invoked implicitly by the
generated parser code.

Another change to srcpos.c is to make srcpos_copy always do a full
copy, including a copy of the file substructure.  This is required
because when dtc is used on the output of cpp, the successive detected
file names overwrite the file name in the file structure.  The next
field does not need to be deep copied, because it is always NULL when
srcpos_copy is called; an assert checks for this. File names are only
updated in uncopied position structures.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-19 11:06:20 +11:00
David Gibson
ca930e20bb tests: Don't lose errors from make checkm
For unclear reasons we had some code to copy a transcript of "make checkm"
runs to a vglog.XXX file.  It's not really clear why this was there, and
it had the nasty side effect of discarding errors from run_tests.sh,
meaning that an error on the valgrind run wouldn't show up clearly in
Travis CI builds.  Remove that logic so that we see errors more clearly.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-14 16:37:39 +11:00
David Gibson
43366bb4ee tests: Property count valgrind errors in wrapped tests
The logic in wrap_test() was effectively squashing valgrind errors into
the "FAIL" bucket rather than their own bucket as intended.  Correct it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-14 16:13:30 +11:00
David Gibson
5062516fb8 srcpos: Remove srcpos_empty
Nothing was actually using it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-14 16:12:43 +11:00
David Gibson
a3143fafbf Revert "annotations: add positions"
This reverts commit baa1d2cf78.

Turns out this introduced memory badness.  valgrind picks it up on
x86, but it straight out SEGVs on x86.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-14 15:24:49 +11:00
Kumar Gala
403cc79f06 checks: Update SPI bus check for 'spi-slave'
If the SPI bus controller is being used for 'spi-slave' mode some of the
checks we have need to change:

In 'spi-slave' mode #address-cells should be 0, as any children don't
have a reg property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-14 14:25:43 +11:00
Julia Lawall
baa1d2cf78 annotations: add positions
Extend the parser to record positions, in build_node, build_node_delete,
and build_property.

srcpos structures are added to the property and node types, and to the
parameter lists of the above functions that construct these types.
Nodes and properties that are created by the compiler rather than from
parsing source code have NULL as the srcpos value.

merge_nodes, defined in livetree.c, uses srcpos_extend to combine
multiple positions, resulting in a list of positions.  srcpos_extend is
defined in srcpos.c.  New elements are added at the end.  The srcpos
type, define in srcpos.h, is now a list structure with a next field.

Another change to srcpos.c is to make srcpos_copy always do a full copy,
including a copy of the file substructure.  This is required because
when dtc is used on the output of cpp, the successive detected file
names overwrite the file name in the file structure.  The next field
does not need to be deep copied, because it is only updated in newly
copied positions and the positions to which it points have also been
copied.  File names are only updated in uncopied position structures.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-11-13 15:29:27 +11:00
David Gibson
ff2ad38f6a Merge remote-tracking branch 'origin/pr/18' 2018-11-07 15:59:36 +11:00
John Clarke
aa7254d9cb libfdt: return correct value if #size-cells property is not present
According to the device tree specification, the default value for
#size-cells is 1, but fdt_size_cells() was returning 2 if this property
was not present.

This patch also makes fdt_address_cells() and fdt_size_cells() conform
to the behaviour documented in libfdt.h. The defaults are only returned
if fdt_getprop() returns -FDT_ERR_NOTFOUND, otherwise the actual error
is returned.

Signed-off-by: John Clarke <johnc@kirriwa.net>
2018-11-07 14:13:12 +11:00
Dan Horák
49903aed77 use ptrdiff_t modifier for printing pointer differences
Use ptrdiff_t modifier (%tx) for printing a difference between 2 pointers. Currently
%zx (size_t) is used, but it fails on platforms where size_t and ptrdiff_t are
defined differently (like s390).

Comes from
f3da2d1b00
originally.

Signed-off-by: Dan Horák <dan@danny.cz>
2018-10-23 15:26:52 +02:00
Rob Herring
da2b691ccf treesource: Fix dts output for phandles in middle of a sequence of ints
If we have a phandle in the middle of a sequence of numbers and
it is not bracketed (e.g. <0x1234 &phandle 0x5678>), the dts output will
be corrupted due to missing a space between the phandle value and the
following number.

Fixes: 8c59a97ce0 ("Fix missing labels when emitting dts format")
Cc: Grant Likely <grant.likely@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-10-12 14:34:33 +11:00
Lubomir Rintel
8f8b77a0d6 tests: Wrap check_align() calls with base_run_test()
Otherwise the FAIL results won't be accounted for in the summary.
Easily testable by artifically causing them to fail:

-        if [ $(($size % $align)) -eq 0 ] ;then
+        if [ $(($size % $align)) -eq 666 ] ;then

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-10-04 10:25:56 +10:00
Rob Herring
522d81d572 Fix dts output with a REF_PATH marker
Commit 8c59a97ce0 ("Fix missing labels when emitting dts format")
fixed label output, but broke output when there is a REF_PATH marker.

The problem is a REF_PATH marker causes a zero length string to be
emitted. The write_propval_string() function requires a length of at
least 1 (including the terminating '\0'), but that was not being
checked.

For the integer output, a length of 0 is valid as it is possible to have
labels inside the starting '<':

int-prop = < start: 0x1234>;

REF_PHANDLE is another marker that we don't explicitly handle, but it
doesn't cause a problem as it is fundamentally just an int.

Fixes: 8c59a97ce0 ("Fix missing labels when emitting dts format")
Reported-by: Kumar Gala <kumar.gala@linaro.org>
Cc: Grant Likely <grant.likely@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-09-27 10:58:35 +10:00
Fredrik Markstrom
e45198c983 Added test cases for target references
This commit adds test cases for commits "Correct overlay syntactic
sugar for generating target-path fragments" and "Merge nodes with
local target label references".

It verifies that target path references are not resolved locally and
that target label references that can be resolved locally are.

Signed-off-by: Fredrik Markstrom <fredrik.markstrom@gmail.com>
[dwg: Fixed some whitespace problems]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-09-26 10:41:49 +10:00
Fredrik Markstrom
0fcffda15e Merge nodes with local target label references
This change makes sure that nodes with target label references doesn't
create additional fragments if the label can been resolved
locally. Target path references are not resolved locally and will
generate a fragment.

Previously the dts below would generate two fragments:

/dts-v1/;
/plugin/;
&x { a: a@0 {};};
&a { b {}; };

This commit essentially reverts part of the commit "Correct overlay
syntactic sugar for generating target-path fragments". The main reason
we want to do this is that it breaks consumers of dtbo:s that can't
resolve references between fragments in the same dtbo (like the linux
4.1 kernel). In addition creating a fragment for each label reference
substantially increases the size of the resulting dtbo for some use
cases.

Signed-off-by: Fredrik Markstrom <fredrik.markstrom@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-09-25 12:40:43 +10:00
David Gibson
1e4a0928f3 pylibfdt: Don't have setup.py depend on where it's invoked from
Currently setup.py depends on being invoked from the right directory
(specifically it needs to be run from the root of the project).  That's a
bit confusing.

This updates setup.py to no longer depend on the invoking directory by
instead having it change directory to the location of the script itself,
then using internal paths relative to that.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-09-25 10:31:54 +10:00
David Gibson
ca399b1495 pylibfdt: Eliminate run_setup make function
This function no longer does anything useful, so get rid of it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-09-25 10:31:45 +10:00