[mkroot] Contribution

Ruhollah Majdoddin r.majdodin at gmail.com
Fri Apr 13 06:47:43 PDT 2018


2018-03-09 18:16 GMT+01:00 Ruhollah Majdoddin <r.majdodin at gmail.com>:

> 2018-03-06 18:45 GMT+01:00 Rob Landley <rob at landley.net>:
>
>> You could try getting the microblaze target to work? Something's wrong
>> with the
>> ELF parser, the kernel refuses to launch init. Not quite sure why, I was
>> planning on drilling down through the kernel's load_elf_binary()
>> (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/li
>> nux.git/tree/fs/binfmt_elf.c#n685)
>> to see if I can figure it out...
>>
>> That might be throwing you in the deep end a bit. :)
>>
>
> I am working on that.
>
>
>> Rob
>>
>
> Ruhollah
>

I have been working on this ever since, and I have problems running linux
on Qemu-microblaze.

I have adjusted module/kernel with proper kernel configuration items and
other things (attached).
 It does not compile the dts file in linux source tree, because Qemu has
already access to the dtb file.
It runs

make ARCH=$KARCH allnoconfig KCONFIG_ALLCONFIG="$OUTPUT/$TARGET.miniconf" &&
make KCPPFLAGS="-D__MICROBLAZEEL__" ARCH=$KARCH
CROSS_COMPILE="$CROSS_COMPILE"   linux.bin

to  get  arch/microblaze/boot/linux.bin.

Now if i run

qemu-system-microblazeel -M  petalogix-ml605 -serial mon:stdio
-nographic -no-reboot -m 256 -append "panic=1 HOST=microblaze
console=ttyS0,115200" -kernel linux.bin -d in_asm

I get

50000000:       01c00094        add r14 r0 r0
50000004:       00c80094        add r6 r8 r0
50000008:       ffff0021        s8i
/home/ruhollah/qemu/tcg/tcg-op.c:2567: tcg fatal error
Aborted

Why?

My guess is that Qemu requires the kernel in elf format, but linux.bin is
not in elf format.

If I am right, then how can I get the kernel in elf format?

Ruhollah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/mkroot-landley.net/attachments/20180413/35de9fd3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kernel
Type: application/octet-stream
Size: 10032 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/mkroot-landley.net/attachments/20180413/35de9fd3/attachment.obj>


More information about the mkroot mailing list