Skip to contentSkip to conversation

ARCH=mips and linux-2.6.30.2

Buildroot Dominic Mason 2 participants 3 messages Sep 24, 2009 – Sep 25, 2009

lore
Share & tools
lore
#0 lore raw

Hi

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 function)
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 2.6.30.2

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

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

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

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

and

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

which should replace

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

and

        __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 2.6.30.2 and 2.6.30.5 kernel.

Signature · 2 lines
Dominic Mason <[email protected]>
Opus VL
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Dominic" == Dominic Mason <[email protected]> writes:

Hi,

Dominic> This is using buildroot-2009-08 with kernel 2.6.30.2

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

Really?

diff -u linux-2.6.30.{2,4}/arch/mips/lib/delay.c
(nothing)

It seems like this fix hasn't made it to any 2.6.30.x stable releases yet, but is in mainline since 2.6.31-rc1.

I'll add the patch to kernel-headers, so it should get included if you use git and select the simple Linux kernel option.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw
Quoted 7 lines · Peter Korsgaard

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

Really?

diff -u linux-2.6.30.{2,4}/arch/mips/lib/delay.c
(nothing)

Oops, it's possible I'd downloaded a patched linux-2.6.30.4 archive from somewhere, after doing some searching for that error. I've got a bz2 on my system that I've just extracted again and that one was patched. Sorry about that, 'twas a couple of weeks ago I did this, and have only just got round to subscribing to the buildroot mailing list.

Quoted 2 lines

I'll add the patch to kernel-headers, so it should get included if you use git and select the simple Linux kernel option.

Thanks for that.

Regards

Signature · 2 lines
Dominic Mason <[email protected]>
Opus VL