Forum Discussion
Altera_Forum
Honored Contributor
20 years agohow to build toolchain on linux ,no internet
Dear ALL
beacuse i can't connect the Internet in my Linux computer. so i find many many error when i build the toolchain. first i read the script of build ,i find wget -N http://www.kernel.org/pub/linux/kernel/v2.....6.15.4.tar.bz2 (http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.15.4.tar.bz2) wget -N http://www.uclinux.org/pub/uclinux/uclinux...15-uc0.patch.gz (http://www.uclinux.org/pub/uclinux/uclinux-2.6.x/linux-2.6.15-uc0.patch.gz) wget -N http://www.uclinux.org/pub/uclinux/dist/uc...0051209.tar.bz2 (http://www.uclinux.org/pub/uclinux/dist/uclinux-dist-test-20051209.tar.bz2) wget http://buildroot.uclibc.org/downloads/snap...0060207.tar.bz2 (http://buildroot.uclibc.org/downloads/snapshots/buildroot-20060207.tar.bz2) -O buildroot-snapshot.tar.bz2 wget http://www.uclibc.org/downloads/snapshots/...0060207.tar.bz2 (http://www.uclibc.org/downloads/snapshots/uclibc-20060207.tar.bz2) -O uClibc-snapshot.tar.bz2 wget http://busybox.net/downloads/snapshots/bus...0060207.tar.bz2 (http://busybox.net/downloads/snapshots/busybox-20060207.tar.bz2) -O busybox-snapshot.tar.bz2 so i dowload it in other computer. and then cp to the ~/download but i think i shoud do it over . but i find i must download a file linux-libc-headers-2.6.11.0.tar.bz2 and then i copy it to ~/buildroot/dl but i find the next error * Target Options * * * filesystem for target device * cramfs root filesystem (BR2_TARGET_ROOTFS_CRAMFS) [N/y/?] n cloop root filesystem for the target device (BR2_TARGET_ROOTFS_CLOOP) [N/y/?] n ext2 root filesystem (BR2_TARGET_ROOTFS_EXT2) [Y/n/?] y size in blocks (leave at 0 for auto calculation) (BR2_TARGET_ROOTFS_EXT2_BLOCK S) [0] 0 inodes (leave at 0 for auto calculation) (BR2_TARGET_ROOTFS_EXT2_INODES) [0] 0 reserved blocks (BR2_TARGET_ROOTFS_EXT2_RESBLKS) [0] 0 Make all files be owned by root (BR2_TARGET_ROOTFS_EXT2_SQUASH) [Y/n] y Output File (BR2_TARGET_ROOTFS_EXT2_OUTPUT) [$(IMAGE).ext2] $(IMAGE).ext2 gzip the output file (BR2_TARGET_ROOTFS_EXT2_GZ) [N/y] n also copy the image to... (BR2_TARGET_ROOTFS_EXT2_COPYTO) [] jffs2 root filesystem (BR2_TARGET_ROOTFS_JFFS2) [N/y/?] n squashfs root filesystem (BR2_TARGET_ROOTFS_SQUASHFS) [N/y/?] n tar the root filesystem (BR2_TARGET_ROOTFS_TAR) [N/y/?] n * * bootloader for target device * * * Board Support Options * * * Generic System Support * Generic wireless access point (BR2_TARGET_GENERIC_ACCESS_POINT) [N/y/?] n Generic firewall (BR2_TARGET_GENERIC_FIREWALL) [N/y/?] n Generic development system (BR2_TARGET_GENERIC_DEV_SYSTEM) [N/y/?] n grep: /home/wyouken/buildroot/build_nios2/staging_dir/include/bits/uClibc_config .h: 没有那个文件或目录 package/wipe/wipe.mk:19: warning: overriding commands for target `/home/wyouken/ buildroot/dl/' package/mtd/mtd.mk:44: warning: ignoring old commands for target `/home/wyouken/ buildroot/dl/' cp toolchain/uClibc/uClibc.config /home/wyouken/buildroot/toolchain_build_nios2/ uClibc/.config /home/wyouken/buildroot/toolchain_build_nios2/bin/sed -i -e 's,^CROSS_COMPILER_P REFIX=.*,CROSS_COMPILER_PREFIX="/home/wyouken/buildroot/build_nios2/staging_dir/ bin/nios2-linux-uclibc-",g' -e 's,# TARGET_nios2 is not set,TARGET_nios2=y,g' -e 's,^TARGET_ARCH="none",TARGET_ARCH=\"nios2\",g' -e 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"/home/wyouken/buildroot/toolchai n_build_nios2/linux\",g' -e 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' -e 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' -e 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' /home/wyouken/buildroot/toolchain_build_nios2/uClibc/.config /home/wyouken/buildroot/toolchain_build_nios2/bin/sed -i -e 's,^.*UCLIBC_HAS_LFS .*,UCLIBC_HAS_LFS=y,g' /home/wyouken/buildroot/toolchain_build_nios2/uClibc/.con fig /home/wyouken/buildroot/toolchain_build_nios2/bin/sed -i -e 's,.*UCLIBC_HAS_WCHA R.*,UCLIBC_HAS_WCHAR=y,g' /home/wyouken/buildroot/toolchain_build_nios2/uClibc/. config /home/wyouken/buildroot/toolchain_build_nios2/bin/sed -i -e 's,# UCLIBC_HAS_THRE ADS is not set,UCLIBC_HAS_THREADS=y,g' /home/wyouken/buildroot/toolchain_build_n ios2/uClibc/.config /home/wyouken/buildroot/toolchain_build_nios2/bin/sed -i -e 's,# PTHREADS_DEBUG_ SUPPORT is not set,PTHREADS_DEBUG_SUPPORT=y,g' /home/wyouken/buildroot/toolchain _build_nios2/uClibc/.config /home/wyouken/buildroot/toolchain_build_nios2/bin/sed -i -e 's,# LINUXTHREADS_OL D is not set,LINUXTHREADS_OLD=y,g' /home/wyouken/buildroot/toolchain_build_nios2 /uClibc/.config mkdir -p /home/wyouken/buildroot/toolchain_build_nios2/uClibc_dev/usr/include mkdir -p /home/wyouken/buildroot/toolchain_build_nios2/uClibc_dev/usr/lib mkdir -p /home/wyouken/buildroot/toolchain_build_nios2/uClibc_dev/lib make -C /home/wyouken/buildroot/toolchain_build_nios2/uClibc PREFIX=/home/wyouken/buildroot/toolchain_build_nios2/uClibc_dev/ DEVEL_PREFIX=/usr/ RUNTIME_PREFIX=/home/wyouken/buildroot/toolchain_build_nios2/uClibc_dev/ HOSTCC="gcc" pregen install_dev && touch /home/wyouken/buildroot/toolchain_build_nios2/uClibc/.configured make[1]: /home/wyouken/buildroot/build_nios2/staging_dir/bin/nios2-linux-uclibc- gcc: Command not found make[1]: Entering directory `/home/wyouken/buildroot/toolchain_build_nios2/uClib c' make[1]: /home/wyouken/buildroot/build_nios2/staging_dir/bin/nios2-linux-uclibc- gcc: Command not found BBmake -C extra/config conf make[2]: /home/wyouken/buildroot/build_nios2/staging_dir/bin/nios2-linux-uclibc- gcc: Command not found HB`?make[2]: /home/wyouken/buildroot/build_nios2/staging_dir/bin/nios2-linux-u clibc-gcc: Command not found ?B?Bmake[2]: *** No rule to make target `|', needed by `../../extra/config/c onf.o'. Stop. make[1]: *** [extra/config/conf] Error 2 make[1]: Leaving directory `/home/wyouken/buildroot/toolchain_build_nios2/uClibc ' make: *** [/home/wyouken/buildroot/toolchain_build_nios2/uClibc/.configured] Err or 2 ./build0207: line 57: cd: /home/wyouken/buildroot/build_nios2/staging_dir/includ e/linux: 没有那个文件或目录 rm: lstat‘config.h’失败: 没有那个文件或目录 rm: lstat‘autoconf.h’失败: 没有那个文件或目录 i want to know how to it when i can't connect the internet . beacuse i think the script maybe download some improtant file . help me !15 Replies
- Altera_Forum
Honored Contributor
Hi Alex,
The make of buildroot does not execute properly. Which Linux distribution do you use? Please try "rm -rf ~/buildroot/*2","cd ~/buildroot", and "make" again. - Altera_Forum
Honored Contributor
TO_BE_DONE
- Altera_Forum
Honored Contributor
Hi Alex,
"Redhat 9" is too old that "make" can not run properly. Please update to "Fedora core 4", fedora.redhat.com . You have select devel tools, install gcc32 as in the beginning of the buildroot guide, and do "yum update" . - Altera_Forum
Honored Contributor
Dear all
help me ! thanks! - Altera_Forum
Honored Contributor
[modify by alex 2006-2-25]
soory ! i mistake to do the next command <div class='quotetop'>QUOTE </div> --- Quote Start --- su - # your root passwd yum install compat-gcc-32 cd /usr/bin mv gcc gcc4 ln -s gcc32 gcc exit[/b] --- Quote End --- so now i have successfull build a toolchain in my Linux. //----------------------------------------------------------------------------------------- --- Quote Start --- originally posted by hippo@Feb 22 2006, 03:35 PM hi alex,"redhat 9" is too old that "make" can not run properly.
please update to "fedora core 4", fedora.redhat.com .
you have select devel tools, install gcc32 as in the beginning of the buildroot guide, and do "yum update" .
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12868)
--- quote end ---
--- Quote End --- Dear Hippo Thanks you for your help . now I have download teh "fedora core 4 " and install on my computer. but when i build it . if find have the next erros. <div class='quotetop'>QUOTE </div> --- Quote Start --- /home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15/gas/config/tc-nios2.c:1405: warning: pointer targets in passing argument 1 of ‘md_number_to_chars’ differ in signedness /home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15/gas/config/tc-nios2.c:1406: warning: pointer targets in passing argument 1 of ‘md_number_to_chars’ differ in signedness /home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15/gas/config/tc-nios2.c:1407: warning: pointer targets in passing argument 1 of ‘md_number_to_chars’ differ in signedness /home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15/gas/config/tc-nios2.c:1408: warning: pointer targets in passing argument 1 of ‘md_number_to_chars’ differ in signedness /home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15/gas/config/tc-nios2.c: In function ‘md_apply_fix3’: /home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15/gas/config/tc-nios2.c:1664: error: invalid lvalue in assignment /home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15/gas/config/tc-nios2.c: In function ‘nios2_check_overflow’: /home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15/gas/config/tc-nios2.c:1709: error: invalid lvalue in assignment make[3]: *** [tc-nios2.o] Error 1 make[3]: Leaving directory `/home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15-build/gas' make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory `/home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15-build/gas' make[1]: *** [install-gas] Error 2 make[1]: Leaving directory `/home/wyouken/buildroot/toolchain_build_nios2/binutils-2.15-build' make: *** [/home/wyouken/buildroot/build_nios2/staging_dir/nios2-linux-uclibc/bin/ld] Error 2[/b] --- Quote End --- pls help me ! thanks!
- Altera_Forum
Honored Contributor
Dear Hippo
I have success to build a toolchain. i get a file of "vmlinux" ,but when i use nios2-download -c 2 vmlinux the step is sucessfull. but i type the nios2-terminal -c 2 i find the next information Linux version 2.6.11 -uc0(alex.liu@sz-alexliu)(gcc version 3.4.1 i have only get the information. my board is EP2C35 DEV kit(Altera). so i don't know why i can't work in the toolchain. i have success to run in NIOSII IDE of WindowsXP. I wish you can give some help ! thanks! - Altera_Forum
Honored Contributor
Hi Alex,
Please remove your old build dirs, cd ~/download,unzip build.zip,unzip build0207.zip, and run ./build0207 again. It seems you did not follow exactly (nios2 gcc should be 3.4.5 in my config, not 3.4.1). You should use the config files in build.zip. You should use the default minimal kernel config, only disable serial uart and change the console to jtag. Maybe you should open nios2 terninal first, then download vmlinux. I don't use altera's download cable or IDE. I know nothing about them. - Altera_Forum
Honored Contributor
Dear hippo
I have follow your suggestion I have check the GCC version . so I type the next command nios2-linux-uclibc-gcc -v" i find the gcc version is 3.4.5 I have disable serial uart and change the console to jtag. but when i download the kenerl to board .i find it is the same problem . i can't run the linux on my board . i want to know how to run it in EP2C35 board (ALTERA NIOS II dev kit ) , i want to know what change ? - Altera_Forum
Honored Contributor
HI Alex,
Did you load 2C35's standard.sof ? Please show me the terminal message now. Please also try "nios2-run" - Altera_Forum
Honored Contributor
Dear hippo
I can run the Linux .But I only get the next information . <div class='quotetop'>QUOTE </div> --- Quote Start --- uClinux/Nios II Altera Nios II support ? 2004 Microtronix Datacom Ltd. Built 1 zonelists Kernel command line: PID hash table entries: 256 (order: 8, 4096bytes) Dentry cache hash table entries: 8192(order:3, 32768bytes) Inode-cache hash table entries: 4096(order: 2, 16384bytes) Memory available: 31256k/32768k RAM, 0k/0k ROM (714k kernel code, 423k data) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) Linux NoNET1.0 for Linux 2.6 NIOS serial driver version 0.0 ttyS0 (irq = 1) is a builtin NIOS UART Serial :JTAG UART driver$Revision: 1.4$ ttyJ0 at MMIO 0x810110F0(irq=3) is a jtag uart io scheduler noop registered io scheduler deadline registered Freeing unused kernel memory: 340k freed (0x40bc000 - 0x410000) init started: BusyBox v1.1.1-pre0 (2006.02.08-23:06+0000) multi-call binary[/b] --- Quote End --- I wait for a long time.but it isn't any other information. First I think the Linux maybe not run . so I enable LED task in the kernel confige. the task of LED can work. I think the kernel is running.i don't know why it can't printf other information . I check the information. I find it is different to your information . it is add the next information <div class='quotetop'>QUOTE </div> --- Quote Start --- Serial :JTAG UART driver$Revision: 1.4$ ttyJ0 at MMIO 0x810110F0(irq=3) is a jtag uart[/b] --- Quote End --- I wish you can give me help . Thanks you !.