* [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
` (2 more replies)
0 siblings, 3 replies; 8+ 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] 8+ messages in thread* [U-Boot-Users] PPC as host
2004-10-25 14:46 [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET VanBaren, Gerald
@ 2004-10-25 15:02 ` Richard Klingler
2004-10-25 17:57 ` Wolfgang Denk
2004-10-25 15:12 ` [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET Steven Scholz
2004-10-25 18:01 ` Wolfgang Denk
2 siblings, 1 reply; 8+ messages in thread
From: Richard Klingler @ 2004-10-25 15:02 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] PPC as host
2004-10-25 15:02 ` [U-Boot-Users] PPC as host Richard Klingler
@ 2004-10-25 17:57 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-10-25 17:57 UTC (permalink / raw)
To: u-boot
In message <1098716549.1186.7.camel@imac> you wrote:
>
> Apparently no one uses Linux PPC as host?
Not many, but some are.
> So no one ever had problems cross-compiling u-boot
> for another target then (o;
Or the problems were solved.
> 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...
Please note the "ifndef CROSS_COMPILE" - i.e. all you need to do is
provide a correct setting of the CROSS_COMPILE variable in your
environment resp. your make command line. I think this is actually
documented somewhere.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I have often regretted my speech, never my silence.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET
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 15:12 ` Steven Scholz
2004-10-25 18:01 ` Wolfgang Denk
2 siblings, 0 replies; 8+ messages in thread
From: Steven Scholz @ 2004-10-25 15:12 UTC (permalink / raw)
To: u-boot
Hi Gerald,
>>Do you see any problems without #ifdef ?
>
> 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.
This is how it's done all over the U-Boot source code.
So I take it for some kind of "coding style" ... ;-)
Steven
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET
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 15:12 ` [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET Steven Scholz
@ 2004-10-25 18:01 ` Wolfgang Denk
2 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-10-25 18:01 UTC (permalink / raw)
To: u-boot
In message <065ACD8E84315E4394C835E398C8D5EB90F44D@COSSMGMBX02.email.corp.tld> you wrote:
>
> 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).
It is not a problem.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes
and weighs 30 tons, computers in the future may have only 1,000
vacuum tubes and weigh only 1/2 tons. - Popular Mechanics, March 1949
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] PPC as host
@ 2004-10-25 15:59 VanBaren, Gerald
2004-10-25 17:20 ` Richard Klingler
0 siblings, 1 reply; 8+ 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] 8+ messages in thread* [U-Boot-Users] PPC as host
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
0 siblings, 1 reply; 8+ messages in thread
From: Richard Klingler @ 2004-10-25 17:20 UTC (permalink / raw)
To: u-boot
> The Makefile makes its best guess about cross compilers given very
> limited information. It may guess wrong, as you are seeing.
In this case it doesn't even 'guess' when cross-compiling for
example with target bfin-elf- (o;
>
> 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-
I'm aware of CROSS_COMPILE though admit never read ELDK manuals
since I just don't do PPC development (o;
Just mentioned that there would be an easy fix for cross-compiling
for NON-PPC platforms...but if it's written by Wolfgang..so it should be
(o;
rick
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] PPC as host
2004-10-25 17:20 ` Richard Klingler
@ 2004-10-25 17:59 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-10-25 17:59 UTC (permalink / raw)
To: u-boot
In message <1098724833.1186.15.camel@imac> you wrote:
>
> > The Makefile makes its best guess about cross compilers given very
> > limited information. It may guess wrong, as you are seeing.
>
> In this case it doesn't even 'guess' when cross-compiling for
> example with target bfin-elf- (o;
It doesn't guess because you can provide correct information through
the documented ways. I think the make just does what you tell it to
do...
> I'm aware of CROSS_COMPILE though admit never read ELDK manuals
> since I just don't do PPC development (o;
First, the quoted document (DULG) is more than just the ELDK
documentation. It's the manual, and FAQ and some more about U-Boot
and Linux und the rest of the world. You are expected to read it ;-)
Second, the ELDK is more than just PPC, it also covers ARM and MIPS.
> Just mentioned that there would be an easy fix for cross-compiling
> for NON-PPC platforms...but if it's written by Wolfgang..so it should be
> (o;
Not only by me - many people contributed one way or another (and if
only by asking FAQ's ;-)
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All I ask is a chance to prove that money can't make me happy.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-10-25 18:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2004-10-25 15:12 ` [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET Steven Scholz
2004-10-25 18:01 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox