[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel source tree for installed kernel, and config file: how to get?



On 12/22/05, Fred Proctor <frederick.proctor@nist.gov> wrote:
> I have installed Debian Testing via the netinstall, and have a kernel
> 2.6.12-1-386 from Debian testing (etch). I'd like to make some changes
> to the kernel source, namely the device driver for my sound chip. I
> installed what I thought was the kernel source, and expected to see
> "-1-386" in the source tree top-level Makefile's symbol for
> "EXTRAVERSION". However, it's blank.
>
> I built this kernel, booted from it, and had different behavior from the
> one that came in binary form with the netinstall. The problem is with my
> CD-DVD RW. With the default kernel, it appears fine as /dev/hda and
> works with several apps. With my compiled kernel, it appears as
> /dev/scd0 and doesn't work with several apps.
>
> How can I get the actual kernel source used to build the binary kernel
> installed with Debian netinstall? I expect the procedure to be this:
>
> 1. apt-get install kernel-source-something
> 2. cd /usr/src/kernel-source-something # verify Makefile has
> EXTRAVERSION = -1-386, change to -1-386-custom
> 3. cp /boot/config-2.6.12-1-386 .config
> 4. make xconfig # just save and quit
> 5. make bzImage modules modules_install # verify
> /lib/modules/2.6.12-1-386-custom
> 6. cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.12-1-386-custom
> 7. cp System.map /boot/System.map-2.6.12-1-386-custom
> 8. mkinitrd -o initrd.img 2.6.12-1-386-custom && cp initrd.img
> /boot/initrd.img-2.6.12-1-386-custom
> 9. Edit /boot/grub/menu.lst, clone entry for default kernel
>
> As I said, doing this I didn't see the telltale EXTRAVERSION = -1-386,
> and when finished the kernel wasn't the same as far as /dev/hda
> behaviour and some other things scrolling by on the boot console.

See if the module can be built against the kernel headers. There's a
package you can install (linux-headers-... I think, might still be
kernel-headers-... in sarge). This would be the way you can compile
extra modules. If that won't work and you still want an extra module
it would probably be easiest to just compile the entire kernel instea



Reply to: