OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Problem With Cross Compiling
derekwei77
post Dec 17 2004, 10:28 AM
Post #1





Group: Members
Posts: 4
Joined: 16-December 04
Member No.: 5,944



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
Go to the top of the page
 
+Quote Post
tumnus
post Dec 17 2004, 10:43 AM
Post #2





Group: Members
Posts: 1,176
Joined: 3-October 03
From: UK
Member No.: 547



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
Go to the top of the page
 
+Quote Post
derekwei77
post Dec 17 2004, 01:19 PM
Post #3





Group: Members
Posts: 4
Joined: 16-December 04
Member No.: 5,944



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
Attached File(s)
Attached File  Makefile ( 4.25K ) Number of downloads: 2
 
Go to the top of the page
 
+Quote Post
derekwei77
post Jan 3 2005, 09:04 PM
Post #4





Group: Members
Posts: 4
Joined: 16-December 04
Member No.: 5,944



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
Attached File(s)
Attached File  err_msg2.log ( 9.31K ) Number of downloads: 9
 
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th December 2014 - 12:52 PM