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++
12604 Discussions

uclinux project build ***errors

Altera_Forum
Honored Contributor II
1,984 Views

Hi, 

 

I am new to the uClinux. As per the linux Quick start guide.pdf file I completed doing the project succesfully, but I am facing the problem while doing the same again......with different project name. 

 

I am not able to build the project .......it is showing the errors like in task bar 

 

Error *** [all] Error 2  

Error *** [prepare1] Error 1 

 

please help me ...in this regard.... 

 

Thanks in advance.... 

 

Regds, 

raj
0 Kudos
11 Replies
Altera_Forum
Honored Contributor II
418 Views

Are you still able to rebuild the original kernel project? If not, something in your environment might have changed. 

 

If you can still build the original kernel project from the quick start guide, then what can you tell me about the hardware that you're building the kernel for? i.e. how much ram, flash, uarts, etc.
0 Kudos
Altera_Forum
Honored Contributor II
418 Views

Dear ken wong, 

 

thanking you for your reply, 

 

I am not able to rebuild the orginal kernel project also.....! 

 

 

Actually I used the hardware of full_featured in the examples folder and I build the kernel and filesystem succefully according to the quick start guide. 

After that I uploaded to the board.... still the kernel and respective software example working nicely in the board. 

 

Now I planned to create another project with the same hardware and I tried to build the kernel for that according the quick start guide. here I failed to do..... 

 

Then I opened the orginalproject i.e., the first one and tried for rebuild the kernel.....here also the same errors are repeated..... 

I am not getting what to do.... 

 

but the first kernel in the board it is still working nicely.... 

 

please help in this regard..... 

 

thanking you once again, 

 

Regds, 

raj
0 Kudos
Altera_Forum
Honored Contributor II
418 Views

Check you ACLs. I found that if I had restrictive security on the disk, cygwin could not execute the scripts of which there are a number of them. If you allow "Everyone" R/W/E access, that may fix your problem.

0 Kudos
Altera_Forum
Honored Contributor II
418 Views

I appear to have just had this fault, too. I had a working kernel build that was tweaked for custom hardware. I wanted to baseline the project, and work from a copy. I created a second kernel project, and copied the modified files and the .config file to the new location. I made a duplicate of the FPGA development as well. Some minor changes were made to the FPGA in the "copy" directory, and it was recompiled. I edited the configuration of the "new" kernel project so it pointed at the new .ptf file for the FPGA. That's when bad things happened. After several hours of fussing, I went back and tried to recompile the original kernel project, and it displays the same fault behavior.  

 

The "configure project" function in the IDE doesn't work anymore either. It flashes a bash shell briefly, then closes the window. I edited the script to eliminate the window spawn, and ran the batch file from the command line. I get this response -  

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

[SOPC Builder]$ ./config.bat 

 

d:\altera\kits\nios2\bin\eclipse\workspace\kernel_01>D:/altera/quartus42/bin/cygwin/bin/bash.exe -c "source $QUARTUS_ROOTDIR/sopc_builder/bin/nios_sh; source $SOPC_KIT_NIOS2/user.bashrc; KERNEL_PROJECT=d:/altera/kits/nios2/bin/eclipse/workspace/kernel_01; make -C `cygpath -u D:/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x` O=`cygpath -u d:/altera/kits/nios2/bin/eclipse/workspace/kernel_01/build` menuconfig; " 

 

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

Microtronix Linux Extensions 

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

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

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

  HOSTCC  scripts/basic/fixdep 

gcc: not found 

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

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

make: *** [menuconfig] Error 2 

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

~/altera/kits/nios2/bin/eclipse/workspace/kernel_01 

[SOPC Builder]$[/b] 

--- Quote End ---  

 

It appears that changing the IDE&#39;s project to a different .ptf file may have broken the toolchain links. I&#39;m re-installing the uClinux IDE plugin as I&#39;m typing. If it fixes the situation, I&#39;ll post my results. In the mean time, I seem to have hosed the IDE for kernel builds. I tired to build a new kernel project from scratch, but I can&#39;t get past the inability to configure the project. 

 

Regards, 

J3
0 Kudos
Altera_Forum
Honored Contributor II
418 Views

After several frustrating days, I managed to get un-stuck. In the process, I discovered some disturbing things: 

- Re-installng the software doesn&#39;t fix the problem 

