[Buildroot] ARCH=mips and linux-

Dominic Mason dominic at opusvl.com
Thu Sep 24 16:27:06 UTC 2009


Whilst building mips (mipsel) for an Alchemy AU1100 based system, I got
the following error whilst building the kernel:

CC      arch/mips/lib/delay.o
arch/mips/lib/delay.c: In function '__udelay':
arch/mips/lib/delay.c:46: warning: right shift count >= width of type
arch/mips/lib/delay.c: In function '__ndelay':
arch/mips/lib/delay.c:54: error: 'us' undeclared (first use in this
arch/mips/lib/delay.c:54: error: (Each undeclared identifier is reported
only once
arch/mips/lib/delay.c:54: error: for each function it appears in.)
make[1]: *** [arch/mips/lib/delay.o] Error 1
make: *** [arch/mips/lib] Error 2

This is using buildroot-2009-08 with kernel

For what it's worth, if you copy arch/mips/lib/delay.c 
from a vanilla kernel, then the error disappears.

However, the patch appears to have been missed from the kernel,
where it re-appears.

The relevant lines in arch/mips/lib/delay.c should be:

        __delay((us * 0x000010c7ull * HZ * lpj) >> 32);

        __delay((ns * 0x00000005ull * HZ * lpj) >> 32);

which should replace

        __delay((us * 0x000010c7 * HZ * lpj) >> 32);


        __delay((us * 0x00000005 * HZ * lpj) >> 32);

Apologies for not being proficient enough to supply this as a patch.

It would appear that the above change exists in the vanilla linux-2.6.31
kernel from www.kernel.org

So this is really for information only, for anyone who gets this error
trying to compile a mips system using the and kernel.

Dominic Mason <dominic at opusvl.com>
Opus VL

More information about the buildroot mailing list