Skip to content

Build failure due to inherited NFS ACL rules during empyro create_bsp #26

@JOOpdenhoevel

Description

@JOOpdenhoevel

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

  1. 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).
  2. Check out AVED at tag amd_v80_gen5x8_25.1_xbtest_20251113 on a filesystem that supports NFS ACL rules.
  3. Run the firmware build, which triggers fw/AMC/scripts/build_bsp.sh and the empyro create_bsp command.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions