2009-10-16 23:23:13

by myuboot

[permalink] [raw]
Subject: 2.6.31 kernel for mips compile failure - war.h:12:17: error: war.h: No such file or directory

I am trying to use buildroot 2009.08 to compile kernel 2.6.31 for mips,
but it fails to error -" war.h can't be found". I used the same
buildroot to build kernel version 2.6.29 with no problem.

Please give me some suggestion on how to fix this issue. The file
./arch/mips/include/asm/war.h is there with no problem. Thanks a lot.

cp
/home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/usr/bin/mkimage
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/u-boot-tools
mkdir -p
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/root/boot
mv
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/localversion*
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/root/boot
mv: cannot stat
`/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/localversion*':
No such file or directory
make:
[/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/.depend_done]
Error 1 (ignored)
/usr/bin/make -j1 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=mips
INSTALL_MOD_PATH=/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/root
CROSS_COMPILE=/home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/usr/bin/mips-linux-uclibc-
LDFLAGS="-L/home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/lib
-L/home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/usr/lib
--sysroot=/home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/"
LZMA="/home/root123/sources/buildroot-2009.08-k/toolchain_build_mips/bin/lzma"
PATH=/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/u-boot-tools:/home/root123/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/stuff/bitbake/bin
-C
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31
prepare
make[1]: Entering directory
`/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31'
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-mips
CC arch/mips/kernel/asm-offsets.s
In file included from
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/bitops.h:24,
from include/linux/bitops.h:17,
from include/linux/kernel.h:15,
from include/linux/sched.h:52,
from arch/mips/kernel/asm-offsets.c:13:
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:12:17:
error: war.h: No such file or directory
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:82:2:
error: #error Check setting of R4600_V1_INDEX_ICACHEOP_WAR for your
platform
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:112:2:
error: #error Check setting of R4600_V1_HIT_CACHEOP_WAR for your
platform
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:128:2:
error: #error Check setting of R4600_V2_HIT_CACHEOP_WAR for your
platform
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:141:2:
error: #error Check setting of R5432_CP0_INTERRUPT_WAR foryour platform
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:155:2:
error: #error Check setting of BCM1250_M3_WAR for your platform
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:162:2:
error: #error Check setting of SIBYTE_1956_WAR for your platform
/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:178:2:
error: #error Check setting of MIPS4K_ICACHE_REFILL_WAR for your
platform


2009-10-16 23:41:10

by myuboot

[permalink] [raw]
Subject: Re: 2.6.31 kernel for mips compile failure - war.h:12:17: error: war.h: No such file or directory

Sorry, I need to take the question back. I found war.h is a file I need
to created for my board. I forgot to copy it over. So no problem any
more.thanks.

On Fri, 16 Oct 2009 18:23 -0500, [email protected] wrote:
> I am trying to use buildroot 2009.08 to compile kernel 2.6.31 for mips,
> but it fails to error -" war.h can't be found". I used the same
> buildroot to build kernel version 2.6.29 with no problem.
>
> Please give me some suggestion on how to fix this issue. The file
> ./arch/mips/include/asm/war.h is there with no problem. Thanks a lot.
>
> cp
> /home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/usr/bin/mkimage
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/u-boot-tools
> mkdir -p
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/root/boot
> mv
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/localversion*
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/root/boot
> mv: cannot stat
> `/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/localversion*':
> No such file or directory
> make:
> [/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/.depend_done]
> Error 1 (ignored)
> /usr/bin/make -j1 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=mips
> INSTALL_MOD_PATH=/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/root
> CROSS_COMPILE=/home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/usr/bin/mips-linux-uclibc-
> LDFLAGS="-L/home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/lib
> -L/home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/usr/lib
> --sysroot=/home/root123/sources/buildroot-2009.08-k/build_mips/staging_dir/"
> LZMA="/home/root123/sources/buildroot-2009.08-k/toolchain_build_mips/bin/lzma"
> PATH=/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/u-boot-tools:/home/root123/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/stuff/bitbake/bin
> -C
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31
> prepare
> make[1]: Entering directory
> `/home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31'
> CHK include/linux/version.h
> CHK include/linux/utsrelease.h
> SYMLINK include/asm -> include/asm-mips
> CC arch/mips/kernel/asm-offsets.s
> In file included from
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/bitops.h:24,
> from include/linux/bitops.h:17,
> from include/linux/kernel.h:15,
> from include/linux/sched.h:52,
> from arch/mips/kernel/asm-offsets.c:13:
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:12:17:
> error: war.h: No such file or directory
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:82:2:
> error: #error Check setting of R4600_V1_INDEX_ICACHEOP_WAR for your
> platform
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:112:2:
> error: #error Check setting of R4600_V1_HIT_CACHEOP_WAR for your
> platform
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:128:2:
> error: #error Check setting of R4600_V2_HIT_CACHEOP_WAR for your
> platform
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:141:2:
> error: #error Check setting of R5432_CP0_INTERRUPT_WAR foryour platform
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:155:2:
> error: #error Check setting of BCM1250_M3_WAR for your platform
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:162:2:
> error: #error Check setting of SIBYTE_1956_WAR for your platform
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/war.h:178:2:
> error: #error Check setting of MIPS4K_ICACHE_REFILL_WAR for your
> platform

2009-10-16 23:50:52

by David Daney

[permalink] [raw]
Subject: Re: 2.6.31 kernel for mips compile failure - war.h:12:17: error: war.h: No such file or directory

mips-linux questions will get more attention if you send them to
[email protected].


[email protected] wrote:
> I am trying to use buildroot 2009.08 to compile kernel 2.6.31 for mips,
> but it fails to error -" war.h can't be found". I used the same
> buildroot to build kernel version 2.6.29 with no problem.
>
> Please give me some suggestion on how to fix this issue. The file
> ./arch/mips/include/asm/war.h is there with no problem. Thanks a lot.
>
[...]
> CC arch/mips/kernel/asm-offsets.s
> In file included from
> /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/bitops.h:24,
> from include/linux/bitops.h:17,
> from include/linux/kernel.h:15,
> from include/linux/sched.h:52,
> from arch/mips/kernel/asm-offsets.c:13:

What does your .config look like?

Also try make V=1 so we can see the exact compiler command line that the
build process is generating.

David Daney

2009-10-20 00:01:01

by myuboot

[permalink] [raw]
Subject: Re: 2.6.31 kernel for mips compile failure - war.h:12:17: error: war.h: No such file or directory

Thanks. This issue is fixed now. In 2.6.31 the directory
include/asm-mips is moved as arch/mips/include/asm/. I need to change
my Makefile accordingly.

On Fri, 16 Oct 2009 16:50 -0700, "David Daney"
<[email protected]> wrote:
> mips-linux questions will get more attention if you send them to
> [email protected].
>
>
> [email protected] wrote:
> > I am trying to use buildroot 2009.08 to compile kernel 2.6.31 for mips,
> > but it fails to error -" war.h can't be found". I used the same
> > buildroot to build kernel version 2.6.29 with no problem.
> >
> > Please give me some suggestion on how to fix this issue. The file
> > ./arch/mips/include/asm/war.h is there with no problem. Thanks a lot.
> >
> [...]
> > CC arch/mips/kernel/asm-offsets.s
> > In file included from
> > /home/root123/sources/buildroot-2009.08-k/project_build_mips/f1/linux-2.6.31/arch/mips/include/asm/bitops.h:24,
> > from include/linux/bitops.h:17,
> > from include/linux/kernel.h:15,
> > from include/linux/sched.h:52,
> > from arch/mips/kernel/asm-offsets.c:13:
>
> What does your .config look like?
>
> Also try make V=1 so we can see the exact compiler command line that the
> build process is generating.
>
> David Daney

2009-10-19 23:56:00

by myuboot

[permalink] [raw]
Subject: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31

I am trying to bringup a MIPS32 board using 2.6.31. It is working in
little endian mode. After changing the board's hardware from little
endian to bit endian, the serial port print messed up. It prints now
something like - "????????????????" on the screen. When I trace the
execution, I can see the string the kernel is trying print is correct -
"Linux version 2.6.31 ..." and etc.

I guess it means the initialization of the serial port is not properly
done. But I am not sure where I should check for the problem. The serial
port device I am using is 8250. Please give me some advise.

Thanks.

2009-10-20 06:17:24

by Florian Fainelli

[permalink] [raw]
Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31

Hi,

Le mardi 20 octobre 2009 01:56:04, [email protected] a ?crit :
> I am trying to bringup a MIPS32 board using 2.6.31. It is working in
> little endian mode. After changing the board's hardware from little
> endian to bit endian, the serial port print messed up. It prints now
> something like - "????????????????" on the screen. When I trace the
> execution, I can see the string the kernel is trying print is correct -
> "Linux version 2.6.31 ..." and etc.
>
> I guess it means the initialization of the serial port is not properly
> done. But I am not sure where I should check for the problem. The serial
> port device I am using is 8250. Please give me some advise.

If the same initialization routine used to work in little-endian, check how
you actually write and read characters from the UART FIFO and especially if
your hardware requires you to do word or byte access to these registers.

You can have a look at AR7, which has the same code working for Little and Big
Endian modes in arch/mips/ar7/prom.c lines 272 to the end of the file. It also
uses a 8250-compatible UART.


Attachments:
signature.asc (198.00 B)
This is a digitally signed message part.

2009-10-20 15:51:57

by myuboot

[permalink] [raw]
Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31

I happen to use the same code from ar7. So this part
serial_int/serial_out should be fine?

#define PORT(offset) (KSEG1ADDR(MY_MIPSBOARD_REGS_UART0 + (offset * 4)))
static inline unsigned int serial_in(int offset)
{
return readl((void *)PORT(offset));
}

static inline void serial_out(int offset, int value)
{
writel(value, (void *)PORT(offset));
}

Thanks.



On Tue, 20 Oct 2009 08:17 +0200, "Florian Fainelli"
<[email protected]> wrote:
> Hi,
>
> Le mardi 20 octobre 2009 01:56:04, [email protected] a ?crit :
> > I am trying to bringup a MIPS32 board using 2.6.31. It is working in
> > little endian mode. After changing the board's hardware from little
> > endian to bit endian, the serial port print messed up. It prints now
> > something like - "????????????????" on the screen. When I trace the
> > execution, I can see the string the kernel is trying print is correct -
> > "Linux version 2.6.31 ..." and etc.
> >
> > I guess it means the initialization of the serial port is not properly
> > done. But I am not sure where I should check for the problem. The serial
> > port device I am using is 8250. Please give me some advise.
>
> If the same initialization routine used to work in little-endian, check
> how
> you actually write and read characters from the UART FIFO and especially
> if
> your hardware requires you to do word or byte access to these registers.
>
> You can have a look at AR7, which has the same code working for Little
> and Big
> Endian modes in arch/mips/ar7/prom.c lines 272 to the end of the file. It
> also
> uses a 8250-compatible UART.

2009-10-27 20:40:11

by myuboot

[permalink] [raw]
Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31

Thanks, Florian. I found the cause of the problem. My board is 32 bit
based, so each serial port register is 32bit even only 8 bit is used. So
when the board is switched endianess, I need to change the address
offset to access the same registers.
For example, original RHR register address is 0x8001000 with little
endian mode. With big endian, I need to access it as 0x8001003.

On Tue, 20 Oct 2009 08:17 +0200, "Florian Fainelli"
<[email protected]> wrote:
> Hi,
>
> Le mardi 20 octobre 2009 01:56:04, [email protected] a ?crit :
> > I am trying to bringup a MIPS32 board using 2.6.31. It is working in
> > little endian mode. After changing the board's hardware from little
> > endian to bit endian, the serial port print messed up. It prints now
> > something like - "????????????????" on the screen. When I trace the
> > execution, I can see the string the kernel is trying print is correct -
> > "Linux version 2.6.31 ..." and etc.
> >
> > I guess it means the initialization of the serial port is not properly
> > done. But I am not sure where I should check for the problem. The serial
> > port device I am using is 8250. Please give me some advise.
>
> If the same initialization routine used to work in little-endian, check
> how
> you actually write and read characters from the UART FIFO and especially
> if
> your hardware requires you to do word or byte access to these registers.
>
> You can have a look at AR7, which has the same code working for Little
> and Big
> Endian modes in arch/mips/ar7/prom.c lines 272 to the end of the file. It
> also
> uses a 8250-compatible UART.

2009-10-28 08:35:56

by Shmulik Ladkani

[permalink] [raw]
Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31

On Tue, 27 Oct 2009 15:40:13 -0500 [email protected] wrote:
> Thanks, Florian. I found the cause of the problem. My board is 32 bit
> based, so each serial port register is 32bit even only 8 bit is used. So
> when the board is switched endianess, I need to change the address
> offset to access the same registers.
> For example, original RHR register address is 0x8001000 with little
> endian mode. With big endian, I need to access it as 0x8001003.

I assume your uart_port's iotype is defined as UPIO_MEM32.
UPIO_MEM32 makes 8250 access serial registers using readl/writel (which might
be a problem for big-endian), while UPIO_MEM makes 8250 access the registers
using readb/writeb.
Maybe you should try UPIO_MEM (assuming hardware allows byte access).

--
Shmulik Ladkani Jungo Ltd.

2009-10-28 11:04:12

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31

Hello.

Shmulik Ladkani wrote:

>> Thanks, Florian. I found the cause of the problem. My board is 32 bit
>> based, so each serial port register is 32bit even only 8 bit is used. So
>> when the board is switched endianess, I need to change the address
>> offset to access the same registers.
>> For example, original RHR register address is 0x8001000 with little
>> endian mode. With big endian, I need to access it as 0x8001003.
>>
>
> I assume your uart_port's iotype is defined as UPIO_MEM32.
>

He wouldn't have to add 3 to the register addresses then.

> UPIO_MEM32 makes 8250 access serial registers using readl/writel (which might
> be a problem for big-endian), while UPIO_MEM makes 8250 access the registers
> using readb/writeb.
>

Both may be a problem for big endian.

> Maybe you should try UPIO_MEM (assuming hardware allows byte access).

Contrarywise, I think he now has UPIO_MEM and needs to try UPIO_MEM32.

WBR, Sergei

2009-10-28 19:36:12

by myuboot

[permalink] [raw]
Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31

Sergei, Shmulik,

Thanks a lot for your suggestions. I was using UPIO_MEM since I was not
aware of the difference between UPIO_MEM and UPIO_MEM32.

I just tried UPIO_MEM32 without adding a offset of 3. But the result is
bad - after the kernel initializes the serial console, the console print
out messes up. The early printk is fine because the u-boot initialises
the serial port fine.

How I tried UPIO_MEM32 is in platform.c changing the iotype to
UPIO_MEM32 in the uart_port structure and passing the structure to
early_serial_setup. What I did is the same as in
arch/mips/ar7/platform.c.

In 8250.c I removed the offset I added to mem_serial_out and
mem_serial_in.
Did I miss anything? Thanks again for your help.

On Wed, 28 Oct 2009 14:04 +0300, "Sergei Shtylyov"
<[email protected]> wrote:
> Hello.
>
> Shmulik Ladkani wrote:
>
> >> Thanks, Florian. I found the cause of the problem. My board is 32 bit
> >> based, so each serial port register is 32bit even only 8 bit is used. So
> >> when the board is switched endianess, I need to change the address
> >> offset to access the same registers.
> >> For example, original RHR register address is 0x8001000 with little
> >> endian mode. With big endian, I need to access it as 0x8001003.
> >>
> >
> > I assume your uart_port's iotype is defined as UPIO_MEM32.
> >
>
> He wouldn't have to add 3 to the register addresses then.
>
> > UPIO_MEM32 makes 8250 access serial registers using readl/writel (which might
> > be a problem for big-endian), while UPIO_MEM makes 8250 access the registers
> > using readb/writeb.
> >
>
> Both may be a problem for big endian.
>
> > Maybe you should try UPIO_MEM (assuming hardware allows byte access).
>
> Contrarywise, I think he now has UPIO_MEM and needs to try UPIO_MEM32.
>
> WBR, Sergei
>
>

