public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] PPC as host
@ 2004-10-25 15:59 VanBaren, Gerald
  2004-10-25 17:20 ` Richard Klingler
  0 siblings, 1 reply; 5+ messages in thread
From: VanBaren, Gerald @ 2004-10-25 15:59 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: u-boot-users-admin at lists.sourceforge.net
> [mailto:u-boot-users-admin at lists.sourceforge.net] On Behalf
> Of Richard Klingler
> Sent: Monday, October 25, 2004 11:02 AM
> To: u-boot-users
> Subject: [U-Boot-Users] PPC as host
>
> Evening (o;
>
>
> Apparently no one uses Linux PPC as host?
> So no one ever had problems cross-compiling u-boot for
> another target then (o;
>
>
> In the top Makefile we have:
>
> ifndef CROSS_COMPILE
> ifeq ($(HOSTARCH),ppc)
> CROSS_COMPILE =
> else
> ....
>
> which always picks up the host ppc compiler regardless what
> ARCH you have defined for your board...
>
>
> Since I don't use PPC as target someone might come up with a
> better idea then:
>
> ifeq ($(HOSTARCH,$(ARCH))
> CROSS_COMPILE =
> else
> ...
>
>
> In my case it is YDL-3.0.1 PPC Linux running on G4.
> This doesn't happen on OSX since it is solved in the top
> config.mk file.
>
>
> best regards
> rick


The Makefile makes its best guess about cross compilers given very
limited information.  It may guess wrong, as you are seeing.

For more information, see:
  http://www.denx.de/twiki/bin/view/DULG/ELDKUsage

<blockquote>
    *  After the installation utility completes, export the
CROSS_COMPILE variable:

bash$ export CROSS_COMPILE=ppc_8xx-

      TIP The trailing '-' character in the CROSS_COMPILE variable value
is optional and has no effect on the cross tools behavior.
</blockquote>

A related hint (if you don't like the export hint) is in
  http://www.denx.de/twiki/bin/view/DULG/LinuxConfiguration

<blockquote>
If your host computer is not the same architecture as the target system,
and if you got your kernel tree from kernel.org or other "official"
sources, then you may have to supply an architecture override and a
cross compiler definition. The most reliable way to do this is to
specify them on the make command line as part of the make command. If
this is the case, use for example:

bash$ make ARCH=ppc CROSS_COMPILE=ppc_8xx-
</blockquote>

gvb

******************************************
The following messages are brought to you by the Lawyers' League of
IdioSpeak:

******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET
@ 2004-10-25 14:46 VanBaren, Gerald
  2004-10-25 15:02 ` [U-Boot-Users] PPC as host Richard Klingler
  0 siblings, 1 reply; 5+ messages in thread
From: VanBaren, Gerald @ 2004-10-25 14:46 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Steven Scholz [mailto:steven.scholz at imc-berlin.de]
> Sent: Monday, October 25, 2004 10:40 AM
> To: VanBaren, Gerald (AGRE)
> Cc: u-boot-users
> Subject: Re: [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET
>
> Hi Gerald,
>
> > I like your suggestion a lot, but I would suggest a "#ifdef" around
> > the common.h kind of like I hand-pasted in below (probably
> > incorrectly, but you get my meaning).
>
> >  int board_postclk_init (void);
> >  int board_early_init_r (void);
> >  void board_poweroff (void);
> > +#ifdef CONFIG_BOARD_PRE_RESET
> > +void board_pre_reset (void);
> > +#endif
>
> Since functions like board_postclk_init and
> board_early_init_r etc. don't have an #ifdef I decided to go
> the same way.
>
> Do you see any problems without #ifdef ?
>
> --
> Steven Scholz

The reason I suggested the #ifdef is because the actual code
implementation is surrounded by the #ifdef so, if you don't have
CONFIG_BOARD_PRE_RESET defined, you will have a declaration of
board_pre_reset() but no code implementing it.  I forgot off-hand if
this is a problem, but I think it is (too lazy to be a language lawyer
at the moment).

gvb

******************************************
The following messages are brought to you by the Lawyers' League of
IdioSpeak:

******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-25 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-25 15:59 [U-Boot-Users] PPC as host VanBaren, Gerald
2004-10-25 17:20 ` Richard Klingler
2004-10-25 17:59   ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2004-10-25 14:46 [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET VanBaren, Gerald
2004-10-25 15:02 ` [U-Boot-Users] PPC as host Richard Klingler
2004-10-25 17:57   ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox