Forum Discussion
Altera_Forum
Honored Contributor
20 years agobuildroot to build toolchain on Linux
TO_BE_DONE
107 Replies
- Altera_Forum
Honored Contributor
Sorry to jump in like this...
I managed to compile, build and run 2.6.11 acording to your procedure - I apreciate very much your effort and I'm hopping I speak for a lot o people watching this forum. Of course, I did run into a few problems after booting: First, my network interface (OpenCores EthMAC + TDK PHY) doesn't want to work. I get to see the link status (100FDX) when I connect the cable and configure the interface, but that's about all. This, however, is going to require some more work on my part. The reason I'm writting under this topic is that I get the following messages (boot time or dmesg) and don't know if it's going to affect the operation in a very bad way (or not). (This should be the NO NETWOK kernel, in spite of the messages you see bellow !)uClinux/Nios II Altera Nios II support (C) 2004 Microtronix Datacom Ltd. Built 1 zonelists Kernel command line: root=/dev/mtdblock0 ro PID hash table entries: 128 (order: 7, 2048 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) Memory available: 14340k/16384k RAM, 0k/0k ROM (1303k kernel code, 545k data) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) NET: Registered protocol family 16 <<< !!!!! NIOS serial driver version 0.0 ttyS0 (irq = 5) is a builtin NIOS UART ttyS1 (irq = 6) is a builtin NIOS UART ttyS2 (irq = 8) is a builtin NIOS UART ttyS3 (irq = 9) is a builtin NIOS UART ttyS4 (irq = 10) is a builtin NIOS UART Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x80920820 (irq = 2) is a jtag_uart io scheduler noop registered io scheduler anticipatory registered RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize physmap flash device: 8000000 at 0 Failed to ioremap <<<<<<<<< uclinux: RAM probe address=0x11ce450 size=0x0 Creating 1 MTD partitions on "RAM": 0x00000000-0x00000000 : "ROMfs" mtd: partition "ROMfs" is out of reach -- disabled <<<<<<<<< uclinux: set ROMfs to be root filesystem Microtronix map: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 Microtronix map: CFI does not contain boot bank location. Assuming top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. cmdlinepart partition parsing not available RedBoot partition parsing not available Using Microtronix development partition definition Creating 2 MTD partitions on "Microtronix map": 0x00200000-0x00800000 : "romfs" 0x00000000-0x00200000 : "loader/kernel" microtronix: RAM probe address=0x200000 size=0xf3000 Creating 1 MTD partitions on "RAM": 0x00000000-0x000f3000 : "ROMfs" microtronix: set ROMfs to be root filesystem slram: not enough parameters. <<<<<<<<< blkmtd: version $Revision: 1.5 $ <<<<<<<<< blkmtd: error: missing `device' name <<<<<<<<< NET: Registered protocol family 2 << !!!! IP: routing cache hash table of 512 buckets, 4Kbytes << !!!! TCP established hash table entries: 1024 (order: 1, 8192 bytes) << !!!! TCP bind hash table entries: 1024 (order: 0, 4096 bytes) << !!!! TCP: Hash tables configured (established 1024 bind 1024) << !!!! NET: Registered protocol family 1 << !!!! Freeing unused kernel memory: 440k freed (0x1152000 - 0x11bf000) init started: BusyBox v1.1.0 (2006.02.12-20:01+0000) multi-call binary Initializing ramdisk for /var ... Initializing ramdisk for /tmp ... Initializing ramdisk for /mnt ... Mounting /proc filesystem... Mounting /sys filesystem... Welcome to Our Own(TM) uClinux NO NET development environment! nios_01 login: root Nov 30 00:02:37 login: root login on `ttyJ0' BusyBox v1.1.0 (2006.02.12-20:01+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. # - Altera_Forum
Honored Contributor
Your PATH may not have the cross gcc.
check step4 in post#1. try "nios2-linux-uclibc-gcc -v" - Altera_Forum
Honored Contributor
hi hippo:
I make boa ,dhcp, netsnmp ,but failed. The failed information: [alex@localhost uClinux-dist-test]$ make subdirs echo "Build start unix" Build start unix echo 1140414275 1140414275 for dir in include lib include user ; do [ ! -d $dir ] || make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- -C $dir || exit 1 ; done make[1]: Entering directory `/home/alex/uClinux-dist-test/include' find . -depth -type l -a ! -name Makefile | xargs rm > /dev/null 2>&1 || exit 0 find . -depth -type d | xargs rmdir > /dev/null 2>&1 || exit 0 Making symlinks in include/ /bin/sh: nios2-linux-uclibc-gcc: command not found Making include/c++ symlink to compiler c++ includes make[1]: Leaving directory `/home/alex/uClinux-dist-test/include' make[1]: Entering directory `/home/alex/uClinux-dist-test/lib' for i in ../include ../include /home/alex/uClinux-dist-test/prop ; do if [ -d $i ]; then touch $i/.sgbuilt_lib; make -C $i || exit $? ; fi; make make_links || exit ; done make[2]: Entering directory `/home/alex/uClinux-dist-test/include' find . -depth -type l -a ! -name Makefile | xargs rm > /dev/null 2>&1 || exit 0 find . -depth -type d | xargs rmdir > /dev/null 2>&1 || exit 0 Making symlinks in include/ /bin/sh: nios2-linux-uclibc-gcc: command not found Making include/c++ symlink to compiler c++ includes make[2]: Leaving directory `/home/alex/uClinux-dist-test/include' make[2]: Entering directory `/home/alex/uClinux-dist-test/lib' Making symlinks in lib/ make[2]: Leaving directory `/home/alex/uClinux-dist-test/lib' make[2]: Entering directory `/home/alex/uClinux-dist-test/include' find . -depth -type l -a ! -name Makefile | xargs rm > /dev/null 2>&1 || exit 0 find . -depth -type d | xargs rmdir > /dev/null 2>&1 || exit 0 Making symlinks in include/ /bin/sh: nios2-linux-uclibc-gcc: command not found Making include/c++ symlink to compiler c++ includes make[2]: Leaving directory `/home/alex/uClinux-dist-test/include' make[2]: Entering directory `/home/alex/uClinux-dist-test/lib' Making symlinks in lib/ make[2]: Leaving directory `/home/alex/uClinux-dist-test/lib' make[2]: Entering directory `/home/alex/uClinux-dist-test/lib' Making symlinks in lib/ make[2]: Leaving directory `/home/alex/uClinux-dist-test/lib' make[1]: Leaving directory `/home/alex/uClinux-dist-test/lib' make[1]: Entering directory `/home/alex/uClinux-dist-test/include' find . -depth -type l -a ! -name Makefile | xargs rm > /dev/null 2>&1 || exit 0 find . -depth -type d | xargs rmdir > /dev/null 2>&1 || exit 0 Making symlinks in include/ /bin/sh: nios2-linux-uclibc-gcc: command not found Making include/c++ symlink to compiler c++ includes make[1]: Leaving directory `/home/alex/uClinux-dist-test/include' make[1]: Entering directory `/home/alex/uClinux-dist-test/user' for i in boa dhcpd games net-snmp /home/alex/uClinux-dist-test/vendors/Altera/ni os2nommu/. /home/alex/uClinux-dist-test/prop; do if [ -d $i ]; then touch $i/.sgbuilt_user; make -C $i || exit $? ; fi; done make[2]: Entering directory `/home/alex/uClinux-dist-test/user/boa' for i in src ; do make -C $i all || exit ; done make[3]: Entering directory `/home/alex/uClinux-dist-test/user/boa/src' nios2-linux-uclibc-gcc -Os -g -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -I/home/alex/uClinux-dist-test -fno-builtin -c -o alias.o alias.c make[3]: nios2-linux-uclibc-gcc:命令未找到 make[3]: *** [alias.o] 错误 127 make[3]: Leaving directory `/home/alex/uClinux-dist-test/user/boa/src' make[2]: *** [all] 错误 2 make[2]: Leaving directory `/home/alex/uClinux-dist-test/user/boa' make[1]: *** [all] 错误 2 make[1]: Leaving directory `/home/alex/uClinux-dist-test/user' make: *** [subdirs] 错误 1 [alex@localhost uClinux-dist-test]$ Why do not find the command : nios2-linux-uclibc-gcc? Thank you. - Altera_Forum
Honored Contributor
Hi hippo:
I successed setting net setting. 1) select Netsetting in menuconfig 2) select the fact mac/phy product of net device in menuconfig The correct setting commadn is: # ifconfig eth0 netaddr 192.168.0.85 netmask 255.255.255.0 up - Altera_Forum
Honored Contributor
Sorry, I am not good at network. Maybe someone better help out.
First, check if you have your net device in kernel menuconfig. Next, check the boot up message if the net device init. - Altera_Forum
Honored Contributor
Hi hippo:
I am testing boa and DHCP now. Frist I must config the ethernet setting. I use the ifconfig command as follow: ifconfig eth0 inet addr:192.168.0.85 Mask:255.255.255.0 up but I find the command not setting my dvb success. I use ping command use loopback address(127.0.0.1),it's OK. I think the problem maybe I use wrong config method. I want to use ifconfig -h command to look for help,but no any information display. Can you help me? Thank you. - Altera_Forum
Honored Contributor
Hi Alex,
Great! How about user's apps, such as BOA, dhcpd ..etc ? - Altera_Forum
Honored Contributor
HI HIPPO:
I make successed,and run in my dvb. Thank you. - Altera_Forum
Honored Contributor
Hi Alex,
1. the ccache is not required, you can disable it. cd ~/buildroot make menuconfig Toolchain Options--> [ ] Enable ccache support? make 2. Ignore the watchdog patch fail of the new kernel. You can update the watchdog Makefile later. - Altera_Forum
Honored Contributor
hi hippo:
I remove old buildroot ,rootfs, linux-2.6.x, linux-2.6.15.4 frisst.Then rebuilded the toolschian follow your new update with ./build0207. But I still failed .I think the failed reason is ccache.samba.org web site I got follow informathion: /buildroot/build_nios2/staging_dir/bin/nios2-linux-uclibc-objcopy PREFIX=/home/alex/buildroot/build_nios2/root utils install_utils make[1]: Entering directory `/home/alex/buildroot/toolchain_build_nios2/uClibc' CC utils/readelf STRIP -x -R .note -R .comment ../utils/readelf make CROSS=" /home/alex/buildroot/build_nios2/staging_dir/bin/nios2-linux-uclibc-" CC="/home/alex/buildroot/build_nios2/staging_dir/bin/nios2-linux-uclibc-gcc" -C utils utils_install install -d /home/alex/buildroot/build_nios2/root/usr/bin# install -m 755 ../utils/readelf /home/alex/buildroot/build_nios2/root/usr/bin/readelf make[1]: Leaving directory `/home/alex/buildroot/toolchain_build_nios2/uClibc' touch -c /home/alex/buildroot/build_nios2/root/usr/bin/ldd wget --passive-ftp -P /home/alex/buildroot/dl http://ccache.samba.org/ftp/ccache/ccache-2.4.tar.gz (http://ccache.samba.org/ftp/ccache/ccache-2.4.tar.gz) --12:14:39-- http://ccache.samba.org/ftp/ccache/ccache-2.4.tar.gz (http://ccache.samba.org/ftp/ccache/ccache-2.4.tar.gz) => `/home/alex/buildroot/dl/ccache-2.4.tar.gz' 正在解析主机 ccache.samba.org... 66.70.73.150 正在连接 ccache.samba.org[66.70.73.150]:80... 已连接。 已发出 HTTP 请求,正在等待回应... 404 Not Found 12:14:40 错误 404:Not Found。 make: *** [/home/alex/buildroot/dl/ccache-2.4.tar.gz] 错误 1 [alex@localhost download]$ I will search other web to obtain the ccache-2.4.tar.gz, then download it in ~/download dir.If you know other web site what have the file ,pelease tell me. 2) I make process, I got other information about watchdog. patch file drivers/char/watchdogs/Makefile Hunk# 1 Failed at 39 1 out of 1 hunk Failed -saving rejects to file drivers/char/watchdogs/Makefile.rej