This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Error compiling kernel with Crosstool cross-compiler


Hi,

I'm trying to port Linux onto a Xilinx Virtex-II Pro ML-310 board. I was successful in building a gcc-4.1.1-glibc-2.3.6 tool-chain for the PowerPC 405, but was unable to get it to compile a kernel. I downloaded the development branch of the MontaVista Linux 2.4 kernel (2.4.26), as well as another MontaVista Linux 2.4 kernel (2.4.20), and used the Xilinx EDK 10.1 to create a BSP to incorporate into the kernel. I was able to configure both kernels, but not compile them. In both cases, I received this error:

init/do_mounts.c:54: error: static declaration of 'root_device_name' follows non-static declaration
/home/bucknell/mvistappc_2_4_devel/include/linux/fs.h:1568: error: previous declaration of 'root_device_name' was here
init/do_mounts.c: In function 'identify_ramdisk_image':
init/do_mounts.c:507: warning: pointer targets in passing argument 2 of 'read' differ in signedness
init/do_mounts.c:542: warning: pointer targets in passing argument 2 of 'read' differ in signedness
init/do_mounts.c: In function 'fill_inbuf':
init/do_mounts.c:1006: warning: pointer targets in passing argument 2 of 'read' differ in signedness
init/do_mounts.c: In function 'flush_window':
init/do_mounts.c:1024: warning: pointer targets in passing argument 2 of 'write' differ in signedness
make: *** [init/do_mounts.o] Error 1


I edited fs.h by changing extern char root_device_name[] to static char root_device_name[] and the error went away. (Though, I'm not sure if that was the right way of going about things.) However, after getting past that error, I ran into this one:

softirq.c: In function 'do_softirq':
softirq.c:79: error: invalid lvalue in increment
softirq.c:82: error: invalid lvalue in assignment
softirq.c:102: error: invalid lvalue in decrement
softirq.c: In function 'cpu_raise_softirq':
softirq.c:116: error: invalid lvalue in assignment
softirq.c: In function 'tasklet_action':
softirq.c:205: error: invalid lvalue in assignment
softirq.c: In function 'tasklet_hi_action':
softirq.c:239: error: invalid lvalue in assignment
softirq.c: In function 'ksoftirqd':
softirq.c:380: error: invalid lvalue in assignment
make[2]: *** [softirq.o] Error 1
make[2]: Leaving directory `/home/bucknell/mvistappc_2_4_devel/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/home/bucknell/mvistappc_2_4_devel/kernel'
make: *** [_dir_kernel] Error 2

I wasn't sure how to get around this error. Is anybody familiar with these errors? Did I choose the wrong combination of GCC and GLibc for my cross-compiler?

Thanks in advance for your help!


-Juliana


--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]