Forum Discussion
Altera_Forum
Honored Contributor
20 years agobuild 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 etc15 Replies
- Altera_Forum
Honored Contributor
You will need wget 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 - Altera_Forum
Honored Contributor
thanks hippo,because i want to port uclinux to my own board,so i want to according to you, i think the WGET in the build script is to download four file ,so i download the four file instead of downloading the four file because the net is slow , do you think so? if so , i want you modify the script ,
by the way, I found that no altera directory in the uClinux-dist\vendors\,why? thanks!!!! - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by nwpu_zhf2004@May 29 2006, 12:22 PM thanks hippo,because i want to port uclinux to my own board,so i want to according to you, i think the wget in the build script is to download four file ,so i download the four file instead of downloading the four file because the net is slow , do you think so? if so , i want you modify the script ,by the way, i found that no altera directory in the uclinux-dist\vendors\,why?
thanks!!!!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15644)
--- quote end ---
--- Quote End --- The buildroot process will wget a lot more files. So I don't suggest you run buildroot. (My best suggestion for you) Follow the binary toolchain and uClinux-dist as in nios wiki. You need to download only three files with your browser, http://nioswiki.jot.com/wikihome/operating...ios2gcc.tar.bz2 (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/binarytoolchain/nios2gcc.tar.bz2) http://nioswiki.jot.com/wikihome/operating...ux-dist.diff.gz (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist/uclinux-dist.diff.gz) http://www.uclinux.org/pub/uclinux/dist/uc...0060511.tar.bz2 (http://www.uclinux.org/pub/uclinux/dist/uclinux-dist-test-20060511.tar.bz2) I know the network speed is slow. Please be patient and read some uClinux / Linux doc. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
- Altera_Forum
Honored Contributor
dear hippo,
Thank you very much, because I don't know how to do,could you give me the particular step about establish uclinux,thanks! - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by nwpu_zhf2004@May 29 2006, 03:34 PM dear hippo,thank you very much, because i don't know how to do,could you give me the particular step about establish uclinux,thanks!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15647)
--- quote end ---
--- Quote End --- OK. step1. Do you have altera nios dev board? If you have one, try out the prebuild zImage, as in the wiki http://nioswiki.jot.com/wikihome/operating...s/tryoutuclinux (http://nioswiki.jot.com/wikihome/operatingsystems/tryoutuclinux) Step2, , download the binary tool http://nioswiki.jot.com/wikihome/operating...ios2gcc.tar.bz2 (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/binarytoolchain/nios2gcc.tar.bz2) and install as in http://nioswiki.jot.com/wikihome/operating...binarytoolchain (http://nioswiki.jot.com/wikihome/operatingsystems/binarytoolchain) step3, dowload http://www.uclinux.org/pub/uclinux/dist/uc...0060511.tar.bz2 (http://www.uclinux.org/pub/uclinux/dist/uclinux-dist-test-20060511.tar.bz2) (take a long time) and http://nioswiki.jot.com/wikihome/operating...ux-dist.diff.gz (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist/uclinux-dist.diff.gz) Then follow http://nioswiki.jot.com/wikihome/operating...nux/uclinuxdist (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist)
- Altera_Forum
Honored Contributor
First i thank you very much,i want do uclinux in my own custiom board,i have not altera dev board,could you give some advice in my own custom board?
thanks! - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by nwpu_zhf2004@May 29 2006, 03:51 PM first i thank you very much,i want do uclinux in my own custiom board,i have not altera dev board,could you give some advice in my own custom board?thanks!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15649)
--- quote end ---
--- Quote End --- That's OK. First, you should read "before you start" in the wiki http://nioswiki.jot.com/wikihome/operating...ms/%c2%b5clinux (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux) And build your nios2 hardware in sopc builder, compile to sof. The install the binary toolchain (step2) and uClinux-dist (step3). Now you can createt the kernel zImage, and follow the "try out" to run it (step1),
- Altera_Forum
Honored Contributor
Thanks hippo, according to you ,when i execute the following command,
------------------------------------ cd ~ tar jxf uClinux-dist-test-20060511.tar.bz2 cd uClinux-dist-test zcat uClinux-dist.diff.gz | patch -p0 make menuconfig then emerging the following information in the termiinal: [root@localhost uClinux-dist-test]# make menuconfig config/mkconfig > config.in make -C /home/wangdengke/uClinux-dist-test/config/scripts/lxdialog all make[1]: Entering directory `/home/wangdengke/uClinux-dist-test/config/scripts/lxdialog' /bin/sh: line 1: cc: command not found >> Unable to find the Ncurses libraries. >> >> You must have Ncurses installed in order >> to use 'make menuconfig' make[1]: *** [ncurses] Error 1 make[1]: Leaving directory `/home/wangdengke/uClinux-dist-test/config/scripts/lxdialog' make: *** [menuconfig] Error 2 [root@localhost uClinux-dist-test]# pls see it ,help me!!! - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by nwpu_zhf2004@May 29 2006, 05:57 PM thanks hippo, according to you ,when i execute the following command,------------------------------------
cd ~
tar jxf uclinux-dist-test-20060511.tar.bz2
cd uclinux-dist-test
zcat uclinux-dist.diff.gz | patch -p0
make menuconfig
then emerging the following information in the termiinal:
[root@localhost uclinux-dist-test]# make menuconfig
config/mkconfig > config.in
make -c /home/wangdengke/uclinux-dist-test/config/scripts/lxdialog all
make[1]: entering directory `/home/wangdengke/uclinux-dist-test/config/scripts/lxdialog'
/bin/sh: line 1: cc: command not found
>> unable to find the ncurses libraries.
>>
>> you must have ncurses installed in order
>> to use 'make menuconfig'
make[1]: *** [ncurses] error 1
make[1]: leaving directory `/home/wangdengke/uclinux-dist-test/config/scripts/lxdialog'
make: *** [menuconfig] error 2
[root@localhost uclinux-dist-test]#
pls see it ,help me!!!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15654)
--- quote end ---
--- Quote End --- You need ncurses lib. If you use Fedora core, "su -" to root and run "yum install ncurses ncurses-devel" .
- Altera_Forum
Honored Contributor
thanks,i don't use fedora and vmware ,i only use the red hat 9.0 on pc directly ,pls help me !!!