fix: Let the driver build on ArchLinux too#902
Conversation
|
Can one of the admins verify this patch? |
|
@X-Ryl669 apologies about the merge conflicts, want me to fix? |
Signed-off-by: X-Ryl669 <boite.pour.spam@gmail.com>
a154691 to
254a6f6
Compare
Signed-off-by: X-Ryl669 <boite.pour.spam@gmail.com>
…be modified by user system, not a build script Signed-off-by: X-Ryl669 <boite.pour.spam@gmail.com>
|
Thank you for your offer. I've tried to build the latest version, but I've add many issues, so it was better for me to work out how to solve them practically. I think it's OK now. There are many things to fix in XRT repository, but it's not xdna-driver business so it's for another day. I've managed to avoid changing xrt submodule, so it can be merged in this repository. |
| struct pci_dev *pdev = to_pci_dev(xdna->ddev.dev); | ||
| void __iomem *tbl[PCI_NUM_RESOURCES] = {0}; | ||
| const struct firmware *npufw, *certfw; | ||
| const struct firmware *npufw = NULL, *certfw = NULL; |
There was a problem hiding this comment.
Without this, npufw can be used uninitialized later on in the function in the error handling code and clang errors out and refuse to build.
| ) | ||
|
|
||
| set(MAKE_DRV "cd driver/${XDNA_DRV_DIR}; make ${XDNA_DRV_BLD_FLAGS_DKMS} KERNEL_SRC=\${kernel_source_dir}; cd ../..") | ||
| set(CLEAN_DRV "cd driver/${XDNA_DRV_DIR}; make clean KERNEL_SRC=\${kernel_source_dir}; cd ../..") |
There was a problem hiding this comment.
There's a constant error in Xilinx's code with dealing with PWD in DKMS build configuration. The dkms.conf MAKE and CLEAN directives aren't shell command, and they are run in their own subshell, so the PWD doesn't leak to the top subshell.
In addition, on Clang built kernel, DKMS appends USE_LLVM=1 to the given MAKE command so it must be a make command not a shell script.
There was a problem hiding this comment.
The same is true for all XRT dkms.conf.in files that all present the same issue. Hopefully, they aren't used in this repository for this driver so it's hidden under the rug.
|
ok to test |
The current main branch doesn't build on Arch linux (and all other derived distributions).
Please notice that Arch linux is very barebone, so this PR is also useful for any linux from scratch distributions.
The required changes are small, but painful to apply as a patch since it implies ever evolving submodule hashes for xrt.
It would a be a lot easier if these changes were merged in.
Description of the changes:
casebranch)