Skip to contentSkip to conversation

lib_xxxx and board.c concept

U-Boot-Users Finn S. Nielsen 2 participants 2 messages Feb 25, 2006 – Feb 26, 2006

lore
Share & tools
lore
#0 lore raw

Hello All,

Does anyone know the concept (if any) behind the lib_xxx directories and the board.c file ?
Although lib__xxx would indicate a generic/common set of cpu architecture specific functions, the board.c file actually contains board related initialization functions.

Wouldn't these functions better live in the board specific directories ?

There is a long text in board.c explaining that now there is an array of functions to be called during startup/initialization, but the functions included are still listed in board.c - so any board specific function would (still) have to be selected using ifdef's.

Now it seems I need to change the existing board.c file for the architecture I'm dealing with (microblaze), which means I could potentially break the existing (suzaku) code that's already there.

Also does anyone have a list of initialization functions (I won't get all by grepping for *_init ).

Regards,

Finn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060225/7050222e/attachment.htm

#1 lore raw
Quoted 3 lines · In message <003e01c63a5f$138e8810$0c2ca8c0@fnibm> you wrote:

Does anyone know the concept (if any) behind the lib_xxx directories and the board.c file ?

Yes.

Quoted 3 lines

Although lib__xxx would indicate a generic/common set of cpu architecture specific functions, the board.c file actually contains board related initialization functions.

Yes.

Quoted 1 line

Wouldn't these functions better live in the board specific directories ?

Define "better". Better in terms of ... ?

Quoted 4 lines

There is a long text in board.c explaining that now there is an array of functions to be called during startup/initialization, but the functions included are still listed in board.c - so any board specific function would (still) have to be selected using ifdef's.

Feel free to submit a patch to clean this up, keeping in mind that the memory footprint must not be increased by such a patch.

Quoted 3 lines

Now it seems I need to change the existing board.c file for the architecture I'm dealing with (microblaze), which means I could potentially break the existing (suzaku) code that's already there.

It is your responsibility to make sure that your patches do NOT break existing board support.

Quoted 2 lines

Also does anyone have a list of initialization functions (I won't get all by grepping for *_init ).

Why not?

Quoted 7 lines

------=_NextPart_000_003B_01C63A67.750FCC90

Content-Type: text/html;
	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD>

And will you please STOP posting HTML here? Thanks.

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There are three ways to get something  done:  do  it  yourself,  hire
someone, or forbid your kids to do it.