[U-Boot-Users] PATCH: PCMCIA and PXA250

Wolfgang Denk wd at denx.de
Wed Mar 24 11:36:00 CET 2004


Dear Leon,

in message <1080119893.1411.18.camel at tt-devel.ultra.si> you wrote:
> 
> > Can you please check and verify that we really _need_ all this stuff?
> 
> I'm not saying that I'm right, but here's my philosophy:
> 
> U-Boot uses Linux system header file or at least a portion of it.

The question is if we use a significant part of such a  Linux  header
file or just 5 lines of definitions.

> If I copy a portion of a Linux system header file and put it
> somewhere inside U-Boot I automaticaly loose the track of it.
> If I copy the whole file and put it at the same place then I can do
> diffs with Linux header file and the track is there - it's the same
> file. A header file will most likelky contain only macros and will
> not affect the image size at all.

I agree.

But I have seen many cases where a header file was pulled in for a  2
line  macro definition, and the inclusin of this header file required
3 others to be added also, which in turn  required  another  5  or  6
header files.

> That's my view, please let me know if you really want me to "hack"
> around this, remove the header files and put defines where they're
> needed.

That depends on how much you need. If it is a significant part of the
Linux header file,  then  go  for  it.  Otherwise  just  extract  the
relevant definitions.

And if the Linux header file depends on other headers,  please  check
if  these  are  required for your stuff, or only for other things you
don't need. Often it's easy to add and to keep track of a few "#if 0"
/ "#endif" lines in a file to eliminate  such  references  for  stuff
that is irrelevant to U-Boot.

> About the lib_arm/ and assembly files. lib_arm is an archive. The boards
> that don't need __raw_readsw and __raw_writesw won't have it. It's an
> archive - object wont get linked if the symbol is not needed. I did
> MAKEALL for all the boards that are there and none of the build fails
> (except for those that fail in the -top-cvs too)

But we pull in 200 lines of code for 16 lines we need.

I don't want to add too many  things  that  we  don't  actually  use.
People  start  to  turn  away  from  U-Boot  when  they  see that the
compressed tarball is 4 MB / uncompressed 26 MB. This is  a  LOT  for
just a boot loader.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Life. Don't talk to me about life.      - Marvin the Paranoid Android




More information about the U-Boot mailing list