aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-09-27Use -Werror in external/dtcChih-Hung Hsieh
am: bea7af187e Change-Id: Ic73bd047a093a7f7f89dcd57e805e1f3af9586d1
2017-09-27Use -Werror in external/dtcChih-Hung Hsieh
Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I055a3a8fbd44478762d176d68ae197d5e93517bb
2017-07-13dtc: change default phandles to ePAPR style instead of bothRob Herring
Currently, both legacy (linux,phandle) and ePAPR (phandle) properties are inserted into dtbs by default. The newer ePAPR style has been supported in dtc and Linux kernel for 7 years. That should be a long enough transition period. We can save a little space by not putting both into the dtb. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-06-15tests: fdtoverlay unit testPantelis Antoniou
Add an fdtoverlay unit test. Applies applies overlay(s) and then retrieves an inserted property to verify. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-06-15fdtoverlay: A tool that applies overlaysPantelis Antoniou
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-06-14manual: Document missing optionsPantelis Antoniou
The -d and -s options were undocumented. Add an entry in the manual. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-06-08dtc: fix sprintf() format string error, againDavid Gibson
2a42b14 "dtc: check.c fix compile error" changed a format string using %lx which wasn't correct for all platforms. Unfortunately it changed it to %zx, which is wrong for a different set of platforms (and only right on the others by accident). The parameter we're formatting here is uint64_t, not size_t, so we need to use the PRIx64 macro from <inttypes.h> to get this right. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-05-20Makefile: Fix build on MSYS2 and CygwinCufi, Carles
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 Gibson
- 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-05-17Suppress expected error message in fdtdump testDavid Gibson
Since 548aea2 "fdtdump: Discourage use of fdtdump", fdtdump unconditionally prints a message discouraging its own use except for debugging purposes. This shows up messily in the "make check" output, so suppress it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-05-17dtc: check.c fix compile errorShuah Khan
Fix the following compile error found on odroid-xu4: checks.c: In function ‘check_simple_bus_reg’: checks.c:876:41: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t{aka long long unsigned int}’ [-Werror=format=] snprintf(unit_addr, sizeof(unit_addr), "%lx", reg); ^ checks.c:876:41: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t {aka long long unsigned int}’ [-Werror=format=] cc1: all warnings being treated as errors Makefile:304: recipe for target 'checks.o' failed make: *** [checks.o] Error 1 Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> [dwg: Correct new format to be correct in general] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-05-11libfdt: Android.mk -> Android.bp am: b1d8b2cd5e am: 1531615a95 am: 50b39e5896android-o-mr1-iot-release-smart-display-r40.1Jandroid-o-mr1-iot-release-smart-display-r39android-o-mr1-iot-release-smart-display-r30android-o-mr1-iot-release-smart-display-r22android-o-mr1-iot-release-smart-display-r14oreo-mr1-devoreo-dr1-devSteven Moreland
am: e3169bcf71 -s ours Change-Id: If1324b4c48a2faa357e3a8ca90eccd927fd1d249
2017-05-11libfdt: Android.mk -> Android.bp am: b1d8b2cd5e am: 1531615a95android-o-mr1-preview-2android-o-mr1-preview-1Steven Moreland
am: 50b39e5896 Change-Id: I6c1a40b0b77d46e8d853b6f2e099db514f3ee058
2017-05-11libfdt: Android.mk -> Android.bp am: b1d8b2cd5eSteven Moreland
am: 1531615a95 Change-Id: I3707e5cd4540369a8fb7b98f26a23260712ff578
2017-05-11libfdt: Android.mk -> Android.bpSteven Moreland
am: b1d8b2cd5e Change-Id: I12be38dfd67da510683108c2b500f5a88ceb01d2
2017-05-10Build the dtc binary as a static executable am: 94285e0679 -s oursYueyao Zhu
am: 8148d0cfff -s ours Change-Id: I6ee1b41637855f54f968285805b4701f2089e0d0
2017-05-10Build the dtc binary as a static executableYueyao Zhu
am: 94285e0679 -s ours Change-Id: Iddf32c9b5dd2db0031beea92b57b0beba813dc0c
2017-05-08libfdt: Android.mk -> Android.bpandroid-o-preview-4android-o-preview-3android-o-iot-preview-5android-n-iot-preview-4o-iot-preview-5n-iot-preview-4Steven Moreland
Test: links Bug: 37512442 Merged-In: I150e4538451c2c446e243792f3321603ba9125fa Change-Id: I150e4538451c2c446e243792f3321603ba9125fa
2017-05-08libfdt: Android.mk -> Android.bpSteven Moreland
Test: links Bug: 37512442 Change-Id: I150e4538451c2c446e243792f3321603ba9125fa
2017-05-06Build the dtc binary as a static executableandroid-vts-8.0_r9android-vts-8.0_r8android-vts-8.0_r7android-vts-8.0_r6android-vts-8.0_r2android-vts-8.0_r13android-vts-8.0_r12android-vts-8.0_r11android-vts-8.0_r10android-vts-8.0_r1android-security-8.0.0_r54android-security-8.0.0_r53android-security-8.0.0_r52android-cts-8.0_r9android-cts-8.0_r8android-cts-8.0_r7android-cts-8.0_r6android-cts-8.0_r5android-cts-8.0_r4android-cts-8.0_r3android-cts-8.0_r26android-cts-8.0_r25android-cts-8.0_r24android-cts-8.0_r23android-cts-8.0_r22android-cts-8.0_r21android-cts-8.0_r20android-cts-8.0_r2android-cts-8.0_r19android-cts-8.0_r18android-cts-8.0_r17android-cts-8.0_r16android-cts-8.0_r15android-cts-8.0_r14android-cts-8.0_r13android-cts-8.0_r12android-cts-8.0_r11android-cts-8.0_r10android-cts-8.0_r1android-cts-7.1_r18android-8.0.0_r9android-8.0.0_r7android-8.0.0_r51android-8.0.0_r50android-8.0.0_r49android-8.0.0_r48android-8.0.0_r47android-8.0.0_r46android-8.0.0_r45android-8.0.0_r44android-8.0.0_r43android-8.0.0_r42android-8.0.0_r41android-8.0.0_r40android-8.0.0_r4android-8.0.0_r39android-8.0.0_r38android-8.0.0_r37android-8.0.0_r36android-8.0.0_r35android-8.0.0_r32android-8.0.0_r31android-8.0.0_r30android-8.0.0_r3android-8.0.0_r29android-8.0.0_r28android-8.0.0_r2android-8.0.0_r17android-8.0.0_r16android-8.0.0_r15android-8.0.0_r13android-8.0.0_r12android-8.0.0_r11android-8.0.0_r10android-8.0.0_r1security-oc-releaseoreo-vts-releaseoreo-security-releaseoreo-releaseoreo-r6-releaseoreo-r5-releaseoreo-r4-releaseoreo-r3-releaseoreo-r2-releaseoreo-devoreo-cts-releaseYueyao Zhu
This enables the dtc binary to be used without dependencies on shared libraries, for instance, when the binary is copied to be used in the Android kernel build process. Bug: 38007786 Test: mmm -j8 external/dtc , ldd out/host/linux-x86/bin/dtc Change-Id: Ic566104dc8064bdea12a9d3e0c442b518dc5d2ec Merged-In: Ic566104dc8064bdea12a9d3e0c442b518dc5d2ec (cherry picked from commit 9dfa11ddc415aec92f9ffed55d86cb3ba77c9a29)
2017-05-05Build the dtc binary as a static executable am: 8aa4d201f0 am: bcd3cbea51 ↵Yueyao Zhu
am: d6fd0c33bf am: e9e99f171c -s ours Change-Id: I2d8c669de26d2d7346b89af4843e94b2fd6a8993
2017-05-05Build the dtc binary as a static executable am: 8aa4d201f0 am: bcd3cbea51Yueyao Zhu
am: d6fd0c33bf Change-Id: Ib072cbbc438f1680fba8b5223fcdaef1cfcb3152
2017-05-05Build the dtc binary as a static executable am: 8aa4d201f0Yueyao Zhu
am: bcd3cbea51 Change-Id: I7ada2548d57cc207c24d18ea443e9e144b7809d0
2017-05-05Build the dtc binary as a static executableYueyao Zhu
am: 8aa4d201f0 Change-Id: Ifdb335ed6382f7a59cdf10e9a2b9ff0139aed088
2017-05-05Build the dtc binary as a static executableYueyao Zhu
This enables the dtc binary to be used without dependencies on shared libraries, for instance, when the binary is copied to be used in the Android kernel build process. Test: mmm -j8 external/dtc , ldd out/host/linux-x86/bin/dtc Change-Id: Ic566104dc8064bdea12a9d3e0c442b518dc5d2ec Merged-In: Ic566104dc8064bdea12a9d3e0c442b518dc5d2ec (cherry picked from commit 9dfa11ddc415aec92f9ffed55d86cb3ba77c9a29)
2017-04-25Update to dtc-1.4.4 am: 41c88b14dc am: 6df03f022a am: 7d937e38e5SzuWei Lin
am: 37038130ec Change-Id: I7186dafae6b3802cfd6a77db5f0dc3a10568663e
2017-04-25Update to dtc-1.4.4 am: 41c88b14dc am: 6df03f022aSzuWei Lin
am: 7d937e38e5 Change-Id: I4fcfdf79c98fe364d8af4a03cb65987a28b3fb4d
2017-04-25Update to dtc-1.4.4 am: 41c88b14dcSzuWei Lin
am: 6df03f022a Change-Id: I8254dda57d4fb478662ce38fa667d20d40e9ced6
2017-04-25Update to dtc-1.4.4SzuWei Lin
am: 41c88b14dc Change-Id: I3cb62d3625393743c3eebb8783b4e54d4ec18d10
2017-04-25Update to dtc-1.4.4android-wear-o-preview-4android-wear-o-preview-3android-o-preview-2SzuWei Lin
Merge dtc to upstream 558cd81bdd432769b59bff01240c44f82cfb1a9d and merge history Bug: 37655045 Test: Build dtc, use output dtc to build dts, can output correct dtb. Change-Id: Ibd9a82768e999bc46e6de349ca97ba6447e85455
2017-04-19Fix get_node_by_path string equality checkTim Montague
When determining if to recurse into a node, get_node_by_path does not check if the length of each node name is equal. If searching for /foo/baz, this can result in recursing into /foobar because strneq("foo", "foobar", 3) is true. This can result in a reference to /foo/baz to be incorrectly set to /foobar/baz. A test for this was added. Signed-off-by: Tim Montague <tmontague@ghs.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-04-18Disable warnings am: a588718122 am: f59ca1e0a4 am: 4f7feb8853SzuWei Lin
am: 4d8c6e0bc9 Change-Id: I98f81b79926053d0eff324e7c65fdc91d228af2e
2017-04-18Disable warnings am: a588718122 am: f59ca1e0a4SzuWei Lin
am: 4f7feb8853 Change-Id: Ic34131a8d2e6592855dcadb5a3becbf183d71191
2017-04-18Disable warnings am: a588718122SzuWei Lin
am: f59ca1e0a4 Change-Id: If3208730b9f4639f51788d1c05d8a683734e109d
2017-04-18Disable warningsSzuWei Lin
am: a588718122 Change-Id: I1cf4fac92634dde0ef1f2c4eee98e8b384034ddb
2017-04-18Disable warningsSzuWei Lin
Bug: 37428404 Test: mmm external/dtc Change-Id: I5fd964f3639c8fa1f864617f2a90337c55ad8fa1
2017-04-18fdtdump: Discourage use of fdtdumpDavid Gibson
fdtdump is, and always has been, a quick-and-dirty debugging tool. However I keep getting reports of people using it for real work. For production decompiling of a dtb, dtc in -I dtb -O dts mode is the right tool. In the hopes of getting that message out there, add a warning message to fdtdump to discourage its use. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-04-18fdtdump: Fix over-zealous version checkDavid Gibson
It's perfectly valid for a dtb to have version and last compat version set to the same value, and that value can be 17 (the latest defined version). However, since 0931cea "dtc: fdtdump: check fdt if not in scanning mode" fdtdump will refuse to process such a dtb. We get away with this in many cases because dtc's typical output has last compat version equal to 16, rather than 17, but it's still a bug. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-04-09Fix a few whitespace and style nitsSimon Glass
These were noticed when synching with U-Boot's downstream tree. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-04-08pylibfdt: Use setup.py to build the swig fileSimon Glass
Since we are using the standard .i extension for the swig file, we can use setup.py to build the wrapper. Drop the existing build code since it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-04-08pylibfdt: Use Makefile constructs to implement NO_PYTHONSimon Glass
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 Glass
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-04-07Add Coverity Scan supportDavid Gibson
I've recently signed up dtc for Coverity Scan coverage. This adds magic to the .travis.yml file to submit builds to Coverity for analysis. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-04-07pylibfdt: Fix code style in setup.pySimon Glass
We should follow PEP8 even for our setup() call. 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-07pylibfdt: Rename libfdt.swig to libfdt.iSimon Glass
The .i extension allows Python distutils to automatically handle the swig file. Rename it. 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-05Add dtc to dist artifactsYueyao Zhu
Test: make dist Change-Id: Idf88072a9d858830e5d84b7ea8de6550de718534
2017-04-02Add a libfdt function to write a property placeholderSimon Glass
The existing function to add a new property to a tree being built requires that the entire contents of the new property be passed in. For some applications it is more convenient to be able to add the property contents later, perhaps by reading from a file. This avoids double-buffering of the contents. Add a new function to support this and adjust the existing fdt_property() to use it. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-28Build the dtc binary as a static executableYueyao Zhu
This enables the dtc binary to be used without dependencies on shared libraries, for instance, when the binary is copied to be used in the Android kernel build process. Test: mmm -j8 external/dtc , ldd out/host/linux-x86/bin/dtc Change-Id: Ic566104dc8064bdea12a9d3e0c442b518dc5d2ec
2017-03-29pylibfdt: Use the call function to simplify the MakefileSimon Glass
This is in a separate patch since I not sure if GNU make features are permitted in the Makefile. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-29pylibfdt: Use the correct libfdt version in the moduleSimon Glass
Use the same version number in the module as with the rest of libfdt. This can be examined with: import pkg_resources print pkg_resources.require('libfdt')[0].version Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>