Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12589 Discussions

Problems with installing Nios2 Linux

Altera_Forum
Honored Contributor II
1,663 Views

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).
0 Kudos
32 Replies
Altera_Forum
Honored Contributor II
715 Views

'entry.S: Error: unknown register r6' 

makes me worried too.
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

All you need to instal nios2-linux is to install following packages: git-all git-gui make gcc ncurses-devel bison byacc flex gawk gettext ccache zlib-devel gtk2-devel lzo-devel pax-utilslibglade2-devel uboot-tools 

 

Next you need download from git all needed sources: 

git clone -b trunk git://sopc.et.ntust.edu.tw/git/uClinux-dist.git 

git clone git://sopc.et.ntust.edu.tw/git/toolchain-mmu.git 

git clone git://sopc.et.ntust.edu.tw/git/linux-2.6.git 

git clone git://sopc.et.ntust.edu.tw/git/tools.git 

 

Now you need to set eviroment path in .bashrc file. My looks like follows: 

--------------------------------------------------------------- 

QUARTUS=/home/kamil/altera/12.1/quartus 

export QUARTUS 

 

NIOS2EDS=/home/kamil/altera/12.1/nios2eds 

export NIOS2EDS 

 

SOPC_KIT_NIOS2=/home/kamil/altera/12.1/nios2eds 

export SOPC_KIT_NIOS2 

 

NIOS2LINUX=/home/kamil/uClinux 

export NIOS2LINUX 

 

PATH=$QUARTUS/bin:$QUARTUS/sopc_builder/bin:$NIOS2EDS:$NIOS2LINUX/toolchain-mmu/x86-linux2/bin:/usr/bin:$PATH 

 

export PATH 

--------------------------------------------------------------------------- 

 

In that way I have path for every tool from Altera like also for toolchain for nios2-uclinux. 

 

Last step is to make sopc2dts tool. Just do "make" command in /tools/sopc2dts/ location (for that you need jdk-devel package) 

 

And that is all. Now you can play with linux on your nios2 boards :)
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

 

--- Quote Start ---  

All you need to instal nios2-linux is to install following packages: git-all git-gui make gcc ncurses-devel bison byacc flex gawk gettext ccache zlib-devel gtk2-devel lzo-devel pax-utilslibglade2-devel uboot-tools 

 

Next you need download from git all needed sources: 

git clone -b trunk git://sopc.et.ntust.edu.tw/git/uClinux-dist.git 

git clone git://sopc.et.ntust.edu.tw/git/toolchain-mmu.git 

git clone git://sopc.et.ntust.edu.tw/git/linux-2.6.git 

git clone git://sopc.et.ntust.edu.tw/git/tools.git 

 

Now you need to set eviroment path in .bashrc file. My looks like follows: 

--------------------------------------------------------------- 

QUARTUS=/home/kamil/altera/12.1/quartus 

export QUARTUS 

 

NIOS2EDS=/home/kamil/altera/12.1/nios2eds 

export NIOS2EDS 

 

SOPC_KIT_NIOS2=/home/kamil/altera/12.1/nios2eds 

export SOPC_KIT_NIOS2 

 

NIOS2LINUX=/home/kamil/uClinux 

export NIOS2LINUX 

 

PATH=$QUARTUS/bin:$QUARTUS/sopc_builder/bin:$NIOS2EDS:$NIOS2LINUX/toolchain-mmu/x86-linux2/bin:/usr/bin:$PATH 

 

export PATH 

--------------------------------------------------------------------------- 

 

In that way I have path for every tool from Altera like also for toolchain for nios2-uclinux. 

 

Last step is to make sopc2dts tool. Just do "make" command in /tools/sopc2dts/ location (for that you need jdk-devel package) 

 

And that is all. Now you can play with linux on your nios2 boards :) 

--- Quote End ---  

 

 

 

I get the same incomprehensible error 

