Forum Discussion
Altera_Forum
Honored Contributor
20 years agoUpdate to buildroot toolchain for nios2
UPDATE : This post is out of date. Please follow the new one,
http://forum.niosforum.com/forum/index.php?showtopic=3174 (http://forum.niosforum.com/forum/index.php?showtopic=3174) Vapier has kindly incorporated patches from marc into the buildroot. Try out the lastest update of buildroot/uClibc/busybox with svn now or daily snapshot (tommorow).svn co svn://uclibc.org/trunk/buildroot36 Replies
- Altera_Forum
Honored Contributor
The latest update of elf2flt onto builtroot still has problem.
If you use the latest buildroot-snapshot.tar.bz2 with elf2flt included, you have to remove it, and use the downloaded patch elf2flt.diff in post#2. Remove the first part for toolchain/Config.in from file buildroot/dl/elf2flt.diff And apply the patch.
Then follow the procedures in post#2.cd buildroot rm -rf toolchain/elf2flt patch -p1 <dl/elf2flt.diff - Altera_Forum
Honored Contributor
hi hippo:
You said:"What browser do you use for downloading? The naming .tar.tar is strange." I have solved the question.Because use windows xp OS downloaded *tar.bz2 files will meet the question. So I use linux OS download the*tar.bz2 files.The files is correct. - Altera_Forum
Honored Contributor
I have tested the latest update svn. the uClibc-snapshot is OK now.
download those buildroot/uClibc/busybox snapshot.tar.bz2 again. And I have prepared the config files, http://forum.niosforum.com/forum/index.php...type=post&id=60 (http://forum.niosforum.com/forum/index.php?act=attach&type=post&id=60) unzip them into the buildroot/dl dir. and copy buildroot/dl/buildroot.config to buildroot/.config then in buildroot dir, make. I will give you more details later. - Altera_Forum
Honored Contributor
I am failed build gcc, because can't connected to mirros.rcn.net to get gcc-3.4.2.tar.bz2.
Who can tell me how to use China: ftp://linuxforum.net/ftp.gcc.gnu.org/ (ftp://linuxforum.net/ftp.gcc.gnu.org/) for solve the question? Thanks Alex - Altera_Forum
Honored Contributor
Alex,
ftp://linuxforum.net/ftp.gcc.gnu.org/rele...c-3.4.3.tar.bz2 (ftp://linuxforum.net/ftp.gcc.gnu.org/releases/gcc-3.4.3/gcc-3.4.3.tar.bz2) The buildroot.config uses bintuils-0.15,gcc-3.4.3,kernel header 2.6.11, uClibc snapshot, busybox snapshot.
in buildroot dir, make menuconfig, and just save and exit. unzip the configs.zip into buildroot/dl, copy buildroot.config to buildroot/.config. then in buildroot dir, make. it will build the compiler,uclibc,busybox and rootfs.nios2.ext2. the only problem remained, is the elf2flt. use the old one as in post#24, add the linetar jxf buildroot-snapshot.tar.bz2 mkdir buildroot/dl
to buildroot/build-nios2/busybox/Rules.mak remove file buildroot/build-nios2/busybox/busybox and in buildroot dir, make again. The rootfs is built into a ext2 image. Login as root account. Mount it and copy to your rootfs,LDFLAGS+=-Wl,-elf2flt="-s 16000" -Wl,-v -Wl,-dmkdir /mnt/v1 mount -o loop buildroot/rootfs.nios2.ext2 /mnt/v1 cp -a /mnt/v1/* your_rootfs_dir chown -R your_username:your_username your_rootfs_dir umount /mnt/v1 - Altera_Forum
Honored Contributor
download gcc.3.4.2.tar.bz2 form ft,and place into buildroot/dl/
--- Quote Start --- originally posted by hippo@Jan 10 2006, 10:57 PM i have tested the latest update svn. the uclibc-snapshot is ok now.download those buildroot/uclibc/busybox snapshot.tar.bz2 again.
and i have prepared the config files,
http://forum.niosforum.com/forum/index.php...type=post&id=60 (http://forum.niosforum.com/forum/index.php?act=attach&type=post&id=60)
unzip them into the buildroot/dl dir. and copy buildroot/dl/buildroot.config to buildroot/.config
then in buildroot dir, make.
i will give you more details later.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12122)
--- quote end ---
--- Quote End ---
- Altera_Forum
Honored Contributor
hi hippo:
A question: I have download gcc-3.4.2.tar.bz2 from ftp://linuxforum.net/ftp.gcc.gnu.org/rele...4.3.tar.bz2,and (ftp://linuxforum.net/ftp.gcc.gnu.org/rele...c-3.4.3.tar.bz2,and) copy it to /buildroot/dl. But in make process , still connecting to mirrors.rcn.net.so make process faild. What can I do? B question: follow you method: in buildroot dir, make menuconfig, and just save and exit. Is it means ignore select nios2, in toolchain option, [ ] Use a daily snapshot of uClibc? [*] Enable elf2flt support? [ ] Include target utils in cross toolchain I wish you will release a particular process article aboutinstall nios2 toolschain when you free. It will very helpfule for novice, like me http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif .In fact , incorrect setup toolschain will bring many crankish question in develop process. Thank you very much. - Altera_Forum
Honored Contributor
Alex,
I have fixed the bug of elf2flt. And the next snapshot should work without special attention.
What is the file which it trys to download?tar jxf buildroot-snapshot.tar.bz2 cd buildroot mkdir dl cd dl unzip ...../configs.zip cp ..../gcc*bz2 ..../*snapshot*bz2 . # copy those files into dl cd buildroot make defconfig cp dl/buildroot.config .config make - Altera_Forum
Honored Contributor
hi hippo:
tar jxf buildroot-snapshot.tar.bz2 cd buildroot mkdir dl cd dl unzip ...../configs.zip cp ..../gcc*bz2 ..../*snapshot*bz2 . # copy those files into dl cd buildroot make defconfig cp dl/buildroot.config .config make I am according to your method install toolchain,but make failed. The erro information : make -C /usr/local/nios2_toolchain/buildroot/toolchain_build_nios2/uClibc PREFIX=/usr/local/nios2_toolchain/buildroot/toolchain_build_nios2/uClibc_dev/ DEVEL_PREFIX=/usr/ RUNTIME_PREFIX=/usr/local/nios2_toolchain/buildroot/toolchain_build_nios2/uClibc _dev/ HOSTCC="gcc" pregen install_dev; make[1]: /usr/local/nios2_toolchain/buildroot/build_nios2/staging_dir/bin/nios2- linux-uclibc-gcc: Command not found make[1]: Entering directory `/usr/local/nios2_toolchain/buildroot/toolchain_buil d_nios2/uClibc' make[1]: /usr/local/nios2_toolchain/buildroot/build_nios2/staging_dir/bin/nios2- linux-uclibc-gcc: Command not found BBmake -C extra/config conf make[2]: /usr/local/nios2_toolchain/buildroot/build_nios2/staging_dir/bin/nios2- linux-uclibc-gcc: Command not found make[2]: Entering directory `/usr/local/nios2_toolchain/buildroot/toolchain_buil d_nios2/uClibc/extra/config' tack-protector -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "-fno-s tack-protec衜ake[2]: /usr/local/nios2_toolchain/buildroot/build_nios2/staging_di r/bin/nios2-linux-uclibc-gcc: Command not found ?B?Bmake[2]: *** No rule to make target `|', needed by `../../extra/config/c onf.o'. Stop. make[2]: Leaving directory `/usr/local/nios2_toolchain/buildroot/toolchain_build _nios2/uClibc/extra/config' make[1]: *** [extra/config/conf] Error 2 make[1]: Leaving directory `/usr/local/nios2_toolchain/buildroot/toolchain_build _nios2/uClibc' make: *** [/usr/local/nios2_toolchain/buildroot/toolchain_build_nios2/uClibc/.co nfigured] Error 2 http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif please help me check it.Thanks. - Altera_Forum
Honored Contributor
Let's do it step by step.
1. login with a user account, eg, alex. do not use root account. your home dir will be /home/alex, or in short ~/ 2. open your browser, eg, firefox, download all the files into ~/download, ie, /home/alex/download. http://buildroot.uclibc.org/downloads/snap...napshot.tar.bz2 (http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2) http://forum.niosforum.com/forum/index.php...type=post&id=60 (http://forum.niosforum.com/forum/index.php?act=attach&type=post&id=60) ftp://linuxforum.net/ftp.gcc.gnu.org/rele...c-3.4.3.tar.bz2 (ftp://linuxforum.net/ftp.gcc.gnu.org/releases/gcc-3.4.3/gcc-3.4.3.tar.bz2) http://uclibc.org/downloads/snapshots/ucli...napshot.tar.bz2 (http://uclibc.org/downloads/snapshots/uclibc-snapshot.tar.bz2) http://busybox.net/downloads/snapshots/bus...napshot.tar.bz2 (http://busybox.net/downloads/snapshots/busybox-snapshot.tar.bz2) 3. open a terminal, the current dir will be your home dir, ~/ cd download unzip configs.zip cd ~ tar jxf download/buildroot-snapshot.tar.bz2 cd buildroot ln -s ../download dl make defconfig cp dl/buildroot.config .config make If you have problem, send me, ls ~/buildroot ls ~/buildroot/build_nios2 ls ~/buildroot/build_nios2/staging_dir ls ~/buildroot/toolchain_build_nios2 and the make error message.