Acceleport 8r920-PCI on Fedora 18 - Works with tweaking

Hi,

First of all, thank you Digi for the continued unofficial linux support. I could not work without my card, so I try hard to keep it going. I just got it back with Fedora 18 (kernel 3.6.10-4.fc18.i686.PAE1) and wanted to report how.

  1. Got the ‘beta’ driver from ftp://ftp1.digi.com/support/beta/linux/dgap/dgap-1.3-22.src.rpm

  2. rpm -Uvh dgap-1.3-22.src.rpm to get the tarball in ~/rpmbuild/SOURCES and the spec file in ~/rpmbuild/SPECS

  3. First issue, there is a missing BuildRequires for ncurses-devel, so as root, yum install ncurses-devel and add a line in dgap-1.3.spec under BuildRoot:

BuildRequires: ncurses-devel

  1. Second issue, the configure script looks for the kernel headers in /usr/src/linux-$(uname -r), but on newer distros like Fedora and Mandriva, the kernel-devel rpm puts them in /usr/src/kernels/$(uname -r). Put the attached dgap-kernsrc.patch in ~/rpmbuild/SOURCES and modify dgap-1.3.spec by:
  • Changing the Release to something more obvious, I used 22.3.6.10.4.fc18
  • Adding a line under Source like: Patch0: dgap-kernsrc.patch
  • Adding a line in %setup: %patch0 -p1
  1. With these changes, the rpm should compile:
    rpmbuild -ba dgap-1.3.spec

And the resulting file should install with:
sudo yum install ~/rpmbuild/RPMS/i686/dgap-1.3-22.3.6.10.4.fc18.i686.rpm

  1. If you try to start the service as-is, udev complains with:
    “kernel device nodes can not be renamed”.
    I modified /etc/udev/rules.d/10-dgap.rules that way, which creates symlinks, sets the group to dialout for the serial ports and the permission to rw for this group:

-KERNEL==“tty_dgap*”, PROGRAM=“/usr/sbin/dgap_udev %k”, NAME=“%c”, OPTIONS+=“last_rule”
-KERNEL==“pr_dgap*”, PROGRAM=“/usr/sbin/dgap_udev %k”, NAME=“%c”, OPTIONS+=“last_rule”
+KERNEL==“tty_dgap*”, PROGRAM=“/usr/sbin/dgap_udev %k”, SYMLINK+=“%c”, GROUP=“dialout”, MODE=“0660”, OPTIONS+=“last_rule”
+KERNEL==“pr_dgap*”, PROGRAM=“/usr/sbin/dgap_udev %k”, SYMLINK+=“%c”, OPTIONS+=“last_rule”

This could also be set as a patch in the kernel build (the rule file is in the tarball’s config directory), so you do not have to do that every time.

  1. There were numerous lines of modem-manager issues while I was fiddling with the setup, so I removed the ModemManager rpm since I do not use it. That may not be necessary when dgap is setup properly.

With these changes, things are apparently working. It would be nice if someone could relay these observations to the devs.

1 Like

Here are all the warnings from the build:

CC [M] /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_driver.o
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_driver.c: In function ‘dgap_mbuf’:
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_driver.c:984:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
CC [M] /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_fep5.o
In file included from /usr/src/kernels/3.6.10-4.fc18.i686.PAE/arch/x86/include/asm/uaccess.h:584:0,
from /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_fep5.c:40:
In function ‘copy_from_user’,
inlined from ‘dgap_usertoboard’ at /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_fep5.c:160:21:
/usr/src/kernels/3.6.10-4.fc18.i686.PAE/arch/x86/include/asm/uaccess_32.h:211:26: warning: call to ‘copy_from_user_overflow’ declared with attribute warning: copy_from_user() buffer size is not provably correct [enabled by default]
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_fep5.c: In function ‘dgap_usertoboard’:
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_fep5.c:174:1: warning: the frame size of 1036 bytes is larger than 1024 bytes [-Wframe-larger-than=]
In file included from /usr/src/kernels/3.6.10-4.fc18.i686.PAE/arch/x86/include/asm/uaccess.h:584:0,
from /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_fep5.c:40:
In function ‘copy_from_user’,
inlined from ‘dgap_do_config_load’ at /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_fep5.c:90:21:
/usr/src/kernels/3.6.10-4.fc18.i686.PAE/arch/x86/include/asm/uaccess_32.h:211:26: warning: call to ‘copy_from_user_overflow’ declared with attribute warning: copy_from_user() buffer size is not provably correct [enabled by default]
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_fep5.c: In function ‘dgap_do_config_load’:
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_fep5.c:111:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
CC [M] /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_mgmt.o
CC [M] /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_parse.o
CC [M] /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_proc.o
In file included from /usr/src/kernels/3.6.10-4.fc18.i686.PAE/arch/x86/include/asm/uaccess.h:584:0,
from /usr/src/kernels/3.6.10-4.fc18.i686.PAE/arch/x86/include/asm/sections.h:5,
from /usr/src/kernels/3.6.10-4.fc18.i686.PAE/arch/x86/include/asm/hw_irq.h:26,
from include/linux/irq.h:361,
from /usr/src/kernels/3.6.10-4.fc18.i686.PAE/arch/x86/include/asm/hardirq.h:5,
from include/linux/hardirq.h:7,
from include/linux/interrupt.h:12,
from /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_proc.c:37:
In function ‘copy_from_user’,
inlined from ‘dgap_write_info’ at /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_proc.c:636:20:
/usr/src/kernels/3.6.10-4.fc18.i686.PAE/arch/x86/include/asm/uaccess_32.h:211:26: warning: call to ‘copy_from_user_overflow’ declared with attribute warning: copy_from_user() buffer size is not provably correct [enabled by default]
CC [M] /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_trace.o
CC [M] /home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_tty.o
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_tty.c:146:2: warning: initialization from incompatible pointer type [enabled by default]
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_tty.c:146:2: warning: (near initialization for ‘dgap_tty_ops.ioctl’) [enabled by default]
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_tty.c:154:2: warning: initialization from incompatible pointer type [enabled by default]
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_tty.c:154:2: warning: (near initialization for ‘dgap_tty_ops.tiocmget’) [enabled by default]
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_tty.c:155:2: warning: initialization from incompatible pointer type [enabled by default]
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_tty.c:155:2: warning: (near initialization for ‘dgap_tty_ops.tiocmset’) [enabled by default]
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_tty.c: In function ‘dgap_sniff_nowait_nolock’:
/home/sfo/rpmbuild/BUILD/dgap-1.3/driver/build/dgap_tty.c:654:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Hello,

Can you make the file: dgap-kernsrc.patch available? I cannot see it on the forum.

Thanks,