Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Problem with BuildrootGuide

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.

19 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.