2009-10-29 08:27:05

by Shmulik Ladkani

[permalink] [raw]
Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31

On Wed, 28 Oct 2009 14:36:15 -0500 [email protected] wrote:
> I just tried UPIO_MEM32 without adding a offset of 3. But the result is
> bad - after the kernel initializes the serial console, the console print
> out messes up. The early printk is fine because the u-boot initialises
> the serial port fine.
>
> Did I miss anything? Thanks again for your help.

I guess you did fine with UPIO_MEM32.

Keeping the UPIO_MEM32 approach, I suggest also to fiddle Y/N with
CONFIG_SWAP_IO_SPACE (might be that you have it set to Y while you don't
really need it, or vice versa).
This is since 'readl' uses 'ioswabl' for (potential) byte-swapping of the read
value. Take a look at asm/io.h and mangle-port.h.

Most important, read your hardware documentation to determine correct access
to the memory mapped serial registers.

--
Shmulik Ladkani Jungo Ltd.

2009-11-02 23:54:06

by myuboot

[permalink] [raw]
Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31

The CONFIG_SWAP_IO_SPACE was set to Y, but I don't even see it using
xconfig or menuconfig. So I set it manually to n into .config file and
then did a compile - I am using buildroot. But somehow the value always
comes back to y after I type in command "make". The kernel image still
messes up the console after the console is handovered from early printk
to really ttyS01.

Thanks.

On Thu, 29 Oct 2009 10:26 +0200, "Shmulik Ladkani"
<[email protected]> wrote:
> On Wed, 28 Oct 2009 14:36:15 -0500 [email protected] wrote:
> > I just tried UPIO_MEM32 without adding a offset of 3. But the result is
> > bad - after the kernel initializes the serial console, the console print
> > out messes up. The early printk is fine because the u-boot initialises
> > the serial port fine.
> >
> > Did I miss anything? Thanks again for your help.
>
> I guess you did fine with UPIO_MEM32.
>
> Keeping the UPIO_MEM32 approach, I suggest also to fiddle Y/N with
> CONFIG_SWAP_IO_SPACE (might be that you have it set to Y while you don't
> really need it, or vice versa).
> This is since 'readl' uses 'ioswabl' for (potential) byte-swapping of the
> read
> value. Take a look at asm/io.h and mangle-port.h.
>
> Most important, read your hardware documentation to determine correct
> access
> to the memory mapped serial registers.
>
> --
> Shmulik Ladkani Jungo Ltd.

2009-11-11 00:22:51

by myuboot

[permalink] [raw]
Subject: Kernel panic - not syncing: Attempted to kill init!

Hi,

I got the following error trying to bring up the /sbin/init with Kernel
2.6.31 using cramfs filesystem on a MIPS 32 board:

[ 1.160000] VFS: Mounted root (cramfs filesystem) readonly on device
31:2.
[ 1.171000] Freeing unused kernel memory: 116k freed
[ 1.223000] Kernel panic - not syncing: Attempted to kill init!
[ 1.229000] Rebooting in 3 seconds..

Using BDI I know the kernel panic happens as soon as
run_init_process("/sbin/init") in init_post() is called. The filesystem
itself seems to be ok, because I can use 'ls' command under u-boot to
see /sbin/init is a symbolic link to busybox. Also the kernel seems to
like the filesystem and can mount the filesystem. I have for checked
for similar questions for this error, so I tried replacing /sbin/init
with a hello world program, but the result is exactly the same. It seems
neither hello-world or /sbin/init got executed.

At this point, I don't know how to debug this issue. Any suggestion on
how to debug this issue will be greatly appreciated.

Andrew

2009-11-11 07:51:26

by Gaye Abdoulaye Walsimou

[permalink] [raw]
Subject: Re: Kernel panic - not syncing: Attempted to kill init!

[email protected] wrote:
> Hi,
>
> I got the following error trying to bring up the /sbin/init with Kernel
> 2.6.31 using cramfs filesystem on a MIPS 32 board:
>

Just to be sure does:
$file vmlinux
$file busybox
give the same result?

Regards

2009-11-11 15:48:51

by myuboot

[permalink] [raw]
Subject: Re: Kernel panic - not syncing: Attempted to kill init!


On Wed, 11 Nov 2009 08:45 +0100, "Gaye Abdoulaye Walsimou"
<[email protected]> wrote:
> [email protected] wrote:
> > Hi,
> >
> > I got the following error trying to bring up the /sbin/init with Kernel
> > 2.6.31 using cramfs filesystem on a MIPS 32 board:
> >
>
> Just to be sure does:
> $file vmlinux
> $file busybox
> give the same result?
>
> Regards
The file result looks ok. The readelf result looks fine too.

file linux-2.6.31/vmlinux root/bin/busybox
linux-2.6.31/vmlinux: ELF 32-bit MSB executable, MIPS, MIPS32 version 1
(SYSV), statically linked, not stripped
root/bin/busybox: setuid ELF 32-bit MSB executable, MIPS, MIPS32
version 1 (SYSV), dynamically linked (uses shared libs), stripped

