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 with BuildrootGuide

Altera_Forum
Honored Contributor II
2,044 Views

i was following the BuildrootGuide but i encounter this problem when compiling the kernel. 

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

--- Quote Start ---  

... 

  LD      init/built-in.o 

  LD      vmlinux 

  SYSMAP  System.map 

arch/nios2nommu/boot/Makefile:29: warning: overriding commands for target `arch/nios2nommu/boot/zImage&#39; 

arch/nios2nommu/boot/Makefile:12: warning: ignoring old commands for target `arch/nios2nommu/boot/zImage&#39; 

arch/nios2nommu/boot/Makefile:33: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/Makefile:16: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/Makefile:46: warning: overriding commands for target `arch/nios2nommu/boot/zImage&#39; 

arch/nios2nommu/boot/Makefile:29: warning: ignoring old commands for target `arch/nios2nommu/boot/zImage&#39; 

arch/nios2nommu/boot/Makefile:50: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/Makefile:33: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/Makefile:63: warning: overriding commands for target `arch/nios2nommu/boot/zImage&#39; 

arch/nios2nommu/boot/Makefile:46: warning: ignoring old commands for target `arch/nios2nommu/boot/zImage&#39; 

arch/nios2nommu/boot/Makefile:67: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/Makefile:50: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/compressed/Makefile:58: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/compressed/Makefile:22: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/compressed/Makefile:62: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin&#39; 

arch/nios2nommu/boot/compressed/Makefile:26: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin&#39; 

arch/nios2nommu/boot/compressed/Makefile:65: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin.gz&#39; 

arch/nios2nommu/boot/compressed/Makefile:29: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin.gz&#39; 

arch/nios2nommu/boot/compressed/Makefile:72: warning: overriding commands for target `arch/nios2nommu/boot/compressed/piggy.o&#39; 

arch/nios2nommu/boot/compressed/Makefile:36: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/piggy.o&#39; 

arch/nios2nommu/boot/compressed/Makefile:94: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/compressed/Makefile:58: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/compressed/Makefile:98: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin&#39; 

arch/nios2nommu/boot/compressed/Makefile:62: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin&#39; 

arch/nios2nommu/boot/compressed/Makefile:101: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin.gz&#39; 

arch/nios2nommu/boot/compressed/Makefile:65: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin.gz&#39; 

arch/nios2nommu/boot/compressed/Makefile:108: warning: overriding commands for target `arch/nios2nommu/boot/compressed/piggy.o&#39; 

arch/nios2nommu/boot/compressed/Makefile:72: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/piggy.o&#39; 

arch/nios2nommu/boot/compressed/Makefile:130: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/compressed/Makefile:94: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux&#39; 

arch/nios2nommu/boot/compressed/Makefile:134: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin&#39; 

arch/nios2nommu/boot/compressed/Makefile:98: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin&#39; 

arch/nios2nommu/boot/compressed/Makefile:137: warning: overriding commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin.gz&#39; 

arch/nios2nommu/boot/compressed/Makefile:101: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/vmlinux.bin.gz&#39; 

arch/nios2nommu/boot/compressed/Makefile:144: warning: overriding commands for target `arch/nios2nommu/boot/compressed/piggy.o&#39; 

arch/nios2nommu/boot/compressed/Makefile:108: warning: ignoring old commands for target `arch/nios2nommu/boot/compressed/piggy.o&#39; 

  LDS    arch/nios2nommu/boot/compressed/vmlinux.lds 

  AS      arch/nios2nommu/boot/compressed/head.o 

arch/nios2nommu/boot/compressed/head.S: Assembler messages: 

arch/nios2nommu/boot/compressed/head.S:111: Error: symbol `_start&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:117: Error: symbol `text_init&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:126: Error: symbol `data_init&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:146: Error: symbol `flush_cache&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:151: Error: symbol `data_flush&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:158: Error: symbol `text_flush&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:169: Error: symbol `fake_headers_as_bzImage&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:202: Error: symbol `_start&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:208: Error: symbol `text_init&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:217: Error: symbol `data_init&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:237: Error: symbol `flush_cache&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:242: Error: symbol `data_flush&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:249: Error: symbol `text_flush&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:260: Error: symbol `fake_headers_as_bzImage&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:293: Error: symbol `_start&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:299: Error: symbol `text_init&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:308: Error: symbol `data_init&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:328: Error: symbol `flush_cache&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:333: Error: symbol `data_flush&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:340: Error: symbol `text_flush&#39; is already defined 

arch/nios2nommu/boot/compressed/head.S:351: Error: symbol `fake_headers_as_bzImage&#39; is already defined 

make[2]: *** [arch/nios2nommu/boot/compressed/head.o] Error 1 

make[1]: *** [arch/nios2nommu/boot/compressed/vmlinux] Error 2 

make: *** [zImage] Error 2[/b] 

--- Quote End ---  

 

Pls help! Thx.
0 Kudos
19 Replies
Altera_Forum
Honored Contributor II
1,133 Views

the kernel boot source was patched more than once. 

remove the old kernel source tree, and reinstall a fresh one. 

Don&#39;t run the build script again. 

Look at the build scipt, just reinstall the kernel source.
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

problem solved! thx hippo! 

 

i think my prob is bcoz i ctrl-c while running build n switch to dl those required files first and re-run build. i think tat&#39;s whr it patches more than once.
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

hi hippo, i&#39;ve encounter another problem... 

 

i manage to get boa to run n serve static webpages. i want cgi, so i do according to hippo in BuildrootGuide step 14: Customize Vendor/User Settings (NEW) to select cgi generic. 

 

when make romfs, i got this: 

 

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

--- Quote Start ---  

... 

chmod 620 /home/jwlam/uClinux-dist-test/romfs/dev/@[pt]ty[pqrsPQRS][0-9a-f],* 

romfs-inst.sh -s /var/tmp /tmp 

romfs-inst.sh /etc/inittab 

cp: cannot stat `inittab&#39;: No such file or directory 

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

make[2]: Leaving directory `/home/jwlam/uClinux-dist-test/vendors/Altera/nios2nommu&#39; 

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

make[1]: Leaving directory `/home/jwlam/uClinux-dist-test/vendors&#39; 

make: *** [romfs] Error 1[/b] 

--- Quote End ---  

 

 

bin, usr n var dir under romfs dir is empty. 

 

i tried googling but cant find any relevant info. pls advise. thx in advance.
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

 

--- Quote Start ---  

originally posted by jwlam@Aug 8 2006, 09:02 PM 

hi hippo, i&#39;ve encounter another problem... 

 

i manage to get boa to run n serve static webpages. i want cgi, so i do according to hippo in buildrootguide step 14: customize vendor/user settings (new) to select cgi generic. 

 

when make romfs, i got this: 

 

<div class='quotetop'>quote  

--- quote end ---  

 

--- quote start ---  

... 

chmod 620 /home/jwlam/uclinux-dist-test/romfs/dev/@[pt]ty[pqrspqrs][0-9a-f],* 

romfs-inst.sh -s /var/tmp /tmp 

romfs-inst.sh /etc/inittab 

cp: cannot stat `inittab&#39;: no such file or directory 

make[2]: *** [romfs] error 1 

make[2]: leaving directory `/home/jwlam/uclinux-dist-test/vendors/altera/nios2nommu&#39; 

make[1]: *** [romfs] error 2 

make[1]: leaving directory `/home/jwlam/uclinux-dist-test/vendors&#39; 

make: *** [romfs] error 1 

--- Quote End ---  

 

 

bin, usr n var dir under romfs dir is empty. 

 

i tried googling but cant find any relevant info. pls advise. thx in advance. 

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

[/b] 

--- Quote End ---  

 

the inittab was missiing, try 

touch /home/jwlam/uClinux-dist-test/vendors/Altera/nios2nommu/inittab
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

thx for ur help hippo. 

 

i did wat u suggest n the make terminated as below: 

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

--- Quote Start ---  

make[2]: Entering directory `/home/jwlam/uClinux-dist-test/user/cgi_generic&#39; 

romfs-inst.sh /home/jwlam/uClinux-dist-test/vendors/Generic/httpd /home/httpd 

2 blocks 

romfs-inst.sh /home/httpd/cgi-bin/cgi_demo 

cp: cannot create regular file `/home/jwlam/uClinux-dist-test/romfs/home/httpd/cgi-bin/cgi_demo&#39;: No such file or directory 

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

make[2]: Leaving directory `/home/jwlam/uClinux-dist-test/user/cgi_generic&#39; 

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

