Altera_Forum
Honored Contributor
13 years agoProblems with installing Nios2 Linux
I am attempting to install the Nios2 Linux development tools on a Centos 6.3 based system.
I am somewhat confused by the instructions (on alteras wiki: Install_Nios_II_Linux). They indicate that the test-nios2 branch is the current branch of the kernel, but the nios2-linux-20100621.tar doesn't come automatically configured for this branch. The instructions also indicate that the current kernel uses the Devicetree approach to configuring the kernel for hardware, though, if I build with the test-nios2 branch, I have to use the vendor_hwselect mechanism Can someone tell me what the current branch is (test-nios2 or nios2mmu under linux-2.6 and test-nios2 or trunk under uClinux-dist) and what the current hardware customization mechanism is (vendor_hwselect, devicetree or sopc generated header)? Also, assuming that the current hardware customization is something other than vendor_hwselect, how do I configure things to get it? Thanks in advance. I'm trying to get ready to use this in a college class that starts at the end of September. D.W. Lynn For reference, Here is what I did, working from the Install_Nios_II_Linux instructions on the wiki, specifically using nios2-linux-20100621.tar. The tool-chain build step first complained: /home/lynnd/nios2-linux/toolchain-build/u-boot.mk:11: Board not defined! Using EP1S10 as default. and later fails with the following: ... home/lynnd/nios2-linux/uClibc' make[2]: `conf' is up to date. CC libpthread/linuxthreads.old/cancel.o In file included from ./include/sys/syscall.h:34, from libpthread/linuxthreads.old/restart.h:16, from libpthread/linuxthreads.old/cancel.c:23: ./include/bits/syscalls.h:10:23: asm/traps.h: No such file or directory make[1]: *** [libpthread/linuxthreads.old/cancel.o] Error 1 make[1]: Leaving directory `/home/lynnd/nios2-linux/uClibc' make: *** [/home/lynnd/nios2-linux/toolchain-build/../uClibc/lib/libc.a] Error 2 So, I switched to the prebuild binary toolchain, which worked. Then I attempted to make the kernel per the instructions using the make menuconfig process. There were lots of undefaulted options. On the final kernel make, I had to do "make CROSS-COMPILE=nios2-linux- since the default CROSS_COMPILE was nios2-linux-gnu- and that's not how the binary toolchain installed and I couldn't find the CROSS_COMPILE option in make menuconfig kernel customization. However, I still got the following error: /home/lynnd/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S: Assembler messages: /home/lynnd/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:542: Error: expecting control register /home/lynnd/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:542: Error: unknown register r6 make[3]: *** [arch/nios2/kernel/entry.o] Error 1 Following some hints elsewhere in the forum, I removed the nios2-linux/ directory completely and untarred nios2-linux-20100621.tar again (to start fresh). Then, before doing the ./checkout step, I did "git checkout test-nios2 -f" in both the uClinux and the linux-2.6 directories. Now the kernel make process succeeds even though it uses the vendor_hwselect mechanism. Note that the documentation for Devicetree (linux-2.6/Documentation/devicetree) does not exist in the test-nios2 branch and make menuconfig in this branch does not give options for using the Device tree approach (that I could find).