From: arunkr.linux@gmail.com (Arun M Kumar)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Issue compiling Kernel Module
Date: Thu, 09 Jan 2014 03:00:11 +0530 [thread overview]
Message-ID: <52CDC363.3040603@gmail.com> (raw)
I have recently started with Device Drivers in Linux and have made a
simple Hello world module.
My code is this
//---------------------------------------------------------
/* My first kernel Module */
#include <linux/init.h>
#include <linux/module.h>
static init my_init(void){
printk(KERN_ALERT "Hello World\n");
return 0;
}
static void my_exit(void){
printk(KERN_ALERT "asta la vista baby\n");
}
MODULE_LICENSE("GPL");
module_init(my_init);
module_exit(my_exit);
//-------------------------------------------------------------
and the makefile i am using is like this...
//-------------------------------------------------------------
all:
make -C /home/arun/Linux_Source M=`pwd`
clean:
make -C /home/arun/Linux_Source M=`pwd` clean
obj-m := Hello_World.o
//---------------------------------------------------------------------
I receive the following error on running "$make"
//---------------------------------------------------------
make -C /home/arun/Linux_Source M=`pwd`
make[1]: Entering directory `/home/arun/Linux_Source'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are
missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
make[1]: *** No rule to make target `Device'. Stop.
make[1]: Leaving directory `/home/arun/Linux_Source'
make: *** [all] Error 2
//----------------------------------------------------------
PS:
The kernel Source i am using is a Copy of my Git Repository and is a
copy of the branch 3.10.25.
my system details are:
Linux linux-nwya.site 3.10.25-2.10-desktop #2 SMP PREEMPT Tue Jan 7
00:25:03 IST 2014 i686 i686 i386 GNU/Linux
next reply other threads:[~2014-01-08 21:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 21:30 Arun M Kumar [this message]
2014-01-08 21:37 ` Issue compiling Kernel Module Valentina Manea
2014-01-09 1:21 ` Valdis.Kletnieks at vt.edu
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=52CDC363.3040603@gmail.com \
--to=arunkr.linux@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.