- Un-installing and Re-installing the software doesn&#39;t fix the problem 

- The IDE remembers the previous configuration details even after the above events 

- Upgrading from Nios 1.01 to 1.1 doesn&#39;t fix the problem. 

 

Finally, after upgrading to Nios2 1.1, rebiulding the SOPC Builder element, recompiling the FPGA, and starting a new kernel project UNDER A NEW NAME, I got the kernel to compile properly. If I created a new kernel project under any of the previous project names, it won&#39;t work. Note - these projects have been completely deleted from the hard drive. The old configurations are still lingering somewhere on the system, but I haven&#39;t a clue where. The old configurations survived multiple software uninstalls, too.  

 

Another point - the 1.1 kernel configuration (.config) file is "new and improved." That should be loosely translated as "won&#39;t work with your existing files." If you copy the 1.01 project into the 1.1 IDE systerm, the compiler complains about unknown ocnfiguration options. Yes Virginia, you need to start from scratch with the 1.1 system.  

 

I think this is a shining example of the development software being written by folks who don&#39;t have to use it in real life. I am seriously not happy.
0 Kudos
Altera_Forum
Honored Contributor II
418 Views

I, too, have gone through this same thrash. 

 

After installing the latest Microtronix release, I found that I couldn&#39;t import a previously working kernel project. It won&#39;t build. Even after re-generating the core in SOPC builder, compiling the FPGA design in Q2 4.2, then reconfiguring the kernel, the kernel build fails. LOTS of errors. 

 

Taking JIMBOBBUS&#39;s advice, I started a new kernel project with a new name. I finally got a kernel to build after much effort. I was able to upload the kernel, and a new ROMfs to my custom hardware, so at least the upload function isn&#39;t broken in the new release. 

 

But, linux failed to boot on the hardware. The board is doing a lot of nothing, when it was booting the OS just fine under the previous release.  

 

So now the question is: what new kernel features need to be turned on/off to make the OS work again? It is an excruciatingly painful process to go in and try all the new kernel features one-by-one turning them on/off to see if I&#39;ve hit the secret, magic combination of things that will allow the OS to actually run on the hardware. 

 

This is not a smooth, seamless upgrade. Anyone trying to use this new release should be prepared for absolutely nothing to work. Just getting the OS to boot on the hardware was horrifically painful the first time around. Having to go through that process again, for no apparent reason, makes me seriously unhappy too. 

 

These tools are apparently rigged to work only with a few development boards. If you make any deviation from the canned demos you might as well start pulling your own teeth out, without the novocaine. While it is nice that the demos can be made to run on demo boards, that his little or no value when trying to build and run a kernel on your own product HW. 

 

That process could be made vastly simpler if Microtronix published a quide indicating what the peripheral names have to be, what their IRQs have to be, what kernel features need to be turned on/off for each peripheral, etc. 

 

Pick the wrong name for your FLASH memory and the kernel won&#39;t build. Pick the wrong IRQ for your ethernet port and the OS won&#39;t find the chip. 

 

How about it Microtronix?
0 Kudos
Altera_Forum
Honored Contributor II
418 Views

Praise the Lord. I&#39;ve been fighting this problem for almost 2 full weeks. The Altera FAE has been living here. I thought I was going crazy. In my opinion, this is a total catastrophe and absolutely must be fixed. I&#39;m re-installing, rebuilding, renaming everything yet again (this time per the instructions above) and with luck I will be able to spend some time working on our project after my two-week hiatus.

0 Kudos
Altera_Forum
Honored Contributor II
418 Views

Hello 

 

I&#39;m new to uClinux with NIOS. When I was trying to Configure Kernel like it was shown in Quick Start Guide, I received an error with info that "crt0.o file can not be found". After starting install_cyg_ext.sh my Configure Kernel works corectly. Now I can configure, build and boot uClinux without errors. 

 

Could someone give me info what is the puspose of install_cyg_ext.sh script? This script was placed in main instalation directory of uClinux distribution during instalation. 

 

Cheers 

Michal 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ph34r.gif
0 Kudos
Altera_Forum
Honored Contributor II
418 Views

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif I am scared by the situation because I plan to build a platform to run uClinux. I hope I am lucky enough to get nothing wrong with it. 

 

