Forum Discussion
8 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- Hello everyone, I can not fill uCLinux for nios2, I followed all the procedures of the site: http://www.nioswiki.com/, but each one gives me error. I am trying Ubuntu 9.10 x86_64 Can anyone help me? --- Quote End --- I hammered on those instructions over and over and never could get past building the toolchain. Once I downloaded the pre-built toolchain I could build the kernel pretty easily. What step are you getting stuck on and what is the exact error message? - Altera_Forum
Honored Contributor
--- Quote Start --- I hammered on those instructions over and over and never could get past building the toolchain. Once I downloaded the pre-built toolchain I could build the kernel pretty easily. What step are you getting stuck on and what is the exact error message? --- Quote End --- 1) I tried to build the toolchain downloading http://www.niosftp.com/pub/uclinux/nios2-linux-20090730.tar but gives the following error:
2) I tried to build the toolchain downloadinghttp://www.niosftp.com/pub/linux/nios2-linux-20090929.tar but gives the following error:inlined from ‘col- lect execute’ at /home/thor/Scrivania/progettoEmbedded/nios2-730/toolchain-build/.. /gcc3/gcc/collect2.c:1537: /usr/include/bits/fcntl2.h:51: error: call to ‘ open missing mode’ declared with attribute error: open with O CREAT in second argument needs 3 arguments
3) I used pre-built toolchain: - http://www.niosftp.com/pub/gnutools/nios2gcc-20080203.tar.bz2 and uCLinix-dist-20100628 ma dà tanti errori su include/linux/types.h dopo aver lanciato il comando "make" I hope you can help me, thankslibpthread/linuxthreads.old/wrapsyscall.c:101: error: redefinition of ’msync’ ./in- clude/sys/mman.h:97: error: previous definition of ’msync’ was here - Altera_Forum
Honored Contributor
I'll do my best to help but it sounds like I barely got further than you. I have two Linux systems I have been playing with this on. An Ubuntu 10.04 laptop and a Fedora Core 13 laptop.
I'm like you, I wanted to try the latest and greatest version (20100628) but ran into problems. I gave up on the toolchain build. I tried 3 different tarballs with 3 different versions of GCC and it failed every time. Here's what worked for me to at least build the kernel zImage: Download and install the prebuilt toolchain. Be sure to use their exact command to untar the toolchain to preserve permissions and links and such: From http://www.nioswiki.com/operatingsystems/uclinux/binarytoolchain (http://www.nioswiki.com/operatingsystems/uclinux/binarytoolchain):
Then I un-tarred the 20090730 version and changed into that top level directory and ransudo tar jxf nios2gcc-20080203.tar.bz2 -C /
I then followed the directions on http://www.nioswiki.com/operatingsystems/uclinux/uclinuxdist (http://www.nioswiki.com/operatingsystems/uclinux/uclinuxdist) and got a "zImage" output which I believe is the kernel image. Trying to test it now but having some SDRam issues. I can't wait until I get my hardware shaken out and can move to Linux completely. The NIOS Eclipse tools I am not liking at all. . David./checkout - Altera_Forum
Honored Contributor
--- Quote Start --- I am trying Ubuntu 9.10 x86_64 --- Quote End --- I never succeeded in building it on 64-bit. I recommend using a 32-bit machine to build the toolchain (if you need to build it at all). The binaries will work fine on 64-bit. - Altera_Forum
Honored Contributor
--- Quote Start --- I'll do my best to help but it sounds like I barely got further than you. I have two Linux systems I have been playing with this on. An Ubuntu 10.04 laptop and a Fedora Core 13 laptop. I'm like you, I wanted to try the latest and greatest version (20100628) but ran into problems. I gave up on the toolchain build. I tried 3 different tarballs with 3 different versions of GCC and it failed every time. Here's what worked for me to at least build the kernel zImage: Download and install the prebuilt toolchain. Be sure to use their exact command to untar the toolchain to preserve permissions and links and such: From http://www.nioswiki.com/operatingsystems/uclinux/binarytoolchain:
Then I un-tarred the 20090730 version and changed into that top level directory and ransudo tar jxf nios2gcc-20080203.tar.bz2 -C /
I then followed the directions on http://www.nioswiki.com/operatingsystems/uclinux/uclinuxdist and got a "zImage" output which I believe is the kernel image. Trying to test it now but having some SDRam issues. I can't wait until I get my hardware shaken out and can move to Linux completely. The NIOS Eclipse tools I am not liking at all. . David --- Quote End --- Now, this signal problem:./checkout[/home/thor/Scrivania/nios2-linux/linux-2.6/include/linux/jiffies.h:257:31: warning: "nasys_clock_freq" is not defined - Altera_Forum
Honored Contributor
--- Quote Start --- I never succeeded in building it on 64-bit. I recommend using a 32-bit machine to build the toolchain (if you need to build it at all). The binaries will work fine on 64-bit. --- Quote End --- I tried 32-bit but it gives the same error - Altera_Forum
Honored Contributor
--- Quote Start --- 1) I tried to build the toolchain downloading http://www.niosftp.com/pub/uclinux/nios2-linux-20090730.tar but gives the following error:
--- Quote End --- I don't remember if this is for this error, but I have this fix to build on Ubuntu:inlined from ‘col- lect execute’ at /home/thor/Scrivania/progettoEmbedded/nios2-730/toolchain-build/.. /gcc3/gcc/collect2.c:1537: /usr/include/bits/fcntl2.h:51: error: call to ‘ open missing mode’ declared with attribute error: open with O CREAT in second argument needs 3 argumentsgcc3$ git diff diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 30815af..840f75b 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -710,7 +710,7 @@ ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@ # Likewise. -ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) +ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) -D_FORTIFY_SOURCE=0 # Build and host support libraries. FORBUILD is either # .. or ../$(build_alias) depending on whether host != build. - Altera_Forum
Honored Contributor
--- Quote Start --- I don't remember if this is for this error, but I have this fix to build on Ubuntu:
--- Quote End --- no longer gives that error XD ... has come to describe the memory map and gave this error:gcc3$ git diff diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 30815af..840f75b 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -710,7 +710,7 @@ ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@ # Likewise. -ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) +ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) -D_FORTIFY_SOURCE=0 # Build and host support libraries. FORBUILD is either # .. or ../$(build_alias) depending on whether host != build.401fa000-401fb000 rw-p 0000d000 08:03 1484135 /lib/libgcc_s.so.1 bf9c6000-bf9dd000 rw-p bffe8000 00:00 0 make: *** Aborted make: *** Cancellazione del file «libgcc.a» make: uscita dalla directory «/home/freak/Scrivania/nios2-linux/toolchain-build/build/gcc-bootstrap-build/gcc» make: *** Errore 2 make: uscita dalla directory «/home/freak/Scrivania/nios2-linux/toolchain-build/build/gcc-bootstrap-build/gcc» make: *** Errore 2 make: uscita dalla directory «/home/freak/Scrivania/nios2-linux/toolchain-build/build/gcc-bootstrap-build» make: *** Errore 2