cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
728 Views
Registered: ‎05-08-2018

ZynqMP Petalinux 2020.2 QEMU network and SD card problem

Hello,

im am currently in the process of familiarizing myself with Petalinux development for a ZynqMP device. As I don't have a physical board availible right now I started off by using QEMU. I was on a good track until I ran into two issues related to network and SD card usage in Linux running on QEMU.

In order to get to this point I have done the following:

  1. Vivado 2020.2
    1. Create basic Vivado 2020.2 block design with ZynqMP device "xczu7eg-ffvf1517-3-e"
    2. Enable following options in Zynq UltraScale+ MPSoC 3.3 core:
      1. QSPI
      2. GEM 0 (EMIO)
      3. GEM 1 (MIO)
      4. SD 0
      5. I2C 0
      6. UART 0
    3. Exported hardware via .xsa file
  2. Petalinux 2020.2
    1. Create new project : petalinux-create --type project --template zynqMP --name petalinux
    2. Configure project : petalinux-config --get-hw-description <path to .xsa>
    3. I performed no changes in menuconfig
    4. Build project : petalinux-build
    5. Package pre-built images : petalinux-package --prebuilt
    6. Copy missing file "pmu_rom_qemu_sha3.elf" from BSP of ZCU102 Evaluation Kit "xilinx-zcu102-v2020.2-final.bsp" into pre-built folder
  3. SD card
    1. Prepare SD card image file according to documentation with two partititions vfat (BOOT.BIN, boot.scr, Image) and ext4 (rootfs.cpio.gz).
  4. QEMU
    1. Start QEMU with SD card : petalinux-boot --qemu --prebuilt 3 --qemu-args "-drive file=/tmp/sd_card.img,if=sd,format=raw,index=0"
    2. U-Boot
      1. SD card is correctly found using commands 'mmc info' and 'mmc part'
      2. Network test ok by pinging gateway 10.0.2.2
    3. Linux
      1. Problem: No 'eth0' device is found
      2. Problem: No SD card block device found

I am unsure how to continue from here. As the network as well as the SD card seem to be correctly working in U-Boot it looks like a Petalinux problem.

There are some suspicious messages in the boot log which are maybe related:

  1. qemu-system-microblazeel: Failed to connect socket /tmp/tmp.YfcUl6JXO4/qemu-rport-_pmu@0: No such file or directory
    qemu-system-microblazeel: info: QEMU waiting for connection on: disconnected:unix:/tmp/tmp.YfcUl6JXO4/qemu-rport-_pmu@0,server
  2. [ 14.010533] spi_master spi0: Failed to create SPI device for /amba/spi@ff0f0000/flash@0
    [ 14.029634] zynqmp_gpd_attach_dev() domain5 request failed for node 29: -13
    [ 14.032157] macb ff0b0000.ethernet: failed to add to PM domain domain5: -13
    [ 14.034891] macb: probe of ff0b0000.ethernet failed with error -13
    [ 14.038940] zynqmp_gpd_attach_dev() domain6 request failed for node 30: -13
    [ 14.041140] macb ff0c0000.ethernet: failed to add to PM domain domain6: -13
    [ 14.042096] macb: probe of ff0c0000.ethernet failed with error -13
    [ 14.181603] zynqmp_gpd_attach_dev() domain8 request failed for node 39: -13
    [ 14.182000] sdhci-arasan ff160000.mmc: failed to add to PM domain domain8: -13
    [ 14.183278] sdhci-arasan: probe of ff160000.mmc failed with error -13
  3. [ 14.772467] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
    [ 14.774241] cfg80211: failed to load regulatory.db

Can somebody has advise how to proceed?

I currently have the following thoughts:

  • Is there some step missing in the Petalinux setup?
  • Is it required to add user information to the device tree?
  • Are there any known issues causing this behaviour?

Thank you in advance and best regards!

2 Replies
nikita_vasilev
Visitor
Visitor
151 Views
Registered: ‎07-07-2021

I have the same problem and I didn't find a solution. Tried to use qemu-args but it didn't help.

I do  have warning lines. And it seems that they are pointing to the problem:

qemu-system-aarch64: warning: hub 0 is not connected to host network
qemu-system-aarch64: warning: netdev eth0 has no peer
qemu-system-aarch64: warning: requested NIC (anonymous, model unspecified) was not created (not supported by this machine?)

But I didn't find a solution  

 

 

Full log:

$ petalinux-boot --qemu --kernel
INFO: Sourcing build tools
INFO: No DTB has been specified, use the default one "/home/USER/projects/PETALINUX_PROJECT/images/linux/system.dtb".
INFO: No DTB has been specified, use the default one "/home/USER/projects/PETALINUX_PROJECT/images/linux/system.dtb".
INFO: Starting microblaze QEMU
INFO: Starting the above QEMU command in the background
INFO:  qemu-system-microblazeel -M microblaze-fdt   -serial mon:stdio -serial /dev/null -display none -kernel /home/USER/projects/PETALINUX_PROJECT/pre-built/linux/images/pmu_rom_qemu_sha3.elf -device loader,file=/home/USER/projects/PETALINUX_PROJECT/images/linux/pmufw.elf      -hw-dtb /home/USER/projects/PETALINUX_PROJECT/images/linux/zynqmp-qemu-multiarch-pmu.dtb -machine-path /tmp/tmp.JMXijTyF8U -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4
qemu-system-microblazeel: Failed to connect socket /tmp/tmp.JMXijTyF8U/qemu-rport-_pmu@0: No such file or directory
qemu-system-microblazeel: info: QEMU waiting for connection on: disconnected:unix:/tmp/tmp.JMXijTyF8U/qemu-rport-_pmu@0,server
INFO: TCP PORT is free 
INFO: Starting aarch64 QEMU
INFO:  qemu-system-aarch64 -M arm-generic-fdt   -serial mon:stdio -serial /dev/null -display none -device loader,file=/home/USER/projects/PETALINUX_PROJECT/images/linux/bl31.elf,cpu-num=0 -device loader,file=/home/USER/projects/PETALINUX_PROJECT/images/linux/rootfs.cpio.gz.u-boot,addr=0x04000000,force-raw -device loader,file=/home/USER/projects/PETALINUX_PROJECT/images/linux/u-boot.elf -device loader,file=/home/USER/projects/PETALINUX_PROJECT/images/linux/Image,addr=0x00200000,force-raw -device loader,file=/home/USER/projects/PETALINUX_PROJECT/images/linux/system.dtb,addr=0x00100000,force-raw -device loader,file=/home/USER/projects/PETALINUX_PROJECT/images/linux/boot.scr,addr=0x20000000,force-raw -gdb tcp::9000   -net nic -net nic -net nic -net nic -net nic,netdev=eth0 -netdev user,id=eth0,tftp=/tftpboot   -hw-dtb /home/USER/projects/PETALINUX_PROJECT/images/linux/zynqmp-qemu-multiarch-arm.dtb -machine-path /tmp/tmp.JMXijTyF8U -global xlnx,zynqmp-boot.cpu-num=0 -global xlnx,zynqmp-boot.use-pmufw=true   -m 4G
QEMU 5.0.50 monitor - type 'help' for more information
(qemu) qemu-system-aarch64: warning: hub 0 is not connected to host network
qemu-system-aarch64: warning: netdev eth0 has no peer
qemu-system-aarch64: warning: requested NIC (anonymous, model unspecified) was not created (not supported by this machine?)
PMU Firmware 2020.2     Aug 11 2021   09:37:21
PMU_ROM Version: xpbr-v8.1.0-0
NOTICE:  ATF running on XCZUUNKN/QEMU v4/RTL0.0 at 0xfffea000
NOTICE:  BL31: v2.2(release):xlnx_rebase_v2.2_2020.3
NOTICE:  BL31: Built : 09:35:29, Aug 11 2021

 

0 Kudos
carrick
Visitor
Visitor
61 Views
Registered: ‎09-14-2021

my spi have similary issue:

[ 5.448645] zynqmp_gpd_attach_dev() domain6 request failed for node 35: -13
[ 5.455602] cdns-spi ff040000.spi: failed to add to PM domain domain6: -13
[ 5.462480] cdns-spi: probe of ff040000.spi failed with error -13

I would appreciate your comments.

Thanks,

0 Kudos