Thanks, Andrew

2009-11-17 00:21:17

by myuboot

[permalink] [raw]
Subject: problem bring up initramfs and busybox

I have been struggling to bring up a MIPS 32 board with busybox with or
without initramfs.
The kernel stucks there without the shell coming up.

[ 1.153000] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[ 1.161000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.167000] TCP cubic registered
[ 1.170000] NET: Registered protocol family 17
[ 25.971000] Freeing unused kernel memory: 1032k freed
[ 39.969000] Algorithmics/MIPS FPU Emulator v1.5


What I tried here is to use initramfs with statically linked busybox.
The initramfs seems to be up, and runs the commands in the /init one by
one, and then it goes to a inifite loop in r4k_wait at
arch/mips/kernel/genex.S.

The following is the execution sequense when it runs /init. Can anyone
give me some idea what is wrong?

Thanks, Andrew


Breakpoint 2, do_execve (filename=0x9780a000 "/bin/sh", argv=0x4f73a4,
envp=0x4f73ac, regs=0x97997f30) at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.

Breakpoint 2, do_execve (filename=0x9780a000 "/sbin/switch_root",
argv=0x4f7450, envp=0x4f7464, regs=0x97819f30) at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.

Breakpoint 2, do_execve (filename=0x9780a000 "/usr/sbin/switch_root",
argv=0x4f7450, envp=0x4f7464, regs=0x97819f30) at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.

Breakpoint 2, do_execve (filename=0x9780a000 "/bin/switch_root",
argv=0x4f7450, envp=0x4f7464, regs=0x97819f30) at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.

Breakpoint 2, do_execve (filename=0x9780a000 "/usr/bin/switch_root",
argv=0x4f7450, envp=0x4f7464, regs=0x97819f30) at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.
^C
Program received signal SIGSTOP, Stopped (signal).
r4k_wait () at arch/mips/kernel/genex.S:147
147 jr ra

-- And here is the content of /init script -
#!/bin/busybox sh

# Mount the /proc and /sys filesystems.
mount -t proc none /proc
mount -t sysfs none /sys

mdev -s
/bin/sh

# Do your stuff here.
echo "This script mounts rootfs and boots it up, nothing more!"

# Mount the root filesystem.
mount -o ro /dev/mtdblock4 /mnt/root

# Clean up.
umount /proc
umount /sys

# Boot the real thing.
exec switch_root /mnt/root /sbin/init

2009-11-17 09:33:32

by Ralf Baechle

[permalink] [raw]
Subject: Re: problem bring up initramfs and busybox

On Mon, Nov 16, 2009 at 06:21:21PM -0600, [email protected] wrote:

> I have been struggling to bring up a MIPS 32 board with busybox with or
> without initramfs.
> The kernel stucks there without the shell coming up.
>
> [ 1.153000] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
> [ 1.161000] ip_tables: (C) 2000-2006 Netfilter Core Team
> [ 1.167000] TCP cubic registered
> [ 1.170000] NET: Registered protocol family 17
> [ 25.971000] Freeing unused kernel memory: 1032k freed
> [ 39.969000] Algorithmics/MIPS FPU Emulator v1.5
>
>
> What I tried here is to use initramfs with statically linked busybox.
> The initramfs seems to be up, and runs the commands in the /init one by
> one, and then it goes to a inifite loop in r4k_wait at
> arch/mips/kernel/genex.S.

r4k_wait is called by the idle loop. Which means the kernel has no process
to run so runs the idle loop. This might be because there is no other
process left running or because all processes are waiting for I/O for
example. So it's not uncommon that even busy systems ocasionally briefly
run the idle loop. In other words, seeing the processor executing
r4k_wait does not necessarily mean something went wrong. In this case -
also along with the other information you've provieded it's not obvious
what has gone wrong.

Ralf

2009-11-17 17:39:36

by myuboot

[permalink] [raw]
Subject: Re: problem bring up initramfs and busybox



On Tue, 17 Nov 2009 10:33 +0100, "Ralf Baechle" <[email protected]>
wrote:
> On Mon, Nov 16, 2009 at 06:21:21PM -0600, [email protected] wrote:
>
> > I have been struggling to bring up a MIPS 32 board with busybox with or
> > without initramfs.
> > The kernel stucks there without the shell coming up.
> >
> > [ 1.153000] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
> > [ 1.161000] ip_tables: (C) 2000-2006 Netfilter Core Team
> > [ 1.167000] TCP cubic registered
> > [ 1.170000] NET: Registered protocol family 17
> > [ 25.971000] Freeing unused kernel memory: 1032k freed
> > [ 39.969000] Algorithmics/MIPS FPU Emulator v1.5
> >
> >
> > What I tried here is to use initramfs with statically linked busybox.
> > The initramfs seems to be up, and runs the commands in the /init one by
> > one, and then it goes to a inifite loop in r4k_wait at
> > arch/mips/kernel/genex.S.
>
> r4k_wait is called by the idle loop. Which means the kernel has no
> process
> to run so runs the idle loop. This might be because there is no other
> process left running or because all processes are waiting for I/O for
> example. So it's not uncommon that even busy systems ocasionally briefly
> run the idle loop. In other words, seeing the processor executing
> r4k_wait does not necessarily mean something went wrong. In this case -
> also along with the other information you've provieded it's not obvious
> what has gone wrong.
>
> Ralf

According to an email from Kevin, I added a symbolic link from
switch_root to busybox. The switch_root seems to be found now based on
the execution sequence, but I got the following error - "Kernel panic -
not syncing: Attempted to kill init!". This is the same error when I
tried to start the shell without initramfs. Something must be wrong, but
I can't quite figure out.

[ 9.250000] Freeing unused kernel memory: 1032k freed
[ 10.463000] Algorithmics/MIPS FPU Emulator v1.5
[ 41.695000] Kernel panic - not syncing: Attempted to kill init!
[ 41.701000] Rebooting in 3 seconds.

Thanks for your help. Andrew

(gdb) c
Continuing.

Breakpoint 2, do_execve (filename=0x9780a000 "/init", argv=0x943dd2bc,
envp=0x943dd230, regs=0x97819e30)
at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.

Breakpoint 2, do_execve (filename=0x9780a000 "/sbin/switch_root",
argv=0x4f7450, envp=0x4f7464, regs=0x97819f30)
at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.

2009-11-17 17:50:38

by Florian Fainelli

[permalink] [raw]
Subject: Re: problem bring up initramfs and busybox

Hi,

On Tuesday 17 November 2009 18:39:40 [email protected] wrote:
> On Tue, 17 Nov 2009 10:33 +0100, "Ralf Baechle" <[email protected]>
>
> wrote:
> > On Mon, Nov 16, 2009 at 06:21:21PM -0600, [email protected] wrote:
> > > I have been struggling to bring up a MIPS 32 board with busybox with or
> > > without initramfs.
> > > The kernel stucks there without the shell coming up.
> > >
> > > [ 1.153000] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
> > > [ 1.161000] ip_tables: (C) 2000-2006 Netfilter Core Team
> > > [ 1.167000] TCP cubic registered
> > > [ 1.170000] NET: Registered protocol family 17
> > > [ 25.971000] Freeing unused kernel memory: 1032k freed
> > > [ 39.969000] Algorithmics/MIPS FPU Emulator v1.5
> > >
> > >
> > > What I tried here is to use initramfs with statically linked busybox.
> > > The initramfs seems to be up, and runs the commands in the /init one by
> > > one, and then it goes to a inifite loop in r4k_wait at
> > > arch/mips/kernel/genex.S.
> >
> > r4k_wait is called by the idle loop. Which means the kernel has no
> > process
> > to run so runs the idle loop. This might be because there is no other
> > process left running or because all processes are waiting for I/O for
> > example. So it's not uncommon that even busy systems ocasionally briefly
> > run the idle loop. In other words, seeing the processor executing
> > r4k_wait does not necessarily mean something went wrong. In this case -
> > also along with the other information you've provieded it's not obvious
> > what has gone wrong.
> >
> > Ralf
>
> According to an email from Kevin, I added a symbolic link from
> switch_root to busybox. The switch_root seems to be found now based on
> the execution sequence, but I got the following error - "Kernel panic -
> not syncing: Attempted to kill init!". This is the same error when I
> tried to start the shell without initramfs. Something must be wrong, but
> I can't quite figure out.
>
> [ 9.250000] Freeing unused kernel memory: 1032k freed
> [ 10.463000] Algorithmics/MIPS FPU Emulator v1.5
> [ 41.695000] Kernel panic - not syncing: Attempted to kill init!
> [ 41.701000] Rebooting in 3 seconds.
>
> Thanks for your help. Andrew
>
> (gdb) c
> Continuing.
>
> Breakpoint 2, do_execve (filename=0x9780a000 "/init", argv=0x943dd2bc,
> envp=0x943dd230, regs=0x97819e30)
> at fs/exec.c:1293
> 1293 retval = unshare_files(&displaced);
> (gdb) c
> Continuing.
>
> Breakpoint 2, do_execve (filename=0x9780a000 "/sbin/switch_root",
> argv=0x4f7450, envp=0x4f7464, regs=0x97819f30)
> at fs/exec.c:1293
> 1293 retval = unshare_files(&displaced);
> (gdb) c
> Continuing.

If you happen to use uClibc and gcc-4.4.0 or superior, make sure that you have
that patch applied to uClibc: http://www.mail-
archive.com/[email protected]/msg04483.html
--
WBR, Florian

2009-11-17 21:09:02

by myuboot

[permalink] [raw]
Subject: Re: problem bring up initramfs and busybox



