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

porblems when generate the zImage

Altera_Forum
Honored Contributor II
1,404 Views

hello guys, i have encounted a problem and came for your kind help. 

to generate the zImage file, i input the command 'make', then it has the following errors, what should i do? need to make some patches? i've patched the uClinux-dist.diff.gz provided. 

 

[bigmagic@tu053020 uClinux-dist-test]$ make 

make -C tools/ucfront 

make[1]: Entering directory `/home/bigmagic/uClinux-dist-test/tools/ucfront' 

make[1]: Nothing to be done for `all'. 

make[1]: Leaving directory `/home/bigmagic/uClinux-dist-test/tools/ucfront' 

ln -sf /home/bigmagic/uClinux-dist-test/tools/ucfront/ucfront tools/ucfront-gcc 

ln -sf /home/bigmagic/uClinux-dist-test/tools/ucfront/ucfront tools/ucfront-g++ 

ln -sf /home/bigmagic/uClinux-dist-test/tools/ucfront/ucfront-ld tools/ucfront-ld 

make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- -C linux-2.6.x zImage || exit 1 

no emulation specific options. 

make[1]: Entering directory `/home/bigmagic/uClinux-dist-test/linux-2.6.x' 

CHK include/nios2_system.h 

perl -I/home/bigmagic/uClinux-dist-test/linux-2.6.x/arch/nios2nommu/scripts /home/bigmagic/uClinux-dist-test/linux-2.6.x/arch/nios2nommu/scripts/gen_nios2_system.h.pl cpu_0 sram_0 cfi_flash_0 < mk.ptf > include/nios2_system.h.tmp; if [ -r include/nios2_system.h ] && cmp -s include/nios2_system.h include/nios2_system.h.tmp; then rm -f include/nios2_system.h.tmp; else echo &#39; UPD include/nios2_system.h&#39;; mv -f include/nios2_system.h.tmp include/nios2_system.h; fi 

CHK include/linux/version.h 

CHK include/linux/compile.h 

CHK usr/initramfs_list 

CC arch/nios2nommu/kernel/time.o 

arch/nios2nommu/kernel/time.c: In function `timer_interrupt&#39;: 

arch/nios2nommu/kernel/time.c:70: error: `na_timer0&#39; undeclared (first use in this function) 

arch/nios2nommu/kernel/time.c:70: error: (Each undeclared identifier is reported only once 

arch/nios2nommu/kernel/time.c:70: error: for each function it appears in.) 

arch/nios2nommu/kernel/time.c: In function `time_init&#39;: 

arch/nios2nommu/kernel/time.c:111: error: `na_timer0_irq&#39; undeclared (first use in this function) 

arch/nios2nommu/kernel/time.c:113: error: `na_timer0&#39; undeclared (first use in this function) 

arch/nios2nommu/kernel/time.c:118: error: `np_timercontrol_start_mask&#39; undeclared (first use in this function) 

arch/nios2nommu/kernel/time.c:119: error: `np_timercontrol_cont_mask&#39; undeclared (first use in this function) 

arch/nios2nommu/kernel/time.c:119: error: `np_timercontrol_ito_mask&#39; undeclared (first use in this function) 

make[2]: *** [arch/nios2nommu/kernel/time.o] &#38169;&#35823; 1 

make[1]: *** [arch/nios2nommu/kernel] &#38169;&#35823; 2 

make[1]: Leaving directory `/home/bigmagic/uClinux-dist-test/linux-2.6.x&#39; 

make: *** [linux] &#38169;&#35823; 1 

 

anybody met similar problem before? please give some advice on it, thank you very much!!
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
405 Views

You need a full-featured timer in your sopc builder.

0 Kudos
Altera_Forum
Honored Contributor II
405 Views

thank u very much hippo, i added a timer in the sopc builder and the problem is solved. 

 

i compile the kernel under linux, but now that, it shows cannot find nios2-elf-gcc, i should install something else? 

 

thank you again.
0 Kudos
Altera_Forum
Honored Contributor II
405 Views

 

--- Quote Start ---  

originally posted by bigmagic@Jun 12 2006, 04:30 PM 

thank u very much hippo, i added a timer in the sopc builder and the problem is solved. 

 

i compile the kernel under linux, but now that, it shows cannot find nios2-elf-gcc, i should install something else? 

 

thank you again. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16109) 

--- quote end ---  

 

--- Quote End ---  

 

What is the message? 

check if you have "cc" which is a symlink to "gcc" ? 

cc -v 

if not,  

su - 

cd /usr/bin 

ln -s gcc cc 

 

Check if you have nios2-linux-uclibc-gcc, 

nios2-linux-uclibc-gcc -v 

if not, setup the PATH.
0 Kudos
Altera_Forum
Honored Contributor II
405 Views

hippo,thank you for you kindness, i will try it when i get back to the lab tomorrow. 

 

another question, what&#39;s the size can a smallest uclinux be? is it able to be uploaded to a flash of only 2M BYTE?(with kernel and the file system)?
0 Kudos
Altera_Forum
Honored Contributor II
405 Views

 

--- Quote Start ---  

originally posted by bigmagic@Jun 12 2006, 09:37 PM 

hippo,thank you for you kindness, i will try it when i get back to the lab tomorrow. 

 

another question, what&#39;s the size can a smallest uclinux be? is it able to be uploaded to a flash of only 2m byte?(with kernel and the file system)? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16124) 

--- quote end ---  

 

--- Quote End ---  

 

The smallest size of compressed kernel (with initramfs) is around 600KB. 

It will grow if you enable more kernel config or more apps,data etc. 

The compression rate is around 1:2 . 

If you didn&#39;t use complex programs such as ssl/ssh , 2M should be enough.
0 Kudos
Reply