PACKAGE_NAME="amdgpu" PACKAGE_VERSION="1.0" AUTOINSTALL="yes" PRE_BUILD="amd/dkms/pre-build.sh $kernelver" # not work with RHEL DKMS #MODULES_CONF[0]="blacklist radeon" BUILT_MODULE_NAME[0]="amdgpu" BUILT_MODULE_LOCATION[0]="amd/amdgpu" DEST_MODULE_LOCATION[0]="/kernel/drivers/gpu/drm/amd/amdgpu" BUILT_MODULE_NAME[1]="amdttm" BUILT_MODULE_LOCATION[1]="ttm" DEST_MODULE_LOCATION[1]="/kernel/drivers/gpu/drm/ttm" BUILT_MODULE_NAME[2]="amdkcl" BUILT_MODULE_LOCATION[2]="amd/amdkcl" DEST_MODULE_LOCATION[2]="/kernel/drivers/gpu/drm/amd/amdkcl" BUILT_MODULE_NAME[3]="amd-sched" BUILT_MODULE_LOCATION[3]="scheduler" DEST_MODULE_LOCATION[3]="/kernel/drivers/gpu/drm/scheduler" BUILT_MODULE_NAME[4]="amddrm_ttm_helper" BUILT_MODULE_LOCATION[4]="." DEST_MODULE_LOCATION[4]="/kernel/drivers/gpu/drm" # Find out how many CPU cores can be use if we pass appropriate -j option to make. # DKMS could use all cores on multicore systems to build the kernel module. num_cpu_cores() { if [ -x /usr/bin/nproc ]; then nproc else echo "1" fi } MAKE[0]="make -j$(num_cpu_cores) TTM_NAME=${BUILT_MODULE_NAME[1]} \ SCHED_NAME=${BUILT_MODULE_NAME[3]} \ -C $kernel_source_dir \ M=$dkms_tree/$module/$module_version/build"