Skip to content
Snippets Groups Projects
Commit 6b6024a3 authored by Simon Glass's avatar Simon Glass
Browse files

dtoc: Replace dot with underscore to avoid compiler errors


If there is a '.' in a compatible string, then dtoc will produce a struct
with a name containing a '.'. This won't work, so replace it with '_'.

Also add a suitable test to the sandbox device tree to catch this.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent e9b25f2e
No related branches found
No related tags found
No related merge requests found
......@@ -203,6 +203,11 @@
stringarray = "one";
};
spl-test4 {
u-boot,dm-pre-reloc;
compatible = "sandbox,spl-test.2";
};
square {
compatible = "demo-shape";
colour = "blue";
......
......@@ -54,6 +54,7 @@ def Conv_name_to_c(name):
str = name.replace('@', '_at_')
str = str.replace('-', '_')
str = str.replace(',', '_')
str = str.replace('.', '_')
str = str.replace('/', '__')
return str
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment