UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Scholar watari
Scholar
876 Views
Registered: ‎06-16-2013

How to execute qemu with 2018-2-zcu-release.tar.xz (Segmentation fault/core dump)

Jump to solution

Hi all

 

I'd like to deeply know the boot sequence with MPSoC by qemu.

Then I proceed with it as below.

 

1. download 2018.2-zcu102-release.tar.xz from http://www.wiki.xilinx.com/Zynq+2018.2+Release

2. extract tar.xz file and prepare three files from image.ub by dumpimage command.

 

$ dumpimage -i image -T flat_dt -p 0 uImage

$ dumpimage -i image -T flat_dt -p 1 system.dtb

$ dumpimage -i image -T flat_dt -p 2 uramdisk.img.gz

 

*)

Extracted system.dtb is same as original system.dtb

 

3. Do qemu with the following options.

 

$ qemu-system-aarch64 -M arm-generic-fdt -serial mon:stdio -serial /dev/null -display none -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4 -device loader,file=./bl31.elf,cpu-num=0 -device loader,file=./u-boot.elf -dtb ./system.dtb

 

However, after step 3, I got "Segmentation fault (core dump)".

Where did I go wrong ?

Would you help me ?

 

I just know the boot sequence by qemu, especially I'd like to know the behavior of device tree blob by qemu.

 

Best regards,

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
762 Views
Registered: ‎05-10-2017

Re: How to execute qemu with 2018-2-zcu-release.tar.xz (Segmentation fault/core dump)

Jump to solution

Hi Watari,

 

The images that are in the release folder will allow you to boot your ZCU102 board. But these do not have the qemu dtb's that you will need for booting qemu as well. For this, I would suggest to download the ZCU102 bsp from here

https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html

 

When you extract this bsp, you will see all the pre-built images along with the qemu dtbs in the pre-built/linux/images folder.

 

What is your requirement exactly? Do you just want to run the pre-built images on qemu?

As a starting point, if you have a petalinux project for a zcu102 bsp, you can load it on qemu using the command petalinux-boot --qemu --kernel.

You can see the qemu instances which get invoked when you use this command. Following this you can use the command line options to run the images on qemu.

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
5 Replies
Highlighted
Moderator
Moderator
829 Views
Registered: ‎05-10-2017

Re: How to execute qemu with 2018-2-zcu-release.tar.xz (Segmentation fault/core dump)

Jump to solution

Hi Watari,

 

For ZynqUltrascale+ you will need 2 instances, one for arm and another for pmu firmware. You can follow the example we have on our wiki here. The qemu dtb needs to be passed as well.

http://www.wiki.xilinx.com/QEMU%20-%20Zynq%20UltraScalePlus

For additional examples and details you can also check out the Qemu user guide 

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug1169-xilinx-qemu.pdf

 

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Tags (1)
0 Kudos
Scholar watari
Scholar
782 Views
Registered: ‎06-16-2013

Re: How to execute qemu with 2018-2-zcu-release.tar.xz (Segmentation fault/core dump)

Jump to solution

Hi @jovitac

 

Thank you for your help.

I'm trying your suggestion. But I have not resolved yet.

I will reply it irrespective of whther success or not.

 

Thank you.

Best regards,

 

 

0 Kudos
Scholar watari
Scholar
773 Views
Registered: ‎06-16-2013

Re: How to execute qemu with 2018-2-zcu-release.tar.xz (Segmentation fault/core dump)

Jump to solution

Hi @jovitac

 

I have a question.

 

Q)

Even if I use "2018.2-zcu-release.tar.xz" which is downloaded from Xilinx, I need to build linux-kernel and/or u-boot by PetaLinux. Is it correct understanding ?

If yes, what purpose does this "2018.2-zcu-release.tar.xz" ?

 

I'm trying it without compiling PetaLinux. But I can't resolve it yet.

 

Best regards,

 

0 Kudos
Moderator
Moderator
763 Views
Registered: ‎05-10-2017

Re: How to execute qemu with 2018-2-zcu-release.tar.xz (Segmentation fault/core dump)

Jump to solution

Hi Watari,

 

The images that are in the release folder will allow you to boot your ZCU102 board. But these do not have the qemu dtb's that you will need for booting qemu as well. For this, I would suggest to download the ZCU102 bsp from here

https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html

 

When you extract this bsp, you will see all the pre-built images along with the qemu dtbs in the pre-built/linux/images folder.

 

What is your requirement exactly? Do you just want to run the pre-built images on qemu?

As a starting point, if you have a petalinux project for a zcu102 bsp, you can load it on qemu using the command petalinux-boot --qemu --kernel.

You can see the qemu instances which get invoked when you use this command. Following this you can use the command line options to run the images on qemu.

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Scholar watari
Scholar
731 Views
Registered: ‎06-16-2013

Re: How to execute qemu with 2018-2-zcu-release.tar.xz (Segmentation fault/core dump)

Jump to solution

Hi @jovitac

 

Thank you for your kindly explanation.

 

The route cause is my mis-understanding about 2018-2-zcu-release.tar.xz .

 

I thought that I could run qemu with the extracted files.

However it's misunderstanding. I have to prepare some files by petalinux.

 

OK. I understand it.

I will try it.

 

BTW, if possible, would you modify the content to add some suggestion or nortification on this wiki page ?

 

Thank you.

Best regards,

0 Kudos