* [U-Boot-Users] Identify an U-boot compilation
@ 2008-03-14 13:43 Luigi 'Comio' Mantellini
2008-03-24 11:38 ` Luigi 'Comio' Mantellini
0 siblings, 1 reply; 2+ messages in thread
From: Luigi 'Comio' Mantellini @ 2008-03-14 13:43 UTC (permalink / raw)
To: u-boot
Hi All,
Is there a symbol (like __U_BOO_T__) that is defined during U-Boot
compilation and that I can test into my .c/.h source files?
I have a self-made library that is shared between the bootloader and the
linux kernel.
Obviously the source paths and includes are different in the two
environment and I need to choose the correct code on the basis of the
target enviroment.
In the linux kernel I can use symbol like "__LINUX__" to understand that
the actual compilation is referred to the Linux Kernel... but I don't
find an similar symbol define in U-Boot.
I would write code like:
...
#if defined(__U_BOOT__)
/* U-boot specific code */
...
#elsif defined(__LINUX__)
/*Kernel specific code */
#endif
...
Is there a similar mechanism in U-BOOT building infrastructure? (anyway,
can we insert a -D__U_BOOT__ in the compiler invocation?)
Thanks a lot,
luigi
--
______ Luigi Mantellini
.'______'. R&D - Software
(.' '.) Industrie Dial Face S.p.A.
( :=----=: ) Via Canzo, 4
('.______.') 20068 Peschiera Borromeo (MI), Italy
'.______.' Tel.: +39 02 5167 2813
Fax: +39 02 5167 2459
Ind. Dial Face Email: luigi.mantellini at idf-hit.com
www.idf-hit.com GPG fingerprint: 3DD1 7B71 FBDF 6376 1B4A
B003 175F E979 907E 1650
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot-Users] Identify an U-boot compilation
2008-03-14 13:43 [U-Boot-Users] Identify an U-boot compilation Luigi 'Comio' Mantellini
@ 2008-03-24 11:38 ` Luigi 'Comio' Mantellini
0 siblings, 0 replies; 2+ messages in thread
From: Luigi 'Comio' Mantellini @ 2008-03-24 11:38 UTC (permalink / raw)
To: u-boot
any idea?
On ven, 2008-03-14 at 14:43 +0100, Luigi 'Comio' Mantellini wrote:
> Hi All,
>
> Is there a symbol (like __U_BOO_T__) that is defined during U-Boot
> compilation and that I can test into my .c/.h source files?
>
> I have a self-made library that is shared between the bootloader and the
> linux kernel.
> Obviously the source paths and includes are different in the two
> environment and I need to choose the correct code on the basis of the
> target enviroment.
>
> In the linux kernel I can use symbol like "__LINUX__" to understand that
> the actual compilation is referred to the Linux Kernel... but I don't
> find an similar symbol define in U-Boot.
>
> I would write code like:
> ...
> #if defined(__U_BOOT__)
> /* U-boot specific code */
> ...
> #elsif defined(__LINUX__)
> /*Kernel specific code */
> #endif
> ...
>
> Is there a similar mechanism in U-BOOT building infrastructure? (anyway,
> can we insert a -D__U_BOOT__ in the compiler invocation?)
>
> Thanks a lot,
>
> luigi
>
Industrie Dial Face S.p.A.
Luigi Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4
20068 Peschiera Borromeo (MI), Italy
Tel.: +39 02 5167 2813
Fax: +39 02 5167 2459
E-mail: luigi.mantellini at idf-hit.com
GPG fingerprint: 3DD1 7B71 FBDF 6376
1B4A
B003 175F E979 907E
1650
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080324/4f29f179/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: idf_logo.gif
Type: image/gif
Size: 4122 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080324/4f29f179/attachment.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080324/4f29f179/attachment.pgp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-24 11:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 13:43 [U-Boot-Users] Identify an U-boot compilation Luigi 'Comio' Mantellini
2008-03-24 11:38 ` Luigi 'Comio' Mantellini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox