summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-09-14dtc: Fix -Wincompatible-pointer-types-discards-qualifiers warningsbanksia-dev Alexander Koskovich
Change-Id: I983c52fd255f1a338e847b21c6e5f54ba6aa0730
2025-09-14libfdt: overlay_merge: Fix copy_node for multiple phandles Wasim Nazir
Update local fixups property with multiple phandles if any. Change-Id: Ic8be4ad29f59ecef07f11a0592989c979e66ea81 Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
2025-09-14libfdt: overlay_merge: Fix phandle errors with proper path fix Wasim Nazir
Add debug logs for more debugging. Change-Id: I54c23072fbf6f32b5ca3ae97d7a598b1cfeddca2 Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
2025-09-14libfdt: overlay_merge: Fix incorrect reference to nodes Srivatsa Vaddagiri
local_fixups node could have incorrect references to nodes when merging two overlay blobs. Consider this example: ol1.dtbo: /fragment@0 { __overlay__ { soc: soc { } tlmm: tlmm { } } } ol2.dtbo: /fragment@0 { target = "&soc"; __overlay__ { abc: abc { prop1 = <&tlmm>; } } } /fragment@1 { target = "&soc"; __overlay__ { def: def { prop0 = <&abc>; } } } __fixups__ { tlmm = "/fragment@0/__overlay__/abc:prop1:0"; } __local_fixups__ { fragment@1 { __overlay__ { def { prop0 = <0x0>; } } } } Merging ol2.dtbo with ol1.dtbo currently results in: __local_fixups__ { fragment@1 { __overlay__ { abc { prop1 = <0x0>; // WRONG1 } } } fragment@2 { __overlay__ { def { prop0 = <0x0>; // WRONG2 } } } } WRONG1: prop1 should be listed under /__local_fixups__/fragment@0/__overlay__/soc/abc WRONG2: prop0 should be listed under /__local_fixups__/fragment@0/__overlay__/soc/def Change-Id: If7aae9b285d0e6f78bb8ad4e9fbade2fc1e503be Signed-off-by: Srivatsa Vaddagiri <quic_svaddagi@quicinc.com> Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
2025-06-15Add build support for more host utils Aaron Kling
fdtput and fdtoverlaymerge are needed for Qualcomms dtb merge script. Change-Id: Ifab7a1a60aeb5b182d0e92f82a694a852f1dc0d7
2025-06-15libfdt: Correct the string size while renaming fragments in property Lijuan Gao
Copy the actual string size instead of the rest of property size when converting property value from fragment@M to fragment@M+delta, it maybe overwrite the next node value. Change-Id: I9ce2f0ea7a4b83cac5f7a7c9bd0c63eb229bf761 Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com>
2025-06-15libfdt: Add subnode at end of parent Elliot Berman
When merging two overlays, the order of the fragments matters because it preserves the order in which the fragments should be applied on the final devicetree. Thus, subnodes should always be added as last child to the parent, not first. Change-Id: Iaff4b8ac0996222318d1e2b8590117249565755b Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2025-06-15overlay_fixup_phandle: Save entire fixup string and length Elliot Berman
Save entire fixup string and length to use when adding to local fixups. At the end of the loop iteration, value points to the last/end of properties list. Fixes commit bdc677a4d68f ("libfdt: overlay_merge: Ignore unresolved symbols"). Change-Id: I2663b52aa64d37af7e31f03b4cc85c856499d841 Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2025-06-15overlay_add_to_local_fixups: Set fixup_str to value Elliot Berman
When looping through the fixup string, the current fixup string should be set to value on each iteration. This matches the loop in overlay_fixup_phandle. A future enhancement should "inline" overlay_add_to_local_fixups to avoid looping through the fixup string twice. Fixes commit bdc677a4d68f ("libfdt: overlay_merge: Ignore unresolved symbols"). Change-Id: I4d147551c2d9871cfecb8744aaa718ecf28f0bb7 Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2025-06-15libfdt: overlay_rename_fragments: handle no fragments in base dtb Elliot Berman
In case where base dtbo has no fragments, count_fragments returns -FDT_ERR_NOTFOUND. In this case, there is no need to rename fragments in the merged dtbo. Change-Id: Id21c5a4c582b5b16059dae5c954c451a29a49240 Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2025-06-15fdtoverlaymerge: A tool that merges overlays Rama Aparna Mallavarapu
fdtoverlaymerge is a command-line tool that merges two or more overlay blobs by making use of fdt_overlay_merge() API Change-Id: Idcd46e630436681a4bc640e7b53bc225cf5e4287 Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org> Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
2025-06-15libfdt: overlay_merge: Copy over various nodes and their properties Srivatsa Vaddagiri
Many overlay fragment nodes that don't have a target node to be overlaid in base device-tree will need to be copied over as-is into base-tree. This includes merging properties found in special nodes such as __fixups__, __symbols__ and __local_fixups__ Change-Id: I15c7e0432bda77837bd575d235536d8191dd1820 Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2025-06-15libfdt: overlay_merge: remove resolved symbols Srivatsa Vaddagiri
Merging two overlay blobs will involve merging contents of nodes such as __symbols__. Not all properties need to be merged however at the end of merge process. overlay_symbol_update() may already have updated base blob's __symbols__ node to reflect new position of some nodes from overlay blob. Remove such symbols from overlay blob's __symbols__ node, to prevent a subsequent merge of __symbols__ node of both blobs from creating duplicate entries representing same node. Change-Id: I8ce45011db3f565d903ace922870a2c2616a560c Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2025-06-15libfdt: overlay_merge: Ignore unresolved symbols Srivatsa Vaddagiri
fdt_overlay_merge(), like fdt_overlay_apply(), has to perform similar operations on DT blobs, one of which is going through external symbol references specified in __fixups__ node of overlay DT blob and resolving them in base DT blob (as performed by overlay_fixup_phandles()). Unlike overlay case though, in case of merging two overlay blobs, its quite normal that some of the external references specified in __fixups__ node are not found in base blob. Modify overlay_fixup_phandles() to understand this possibility. Change-Id: I1375e2d1d074af6b11c0c86fdd55a5bf45b3fb10 Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2025-06-15libfdt: overlay_merge: Rename fragments Srivatsa Vaddagiri
When merging two overlay blobs, fragment nodes whose target node can't be found in base blob would need to be retained as-is (including the fragment names) in the combined blob. Such unresolved symbols will also need to be listed in __fixups__ section of combined blob. This could lead to name comflicts in combined blob (two nodes with same name/path such as /fragment@0). To avoid such name conflicts in combined blob, rename all fragment@xyz in overlay blob as fragment@xyz+delta, where delta is the maximum count of fragment nodes found in base blob Change-Id: I987f60ceed1c5e05279b0c4ff998affd069d70fd Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2025-06-15libfdt: overlay_merge: Introduce fdt_overlay_merge() Srivatsa Vaddagiri
fdt_overlay_merge() merges two overlay blobs. This is largely expected to be used offline on a build machine to combine two or more overlay blobs into one. This is intended to help maintain device-tree overlay code in multiple source repositories, but merge their binary forms (overlay blobs) into one so that bootloader's task of searching for all relevant overlay blobs is simplified. This patch introduces fdt_overlay_merge() which is exactly identical to fdt_overlay_apply(). Subsequent patches will introduce required changes to merge overlay blobs. Change-Id: I2d278227f53cb08e7c5b1e90b15062a044e12930 Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2025-02-06Snap for 13025002 from cd7c2ce30c3b9de049e707a9a48961611e76bb10 to 25Q2-release Android Build Coastguard Worker
Change-Id: Ibb44414a7fb2380ca682166b545fdb6bad29509f
2025-02-06Workaround build breakage due to C++/Rust LTO Interop am: b15a268e29 am: ↵ Yi Kong
2ec107c704 Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3475510 Change-Id: I0ac909e10008418598383608464bb1c7f11b72ed Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-06Workaround build breakage due to C++/Rust LTO Interop am: b15a268e29 Yi Kong
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3475510 Change-Id: I8824cab67f57b4111a11e523c0ebde28f4874c05 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-06Workaround build breakage due to C++/Rust LTO Interop Yi Kong
The workaround was broken by change 21b18905fc65b0d0811a6c527e53297e05a0f5f3. Test: presubmit Bug: 392480646 Bug: 336916369 Change-Id: I8556d83635bbeccd42cd908b189c886101e075e9
2024-12-20Snap for 12838584 from a48a86d2187fcdbcf9d094a4e846f8b75f03398a to 25Q2-release Android Build Coastguard Worker
Change-Id: I1626d7baeb71c7759c1a102d10df9a086f55126b
2024-12-19Add janitors to the OWNERS file am: 1129de94bb am: c3de51200e Sadaf Ebrahimi
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3423629 Change-Id: I2a1b58aae553e2c60c0baade8f64a2611b6dbacc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-19Add janitors to the OWNERS file am: 1129de94bb Sadaf Ebrahimi
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3423629 Change-Id: I68b8d67534c29aa78691fc0d525cab5ea8659fa0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-18Add janitors to the OWNERS file Sadaf Ebrahimi
Test: TreeHugger Change-Id: I6d4fa522d7082de68b976b737fca0121abe29445
2024-11-02Snap for 12596896 from bc61bb4cc134a2126078a71a8567e1a213f4430e to 25Q2-release Android Build Coastguard Worker
Change-Id: I830686303c0dbc1923d42fc733cecc37ffc68f5e
2024-11-01Merge "Work around failed link with HWASan" into main am: 821748e2b8 am: ↵ Treehugger Robot
44b3aabff1 Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3326694 Change-Id: Ic944d6503fadfea222a89290a5363861488ebcf4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-01Merge "Work around failed link with HWASan" into main am: 821748e2b8 Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3326694 Change-Id: I9016f83b232d1ec2fb0a76b10749ea8a56224404 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-01Merge "Work around failed link with HWASan" into main Treehugger Robot
2024-10-30Work around failed link with HWASan Florian Mayer
Bug: 373646042 Change-Id: I55b630959f6e086e5f7ef29ed255de7923b044a4
2024-10-19Snap for 12525705 from ba8667c2a124a721dabf72bcd5d6a681162a3b61 to 25Q2-release Android Build Coastguard Worker
Change-Id: Iefb22939d02dbd717061bd3d8e62ca8130ea0bb7
2024-10-17[automerger skipped] Mark 24Q4 as merged in aosp-main-future am: f47447a9a8 ↵ Xin Li
-s ours am skip reason: Merged-In Ia12bb071538b1373f25c56dad2aef44bbad199cc with SHA-1 fbb312f2d6 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dtc/+/29932439 Change-Id: I8806e7993730159e3f56c2db7bfb1902d8b3dcb3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-17Mark 24Q4 as merged in aosp-main-future Xin Li
Bug: 373937381 Merged-In: Ia12bb071538b1373f25c56dad2aef44bbad199cc Change-Id: I6a9de2a87f118acc53175c69332aad8b0acad01e
2024-10-17Merge "Add dirgroup for trusty genrule" into main am: 525f1ec7cd am: 8b455389a9 Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3304176 Change-Id: Ia12bb071538b1373f25c56dad2aef44bbad199cc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-17Merge "Add dirgroup for trusty genrule" into main am: 525f1ec7cd Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3304176 Change-Id: I33bb058eb91fd932320a2fe29b7e2ff1b4c600e0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-17Merge "Add dirgroup for trusty genrule" into main Treehugger Robot
2024-10-12Snap for 12492053 from 809f2e3bc25c7f4557d3a0838e7ed7dcd719c2f8 to 25Q2-release Android Build Coastguard Worker
Change-Id: I3bcdb5d518b5f8ec2d0154e1463294c9e909de0c
2024-10-10ANDROID: libfdt_baremetal: Use cc_baremetal_defaults am: 3c5eb97322 am: ↵ Pierre-Clément Tosi
e671db3d1e Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3297799 Change-Id: I9185f5aa7f79b3028291c8a2647b7a44f3c6fdd4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-10ANDROID: libfdt_baremetal: Use cc_baremetal_defaults am: 3c5eb97322 Pierre-Clément Tosi
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3297799 Change-Id: I655b6eee1bf98c458c1f8dc214b1b3c8299ad008 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-10Add dirgroup for trusty genrule Inseob Kim
Bug: 358302178 Test: m lk.elf.x86_64 lk.elf.arm64 Change-Id: I368d79b88848047fc0b65c6b8da4e4f34ca6130f
2024-10-08ANDROID: Android.bp: Introduce libfdt_baremetal am: 21b18905fc am: 8dc53be867 Pierre-Clément Tosi
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3299039 Change-Id: I7e54c4800000a48b5c58f78e84b2f4a1c8e8ec82 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-08ANDROID: Android.bp: Introduce libfdt_baremetal am: 21b18905fc Pierre-Clément Tosi
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3299039 Change-Id: I73e91098f5d643b161a89312dfb065479604b9cc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-08ANDROID: libfdt_baremetal: Use cc_baremetal_defaults Pierre-Clément Tosi
Use the library to share configuration with other baremetal targets. Test: m pvmfw Change-Id: I2429f13297feb176a32281e392e832dc61e8de3d
2024-10-02ANDROID: Android.bp: Introduce libfdt_baremetal Pierre-Clément Tosi
Add dedicated library for use in baremetal environments and keep "libfdt" for userspace targets (e.g. Android or host) so that they don't have to share the same library configurations (e.g. apex_available or lto:never) when not necessary. Test: m Change-Id: I7beda90227b37a5ad6bc0f76515c4aeddfc17bb7
2024-07-24Disable LTO for cc libraries passed to rustc am: 81dc1e5c98 am: eb1a8bda10 Yabin Cui
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3190273 Change-Id: I42b5f5d5d537b9e27ce6a5bd3fc93e140f0c15c2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-24Disable LTO for cc libraries passed to rustc am: 81dc1e5c98 Yabin Cui
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3190273 Change-Id: Iee9192d8ad04d5af66a859235b6867b0c0ade0f2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-23Disable LTO for cc libraries passed to rustc Yabin Cui
Bug: http://b/336916369 Having cross-language LTO adds additional constraints in the LLVM version used by the rust and clang toolchain. Disable LTO until cross-language LTO is supported. Test: make liblibfdt with ToT clang Change-Id: I1435714a9a8643cfe55bcad774245a1093c98812
2024-04-29[automerger skipped] Empty merge of Android 24Q2 Release (ab/11526283) to ↵ Xin Li
aosp-main-future am: 2140b1d82b -s ours am skip reason: Merged-In Ic163828d753c92d5fa9b03d7f78cd52688fd00fd with SHA-1 de525a0c77 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dtc/+/27143691 Change-Id: I0682a79bf3dd7909e3c0b0eb2534646b8903cc3e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-29Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future Xin Li
Bug: 337098550 Merged-In: Ic163828d753c92d5fa9b03d7f78cd52688fd00fd Change-Id: I8661cc476f45f54193030a0b937bf5093c4b6f59
2024-04-11Upgrade dtc to v1.7.0 am: 835431ed39 am: de525a0c77 Sadaf Ebrahimi
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3015236 Change-Id: I79b412a4b6db43f158d5e29ce88a0999f838f34f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11Upgrade dtc to v1.7.0 am: 835431ed39 Sadaf Ebrahimi
Original change: https://android-review.googlesource.com/c/platform/external/dtc/+/3015236 Change-Id: Ic163828d753c92d5fa9b03d7f78cd52688fd00fd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>