Building kernel 2.4.20-8 for ARM

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello!

I'm trying to build a kernel for ARM-platform.

I use RedHat 9 with kernel 2.4.20 as my host-platform. The cross toolchain
was build myself (binutils-2.10.1, gcc-2.95.3, glibc-2.2.3 with
linuxthreads).
I decided to use default config (I took rpc, integrator for my experiments).

#make ARCH=arm CROSS_COMPILE=arm-linux- clean      ....it all goes well
#make ARCH=arm CROSS_COMPILE=arm-linux- dep        .... got the errors
(sorry for long listing)

rm -f include/asm-arm/arch include/asm-arm/proc
(cd include/asm-arm; ln -sf arch-integrator arch; ln -sf proc-armv proc)
make[1]: Entering directory
`/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/arch/arm/tools'
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/scripts/mkdep -D__
KERNEL__ -I/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include
 -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-comm
on -fomit-frame-pointer -fno-common -pipe -mapcs-32 -march=armv4 -mtune=arm9
tdmi -mshort-load-bytes -msoft-float  -- getconstants.c |\
 sed s,getconstants.o,constants.h, > .depend
make all
make[2]: Entering directory
`/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/arch/arm/tools'
arm-linux-gcc -D__KERNEL__ -I/home/mrv/dparus-project/dparus-ixp/kernel/linu
x-2.4.20-8/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-
aliasing -fno-common -fomit-frame-pointer -fno-common -pipe -mapcs-32 -march
=armv4 -mtune=arm9tdmi -mshort-load-bytes -msoft-float -S -o
constants.h.tmp.1 getconstants.c
make[2]: Leaving directory
`/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/arch/arm/tools'
make[1]: Leaving directory
`/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/arch/arm/tools'


In file included from getconstants.c:11:
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/sche
d.h:162: warning: `get_task_struct' redefined
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/asm/proces
sor.h:105: warning: this is the location of the previous definition
In file included from getconstants.c:11:
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/sche
d.h:907: conflicting types for `kernel_thread'
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/asm/proces
sor.h:120: previous declaration of `kernel_thread'
In file included from getconstants.c:12:
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:188: parse error before `pte_addr_t'
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:188: warning: no semicolon at end of struct or union
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:188: warning: no semicolon at end of struct or union
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:189: warning: type defaults to `int' in declaration of `pte'
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:189: warning: data definition has no type or storage class
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:208: parse error before `}'
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:208: warning: type defaults to `int' in declaration of `mem_map_t'
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:208: warning: data definition has no type or storage class
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
: In function `page_zone':
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:391: dereferencing pointer to incomplete type
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:392: warning: control reaches end of non-void function
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
: In function `set_page_zone':
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:396: dereferencing pointer to incomplete type
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:397: dereferencing pointer to incomplete type
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
: In function `page_mapped':
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:501: dereferencing pointer to incomplete type
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:502: warning: control reaches end of non-void function
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
: At top level:
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:511: parse error before `*'
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:511: warning: type defaults to `int' in declaration of `mem_map'
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:511: warning: data definition has no type or storage class
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
: In function `is_page_cache_freeable':
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:616: dereferencing pointer to incomplete type
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:616: dereferencing pointer to incomplete type
/home/mrv/dparus-project/dparus-ixp/kernel/linux-2.4.20-8/include/linux/mm.h
:617: warning: control reaches end of non-void function
make[2]: *** [constants.h] Error 1
make[1]: *** [dep] Error 2
make: *** [archdep] Error 2

What could you advice me to do to solve this issue ?

Big thanks in advance!



Re: Building kernel 2.4.20-8 for ARM
Quoted text here. Click to load it
[snipped]
Quoted text here. Click to load it

Maybe the linux.embedded group would be more apropriate to ask this
question but...

I think it would help if you rather used a proper kernel instead of
redhat one. Though theoreticaly the kernel has support for
architectures other than x86, I think it is compiles only for x86, not
to mention redhat applies literally hundreds of patches to Tosatti's
kernel. Start with pristine kernel and apply the ARM patches
apropriate for your target you may find at
http://www.arm.linux.org.uk /. Notice that if your target is pxa255
based, there is an extra patch by Nicolas Pitre. There might be other
specific patches for some other targets as well.

HTH.

Re: Building kernel 2.4.20-8 for ARM
Hello!

I fetched the kernel from ftp.kernel.org. But I didn't applied any patches
from ARM-site. May be this is the reason?

Quoted text here. Click to load it



Re: Building kernel 2.4.20-8 for ARM
Well,  I did all steps required - fetched the kernel, patched it with
ARM-patch.
But it didn't help. Still errors... Any ideas ?

Quoted text here. Click to load it



Re: Building kernel 2.4.20-8 for ARM
Quoted text here. Click to load it

Looks like you're doing something wrong. I have make the very same
procedure several times the latest days with no problem whatsoever. I
am using the toolchain that came with the development kit though
(Arcom Viper). I suggest you try uncompress the linux.org kernel
inside your home, patch it and try again. BTW, after compiling the
libc, have you compiled the compiler? The first compiler you build is
rather limited AFAIK and is aimed at libc creation mainly.

Regards.

Elder.

Re: Building kernel 2.4.20-8 for ARM
Hello!

Yes. I did it just you said: uncompressed the kernel in my work directory,
patched it eith ARM-site patch.
Then I build boot-gcc (i.e. without c++ support), then glibc anfd finally
full gcc.

Quoted text here. Click to load it



Site Timeline