Re: Make my own modules for kernel 2.4.32



Hi,

On Tue, Jan 31, 2006 at 11:39:25AM +0100, Massimo De Beni wrote:
> Hi all,
> I'm a newbye to kernel 'modding' and I've a question that may seems
> outdated... The situation is this:
> I worked to get a Set Top Box to work with the latest stable 2.4
> kernel, the way is clear but the box need some modules to be loaded at
> boot in order to get the video and audio device to work (modules that
> are not shipped in kernels 2.4...); now I'm building those modules
> separatly, compiling directly the drivers source codes with 'make',
> and then I insert the .o with 'insmod'.
> I would create a better system in which one could compile those
> modules directly on the 'make menuconfig' of the kernel, so I'm
> modifying the various Makefiles && config files, but I'm a bit
> confused... Any good hint?

You have to add an 'obj-m' entry to the Makefile located in the same
directory as your driver, and make it depend on an option which will
be enabled in some Config.in (in the same directory if possible).
You should look at any driver provided as a patch for the kernel, it
will be fairly easier for you to understand what they touch. And don't
forget one important thing : always ensure that the kernel still builds
with your module disabled. Also, don't forget to add an entry in the
Configure.help file.

> Thanks in advance...!

Regards,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: 2.6.30-rc4 kernel
    ... I think there may be a problem with the 2.6.30 kernel that is ... # Generic Driver Options ... # PCI IDE chipsets support ... # Other IDE chipsets support ...
    (Linux-Kernel)
  • 2.6.30-rc4 kernel
    ... kernel panic - not syncing: ... # Generic Driver Options ... # PCI IDE chipsets support ... # Other IDE chipsets support ...
    (Linux-Kernel)
  • [PATCH 18-rc2] Fix typos in /Documentation : N-P
    ... Again, if you're not gonna do synchronization with disk drives (dang, ... -the kernel. ... There are two options specific to PSX driver portion. ... The driver uses the settings from the EEPROM set in the SCSI BIOS ...
    (Linux-Kernel)
  • Re: PROBLEM: kernel BUG at drivers/media/video/em28xx/em28xx-video.c:891
    ... I am using a Pinnacle Dazzle DVC100 Rev 1.1 USB frame grabber card, and each time I stop capturing video the driver crashes. ... This happens both in an unpatched 2.6.37 kernel and in the debian 2.6.32-5 kernel. ... em28xx driver crashes and usb subsystem hangs when video capturing stops. ...
    (Linux-Kernel)
  • two scary syslog kernel messages
    ... Sep 20 03:46:06 marvin kernel: kernel BUG at mm/rmap.c:482! ... ACPI: Local APIC address 0xfee00000 ... Allocating PCI resources starting at 80000000 ... ** driver failed to call pci_enable_device. ...
    (Debian-User)