mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Deepti Patel" <pateldeepti@lycos.com>
To: linux-kernel@vger.kernel.org
Subject: Getting errors in compilation of Hello World!
Date: Wed, 09 Feb 2005 09:36:29 -0500	[thread overview]
Message-ID: <20050209143629.1B610CA09D@ws7-4.us4.outblaze.com> (raw)

Hi all,
I am new to Linux. I am tring to load a module in kernel of 'Fedora core2'.
I wrote a simple Hello world program and tring to compile it with Makefile. I tried 3 differnt types of make file but still it is giving me error. I will really appritiate any help.
 
Here is my Hello world program:

    #include <linux/init.h>
    #include <linux/module.h>
    #include <linux/kernel.h>

    static int hello_init(void)
    {
        printk(KERN_ALERT "Hello, world\n");
        return 0;
    }

    static void hello_exit(void)
    {
        printk(KERN_ALERT "Goodbye, cruel world\n");
    }

    module_init(hello_init);
    module_exit(hello_exit);


Here is the Makefile:

ifneq ($(KERNELRELEASE),)
obj-m:= hello.o

else
KDIR:= /lib/modules/$(shell uname -r)/build
PWD:= $(shell pwd)

default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif

Problem here is once I type the command "make" at the shell prompt it gives the following message :

$ make: Nothing to be done for 'default'


-- 
_______________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10


             reply	other threads:[~2005-02-09 14:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-09 14:36 Deepti Patel [this message]
2005-02-09 14:59 ` linux-os

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050209143629.1B610CA09D@ws7-4.us4.outblaze.com \
    --to=pateldeepti@lycos.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®