[U-Boot] [PATCH 9/9] Move api_examples to api/examples

Rafal Jaworowski raj at semihalf.com
Fri Jul 10 15:22:35 CEST 2009


On 2009-07-09, at 18:36, Peter Tyser wrote:

> On Thu, 2009-07-09 at 18:22 +0200, Rafal Jaworowski wrote:
>> On 2009-07-09, at 17:08, Peter Tyser wrote:
>>
>>> Signed-off-by: Peter Tyser <ptyser at xes-inc.com>
>>> ---
>>> Makefile                                    |    4 ++--
>>> {api_examples => api/examples}/.gitignore   |    0
>>> {api_examples => api/examples}/Makefile     |    8 ++++----
>>> {api_examples => api/examples}/crt0.S       |    0
>>> {api_examples => api/examples}/demo.c       |    0
>>> {api_examples => api/examples}/glue.c       |    0
>>> {api_examples => api/examples}/glue.h       |    0
>>> {api_examples => api/examples}/libgenwrap.c |    0
>>
>> Hi Peter,
>> Please don't do this. I would like to have api_examples stay clear
>> from the API proper and such organization was introduced on purpose.
>> While the core API code is integral part of U-Boot code image, the
>> example/demo/other app is physically separate tangible entity. I  
>> think
>> it seems proper that directories' layout reflects this. What we could
>> do is provide a top level directory grouping all items non-integral
>> wrt U-Boot itself (examples, api_examples) and put them there.
>
> Hi Rafal,
> I don't really follow...  The api_example/ directory is an example of
> how to use the functionality provided by the code in the api/  
> directory,
> right?  If so, they are very closely related and I'd argue that the
> api_example/ directory should be moved into api/ since conceptually it
> makes more sense as well as cleans up the directory structure.

The API core and its example/demo app are indeed closely related, but  
the example/demo code is complementary to the core API, not part of  
it. My concern is that putting examples in the core API directory is  
misleading as would give an impression of the example being part of  
the API, where it's a physically separate thing pertaining to another  
domain (standalone applications as opposed to the integral U-Boot  
code); I would prefer to keep them separate.

> If the number of API applications grows from the current "example",
> we're not going to put them in their own /api_app1, /api_app2, etc
> directories, are we?  Wouldn't /api/app1, /api/app2, etc make more
> sense?

When we grow more example apps, they could simply all live in the  
api_examples directory (which can be managed with a single makefile).

kind regards,
Rafal



More information about the U-Boot mailing list