/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S: Assembler messages: /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: unknown register r5 /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:546: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:546: Error: unknown register r6 make: *** Error 1 make: *** Error 2 make: *** Error 2 make: Leaving directory `/home/developer/altera/nios2-linux/linux-2.6' make: *** Error 1  

 

I already tried everything.
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

Hi, 

 

 

--- Quote Start ---  

I get the same incomprehensible error 

/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S: Assembler messages: /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: unknown register r5 /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:546: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:546: Error: unknown register r6 make: *** Error 1 make: *** Error 2 make: *** Error 2 make: Leaving directory `/home/developer/altera/nios2-linux/linux-2.6' make: *** Error 1  

I already tried everything. 

--- Quote End ---  

 

 

Do you have any destroied files under the directory "arch/nios2/include/asm" ? Please check out 'entry.h’ or 'system.h' especially for the instruction 'rdctl' and 'wrctl'. 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

 

--- Quote Start ---  

Hi, 

 

 

 

Do you have any destroied files under the directory "arch/nios2/include/asm" ? Please check out 'entry.h’ or 'system.h' especially for the instruction 'rdctl' and 'wrctl'. 

 

Kazu 

--- Quote End ---  

 

 

In entry.h, it seems normal  

 

#ifdef CONFIG_MMU rdctl r24,estatus 

 

I wonder if there could be something wrong with my toolchain? I use the pre-built toolchain and I first didn't include `nios2-linux/toolchain-mmu/x86-linux2/bin` 

 

If I do include the aforementioned path then I get a different error.  

 

I installed the pre-built toolchain in `opt/nios2/bin` 

 

in entry.h the wrctl instruction is just 

 

wrctl estatus,r24 

 

Any idea what I could do to make it build cleanly? 

 

My PATH is 

echo $PATH /usr/bin:/home/developer/eclipse/java-neon/eclipse:/home/developer/altera/nios2-linux/toolchain-mmu/x86-linux2/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/developer/Downloads/NuSMV-2.6.0-Linux/bin:/snap/bin:/opt/nios2/bin  

 

I also installed gcc 4.2 with the multilib for 4.2. I think I did everything right, still it won't build.
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

Hi, 

 

 

--- Quote Start ---  

In entry.h, it seems normal  

 

#ifdef CONFIG_MMU rdctl r24,estatus 

 

I wonder if there could be something wrong with my toolchain? I use the pre-built toolchain and I first didn't include `nios2-linux/toolchain-mmu/x86-linux2/bin` 

 

If I do include the aforementioned path then I get a different error.  

 

I installed the pre-built toolchain in `opt/nios2/bin` 

 

in entry.h the wrctl instruction is just 

 

wrctl estatus,r24 

 

Any idea what I could do to make it build cleanly? 

 

My PATH is 

echo $PATH /usr/bin:/home/developer/eclipse/java-neon/eclipse:/home/developer/altera/nios2-linux/toolchain-mmu/x86-linux2/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/developer/Downloads/NuSMV-2.6.0-Linux/bin:/snap/bin:/opt/nios2/bin  

 

I also installed gcc 4.2 with the multilib for 4.2. I think I did everything right, still it won't build. 

--- Quote End ---  

 

 

The message  

 

/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: expecting control register 

 

is made in the function 

 

