amshafer / nvidia-driver

Fork of the Nvidia FreeBSD driver to port the nvidia-drm.ko module from Linux
43 stars 5 forks source link

fatal error: 'linux/i2c.h' file not found #4

Closed v0vas closed 1 year ago

v0vas commented 1 year ago

Hi!

Try to make and make install nvidia driver

/root/git/drm-kmod/linuxkpi/gplv2/include/uapi/linux/fb.h:5:10: fatal error: 'linux/i2c.h' file not found
#include <linux/i2c.h>
         ^~~~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /root/git/nvidia-driver/nvidia/src/nvidia-drm
*** Error code 1

Stop.
make[1]: stopped in /root/git/nvidia-driver/nvidia/src
*** Error code 1
amshafer commented 1 year ago

Could you please provide some more info? Mainly:

I'm guessing this is an issue with your /usr/src, but hard to know without more details.

v0vas commented 1 year ago

FreeBSD 13.1 version

root@beast:/usr/src # git branch releng/13.1 root@beast:/usr/src # uname -a FreeBSD beast 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64

drm-kmod downloaded from here https://github.com/freebsd/drm-kmod

Also installed packages

pkg info | grep drm drm-510-kmod-5.10.113_8 DRM drivers modules drm-kmod-20220907_1 Metaport of DRM modules for the linuxkpi-based KMS components gpu-firmware-kmod-20221207_1,1 Firmware modules for the drm-kmod drivers libdrm-2.4.114,1 Userspace interface to kernel Direct Rendering Module services

BSDSRCTOP or DRMKMODDIR didn't enter. I don't understant where I should put this evn, sorry I'm newbie.

amshafer commented 1 year ago

Okay it looks like you checked everything out into the correct places.

Could you:

BSDSRCTOP or DRMKMODDIR didn't enter. I don't understant where I should put this evn, sorry I'm newbie.

No worries here :) These would be specified on the command line usually, in this case it's just helpful to know you aren't using them. (for more details look up "environment variables")

v0vas commented 1 year ago

Hi! No, I've checked out master branch

root@beast:~/git/drm-kmod # git branch -vv master 7004539b8b [origin/master] scripts/drmcheckapplied: Make script executa

So, I've recheck branch to 5.10-lts git clone -b 5.10-lts --depth 1 https://github.com/freebsd/drm-kmod.git and now it build and install fine! Thanks for help!

amshafer commented 1 year ago

(You can always change branches with git checkout -b <local_name_for_the_branch> origin/<remote_branch_name> if you don't want to reclone and redownload)

Glad it's working, marking this as closed