Building OSS modules for 3.8.0 Linux Kernel

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

Building OSS modules for 3.8.0 Linux Kernel

Postby seawright » Sat May 04, 2013 2:34 pm

Since upgrading my kernel from 3.5.0 to 3.8.0 I have not been able to build sound card specific kernel modules. Any attempt to build them results in the following error:
Code: Select all
OSS build environment set up for REGPARM kernels

Building module osscore
Building module oss_atiaudio
Compiling module oss_atiaudio failed
make[1]: Entering directory `/usr/lib/oss/build'
make -C /lib/modules/3.8.0-19-generic/build M=/usr/lib/oss/build modules
make[2]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
  CC [M]  /usr/lib/oss/build/oss_atiaudio.o
In file included from /usr/lib/oss/build/module.inc:45:0,
                 from /usr/lib/oss/build/oss_atiaudio.c:23:
/usr/lib/oss/build/pci_wrapper.inc:21:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘osspci_probe’
/usr/lib/oss/build/pci_wrapper.inc:69:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘osspci_remove’
In file included from /usr/lib/oss/build/oss_atiaudio.c:23:0:
/usr/lib/oss/build/module.inc:51:12: error: ‘osspci_probe’ undeclared here (not in a function)
/usr/lib/oss/build/module.inc:52:13: error: ‘osspci_remove’ undeclared here (not in a function)
In file included from /usr/lib/oss/build/oss_atiaudio.c:23:0:
/usr/lib/oss/build/module.inc:33:12: warning: ‘instance’ defined but not used [-Wunused-variable]
In file included from /usr/lib/oss/build/module.inc:45:0,
                 from /usr/lib/oss/build/oss_atiaudio.c:23:
/usr/lib/oss/build/pci_wrapper.inc:17:18: warning: ‘dev_map’ defined but not used [-Wunused-variable]
/usr/lib/oss/build/pci_wrapper.inc:18:12: warning: ‘n_devmap’ defined but not used [-Wunused-variable]
make[3]: *** [/usr/lib/oss/build/oss_atiaudio.o] Error 1
make[2]: *** [_module_/usr/lib/oss/build] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/usr/lib/oss/build'

From the above is anyone able to see what I am doing wrong?

If not could they suggest the best way forward to diagnose this problem?
regards
Clive
seawright
Member
 
Posts: 88
Joined: Sat Jan 06, 2007 9:10 pm
Location: Hampshire UK

Re: Building OSS modules for 3.8.0 Linux Kernel

Postby nuc » Sat May 04, 2013 11:46 pm

Something changed in Linux 3.8, that requires a patch for building OSS. See https://projects.archlinux.org/svntogit ... ckages/oss
nuc
Moderator
 
Posts: 96
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: Onboard VIA VT2020
OS: ArchLinux

Re: Building OSS modules for 3.8.0 Linux Kernel

Postby Matti » Sun May 05, 2013 3:07 pm

I've had that problem when 3.8 was in development and cesium the moderator of this forum posted a patch and instructions how to use it either when building new oss4 package or applying to the one already installed.

OSS modules won't build Kernel 3.8-rc6

NOTE: The file posted by nuc is exactly the same as patch provided by cesium. Also I'm now using Kernel 3.9 from Ubuntu Mainline Kernel PPA and Open Sound System still works.
Matti
Member
 
Posts: 39
Joined: Sun May 29, 2011 12:34 pm

Re: Building OSS modules for 3.8.0 Linux Kernel

Postby seawright » Mon May 06, 2013 1:10 am

Thank you Nuc & Matti. :oops: Egg on my face! Had missed the earlier post.
regards
Clive
seawright
Member
 
Posts: 88
Joined: Sat Jan 06, 2007 9:10 pm
Location: Hampshire UK

Re: Building OSS modules for 3.8.0 Linux Kernel

Postby squeeze » Sat May 18, 2013 8:12 pm

Matti wrote:Also I'm now using Kernel 3.9 from Ubuntu Mainline Kernel PPA and Open Sound System still works.


Hi

It also builds against kernel 3.9.2-vanilla on the other hand the build against 3.10-rc1 stops with:

Code: Select all
OSS build environment set up for REGPARM kernels

Building module osscore
Failed to compile OSS
make -C /lib/modules/3.10.0-rc1/build M=/usr/lib64/oss/build modules
make[1]: Entering directory `/usr/src/linux-3.10-rc1'
  CC [M]  /usr/lib64/oss/build/osscore.o
