Make my own modules for kernel 2.4.32
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?
Thanks in advance...!
Hi,
Quoted 5 lines · Massimo De Beni
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
Quoted 8 lines
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.
Quoted 1 line
Thanks in advance...!
Regards,
Willy