Hello,
How are you?
I am developing a linux application with Petalinux 2020.1 and need to add a custom FPGA design generated from Vivado using the Ultra96-V2 Board preset. The problem is that when i add any peripheral that use interrupts, my linux kernel boot hangs. Howerver, i can boot with a custom bitstream where I only added BLOCK RAM. With this design my kernel boot and a i can write/read from this RAM on FPGA with devmem tool.
This is my linux kernel booting logs when algo using an AXI TIMER IP from Vivado.
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.4.0-xilinx-v2020.1 (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 SMP Wed Oct 5 12:21:52 UTC 2022
[ 0.000000] Machine model: Avnet Ultra96 Rev1
[ 0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[ 0.000000] printk: bootconsole [cdns0] enabled
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000003ed40000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node rproc@3ed400000, compatible id shared-dma-pool
[ 0.000000] cma: Reserved 512 MiB at 0x000000005fc00000
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] percpu: Embedded 21 pages/cpu s48664 r8192 d29160 u86016
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] Speculative Store Bypass Disable mitigation not required
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 515524
[ 0.000000] Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1512568K/2094848K available (11836K kernel code, 688K rwdata, 3676K rodata, 704K init, 518K bss, 57992K reserved, 524288K cma-reserved)
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] irq-xilinx: /amba/axi-interrupt-ctrl: num_irq=32, sw_irq=0, edge=0x0
I created the petalinux project using Ultra96-V2 2020.1 BSP.
After that, these are the steps i use to add my custom Vivado Design and generate my linux image
petalinux-config --get-hw-description <CUSTOM_HW_DIR_FILES>
petalinux-build -c avenet-image-minimal
petalinux-package --boot --force --u-boot --format BIN --fpga images/linux/system.bit --pmufw images/linux/pmufw.elf --fsbl images/linux/zynqmp_fsbl.elf
After that, i copy BOOT.bin and image.ub too BOOT partition of SD CARD and also copy rootfs.tar.gz to root partition of SD CARD.