Forum Discussion

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

uclinux builid error

Dear all,

This is the error file attached in the website,pls see iit,help me ,thx!

4 Replies

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

    dear hippo,

    According to you,I download the builld.zip ,uClinux-dist-20051110,and nios2linux-1.4.zip,

    then execute the ./build

    this is the error information in the terminal :

    tar: buildroot/package/bash/bash31-009: Cannot open: 没有那个文件或目录

    tar: buildroot/package/bash/Config.in: Cannot open: 没有那个文件或目录

    tar: buildroot/package/Config.in: Cannot open: 没有那个文件或目录

    tar: buildroot/package/Makefile.in: Cannot open: 没有那个文件或目录

    tar: buildroot/.defconfig: Cannot open: 没有那个文件或目录

    tar: buildroot/Config.in: Cannot open: 没有那个文件或目录

    tar: buildroot/Makefile: Cannot open: 没有那个文件或目录

    tar: Error exit delayed from previous errors

    ./build: line 40: cd: /home/fzh2004/buildroot: 没有那个文件或目录

    can'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:

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

    THANKS

    I WANT TO DO ACCORDING TO YOU,BECAUSE THE NET DOWLOAD IS SLOW,SO I DOWNLOAD THIS FILES:uClinux-dist-20051110.tar.bz2,busybox-20060320.tar.bz2,uClibc-20060320.tar.bz2 AND buildroot-20060320.tar.bz2

    COULD YOU HELP HOW TO MODIFY THE BUID FILE:

    # !/bin/bash# rm -rf ~/buildroot ~/rootfs ~/linux-2.6.x ~/download/mx140 ~/uClinux-dist ~/apps# to prepare kernel source

    cd ~/download

    mkdir mx140

    cd mx140# convert the crlf with unzip -a

    echo "prepare kernel source"

    unzip -aoq ../nios2linux-1.4.zip# kernel 2.6.11-uc0 source ported by microtronix

    cp -a plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x ~

    cd ~/linux-2.6.x

    patch -p0 <~/download/kernel.diff

    cp ~/download/kernel.config ~/linux-2.6.x/.config# apps ported by microtronix, only Makefile of inetd, ftpd and boa are patched to use the toolchains

    mkdir ~/apps

    cp -a ~/download/mx140/examples/software/linux/apps/* ~/apps

    cd ~/apps

    patch -p1 <~/download/mx140apps.diff# to prepare uClinux-dist source

    cd ~/download

    echo "prepare uClinux-dist source"

    wget -N http://www.uclinux.org/pub/uclinux/dist/uc...0051110.tar.bz2 (http://www.uclinux.org/pub/uclinux/dist/uclinux-dist-20051110.tar.bz2)

    cd ~

    tar jxf ~/download/uClinux-dist-20051110.tar.bz2

    cd ~/uClinux-dist

    patch -p0 <~/download/uClinux-dist.diff

    touch ~/uClinux-dist/vendors/Altera/nios2nommu/inittab# download buildroot snapshot

    cd ~/download

    SNAPSHOT=20060320

    rm -f buildroot-snapshot.tar.bz2 uClibc-snapshot.tar.bz2 busybox-snapshot.tar.bz2 # wget -N http://buildroot.uclibc.org/downloads/snap...napshot.tar.bz2 (http://buildroot.uclibc.org/downloads/snapshots/buildroot-$snapshot.tar.bz2)

    #wget -N http://www.uclibc.org/downloads/snapshots/...napshot.tar.bz2 (http://www.uclibc.org/downloads/snapshots/uclibc-$snapshot.tar.bz2)

    #wget -N http://busybox.net/downloads/snapshots/bus...napshot.tar.bz2 (http://busybox.net/downloads/snapshots/busybox-$snapshot.tar.bz2)

    wget -N http://hungryhippo.jot.com/wikihome/buildr...0060320.tar.bz2 (http://hungryhippo.jot.com/wikihome/buildroot-20060320.tar.bz2)

    wget -N http://hungryhippo.jot.com/wikihome/uclibc-20060320.tar.bz2 (http://hungryhippo.jot.com/wikihome/uclibc-20060320.tar.bz2)

    wget -N http://hungryhippo.jot.com/wikihome/busybox-20060320.tar.bz2 (http://hungryhippo.jot.com/wikihome/busybox-20060320.tar.bz2)

    ln -s buildroot-$SNAPSHOT.tar.bz2 buildroot-snapshot.tar.bz2

    ln -s uClibc-$SNAPSHOT.tar.bz2 uClibc-snapshot.tar.bz2

    ln -s busybox-$SNAPSHOT.tar.bz2 busybox-snapshot.tar.bz2

    cd ~

    tar jxf ~/download/buildroot-snapshot.tar.bz2

    cd ~/buildroot

    ln -s ~/download dl# patches for configs, add elf2flt to busybox

    patch -p0 <~/download/buildroot.diff

    make oldconfig

    make# clean headers for uClinux-dist

    cd ~/buildroot/build_nios2/staging_dir/include/linux

    rm config.h autoconf.h

    touch config.h autoconf.h# prepare root fs

    rm -rf ~/rootfs

    mkdir ~/rootfs

    cp -a ~/buildroot/build_nios2/root/* ~/rootfs

    cd ~/rootfs# remove include and lib to save space# the dev nodes are generated via ~/download/rootfs_list

    rm -rf dev usr/include usr/lib# you may use this instead of the one from buildroot

    cp ~/download/inittab etc
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Please post your questions on the uClinux area, not here.

    You will need more files for buildroot, and take more time.

    Please download the binary tools and rootfs from the nios wiki, and install them.

    Then use this script to prepare the sources, and you can compile the kernel.

    But I still recommand you follow the uClinux-dist approach as in the wiki.

    #!/bin/bash
    rm -rf ~/buildroot ~/rootfs ~/linux-2.6.x ~/download/mx140 ~/uClinux-dist ~/apps#  to prepare kernel source
    cd ~/download
    mkdir mx140
    cd mx140#  convert the crlf with unzip -a
    echo "prepare kernel source"
    unzip -aoq ../nios2linux-1.4.zip#  kernel 2.6.11-uc0 source ported by microtronix
    cp -a plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x ~
    cd ~/linux-2.6.x
    patch -p0 <~/download/kernel.diff
    cp ~/download/kernel.config ~/linux-2.6.x/.config#  apps ported by microtronix, only Makefile of inetd, ftpd and boa are patched to use the toolchains
    mkdir ~/apps
    cp -a ~/download/mx140/examples/software/linux/apps/* ~/apps
    cd ~/apps
    patch -p1 <~/download/mx140apps.diff#  to prepare uClinux-dist source
    cd ~/download
    echo "prepare uClinux-dist source"
    cd ~
    tar jxf ~/download/uClinux-dist-20051110.tar.bz2
    cd ~/uClinux-dist
    patch -p0 <~/download/uClinux-dist.diff
    touch ~/uClinux-dist/vendors/Altera/nios2nommu/inittab