Xilinx / gen-machine-conf

Parse hardware design information to generate project specific machine configuration
https://www.xilinx.com/products/silicon-devices.html
Other
5 stars 1 forks source link

Failure with Parse Issue in Petalinux 2024.1 #2

Open Fatalon opened 1 week ago

Fatalon commented 1 week ago

When updating a petalinux environment via petalinux-config --get-hw-description . I get an IndexError at your scripts in the post-process phase. I added some smaller print statements inside the files created in my repo and could pin it down to the following lines around: https://github.com/Xilinx/gen-machine-conf/blob/357e8ea40cbcd0944221d10e9f7ac3323951ae9e/gen_config.py#L265

StackTrace - I added debug print statements for serialname, serialipname and serialno before the split

paul@paul-Desktop:~/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os$ petalinux-config --get-hw-description .
[INFO] Getting hardware description
[INFO] Renaming kr260_acc_platform.xsa to system.xsa
[INFO] Getting Platform info from HW file
[INFO] Menuconfig project
PSU_CORESIGHT_0
psu_coresight_0
['psu_coresight_0']
[INFO] Silentconfig rootfs
[INFO] Generating configuration files
[INFO] Generating machine conf file
Traceback (most recent call last):
  File "/home/paul/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/gen-machineconf", line 203, in <module>
    ret = main()
  File "/home/paul/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/gen-machineconf", line 197, in main
    ret = args.func(args)
  File "/home/paul/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/lib/gen-machineconf/xsct_flow.py", line 220, in ParseXsa
    project_config.GenerateConfiguration(args, hw_info,
  File "/home/paul/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/lib/project_config.py", line 293, in GenerateConfiguration
    machine_conf_file = yocto_machine.GenerateYoctoMachine(
  File "/home/paul/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/lib/yocto_machine.py", line 570, in GenerateYoctoMachine
    machine_override_string += YoctoXsctConfigs(args, arch, dtg_machine,
  File "/home/paul/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/lib/yocto_machine.py", line 282, in YoctoXsctConfigs
    serial_no = serialname.lower().split(serialipname + '_')[1]
IndexError: list index out of range
[ERROR] list index out of range
[ERROR] Command gen-machineconf --soc-family zynqmp --hw-description /home/paul/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os/project-spec/hw-description/system.xsa --xsct-tool /opt/xilinx/petalinux/components/xsct --output /home/paul/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os/project-spec/configs             --add-rootfsconfig /home/paul/Documents/HomDoc/Projects/hls-apriltag/vitis_hls/linux_os/project-spec/meta-user/conf/user-rootfsconfig --petalinux --menuconfig project failed

As one can clearly see, the serialname contains the same string just in capslock as serialipname, therefore I patched my issue by adjusting the line to

serial_no = serialname.lower().split('_')[-1]

both in the yocto_machine.py file and post_process_config.py I dont know the details of the script nor where serial_no is utilized further, but I assume you want to capture the number part of the IP name.

mhatle commented 1 week ago

Thanks for the report. I'll see if we can get this fixed. I need to investigate what the serialname is being used for and understand why the case could change (and if that is an issue elsewhere).

grsandeep85 commented 1 week ago

@Fatalon is there a way you can email(sandeep.gundlupet-raju@amd.com) the xsa to investigate further?

Fatalon commented 1 week ago

I send you the XSA. Later I found out that I missed to manually configure the necessary components of the IOU module of the MPSoC. Using the fixed XSA doesn't produce the error anymore, but it was still rather misleading