Niu
0 Kudos
Altera_Forum
Honored Contributor II
418 Views

Hi, 

 

I am having similar problems with the new release. Building a kernel under the old release was ok, but now there are several compile errors (even after rebuilding SOPC, creating new kernel project (different name), and cleaning out old kernal projects). Followed the steps outlined in the Quick Start guide to keep it simple, but it won&#39;t compile. Here is the concole report: 

 

Kind Status Priority Description Resource In Folder Location 

Error *** [arch/nios2nommu/kernel/asm-offsets.s] Error 1 kernel_1.1  

Error *** [arch/nios2nommu/kernel/asm-offsets.s] Error 2 kernel_1.1  

Error unterminated# ifndef[include/nios2_system.h] kernel_1.1 line 1 

Error in inclusion include/nios2_system.h:1[include2/asm/nios.h] kernel_1.1 line 4 

Error in inclusion include2/asm/bitops.h:32:[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/bitops.h] kernel_1.1 line 4 

Error in inclusion /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/capability.h:45:[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/sched.h] kernel_1.1 line 7 

Error in inclusion /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/timex.h:188:[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/sched.h] kernel_1.1 line 11 

Error in inclusion /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/sched.h:11:[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/arch/nios2nommu/kernel/asm-offsets.c] kernel_1.1 line 12 

Error in inclusion /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/sched.h:7:[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/arch/nios2nommu/kernel/asm-offsets.c] kernel_1.1 line 12 

Error in inclusion /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/thread_info.h:20:[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/spinlock.h] kernel_1.1 line 12 

Error in inclusion /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/bitops.h:4:[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/thread_info.h] kernel_1.1 line 20 

Error in inclusion include2/asm/nios.h:4:[include2/asm/system.h] kernel_1.1 line 32 

Error in inclusion include2/asm/system.h:32:[include2/asm/bitops.h] kernel_1.1 line 32 

Error in inclusion /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/spinlock.h:12:[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/capability.h] kernel_1.1 line 45 

Error # error Sorry,you dont have na_flash_kernel or na_flash_kernel_end defined in the core.[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/arch/nios2nommu/kernel/asm-offsets.c] kernel_1.1 line 144 

Error division by zero in# if[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/time.h] kernel_1.1 line 145 

Error # error Sorry,you dont have nasys_program_mem or nasys_program_mem_end defined in the core.[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/arch/nios2nommu/kernel/asm-offsets.c] kernel_1.1 line 152 

Error error: `nasys_icache_size&#39; undeclared (first use in this function)[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/arch/nios2nommu/kernel/asm-offsets.c] kernel_1.1 line 155 

Error error: `nasys_icache_line_size&#39; undeclared (first use in this function)[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/arch/nios2nommu/kernel/asm-offsets.c] kernel_1.1 line 156 

Error error: `nasys_dcache_size&#39; undeclared (first use in this function)[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/arch/nios2nommu/kernel/asm-offsets.c] kernel_1.1 line 157 

Error error: `nasys_dcache_line_size&#39; undeclared (first use in this function)[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/arch/nios2nommu/kernel/asm-offsets.c] kernel_1.1 line 158 

Error in inclusion /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/time.h:145[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/timex.h] kernel_1.1 line 188 

Error in inclusion /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/time.h:237[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/timex.h] kernel_1.1 line 188 

Error error: `nasys_clock_freq&#39; undeclared (first use in this function)[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/time.h] kernel_1.1 line 237 

Error error: (Each undeclared identifier is reported only once[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/time.h] kernel_1.1 line 237 

Error error: `nasys_clock_freq&#39; undeclared (first use in this function)[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/time.h] kernel_1.1 line 256 

Error error: `nasys_clock_freq&#39; undeclared (first use in this function)[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/time.h] kernel_1.1 line 278 

Error error: `nasys_clock_freq&#39; undeclared (first use in this function)[/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/include/linux/time.h] kernel_1.1 line 294 

 

Any ideas?
0 Kudos
Altera_Forum
Honored Contributor II
418 Views

Follow up from last post: 

 

I tried to roll back to the original release from Microtronix, and the setup program would not run - message: 

 

"Could not find Altera Nios II Development Kit on this system" 

 

For sure, the Altera Nios II Development Kit is on the system. The script quits, with no option to try to find the kit in one of the directories.
0 Kudos
Reply