[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cross-compiling the kernel



> >I took the include files from the libc-5.4.46 source. (Is that the
> >right place to get them from?) And I configured egcs with
> >--target=arm-elf.
> 
> You don't need C library include files to build the kernel.

I found I needed them for building the cross-compiler, though. I don't
understand it, but I've had a similar experience building
cross-compilers for other targets, too. I'm not sure exactly which
header files are necessary, but it's quite a few of them, so I find it
easier to make the whole lot available using --with-headers=/whatever.

(I don't know why I used libc5 instead of glibc2. I'll try
glibc_2.0.7.19981211.orig.tar.gz headers next time.)

>  For Linux you
> should configure the compiler as `--target=arm-linux' - this differs from
> arm-elf in various subtle ways.  For an ARM3 machine you actually want to use
> `armv2-linux' to set the default to be APCS-26.

Where in the egcs source are the possible targets listed or documented?

> >I supplied -DSEGMENT_SIZE=1024. But what is the _correct_ value?
> 
> Why did you need this?

I don't know, but one of the files I was looking at was
linux/include/linux/a.out.h. Here SEGMENT_SIZE is set to various values
depending on #defines, but it remains undefined in my environment.
There's even a comment that says:

   Note that it is up to you to define SEGMENT_SIZE
   on machines not listed here.  */

>  I'm surprised you had so much trouble with the kernel
> - I typically cross compile the kernel several times a day and don't have any
> problems.

So how does SEGMENT_SIZE get defined for you, or do you somehow
circumvent it entirely?

Edmund


Reply to: