I'm trying to build the amdgpu-dkms kernel module in Ubuntu 22.04 for MI100 GPU. I download the `.deb` file from https://repo.radeon.com/amdgpu/6.0/ubuntu/pool/main/a/amdgpu-dkms/amdgpu-dkms_6.3.6.60000-1697589.22... and extract the corresponding source code then execute the dkms build:
dkms build -m amdgpu -v 6.3.6-1697589.22.04 --sourcetree=`pwd` --dkmstree=/mnt/data0/tmp/rocm.6.0.0
But the generated error is:
Building module:
cleaning build area...(bad exit status: 2)
make -j256 KERNELRELEASE=5.15.0-89-generic TTM_NAME=amdttm SCHED_NAME=amd-sched -C /lib/modules/5.15.0-89-generic/build M=/mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build......(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.0-89-generic (x86_64)
Consult /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build/make.log for more information.
And when I open the build log it shows:
CC [M] /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build/amd/amdgpu/../display/modules/hdcp/hdcp1_transition.o
CC [M] /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build/amd/amdgpu/../display/modules/hdcp/hdcp2_execution.o
CC [M] /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build/amd/amdgpu/../display/modules/hdcp/hdcp2_transition.o
CC [M] /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build/amd/amdgpu/../backport/kcl_drm_drv.o
CC [M] /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build/amd/amdgpu/../backport/kcl_drm_gem_ttm_helper.o
CC [M] /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build/amd/amdgpu/../backport/kcl_drm_gem.o
make[2]: /bin/sh: Argument list too long
make[2]: *** [scripts/Makefile.build:494: /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build/amd/amdgpu/amdgpu.o] Error 127
make[1]: *** [scripts/Makefile.build:560: /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build/amd/amdgpu] Error 2
make: *** [Makefile:1909: /mnt/data0/tmp/rocm.6.0.0/amdgpu/6.3.6-1697589.22.04/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.0-89-generic'
There is no clear error so I'm confused how to fix this. Is there any instructions? Thanks in advance.