Compiling kernel source build modules in ubuntu 14.04
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Compiling kernel source build modules in ubuntu 14.04
Decided to just make a new thread. Forgive me if im breaking the rules.
Im trying to install some drivers. the .deb installed fine but after install i have to run dgcconfig to build the modules. It asks for the build at /usr/src/(linux)/build then fails and says to setup the kernel using make menuconfig in the kernel directory. But i'm not sure what to configure in the menu.
Help in getting my kernel build modules setup so ubuntu will install the driver and detect the modem as a modem? Listed in lsusb but gnomeppp wont detect a modem connected. I used apt-get install kernel-source but im not sure how to compile or configure.
Help is appreciated i've been trying to get these drivers working for awhile
Thanks
So in other words "make -j 2" would be the command i'd enter for dual core and allow me to install the driver modules after? Am i doing this for the kernel header directory or kernel source directory?
Running virtual machine with 1gb ram, 64mb video, and the cpu isnt emulated i think so pentium dualcore 3ghz
Console output when dgcconfig was run:
Code:
dan@dan-VirtualBox:/usr/src/linux-headers-3.16.0-30$ sudo dgcconfig
Conexant DGC USB modem driver, version 1.13
If you need assistance or more information, please go to:
http://www.linuxant.com/
When reporting a problem for the first time, please send
us the file generated by "dgcconfig --dumpdiag".
No pre-built modules for: Ubuntu-14.04.2 linux-3.16.0-30-generic i686-SMP
Trying to automatically build the driver modules...
(this requires a C compiler and proper kernel sources to be installed)
Where is the linux source build directory that matches your running kernel?
[/lib/modules/3.16.0-30-generic/build]
WARNING: missing file /lib/modules/3.16.0-30-generic/build/include/linux/version.h
The cause of this is usually a missing or unconfigured
kernel source tree (and sometimes an incorrect directory or symbolic link).
However, proper /boot/config-3.16.0-30-generic was found.
Would you like to try using it (in a temporary kernel tree)? [yes]
Unable to prepare temporary kernel tree
First, ensure that the proper kernel source and compiler packages
from your distribution vendor and/or the community are installed.
The Linux kernel can then be reconfigured by running "make menuconfig"
under the kernel source directory (usually /usr/src/linux).
Verify that the proper options for your system are selected.
Then compile and install your new kernel (for more information about
this procedure, see the README file under the kernel source directory),
reboot the system using the new kernel, and re-run "dgcconfig".
dan@dan-VirtualBox:/usr/src/linux-headers-3.16.0-30$
Ran make -j2 in running kernel header dir and output:
Code:
dan@dan-VirtualBox:~$ cd /usr/src/linux-headers-3.16.0-30
dan@dan-VirtualBox:/usr/src/linux-headers-3.16.0-30$ make -j2
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make[1]: *** No rule to make target `arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/asm/syscalls_32.h'. Stop.
make: *** [archheaders] Error 2
make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2!
dan@dan-VirtualBox:/usr/src/linux-headers-3.16.0-30$
I run sudo make oldconfig in running header dir, works, output:
Code:
dan@dan-VirtualBox:/usr/src/linux-headers-3.16.0-30$ sudo make oldconfig
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
dan@dan-VirtualBox:/usr/src/linux-headers-3.16.0-30$
run dgcconfig, output same:
Code:
dan@dan-VirtualBox:/usr/src/linux-headers-3.16.0-30$ sudo dgcconfig
Conexant DGC USB modem driver, version 1.13
If you need assistance or more information, please go to:
http://www.linuxant.com/
When reporting a problem for the first time, please send
us the file generated by "dgcconfig --dumpdiag".
No pre-built modules for: Ubuntu-14.04.2 linux-3.16.0-30-generic i686-SMP
Trying to automatically build the driver modules...
(this requires a C compiler and proper kernel sources to be installed)
Where is the linux source build directory that matches your running kernel?
[/lib/modules/3.16.0-30-generic/build]
WARNING: missing file /lib/modules/3.16.0-30-generic/build/include/linux/version.h
The cause of this is usually a missing or unconfigured
kernel source tree (and sometimes an incorrect directory or symbolic link).
However, proper /boot/config-3.16.0-30-generic was found.
Would you like to try using it (in a temporary kernel tree)? [yes]
Unable to prepare temporary kernel tree
First, ensure that the proper kernel source and compiler packages
from your distribution vendor and/or the community are installed.
The Linux kernel can then be reconfigured by running "make menuconfig"
under the kernel source directory (usually /usr/src/linux).
Verify that the proper options for your system are selected.
Then compile and install your new kernel (for more information about
this procedure, see the README file under the kernel source directory),
reboot the system using the new kernel, and re-run "dgcconfig".
dan@dan-VirtualBox:/usr/src/linux-headers-3.16.0-30$
I did the same in the latest header directory (3.16.0-31) with the same result
Ill restart the machine and edit this post the result
Restarted, ran make config in 3.16.0-30 dir, then dgcconfig same result, restarted again, ran in make config in 3.16.0-30 then dgcconfig and same result again
Stumped
Reinstalled ubuntu
installed kernel-headers kernel-devel build-essential kernel-source
apt-get install kernel-source gives me tar.bz2 with two folders debian and debian.master in usr/src/linux-source-3.13.0/
run tar xjf linux-source-3.13.0.tar.bz2
extracts to usr/src/linux-source-3.13.0/linux-source-3.13.0
run sudo make -j2 in that directory
Says to run oldconfig
run sudo oldconfig
writes .config file
Instal dgcmodem driver
installs
runs dgcconfig
Same output as above (missing version.h, cannot make a build tree/temporary tree?, Cannot build modules run make config restart and rerun dgcconfig)
Stumped, not sure how to properly install kernel-source or configure kernel so the modules will build. Help
dan@dan-VirtualBox:~$ cd /usr/src/linux-source-3.13.0/linux-source-3.13.0
dan@dan-VirtualBox:/usr/src/linux-source-3.13.0/linux-source-3.13.0$ sudo make -j2
[sudo] password for dan:
scripts/kconfig/conf --silentoldconfig Kconfig
make[1]: Nothing to be done for `all'.
CHK include/config/kernel.release
WRAP arch/x86/include/generated/asm/clkdev.h
CHK include/generated/uapi/linux/version.h
UPD include/config/kernel.release
UPD include/generated/uapi/linux/version.h
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.lex.c
SHIPPED scripts/genksyms/keywords.hash.c
SHIPPED scripts/genksyms/parse.tab.h
SHIPPED scripts/genksyms/parse.tab.c
HOSTCC scripts/genksyms/lex.lex.o
HOSTCC scripts/genksyms/parse.tab.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
CC scripts/mod/devicetable-offsets.s
HOSTCC scripts/selinux/genheaders/genheaders
MKELF scripts/mod/elfconfig.h
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/kallsyms
HOSTCC scripts/mod/sumversion.o
HOSTCC scripts/conmakehash
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/recordmcount
HOSTLD scripts/mod/modpost
HOSTCC scripts/sortextable
HOSTCC scripts/asn1_compiler
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/x86/kernel/asm-offsets.s
In file included from include/linux/suspend.h:8:0,
from arch/x86/kernel/asm-offsets.c:12:
include/linux/mm.h:647:2: error: #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
^
make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
dan@dan-VirtualBox:/usr/src/linux-source-3.13.0/linux-source-3.13.0$ sudo dgcconfig
Conexant DGC USB modem driver, version 1.13
If you need assistance or more information, please go to:
http://www.linuxant.com/
When reporting a problem for the first time, please send
us the file generated by "dgcconfig --dumpdiag".
No pre-built modules for: Ubuntu-14.04.2 linux-3.16.0-30-generic i686-SMP
Trying to automatically build the driver modules...
(this requires a C compiler and proper kernel sources to be installed)
Where is the linux source build directory that matches your running kernel?
[/lib/modules/3.16.0-30-generic/build]
WARNING: missing file /lib/modules/3.16.0-30-generic/build/include/linux/version.h
The cause of this is usually a missing or unconfigured
kernel source tree (and sometimes an incorrect directory or symbolic link).
However, proper /boot/config-3.16.0-30-generic was found.
Would you like to try using it (in a temporary kernel tree)? [yes]
Unable to prepare temporary kernel tree
First, ensure that the proper kernel source and compiler packages
from your distribution vendor and/or the community are installed.
The Linux kernel can then be reconfigured by running "make menuconfig"
under the kernel source directory (usually /usr/src/linux).
Verify that the proper options for your system are selected.
Then compile and install your new kernel (for more information about
this procedure, see the README file under the kernel source directory),
reboot the system using the new kernel, and re-run "dgcconfig".
dan@dan-VirtualBox:/usr/src/linux-source-3.13.0/linux-source-3.13.0$ sudo oldconfig
sudo: oldconfig: command not found
dan@dan-VirtualBox:/usr/src/linux-source-3.13.0/linux-source-3.13.0$ sudo make oldconfig
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
dan@dan-VirtualBox:/usr/src/linux-source-3.13.0/linux-source-3.13.0$ sudo dgcconfig
Conexant DGC USB modem driver, version 1.13
If you need assistance or more information, please go to:
http://www.linuxant.com/
When reporting a problem for the first time, please send
us the file generated by "dgcconfig --dumpdiag".
No pre-built modules for: Ubuntu-14.04.2 linux-3.16.0-30-generic i686-SMP
Trying to automatically build the driver modules...
(this requires a C compiler and proper kernel sources to be installed)
Where is the linux source build directory that matches your running kernel?
[/lib/modules/3.16.0-30-generic/build]
WARNING: missing file /lib/modules/3.16.0-30-generic/build/include/linux/version.h
The cause of this is usually a missing or unconfigured
kernel source tree (and sometimes an incorrect directory or symbolic link).
However, proper /boot/config-3.16.0-30-generic was found.
Would you like to try using it (in a temporary kernel tree)? [yes]
Unable to prepare temporary kernel tree
First, ensure that the proper kernel source and compiler packages
from your distribution vendor and/or the community are installed.
The Linux kernel can then be reconfigured by running "make menuconfig"
under the kernel source directory (usually /usr/src/linux).
Verify that the proper options for your system are selected.
Then compile and install your new kernel (for more information about
this procedure, see the README file under the kernel source directory),
reboot the system using the new kernel, and re-run "dgcconfig".
dan@dan-VirtualBox:/usr/src/linux-source-3.13.0/linux-source-3.13.0$
I've done this once and restarted before running dgcconfig but redid for console output
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.