hello kernel error

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

 



I started reading Orielly Developing Device Drivers and tried following program


#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
 {
        printk(KERN_ALERT "Hello,world tapas\n");
        return 0;
 }
static void hello_exit(void)
 {
        printk(KERN_ALERT "Good Bye,cruel world\n");
 }
module_init(hello_init);
module_exit(hello_exit);
~
~

I wrote above program in /home/tapas directory with name hello.c
First I tried to compile as
make hello.c
it gave error
as suggested in book on page 17 of chapter two

% make
make[1]:
I tried as
 make hello.c
got following error
make: Nothing to be done for `hello.c'.

and tried just make
make
make: *** No targets specified and no makefile found.  Stop.

I am wondering as how do I compile my first kernel module.
So what did I miss?


-- 
Tapas

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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