Forum Discussion
Altera_Forum
Honored Contributor
16 years agouclinux toolchain installation ( cross compiler setting error)
Hi,
I have just installed altera 9.1sp2 quartusII,nios2eds, nios2-linux-20090929.tar on centOS_5 from InstallNios2Linux tutorial. 1-hen i try to build the binary toolchain (the laptop is i64 architecture but the linux centOS installed is 32 architecture) $~/nios2-linux/toolchain-build/make gcc elf2flt gdb-host the message error is lipthred/linuxthreads.old/wrapsyscall.c:101:error rededfinition of 'msync' ./include/sys/mman.h:97:error: previous definition of 'msync' was here make[1]: ***[libthread/linuxthreads.old/wrapsyscall.o] Error 1 2-then i have installed the prebuild binary tool chain nios2gcc-20080203.tar.bz2 in /opt/nios2/ the cross compiler nios2-linux-uclibc-gcc is in /opt/nios2/bin i can compile the hello.c example also i can do the tryOutuClinux example on 2C35 DE2 kit: configure the fpga with *.sof and run the zimage kernel 3-The problem is when i try continue with the uclinuxDist tutorial: I DONT INSTALL tar -C your_path -xvf nios2-linux-20090730.tar because 20090929 version its installed i do make menuconfig correctly but when i run $../uClinux-dist/ make vendor_hwselect SYSPTF=~/nios2-projects/tryOutuClinux/DE2_NIOS_HOST_MOUSE_VGA.ptf there is an error with the cross compiler selected ---> [candido@localhost uClinux-dist]$ make vendor_hwselect SYSPTF=~/nios2-projects/tryOutuClinux/DE2_NIOS_HOST_MOUSE_VGA.ptf >> error.txt make[1]: nios2-linux-gnu-gcc: No se encontró el programa make[1]: se ingresa al directorio `/home/candido/nios2-linux/uClinux-dist/vendors' /bin/sh: nios2-linux-gnu-gcc: command not found /bin/sh: nios2-linux-gnu-gcc: command not found which: no nios2-linux-gnu-gccbug in (/home/candido/nios2-linux/uClinux-dist/tools:/usr/kerberos/bin:/usr/lib/ccache/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/candido/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/home/candido/nios2-linux/toolchain-build/build/nios2/bin) which: no nios2-linux-gnu-gccbug in (/home/candido/nios2-linux/uClinux-dist/tools:/usr/kerberos/bin:/usr/lib/ccache/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/candido/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/home/candido/nios2-linux/toolchain-build/build/nios2/bin) /bin/sh: nios2-linux-gnu-gcc: command not found make[3]: *** No hay ninguna regla para construir el objetivo `hwselect'. Alto. make[2]: *** [vendor_hwselect] Error 2 make[1]: *** [vendor_hwselect] Error 2 make: *** [vendor_hwselect] Error 2 i have tried $make vendor_hwselect SYSPTF=~/nios2-projects/tryOutuClinux CROSS_COMPILE=nios2-linux-uclibc- but the result dont change 4-¿ How can I configure the cross_compile default? THANKS IN ADVANCE18 Replies
- Altera_Forum
Honored Contributor
Hi,
I was working with trunk branch and the nios2install is for test-nios2 branch, so i have read something about git tool 0: internet connected 1: switch to nios2-test at git repo ../uClinux-dist/ $git branch -l test-nios2 * trunk $git checkout test-nios2 $git branch -l * test-nios2 trunk 2 : update run ../nios2-linux/update 3: uClinux-dist/make menuconfig ERROR: there is not any rule for target config.arch building and i can see tha there is a link file named config.arch linked to vendors/Altera/nios2nommu/config.arch ¿? THANKS IN ADVANCE - Altera_Forum
Honored Contributor
Hi,
i can see that there is not a /vendors/Altera/nios2nommu/conf.arch file ........ why ? is wrong the link? Now, i am confused about nios2-linux versions which i need 20090929 or 20090730? wget http://www.niosftp.com/pub/linux/nios2-linux-20090929.tar wget http://www.niosftp.com/pub/uclinux/nios2-linux-20090730.tar the wiki mixed the 2 versions I am going to remove the new version and install the old version 20090730 Some aclaration please? THANKS IN ADVANCE - Altera_Forum
Honored Contributor
Hi,
i have reinstall the nios2-linux-20090929 but now BEFORE run makes..... i have SWITCHED git branch to NIOS2-TEST branch and i get my first kernel image. bye - Altera_Forum
Honored Contributor
hi candido,
can u explain "SWITCHED git branch to NIOS2-TEST branch" more detail? did u follow the steps in repply# 2? i really need this thanks! - Altera_Forum
Honored Contributor
Hi Nguyen Tien,
In reply# 2 you must select test-nios2 branch with the command: $git checkout test-nios2 after, you can test your branch -> $ git -l branch bye - Altera_Forum
Honored Contributor
..more information
nios2-test is the nommu uclinux distribution you must select test-nios2 branch on uclinux distribution directory and linux-2.6 kernel source directroy too cd linux-2.6 git checkout test-nios2 cd uClinux-dist git checkout test-nios2 Cándido - Altera_Forum
Honored Contributor
hi Cándido,
thank you, now I can build the image :D - Altera_Forum
Honored Contributor
Thanks a lot.
I was also able to make nios2-linux-20100621.tar to work using these instructions. I have verified it on NEEK. I will confirm stratixIV_4sgx230 when done. - Altera_Forum
Honored Contributor
Hello,Candido.I do what you told,but I also got a error.I changed the branch,when I make the image,there is a error:
{standard input}: Assembler messages: {standard input}:96: Error: unrecognised instruction flushda {standard input}:232: Error: unrecognised instruction flushda {standard input}:365: Error: unrecognised instruction flushda {standard input}:428: Error: unrecognised instruction flushda make[3]: *** [arch/nios2/mm/memory.o] 错误 1 LD arch/nios2/drivers/built-in.o make[2]: *** [arch/nios2/mm] 错误 2 make[2]: *** 正在等待未完成的任务.... make[2]: *** wait: 没有子进程。 停止。 make[1]: *** [sub-make] 错误 2 make[1]:正在离开目录 `/usr/local/src/nios2-linux/linux-2.6' make: *** [linux] 错误 1 root@lc-desktop:/usr/local/src/nios2-linux/uClinux-dist# why?Can you help me ? - Altera_Forum
Honored Contributor
Hi,
there is a similar post in http://www.alteraforum.com/forum/showthread.php?t=20200 can you conncect with him andido