Forum Discussion

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

build uclinux error

THANKS

I WANT TO DO ACCORDING TO hippo,I downloads the Nios II Linux Distribution v1.4 ,and build.zip.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

,then I place this files in ~/download instead of WGET commond.

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/uc...0051110.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/snap...napshot.tar.bz2)# wget -N http://www.uclibc.org/downloads/snapshots/...napshot.tar.bz2 (http://www.uclibc.org/downloads/snapshots/...napshot.tar.bz2)# wget -N http://busybox.net/downloads/snapshots/bus...napshot.tar.bz2 (http://busybox.net/downloads/snapshots/bus...napshot.tar.bz2)

wget -N http://hungryhippo.jot.com/wikihome/buildr...0060320.tar.bz2 (http://hungryhippo.jot.com/wikihome/buildr...0060320.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

15 Replies