klogg / fl2000_drm

Linux kernel FL2000DX/IT66121FN dongle DRM driver
GNU General Public License v2.0
113 stars 30 forks source link

compiling on 5.12 #47

Open joni909 opened 3 years ago

joni909 commented 3 years ago

compiling on 5.12 resulted in this in the terminal (it didn't pass the make phase)

~/D/fl2000_drm-master> make make CHECK="/usr/bin/sparse" -C /lib/modules/5.12.13-1-MANJARO/build M=/home/joni909/Downloads/fl2000_drm-master modules

make[1]: Entering directory '/usr/lib/modules/5.12.13-1-MANJARO/build' CC [M] /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.o /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c: In function ‘fl2000_gem_prime_import_sg_table’: /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:234:15: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration]

234 | ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages); | ^~~~~~~~ | drm_prime_sg_to_dma_addr_array /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c: At top level: /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:270:17: error: initialization of ‘int ()(struct drm_gem_object , struct dma_buf_map )’ from incompatible pointer type ‘void ()(struct drm_gem_object )’ [-Werror=incompatible-pointer- types]

270 | .vmap = fl2000_gem_prime_vmap, | ^~~~~ /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:270:17: note: (near initialization for ‘fl2000_gem_default_funcs.vmap’) /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:271:19: error: initialization of ‘void ()(struct drm_gem_object , struct dma_buf_map )’ from incompatible pointer type ‘void ()(struct drm_gem_object , void )’ [-Werror=incompatible-pointer-types]

271 | .vunmap = fl2000_gem_prime_vunmap, | ^~~~~~~ /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:271:19: note: (near initialization for ‘fl2000_gem_default_funcs.vunmap’) cc1: some warnings being treated as errors

make[2]: [scripts/Makefile.build:271: /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.o] Error 1 make[1]: [Makefile:1859: /home/joni909/Downloads/fl2000_drm-master] Error 2 make[1]: Leaving directory '/usr/lib/modules/5.12.13-1-MANJARO/build' make: *** [Makefile:21: modules] Error 2

AndersonOli commented 3 years ago

same here

felipejoribeiro commented 3 years ago

same here, with 5.14.2-arch1-2

Skippythekangoo commented 2 years ago

A same issue...

$ LANG=en_US.UTF-8 make make CHECK="/usr/bin/sparse" -C /lib/modules/5.14.16-arch1-1/build M=/home/skippy/Documents/Yay_AUR/fl2000_drm modules make[1]: Entering directory '/usr/lib/modules/5.14.16-arch1-1/build' CC [M] /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.o /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c: In function ‘fl2000_gem_prime_import_sg_table’: /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:234:15: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration] 234 | ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages); | ^~~~~~~~ | drm_prime_sg_to_dma_addr_array /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c: At top level: /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:270:17: error: initialization of ‘int ()(struct drm_gem_object , struct dma_buf_map )’ from incompatible pointer type ‘void ()(struct drm_gem_object )’ [-Werror=incompatible-pointer-types] 270 | .vmap = fl2000_gem_prime_vmap, | ^~~~~ /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:270:17: note: (near initialization for ‘fl2000_gem_default_funcs.vmap’) /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:271:19: error: initialization of ‘void ()(struct drm_gem_object , struct dma_buf_map )’ from incompatible pointer type ‘void ()(struct drm_gem_object , void )’ [-Werror=incompatible-pointer-types] 271 | .vunmap = fl2000_gem_prime_vunmap, | ^~~~~~~ /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:271:19: note: (near initialization for ‘fl2000_gem_default_funcs.vunmap’) cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:271: /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.o] Error 1 make[1]: [Makefile:1858: /home/skippy/Documents/Yay_AUR/fl2000_drm] Error 2 make[1]: Leaving directory '/usr/lib/modules/5.14.16-arch1-1/build' make: *** [Makefile:21: modules] Error 2

MBaltz commented 2 years ago

