From: Simon Goldschmidt Date: Mon, 21 Jan 2019 10:02:23 +0100 Subject: [U-Boot] [PATCH] dtoc: make generated platdata structs const In-Reply-To: References: <20190107192926.26919-1-simon.k.r.goldschmidt@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, Am 20.01.2019 um 21:23 schrieb Simon Glass: > Hi Simon, > > On Tue, 8 Jan 2019 at 08:29, Simon Goldschmidt > wrote: >> >> 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 > > 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 > > Regards, > Simon > >> --- >> >> tools/dtoc/dtb_platdata.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py >> index 6cb1259446..ca580b45d4 100644 >> --- a/tools/dtoc/dtb_platdata.py >> +++ b/tools/dtoc/dtb_platdata.py >> @@ -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 >>