summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* README: update for Python 3coverity_scanLuca Weiss2019-08-291-14/+12
| | | | | | | | | Convert the usage to be compatible with Python 3 and the current API. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Message-Id: <20190817212532.15661-2-luca@z3ntu.xyz> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* livetree: simplify condition in get_node_by_pathDenis Efremov2019-08-281-2/+1
| | | | | | | | | | | | The "strlen && strprefixeq" check in get_node_by_path is excessive, since strlen is checked in strprefixeq macro internally. Thus, "strlen(child->name) == p-path" conjunct duplicates after macro expansion and could be removed. Signed-off-by: Denis Efremov <efremov@linux.com> Message-Id: <20190827204148.20604-1-efremov@linux.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Allow #size-cells of 0David Gibson2019-07-283-3/+17
| | | | | | | | | | | | | | | | | | c12b2b0c20eb "libfdt: fdt_address_cells() and fdt_size_cells()" introduced a bug as it consolidated code between the helpers for getting #address-cells and #size-cells. Specifically #size-cells is allowed to be 0, and is frequently found so in practice for /cpus. IEEE1275 only requires implementations to handle 1..4 for #address-cells, although one could make a case for #address-cells == #size-cells == 0 being used to represent a bridge with a single port. While we're there, it's not totally obvious that the existing implicit cast of a u32 to int will give the correct results according to strict C, although it does work in practice. Straighten that up to cast only after we've made our range checks. Reported-by: yonghuhaige via https://github.com/dgibson/dtc/issues/28 Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Makefile: Add EXTRA_CFLAGS variableJoel Stanley2019-07-221-1/+1
| | | | | | | | | | | | | | | | | Distributions packaging dtc may need to set extra flags. Currently when they do that it overrides the ones set by the makefile. This is particularly problematic when compiling without yaml, as the yaml detection is ignored. ld: dtc.o: in function `main': dtc.c:(.text.startup+0x718): undefined reference to `dt_to_yaml' This patch provides a EXTRA_CFLAGS variable that is added to the list of CFLAGS, and can be set on the command line when packaging. Signed-off-by: Joel Stanley <joel@jms.id.au> Message-Id: <20190722030244.9580-1-joel@jms.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Tweak data handling to satisfy CoverityDavid Gibson2019-07-053-12/+18
| | | | | | | | | | | | | | | | | | | | | | | In libfdt we often sanity test fdt_totalsize(fdt) fairly early, then trust it (but *only* that header field) for the remainder of our work. However, Coverity gets confused by this - it sees the byteswap in fdt32_ld() and assumes that means it is coming from an untrusted source everytime, resulting in many tainted data warnings. Most of these end up with logic in fdt_get_string() as the unsafe destination for this tainted data, so let's tweak the logic there to make it clearer to Coverity that this is ok. We add a sanity test on fdt_totalsize() to fdt_probe_ro_(). Because the interface allows bare ints to be used for offsets, we already have the assumption that totalsize must be 31-bits or less (2GiB would be a ludicrously large fdt). This makes this more explicit. We also make fdt_probe_ro() return the size for convenience, and change the logic in fdt_get_string() to keep it in a local so that Coverity can see that it has already been bounds-checked. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* fdtoverlay: Ignore symbols in overlays which don't apply to the target treeDavid Gibson2019-07-042-4/+11
| | | | | | | | | | | | | | | | Symbols from overlays are merged into the target tree, and are required to have the form: /fragment@XXX/__overlay__/... If any symbols don't have this form, the overlay is rejected. But there's not really anything wrong with an overlay having "local" labels referring to a fragment node or some other metadata, that's not expected to end up in a target tree. So change our overlay application to simply ignore such symbols rather than fail. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* fdtoverlay: Allow adding labels to __overlay__ nodes in overlaysDavid Gibson2019-07-044-6/+42
| | | | | | | | | | | | | | | | | | | | | | | When applying overlays, we merge symbols from the overlay into the target tree. At the moment the logic for this assumes all symbols in the overlay are attached to a node of the form: /fragment@XXX/__overlay__/relative/path And will end up applied to the relative/path node under the fragment's target. However, this disallows the case of a symbol in the form just: /fragment@XXX/__overlay__ This does have a pretty obvious sensible meaning: attach the new symbol directly to the fragment's target, but we don't currently do that. It's pretty easy to workaround this limitation in one's overlays, but it's also easy to handle in the overlay applying code, so we might as well extend it to cover this case. Reported-by: Christophe Braillon Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* pylibfdt: Add support for fdt_get_alias()Appana Durga Kedareswara rao2019-07-042-0/+19
| | | | | | | | Add this into the class to simplify use of this function. Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com> Message-Id: <1562130487-27028-1-git-send-email-appana.durga.rao@xilinx.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* pylibfdt: Correct the FdtSw exampleSimon Glass2019-07-031-2/+4
| | | | | | | | | At present this example is incorrect since it is missing the call to finish_reservemap() and does not add a root node. Fix these problems. Signed-off-by: Simon Glass <sjg@chromium.org> Message-Id: <20190703000815.102459-1-sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* tests: Add a failed test case for 'fdtoverlay' with long target pathFabrice Gasnier2019-06-303-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a test case to demonstrate some issue seen when applying overlays using 'fdtoverlay'. It fails with FDT_ERR_NOSPACE: - with long target path - symbols in order to use these nodes in possible subsequent overlay. This is seen with this patch, by running: $ make check # Reports a failed test $ ./fdtoverlay -i tests/overlay_base.test.dtb -o out.dtb \ tests/overlay_overlay_long_path.fdoverlay.test.dtb Failed to apply tests/overlay_overlay_long_path.fdoverlay.test.dtb (-3) This overlay fails to apply, because dtb size is close to modulo 1024 bytes chunk: utilfdt_read() -> utilfdt_read_err() -> bufsize = 1024. As there is not much extra space in the blob to resolve symbols (long target path), it fails with FDT_ERR_NOSPACE. In fdtoverlay, size is : /* grow the blob to worst case */ blob_len = fdt_totalsize(blob) + total_len; I can see assumption is made that result should be lower than: - base fdt size + overlay size. Is there a simple way to find to know what the final size is? I'm not sure what the correct fix might be, for such (worst) case? Similar issue is also seen in u-boot/common/image-fit.c that implements similar approach (e.g. base fdt size + overlay size). Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Message-Id: <1538553302-1353-1-git-send-email-fabrice.gasnier@st.com> [dwg: To avoid breaking bisection, I committed this after a fix, so the "failed" description is no longer accurate] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* fdtoverlay: Rework output allocationDavid Gibson2019-06-301-16/+58
| | | | | | | | | | | | | At present the fdtoverlay tool allocates space for its output based on a calculation of the worse case size based on the size of the input blobs. Except.. that certain edge cases with very long target paths can actually exceed that "worst case" calculation. This reworks the code to instead dynamically reallocate the output buffer if we run out of space at any point. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* fdtoverlay: Improve error messagesDavid Gibson2019-06-301-8/+6
| | | | | | | | Make several improvements to the error messages from the fdtoverlay helper program: improve brevity, consistently quote filenames and print symbolic errors from libfdt rather than a raw error number. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* fdtoverlay: Check for truncated overlay blobsDavid Gibson2019-06-301-1/+9
| | | | | | | | | | The fdtoverlay helper program checks if it has read a base blob which is incomplete: that is, where the amount of data read in is less that the declared size of the blob. This applies the same check for safety to each overlay blob as well. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* README.license: Update to reflect SPDX tag usageRob Herring2019-06-212-5/+37
| | | | | | | | | | Update README.license since files now have SPDX tags rather than license text. Adding a copy of BSD-2-Clause license since that no longer exists within the project. Signed-off-by: Rob Herring <robh@kernel.org> Message-Id: <20190620211944.9378-8-robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* dtc: Add GPLv2 SPDX tags to files missing license textRob Herring2019-06-217-0/+7
| | | | | | | | | A couple of dtc files are missing licenses. Add GPL-2.0-or-later SPDX tag to them. Signed-off-by: Rob Herring <robh@kernel.org> Message-Id: <20190620211944.9378-7-robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Add dual GPL/BSD SPDX tags to files missing license textRob Herring2019-06-212-0/+2
| | | | | | | | | A couple of libfdt files are missing licenses. Add (GPL-2.0-or-later OR BSD-2-Clause) SPDX tag to them. Signed-off-by: Rob Herring <robh@kernel.org> Message-Id: <20190620211944.9378-6-robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* tests: Replace license boilerplate with SPDX tagsRob Herring2019-06-2173-1056/+73
| | | | | | | | | Replace instances in tests of mostly LGPL-2.1 license boilerplate with SPDX tags. Signed-off-by: Rob Herring <robh@kernel.org> Message-Id: <20190620211944.9378-5-robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* pylibfdt: Replace dual GPLv2/BSD license boilerplate with SPDX tagsRob Herring2019-06-213-46/+3
| | | | | | | | | Replace pylibfdt GPLv2/BSD license boilerplate and add missing license with SPDX tags. Signed-off-by: Rob Herring <robh@kernel.org> Message-Id: <20190620211944.9378-4-robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Replace GPL/BSD boilerplate/reference with SPDX tagsRob Herring2019-06-2113-597/+13
| | | | | | | | Replace instances of dual GPLv2 or BSD license boilerplate with SPDX tags. Signed-off-by: Rob Herring <robh@kernel.org> Message-Id: <20190620211944.9378-3-robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* dtc: Replace GPLv2 boilerplate/reference with SPDX tagsRob Herring2019-06-2120-295/+20
| | | | | | | | Replace instances of GPLv2 or later boilerplate with SPDX tags. Signed-off-by: Rob Herring <robh@kernel.org> Message-Id: <20190620211944.9378-2-robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* livetree: add missing type markers in generated overlay propertiesRob Herring2019-06-122-8/+13
| | | | | | | | | | | | | | The YAML output fails for overlays and when symbol generation are enabled due to missing markers in the generated properties. Add type markers when generating properties under '__symbols__' and '__fixups__' nodes as well as target-path properties. As a side effect of append_to_property() changes, this also sets type markers in '__local_fixups__' node properties. Signed-off-by: Rob Herring <robh@kernel.org> Message-Id: <20190517202804.9084-1-robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Fix typos in various documentation and source filesThomas Huth2019-05-2113-22/+22
| | | | | | | | The typos have been discovered with the "codespell" utility. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190520081209.20415-1-thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Update the GPL2 text to the latest revisionThomas Huth2019-05-211-21/+20
| | | | | | | | | | | | | | This patch replaces the GPL2 text with the latest one from: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt The FSF moved to a different location quite a while ago already, and the latest revision recommends to use the LGPL-2.1 ("Lesser" license) instead of the LGPL-2.0 ("Library" license) in certain cases. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190520072720.14755-1-thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Fix bogus error on rebuildDavid Gibson2019-05-101-1/+1
| | | | | | | | Currently if a file is touched requiring libfdt.so rebuild, it will fail because the ln -s command will attempt to replace an already existing link an error. Correct this by using ln -sf. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Add FDT_CREATE_FLAG_NO_NAME_DEDUP flag that trades size for speedNicholas Piggin2019-05-104-35/+85
| | | | | | | | | | | | | Searching for duplicate names scales O(n^2) with the number of names added to a fdt, which can cause a noticable slowdown with larger device trees and very slow CPU cores. Add FDT_CREATE_FLAG_NO_NAME_DEDUP that allow the caller to trade fdt size for speed in the creation process. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-Id: <20190509094122.834-4-npiggin@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Introduce fdt_create_with_flags()Nicholas Piggin2019-05-104-3/+67
| | | | | | | | | | | | | | | | | | | | | | | There is a need to be able to specify some options when building an FDT with the SW interface. This can be accomplished with minimal changes by storing intermediate data in the fdt header itself, in fields that are not otherwise needed during the creation process and can be set by fdt_finish(). The fdt.magic field is already used exactly this way, as a state to check with callers that the FDT has been created but not yet finished. fdt.version and fdt.last_comp_version are used to make room for more intermediate state. These are adjacent and unused during the building process. last_comp_version is not yet used for intermediate state, but it is zeroed and treated as used, so as to allow future growth easily. A new interface, fdt_create_with_flags() is added, which takes 32-bit flag value to control creation. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-Id: <20190509094122.834-3-npiggin@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Ensure fdt_add_property frees allocated name string on failureNicholas Piggin2019-05-106-7/+139
| | | | | | | | | | | | | If fdt_add_property or fdt_property_placeholder fail after allocating a string for the name, they return without freeing that string. This does not change the structure of the tree, but in very specific cases it could lead to undesirable space consumption. Fix this by rolling back the string allocation in this situation. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-Id: <20190509094122.834-2-npiggin@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Avoid assertion in check_interrupts_property()David Gibson2019-05-061-3/+7
| | | | | | | | | | | | | | | | | If running on a tree with an 'interrupt-parent' property which contains an invalid phandle (0 or -1, not merely for a node which doesn't exist), then check_interrupts_property() will trip the assertion in get_node_by_phandle(). There's logic that almost detects this, but it only handles the overlay case, where we can't fully check because the links will be fixed up later. For the non-overlay case, this is definitely a bad property, but we shouldn't crash. Fix it by failing the check early. Fixes: c1e55a5513e9 ("checks: fix handling of unresolved phandles for dts plugins") Fixes: ee3d26f6960b ("checks: add interrupts property check") Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Link tools and tests against libfdt shared libraryDavid Gibson2019-03-296-7/+17
| | | | | | | | | | | | | | | | Currently the libfdt based tools (fdtput, fdtget, etc.) and all the test binaries using libfdt are linked against the static version of libfdt. That's made it very easy in the past to forget to properly update the version.lds file which is needed to make functions publicaly accessible from the shared library. To avoid problems like that in future, alter the build so that we link and run the tests against the shared library version of libfdt. That immediately points out several important symbols that are still missing from the version.lds, so fix those as well. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* tests: Rename tests.sh to testutils.shDavid Gibson2019-03-299-8/+8
| | | | | | | | tests.sh has a bunch of shell setup that's sourced in a number of other scripts. It _doesn't_ actually run a bunch of tests, which is kind of what the name suggests. So rename it to be more obvious. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Clean up LDLIBS handlingDavid Gibson2019-03-291-2/+2
| | | | | | | | | We currently set LDLIBS to include libyaml globally if we're using it. However only dtc itself actually needs to link with libyaml - the other tool binaries don't. Avoid that unnecessary inclusion by making LDLIBS handling per-target. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Rebuild libfdt shared object if versioning linker script changesDavid Gibson2019-03-291-5/+5
| | | | | | | | | The usable content of the shared library varies depending on the symbol versions given in the version.lds linker script, however it's not currently in the make dependencies. Correct that, and move the libfdt rules together for consistency while we're at it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Use Python3 by defaultDavid Gibson2019-03-292-2/+2
| | | | | | | | Python2 is deprecated upstream, lets try to move forwards. Along with it generalize the .gitignore file so we ignore the .pyc files in the new location that Python3 uses. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Make fdt_get_max_phandle() an inlineDavid Gibson2019-03-293-14/+11
| | | | | | | | | | It's now a trivial wrapper around fdt_find_max_phandle() so we might as well inline it. We also remove it from the versioning linker script. Theoretically, that's a breaking ABI change except that we haven't yet released a version with it exposed in the shared object, so we can get away with it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Add phandle generation helperThierry Reding2019-03-298-3/+99
| | | | | | | | | | | | | | | | | 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: <20190326153302.17109-3-thierry.reding@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Use fdt_find_max_phandle()Thierry Reding2019-03-291-1/+5
| | | | | | | | | Use the fdt_find_max_phandle() function instead of the deprecated fdt_get_max_phandle() function. Signed-off-by: Thierry Reding <treding@nvidia.com> Message-Id: <20190326153302.17109-2-thierry.reding@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Add new maximum phandle lookup functionThierry Reding2019-03-295-15/+56
| | | | | | | | | | | | | | | | | | | | | | 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>
* libfdt: add fdt_append_addrrange()AKASHI Takahiro2019-03-299-0/+290
| | | | | | | | | | | | | 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>
* checks: Do not omit nodes with labels if symbol generation is requestedChen-Yu Tsai2019-03-271-0/+2
| | | | | | | | | | | | | | | | | | | | Commit 4038fd90056e ("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>
* Update version.lds againDavid Gibson2019-03-251-0/+4
| | | | | | | | 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>
* Revert "libfdt: Add phandle generation helper"David Gibson2019-03-259-114/+3
| | | | | | This reverts commit 54ea41c22415cb0e283d22faf71202051c89400c. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Add phandle generation helperThierry Reding2019-03-219-3/+114
| | | | | | | | | | | | | | | | | 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>
* checks: Fix spelling in check_graph_endpointLeonard Crestez2019-03-121-1/+1
| | | | | | | | 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>
* Bump version to v1.5.0v1.5.0David Gibson2019-03-061-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>
* pylibfdt:tests: Extend the way how to find a Python moduleLumir Balhar2019-02-191-1/+1
| | | | | | | | | 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>
* pylibfdt: Change how passing tests are recognizedLumir Balhar2019-02-191-1/+1
| | | | | | | | | 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>
* pylibfdt: Test fdt.setprop take bytes on Python 3, add error handlingPetr Viktorin2019-02-192-5/+11
| | | | | | 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>
* pylibfdt: check_err accepts only integer as a first argument.Lumir Balhar2019-02-191-1/+1
| | | | | | | | | | 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>
* pylibfdt: Proper handling of bytes/unicode strings and octal literalsLumir Balhar2019-02-192-13/+21
| | | | | | 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>
* Use PRIxPTR for printing uintptr_t valuesAndreas Schwab2019-01-021-3/+3
| | | | | Fixes: 49903aed77 ("use ptrdiff_t modifier for printing pointer differences") Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>