Forum Discussion
Altera_Forum
Honored Contributor
16 years agomanualy uClinux without niosftp.com/pub/uclinux/ tar file
I am trying to build uClinux on my Neek board without a prebuilt binary tool chain.
Actually, i followed the CrossGcc toturial on nios wiki and then i have downloaded uClinux-dist-20090618 from uClinux.org. after setting the path environment variable correctly, i try to configure uClinux and build it by make menuconfig and make but i get error during the make. After searching in the forum i found this guy had the same error : singh11111 http://www.alteraforum.com/forum/showthread.php?t=18570 I want to know firstly if it s a correct method ? So in fact my goal is also to construct manualy the tar file on http://www.niosftp.com/pub/uclinux or linux starting with nios2-gnutools-9.0-SRC and uClinux-dist-20090618 only.13 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- binutils : http://ftp.gnu.org/gnu/binutils/ gcc3 : http://ftp.gnu.org/gnu/gcc/ linux-2.6 : http://www.kernel.org/ toolchain-build : ? uClibc : http://www.uclibc.org/ elf2flt : ? insight : ? u-boot : ? http://www.denx.de/wiki/u-boot/sourcecode uClinux-dist : http://www.uclinux.org/ nb : I don't understand the purpose of the "?" directories. --- Quote End --- toolchain-build: this is where you build the toolchain. It provides a custom Makefile, but I don't know what it adds that's different from building gcc, etc from scratch. This is not present in the MMU distribution because as far as I know the toolchain source is still not available :( elf2flt: uClinux (no MMU) uses FLAT rather than ELF binaries, and this is used by the linker to convert them during the build. You'll notice that to build an application for uClinux you need to add a -elf2flt flag. insight: something to do with debugging - Altera_Forum
Honored Contributor
You are talking about a custom makefile. Here is a hierachical study (in a tree shape) of it. I think there is no difference from building gcc from scratch. The makefile just sequentially build the kernel headers, uclib, binutils, gcc boostrap, gcc from their source.
But what i would like to know in my previous post was : Is the content of that packs (obtained by "./checkout" ans so by "git checkout -f" that extract ".pack" files from each directory) the original content of each source separately, i mean the original source from each project located at website previously mentionned ? If yes, great, i will download each source separatly, and execute the makefile step by step in order to build the toolchain manually. Here is the makefile. His targets are hierarchical structured and a number is assigned to target to show to order of their execution.all: toolchain+extras toolchain+extras: toolchain $(GDB_HOST) $(UBOOT_TOOLS) toolchain: gcc elf2flt gcc: uClibc-headers binutils gcc-bootstrap uClibc $(GCC_BUILD)/.installed 20 uClibc-headers: kernel-headers $(SYSROOT)/.configured 5 kernel-headers: $(KERNEL_DIR)/.configured 2 $(KERNEL_DIR)/.configured: 1 $(SYSROOT)/.configured: $(UCLIBC_SRC)/.config 4 $(UCLIBC_SRC)/.config 3 binutils: uClibc-headers $(INSTALLDIR)/$(TARGET_NAME)/bin/ld 9 uClibc-headers: kernel-headers $(SYSROOT)/.configured $(INSTALLDIR)/$(TARGET_NAME)/bin/ld: $(BINUTILS_BUILD)/binutils/objdump 8 $(BINUTILS_BUILD)/binutils/objdump: $(BINUTILS_BUILD)/.configured 7 $(BINUTILS_BUILD)/.configured: 6 gcc-bootstrap: uClibc-headers binutils $(INSTALLDIR)/bin/$(TARGET_NAME)-gcc 13 uClibc-headers: kernel-headers $(SYSROOT)/.configured binutils: uClibc-headers $(INSTALLDIR)/$(TARGET_NAME)/bin/ld $(INSTALLDIR)/bin/$(TARGET_NAME)-gcc: $(GCC_BOOTSTRAP_BUILD)/.compiled 12 $(GCC_BOOTSTRAP_BUILD)/.compiled: $(GCC_BOOTSTRAP_BUILD)/.configured 11 $(GCC_BOOTSTRAP_BUILD)/.configured: 10 uClibc: gcc-bootstrap $(INSTALLDIR)/lib/libc.a 16 gcc-bootstrap: uClibc-headers binutils $(INSTALLDIR)/bin/$(TARGET_NAME)-gcc $(INSTALLDIR)/lib/libc.a: $(UCLIBC_SRC)/lib/libc.a 15 $(UCLIBC_SRC)/lib/libc.a: $(SYSROOT)/.configured 14 $(SYSROOT)/.configured: $(UCLIBC_SRC)/.config $(GCC_BUILD)/.installed: $(GCC_BUILD)/.compiled 19 $(GCC_BUILD)/.compiled: $(GCC_BUILD)/.configured 18 $(GCC_BUILD)/.configured: 17 elf2flt: uClibc-headers binutils gcc $(ELF2FLT_SRC)/elf2flt 23END uClibc-headers: kernel-headers $(SYSROOT)/.configured binutils: uClibc-headers $(INSTALLDIR)/$(TARGET_NAME)/bin/ld gcc: uClibc-headers binutils gcc-bootstrap uClibc $(GCC_BUILD)/.installed $(ELF2FLT_SRC)/elf2flt: $(ELF2FLT_SRC)/.configured $(INSTALLDIR)/$(TARGET_NAME)/bin/ld 22 $(ELF2FLT_SRC)/.configured: 21 $(INSTALLDIR)/$(TARGET_NAME)/bin/ld: $(BINUTILS_BUILD)/binutils/objdump - Altera_Forum
Honored Contributor
I will answer alone.
For example, the linux-2.6 directory contains a nios2 arch directory but the no release of linux-2.6.... from www.kernel.org contains such a directory.