/* The function consume_arg takes a pointer into a string of instruction tokens (args) and a pointer into a string representing the expected sequence of tokens and separators. It checks whether the first argument in argStr is of the expected type, throwing an error if it is not, and returns the pointer argStr. */ char * nios2_consume_arg (char *argStr, const char *argType) { char *temp; int regno = -1; switch (*argType) { case 'c': if (strncmp (argStr, "ctl", strlen ("ctl")) != 0 && strncmp (argStr, "cpuid", strlen ("cpuid")) != 0 && strncmp (argStr, "status", strlen ("status")) != 0 && strncmp (argStr, "estatus", strlen ("estatus")) != 0 && strncmp (argStr, "bstatus", strlen ("bstatus")) != 0 && strncmp (argStr, "ienable", strlen ("ienable")) != 0 && strncmp (argStr, "ipending", strlen ("ipending")) != 0 && strncmp (argStr, "exception", strlen ("exception")) != 0 && strncmp (argStr, "pteaddr", strlen ("pteaddr")) != 0 && strncmp (argStr, "tlbacc", strlen ("tlbacc")) != 0 && strncmp (argStr, "tlbmisc", strlen ("tlbmisc")) != 0 && strncmp (argStr, "fstatus", strlen ("fstatus")) != 0 && strncmp (argStr, "config", strlen ("config")) != 0 && strncmp (argStr, "mpubase", strlen ("mpubase")) != 0 && strncmp (argStr, "mpuacc", strlen ("mpuacc")) != 0 && strncmp (argStr, "badaddr", strlen ("badaddr")) != 0) { as_bad (_("expecting control register")); } break;  

 

of file "tc-nios2.c". So I think that you are calling the genuine nios2's 'gas'.  

Please try to compile the 'entry.S' only, by evoking the 'nios2-***-gcc' or 'nios2-***-as' directly ?  

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

 

--- Quote Start ---  

Hi, 

 

 

 

The message  

 

/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: expecting control register 

 

is made in the function 

 

/* The function consume_arg takes a pointer into a string of instruction tokens (args) and a pointer into a string representing the expected sequence of tokens and separators. It checks whether the first argument in argStr is of the expected type, throwing an error if it is not, and returns the pointer argStr. */ char * nios2_consume_arg (char *argStr, const char *argType) { char *temp; int regno = -1; switch (*argType) { case 'c': if (strncmp (argStr, "ctl", strlen ("ctl")) != 0 && strncmp (argStr, "cpuid", strlen ("cpuid")) != 0 && strncmp (argStr, "status", strlen ("status")) != 0 && strncmp (argStr, "estatus", strlen ("estatus")) != 0 && strncmp (argStr, "bstatus", strlen ("bstatus")) != 0 && strncmp (argStr, "ienable", strlen ("ienable")) != 0 && strncmp (argStr, "ipending", strlen ("ipending")) != 0 && strncmp (argStr, "exception", strlen ("exception")) != 0 && strncmp (argStr, "pteaddr", strlen ("pteaddr")) != 0 && strncmp (argStr, "tlbacc", strlen ("tlbacc")) != 0 && strncmp (argStr, "tlbmisc", strlen ("tlbmisc")) != 0 && strncmp (argStr, "fstatus", strlen ("fstatus")) != 0 && strncmp (argStr, "config", strlen ("config")) != 0 && strncmp (argStr, "mpubase", strlen ("mpubase")) != 0 && strncmp (argStr, "mpuacc", strlen ("mpuacc")) != 0 && strncmp (argStr, "badaddr", strlen ("badaddr")) != 0) { as_bad (_("expecting control register")); } break;  

 

of file "tc-nios2.c". So I think that you are calling the genuine nios2's 'gas'.  

Please try to compile the 'entry.S' only, by evoking the 'nios2-***-gcc' or 'nios2-***-as' directly ?  

 

Kazu 

--- Quote End ---  

 

 

This is what happens 

$ nios2-linux-uclibc-gcc linux-2.6/arch/nios2/kernel/entry.S linux-2.6/arch/nios2/kernel/entry.S:35:23: linux/sys.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:36:27: linux/linkage.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:37:29: asm/asm-offsets.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:38:28: asm/asm-macros.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:39:29: asm/thread_info.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:42:23: asm/entry.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:44:27: asm/processor.h: No such file or directory
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

Hi, 

 

 

--- Quote Start ---  

This is what happens 

$ nios2-linux-uclibc-gcc linux-2.6/arch/nios2/kernel/entry.S linux-2.6/arch/nios2/kernel/entry.S:35:23: linux/sys.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:36:27: linux/linkage.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:37:29: asm/asm-offsets.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:38:28: asm/asm-macros.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:39:29: asm/thread_info.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:42:23: asm/entry.h: No such file or directory linux-2.6/arch/nios2/kernel/entry.S:44:27: asm/processor.h: No such file or directory  

--- Quote End ---  

 

 

Please try 

 

nios2-linux-uclibc-gcc -c -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S  

 

. And I think that you should better learn compiler switches.  

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

Thanks for the help but I'm only getting more and more errors.  

 

$ nios2-linux-uclibc-gcc -c -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include -I/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h: Assembler messages: /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:82: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:83: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:84: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:85: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:86: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:87: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:88: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:89: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:90: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:91: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:92: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:93: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:94: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:95: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:96: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:97: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:98: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:99: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:100: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:101: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:102: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:103: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:105: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:107: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:111: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:117: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:118: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:119: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:120: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:121: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:122: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:123: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:124: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:125: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:126: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:127: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:128: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:129: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:62: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:63: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:66: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:67: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:69: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:71: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:90: Error: unrecognised instruction extern /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:92: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:95: Error: unrecognised instruction static /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:96: Error: junk at end of line, first unrecognized character is `{' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:97: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:100: Error: unrecognised instruction static /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:101: Error: junk at end of line, first unrecognized character is `{' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:102: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:107: Error: unrecognised instruction extern /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:112: Error: unrecognised instruction extern /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:124: Error: unrecognised instruction save_all /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: unknown register r5 ...
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

Hi, 

 

 

--- Quote Start ---  

Thanks for the help but I'm only getting more and more errors.  

 

$ nios2-linux-uclibc-gcc -c -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include -I/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h: Assembler messages: /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:82: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:83: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:84: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:85: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:86: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:87: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:88: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:89: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:90: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:91: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:92: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:93: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:94: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:95: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:96: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:97: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:98: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:99: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:100: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:101: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:102: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:103: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:105: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:107: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:111: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:117: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:118: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:119: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:120: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:121: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:122: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:123: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:124: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:125: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:126: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:127: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:128: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/ptrace.h:129: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:62: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:63: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:66: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:67: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:69: Error: unrecognised instruction unsigned /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:71: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:90: Error: unrecognised instruction extern /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:92: Error: unrecognised instruction struct /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:95: Error: unrecognised instruction static /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:96: Error: junk at end of line, first unrecognized character is `{' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:97: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:100: Error: unrecognised instruction static /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:101: Error: junk at end of line, first unrecognized character is `{' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:102: Error: junk at end of line, first unrecognized character is `}' /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:107: Error: unrecognised instruction extern /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/processor.h:112: Error: unrecognised instruction extern /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:124: Error: unrecognised instruction save_all /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: unknown register r5 ... 

--- Quote End ---  

 

 

Please add -D name option switches like 

 

nios2-linux-uclibc-gcc -c -D __ASSEMBLY__ -D __KERNEL__ -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include -I/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S

 

Some include files are used as mixed C and assembly codes. So there is the# ifndef __ASSEMBLY__ macro like 

14# define _ASM_NIOS2_PTRACE_H 15 16# include <uapi/asm/ptrace.h> 17 18 /* This struct defines the way the registers are stored on the 19 stack during a system call. */ 20 21# ifndef __ASSEMBLY__ 22 struct pt_regs { 23 unsigned long r8; /* r8-r15 Caller-saved GP registers */ 24 unsigned long r9; 25 unsigned long r10; 26 unsigned long r11; 27 unsigned long r12; 28 unsigned long r13;  

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

 

--- Quote Start ---  

Hi, 

 

 

 

Please add -D name option switches like 

 

nios2-linux-uclibc-gcc -c -D __ASSEMBLY__ -D __KERNEL__ -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include -I/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S

 

Some include files are used as mixed C and assembly codes. So there is the# ifndef __ASSEMBLY__ macro like 

14# define _ASM_NIOS2_PTRACE_H 15 16# include <uapi/asm/ptrace.h> 17 18 /* This struct defines the way the registers are stored on the 19 stack during a system call. */ 20 21# ifndef __ASSEMBLY__ 22 struct pt_regs { 23 unsigned long r8; /* r8-r15 Caller-saved GP registers */ 24 unsigned long r9; 25 unsigned long r10; 26 unsigned long r11; 27 unsigned long r12; 28 unsigned long r13;  

 

Kazu 

--- Quote End ---  

 

 

That takes me back where I started: 

$ nios2-linux-uclibc-gcc -c -D __ASSEMBLY__ -D __KERNEL__ -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include -I/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S: Assembler messages: /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: unknown register r5 /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:546: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:546: Error: unknown register r6
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

Hi, 

 

 

--- Quote Start ---  

That takes me back where I started: 

$ nios2-linux-uclibc-gcc -c -D __ASSEMBLY__ -D __KERNEL__ -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include -I/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S: Assembler messages: /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: unknown register r5 /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:546: Error: expecting control register /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:546: Error: unknown register r6 

--- Quote End ---  

 

 

This means that there is no problem around the search path. So what code do you have at line 138 and 546 of 'entry.S' ? 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

 

--- Quote Start ---  

Hi, 

 

 

 

This means that there is no problem around the search path. So what code do you have at line 138 and 546 of 'entry.S' ? 

 

Kazu 

--- Quote End ---  

 

 

It's use of the rdctl register.  

 

138: rdctl r5,exception 

 

546: rdctl r6,badaddr 

 

The whole file is pasted at http://stackoverflow.com/questions/42778812/error-unknown-register-when-building-uclinux
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

Hi, 

 

 

--- Quote Start ---  

It's use of the rdctl register.  

 

138: rdctl r5,exception 

 

546: rdctl r6,badaddr 

 

The whole file is pasted at http://stackoverflow.com/questions/42778812/error-unknown-register-when-building-uclinux 

--- Quote End ---  

 

 

Please try to preprocess the 'entry.S' with -E switch instead of -c, like 

 

nios2-linux-uclibc-gcc -E -D __ASSEMBLY__ -D __KERNEL__ -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include -I/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S > entry.txt  

 

and check the output file by your editor whether the code 'rdctl r5,exception' and 'rdctl r6,badaddr' are transferd invariantly. Note that with the -E switch, the compiler uses the standard output for its output. 

 

If the preprocessing is normal, then make a test file like 

 

// test.S rdctl r5,exception rdctl r6,badaddr  

 

and compile it. 

 

nios2-linux-uclibc-gcc -c test.S  

 

Does it genarate errors? 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

 

--- Quote Start ---  

Hi, 

 

 

 

Please try to preprocess the 'entry.S' with -E switch instead of -c, like 

 

nios2-linux-uclibc-gcc -E -D __ASSEMBLY__ -D __KERNEL__ -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include -I/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S > entry.txt  

 

and check the output file by your editor whether the code 'rdctl r5,exception' and 'rdctl r6,badaddr' are transferd invariantly. Note that with the -E switch, the compiler uses the standard output for its output. 

 

If the preprocessing is normal, then make a test file like 

 

// test.S rdctl r5,exception rdctl r6,badaddr  

 

and compile it. 

 

nios2-linux-uclibc-gcc -c test.S  

 

Does it genarate errors? 

 

Kazu 

--- Quote End ---  

 

 

 

Yes, the file test.S generates the same errors. Using the -E switch generated output difficult for me to understand 

# 1 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S"# 1 "<built-in>"# 1 "<command line>"# 1 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S"# 35 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S"# 1 "/home/developer/altera/nios2-linux/linux-2.6/include/linux/sys.h" 1# 36 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S" 2# 1 "/home/developer/altera/nios2-linux/linux-2.6/include/linux/linkage.h" 1 # 1 "/home/developer/altera/nios2-linux/linux-2.6/include/linux/compiler.h" 1# 5 "/home/developer/altera/nios2-linux/linux-2.6/include/linux/linkage.h" 2# 1 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/linkage.h" 1# 6 "/home/developer/altera/nios2-linux/linux-2.6/include/linux/linkage.h" 2# 37 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S" 2# 1 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/asm-offsets.h" 1# 1 "/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include/generated/asm-offsets.h" 1# 2 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/asm-offsets.h" 2# 38 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S" 2# 1 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/asm-macros.h" 1# 33 "/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include/asm/asm-macros.h" .macro ANDI32 reg1,reg2,mask .if \mask & 0xffff .if \mask & 0xffff0000 movhi \reg1,%hi(\mask) movui \reg1,%lo(\mask) and \reg1,\reg1,\reg2 .else andi \reg1,\reg2,%lo(\mask) .endif .else andhi \reg1,\reg2,%hi(\mask) .endif .endm .macro ORI32 reg1,reg2,mask .if \mask & 0xffff .if \mask & 0xffff0000 orhi \reg1,\reg2,%hi(\mask) ori \reg1,\reg2,%lo(\mask) .else ori \reg1,\reg2,%lo(\mask) .endif .else orhi \reg1,\reg2,%hi(\mask) .endif .endm
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

Hi, 

 

 

--- Quote Start ---  

Yes, the file test.S generates the same errors. Using the -E switch generated output difficult for me to understand 

 

--- Quote End ---  

 

 

Please try to compile the next code. 

// test_ctl.S rdctl r5,ctl7 rdctl r6,ctl12  

 

The names 'exception' and 'badaddr' are alias of control registers 'ctl7' and 'ctl12'. 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

 

--- Quote Start ---  

Hi, 

 

 

 

Please try to compile the next code. 

// test_ctl.S rdctl r5,ctl7 rdctl r6,ctl12  

 

The names 'exception' and 'badaddr' are alias of control registers 'ctl7' and 'ctl12'. 

 

Kazu 

--- Quote End ---  

 

 

That seemed to compile: 

$ nios2-linux-uclibc-gcc -c ctl.S developer@1604:~/altera/nios2-linux/uClinux-dist$ ls auto.conf config Documentation lib README test.S autoconf.h config.arch entry.txt linux-2.6.x release_notes testsuites bfin_patch COPYING freeswan MAKEALL romfs tools bin ctl.o images Makefile SOURCE user ccache ctl.S Kconfig openswan staging vendors
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

Hi, 

 

 

--- Quote Start ---  

That seemed to compile: 

$ nios2-linux-uclibc-gcc -c ctl.S developer@1604:~/altera/nios2-linux/uClinux-dist$ ls auto.conf config Documentation lib README test.S autoconf.h config.arch entry.txt linux-2.6.x release_notes testsuites bfin_patch COPYING freeswan MAKEALL romfs tools bin ctl.o images Makefile SOURCE user ccache ctl.S Kconfig openswan staging vendors  

--- Quote End ---  

 

 

It seems a compiler's bug. So please rewrite the control registers of 'entry.S' with ctl7 and ctl12. 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

 

--- Quote Start ---  

Hi, 

 

 

 

It seems a compiler's bug. So please rewrite the control registers of 'entry.S' with ctl7 and ctl12. 

 

Kazu 

--- Quote End ---  

 

 

 

Thanks. It compiles now until the next bug: kernel/built-in.o(.text+0x2ea40): In function `get_update_sysctl_factor': : undefined reference to `____ilog2_NaN' kernel/built-in.o(.text+0x2ea40): In function `get_update_sysctl_factor': : relocation truncated to fit: R_NIOS2_CALL26 ____ilog2_NaN make: *** Error 1 make: *** Error 2 make: Leaving directory `/home/developer/altera/nios2-linux/linux-2.6' make: *** Error 1
0 Kudos
Altera_Forum
Honored Contributor II
633 Views

Hi, 

 

 

--- Quote Start ---  

Thanks. It compiles now until the next bug: kernel/built-in.o(.text+0x2ea40): In function `get_update_sysctl_factor': : undefined reference to `____ilog2_NaN' kernel/built-in.o(.text+0x2ea40): In function `get_update_sysctl_factor': : relocation truncated to fit: R_NIOS2_CALL26 ____ilog2_NaN make: *** Error 1 make: *** Error 2 make: Leaving directory `/home/developer/altera/nios2-linux/linux-2.6' make: *** Error 1 

--- Quote End ---  

 

 

This is a long term bug which is caused by using the compiler optimization algorithm. ____ilog2_NaN is inserted to check the sanity of variable, and this function is eliminated during the optimization in normal situations, so the kernal will not call it actually. But it seems that they have finally given up this doubtful method. 

 

http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1340693.html 

 

So, please try to delete the function ____ilog2_NaN from the file 'include/linux/log2.h' according to the diff contents which is written in the last part of its mail. 

 

Kazu
0 Kudos
Reply