On Tue, 17 Nov 2009 18:48 +0100, "Florian Fainelli"
<[email protected]> wrote:
> Hi,
>
> On Tuesday 17 November 2009 18:39:40 [email protected] wrote:
> > On Tue, 17 Nov 2009 10:33 +0100, "Ralf Baechle" <[email protected]>
> >
> > wrote:
> > > On Mon, Nov 16, 2009 at 06:21:21PM -0600, [email protected] wrote:
> > > > I have been struggling to bring up a MIPS 32 board with busybox with or
> > > > without initramfs.
> > > > The kernel stucks there without the shell coming up.
> > > >
> > > > [ 1.153000] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
> > > > [ 1.161000] ip_tables: (C) 2000-2006 Netfilter Core Team
> > > > [ 1.167000] TCP cubic registered
> > > > [ 1.170000] NET: Registered protocol family 17
> > > > [ 25.971000] Freeing unused kernel memory: 1032k freed
> > > > [ 39.969000] Algorithmics/MIPS FPU Emulator v1.5
> > > >
> > > >
> > > > What I tried here is to use initramfs with statically linked busybox.
> > > > The initramfs seems to be up, and runs the commands in the /init one by
> > > > one, and then it goes to a inifite loop in r4k_wait at
> > > > arch/mips/kernel/genex.S.
> > >
> > > r4k_wait is called by the idle loop. Which means the kernel has no
> > > process
> > > to run so runs the idle loop. This might be because there is no other
> > > process left running or because all processes are waiting for I/O for
> > > example. So it's not uncommon that even busy systems ocasionally briefly
> > > run the idle loop. In other words, seeing the processor executing
> > > r4k_wait does not necessarily mean something went wrong. In this case -
> > > also along with the other information you've provieded it's not obvious
> > > what has gone wrong.
> > >
> > > Ralf
> >
> > According to an email from Kevin, I added a symbolic link from
> > switch_root to busybox. The switch_root seems to be found now based on
> > the execution sequence, but I got the following error - "Kernel panic -
> > not syncing: Attempted to kill init!". This is the same error when I
> > tried to start the shell without initramfs. Something must be wrong, but
> > I can't quite figure out.
> >
> > [ 9.250000] Freeing unused kernel memory: 1032k freed
> > [ 10.463000] Algorithmics/MIPS FPU Emulator v1.5
> > [ 41.695000] Kernel panic - not syncing: Attempted to kill init!
> > [ 41.701000] Rebooting in 3 seconds.
> >
> > Thanks for your help. Andrew
> >
> > (gdb) c
> > Continuing.
> >
> > Breakpoint 2, do_execve (filename=0x9780a000 "/init", argv=0x943dd2bc,
> > envp=0x943dd230, regs=0x97819e30)
> > at fs/exec.c:1293
> > 1293 retval = unshare_files(&displaced);
> > (gdb) c
> > Continuing.
> >
> > Breakpoint 2, do_execve (filename=0x9780a000 "/sbin/switch_root",
> > argv=0x4f7450, envp=0x4f7464, regs=0x97819f30)
> > at fs/exec.c:1293
> > 1293 retval = unshare_files(&displaced);
> > (gdb) c
> > Continuing.
>
> If you happen to use uClibc and gcc-4.4.0 or superior, make sure that you
> have
> that patch applied to uClibc: http://www.mail-
> archive.com/[email protected]/msg04483.html
> --
> WBR, Florian

Yes, I am using uClibc and gcc-4.4.1. So I went ahead and applied the
patch on
./toolchain_build_mips/uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/syscalls.h.
After that I touched ./toolchain_build_mips/uClibc-0.9.30.1/.configured
and rerun make. But the result is the same - "Kernel panic - not
syncing: Attempted to kill init!". Any of your suggestions will be
welcome. I have tried various things such as changes in init script or
using hello_world as the init, but the result is very similar. Thanks a
lot. Andrew

Breakpoint 1, init_post () at init/main.c:839
839 async_synchronize_full();
(gdb) enable 2
(gdb) c
Continuing.

Breakpoint 2, do_execve (filename=0x9780a000 "/init", argv=0x943dd2bc,
envp=0x943dd230, regs=0x97819e30)
at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.

Breakpoint 2, do_execve (filename=0x9780a000 "/sbin/busybox",
argv=0x4f7478, envp=0x4f748c, regs=0x97819f30)
at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.
^C
Program received signal SIGSTOP, Stopped (signal).
r4k_wait () at arch/mips/kernel/genex.S:147
147 jr ra
Current language: auto; currently asm

2009-12-04 01:52:27

by myuboot

[permalink] [raw]
Subject: PIR OFFSET for AR7

Hi, What is the use of PIR register for AR7 board in file
arch/mips/ar7/irq.c? If I understand it right, PIR is used to define the
polarity of the interrupts. It seems to me that it needs to initialized?

Best regards, Andrew

2009-12-04 17:49:56

by Thomas Bogendoerfer

[permalink] [raw]
Subject: Re: PIR OFFSET for AR7

On Thu, Dec 03, 2009 at 07:52:30PM -0600, [email protected] wrote:
> Hi, What is the use of PIR register for AR7 board in file
> arch/mips/ar7/irq.c?

it gives back the channel and line of the pending interrupt with the
highest priority.

> If I understand it right, PIR is used to define the
> polarity of the interrupts. It seems to me that it needs to initialized?

no, it's a read only register. Why do you think it has something to do
with interrupt polarity ?

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]

2009-12-04 17:30:52

by myuboot

[permalink] [raw]
Subject: Re: PIR OFFSET for AR7

Thomas,

Sorry, you are right. I mistook PM_OFFSET for PIR_OFFSET.

Thanks, Andrew
On Fri, 04 Dec 2009 17:03 +0100, "Thomas Bogendoerfer"
<[email protected]> wrote:
> On Thu, Dec 03, 2009 at 07:52:30PM -0600, [email protected] wrote:
> > Hi, What is the use of PIR register for AR7 board in file
> > arch/mips/ar7/irq.c?
>
> it gives back the channel and line of the pending interrupt with the
> highest priority.
>
> > If I understand it right, PIR is used to define the
> > polarity of the interrupts. It seems to me that it needs to initialized?
>
> no, it's a read only register. Why do you think it has something to do
> with interrupt polarity ?
>
> Thomas.
>
> --
> Crap can work. Given enough thrust pigs will fly, but it's not necessary
> a
> good idea. [ RFC1925, 2.3
> ]

