open-sdr / openwifi

open-source IEEE 802.11 WiFi baseband FPGA (chip) design: driver, software
GNU Affero General Public License v3.0
3.84k stars 650 forks source link

There is a problem restarting the circuit board to load a new FPGA bitstream after updating the FPGA #192

Closed 8663 closed 1 year ago

8663 commented 2 years ago

After I update the FPGA according to the routine, regenerate the boot.bin file, and re mount it to the partition, the restart development board cannot start.The following is after restart。 After ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b , there was no response image image

The operating system we use is Ubuntu16.04,vivado is 2018.3 ,board is antsdr

JiaoXianjun commented 2 years ago

You need to tell us your each step operation/command and their outputs.

8663 commented 2 years ago

image In the figure above, we replace the.Hdf file and.Bit file with the two files we generated. Then execute: $OPENWIFI_DIR/user_space/boot_bin_gen.sh $OPENWIFI_DIR $XILINX_DIR $BOARD_NAME scp $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN root@192.168.10.122: On board: mount /dev/mmcblk0p1 /mnt cp ~/BOOT.BIN /mnt umount /mnt reboot

8663 commented 2 years ago

The development board we use is antsdr

JiaoXianjun commented 2 years ago

Can you use our original openwifi-hw (no any modifications) to generate hdf and bit, then put it onboard to test? Is it ok or it has problem?

Which sd card image are you using?

8663 commented 2 years ago

image We generate SD by directly burning the image file.

image image image This is the version of openwifi HW we use. There is no problem updating it. However, there is a problem with mounting and restarting after replacing.Hdf and.Bit files to generate boot.bin. Is there a problem with my FPGA update operation? How to generate the boot.bin file after we modify the FPGA part

JiaoXianjun commented 2 years ago

We never use windows to burn the image and we know there are always some issues related to this sd card image burned by windows by some users. we suggest you use Linux and do not do any change to our code to go through the whole flow to make sure you can do all operations successfully.

8663 commented 2 years ago

We download openwifi-hw, generate the BOOT.bin file from the bit file and hdf file, and then update the FPGA. It can run normally. /wgh.sh file. image However, when we update the FPGA by recompiling the bit file and hdf file generated by openwifi-hw(We operate with reference to build FPGA in openwifi HW without any modification), the ad9361 device cannot be recognized when running./wgh.sh. How can we solve this problem.

image

JiaoXianjun commented 2 years ago

Good. Please paste all your operations and outputs here. Including screenshot of Vivado completion, all your commands, etc.

8663 commented 2 years ago

Download command:git clone --branch antsdr https://github.com/open-sdr/openwifi-hw.git

Update FPGA: $OPENWIFI_DIR/user_space/boot_bin_gen.sh $OPENWIFI_DIR $XILINX_DIR $BOARD_NAME scp $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN root@192.168.10.122: mount /dev/mmcblk0p1 /mnt cp ~/BOOT.BIN /mnt umount /mnt reboot

This is the output result after generating the boot.bin file

image image image image image

8663 commented 2 years ago

vivado界面

JiaoXianjun commented 2 years ago

You put lots of commands from our readme, not the command you input/run in your computer environment. And you do not put the command outputs. So, hard to tell the problem.

Can you put here step by step of “your own” operations in your computer? Not just repeat our readme. And also the outputs. For instances what is the output of your boot_bin_gen.sh ?

8663 commented 2 years ago

Install the evaluation license of Xilinx Viterbi Decoder into Vivado.

export XILINX_DIR=/opt/vivado2018.3 ./prepare_adi_lib.sh $XILINX_DIR 2022-07-29 09-09-47屏幕截图

export BOARD_NAME=antsdr ./prepare_adi_board_ip.sh $XILINX_DIR $BOARD_NAME

2022-07-29 09-10-12屏幕截图 2022-07-29 09-10-55屏幕截图

Launch Vivado: cd /home/zzn/getwifi/openwifi/openwifi-hw/boards/$BOARD_NAME/ source $XILINX_DIR/Vivado/2018.3/settings64.sh vivado

8663 commented 2 years ago

2022-07-29 09-11-28屏幕截图

In Vivado: source ./openwifi.tcl Open Block Design Tools --> Report --> Report IP Status Generate Bitstream (Will take a while) File --> Export --> Export Hardware... --> Include bitstream --> OK File --> Launch SDK --> OK, then close SDK

2022-07-29 09-11-58屏幕截图

8663 commented 2 years ago

We haven't made any changes to the project. The generated .Bit and .Hdf update boot.bin will cause the problem of unable to find the ad9361 device. Updating boot.bin with .Bit and .Hdf provided by you can work normally.

8663 commented 2 years ago

image Excuse me, where can we find this number

8663 commented 2 years ago

image How should this problem be solved

JiaoXianjun commented 2 years ago

You keep asking how to solve your problem, but never show a full logs of operations and outputs. Without knowing your operations and outputs we do not know why.

And you are not following our latest openwifi-hw readme, you are using some old versions. This could also be a problem.

8663 commented 2 years ago

root@analog:~# dmesg Booting Linux on physical CPU 0x0 Linux version 4.14.0-gb6e3799-dirty (microphase@microphase-dev) (gcc version 7.3.1 20180314 (Linaro GCC 7.3-2018.04-rc3)) #1 SMP PREEMPT Thu Aug 12 12:24:19 CST 2021 CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache OF: fdt: Machine model: Analog Devices ADRV9364-Z7020 (Z7020/AD9364) OF: fdt: earlycon: stdout-path /amba@0/uart@E0001000 not found Memory policy: Data cache writealloc cma: Reserved 128 MiB at 0x38000000 On node 0 totalpages: 262144 free_area_init_node: node 0, pgdat c0c54340, node_mem_map ef7f7000 Normal zone: 1536 pages used for memmap Normal zone: 0 pages reserved Normal zone: 196608 pages, LIFO batch:31 HighMem zone: 65536 pages, LIFO batch:15 random: fast init done percpu: Embedded 16 pages/cpu @ef7c8000 s33036 r8192 d24308 u65536 pcpu-alloc: s33036 r8192 d24308 u65536 alloc=16*4096 pcpu-alloc: [0] 0 [0] 1 Built 1 zonelists, mobility grouping on. Total pages: 260608 Kernel command line: console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlycon rootfstype=ext4 rootwait cpuidle.off=1 PID hash table entries: 4096 (order: 2, 16384 bytes) Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) Memory: 895988K/1048576K available (7168K kernel code, 340K rwdata, 2376K rodata, 1024K init, 160K bss, 21516K reserved, 131072K cma-reserved, 131072K highmem) Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xf0800000 - 0xff800000 ( 240 MB) lowmem : 0xc0000000 - 0xf0000000 ( 768 MB) pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) modules : 0xbf000000 - 0xbfe00000 ( 14 MB) .text : 0xc0008000 - 0xc0800000 (8160 kB) .init : 0xc0b00000 - 0xc0c00000 (1024 kB) .data : 0xc0c00000 - 0xc0c551e0 ( 341 kB) .bss : 0xc0c5ab38 - 0xc0c82e84 ( 161 kB) Preemptible hierarchical RCU implementation. RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2. Tasks RCU enabled. RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 efuse mapped to f0802000 slcr mapped to f0804000 L2C: platform modifies aux control register: 0x72360000 -> 0x72760000 L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000 L2C-310 erratum 769419 enabled L2C-310 enabling early BRESP for Cortex-A9 L2C-310 full line of zeros enabled for Cortex-A9 L2C-310 ID prefetch enabled, offset 1 lines L2C-310 dynamic clock gating enabled, standby mode enabled L2C-310 cache controller enabled, 8 ways, 512 kB L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001 zynq_clock_init: clkc starts at f0804100 Zynq clock init sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns Switching to timer-based delay loop, resolution 3ns clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns timer #0 at f080c000, irq=17 Console: colour dummy device 80x30 Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) CPU: Testing write buffer coherency: ok CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 Setting up static identity map for 0x100000 - 0x100060 Hierarchical SRCU implementation. smp: Bringing up secondary CPUs ... CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 smp: Brought up 1 node, 2 CPUs SMP: Total of 2 processors activated (1333.33 BogoMIPS). CPU: All CPU(s) started in SVC mode. devtmpfs: initialized VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 512 (order: 3, 32768 bytes) pinctrl core: initialized pinctrl subsystem NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. hw-breakpoint: maximum watchpoint size is 4 bytes. zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0880000 zynq-pinctrl 700.pinctrl: zynq pinctrl initialized e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 25, base_baud = 6249999) is a xuartps console [ttyPS0] enabled SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb media: Linux media interface: v0.10 Linux video capture interface: v2.00 pps_core: LinuxPPS API ver. 1 registered pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it PTP clock support registered FPGA manager framework Advanced Linux Sound Architecture Driver Initialized. clocksource: Switched to clocksource arm_global_timer NET: Registered protocol family 2 TCP established hash table entries: 8192 (order: 3, 32768 bytes) TCP bind hash table entries: 8192 (order: 4, 65536 bytes) TCP: Hash tables configured (established 8192 bind 8192) UDP hash table entries: 512 (order: 2, 16384 bytes) UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) NET: Registered protocol family 1 hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing. hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available workingset: timestamp_bits=30 max_order=18 bucket_order=0 bounce: pool size: 64 pages io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) io scheduler mq-deadline registered io scheduler kyber registered dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330 dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16 brd: module loaded loop: module loaded m25p80 spi1.0: found w25q256, expected n25q256a m25p80 spi1.0: failed to read ear reg m25p80 spi1.0: w25q256 (32768 Kbytes) 6 ofpart partitions found on MTD device spi1.0 Creating 6 MTD partitions on "spi1.0": 0x000000000000-0x0000000e0000 : "qspi-fsbl-uboot" 0x0000000e0000-0x000000100000 : "qspi-uboot-env" 0x000000100000-0x000000600000 : "qspi-linux" 0x000000600000-0x000000620000 : "qspi-device-tree" 0x000000620000-0x000001300000 : "qspi-rootfs" 0x000001300000-0x000002000000 : "qspi-bitstream" MACsec IEEE 802.1AE libphy: Fixed MDIO Bus: probed tun: Universal TUN/TAP device driver, 1.6 libphy: MACB_mii_bus: probed macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 28 (00:0a:35:00:01:22) Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL) ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver usbcore: registered new interface driver usb-storage usbcore: registered new interface driver usbserial usbcore: registered new interface driver usbserial_generic usbserial: USB Serial support registered for generic usbcore: registered new interface driver ftdi_sio usbserial: USB Serial support registered for FTDI USB Serial Device chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator ULPI transceiver vendor/product ID 0x0424/0x0007 Found SMSC USB3320 ULPI transceiver. ULPI integrity check: passed. ci_hdrc ci_hdrc.0: EHCI Host Controller ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1 ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00 hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected i2c /dev entries driver IR NEC protocol handler initialized IR RC5(x/sz) protocol handler initialized IR RC6 protocol handler initialized IR JVC protocol handler initialized IR Sony protocol handler initialized IR SANYO protocol handler initialized IR Sharp protocol handler initialized IR MCE Keyboard/mouse protocol handler initialized IR XMP protocol handler initialized usbcore: registered new interface driver uvcvideo USB Video Class driver (1.1.1) gspca_main: v2.14.0 registered cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at f0963000 with timeout 10s Xilinx Zynq CpuIdle Driver started failed to register cpuidle driver sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman sdhci-pltfm: SDHCI platform and OF driver helper mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA ledtrig-cpu: registered to indicate activity on CPUs hidraw: raw HID events driver (C) Jiri Kosina usbcore: registered new interface driver usbhid usbhid: USB HID core driver ad7291: probe of 0-0020 failed with error -5 ad7291: probe of 0-002c failed with error -5 fpga_manager fpga0: Xilinx Zynq FPGA Manager registered Netfilter messages via NETLINK v0.30. nfnl_acct: registering with nfnetlink. nf_conntrack version 0.5.0 (16384 buckets, 65536 max) ctnetlink v0.93: registering with nfnetlink. nf_tables: (c) 2007-2009 Patrick McHardy kaber@trash.net nf_tables_compat: (c) 2012 Pablo Neira Ayuso pablo@netfilter.org xt_time: kernel timezone is -0000 ip_tables: (C) 2000-2006 Netfilter Core Team ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully arp_tables: arp_tables: (C) 2002 David S. Miller NET: Registered protocol family 17 mmc0: new high speed SDHC card at address b368 Registering SWP/SWPB emulation handler input: gpio_keys as /devices/soc0/gpio_keys/input/input0 hctosys: unable to open rtc device (rtc0) ALSA device list: No soundcards found. mmcblk0: mmc0:b368 NCard 29.1 GiB mmcblk0: p1 p2 p3 EXT4-fs (mmcblk0p2): recovery complete EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) VFS: Mounted root (ext4 filesystem) on device 179:2. devtmpfs: mounted Freeing unused kernel memory: 1024K init: hwclock main process (926) terminated with status 1 systemd-udevd[1015]: starting version 204 ad9361 spi0.0: ad9361_probe : enter (ad9361) Registered mathworks_ip class xilinx-vdma 80400000.dma: Xilinx AXI DMA Engine Driver Probed!! xilinx-vdma 80410000.dma: Xilinx AXI DMA Engine Driver Probed!! mwipcore 43c00000.mwipcore: Dev memory resource found at 43c00000 0000FFFF. mwipcore 43c00000.mwipcore: 'mwipcore' device not found, creating mwipcore 43c00000.mwipcore: Char dev region registered: major num:242 mwipcore 43c00000.mwipcore: 'mwipcore' device created ad9361 spi0.0: ad9361_probe : AD936x Rev 2 successfully initialized SAMPL CLK: 61440000 tuning: TX 0:1:2:3:4:5:6:7:8:9:a:b:c:d:e:f: 0:# # # # # # # # # # # # # # # # 1:# # # # # # # # # # # # # # # # ad9361 spi0.0: ad9361_dig_tune_delay: Tuning TX FAILED! cf_axi_adc: probe of 79020000.cf-ad9361-lpc failed with error -5 cf_axi_dds 79024000.cf-ad9361-dds-core-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x79024000 mapped to 0xf18f1000, probed DDS AD9361 init: udev-fallback-graphics main process (1546) terminated with status 1 init: failsafe main process (1478) killed by TERM signal NET: Registered protocol family 10 IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready Segment Routing with IPv6 init: alsa-restore main process (1762) terminated with status 19 init: isc-dhcp-server main process (1778) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: samba-ad-dc main process (1694) terminated with status 1 init: isc-dhcp-server main process (1823) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (1866) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (1889) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: tty1 main process (1953) killed by TERM signal init: lightdm main process (1725) terminated with status 1 init: isc-dhcp-server main process (1911) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (1970) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (1982) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2000) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2013) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2039) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2061) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2069) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2077) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2085) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2093) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2101) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2109) terminated with status 1 init: isc-dhcp-server main process ended, respawning init: isc-dhcp-server main process (2117) terminated with status 1 init: isc-dhcp-server respawning too fast, stopped image