RE: [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET

-----Original Message----- From: Steven Scholz [mailto:steven.scholz@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. ******************************************

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

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

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

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
participants (4)
-
Richard Klingler
-
Steven Scholz
-
VanBaren, Gerald (AGRE)
-
Wolfgang Denk