UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

Unable to configure PL from linux

Observer
Posts: 35
Registered: ‎06-11-2018

Unable to configure PL from linux

 

Hi,

 

I am trying to load my processor-less project on ZCU102 - without success so far.

 

I downloaded the linux image and boot.bin file from here.

I generated a bin file from my bitstream following this procedure.

I then copied the 3 files on the SD card an powered on the board. All fine here.

Then I ran

 

echo 0 > /sys/class/fpga_manager/fpga0/flags
mkdir -p /lib/firmware
cp /media/design_1_wrapper.bit.bin /lib/firmware/
echo design_1_wrapper.bit.bin > /sys/class/fpga_manager/fpga0/firmware

(as indicated here in the "Full Bitstream Using sysfs interface" section).

The error I get is

[   43.556465] fpga_manager fpga0: writing /media/har_wrap.bit.bin to Xilinx ZynqMP FPGA Manager
[   43.564977] fpga_manager fpga0: Direct firmware load for /media/har_wrap.bit.bin failed with error -2
[   43.574131] fpga_manager fpga0: Error requesting firmware /media/har_wrap.bit.bin
-sh: echo: write error: No such file or directory

 

How can I proceed?

 

Thanks,

Max

 

Observer
Posts: 35
Registered: ‎06-11-2018

Re: Unable to configure PL from linux

I updated my project so that now it includes the PS.

 

Using the same procedure, now this is what happens

 

# echo ps_har_wrapper.bit.bin > /sys/class/fpga_manager/fpga0/firmware                                                                                                                                        
[   90.544309] fpga_manager fpga0: writing ps_har_wrapper.bit.bin to Xilinx ZynqMP FPGA Manager
[  111.676114] INFO: rcu_sched detected stalls on CPUs/tasks:
[  111.681529]  0-...: (1 GPs behind) idle=ae2/140000000000000/0 softirq=960/961 fqs=2341 
[  111.689507]  (detected by 3, t=5254 jiffies, g=238, c=237, q=0)
[  111.695409] Task dump for CPU 0:
[  111.698619] sh              R  running task        0  2439   2437 0x0000002e
[  111.705652] Call trace:
[  111.708089] [<ffffff8008085878>] __switch_to+0x98/0xb0
[  111.713205] [<ffffffc8721e87c0>] 0xffffffc8721e87c0
[  174.700110] INFO: rcu_sched detected stalls on CPUs/tasks:
[  174.705510]  0-...: (1 GPs behind) idle=ae2/140000000000000/0 softirq=960/961 fqs=9387 
[  174.713493]  (detected by 1, t=21008 jiffies, g=238, c=237, q=0)
[  174.719481] Task dump for CPU 0:
[  174.722692] sh              R  running task        0  2439   2437 0x0000002e
[  174.729725] Call trace:
[  174.732157] [<ffffff8008085878>] __switch_to+0x98/0xb0
[  174.737278] [<ffffffc8721e87c0>] 0xffffffc8721e87c0
[  237.724109] INFO: rcu_sched detected stalls on CPUs/tasks:
[  237.729514]  0-...: (1 GPs behind) idle=ae2/140000000000000/0 softirq=960/961 fqs=16460 
[  237.737584]  (detected by 1, t=36764 jiffies, g=238, c=237, q=0)
[  237.743572] Task dump for CPU 0:
[  237.746783] sh              R  running task        0  2439   2437 0x0000002e
[  237.753816] Call trace:
[  237.756248] [<ffffff8008085878>] __switch_to+0x98/0xb0
[  237.761369] [<ffffffc8721e87c0>] 0xffffffc8721e87c0
[  300.748108] INFO: rcu_sched detected stalls on CPUs/tasks:
[  300.753509]  0-...: (1 GPs behind) idle=ae2/140000000000000/0 softirq=960/961 fqs=23530 
[  300.761580]  (detected by 1, t=52520 jiffies, g=238, c=237, q=0)
[  300.767568] Task dump for CPU 0:
[  300.770778] sh              R  running task        0  2439   2437 0x0000002e
[  300.777811] Call trace:
[  300.780243] [<ffffff8008085878>] __switch_to+0x98/0xb0
[  300.785364] [<ffffffc8721e87c0>] 0xffffffc8721e87c0

Any idea what's happening?

Explorer
Posts: 210
Registered: ‎09-14-2016

Re: Unable to configure PL from linux

Hi @suppamax,

 

Did you try with cat command ?

 

cat ps_har_wrapper.bit.bin > /sys/class/fpga_manager/fpga0/firmware  

Second option to validate the bitstream (load from u-boot) :

 

ZynqMP> fatload mmc 0 0x4000000 design_wrapper.bit.bin
reading design_wrapper.bit.bin
26510780 bytes read in 1749 ms (14.5 MiB/s)
ZynqMP> fpga load 0 0x4000000 $filesize

Good Luck!

Cheers,

Trigger

Observer
Posts: 35
Registered: ‎06-11-2018

Re: Unable to configure PL from linux

Loading the bitstream from u-boot works: I see the LEDs blinking as expected and if I run "boot" Linux boots correctly.

Using "cat" instead of "echo" gives an error.

Explorer
Posts: 210
Registered: ‎09-14-2016

Re: Unable to configure PL from linux

Ok so take a look to your bitstream format -> .bit vs. .bin
Observer
Posts: 35
Registered: ‎06-11-2018

Re: Unable to configure PL from linux

Hi trigger,

 

could you please elaborate more on that?

 

I generated the bin by

1) creating a bif file like

all:
{
  /path/to/file.bit
}

2)

$ bootgen -image file.bif -arch zynqmp -process_bitstream bin
Observer
Posts: 35
Registered: ‎06-11-2018

Re: Unable to configure PL from linux

One more thing I tried is creating the image in OSL flow.

 

I can complete the flow, but I get a few warnings while creating the dtb

$ dtc -I dts -O dtb -o my_dts/system-top.dtb my_dts/system-top.dts
my_dts/system-top.dtb: Warning (unit_address_vs_reg): /amba_pl@0: node has a unit name, but no reg property
my_dts/system-top.dtb: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
my_dts/system-top.dtb: Warning (pci_device_reg): /amba/pcie@fd0e0000/legacy-interrupt-controller: missing PCI reg property
my_dts/system-top.dtb: Warning (unique_unit_address): /amba_apu@0: duplicate unit-address (also used in node /amba_pl@0)

and the itb

$ u-boot-xlnx/tools/mkimage -f fitImage.its fitImage.itb
<stdout>: Warning (unit_address_vs_reg): /images/kernel@0: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /images/kernel@0/hash@1: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /images/fdt@0: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /images/fdt@0/hash@1: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /images/ramdisk@0: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /images/ramdisk@0/hash@1: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /configurations/conf@1/hash@1: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /configurations/conf@2: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /configurations/conf@2/hash@1: node has a unit name, but no reg property

Then, when I power the board on

[    4.591376] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    4.598785] Please append a correct "root=" boot option; here are the available partitions:
[    4.607117] 0100           65536 ram0 
[    4.607119]  (driver?)
[    4.613185] 0101           65536 ram1 
[    4.613187]  (driver?)
[    4.619257] 0102           65536 ram2 
[    4.619259]  (driver?)
[    4.625338] 0103           65536 ram3 
[    4.625340]  (driver?)
[    4.631409] 0104           65536 ram4 
[    4.631411]  (driver?)
[    4.637490] 0105           65536 ram5 
[    4.637491]  (driver?)
[    4.643565] 0106           65536 ram6 
[    4.643567]  (driver?)
[    4.649642] 0107           65536 ram7 
[    4.649644]  (driver?)
[    4.655718] 0108           65536 ram8 
[    4.655719]  (driver?)
[    4.661794] 0109           65536 ram9 
[    4.661797]  (driver?)
[    4.667870] 010a           65536 ram10 
[    4.667872]  (driver?)
[    4.674028] 010b           65536 ram11 
[    4.674030]  (driver?)
[    4.680196] 010c           65536 ram12 
[    4.680197]  (driver?)
[    4.686354] 010d           65536 ram13 
[    4.686355]  (driver?)
[    4.692521] 010e           65536 ram14 
[    4.692523]  (driver?)
[    4.698680] 010f           65536 ram15 
[    4.698681]  (driver?)
[    4.704851] b300        15558144 mmcblk0 
[    4.704853]  driver: mmcblk
[    4.711618]   b301          204800 mmcblk0p1 1d3f1026-01
[    4.711620] 
[    4.718383]   b302        15352320 mmcblk0p2 1d3f1026-02
[    4.718385] 
[    4.725154] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    4.733404] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.14.0 #3
[    4.739301] Hardware name: xlnx,zynqmp (DT)
[    4.743467] Call trace:
[    4.745904] [<ffffff8008088ae8>] dump_backtrace+0x0/0x360
[    4.751283] [<ffffff8008088e5c>] show_stack+0x14/0x20
[    4.756318] [<ffffff80089cd1a0>] dump_stack+0x9c/0xbc
[    4.761352] [<ffffff800809af98>] panic+0x11c/0x274
[    4.766126] [<ffffff8008d01124>] mount_block_root+0x1a8/0x27c
[    4.771854] [<ffffff8008d01430>] mount_root+0x11c/0x134
[    4.777062] [<ffffff8008d015b4>] prepare_namespace+0x16c/0x1b4
[    4.782878] [<ffffff8008d00d44>] kernel_init_freeable+0x1b8/0x1d8
[    4.788955] [<ffffff80089df0f0>] kernel_init+0x10/0x100
[    4.794162] [<ffffff8008084a60>] ret_from_fork+0x10/0x18
[    4.799456] SMP: stopping secondary CPUs
[    4.803361] Kernel Offset: disabled
[    4.806832] CPU features: 0x002004
[    4.810216] Memory Limit: none
[    4.813258] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

but I see the bitfile has been loaded as the leds are correctly driven by PL.

Observer
Posts: 35
Registered: ‎06-11-2018

Re: Unable to configure PL from linux

It was the ramdisk missing.

 

Explorer
Posts: 210
Registered: ‎09-14-2016

Re: Unable to configure PL from linux

And ?

 

Problem solved or not ?

Observer
Posts: 35
Registered: ‎06-11-2018

Re: Unable to configure PL from linux

No, I still cannot reconfigure the PL from PS.

 

But I will stop debugging this problem as it's not the best solution for my problem.

I'll try to reconfigure the PL via some configuration registers accessible from PS.