* [Qemu-devel] Linux kernel image for Emulator - Regd.
@ 2008-06-24 9:32 Sudheer Papothi
2008-06-24 9:57 ` Laurent Desnogues
2008-06-24 10:48 ` Salil Bijur
0 siblings, 2 replies; 7+ messages in thread
From: Sudheer Papothi @ 2008-06-24 9:32 UTC (permalink / raw)
To: qemu-devel
Hi
I am newbie to l inux porting. I was trying to port linux on a new ARM
platform.
Before doing that I would like to debug the same using ARM emulator.
So, I tried the arm-linux image (cpu type: arm1136) that I built, on
qemu. But i am getting the following error.
$ qemu-system-arm -cpu arm1136 -kernel zImage -initrd arm_root.img
-nographic -append "console=ttyAMA0"
qemu: fatal: Bad mode 0
R00=0018fc7c R01=00000000 R02=e3a131a4 R03=00000000
R04=000131a4 R05=0018fc7c R06=e18c8da9 R07=0018fcf4
R08=00008000 R09=0000000c R10=0000000d R11=00198fc4
R12=00000000 R13=00198fa8 R14=00010a30 R15=00008000
PSR=000001d3 ---- A svc32
s00=00000000( 0) s01=00000000( 0) d00=0000000000000000( 0)
s02=00000000( 0) s03=00000000( 0) d01=0000000000000000( 0)
s04=00000000( 0) s05=00000000( 0) d02=0000000000000000( 0)
s06=00000000( 0) s07=00000000( 0) d03=0000000000000000( 0)
s08=00000000( 0) s09=00000000( 0) d04=0000000000000000( 0)
s10=00000000( 0) s11=00000000( 0) d05=0000000000000000( 0)
s12=00000000( 0) s13=00000000( 0) d06=0000000000000000( 0)
s14=00000000( 0) s15=00000000( 0) d07=0000000000000000( 0)
s16=00000000( 0) s17=00000000( 0) d08=0000000000000000( 0)
s18=00000000( 0) s19=00000000( 0) d09=0000000000000000( 0)
s20=00000000( 0) s21=00000000( 0) d10=0000000000000000( 0)
s22=00000000( 0) s23=00000000( 0) d11=0000000000000000( 0)
s24=00000000( 0) s25=00000000( 0) d12=0000000000000000( 0)
s26=00000000( 0) s27=00000000( 0) d13=0000000000000000( 0)
s28=00000000( 0) s29=00000000( 0) d14=0000000000000000( 0)
s30=00000000( 0) s31=00000000( 0) d15=0000000000000000( 0)
FPSCR: 00000000
Aborted
So, I tried the linux image ( cpu: arm1136 ) which is already working on
our platform, on qemu. Here, even in this case, the above error is
reproduced.
Can anyone please let me know what changes are required in linux kernel
to run it on emulator (i.e., qemu).
It would be great if some one points to the documentation of linux
kernel compilation for emultors (if anything specifically required)
other than normal compilation.
I tried the arm test binary present in Qemu website and it is working fine.
--
Thanks & Regards
Sudheer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Linux kernel image for Emulator - Regd.
2008-06-24 9:32 [Qemu-devel] Linux kernel image for Emulator - Regd Sudheer Papothi
@ 2008-06-24 9:57 ` Laurent Desnogues
2008-06-24 11:16 ` Sudheer Papothi
2008-06-24 10:48 ` Salil Bijur
1 sibling, 1 reply; 7+ messages in thread
From: Laurent Desnogues @ 2008-06-24 9:57 UTC (permalink / raw)
To: qemu-devel
On Tue, Jun 24, 2008 at 11:32 AM, Sudheer Papothi
<sudheer.papothi@amd.com> wrote:
>
> qemu: fatal: Bad mode 0
Your kernel is probably writing some undefined mode in
the CPSR. Most implementations will translate that to
another valid mode, qemu doesn't.
Laurent
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Linux kernel image for Emulator - Regd.
2008-06-24 9:32 [Qemu-devel] Linux kernel image for Emulator - Regd Sudheer Papothi
2008-06-24 9:57 ` Laurent Desnogues
@ 2008-06-24 10:48 ` Salil Bijur
2008-06-24 10:57 ` Sudheer Papothi
1 sibling, 1 reply; 7+ messages in thread
From: Salil Bijur @ 2008-06-24 10:48 UTC (permalink / raw)
To: qemu-devel
On Tue, Jun 24, 2008 at 3:02 PM, Sudheer Papothi
<sudheer.papothi@amd.com> wrote:
> Hi
>
> I am newbie to l inux porting. I was trying to port linux on a new ARM
> platform.
>
> Before doing that I would like to debug the same using ARM emulator.
>
> So, I tried the arm-linux image (cpu type: arm1136) that I built, on qemu.
> But i am getting the following error.
>
Which ARM machine has the kernel been built with?
Use the -m option to specify the machine such as integrator or
versatile. The kernel should be for that specific machine.
Salil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Linux kernel image for Emulator - Regd.
2008-06-24 10:48 ` Salil Bijur
@ 2008-06-24 10:57 ` Sudheer Papothi
0 siblings, 0 replies; 7+ messages in thread
From: Sudheer Papothi @ 2008-06-24 10:57 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 774 bytes --]
Salil Bijur wrote:
> On Tue, Jun 24, 2008 at 3:02 PM, Sudheer Papothi
> <sudheer.papothi@amd.com> wrote:
>
>> Hi
>>
>> I am newbie to l inux porting. I was trying to port linux on a new ARM
>> platform.
>>
>> Before doing that I would like to debug the same using ARM emulator.
>>
>> So, I tried the arm-linux image (cpu type: arm1136) that I built, on qemu.
>> But i am getting the following error.
>>
>>
>
> Which ARM machine has the kernel been built with?
> Use the -m option to specify the machine such as integrator or
> versatile. The kernel should be for that specific machine.
>
> Salil
>
>
>
>
The machine type is not defined in machine list of qemu for arm1136. So,
cpu type arm1136 is used instead with -cpu option.
--
Thanks & Regards
Sudheer
[-- Attachment #2: Type: text/html, Size: 1302 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Linux kernel image for Emulator - Regd.
2008-06-24 9:57 ` Laurent Desnogues
@ 2008-06-24 11:16 ` Sudheer Papothi
2008-06-24 13:35 ` Laurent Desnogues
0 siblings, 1 reply; 7+ messages in thread
From: Sudheer Papothi @ 2008-06-24 11:16 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 851 bytes --]
Laurent Desnogues wrote:
> On Tue, Jun 24, 2008 at 11:32 AM, Sudheer Papothi
> <sudheer.papothi@amd.com> wrote:
>
>> qemu: fatal: Bad mode 0
>>
>
> Your kernel is probably writing some undefined mode in
> the CPSR. Most implementations will translate that to
> another valid mode, qemu doesn't.
>
>
> Laurent
>
>
>
>
Thanks Laurent
ARM Linux kernel is built with arm-gnu-eabi cross compiler toolchain
(from code sourcery).
I dont think this will be a problem (correct me if i am wrong). It
creates normal zImage as well as uImage (with the help of mkimage )
Can you please brief the point /*"Most implementations will translate
that to another valid mode, qemu does n't"*/
Can you please suggest any other options to test/debug my basic linux
kernel image as I dont have the real hardware yet.
--
Thanks & Regards
Sudheer
[-- Attachment #2: Type: text/html, Size: 1455 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Linux kernel image for Emulator - Regd.
2008-06-24 11:16 ` Sudheer Papothi
@ 2008-06-24 13:35 ` Laurent Desnogues
2008-06-25 1:43 ` Sudheer Papothi
0 siblings, 1 reply; 7+ messages in thread
From: Laurent Desnogues @ 2008-06-24 13:35 UTC (permalink / raw)
To: qemu-devel
On Tue, Jun 24, 2008 at 1:16 PM, Sudheer Papothi
<sudheer.papothi@amd.com> wrote:
> ARM Linux kernel is built with arm-gnu-eabi cross compiler toolchain (from
> code sourcery).
>
> I dont think this will be a problem (correct me if i am wrong). It creates
> normal zImage as well as uImage (with the help of mkimage )
The compiler should not be the problem (at least as long as you
are not targetting armv7 class processor).
> Can you please brief the point "Most implementations will translate that to
> another valid mode, qemu does n't"
If the lower 5 bits written to CPSR don't match valid modes,
most silicon will put another valid mode. I can't say more, but
this is undocumented behaviour. As an example (not tested
on realy HW), if you write 0 to the M field of CPSR it will get
translated of 0x10 = user mode. qemu doesn't do that, it just
aborts.
> Can you please suggest any other options to test/debug my basic linux
> kernel image as I dont have the real hardware yet.
I don't get it, you said the kernel booted on real hardware...
Anyway according to your log your kernel is failing at its
very first instruction (pc = 0x8000). Are you using a boot
loader?
Laurent
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Linux kernel image for Emulator - Regd.
2008-06-24 13:35 ` Laurent Desnogues
@ 2008-06-25 1:43 ` Sudheer Papothi
0 siblings, 0 replies; 7+ messages in thread
From: Sudheer Papothi @ 2008-06-25 1:43 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]
>> Can you please suggest any other options to test/debug my basic linux
>> kernel image as I dont have the real hardware yet.
>>
>
> I don't get it, you said the kernel booted on real hardware...
>
> Anyway according to your log your kernel is failing at its
> very first instruction (pc = 0x8000). Are you using a boot
> loader?
>
>
> Laurent
>
>
>
>
Thanks Laurent
We have two linux kernel images in which one works on real hardware and
the other image still does not have hardware.
We have to make the latter image ready before the hardware is available.
Can you please suggest any other options to test/debug the linux kernel
image for which the hardware is not yet available.
--
Thanks & Regards
Sudheer
[-- Attachment #2: Type: text/html, Size: 1249 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-06-25 2:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 9:32 [Qemu-devel] Linux kernel image for Emulator - Regd Sudheer Papothi
2008-06-24 9:57 ` Laurent Desnogues
2008-06-24 11:16 ` Sudheer Papothi
2008-06-24 13:35 ` Laurent Desnogues
2008-06-25 1:43 ` Sudheer Papothi
2008-06-24 10:48 ` Salil Bijur
2008-06-24 10:57 ` Sudheer Papothi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).