fl2000_drm icon indicating copy to clipboard operation
fl2000_drm copied to clipboard

compiling on 5.12

Open joni909 opened this issue 3 years ago • 9 comments

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

joni909 avatar Jun 30 '21 11:06 joni909

same here

AndersonOli avatar Aug 17 '21 03:08 AndersonOli

same here, with 5.14.2-arch1-2

felipejoribeiro avatar Sep 15 '21 22:09 felipejoribeiro

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

Skippythekangoo avatar Nov 30 '21 08:11 Skippythekangoo

Same here :,( Please, fix that!

kernel: 5.15.5-arch1-1

image

See this error in text:
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

MBaltz avatar Dec 01 '21 03:12 MBaltz

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

Vini98br avatar Jul 14 '22 22:07 Vini98br

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

mati75 avatar Jul 18 '22 14:07 mati75

@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

Vini98br avatar Jul 18 '22 15:07 Vini98br

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

shanez1215 avatar Aug 06 '22 21:08 shanez1215

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.

petereon avatar Dec 16 '23 20:12 petereon