Summary
Building AVED fails during the firmware build step when the host system's Vivado installation has NFS ACL rules that restrict file access to a specific group. These ACLs are inherited by files created within copied directories, causing newly generated files to receive mode 000, which breaks subsequent build steps that attempt to read them.
Environment
- AVED tag:
amd_v80_gen5x8_25.1_xbtest_20251113
- Vivado version: 2025.1
Detailed Description
During the firmware build, fw/AMC/scripts/build_bsp.sh invokes empyro create_bsp. Among other things, this command copies the standalone/src/common/ directory from the local Vivado installation into the AVED work directory:
$VIVADO_BASE/Vitis/data/embeddedsw/lib/bsp/standalone_v9_3/src/common/
-> fw/AMC/amc_bsp/amc_bsp/libsrc/standalone/src/common/
In our shared server setup, the Vivado installation files are located on a shared NFS filesystem and owned by one of our sysadmins. To allow the other sysadmins to manage the installation, the following NFS ACL rules are set on the Vivado installation tree and are configured to be inherited by all newly created files within it:
A:dg:sysadmin@domain.org:rwaDdxtTnNcCy
A:fig:sysadmin@domain.org:rwaDdxtTnNcCy
The copy_directory call preserves these ACL rules on the destination common/ directory. Because the NFS filesystem operates on a deny-by-default model (i.e., only explicitly permitted access is granted), any file subsequently created inside that destination directory — such as fw/AMC/amc_bsp/amc_bsp/libsrc/standalone/src/common/StandaloneExample.cmake — inherits the ACL and ends up with mode 000 for users not in the sysadmin group.
A later step then attempts to copy StandaloneExample.cmake to another location, which fails because the file is unreadable for the build user. All other generated files are created inside directories that were freshly created by the AVED build scripts and therefore receive permissions normally.
The immediate error manifests as a copy or read failure on:
fw/AMC/amc_bsp/amc_bsp/libsrc/standalone/src/common/StandaloneExample.cmake
Steps to Reproduce
- Have a Vivado 2025.1 installation owned by a different user than the build user, with NFS ACL inheritance rules on the installation tree that prohibit the build user to create readable files (e.g., group-restricted access via
A:dg: and A:fig: entries).
- Check out AVED at tag
amd_v80_gen5x8_25.1_xbtest_20251113 on a filesystem that supports NFS ACL rules.
- Run the firmware build, which triggers
fw/AMC/scripts/build_bsp.sh and the empyro create_bsp command.
- Observe a build failure due to a permission error on
fw/AMC/amc_bsp/amc_bsp/libsrc/standalone/src/common/StandaloneExample.cmake (mode 000).
Suggested Fix
The issue originates within empyro, where the create_bsp command copies the standalone/src directory. The relevant code lines within a local Vivado installation are:
$VIVADO_BASE/data/embeddedsw/scripts/pyesw/create_bsp.py, line 522 — invokes copy_directory
$VIVADO_BASE/data/embeddedsw/scripts/pyesw/utils.py, line 214 — implements copy_directory
A fix would likely require copy_directory to either not preserve ACLs when copying the source directory, or provide an option to strip or reset ACL metadata on the destination so that inherited ACL rules from the source filesystem are not propagated.
Summary
Building AVED fails during the firmware build step when the host system's Vivado installation has NFS ACL rules that restrict file access to a specific group. These ACLs are inherited by files created within copied directories, causing newly generated files to receive mode
000, which breaks subsequent build steps that attempt to read them.Environment
amd_v80_gen5x8_25.1_xbtest_20251113Detailed Description
During the firmware build,
fw/AMC/scripts/build_bsp.shinvokesempyro create_bsp. Among other things, this command copies thestandalone/src/common/directory from the local Vivado installation into the AVED work directory:In our shared server setup, the Vivado installation files are located on a shared NFS filesystem and owned by one of our sysadmins. To allow the other sysadmins to manage the installation, the following NFS ACL rules are set on the Vivado installation tree and are configured to be inherited by all newly created files within it:
The
copy_directorycall preserves these ACL rules on the destinationcommon/directory. Because the NFS filesystem operates on a deny-by-default model (i.e., only explicitly permitted access is granted), any file subsequently created inside that destination directory — such asfw/AMC/amc_bsp/amc_bsp/libsrc/standalone/src/common/StandaloneExample.cmake— inherits the ACL and ends up with mode000for users not in thesysadmingroup.A later step then attempts to copy
StandaloneExample.cmaketo another location, which fails because the file is unreadable for the build user. All other generated files are created inside directories that were freshly created by the AVED build scripts and therefore receive permissions normally.The immediate error manifests as a copy or read failure on:
Steps to Reproduce
A:dg:andA:fig:entries).amd_v80_gen5x8_25.1_xbtest_20251113on a filesystem that supports NFS ACL rules.fw/AMC/scripts/build_bsp.shand theempyro create_bspcommand.fw/AMC/amc_bsp/amc_bsp/libsrc/standalone/src/common/StandaloneExample.cmake(mode000).Suggested Fix
The issue originates within empyro, where the
create_bspcommand copies thestandalone/srcdirectory. The relevant code lines within a local Vivado installation are:$VIVADO_BASE/data/embeddedsw/scripts/pyesw/create_bsp.py, line 522 — invokescopy_directory$VIVADO_BASE/data/embeddedsw/scripts/pyesw/utils.py, line 214 — implementscopy_directoryA fix would likely require
copy_directoryto either not preserve ACLs when copying the source directory, or provide an option to strip or reset ACL metadata on the destination so that inherited ACL rules from the source filesystem are not propagated.