hello.c help

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

 



Hi,

I'm running RedHat 9 with linux 2.4.20-8 kernel on a
Pentium III machine.  I downloaded linux 2.6.11.5
kernel to my home directory, compiled and built it. 
My first observation was that I didn't see file
vermagic.o in my source tree.

I also downloaded the example code from the "Linux
Device Drivers" book, 3rd edition.  I set the
evironment variable KERNELDIR to point to the linux
2.6.11.5 source tree.  I was able to build the hello.c
example.  But when I tried to load it, I got the
following error:

%insmod hello.ko
hello.ko: couldn't find the kernel version the module
was compiled for

I also tried insmode with -f and still got the same
error.  I now hit the wall even after spending a lot
of time googling.  So here are my questions:
1.  Why isn't file vermagic.o generated in my linux
2.6.11.5 source tree even after it was built, I
assume, successfully?
2.  What is the possible cause of the above loading
error for hello.c?
3.  Do I have to have linux 2.6.11.5 running in order
to load module hello.ko?

Thanks for your help.

Sam

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux