Help - Search - Members - Calendar
Full Version: Problem With Cross Compiling
OESF Forums > General Forums > Desktop Operating Systems Issues > Linux Issues
derekwei77
Happy new year everyone.

Sorry that I may repeat my question.
I still couldn't solve the problem, so I am trying to restate it.

My current destop linux is Fedora 2, with kernel 2.6.5-1.358, and my Z is
5500 with an updated ROM with kernel 2.4.6. I want to cross-comile
AODV-UU package for my Z, so that I may build an ad hoc wireless network
with my Z and my laptop.

I downloaded and installed my cross compiler as follows:
gcc-cross-sa1100-2.95.2-0.i386.rpm (gcc compiler for ARM architecture)
binutils-cross-arm-2.11.2-0.i386.rpm (binary utilities for ARM architecture)
glibc-arm-2.2.2-0.i386.rpm (GNU C libraries for ARM architecture)
linux-headers-arm-sa1100-2.4.6-3.i386.rpm (linux header files for ARM architecture)


This is how I compile the kernel module.

export PATH=$PATH:/opt/Embedix/tools/bin
arm-linux-gcc -Wall -O2 -D__KERNEL__ -DMODULE -nostdinc -I /opt/Embedix/tools/lib/gcc-lib/arm-linux/2.95.2/include -I/opt/Embedix/tools/arm-linux/include -c -o kaodv.o kaodv.c

I got very strange error messages. It seems that the linux-headers I downloaded
didn't support netfilter?



Thanks a lot for your attention,

Derek
tumnus
Well you are using the include files from your desktop x86 kernel, which you simply cannot do. It isn't just that you have different kernel versions, but the configuration is going to be different.

Did you generate the makefile yourself or did you use a configure script?

You need to make sure you are using the include files in

/opt/Embedix/tools/arm-linux/include/linux-2.4.6

With a configure script you need to run it something like this:

CPPFLAGS="-I/opt/Embedix/tools/arm-linux/include/linux-2.4.6" ./configure --host=arm-linux
derekwei77
QUOTE(tumnus @ Dec 17 2004, 06:43 PM)
Well you are using the include files from your desktop x86 kernel, which you simply cannot do. It isn't just that you have different kernel versions, but the configuration is going to be different.

Did you generate the makefile yourself or did you use a configure script?

You need to make sure you are using the include files in

/opt/Embedix/tools/arm-linux/include/linux-2.4.6

With a configure script you need to run it something like this:

CPPFLAGS="-I/opt/Embedix/tools/arm-linux/include/linux-2.4.6" ./configure --host=arm-linux

Thanks for your reply very much.

I'm making a kernel module for my Zaurus. I modified the Makefile from the original AODV_UU
package a little bit, including the directory of my current cross compiler.

Now I changed the include files as follows, but it still doesn't work.

$/opt/Embedix/tools/arm-linux/bin/gcc -Wall -O2 -D__KERNEL__ -DMODULE -nostdinc -I /opt/Embedix/tools/lib/gcc-lib/arm-linux/2.95.2/include -I/opt/Embedix/tools/arm-linux/include -c -o kaodv.o kaodv.c
derekwei77
I also downloaded kernel souce
linux-sl5500-20030509-rom3_10.tar.bz2, and tried
arm-linux-gcc -Wall -O2 -D__KERNEL__ -DMODULE -nostdinc -I /opt/Embedix/tools/lib/gcc-lib/arm-linux/2.95.2/include -I/home/Z_kernel_src/linux/include -c -o kaodv.o kaodv.c


Even more errors complaining about missing files. If you are interested,
I attached the errors here. Thanks,

Derek
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.