On 17/12/2014 14:36, Kevin Grandemange wrote:
I am trying to boot my own "kernel" with qemu-microblaze but I can't get it running.
I tried the following cmdline:

qemu-system-microblaze img.elf
qemu-system-microblaze -M petalogix-s3adsp1800 -kernel img.elf -net none -s -S

img.elf: ELF 32-bit MSB executable, version 1 (SYSV), statically linked, not stripped
Base adress is  0x0.


I get the following error:

IN: PC=0
rmsr=0 resr=0 rear=0 debug=0 imm=0 iflags=0 fsr=0
btaken=0 btarget=0 mode=kernel(saved=kernel) eip=0 ie=0
r00=00000000 r01=00000000 r02=00000000 r03=00000000
r04=00000000 r05=00000000 r06=00000000 r07=00000000
r08=00000000 r09=00000000 r10=00000000 r11=00000000
r12=00000000 r13=00000000 r14=00000000 r15=00000000
r16=00000000 r17=00000000 r18=00000000 r19=00000000
r20=00000000 r21=00000000 r22=00000000 r23=00000000
r24=00000000 r25=00000000 r26=00000000 r27=00000000
r28=00000000 r29=00000000 r30=00000000 r31=00000000
qemu: fatal: fetching nop sequence

IN: PC=0
rmsr=0 resr=0 rear=0 debug=0 imm=0 iflags=0 fsr=0
btaken=0 btarget=0 mode=kernel(saved=kernel) eip=0 ie=0
r00=00000000 r01=00000000 r02=00000000 r03=00000000
r04=00000000 r05=00000000 r06=00000000 r07=00000000
r08=00000000 r09=00000000 r10=00000000 r11=00000000
r12=00000000 r13=00000000 r14=00000000 r15=00000000
r16=00000000 r17=00000000 r18=00000000 r19=00000000
r20=00000000 r21=00000000 r22=00000000 r23=00000000
r24=00000000 r25=00000000 r26=00000000 r27=00000000
r28=00000000 r29=00000000 r30=00000000 r31=00000000


Aborted

How can I get the code of my elf to be emulated ?



I believe the "-kernel" option expects the file to be invoked
according to the conventions for invoking a Linux kernel.  I
don't know what those conventions are for a microblaze, but
on most architectures, it involves something beyond a simple
ELF file.

As an alternative, you may want to look at options for loading
your kernel as a "ROM" firmware image, which would involve a
different set of conventions.


Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded


Reply via email to