[U-Boot-Users] Boot the kernel from a JFFS2 filesystem

Joakim Tjernlund joakim.tjernlund at lumentis.se
Thu Mar 6 15:37:49 CET 2003


> Let me clarify. Either do like this:
> #ifndef USE_HOSTCC
> #  include <common.h>
> #  include <asm/types.h>
> #  include <asm/byteorder.h>
> #else
> #  ifdef __powerpc__
> #    include <asm-ppc/types.h>
> #    include <asm-ppc/byteorder.h>
> #  elif __i386__
> #    include <asm-i386/types.h>
> #    include <asm-i386/byteorder.h>
> #  elif ....
> #  endif
> 
> OR use the ln -s procedure

hmm, I wonder if the include dir search order is broken for the tools
dir. The tools dir contain host tools and these should pick up
system include files BEFORE looking in uboots include dir, otherwise
these program may pick up bogus stuff from uboot in case there is a
file there with the same name as one of the system files.

The asm/byteorder.h is a good example of that, but I think my earlier
proposed soultions to the asm/byteorder.h is too much bandaid.

I can't find a way to make gcc search the system include dirs BEFORE 
-IDIR. The best I can find is this: "-I../include -I- -I.". That
will force gcc to look in ../include only for #include "file.h" directives.

The above #ifdef mess will then become:
#ifndef USE_HOSTCC
#  include <common.h>
#  include "asm/types.h"
#  include "asm/byteorder.h"
#else
#  include <asm/types.h>
#  include <asm/byteorder.h>
#endif

Comments?





More information about the U-Boot mailing list