make[1]: Leaving directory `/home/jwlam/uClinux-dist-test/user&#39; 

make: *** [romfs] Error 1[/b] 

--- Quote End ---  

 

so i manually create tat folder n make again. it terminated successfully. 

there is nth for me to copy from bin, usr n var folder. but i copy the romfs/httpd folder to rootfs/home/httpd 

after downloading the image onto my board, boa is running well, i can view the index.html. however, when i access cgi-bin/cgi_demo, i got a 404 Not Found error. 

 

did i do anything wrong? Pls advise. Thx again!
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

SOS bump! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/tongue.gif

0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

saturday bump... i sure miss hippo... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif

0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

i&#39;d solved my problems. thx.

0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

 

--- Quote Start ---  

originally posted by jwlam@Aug 13 2006, 07:30 PM 

i&#39;d solved my problems. thx. 

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

--- quote end ---  

 

--- Quote End ---  

 

I cannot get boa to execute a cgi from POST that works just fine with GET. How did you fix your problem?
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

 

--- Quote Start ---  

originally posted by ktroy+aug 26 2006, 11:24 pm--><div class='quotetop'>quote (ktroy @ aug 26 2006, 11:24 pm)</div> 

--- quote start ---  

<!--quotebegin-jwlam@Aug 13 2006, 07:30 PM 

i&#39;d solved my problems. thx. 

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

--- quote end ---  

 

--- Quote End ---  

 

I cannot get boa to execute a cgi from POST that works just fine with GET. How did you fix your problem? 

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

[/b] 

--- Quote End ---  

 

 

i&#39;m still noob but i&#39;ll juz try to help. i suppose POST n GET both works, but u nit diff method of reading in the cgi inputs. POST sent the parameters in the environment variable, QUERY_STRING while get sent thru stdin. 

 

try putting ur executable files in the same folder with ur html files in /httpd instead of httpd/cgi-bin. (seems stupid but i think i failed to get it to run in diff folder... cant remember) 

 

search for ScriptAlias in boa.conf. i suppose u can set it to any folder whr u store ur executables. the format of the line is in the file as well. 

 

gd luck. 

 

ps. anyone correct me if i&#39;m wrong.
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

i recently tried to build the toolchain in buildroot guide on my laptop. but i got this error: 

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

--- Quote Start ---  

prepare uClinux-dist source 

patching file vendors/Altera/nios2nommu/config.arch 

patching file vendors/Altera/nios2nommu/config.vendor 

patching file vendors/Altera/nios2nommu/rc 

patching file vendors/Altera/nios2nommu/config.uClibc 

patching file vendors/Altera/nios2nommu/config.linux-2.6.x 

patching file vendors/Altera/nios2nommu/Makefile 

patching file .config 

patching file Makefile 

patching file user/clamsmtp/config.sub 

patching file user/clamav/config.sub 

patching file user/e2fsprogs/config.sub 

patching file user/ez-ipupdate/config.sub 

patching file user/radvd/config.sub 

patching file user/tcpdump/config.sub 

patching file user/ip-sentinel/config.sub 

patching file user/rsync/config.sub 

patching file user/ntp/config.sub 

patching file user/tcsh/config.sub 

patching file user/bind/config.sub 

patching file user/bind/contrib/nslint-2.1a3/config.sub 

patching file user/bind/contrib/idn/idnkit-1.0-src/config.sub 

patching file user/traceroute/config.sub 

patching file user/frox/config.sub 

patching file user/appWeb/conf/config.sub 

patching file user/nessus/nessus-plugins/config.sub 

patching file user/nessus/libnasl/config.sub 

patching file user/nessus/nessus-core/config.sub 

patching file user/nessus/nessus-libraries/libpcap-nessus/config.sub 

patching file user/nessus/nessus-libraries/config.sub 

patching file user/smtpclient/etc/config.sub 

patching file user/samba/source/config.sub 

patching file user/squid/cfgaux/config.sub 

patching file user/gdb/config.sub 

patching file user/gdb/readline/support/config.sub 

patching file user/grep/config.sub 

patching file user/ssh/config.sub 

patching file user/net-snmp/config.sub 

patching file user/speedtouch/config.sub 

patching file user/openvpn/config.sub 

patching file user/stunnel/auto/config.sub 

patching file user/lirc/config.sub 

patching file user/setserial/config.sub 

patching file user/zebra/config.sub 

patching file user/wget/config.sub 

patching file user/ulogd/config.sub 

patching file user/arj/gnu/config.sub 

patching file user/strace/config.sub 

patching file user/dropbear/config.sub 

patching file user/dhcpcd-new/config.sub 

patching file user/lrzsz/config.sub 

patching file user/asterisk/editline/config.sub 

patching file user/rrdtool/config.sub 

patching file user/at/config.sub 

patching file user/mysql/config.sub 

patching file user/snort/config.sub 

patching file user/bash/support/config.sub 

patching file user/proftpd/config.sub 

patching file user/proftpd/lib/libltdl/config.sub 

bzip2: (stdin) is not a bzip2 file. 

tar: Child returned status 2 

tar: Error exit delayed from previous errors 

./build: line 39: cd: /home/jwlam/buildroot: No such file or directory 

can&#39;t find file to patch at input line 5 

Perhaps you used the wrong -p or --strip option? 

The text leading up to this was: 

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

|Index: toolchain/uClibc/uClibc.config 

|=================================================================== 

|--- toolchain/uClibc/uClibc.config    (revision 14578) 

|+++ toolchain/uClibc/uClibc.config    (working copy) 

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

File to patch:             [/b] 

--- Quote End ---  

 

i cant remember getting this when i do on my desktop. hippo pls help. thx.
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

sorry, I didn&#39;t work on buildroot for a long time. I can&#39;t remember the details, too. 

Please try remove the old dirs, and try again.
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

thx. problem found: files corrupted... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/tongue.gif solved after re-downloading the files.

0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

hi hippo, i was away for few months and found lots of updates. 

 

in uclinuxdist: 

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

--- Quote Start ---  

(Or you can build the cross compiler from sources with BuildrootGuide , but it might be difficult for beginner)[/b] 

--- Quote End ---  

 

 

in buildrootguide: 

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

--- Quote Start ---  

NOTE, the build script below does not handle build error and rebuild. You must edit it or remove old build. The patches should be applied only once. This page contains OUT OF DATE informations. You should use UClinuxDist instead.[/b] 

--- Quote End ---  

 

 

now my question is, if i wanna build everything from scratch, should i follow the buildrootguide? 

 

2nd thing: 

i keep bumping into this error: 

... CC      net/ipv4/fib_hash.o  CC      net/ipv4/proc.o  CC      net/ipv4/tcp_bic.o  LD      net/ipv4/built-in.o  LD      net/built-in.o  GEN     .version  CHK     include/linux/compile.h  UPD     include/linux/compile.h  CC      init/version.o  LD      init/built-in.o  LD      vmlinux /opt/nios2/bin/nios2-linux-uclibc-ld.real:arch/nios2nommu/kernel/vmlinux.lds:448: ignoring invalid character `#&#39; in expression /opt/nios2/bin/nios2-linux-uclibc-ld.real:arch/nios2nommu/kernel/vmlinux.lds:448: parse error make: *** Error 1 make: Leaving directory `/home/jwlam/uClinux-dist/linux-2.6.x&#39; make: *** Error 1 

 

