- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.Link Copied
13 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AFAIK, a non-binary toolchain is only available tor the noMMU version of the NIOS2 uClinux distribution, yet.
Do you really want to use this ? Several months ago I did compile the non-binary noMMU toolchain on Suse following the instructions in the NIOS Wiki: http://www.nioswiki.com/installnios2linux -Michael- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
--- Quote Start --- I am trying to build uClinux on my Neek board without a prebuilt binary tool chain. --- Quote End --- You mean that you want to recompile the tool-chains? For MMU versions 'nios2gcc4', you need to modify several configure and make files, and I strongly recommend you to leave such time wasting tasks to experts. Kazu- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
So yes "without a prebuilt binary tool chain" means that i will recompile my own toolchain. I know that the instructions in the NIOS Wiki: http://www.nioswiki.com/installnios2linux are exactly what i want to do but we have to use the nios-linux-20090730.tar pack. I would like to construct by myself this pack. To have the script that construct the pack even if i need to modify several configure and make files, and even if it is said that this is a task for experts (but maybe i will not be able to achieve my goal) In fact I d like to understand a full port of linux on nios2 for my master thesis and don't want to use a pack where everything is already done and where the only thing to do is only to follow the InstallNios2Linux instruction from the wiki. Thanks for your previous answers :) Am i more precise in what i want ?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Am i more precise in what i want ? --- Quote End --- You did not state if you want to use the full MMU-based Linux. If yes you in fact need to build the complete Toolchain from scartch. And of course you should provide your work to Hippo, the current maintainer of the NIOS uCLinux distribution, as he of course wants to move to a non-binary distribution ASAP. If you don't want to use the MMU, I don't see what might be wrong with the procedure described in the Wiki. Here you use git to get the newest source code of all tool chain utilities and you can use the make script provided to build the tool chain. There is no sense in creating another version of the tool chain than that one. -Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok thanks Michael, so
1 with MMU : what do you mean about building the complete Toolchain from scartch ? Would you mean that inside de mmu distribution there is a prebuilt binary toolchain ? (am i right with the terme ?) 2 without MMU : Ok so this is a pack containing all source file (binutils, c library, kernel header and the kernel uClinux). And the make script you mention is the one lacated in the $HOME/nios2-linux/toolchain-build as mention in the InstallNios2Linux instructions (make gcc elf2flt gdb-host) ?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- 1 with MMU : what do you mean about building the complete Toolchain from scartch ? Would you mean that inside de mmu distribution there is a prebuilt binary toolchain ? (am i right with the terme ?) --- Quote End --- "Our" uCLinux distribution is supposed to provide as well a binary as a non binary tool chain. The binary tool chain is a "snapshot" done by the maintainers at a certain day. The non-binary tool chain can be fetched from the git repository and thus provides the most recent (and hopefully most bug-free) state of the distribution. The non-binary tool chain contains a make script that creates (compiles) the binary tool chain for you (this takes several hours), For the no-MMU version of the distribution you can get the non-binary tool chain as described in the Wiki. Unfortunately part of the MMU-version of the tool chain is not yet completely community-driven and we still need to use the version compiled by WindRiver that is available as a binary. --- Quote Start --- 2 without MMU : Ok so this is a pack containing all source file (binutils, c library, kernel header and the kernel uClinux). And the make script you mention is the one lacated in the $HOME/nios2-linux/toolchain-build as mention in the InstallNios2Linux instructions (make gcc elf2flt gdb-host) ? --- Quote End --- Yep. As described in the Wiki you just need to do "make ..." if all prerequisites are OK. -Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bonjour Michael,
When you say "our distribution" you mean you are one of the developper ? :) Is the distribution for mmu version located in http://www.niosftp.com/pub/linux ? And the non-mmu distribution located in http://www.niosftp.com/pub/uclinux ? Good evening- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- When you say "our distribution" you mean you are one of the developper ? :) --- Quote End --- No. I'm trying to help, but I'm not knowledgeable enough, yet. --- Quote Start --- Is the distribution for mmu version located in http://www.niosftp.com/pub/linux ? --- Quote End --- see http://www.nioswiki.com/linux --- Quote Start --- And the non-mmu distribution located in http://www.niosftp.com/pub/uclinux ? --- Quote End --- see http://www.nioswiki.com/operatingsystems/uclinux. It's all here: http://www.nioswiki.com/ -Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have one more question. I work now with UClinux and with the guide on the wiki. It is said that we have to do ./checkout . This script is : for i in binutils gcc3 linux-2.6 toolchain-build uClibc elf2flt insight u-boot uClinux-dist do cd $i git checkout -f cd .. done and is enough easy. In each directory we do git checkout -f. After some research (because i heard speaking about git but i never used it) i found that this command extract the archive located in .git/objects/pack in order to obtain the original sources needed for compiling the toolchain. Is the content of that packs the original content of each source separately ? (because I try to start with nothing else than source code to build my toolchain) 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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know the ? directories either. Maybe there lines are just meant to do nothing.
The MMU distribution does not provide these directories, while the no-MMu distribution has them -Michael- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page