Same here :,( Please, fix that!

kernel: 5.15.5-arch1-1

image

See this error in text: ```bash make CHECK="/usr/bin/sparse" -C /lib/modules/5.15.5-arch1-1/build M=/tmp/b/fl2000_drm modules make[1]: Entrando no diretório '/usr/lib/modules/5.15.5-arch1-1/build' CC [M] /tmp/b/fl2000_drm/fl2000_drv.o CC [M] /tmp/b/fl2000_drm/fl2000_registers.o CC [M] /tmp/b/fl2000_drm/fl2000_interrupt.o CC [M] /tmp/b/fl2000_drm/fl2000_streaming.o CC [M] /tmp/b/fl2000_drm/fl2000_i2c.o CC [M] /tmp/b/fl2000_drm/fl2000_gem.o /tmp/b/fl2000_drm/fl2000_gem.c: In function ‘fl2000_gem_prime_import_sg_table’: /tmp/b/fl2000_drm/fl2000_gem.c:234:15: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration] 234 | ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | drm_prime_sg_to_dma_addr_array /tmp/b/fl2000_drm/fl2000_gem.c: At top level: /tmp/b/fl2000_drm/fl2000_gem.c:270:17: error: initialization of ‘int (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void * (*)(struct drm_gem_object *)’ [-Werror=incompatible-pointer-types] 270 | .vmap = fl2000_gem_prime_vmap, | ^~~~~~~~~~~~~~~~~~~~~ /tmp/b/fl2000_drm/fl2000_gem.c:270:17: note: (near initialization for ‘fl2000_gem_default_funcs.vmap’) /tmp/b/fl2000_drm/fl2000_gem.c:271:19: error: initialization of ‘void (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void (*)(struct drm_gem_object *, void *)’ [-Werror=incompatible-pointer-types] 271 | .vunmap = fl2000_gem_prime_vunmap, | ^~~~~~~~~~~~~~~~~~~~~~~ /tmp/b/fl2000_drm/fl2000_gem.c:271:19: note: (near initialization for ‘fl2000_gem_default_funcs.vunmap’) cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:277: /tmp/b/fl2000_drm/fl2000_gem.o] Erro 1 make[1]: *** [Makefile:1868: /tmp/b/fl2000_drm] Erro 2 make[1]: Saindo do diretório '/usr/lib/modules/5.15.5-arch1-1/build' make: *** [Makefile:21: modules] Erro 2 ```
Vini98br commented 2 years ago

Same here

OS: pop-os 21.04 kernel: 5.15.11-76051511-generic

image

See in text:
make CHECK="/usr/bin/sparse" -C /lib/modules/5.15.11-76051511-generic/build M=/home/vinicius/Downloads/fl2000_drm-master modules make[1]: Entering directory '/usr/src/linux-headers-5.15.11-76051511-generic' CC [M] /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.o /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c: In function ‘fl2000_gem_prime_import_sg_table’: /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:234:8: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration] 234 | ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | drm_prime_sg_to_dma_addr_array /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c: At top level: /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:270:10: error: initialization of ‘int (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void * (*)(struct drm_gem_object *)’ [-Werror=incompatible-pointer-types] 270 | .vmap = fl2000_gem_prime_vmap, | ^~~~~~~~~~~~~~~~~~~~~ /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:270:10: note: (near initialization for ‘fl2000_gem_default_funcs.vmap’) /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:271:12: error: initialization of ‘void (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void (*)(struct drm_gem_object *, void *)’ [-Werror=incompatible-pointer-types] 271 | .vunmap = fl2000_gem_prime_vunmap, | ^~~~~~~~~~~~~~~~~~~~~~~ /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:271:12: note: (near initialization for ‘fl2000_gem_default_funcs.vunmap’) cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:277: /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.o] Error 1 make[1]: *** [Makefile:1874: /home/vinicius/Downloads/fl2000_drm-master] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.15.11-76051511-generic' make: *** [Makefile:21: modules] Error 2
mati75 commented 2 years ago

Fix: https://github.com/rhgndf/fl2000_drm/commit/7be98c3bc37286a768ef7fd72b2df328cf9779a6

Vini98br commented 2 years ago

@mati75 this commit fixed the make command errors but when running the next command of the tutorial: insmod fl2000.ko && insmod it66121.ko, it gave me the following error:

image

And when running only sudo insmod it66121.ko it crashed my entire computer

As my computer crashed I cant show the make command log when i first ran it, but when i run it now, it logs it:

image

shanez1215 commented 2 years ago

This happened to me too

@mati75 this commit fixed the make command errors but when running the next command of the tutorial: insmod fl2000.ko && insmod it66121.ko, it gave me the following error:

image

And when running only sudo insmod it66121.ko it crashed my entire computer

As my computer crashed I cant show the make command log when i first ran it, but when i run it now, it logs it:

image

petereon commented 11 months ago

Whoops, only reading this now 😅 Apologies to everyone whose computer has crashed on my behalf. I've only made this to compile. This was achieved by including guards around few key functions which have been deprecated in 5.12 and then life got in the way of properly figuring out their replacements.