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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Linux Kernel Compile Problem

Altera_Forum
Honored Contributor II
2,582 Views

Not sure if this is the correct location for this post but here goes anyway 

 

I am building uClinux-dist from nios2-linux06212010 

and using nios2-linux-gcc ver. 3.4.6 

 

I am building the kernel up to the following point and then... 

LD init/built-in.o 

LD .tmp_vmlinux1 

kernel/built-in.o(.init.text+0x54c): In function `sched_init_smp': 

: undefined reference to `____ilog2_NaN' 

kernel/built-in.o(.init.text+0x54c): In function `sched_init_smp': 

: relocation truncated to fit: R_NIOS2_CALL26 ____ilog2_NaN 

make[2]: *** [.tmp_vmlinux1] Error 1 

make[1]: *** [sub-make] Error 2 

make[1]: Leaving directory `/home/nick/06212010-nios2-linux/nios2-linux/linux-2.6' 

make: *** [linux] Error 1 

 

Any help greatly appreciated! 

 

Nick
0 Kudos
14 Replies
Altera_Forum
Honored Contributor II
1,378 Views

Nios II supports SMP? That's news to me...

0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

Any ideas of where to disable this support? I'm only going by the directions given in the Nios Wiki for building this kernel........

0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

hi nipri 

 

did you try compile with defalt parameters????? at menuconfig ???? 

 

 

cheers 

 

Franz Wagner
0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

Hello Franz! 

 

I am running make menuconfig in the uClinux-dist dir., selecting "Altera" as the vendor and "niosnommu" as the product. Also, making sure that libc is set to "none" and selecting the "Default all setting" option....
0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

I notice there is a NON_SMP_BUILD option in the Makefile but I'm not sure how to invoke it.... make NON_SMP_BUILD=1 doesn't seem to work... 

 

I am also noticing that I am getting an error as below... right after the SMP related error... Obviously some sort of a config issue going on here???????? 

 

mm/built-in.o(.text+0x12df4): In function `shmem_getpage': 

: undefined reference to `copy_page' 

mm/built-in.o(.text+0x12df4): In function `shmem_getpage': 

: relocation truncated to fit: R_NIOS2_CALL26 copy_page 

make[2]: *** [.tmp_vmlinux1] Error 1
0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

I am not 100%sure but the NON_SMP_BUILD option acts on the compilation process on your computer and will not affect the embedded system/FPGA design you're building. It simply make the compilation process to avoid parallelization on multiple cores/cpus.

0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

What branch are you using?

0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

@gabribob: I think your right about the NON_SMP_BUILD option as far as I can tell from the documentation 

 

@ykozlov: I downloaded and untarred the 06212010 dist and ran ./checkout so I'm not exactly sure which branch I have... I'm running the update script now... something I didn't do previously....
0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

hi guys..... 

 

nipri ....dont run the update !!! :S 

 

 

iam using nios2-linux-20090730 ....and running perfectly......... 

 

try use this..........is better than 20100621 

 

Franz Wagner
0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

Your right, the update certainly didn't help! 

 

I found nios2-linux-20090721, am downloading that now....
0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

ok 

 

 

this version work better........ 

 

use this tuttorial i will post 

 

good luck  

 

Franz Wagner
0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

Thanks, for the info, will post the results! 

 

Nick
0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

OK, 1st problem.... 

 

nick@nci3:~/20090929-nios2-linux/nios2-linux/uClinux-dist$ make vendor_hwselect SYSPTF=/home/nick/20090929-nios2-linux/SM3k_rev5.ptf ARCH=nios2 

make ARCH=nios2 -C vendors vendor_hwselect 

make[1]: Entering directory `/home/nick/20090929-nios2-linux/nios2-linux/uClinux-dist/vendors' 

make -C /home/nick/20090929-nios2-linux/nios2-linux/uClinux-dist/vendors///. dir_v=/home/nick/20090929-nios2-linux/nios2-linux/uClinux-dist/vendors///. -f /home/nick/20090929-nios2-linux/nios2-linux/uClinux-dist/vendors/vendors-common.mak vendor_hwselect 

make[2]: Entering directory `/home/nick/20090929-nios2-linux/nios2-linux/uClinux-dist/vendors' 

/home/nick/20090929-nios2-linux/nios2-linux/uClinux-dist/vendors/vendors-common.mak:9: *** target file `romfs.post' has both : and :: entries. Stop. 

make[2]: Leaving directory `/home/nick/20090929-nios2-linux/nios2-linux/uClinux-dist/vendors' 

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

make[1]: Leaving directory `/home/nick/20090929-nios2-linux/nios2-linux/uClinux-dist/vendors' 

make: *** [vendor_hwselect] Error 2 

nick@nci3:~/20090929-nios2-linux/nios2-linux/uClinux-dist$
0 Kudos
Altera_Forum
Honored Contributor II
1,378 Views

ok ...... 

 

 

did you set the path ? 

 

PATH=$PATH:/opt/nios2/bin 

 

try make make menuconfig 

 

 

and make vendor...... 

 

report 

 

Franz Wagner
0 Kudos
Reply