[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use hex for bitstream_size as expected by u-boot



Hi Stefano,

On 10/11/2023 01:44, Stefano Stabellini wrote:
Reported-by: Brian Woods <brian@xxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>

diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index b284887..6e52da5 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -790,7 +790,7 @@ bitstream_load_and_config()
          check_file_type "$BITSTREAM" "BIT data"
          bitstream_addr=$memaddr
          load_file $BITSTREAM "fpga_bitstream"
-        bitstream_size=$filesize
+        bitstream_size=`printf "0x%X\n" $filesize`
Looking at [1], there is no indication that the size parameter for "fpga 
load" should be hexadecimal. At the contrary, all the example I have 
found seems to use $filesize.
Furthermore, this code also seems to have been added more than two years 
ago. I would have hope this was tested back then. So I think the commit 
message needs to contain a bit more information about why this is needed 
now.
Is this a change in U-boot? Different U-boot configuration? Or just this 
was never tested/used.
          if test "$UBOOT_SOURCE"
          then
              # we assume the FPGA device is 0 here

Cheers,

[1] https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/124682257/U-Boot+FPGA+Driver
--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.