Subject: Re: how to detect at runtime which system you're running on...
To: Todd Vierling <tv@wasabisystems.com>
From: Chris Gilbert <chris@paradox.demon.co.uk>
List: port-arm
Date: 06/19/2001 23:48:06
On Tuesday 19 June 2001 10:58 pm, Todd Vierling wrote:
> On Tue, 19 Jun 2001, Chris Gilbert wrote:
> : What I really meant the platform, IE CATS and EBSA are identical bar one
> : section of code in footbridge_pci.c, so the arch is cats, but the
> : platform is ebsa or cats. However footbridge is shared with netwinder,
> : so the variable either becomes footbridge specific, or I generalise it.
> : So that anyone looking at the code sees:
> :
> : if (platform_type == pt_EBSA)
> : or
> : if (platform_type == pt_A7000)
> :
> : they can clearly see what it means, for archs that are just one platform
> : it's just a macro, and gets delt with at compile_time.
>
> It should be a footbridge-specific variable, but you can name it whatever
> you like. You have to detect the difference somehow, so that detection
> should set an appropriate flag.
doh, of course when I come to look more closely at the merge, I realise that
in fact the cats and ebsa both use options EBSA285, so I can change the code
to #ifdef cats, and completely eliminate the defopt EBSA285 and opt_ebsa285.
Perhaps I should really have used ebsa as the arch dir name instead of cats.
Cheers,
Chris