openwifi icon indicating copy to clipboard operation
openwifi copied to clipboard

Running wgd.sh completely hangs the system (zc702_fmcs2)

Open JuanL-e opened this issue 9 months ago • 2 comments

  1. Could you send email to [email protected] to introduce your self? Sent

  2. Our image is used directly or you build your own image? Used your 1.40 default image from quick start

  3. What is your own modification? No modification

  4. Versions: OS, Vivado, openwifi/openwifi-hw repo branch and commit revision OS: Ubuntu 20.04.1 Vivado: 2021.1 openwifi branch: Master Commit version: 1.40 (latest commit: b3bfd95b395b75745d17428d890d280f6a9426ab)

  5. Board/hardware type ZC702 + FMCOMMS3

  6. WiFi channel number Didn't get so far

  7. Steps to reproduce the issue, and the related error message, screenshot, etc

  1. Download your image
  2. Burned the img on the SD card using Disk Creator
  3. Copied the files inside: BOOT/openwifi/zc702_fmcs2 onto the base directory BOOT/
  4. Turned on the board with SD card inserted
  5. The board succesfully booted from the SD card and left me with a terminal
  6. On the terminal I ran the following commands in this order:
  • raspi-config --expand-rootfs (My SD card is 32GB; After it finished I rebooted the board)
  • ./openwifi/setup_once.sh (After it finished I rebooted the board)
  • cd openwifi
  • ./wgd.sh System hangs after I run "./wgd.sh", the only output I get is: root@analog:~/openwifi# ./wgd.sh usage: Script for load (or download+load) different driver and FPGA img without rebooting no argument: Load .ko driver files and FPGA img (if system_top.bit.bin exist) in current dir with test_mode=0. 1st argument: If it is a NUMBER, it will be assigned to test_mode. Then load everything from current dir. 1st argument: If it is a string called "remote", it will download driver/FPGA and load everything.
    • 2nd argument (if exist) is the target directory name for downloading and reloading
    • 3rd argument (if exist) is the value for test_mode 1st argument: neither NUMBER nor "remote" nor a .tar.gz file, it is regarded as a directory and load everything from i.
    • 2nd argument (if exist) is the value for test_mode 1st argument: a .tar.gz file, it will be unpacked then load from that unpacked directory
    • 2nd argument (if exist) is the value for test_mode
  1. Describe your debug efforts by Linux native tools, such as tcpdump and "cat /proc/interrupts" All of the following debug steps were aided by chatGPT as I am a total beginner with FPGAs: I inspected the wgd.sh script and added echo at different points and the script is hanging in insmod xilinx_dma.ko I attempted to observe the logs in dmesg by redirecting it to a file and then running wgd.sh -> hangs -> reboot board -> inspect the file to see if any dmesg is written but the file is empty, seems like the system hangs immediately At this point I started the witch hunt: I tried verifying if the FPGA is properly loaded and it was: cat /sys/class/fpga_manager/fpga0/state -> operating I tried verifying if the AXI DMA was in the device tree and was able to find the relevant entry: dtc -I fs /proc/device-tree | grep dma -> compatible = "xlnx,axi-dma-1.00.a"; I tried directly loading the problematic module without interrupts and with debugging but nothing worked or gave me any information I could use to further debug. At this point I decided to ask for help

  2. Describe your debug efforts by: https://github.com/open-sdr/openwifi/blob/master/doc/README.md#Debug-methods I guess this doesn't apply because I didn't even get to the point were the sdr0 interface is up.

  3. Any other thing we need to know for helping you better? Hopefully this is enough information to help me get started but if I am missing any logs or other information please do tell me and I will collect it.

JuanL-e avatar Mar 14 '25 22:03 JuanL-e

@JuanL-e I actually have this same problem, running the ./wgd.sh hangs up the system. By inspecting it, it hangs on the insmod xilinx_dma.ko command. I cant figure it out why is it happening. Did you found anything useful?

JoyBed avatar Apr 22 '25 21:04 JoyBed

I met the same problem with the default 1.5.0 image using Neptunesdr. It also hangs at insmod xilinx_dma.ko.

FaDoSolReLaMiTi avatar Sep 10 '25 15:09 FaDoSolReLaMiTi