Cannot build module for 2.6.17-10-386

Asked by jacekn

I am trying to build a USB driver based on USB skeleton driver under Edgy Eft. The system allows to boot two different kernels:
2.6.17-10-386
2.6.17-10-generic
The driver builds and works successfully under "generic" system, but I am unable to build it for "386" system. The driver built for "generic" system cannot be installed correctly under "386". Looks like headers and/or other important files are not installed for "386" system.

The questions are:
- How to get headers for 2.6.17-10-386 ?
- What is a difference between 2.6.17-10-386 and 2.6.17-10-generic that disallows to install module built for "generic" ?
- I am wondering how Ubuntu kernels are derived and numbered - whether they are directly taken from Debian (there is a document "Debian Linux Kernel Handbook" which describes this subject in details), or may be they are taken from Debian and further modified by Ubuntu team with custom version numbers assigned by Ubuntu (not Debian) or may be they are taken directly from www.kernel.org, modified and having custom version numbers assigned by Ubuntu. This question appears since I was unable to download kernel source code for 2.6.17-10 using method described in "Debian Linux Kernel Handbook" - download gives code for version 2.6.17-11 but I cannot get a patch package to rollback to 2.6.17-10.

If anybody can help/explain/comment on this subject it would be great !

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Cesare Tirabassi
Solved:
Last query:
Last reply:
Revision history for this message
Best Cesare Tirabassi (norsetto) said :
#1

(1) How to get headers for 2.6.17-10-386

To install headers use Synaptics or give this command from a terminal:

_for your CURRENT kernel_

sudo apt-get install linux-headers-`uname -r`

_for a given KERNEL version_

sudo apt-get install linux-headers-KERNEL

For instance for 2.6.17-10-386:

sudo apt-get install linux-headers-2.6.17-10-386

(2) What is a difference between 2.6.17-10-386 and 2.6.17-10-generic

You can see the difference using a diff command from a terminal.
For instance:

 diff /boot/config-2.6.20-16-generic /boot/config-2.6.20-16-lowlatency
3,4c3,4
< # Linux kernel version: 2.6.20-16-generic
< # Thu Jun 7 17:46:23 2007
---
> # Linux kernel version: 2.6.20-16-lowlatency
> # Thu Jun 7 18:10:47 2007
42c42
< CONFIG_VERSION_SIGNATURE="Ubuntu 2.6.20-16.29-generic"
---
> CONFIG_VERSION_SIGNATURE="Ubuntu Unofficial"
137,138c137,138
< CONFIG_PREEMPT_VOLUNTARY=y
< # CONFIG_PREEMPT is not set
---
> # CONFIG_PREEMPT_VOLUNTARY is not set
> CONFIG_PREEMPT=y
179c179
< CONFIG_HZ_250=y
---
> # CONFIG_HZ_250 is not set
181,182c181,182
< # CONFIG_HZ_1000 is not set
< CONFIG_HZ=250
---
> CONFIG_HZ_1000=y
> CONFIG_HZ=1000
3619a3620
> CONFIG_DEBUG_PREEMPT=y

As you can see in this example the difference is preemption and timer interrupts frequency.

(3) How Ubuntu kernels are derived and numbered

To my knowledge its the official linux kernel with specific ubuntu modifications (you can see for instance what modules are added by ubuntu by looking at the config files). Numbering is quite complex actually, you may want to have a look at this page for some detailed explanations:

https://wiki.ubuntu.com/KernelMaintenance

Revision history for this message
jacekn (jnap) said :
#2

Thanks Cesare Tirabassi, that solved my question.

Revision history for this message
jacekn (jnap) said :
#3

Cesare,

Thank you so much for your quick and exhaustive answer. I was able to
download the headers I needed, build my driver and now the driver loads and
works under 2.6.17-10-386 kernel. Other version of the driver works also
under 2.6.17-10-generic kernel, but I was able to manage this configuration
earlier since "generic" headers were installed during Ubuntu installation.

Your answer gave me also the idea how to compare quickly kernel build
features one against another as well as information (the wiki article) how
Ubuntu kernels are build and numbered. This was exactly what I was looking
for !

Best regards
Jacek Napiatek

----- Original Message -----
From: "Cesare Tirabassi" <email address hidden>
To: <email address hidden>
Sent: Friday, June 29, 2007 1:03 AM
Subject: Re: [Question #8926]: Cannot build module for 2.6.17-10-386

> Your question #8926 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/8926
>
> Status: Open => Answered
>
> Cesare Tirabassi proposed the following answer:
> (1) How to get headers for 2.6.17-10-386
>
> To install headers use Synaptics or give this command from a terminal:
>
> _for your CURRENT kernel_
>
> sudo apt-get install linux-headers-`uname -r`
>
> _for a given KERNEL version_
>
> sudo apt-get install linux-headers-KERNEL
>
> For instance for 2.6.17-10-386:
>
> sudo apt-get install linux-headers-2.6.17-10-386
>
> (2) What is a difference between 2.6.17-10-386 and 2.6.17-10-generic
>
> You can see the difference using a diff command from a terminal.
> For instance:
>
> diff /boot/config-2.6.20-16-generic /boot/config-2.6.20-16-lowlatency
> 3,4c3,4
> < # Linux kernel version: 2.6.20-16-generic
> < # Thu Jun 7 17:46:23 2007
> ---
>> # Linux kernel version: 2.6.20-16-lowlatency
>> # Thu Jun 7 18:10:47 2007
> 42c42
> < CONFIG_VERSION_SIGNATURE="Ubuntu 2.6.20-16.29-generic"
> ---
>> CONFIG_VERSION_SIGNATURE="Ubuntu Unofficial"
> 137,138c137,138
> < CONFIG_PREEMPT_VOLUNTARY=y
> < # CONFIG_PREEMPT is not set
> ---
>> # CONFIG_PREEMPT_VOLUNTARY is not set
>> CONFIG_PREEMPT=y
> 179c179
> < CONFIG_HZ_250=y
> ---
>> # CONFIG_HZ_250 is not set
> 181,182c181,182
> < # CONFIG_HZ_1000 is not set
> < CONFIG_HZ=250
> ---
>> CONFIG_HZ_1000=y
>> CONFIG_HZ=1000
> 3619a3620
>> CONFIG_DEBUG_PREEMPT=y
>
> As you can see in this example the difference is preemption and timer
> interrupts frequency.
>
> (3) How Ubuntu kernels are derived and numbered
>
> To my knowledge its the official linux kernel with specific ubuntu
> modifications (you can see for instance what modules are added by ubuntu
> by looking at the config files). Numbering is quite complex actually,
> you may want to have a look at this page for some detailed explanations:
>
> https://wiki.ubuntu.com/KernelMaintenance
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/8926/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/8926
>
> You received this question notification because you are a direct
> subscriber of the question.
>