2010-01-19 19:51:39

by myuboot

[permalink] [raw]
Subject: loadable kernel module link failure - endianness incompatible with that of the selected emulation

I got a link error when compiling 2 loadable kernel modules -
"endianness incompatible with that of the selected emulation".

But both kernel and the kernel modules of error are in big endian. I
don't know what I should check or fix. Any suggestions? I checked the
endianess of the kernel by checking the elf header of vmlinux file, is
that the right way to do it?

Below are the error info and the readelf output, showing both the kernel
and a kernel module are in big endian.
Thanks for your help. Andrew

1) error log
make -C /home/root123/sources/kernel/linux
CROSS_COMPILE=""/home/root123/sources/gcc3.4.3-be"/bin/mips-linux-"
M=/home/root123/sources/sdk/platform/src/linux/mxp/src modules

LD [M] /home/root123/sources/sdk/platform/src/linux/mxp/src/mxpmod.o
/home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld:
/home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o:
compiled for a big endian system and target is little endian
/home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld:
/home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o:
endianness incompatible with that of the selected emulation
/home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld: failed to merge
target specific data of file
/home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o
make[13]: ***
[/home/root123/sources/sdk/platform/src/linux/mxp/src/mxpmod.o] Error 1

2) kernel is in big endian
readelf -h vmlinux
ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x941aa000
Start of program headers: 52 (bytes into file)
Start of section headers: 1720624 (bytes into file)
Flags: 0x50001001, noreorder, o32, mips32
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 1
Size of section headers: 40 (bytes)
Number of section headers: 27
Section header string table index: 24


3) kernel module is big endian.
readelf -h mmxpcore.o
ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 81024 (bytes into file)
Flags: 0x10001001, noreorder, o32, mips2
Size of this header: 52 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 40 (bytes)
Number of section headers: 34
Section header string table index: 31

2010-01-20 01:07:29

by David Daney

[permalink] [raw]
Subject: Re: loadable kernel module link failure - endianness incompatible with that of the selected emulation

[email protected] wrote:
> I got a link error when compiling 2 loadable kernel modules -
> "endianness incompatible with that of the selected emulation".
>
> But both kernel and the kernel modules of error are in big endian. I
> don't know what I should check or fix. Any suggestions? I checked the
> endianess of the kernel by checking the elf header of vmlinux file, is
> that the right way to do it?
>
> Below are the error info and the readelf output, showing both the kernel
> and a kernel module are in big endian.
> Thanks for your help. Andrew
>
> 1) error log
> make -C /home/root123/sources/kernel/linux
> CROSS_COMPILE=""/home/root123/sources/gcc3.4.3-be"/bin/mips-linux-"
> M=/home/root123/sources/sdk/platform/src/linux/mxp/src modules
>
> LD [M] /home/root123/sources/sdk/platform/src/linux/mxp/src/mxpmod.o
> /home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld:
> /home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o:
> compiled for a big endian system and target is little endian
> /home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld:
> /home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o:
> endianness incompatible with that of the selected emulation
> /home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld: failed to merge
> target specific data of file
> /home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o
> make[13]: ***
> [/home/root123/sources/sdk/platform/src/linux/mxp/src/mxpmod.o] Error 1
>

Looks like a toolchain bug/configuration-problem. Hard to tell though
as you didn't pass 'V=1' on the make invocation line.

David Daney

2010-01-20 16:10:17

by myuboot

[permalink] [raw]
Subject: Re: loadable kernel module link failure - endianness incompatible with that of the selected emulation



On Tue, 19 Jan 2010 15:47 -0800, "David Daney"
<[email protected]> wrote:
> [email protected] wrote:
> > I got a link error when compiling 2 loadable kernel modules -
> > "endianness incompatible with that of the selected emulation".
> >
> > But both kernel and the kernel modules of error are in big endian. I
> > don't know what I should check or fix. Any suggestions? I checked the
> > endianess of the kernel by checking the elf header of vmlinux file, is
> > that the right way to do it?
> >
> > Below are the error info and the readelf output, showing both the kernel
> > and a kernel module are in big endian.
> > Thanks for your help. Andrew
> >
> > 1) error log
> > make -C /home/root123/sources/kernel/linux
> > CROSS_COMPILE=""/home/root123/sources/gcc3.4.3-be"/bin/mips-linux-"
> > M=/home/root123/sources/sdk/platform/src/linux/mxp/src modules
> >
> > LD [M] /home/root123/sources/sdk/platform/src/linux/mxp/src/mxpmod.o
> > /home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld:
> > /home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o:
> > compiled for a big endian system and target is little endian
> > /home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld:
> > /home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o:
> > endianness incompatible with that of the selected emulation
> > /home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld: failed to merge
> > target specific data of file
> > /home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o
> > make[13]: ***
> > [/home/root123/sources/sdk/platform/src/linux/mxp/src/mxpmod.o] Error 1
> >
>
> Looks like a toolchain bug/configuration-problem. Hard to tell though
> as you didn't pass 'V=1' on the make invocation line.
>
> David Daney
With the V=1 option suggested, I found the culprit is this "-m
elf32ltsmip". It is working now.

Thanks. Andrew