[PATCH] Add support for binary includes.

Bartlomiej Sieka tur at semihalf.com
Wed Jun 4 22:36:42 EST 2008


David Gibson wrote:
> On Fri, May 30, 2008 at 01:54:59PM -0500, Scott Wood wrote:
>> David Gibson wrote:
>>> What I don't like is the combination of the two.  Using the /word/
>>> form in (1) suggests that each /word/ is a lexically distinct symbol
>>> with functions in different contexts: consider /dts-v1/, /include/,
>>> /memreserve/ - they're all used only in their own distinct context.
>>> Use of /word/s in (2) would suggest that each /word/ is just an
>>> identifier for a different function, and should all be usable in a
>>> similar grammtical context - which won't be true of /memreserve/,
>>> /dts-v1/ and any other truly lexically distinct symbols we need to
>>> add.
>> I don't understand this conclusion -- I wouldn't expect to be able to  
>> use "for" or "while" at file scope of C code, just because I can use  
>> "struct", "int", or "sizeof" there.  The slashes are simply a way of  
>> creating reserved words, some of which happen to be function-like.
> 
> Heh, when I started revisiting this after my long hiatus doing other
> things, I was thinking the same way.  I still have a few misgivings,
> but then the nice thing about the slash-delimited reserved word thing
> is that even if we come up with a new, nicer syntax it's not going to
> hurt to keep the slash-form around for compatibility.
> 
> sizeof is an interesting example.  As you point out it's an example of
> a function-like reserved word, which given our existing approach to
> reserved words supports your syntax.  On the other hand, we may well
> want a sizeof operator in dtc itself as part of our expression
> support, and in that case, the "be like C" principle suggests it
> should be rendered as "sizeof" rather than "/sizeof/".
> 
> But as I said that can be dealt with in the future without breaking
> compatibility.  Objection withdrawn.

Hi,

To add one more point to the discussion: the /incbin/ syntax is being
used in the new image format of U-Boot (we're using dtc with original
patch by Scott Wood, i.e.,
http://www.nabble.com/-PATCH--Add-support-for-binary-includes.-td15596760.html).

If possible, it would be good to have the original syntax preserved once
the feature is merged into the mainline dtc. BTW: any idea on when this
might happen?

Regards,
Bartlomiej




More information about the Linuxppc-dev mailing list