* manipulating e_machine value in the elf Header
@ 2003-02-06 14:04 Indukumar Ilangovan
2003-02-06 14:04 ` Indukumar Ilangovan
2003-02-06 14:52 ` Ralf Baechle
0 siblings, 2 replies; 3+ messages in thread
From: Indukumar Ilangovan @ 2003-02-06 14:04 UTC (permalink / raw)
To: linux-mips
Hi,
I'm trying to port linux kernel to a mips board with a R4700 processor. It
has a rom monitor program which can be used to load the image. (has support
for tftp boot, xmodem....) . This bootloader has a hardcoded cpu_type which
is cross checked with the e_machine value in the elf header. When I try to
load the linux kernel this check (cpu_type == e_machine) fails & hence the
boot loader aborts the loading of image.
I tried to change the e_machine type value by changing the EM_MIPS value in
include/linux/elf.h, still e_machine type is "8" in the image even after
completely rebuilding the image. I even changed the EM_MIPS value in
/usr/include/elf.h & couple of other locations (sde headers.....) still no
luck....though hand editing the elf header is an option.. I don't want to do
that !
If any of you have any idea/suggestions I would be a happy man !
Thanks in advance,
Indu
^ permalink raw reply [flat|nested] 3+ messages in thread
* manipulating e_machine value in the elf Header
2003-02-06 14:04 manipulating e_machine value in the elf Header Indukumar Ilangovan
@ 2003-02-06 14:04 ` Indukumar Ilangovan
2003-02-06 14:52 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: Indukumar Ilangovan @ 2003-02-06 14:04 UTC (permalink / raw)
To: linux-mips
Hi,
I'm trying to port linux kernel to a mips board with a R4700 processor. It
has a rom monitor program which can be used to load the image. (has support
for tftp boot, xmodem....) . This bootloader has a hardcoded cpu_type which
is cross checked with the e_machine value in the elf header. When I try to
load the linux kernel this check (cpu_type == e_machine) fails & hence the
boot loader aborts the loading of image.
I tried to change the e_machine type value by changing the EM_MIPS value in
include/linux/elf.h, still e_machine type is "8" in the image even after
completely rebuilding the image. I even changed the EM_MIPS value in
/usr/include/elf.h & couple of other locations (sde headers.....) still no
luck....though hand editing the elf header is an option.. I don't want to do
that !
If any of you have any idea/suggestions I would be a happy man !
Thanks in advance,
Indu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: manipulating e_machine value in the elf Header
2003-02-06 14:04 manipulating e_machine value in the elf Header Indukumar Ilangovan
2003-02-06 14:04 ` Indukumar Ilangovan
@ 2003-02-06 14:52 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2003-02-06 14:52 UTC (permalink / raw)
To: Indukumar Ilangovan; +Cc: linux-mips
On Thu, Feb 06, 2003 at 07:34:40PM +0530, Indukumar Ilangovan wrote:
> I'm trying to port linux kernel to a mips board with a R4700 processor. It
> has a rom monitor program which can be used to load the image. (has support
> for tftp boot, xmodem....) . This bootloader has a hardcoded cpu_type which
> is cross checked with the e_machine value in the elf header. When I try to
> load the linux kernel this check (cpu_type == e_machine) fails & hence the
> boot loader aborts the loading of image.
>
> I tried to change the e_machine type value by changing the EM_MIPS value in
> include/linux/elf.h, still e_machine type is "8" in the image even after
> completely rebuilding the image. I even changed the EM_MIPS value in
> /usr/include/elf.h & couple of other locations (sde headers.....) still no
> luck....though hand editing the elf header is an option.. I don't want to do
> that !
I guess you're hunting the problem at the wrong place. All MIPS ELF systems
are using EM_MIPS (8) for the e_machine. A few ancient systems have been
using EM_MIPS_RS3_LE (10) but I've yet to see a system using that value.
So probably the bootloader is expecting the wrong value?
Your attempt at changing that value didn't work because the value is
hardcoded in binutils. However if you change that value you'd break
binary compatibility with each and every Linux/MIPS binary.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-02-06 14:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-06 14:04 manipulating e_machine value in the elf Header Indukumar Ilangovan
2003-02-06 14:04 ` Indukumar Ilangovan
2003-02-06 14:52 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox