Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Problem configuring kernel.

Altera_Forum
Honored Contributor II
1,890 Views

Here's the output when I try to configure linux 2.6 kernel for nios II. 

crt0.o is found on the computer in several places, where should it be?.  

Should I have some environment variable set or some specific dir in path? 

 

 

8<---Cut here---8<----- 

 

------------------------------------------------ 

Microtronix Linux Extensions 

Version 1.1, Built Wed Jul 7 12:46pm EST 2004 

------------------------------------------------ 

make: Entering directory `/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x&#39; 

HOSTCC scripts/basic/fixdep 

/usr/local/bin/ld: cannot open crt0.o: No such file or directory 

collect2: ld returned 1 exit status 

make[2]: *** [scripts/basic/fixdep] Error 1 

make[1]: *** [scripts_basic] Error 2 

make: *** [menuconfig] Error 2 

make: Leaving directory `/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x&#39;
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
678 Views

The one you&#39;re looking for should be in the following directory: 

 

<cygwin>/usr/lib 

 

If you don&#39;t have it, let me know and I&#39;ll send you a copy. 

 

As a side note, I&#39;m not sure why it wasn&#39;t installed with your Nios II Linux Distribution... is there anything that may be unique to your workstation (cygwin-wise) that you think may not be on most workstations?
0 Kudos
Altera_Forum
Honored Contributor II
678 Views

I have the lib directory in C:\quartus\bin\cygwin\usr, but when I go to a bash shell there is no /usr/lib directory at all. 

I created a file in C:\quartus\bin\cygwin\usr and it appeared in the shell under /usr so there should be a lib directory too, by my logic at least.  

Attributes of the lib directory seemed to be okay, they were the same as the other directories in /usr, which are visible in both places. 

What the heck is wrong here?  

 

 

-Tervis
0 Kudos
Altera_Forum
Honored Contributor II
678 Views

I&#39;ve got the same problem (I posted a question about it in the new ucLinux forum before noticing this thread). I am not sure why /usr/lib is only half-visible. For example, doing "ls /usr" shows no sign of it, but if you type "ls /usr/li" and press tab, bash&#39;s file completion fills in /usr/lib. The /usr/lib and /usr/lib directories are somewhat special in cygwin - they do not exist directly under the /cygwin/usr directory, but rather as /cygwin/bin and /cygwin/lib. These are then mounted onto the /usr/bin and /usr/lib directories within the cygwin directory tree. I have no idea why they do it this way, but it&#39;s the case in "normal" cygwin as well, not just the Quartus cygwin stuff. You can see the effect by typing "mount". I also have a "normal" cygwin installation on my pc, and it is setup the same way - the only difference being that /usr/lib works fine. 

 

There is, however, at least one other convenient place to put libraries such as crt0.o - in /usr/local/lib, which is a perfectly normal directory. My solution (tried ten minutes ago, after reading this thread) was to use: 

ln -s /cygdrive/d/Altera4/quartus/bin/cygwin/usr/lib/crt0.o /usr/local/lib/crt0.o 

ln -s /cygdrive/d/Altera4/quartus/bin/cygwin/usr/lib/libcygwin.a /usr/local/lib/libcygwin.a 

 

The result of these is to put symbolic links in the /usr/local/lib directory of the relevant libraries from their "true" place on the disk (obviously you&#39;ll want to modify the paths for your installation directories). Being symbolic links rather than copies means that any updates to these files will automatically reflect on the linked versions. 

 

Now my "make menuconfig" works fine, and I can try the rest of the build... 

 

mvh., 

 

David Brown 

Norway.
0 Kudos
Altera_Forum
Honored Contributor II
678 Views

Hi Tervis, sorry for not replying earlier, but I don&#39;t recall ever getting notification of your reply. 

 

At any rate, regarding the issue around the /usr/lib under Cygwin... I&#39;m at a loss as to why you&#39;re experiencing those problems. I would try DavidBrown&#39;s suggestion, it&#39;s more than reasonable. 

 

Let us know how it goes and if problems persist, I&#39;ll see if I can duplicate your environment on a test machine here for testing purposes.
0 Kudos
Altera_Forum
Honored Contributor II
678 Views

Hiya again! 

 

I happened to look at mounts from the shell and noticed that nonexistent directory C:\quartus\bin\cygwin\lib was mounted on /usr/lib just unmounting this with "umount /usr/lib" fixed the problem. (Didn&#39;t even have to mount C:\quartus\bin\cygwin\usr\lib to /usr/lib, lib directory was in right place after the unmount) 

 

Why this happens on this computer but not on the next one is a mystery to me. But anyway, problem solved. 

 

Thanks for all the help. 

 

 

-Tervis
0 Kudos
Reply