![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Programming Talk This forum is for all programming questions. The questions do not have to be directly related to Ubuntu and any programming language is allowed. |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Spilled the Beans
![]() Join Date: Nov 2007
Beans: 14
|
Unable to compile the simplest of kernel modules
I'm running x86_64 gutsy on an AMD 64 bit dual core machine (1 GB RAM,200 GB SATA HDD) but I dont have an internet connection . I've installed the build-essential packages for gcc,g++ and libc6-dev that come along with the live cd and have installed the kernel headers package for kernel 2.6.22-14 that comes as a .deb package on the ubuntu website .
I tried to compile a simple hello world kernel module (see below) : PHP Code:
I'm not allowed an internet connection on my comp as I live in a hostel , so could someone please direct me how to get the build essential package for kernel headers through windows . I've been trying for over a week now , unsuccessfully |
|
|
|
|
|
#2 |
|
Quad Shot of Ubuntu
![]() Join Date: Jan 2006
Location: Grønland,Oslo
Beans: 482
|
Re: Unable to compile the simplest of kernel modules
Hello,
Take a look at this module example. http://ubuntuforums.org/showthread.p...57#post3486457 Note that "/lib/modules/$(uname -r)/build" is normally a symbolic link to /usr/src/linux-headers.... $ ls -l /lib/modules/$(uname -r)/build lrwxrwxrwx 1 root root 40 2007-10-10 10:47 /lib/modules/2.6.22-14-generic/build -> /usr/src/linux-headers-2.6.22-14-generic Study also the guides under "Driver and module programming" of this guide. ---- ---- ---- ---- ---- ---- ---- ---- Downloading packages for your offline system. As you already know, you will need at least these components. (The examples are taken from my 32 bits Ubuntu) $ apt-cache search linux-headers-$(uname -r) linux-headers-2.6.22-14-generic - Linux kernel headers for version 2.6.22 on x86/x86_64 $ apt-cache search build-essential build-essential - informational list of build-essential packages --- Browse to http://packages.ubuntu.com/ and search for the package names. Download the (.deb) packages for your system (is it a 64-bits Gutsy?) Important: Take also all depending packages ! Eg. the "build-essential" pack has these dependencies.... , Ok? Use the "dpkg -i" command to install the packages on your offline system. $ sudo dpkg -i *deb Maybe some of the packages lay on the installation CD too. I do not know. Merry Christmas $ xsnow Last edited by moma; December 19th, 2007 at 09:19 AM.. |
|
|
|
|
|
#3 |
|
Quad Shot of Ubuntu
![]() Join Date: Jan 2006
Location: Grønland,Oslo
Beans: 482
|
Re: Unable to compile the simplest of kernel modules
<duplicate posting. deleted>
Last edited by moma; December 19th, 2007 at 09:19 AM.. |
|
|
|
|
|
#4 |
|
Spilled the Beans
![]() Join Date: Nov 2007
Beans: 14
|
Re: Unable to compile the simplest of kernel modules
So its not possible to compile a kernel module directly using the gcc command ..... I never knew .... Thanks a lot ...
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|