[okl4-developer] OKL4 2.1: Symbols 'platform' and'platform_dir' in machine definition class ofplatform/<xxx>/tools/machine.py
Frank Kaiser
frank.kaiser at opensynergy.com
Wed Jul 9 18:58:34 EST 2008
> -----Original Message-----
> From: Geoffrey Lee [mailto:glee at ok-labs.com]
> Sent: Wednesday, July 09, 2008 6:46 AM
> To: Frank Kaiser
> Cc: developer at okl4.org
> Subject: Re: [okl4-developer] OKL4 2.1: Symbols 'platform'
and'platform_dir'
> in machine definition class ofplatform/<xxx>/tools/machine.py
>
> On Tue, Jul 08, 2008 at 07:07:26PM +0200, Frank Kaiser wrote:
> > Hello
> >
> > There is another concept to support multiple platforms from the same
> > sources: that is introducing subplatforms. However, this approach
> > requires their introduction into the generic build scripts of
PISTACHIO
> > and IGUANA (as can be seen with the s3c2410 platform), that is why I
> > dismissed this solution.
>
> Hi Frank
>
> If you have a subplatform defined, the Pistachio build scripts will
> set the CONFIG_SUBPLAT_XXX define, hence you can still base your
> differences on a subplatform define. This should be the preferred
> way of doing things. Would this scheme work for you? Can you
> let us know specifically the place in the system where you would have
> to modify the generic build scripts to achieve your goal?
>
> -gl
>
> --
Hello, Geoffrey
Thanks for hinting me on that 'CONFIG_SUBPLAT_XXX define' scheme (I
found it now in 'pistachio/Sconscript'). Is this documented anywhere? My
current knowledge of the build system is mainly based on analysing the
build scripts.
The other platform I'd like to support is based on an AT91RM9200 which
uses an ARM920T core. Therefore its 'machine' definition has to inherit
the class 'arm920t' while the other one (based on AT91SAM9263) inherits
class 'arm926ejs'. If I got it right, this requires two separate class
definitions for each machine which have to have a different 'platform'
value, otherwiese the script code in 'tools/build.py', which reads all
'machine' classes and selects the platform to be used for build, would
get confused.
Despite the different cores both processors have a number of identical
peripherals so that I can reuse at least 3/4 of my platform-dependent
code. So I get to the point that I have one source code directory but
two platforms with different names, and I see no other option but to
decouple the platform name from the platform directory as I have done.
My remark on other disadvantages of the 'subplatform' scheme was mainly
driven by some script code in 'iguana/Sconstruct' (line 826ff), where
default build targets and other stuff are defined dependent on the
selected machine.
Regards
Frank
More information about the Developer
mailing list