dtoc: make generated platdata structs const
PATCH 1/1 dtoc: make generated platdata structs const
The platdata initialization structs are currently generated into .rwdata. Make sure the are put into .rodata by generating them as const.
---
tools/dtoc/dtb_platdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/dtoc/dtb_platdata.py +1 -1
@@ -461,7 +461,7 @@ class DtbPlatdata(object): """ struct_name, _ = get_compat_name(node) var_name = conv_name_to_c(node.name) - self.buf('static struct %s%s %s%s = {\n' % + self.buf('static const struct %s%s %s%s = {\n' % (STRUCT_PREFIX, struct_name, VAL_PREFIX, var_name)) for pname, prop in node.props.items(): if pname in PROP_IGNORE_LIST or pname[0] == '#':
Signature · 1 line
2.17.1
PATCH 1/1 dtoc: make generated platdata structs const
Quoted 9 lines · Simon Goldschmidt
The platdata initialization structs are currently generated into .rwdata. Make sure the are put into .rodata by generating them as const.
Signed-off-by Simon Goldschmidt <[email protected]>---
tools/dtoc/dtb_platdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines · Simon Goldschmidt
The platdata initialization structs are currently generated into .rwdata. Make sure the are put into .rodata by generating them as const.
Signed-off-by Simon Goldschmidt <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190115/5171d3d6/attachment.sig>
PATCH 1/1 dtoc: make generated platdata structs const
In reply to Simon GoldschmidtQuoted 8 lines · Simon Goldschmidt
The platdata initialization structs are currently generated into .rwdata. Make sure the are put into .rodata by generating them as const.
Signed-off-by Simon Goldschmidt <[email protected]>
PATCH 1/1 dtoc: make generated platdata structs const
In reply to Simon GoldschmidtHi Simon,
Quoted 5 lines · Simon Goldschmidt
The platdata initialization structs are currently generated into .rwdata. Make sure the are put into .rodata by generating them as const.
Signed-off-by Simon Goldschmidt <[email protected]>
Unfortunately this breaks the dtoc and binman tests (make qcheck). Can you please take a look?
Regards,
Simon
Quoted 21 lines
---
tools/dtoc/dtb_platdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/dtoc/dtb_platdata.py +1
-2@@ -461,7 +461,7 @@ class DtbPlatdata(object): """ struct_name, _ = get_compat_name(node) var_name = conv_name_to_c(node.name) - self.buf('static struct %s%s %s%s = {\n' % + self.buf('static const struct %s%s %s%s = {\n' % (STRUCT_PREFIX, struct_name, VAL_PREFIX, var_name)) for pname, prop in node.props.items(): if pname in PROP_IGNORE_LIST or pname[0] == '#': --2.17.1
PATCH 1/1 dtoc: make generated platdata structs const
Hi Simon,
Am 20.01.2019 um 21:23 schrieb Simon Glass:
Quoted 5 lines
Hi Simon,
Quoted 1 line · Simon Goldschmidt
Quoted 7 lines
Quoted 4 lines
The platdata initialization structs are currently generated into .rwdata. Make sure the are put into .rodata by generating them as const.
Signed-off-by Simon Goldschmidt <[email protected]>Unfortunately this breaks the dtoc and binman tests (make qcheck). Can you please take a look?
Yes, sorry, I wasn't aware of that.
I'll fix the dtoc tests, but I don't get binman test failures, so I don't know what I should fix there...
Regards,
Simon
Quoted 25 lines
Regards,
SimonQuoted 21 lines
---
tools/dtoc/dtb_platdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/dtoc/dtb_platdata.py +1
-2@@ -461,7 +461,7 @@ class DtbPlatdata(object): """ struct_name, _ = get_compat_name(node) var_name = conv_name_to_c(node.name) - self.buf('static struct %s%s %s%s = {\n' % + self.buf('static const struct %s%s %s%s = {\n' % (STRUCT_PREFIX, struct_name, VAL_PREFIX, var_name)) for pname, prop in node.props.items(): if pname in PROP_IGNORE_LIST or pname[0] == '#': --2.17.1