the make passed if i edit vmlinux.lds to use /*...*/ instead of //... but is thr anything wrong with it? 

 

thx.
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

Yes, there are some updates. 

You should not use the build script in buildroot guide. You should change it and build cross gcc/uclibc only. Then use uClinux-dist to build kernel and apps.
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

TO_BE_DONE

0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

Maybe you should put away the buildroot for a while. 

Please use the binary tools and the uClinux-dist-20060803 with patches in the wiki.
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

thx for your reply. 

 

using binary tools also have the weird errors above. however, i notice that the zimage is created before romfs. i think this is not supposed to happen (is it?), thus, i make twice, first time to make all the changes above and 2nd one to update the zimage. now the image is bootable. 

 

do i have to run &#39;make romfs&#39; everytime i configure the kernel? 

as in: 

make vendor_hwselect..., make menuconfig, make romfs, make, make linux image? 

or juz: 

make vendor_hwselect..., make menuconfig, make, make linux image?
0 Kudos
Altera_Forum
Honored Contributor II
1,133 Views

make vendor_hwselect..., make menuconfig, make romfs, make,make, make linux image 

 

The first "make romfs" is needed only to create the romfs dir, (mostly empty). 

It is not needed afterward. 

 

The first "make" may fail, if you have "Hyper-thread" or "Dual core" PC. 

The next "make" will success. 

 

But the initramfs may be empty, it was before real romfs generation. 

The final "make linux image" will update the initramfs. You can use "make" as the final, but it is slower. 

 

After the first successful boot image, you may change kernel or apps 

make menuconfig,make,make linux image 

 

You don&#39;t need make vendor_hwselect again, unless you change the ptf. 

If you change ptf, then you need make clean, and start over from make vendor_hwselect.
0 Kudos
Reply