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: 
Adventurer
Adventurer
1,153 Views
Registered: ‎11-10-2017

QEMU boot and BSP package

Hello ,

 

I am trying to create a BSP of my petalinux project that i created from scratch using HDF from vivado. I want to use QEMU to check if my project builds and changes are working fine.. As to execute the project on QEMU , a BSP based project is needed i created a bsp of my project :

 

petalinux-package --qemu -p /home/user/myprj -hw-source /home/user/hdf_prj/my_prj/my_prj.sdk -n test.bsp

 

But when i created another project using this bsp and tried starting the qemu,

1>  i was stuck in the arguments .

2> when i simply booted using : 

   petalinux-boot --qemu -i BOOT.BIN

it got stuck and didn't executed correctly.

 

I have downloaded 2017.3 final bsp and project based on it was booting fine on QEMU ... 

 

Any suggestions or guidance how do i make a bsp properly ? or why i was not able to use my own bsp ? 

0 Kudos
5 Replies
Moderator
Moderator
1,125 Views
Registered: ‎05-10-2017

Re: QEMU boot and BSP package

@vish.bh30 Could you copy your bootlog? Where is it getting stuck?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
1,107 Views
Registered: ‎11-10-2017

Re: QEMU boot and BSP package

hi @jovitac

 

so i was able to make QEMU work partially for me by a workaround that i do not like.. :

 

1. I generated a new project using my bsp file

2. built the project.

3. created a new folder within the project > pre-built/linux/images

4. Copied the generated images from project folder images to pre-built folder images.

5. copied file : pmu_rom_qemu_sha3.elf   to prebuilt images folder from a project folder created from xilinx bsp

 

The QEMU started after this but got stuck on cdns0 in between. If i look at the folder structure generated using Xilinx 2017.3 BSP , I do not have pre-built folder created as well as file pmu_rom_qemu_sha3.elf  not present  using my bsp file ? How do I generate and pack these files and folder structure during BSP file creation ?

 

find my log attached : 

Try one was without the above mentioned changes which resulted in command error 

Try two was with the changes which got stuck at cdns0 line

 

regards

 

Vishal

 

0 Kudos
Moderator
Moderator
1,099 Views
Registered: ‎05-10-2017

Re: QEMU boot and BSP package

@vish.bh30

The PMU rom is only available with the ZCU102 Petalinux BSP. You will need to download the bsp from https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2017-3.html

When you extract the folder, pmu_rom_qemu_sha3.elf will be present in the prebuilt folder. The prebuilt folder will not be present if you are creating a project using custom hdf/custom bsp. You will need to copy these files over from a zcu102 bsp.

 

To boot qemu with the kernel image you built for your project you can use the command 

petalinux-boot --qemu --kernel

 

You can also manually enter the qemu commands. Please use UG1169 https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_3/ug1169-xilinx-qemu.pdf for a description of qemu commands.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
1,083 Views
Registered: ‎11-10-2017

Re: QEMU boot and BSP package

Hi @jovitac

 

So i have tried various ways to boot my project on QEMU but no success. I followed the steps givern in UG 1169 as per you reply but i got even more confused now.. please find the file of all those boot logs attached. 

the 7th one in the end is where i did created nbd0p1 and nbd0p2 partitons in /dev/nbd0 but i was not able to boot that in QEMU.. i have the project configured for SD boot , which is executing fine on the board. 

 

Let me know what i did wrong ,.. 

 

Thanks for the help ! 

 

Regards,

Vishal

0 Kudos
Moderator
Moderator
1,042 Views
Registered: ‎05-10-2017

Re: QEMU boot and BSP package

Hi Vishal,

 

Not all features are supported in QEMU. Please take a look at Table 2-1 in UG1169 for a list of qemu models that are currently supported.

 

For SD boot, please refer to page 40 in the user guide. Currently there is an issue with SD boot in qemu, where it hangs at the FSBL stage. Please follow this AR https://www.xilinx.com/support/answers/69635.html to create the modified fsbl.elf

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos