Forum Discussion

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

build kernel errors (follows UClinuxDist in Wiki)

hi. i am a beginner on uclinux and i followed the UClinuxDist to build the uclinux kernel, but it turned out some errors.

**********************************************************

>make vendor_hwselect SYSPTF=~/download/HW/system_0.ptf

.............

>make romfs

........

make[1]: Leaving directory `/home/echo/download/uClinux-dist/lib'

make[1]: Entering directory `/home/echo/download/uClinux-dist/include'

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

make[1]: Leaving directory `/home/echo/download/uClinux-dist/include'

make[1]: Entering directory `/home/echo/download/uClinux-dist/user'

for i in boa busybox cgi_generic dhcpcd-new ftp ftpd games inetd init ntp sash telnetd /home/echo/download/uClinux-dist/prop ; do

[ ! -d $i ] || make -C $i romfs || exit $? ;

done

make[2]: Entering directory `/home/echo/download/uClinux-dist/user/boa'

for i in src ; do make -C $i romfs || exit ; done

make[3]: Entering directory `/home/echo/download/uClinux-dist/user/boa/src'

romfs-inst.sh /bin/boa

cp: can't confirm ‘boa’: No such file or directory

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

make[3]: Leaving directory `/home/echo/download/uClinux-dist/user/boa/src'

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

make[2]: Leaving directory `/home/echo/download/uClinux-dist/user/boa'

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

make[1]: Leaving directory `/home/echo/download/uClinux-dist/user'

make: *** [romfs.subdirs] error 1

>make

......

CHK include/linux/version.h

CHK include/linux/utsrelease.h

CHK include/linux/compile.h

GEN usr/initramfs_data.cpio.gz

/home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk:command not found

Unrecognized dir format '/init 777 1000 1000' line 42

make[2]: *** [usr/initramfs_data.cpio.gz] error 255

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

make[1]: Leaving directory `/home/echo/download/uClinux-dist/linux-2.6.x'

make: *** [linux] error 1

>make

............

/home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk:command not found

Unrecognized dir format '/init 777 1000 1000' line 42

make[2]: *** [usr/initramfs_data.cpio.gz] error 255

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

