← Back to team overview

kernel-packages team mailing list archive

[Bug 1348442] Re: Unable to compile proprietary kernel driver under ARM64 Ubuntu 14.04

 

** Attachment added: "Example driver exhibiting the problem described"
   https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1348442/+attachment/4162418/+files/test.tar.gz

** Tags added: apport-collected trusty

** Description changed:

  Compiling a kernel driver with a proprietary license (i.e.
  MODULE_LICENSE("Proprietary")) for ARM64 under Ubuntu 14.04 results in
  the following link error:
  
  # make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -C /home/ctuffli/dev/ubuntu-trusty/debian/build/build-generic/ M=`pwd` modules
  make: Entering directory `/home/ctuffli/dev/ubuntu-trusty/debian/build/build-generic'
    CC [M]  /home/ctuffli/dev/ocs/test/test.o
  In file included from /home/ctuffli/dev/ubuntu-trusty/include/linux/printk.h:5:0,
                   from /home/ctuffli/dev/ubuntu-trusty/include/linux/kernel.h:13,
                   from /home/ctuffli/dev/ubuntu-trusty/include/linux/sched.h:15,
                   from /home/ctuffli/dev/ubuntu-trusty/arch/arm64/include/asm/compat.h:25,
                   from /home/ctuffli/dev/ubuntu-trusty/arch/arm64/include/asm/stat.h:23,
                   from /home/ctuffli/dev/ubuntu-trusty/include/linux/stat.h:5,
                   from /home/ctuffli/dev/ubuntu-trusty/include/linux/module.h:10,
                   from /home/ctuffli/dev/ocs/test/test.c:1:
  /home/ctuffli/dev/ocs/test/test.c: In function ‘__inittest’:
  /home/ctuffli/dev/ubuntu-trusty/include/linux/init.h:297:4: warning: return from incompatible pointer type [enabled by default]
    { return initfn; }     \
      ^
  /home/ctuffli/dev/ocs/test/test.c:34:1: note: in expansion of macro ‘module_init’
   module_init(test_init);
   ^
    Building modules, stage 2.
    MODPOST 1 modules
  FATAL: modpost: GPL-incompatible module test.ko uses GPL-only symbol 'xen_dma_ops'
  make[3]: *** [__modpost] Error 1
  make[2]: *** [modules] Error 2
  make[1]: *** [sub-make] Error 2
  make: *** [all] Error 2
  make: Leaving directory `/home/ctuffli/dev/ubuntu-trusty/debian/build/build-generic'
  
  It appears that including <linux/dma-mapping.h> is enough to trigger this problem
  # nm -gl test.o | grep xen_start_info
                   U xen_start_info       /home/ctuffli/dev/ubuntu-trusty/arch/arm64/include/asm/dma-mapping.h:42
  
  Test case attached
+ --- 
+ AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access /dev/snd/: No such file or directory
+ AplayDevices: Error: [Errno 2] No such file or directory
+ ApportVersion: 2.14.1-0ubuntu3.2
+ Architecture: arm64
+ ArecordDevices: Error: [Errno 2] No such file or directory
+ CRDA: Error: [Errno 2] No such file or directory
+ CurrentDmesg: [   15.365073] xgene-enet 17020000.ethernet eth0: eth0: link up 1000 Mbps
+ DistroRelease: Ubuntu 14.04
+ HibernationDevice: RESUME=UUID=88388f89-d798-4675-9542-27cacae45a9d
+ IwConfig: Error: [Errno 2] No such file or directory
+ Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
+ Package: linux (not installed)
+ PciMultimedia:
+  
+ ProcEnviron:
+  TERM=screen
+  PATH=(custom, no user)
+  LANG=en_US.UTF-8
+  SHELL=/bin/bash
+ ProcFB:
+  
+ ProcKernelCmdLine: console=ttyS0,115200n8 ro
+ ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
+ RelatedPackageVersions:
+  linux-restricted-modules-3.13.0-32-generic N/A
+  linux-backports-modules-3.13.0-32-generic  N/A
+  linux-firmware                             1.127.4
+ RfKill: Error: [Errno 2] No such file or directory
+ Tags:  trusty
+ Uname: Linux 3.13.0-32-generic aarch64
+ UpgradeStatus: No upgrade log present (probably fresh install)
+ UserGroups:
+  
+ _MarkForUpload: True

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1348442

Title:
  Unable to compile proprietary kernel driver under ARM64 Ubuntu 14.04

Status in “linux” package in Ubuntu:
  New

Bug description:
  Compiling a kernel driver with a proprietary license (i.e.
  MODULE_LICENSE("Proprietary")) for ARM64 under Ubuntu 14.04 results in
  the following link error:

  # make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -C /home/ctuffli/dev/ubuntu-trusty/debian/build/build-generic/ M=`pwd` modules
  make: Entering directory `/home/ctuffli/dev/ubuntu-trusty/debian/build/build-generic'
    CC [M]  /home/ctuffli/dev/ocs/test/test.o
  In file included from /home/ctuffli/dev/ubuntu-trusty/include/linux/printk.h:5:0,
                   from /home/ctuffli/dev/ubuntu-trusty/include/linux/kernel.h:13,
                   from /home/ctuffli/dev/ubuntu-trusty/include/linux/sched.h:15,
                   from /home/ctuffli/dev/ubuntu-trusty/arch/arm64/include/asm/compat.h:25,
                   from /home/ctuffli/dev/ubuntu-trusty/arch/arm64/include/asm/stat.h:23,
                   from /home/ctuffli/dev/ubuntu-trusty/include/linux/stat.h:5,
                   from /home/ctuffli/dev/ubuntu-trusty/include/linux/module.h:10,
                   from /home/ctuffli/dev/ocs/test/test.c:1:
  /home/ctuffli/dev/ocs/test/test.c: In function ‘__inittest’:
  /home/ctuffli/dev/ubuntu-trusty/include/linux/init.h:297:4: warning: return from incompatible pointer type [enabled by default]
    { return initfn; }     \
      ^
  /home/ctuffli/dev/ocs/test/test.c:34:1: note: in expansion of macro ‘module_init’
   module_init(test_init);
   ^
    Building modules, stage 2.
    MODPOST 1 modules
  FATAL: modpost: GPL-incompatible module test.ko uses GPL-only symbol 'xen_dma_ops'
  make[3]: *** [__modpost] Error 1
  make[2]: *** [modules] Error 2
  make[1]: *** [sub-make] Error 2
  make: *** [all] Error 2
  make: Leaving directory `/home/ctuffli/dev/ubuntu-trusty/debian/build/build-generic'

  It appears that including <linux/dma-mapping.h> is enough to trigger this problem
  # nm -gl test.o | grep xen_start_info
                   U xen_start_info       /home/ctuffli/dev/ubuntu-trusty/arch/arm64/include/asm/dma-mapping.h:42

  Test case attached
  --- 
  AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access /dev/snd/: No such file or directory
  AplayDevices: Error: [Errno 2] No such file or directory
  ApportVersion: 2.14.1-0ubuntu3.2
  Architecture: arm64
  ArecordDevices: Error: [Errno 2] No such file or directory
  CRDA: Error: [Errno 2] No such file or directory
  CurrentDmesg: [   15.365073] xgene-enet 17020000.ethernet eth0: eth0: link up 1000 Mbps
  DistroRelease: Ubuntu 14.04
  HibernationDevice: RESUME=UUID=88388f89-d798-4675-9542-27cacae45a9d
  IwConfig: Error: [Errno 2] No such file or directory
  Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
  Package: linux (not installed)
  PciMultimedia:
   
  ProcEnviron:
   TERM=screen
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcFB:
   
  ProcKernelCmdLine: console=ttyS0,115200n8 ro
  ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
  RelatedPackageVersions:
   linux-restricted-modules-3.13.0-32-generic N/A
   linux-backports-modules-3.13.0-32-generic  N/A
   linux-firmware                             1.127.4
  RfKill: Error: [Errno 2] No such file or directory
  Tags:  trusty
  Uname: Linux 3.13.0-32-generic aarch64
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups:
   
  _MarkForUpload: True

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1348442/+subscriptions


References