-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Labels
area: Devicetreearea: Devicetree ToolingPR modifies or adds a Device Tree toolingPR modifies or adds a Device Tree toolingbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug
Milestone
Description
Describe the bug
dtc errors out on duplicate node names:
$ cat foo.dts
/dts-v1/;
/ {
blub: foo@1234 {
reg = <1234 4>;
bar = <1>;
};
blab: foo@1234 {
reg = <1234 4>;
baz = <2>;
};
};
$ dtc -Odts foo.dts
foo.dts:8.17-10.4: ERROR (duplicate_node_names): /foo@1234: Duplicate node name
ERROR: Input tree has errors, aborting (use -f to force output)
Zephyr's dtlib doesn't:
$ cat samples/hello_world/app.overlay
/ {
blub: foo@1234 {
reg = <1234 4>;
bar = <1>;
};
blab: foo@1234 {
reg = <1234 4>;
baz = <2>;
};
};
$ west build --cmake-only samples/hello_world # no errors
Expected behavior
Our DT parser should be equivalent to dtc and therefore should error out.
Impact
We accept garbage DT files that have duplicate nodes.
Additional context
Originally reported in https://github.com/zephyrproject-rtos/zephyr/pull/48949/files#r955645210
de-nordic
Metadata
Metadata
Assignees
Labels
area: Devicetreearea: Devicetree ToolingPR modifies or adds a Device Tree toolingPR modifies or adds a Device Tree toolingbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug