Nvidia dkms not support kernel when mannuly compile 5.15.65-rt49 / 5.10.140-rt73 kernel

Yes, I found the /lib/modules/5.10.140-rt73/build points to my kernel build directory where the command make module_install runs. The nividia driver sources are located at /var/lib/dkms/nvidia/510.85.02 I found the var $(src) in makefile of nvidia/510.85.02 is empty at runtime, so that cannot find nvidia’s Kbuild files, which also located at /var/lib/dkms/nvidia/510.85.02. Since this reason, I copy the nvidia driver sources to arch/x86/boot/ in my kernel build directory, and finally can compile. But it warns that nvidia driver not supports PREEMPT_RT kernel. I set IGNORE_PREEMPT_RT_PRESENCE=1 to avoid this error. After all these steps, the nvidia driver as well as the new kernel is compiled. But it is stuck at black screen when I restart the computer. The screen freezes in Loading initial ramdisk. Which step did I goes to wrong ?