make[1]: Leaving directory `/home/echo/download/uClinux-dist/linux-2.6.x'

make: *** [linux] error 1

>make linux image

.............

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

no emulation specific options.

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

CHK include/nios2_system.h

perl -I/home/echo/download/uClinux-dist/linux-2.6.x/arch/nios2nommu/scripts /home/echo/download/uClinux-dist/linux-2.6.x/arch/nios2nommu/scripts/gen_nios2_system.h.pl cpu_0 sdram_0 cfi_flash_0 < /home/echo/download/HW/system_0.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/utsrelease.h

CHK include/linux/compile.h

GEN usr/initramfs_data.cpio.gz

/home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

Unrecognized dir format &#39;/init 777 1000 1000&#39; line 42

make[2]: *** [usr/initramfs_data.cpio.gz] error 255

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

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

make: *** [linux] error 1

********************************************************************************

*************

my ptf is from the wiki "system_0.ptf" and seclet Altera, nios2nommu, None Libc and default all settings, i did it step by step and i don&#39;t know why these errors happen and also don&#39;t know how to solve them.

so can any body help me?i will show great appreciation to you! thanks!

5 Replies

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

    Check if you have the "gawk" command with,

    which gawk

    Or check if you have it in /usr/bin or /bin dir.

    Which Linux distro do you use? have you installed devolopment packages?

    If you are new to Linux, I would suggest CentOS 4.4.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by hippo@Apr 4 2007, 09:28 AM

    check if you have the "gawk" command with,

    which gawk

    or check if you have it in /usr/bin or /bin dir.

    which linux distro do you use? have you installed devolopment packages?

    if you are new to linux, i would suggest centos 4.4.

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

    --- quote end ---

    --- Quote End ---

    i run the command "gawk --help", the terminal shows"command not found", and i have checked that there was no "gawk" in both /bin and /usr/bin dir.

    i use ubuntu6.1 linux .

    just now i build kernel again, but run "make romfs" after running "make", and finally i got the zImage file ,but there were still many problems as follows(after i run "make linux image") :

    **********************

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    /home/echo/download/uClinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh: line 137: gawk&#65306;command not found

    Unrecognized dir format &#39;/bin/cp 777 1000 1000&#39; line 9

    Unrecognized dir format &#39;/bin/dd 777 1000 1000&#39; line 10

    Unrecognized dir format &#39;/bin/mount 777 1000 1000&#39; line 11

    Unrecognized dir format &#39;/bin/netstat 777 1000 1000&#39; line 12

    Unrecognized dir format &#39;/bin/ping 777 1000 1000&#39; line 13

    Unrecognized dir format &#39;/bin/rm 777 1000 1000&#39; line 14

    Unrecognized dir format &#39;/usr/bin/ftpget 777 1000 1000&#39; line 59

    Unrecognized dir format &#39;/usr/bin/ftpput 777 1000 1000&#39; line 60

    Unrecognized dir format &#39;/usr/bin/telnet 777 1000 1000&#39; line 61

    Unrecognized dir format &#39;/usr/bin/wget 777 1000 1000&#39; line 62

    Unrecognized dir format &#39;/init 777 1000 1000&#39; line 66

    Unrecognized dir format &#39;/sbin/ifconfig 777 1000 1000&#39; line 68

    Unrecognized dir format &#39;/sbin/insmod 777 1000 1000&#39; line 69

    Unrecognized dir format &#39;/sbin/lsmod 777 1000 1000&#39; line 70

    Unrecognized dir format &#39;/sbin/modprobe 777 1000 1000&#39; line 71

    Unrecognized dir format &#39;/sbin/rmmod 777 1000 1000&#39; line 72

    Unrecognized dir format &#39;/sbin/route 777 1000 1000&#39; line 73

    make[2]: *** [usr/initramfs_data.cpio.gz] error 255

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

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

    make: *** [linux] error 1

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

    --- Quote Start ---

    originally posted by hippo@Apr 4 2007, 08:53 PM

    you need gawk package, follow

    https://help.ubuntu.com/6.10/ubuntu/desktopguide/c/apt.html (https://help.ubuntu.com/6.10/ubuntu/desktopguide/c/apt.html)

    if you are new to linux, you should try centos 4.4 (but not 5.x) . select the development tool package group, everything should be here.

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

    --- quote end ---

    --- Quote End ---

    thanks, hippo. i have solved it! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by hippo@Apr 4 2007, 10:28 AM

    check if you have the "gawk" command with,

    which gawk

    or check if you have it in /usr/bin or /bin dir.

    which linux distro do you use? have you installed devolopment packages?

    if you are new to linux, i would suggest centos 4.4.

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

    --- quote end ---

    --- Quote End ---

    I have it in /usr/bin dir,

    but when i make romfs:

    make[2]: Entering directory `/home/nios/download/uClinux-dist/user/boa&#39;

    for i in src ; do make -C $i romfs || exit ; done

    make[3]: Entering directory `/home/nios/download/uClinux-dist/user/boa/src&#39;

    romfs-inst.sh /bin/boa

    cp: stat‘boa’&#22833;&#36133;: &#27809;&#26377;&#37027;&#20010;&#25991;&#20214;&#25110;&#30446;&#24405;

    make[3]: *** [romfs] &#38169;&#35823; 1

    make[3]: Leaving directory `/home/nios/download/uClinux-dist/user/boa/src&#39;

    make[2]: *** [romfs] &#38169;&#35823; 2

    make[2]: Leaving directory `/home/nios/download/uClinux-dist/user/boa&#39;

    make[1]: *** [romfs] &#38169;&#35823; 2

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

    make: *** [romfs.subdirs] &#38169;&#35823; 1