my ordeal with module.h - SOLUTIONS !!  

Posted by Satish Eerpini in ,

so here we go on with our story , the other day when i was working on CentOS i opened Kdevelop ( an IDE for programming ) , and started a new project under the 'C --> Kernel module ' and it gave me a sample kernel module , very similar to the one i had earlier written , i just executed the program ( in other words compiled it ) , it finished succesfully , i was confused at first , ...... then i looked at what was going on behind the curtains of Kdevelop , i jumped into the directory Kdevelop had created for the kernel module , btw make is a wondeerful utility which comes very handy when managing large projects ,...... and checked the 'Makefile '( the configuration file used by make ) that had been used to Kdevelop for compiling and installing the module , the makefile was using the includes from the kernel source directory and was starting a submake in that directory which was in turn compiling my module , ........ i will post the details of the 'Makefile' and some stuff on GNU 'make' soon , but i am finally happy i am able to compile my modules !!!!!

my ordeal with module.h !!  

Posted by Satish Eerpini in , ,

i have had a tough time compiling kernel modules and then inserting them , and the reason , for me the very troublesome /linux/module.h , the most important of header files required when you are writing a kernel module , you can't write a kernel module without including this file , .......
my problem started here when i was writing a kernel module , a very basic hello world module , on Fedora 8 , when i tried compiling it , it showed a lot of errors ( obviously though ..) , later i realised that there was no file /usr/include/linux/module.h , and after some research found out that the kernel headers RPM provided with Fedora 8 doesn't have this file , so even on installing the kernel headers the file was missing , and then with some help from the posts on the Twincling Discussion list ( twincling is an open-source community based in hyderabad ) , i downloaded the kernel source RPMs and recompiled the kernel using the Kernel-spec files for generating the Kernel installation and header RPMs again , but even after installing the self-compiled RPMs there was no use , .. . the file was still missing !!!
and in all this frustration i had already started to dislike Fedora due to the reason that it crashed so often , and i finally shifted to Debian Etch 4.0 , it was a relief i should say , and good news i could now find the module.h file in its place also , but still even with the headers present the module was not getting compiled , it still showed a lot of errors and most amazing one m or rather a part of it was :
" cannot determine processor type " .......
i will be posting the error list and other technical things on the forum soon , .....
Debian was good , but it was rather tough shifting from RPMs to the debian format and i was starting to miss 'ntsysv' badly, so i switched to CentOS 5.1 , it is great , almost similar to Fedora Core 6, ...... and as i had expected there was no /usr/include/linux/module.h so i gave up on module programming , ....... but this was not be the end , read on the " my ordeal with module.h : - SOLUTIONS ! " for the solution i found !!

lays, coke and debian - part 1 !!!  

Posted by Satish Eerpini in ,

finally i have installed debian , and if it doesn't sound routine i should
say i have mixed feelings about the whole thing, first of all i was very
happy that all my multimedia needs were satisfied with the installation
DVD itself , but there are many other issues, my external storage device
suddenly shows up problems , i will post a detailed review of my
installation a litlle later !!!!

a modification to 'make' ??  

Posted by Satish Eerpini in ,

i was thinking about the way make works , when i had this thought ,.....
could i make an entry in the makefile , which would indicate the directory
containing the project source code and running make from anywhere
with that file as the make file would compile and install binaries from
the project directory , so that user who downloads the source code of an
utility may not have to always go and run make from that particular
directory ,..... especially for a novice user ?
what say ? but i am not sure if such a functionality of 'make' already
exists or not !!!!

i have had enough of Fedora !!!  

Posted by Satish Eerpini in ,

i can't write a kernel module, there is no module.h, and later i found out that the kernel
headers rpm which comes with fedora doesn't have this header , ............. i was still hopeful , tried compiling the kernel back from the source rpm, but what i ended up finally with were nothing but the same old rpms provided in the Installation DVD, .........
the other day i decided to get 'into' GNOME, my gnome headers won't work , ........
and had enough of crashes , god knows when my nautilus is gonna crash , the day before i was in the middle of a seminar and my desktop was gone, ..........
i have decided to move on to something sturdier and faster , .... ordered Debian etch , .... but have yet to test it, ...... curse the Courier fellows my DVD's are yet to reach me :-) .........

i was recently coding a sample Qt based widget in C++ whic contained a button and gave an output to the terminal when ever it was clicked ,. .... and had to work with the header which had to be compiled using the MOC ( meta object compiler ) , which i suppose is for working out with the SLOTs and SIGNALs . .......
i then implemented the whole thing with make, that was pretty cool , and in a short time i was using make to do the installation too after my compilation ,..... ( though i wud suggest u first go through some shell scripting before doing this .. if u don wanna confuse yourself wih all the weird '['s and '@'s ...)................

now that is what is called 'making ' made easy !!!

About Me

My photo

I am a Linux geek currently pursuing my bachelor's degree in computer science and engineering.