Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Not compile in kernel 5.10.0-8-amd64 debian bullseye #76

Open
JudaRails opened this issue Aug 4, 2021 · 5 comments
Open

[BUG] Not compile in kernel 5.10.0-8-amd64 debian bullseye #76

JudaRails opened this issue Aug 4, 2021 · 5 comments

Comments

@JudaRails
Copy link

Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

Device identify:
Bus 001 Device 014: ID 1d5c:2000 Fresco Logic FL2000/FL2000DX VGA/DVI/HDMI Adapter

TRACEBACK:

make -C /usr/src/linux-headers-uname -r M=/home/Escritorio/FL2000/src modules
make[1]: se entra en el directorio '/usr/src/linux-headers-5.10.0-8-amd64'
CC [M] /home/Escritorio/FL2000/src/fl2000_module.o
CC [M] /home/Escritorio/FL2000/src/fl2000_bulk.o
CC [M] /home/Escritorio/FL2000/src/fl2000_ioctl.o
CC [M] /home/Escritorio/FL2000/src/fl2000_render.o
CC [M] /home/Escritorio/FL2000/src/fl2000_dev.o
CC [M] /home/Escritorio/FL2000/src/fl2000_dongle.o
CC [M] /home/Escritorio/FL2000/src/fl2000_big_table.o
CC [M] /home/Escritorio/FL2000/src/fl2000_i2c.o
CC [M] /home/Escritorio/FL2000/src/fl2000_register.o
CC [M] /home/Escritorio/FL2000/src/fl2000_monitor.o
CC [M] /home/Escritorio/FL2000/src/fl2000_desc.o
CC [M] /home/Escritorio/FL2000/src/fl2000_interrupt.o
CC [M] /home/Escritorio/FL2000/src/fl2000_compression.o
CC [M] /home/Escritorio/FL2000/src/fl2000_surface.o
/home/Escritorio/FL2000/src/fl2000_surface.c: In function ‘fl2000_surface_pin_down’:
/home/Escritorio/FL2000/src/fl2000_surface.c:109:28: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
109 | down_read(&current->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/home/Escritorio/FL2000/src/fl2000_surface.c:115:26: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
115 | up_read(&current->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/home/Escritorio/FL2000/src/fl2000_surface.c:129:27: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
129 | down_read(&current->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/home/Escritorio/FL2000/src/fl2000_surface.c:144:25: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
144 | up_read(&current->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/home/Escritorio/FL2000/src/fl2000_surface.c: In function ‘fl2000_surface_map’:
/home/Escritorio/FL2000/src/fl2000_surface.c:228:28: error: too many arguments to function ‘vm_map_ram’
228 | surface->mapped_buffer = vm_map_ram(
| ^~~~~~~~~~
In file included from /home/Escritorio/FL2000/src/fl2000_include.h:30,
from /home/Escritorio/FL2000/src/fl2000_surface.c:8:
/usr/src/linux-headers-5.10.0-8-common/include/linux/vmalloc.h:87:14: note: declared here
87 | extern void *vm_map_ram(struct page **pages, unsigned int count, int node);
| ^~~~~~~~~~
make[3]: *** [/usr/src/linux-headers-5.10.0-8-common/scripts/Makefile.build:284: /home/Escritorio/FL2000/src/fl2000_surface.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.10.0-8-common/Makefile:1845: /home/Escritorio/FL2000/src] Error 2
make[1]: *** [/usr/src/linux-headers-5.10.0-8-common/Makefile:185: __sub-make] Error 2
make[1]: se sale del directorio '/usr/src/linux-headers-5.10.0-8-amd64'
make: *** [Makefile:41: all] Error 2

@JudaRails
Copy link
Author

Compile change fl2000_surface.c
diff_kernel_5.10.0-8-amd64.txt

@dowglaz
Copy link

dowglaz commented Oct 21, 2021

Hi @JudaRails! Thanks for the diff!! It really worked the compilation here in debian 11 bulleye with linux kernel 5.10.9. Although, it's still not working when I run the fltest.

I made the sudo insmod fl2000.ko to install the module into the kernel and then, I cwd-ed to the directory samples. Compiled main.c to fltest (using make) and the tests failed (probably because it's trying to use modules from arm and I'm not using arm cpu). After that, I ran sudo ./fltest 0 and didn't worked. I also tried sudo ./fltest 0 1920 1080 and it just disconnected all of my usb drivers (I had to restart the system to use it again).

The output of sudo ./fltest 0 is:
image

@oinklulu
Copy link

I met as like as two peas, hoping to solve it and look forward to it!

@emb3dd3d
Copy link

Compile change fl2000_surface.c diff_kernel_5.10.0-8-amd64.txt

very noob here.. how do you apply the diff file please?? it would be nice to get this going. I haven't dealt with compiling in years and was a noob then. any help would be appreciated.

@emb3dd3d
Copy link

nevermind.. googled and found the patch command. I learned something new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants