ARM-software / bsa-acs

Arm SystemReady : BSA Architecture Compliance Suite
Apache License 2.0
17 stars 42 forks source link

./linux_bsa_acs.sh failed #282

Closed QTAQ closed 4 months ago

QTAQ commented 5 months ago

Hi! I am building bsa-acs following the README says:

1. build linux kernel with bsa-acs patch.

when doing this, compile is failed. reason is that drivers/iommu/bsa-dma-iommu.c has include dma-iommu.h, but the code is include Is that bsa-dma-iommu.c wants to include dma-iommu.h in /drivers/iommu ? So this should be include "dma-iommu.h" After modify this include, compile will success.

2. build bsa-acs.ko

compile is success, but modpost is failed: bsa_acs_pal.o: ERROR: modpost: missing MODULE_LICENSE() in /root/linux-acs/acs-drv/files/platform/pal_linux/files/bsa_acs_pal.o ERROR: modpost: "g_print_level" [/root/linux-acs/acs-drv/files/platform/pal_linux/files/bsa_acs_pal.ko] undefined!

bsa_acs_val.o: ERROR: modpost: missing MODULE_LICENSE() in /root/linux-acs/acs-drv/files/val/bsa_acs_val.o ERROR: modpost: "pal_mem_virt_to_phys" [/root/linux-acs/acs-drv/files/val/bsa_acs_val.ko] undefined! ERROR: modpost: "g_num_tests" [/root/linux-acs/acs-drv/files/val/bsa_acs_val.ko] undefined! WARNING: modpost: suppressed 88 unresolved symbol warnings because there were too many)

This seems to be an issue with the build order? Or perhaps a problem with modpost?

chetan-rathore commented 5 months ago

Hi @QTAQ,

We have updated the header file changes in the kernel patch based on 6.8 version, which is latest supported at our side. https://gitlab.arm.com/linux-arm/linux-acs/-/blame/master/kernel/src/0001-BSA-ACS-Linux-6.8.patch?ref_type=heads#L103

The modpost related error/warning can be ignored, BSA or SBSA kernel module compilation have intermediate steps of compiling pal, val and test layers. The undefined warning are for functions which are defined in other layer. The final compilation steps of kernel module generation should not have any undefined.

Please try to build with latest kernel v6.8, READMe updated with the required steps.

Thanks, ACS team

chetan-rathore commented 4 months ago

Hi @QTAQ,

Please reopen the issue, if any build issues faced with linux 6.8 bsa linux acs compilation.

Thanks, ACS team