Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,025 Views

Compilling Linux with MMU on NIOS

I am compiling Linux on DE0 dev board and at the end of compilation errors appears:  

 

CC lib/rwsem-spinlock.o 

CC lib/sha1.o 

CC lib/show_mem.o 

CC lib/string.o 

CC lib/vsprintf.o 

AR lib/lib.a 

LD arch/nios2/lib/built-in.o 

CC arch/nios2/lib/libgcc.o 

In file included from /home/darka/nios2-linux/linux-2.6/arch/nios2/lib/libgcc.c:13: 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/longlong.h:1237:2: warning:# warning "Default c-implementation of umul_ppm" 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/longlong.h:1264:2: warning:# warning "Default c-implementation of __umulsidi3" 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/longlong.h:1327:2: warning:# warning "Using count_leading_zeroes in C" 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/libgcc.c: In function '__ashldi3': 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/libgcc.c:52: warning: ISO C90 forbids mixed declarations and code 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/libgcc.c: In function '__ashrdi3': 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/libgcc.c:78: warning: ISO C90 forbids mixed declarations and code 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/libgcc.c: In function '__lshrdi3': 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/libgcc.c:105: warning: ISO C90 forbids mixed declarations and code 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/libgcc.c: In function '__udivmoddi4': 

/home/darka/nios2-linux/linux-2.6/arch/nios2/lib/libgcc.c:351: warning: ISO C90 forbids mixed declarations and code 

CC arch/nios2/lib/memcpy.o 

CC arch/nios2/lib/string.o 

AR arch/nios2/lib/lib.a 

LD vmlinux.o 

MODPOST vmlinux.o 

GEN .version 

CHK include/generated/compile.h 

UPD include/generated/compile.h 

CC init/version.o 

LD init/built-in.o 

LD .tmp_vmlinux1 

/home/darka/nios2-linux/toolchain-mmu/x86-linux2/bin/nios2-linux-gnu-ld:arch/nios2/kernel/vmlinux.lds:173: ignoring invalid character `#' in expression 

/home/darka/nios2-linux/toolchain-mmu/x86-linux2/bin/nios2-linux-gnu-ld:arch/nios2/kernel/vmlinux.lds:173: syntax error 

make[2]: *** [.tmp_vmlinux1] Error 1 

make[1]: *** [sub-make] Error 2 

make[1]: Leaving directory `/home/darka/nios2-linux/linux-2.6' 

make: *** [linux] Error 1 

[root@localhost uClinux-dist]# 

 

Is there anybody whose got this same problem and know how to solve it ?
0 Kudos
11 Replies
Altera_Forum
Honored Contributor I
34 Views

Probably module missing some dependencies. 

 

P.S. Where can I evaluate the newest version of Linux in FPGA? I've found some old archives of ucLinux in Altera Wiki, but it would be great to get new files. Also where can I get tools for cross-compilations?
Altera_Forum
Honored Contributor I
34 Views

Maybe the problem is, that I am using GCC version: gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) 

As desribed in: http://www.alterawiki.com/wiki/install_nios_ii_linux 

there need to use GCC-4.2 ??
Altera_Forum
Honored Contributor I
34 Views

Hm, I am downloading the .tar package, so possible will answer in a few days.

Altera_Forum
Honored Contributor I
34 Views

Actually I am using nios2-linux-20100621.tar and CentOS-6.  

I am trying to compile almost one week and no sucess.. this is the last error I got almost at the end of compilation :/
Altera_Forum
Honored Contributor I
34 Views

Then I'd offer You to ask in mailing list: http://sopc.et.ntust.edu.tw/cgi-bin/mailman/listinfo/nios2-dev

Altera_Forum
Honored Contributor I
34 Views

I just tried to ask others.. strange that some people can normally compile it.. 

:(
Altera_Forum
Honored Contributor I
34 Views

Try 

make clean 

NON_SMP_BUILD=1 make
Altera_Forum
Honored Contributor I
34 Views

 

--- Quote Start ---  

Maybe the problem is, that I am using GCC version: gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) 

As desribed in: http://www.alterawiki.com/wiki/install_nios_ii_linux 

there need to use GCC-4.2 ?? 

--- Quote End ---  

 

You don't use the GCC on your system to build linux, but the one in toolchain-mmu. Unless you are trying to build the toolchain, it doesn't matter what you have installed.
Altera_Forum
Honored Contributor I
34 Views

It does not helping :( I am getting this same error..maybe there is some problem in toolchain-mmu because to compile nios2-linux-20100621 I am using old binary nios2gcc-20080203. I was unable to compile my own toolchain of 20100621 version..

Altera_Forum
Honored Contributor I
34 Views

Oh, I remember now where I've seen that error before. Did you modify nios.h or the generated custom_fpga.h ? (I don't know if these actually exist anymore in 20100621 with device tree and all) 

If you have a# define commented out C++ style // in any of those headers, it'll get into the linker script and you'll get that error.
Altera_Forum
Honored Contributor I
34 Views

Are you using QSys and sopc-create-header-files? I just noticed that it creates macros like# define KERNEL_REGION_BASE 0xc0000000L where it didn't used to put an L and looks like that doesn't work in the linker script and gives that error.