Package Details: fl2000-dkms r16.92da04a-1

Git Clone URL: https://aur.archlinux.org/fl2000-dkms.git (read-only, click to copy)
Package Base: fl2000-dkms
Description: Fresco Logic FL2000 USB to VGA adapter driver
Upstream URL: https://github.com/FrescoLogic/FL2000
Licenses: GPL
Submitter: sergej
Maintainer: sergej
Last Packager: sergej
Votes: 0
Popularity: 0.000000
First Submitted: 2019-07-31 12:31
Last Updated: 2019-07-31 12:31

Dependencies (5)

Required by (0)

Sources (2)

Latest Comments

hcar commented on 2021-04-18 09:59

To build the module, the following must be changed.

1) In dkms.conf.in, replace "SUBDIRS=" by "M=".

2) Use this patch:

--- src/FL2000/src/fl2000_surface.c 2021-04-18 09:35:45.961838990 +0200
+++ fl2000_surface.c    2021-04-18 11:07:22.875338507 +0200
@@ -106,13 +106,13 @@
    case SURFACE_TYPE_VIRTUAL_FRAGMENTED_VOLATILE:
    case SURFACE_TYPE_VIRTUAL_FRAGMENTED_PERSISTENT:
        while (surface->pages_pinned != nr_pages) {
-           down_read(&current->mm->mmap_sem);
+           mmap_read_lock(current->mm);
            pages_pinned = fl2000_get_user_pages(
                surface->user_buffer,
                nr_pages,
                pages,
                NULL);
-           up_read(&current->mm->mmap_sem);
+           mmap_read_unlock(current->mm);
            if (pages_pinned <= 0) {
                dbg_msg(TRACE_LEVEL_ERROR, DBG_PNP,
                    "get_user_pages fails with %d\n", pages_pinned);
@@ -126,7 +126,7 @@
        break;

    case SURFACE_TYPE_VIRTUAL_CONTIGUOUS:
-       down_read(&current->mm->mmap_sem);
+       mmap_read_lock(current->mm);
        /*
         * work-around the user memory which is mapped from driver,
         * but with VM_IO, VM_PFNMAP flags. This API assumes the mmaped user addr
@@ -141,7 +141,7 @@
            pages,
            NULL);
        vma->vm_flags = old_flags;
-       up_read(&current->mm->mmap_sem);
+       mmap_read_unlock(current->mm);
        if (pages_pinned <= 0) {
            dbg_msg(TRACE_LEVEL_ERROR, DBG_PNP,
                "get_user_pages fails with %d\n", pages_pinned);
@@ -228,8 +228,7 @@
        surface->mapped_buffer = vm_map_ram(
            surface->pages,
            surface->nr_pages,
-           -1,
-           PAGE_KERNEL);
+           -1);
        if (surface->mapped_buffer == NULL) {
            dbg_msg(TRACE_LEVEL_ERROR, DBG_PNP, "vm_map_ram failed?");
            ret_val = -ENOMEM;

3) Use this code in PKGBUILD:

[...]
source=("git+https://github.com/FrescoLogic/FL2000.git"
        'dkms.conf.in'
        'fl2000_surface.c.patch')
md5sums=('SKIP'
         'a6a65b80b87407cde3a35436b2a52907'
         'c7e1452fbeb35b500e1e489eac07540b')

package() {
    patch "${srcdir}"/FL2000/src/fl2000_surface.c < "${srcdir}"/fl2000_surface.c.patch
    install -dm755 "${pkgdir}/var/lib/dkms/fl2000/${pkgver}/source"
    sed -i "s/^KERNEL_PATH.*/KERNEL_PATH = \/usr\/lib\/modules\/\`uname -r\`\/build/" "${srcdir}"/FL2000/src/Makefile
    sed -i "s/PWD/shell pwd/" "${srcdir}"/FL2000/src/Makefile
    cp -a "${srcdir}"/FL2000/src/* "${pkgdir}"/var/lib/dkms/fl2000/${pkgver}/source
    sed "s/#MODULE_VERSION#/${pkgver}/" "${srcdir}/dkms.conf.in" > "${pkgdir}/var/lib/dkms/fl2000/${pkgver}/source/dkms.conf"
}

eduardosm commented on 2021-01-04 13:48

Module fails to compile

==> dkms install --no-depmod -m fl2000 -v r23.2fc7b1b -k 5.9.16-1-MANJARO
Error! Bad return status for module build on kernel: 5.9.16-1-MANJARO (x86_64)

senya commented on 2020-08-15 08:55

This package name must end with -git as its versioning is based on git revision