/usr/lib64/oss/build/osscore.c: In Funktion »init_proc_fs«:
/usr/lib64/oss/build/osscore.c:287:8: Fehler: Implizite Deklaration der Funktion »create_proc_entry« [-Werror=implicit-function-declaration]
/usr/lib64/oss/build/osscore.c:286:22: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:293:26: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:300:20: Fehler: Dereferenzierung eines Zeigers auf unvollständigen Typen
/usr/lib64/oss/build/osscore.c: In Funktion »alloc_fop«:
/usr/lib64/oss/build/osscore.c:964:14: Warnung: Zuweisung von inkompatiblem Zeigertyp [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c: In Funktion »oss_pci_read_devpath«:
/usr/lib64/oss/build/osscore.c:1638:3: Warnung: return streicht Qualifizierer »const« von Zeiger-Zieltyp [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c: In Funktion »oss_fp_check«:
/usr/lib64/oss/build/osscore.c:1862:3: Warnung: in Vergleich verschiedener Zeigertypen fehlt Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:1864:3: Warnung: in Vergleich verschiedener Zeigertypen fehlt Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:1864:3: Warnung: in Vergleich verschiedener Zeigertypen fehlt Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:1864:3: Warnung: in Vergleich verschiedener Zeigertypen fehlt Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:1866:3: Warnung: in Vergleich verschiedener Zeigertypen fehlt Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:1871:3: Warnung: in Vergleich verschiedener Zeigertypen fehlt Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:1871:3: Warnung: in Vergleich verschiedener Zeigertypen fehlt Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:1871:3: Warnung: in Vergleich verschiedener Zeigertypen fehlt Typkonvertierung [standardmäßig aktiviert]
/usr/lib64/oss/build/osscore.c:1873:3: Warnung: in Vergleich verschiedener Zeigertypen fehlt Typkonvertierung [standardmäßig aktiviert]
cc1: some warnings being treated as errors
make[2]: *** [/usr/lib64/oss/build/osscore.o] Fehler 1
make[1]: *** [_module_/usr/lib64/oss/build] Fehler 2
make[1]: Leaving directory `/usr/src/linux-3.10-rc1'
make: *** [default] Fehler 2


the problem seems to be in line 287 and 300 of osscore.c
Does someone know anything about this issue?

Sincerely,

squeeze
squeeze
New Member
 
Posts: 6
Joined: Sat May 18, 2013 7:39 pm

Re: Building OSS modules for 3.8.0 Linux Kernel

Postby squeeze » Sat Jun 01, 2013 11:40 pm

I made a patch.
Use at your own risk ...

Code: Select all
--- setup/Linux/oss/build/osscore.c   2012-05-22 00:23:41.000000000 +0200
+++ newCore.c   2013-06-02 01:00:16.187019464 +0200
@@ -276,28 +276,59 @@
   return strlen (tmp);
}

+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
static struct file_operations oss_proc_operations = {
   .read = oss_read_devfiles,
};
+#else
+static struct file_operations fops = {
+ .owner = THIS_MODULE,
+ .read = oss_read_devfiles,
+};
+#endif
+

static void
init_proc_fs (void)
{
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+
   if ((oss_proc_root =
-       create_proc_entry ("opensound", 0700 | S_IFDIR, NULL)) == NULL)
+         create_proc_entry ("opensound", 0700 | S_IFDIR, NULL)) == NULL)
+     {
+         oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
+         return;
+     }
+
+  if ((oss_proc_devfiles =
+        create_proc_entry ("devfiles", 0600, oss_proc_root)) == NULL)
+     {
+         oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
+         return;
+     }
+
+  oss_proc_devfiles->proc_fops = &oss_proc_operations;
+
+#else
+
+  if ((oss_proc_root =
+         proc_mkdir ("opensound", NULL)) == NULL )
     {
-      oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
-      return;
+   oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
+   return;
     }

   if ((oss_proc_devfiles =
-       create_proc_entry ("devfiles", 0600, oss_proc_root)) == NULL)
+   proc_create ("devfiles", 0600, oss_proc_root, &fops)) == NULL)
     {
-      oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
-      return;
+   oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
+         return;
     }

-  oss_proc_devfiles->proc_fops = &oss_proc_operations;
+#endif
+
}

static void



Sincerely,

squeeze
squeeze
New Member
 
Posts: 6
Joined: Sat May 18, 2013 7:39 pm

Re: Building OSS modules for 3.8.0 Linux Kernel

Postby cvnmjs » Mon Aug 19, 2013 6:33 pm

Thanks for this patch. Working nicely.
cvnmjs
New Member
 
Posts: 5
Joined: Sun Aug 04, 2013 6:07 pm


Return to Linux

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron