Xilinx / qemu

Xilinx's fork of Quick EMUlator (QEMU) with improved support and modelling for the Xilinx platforms.
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/821395464/QEMU+User+Documentation
Other
231 stars 150 forks source link

How to run QNX OS on qemu #71

Open shizhuang-li opened 1 year ago

shizhuang-li commented 1 year ago

https://github.com/Xilinx/qemu/issues/61

61

Hello,Edgar and Asif, Your discussion is very interesting, I am also trying to build a QNX os on qemu recently, I tried Asif's method, as shown below:

qemu-system-aarch64 -M xlnx-zcu102 -m 8G -serial mon:stdio -device loader,file=/root/xlinxbsp/images/QNX-IFS,cpu-num=0 -nographic -global xlnx,zynqmp-boot.cpu-num=0 -global `xlnx,zynqmp-boot.use-pmufw=true

The QNX-IFS file is the xlnx-zcu102 BSP package I downloaded from the QNX software center.When I run the above command, nothing is displayed, and the command cannot be terminated, only the kill command can be used to end the process. aMfATYRpBC I'm guessing that there may be a problem with my QNX-IFS file, but I'm not sure what the specific problem is? So I would like to ask how to solve this problem, and how did you get the QNX-IFS file?

Regards Shizhuang.li

tsi-345 commented 11 months ago

Hi Shizhuang.li you have to add the QNX-IFS startaddress: qemu-system-aarch64 -M xlnx-zcu102 -m 8G -serial mon:stdio -device loader,file=/root/xlinxbsp/images/QNX-IFS,addr=0x00100000,cpu-num=0 -nographic -global xlnx,zynqmp-boot.cpu-num=0 -global `xlnx,zynqmp-boot.use-pmufw=true

This works for me.

FaiqueAli commented 5 months ago

Hi, I found this post helpful for creating the QNX VM, as I am struggling to create VM for QNX using Qemu. after creating the VM using this way, I found that the VM do not have complete directory structure like /mnt/app folder and some other folder also missing. while I also tried -device loader,file=rootfs.cpio.gz.u-boot,addr=0x04000000,force-raw=on but the result is same. I wanted to know that am I missing some setting?

Second, what is the difference between M arm-generic-fdt and xlnx-zcu102 machine type in Qemu?

@tsi-345 could you please have a look

Thanks :)

charantejaabbavathini commented 4 months ago

Hi @FaiqueAli,

Find the start address in the .build file and pass it in the command. I used below command and able to boot the os qemu-system-aarch64 -M xlnx-zcu102 -m 8G -serial mon:stdio -device loader,file=QNX-IFS,addr=0x100000,cpu-num=0 -nographic -global xlnx,zynqmp-boot.cpu-num=1 -global xlnx,zynqmp-boot.use-pmufw=true

FaiqueAli commented 4 months ago

@charantejaabbavathini

Thank for the rep for which build file are you talking about? I only have QNX-IFS file at hand..

Faiq

charantejaabbavathini commented 4 months ago

@FaiqueAli you should specify the start addr like this qemu-system-aarch64 -M xlnx-zcu102 -m 8G -serial mon:stdio -device loader,file=QNX-IFS,addr=0x100000,cpu-num=0 -nographic -global xlnx,zynqmp-boot.cpu-num=0

the build file is the part of the BSP you will have to download from qnx software center (BSP for zcu102) Try the mentioned address.

Thanks!

FaiqueAli commented 4 months ago

@charantejaabbavathini thank you for more information. I am able to create the VM and mounted the diskimage, but now I can not execute mkdir inorder to create directory structure. any idea about that ?