[okl4-developer] OKL4 2.1: Symbols 'platform' and 'platform_dir' in machine definition class of platform/<xxx>/tools/machine.py
Geoffrey Lee
glee at ok-labs.com
Fri Jul 11 17:28:25 EST 2008
On Thu, Jul 10, 2008 at 05:13:10PM +0200, Frank Kaiser wrote:
> Hi, Geoffrey
>
Hi Frank
> >
> > You can use machine.__name__ to get the name of the machine as
> > a text string, rather than testing for the platform value.
> >
> I do not see, how this hint can help me. Within
> 'platform/<platform_dir>/tools/machines.py' I have no means to influence
> the mapping between the platform name and its directory as long as
> 'pistachio/SConscript' handles the interpretation of the symbols
> 'platform' and 'platform_dir' the way I have described. If I'd have to
> change something outside my platform files anyway, then I could well
> stay with the change in 'pistachio/SConscript' I have already done.
> Since you have agreed that the 'subplatform' approach will not work with
> my constraints, I'd appreciate if a solution could be implemented that
> allows sharing of a platform directory solely by settings in
> 'machines.py'.
The way that I understood your question was that we should
be able to have one platform directory, and the differences
can be based on the subplatform conditional compile define.
When it comes to generating the boot image, you would need
to edit the projects/iguana/SConstruct. However, you may
base the conditional tests on either the platform name,
which you can obtain with machine.platform, or
alternatively, the specific machine target with machine.__name__.
Hence, to summarize, you have one platform directory, and one platform name.
You however, have two machine targets, one for each variant.
For each of those machine targets, you specify the platform
field to be the same thing, because the build system picks
the platform-specific code based on that. However, they should
have different subplatform names because you can use the subplatform
name to determine which code to conditionally compile. Am I
misunderstanding your question in some way? If I am, could
you please reword or rephrase to help me understand what you
are trying to achieve?
-gl
More information about the Developer
mailing list