Skip to main content

Thread: make: Nothing to be done for `all'. while compiling my first hello world kernel modul


hi all,

following basic tutorial learn compile first hello-world kernel module.
========================
/*
first_mod.c
first kernel module.
*/

#include <linux/module.h> /* needed modules */
#include <linux/kernel.h> /* needed kern_info*/
int init_module(void)
{
printk(kern_info "hello world 1.\n");

/*
* non 0 return means init_module failed; module can't loaded.
*/
return 0;
}

void cleanup_module(void)
{
printk(kern_info "goodbye world 1.\n");
}

========================

, makefile:
=========================
obj-m += first_mod.o

all:
make -c /lib/modules/$(shell uname -r)/build m=$(pwd) modules

clean:
make -c /lib/modules/$(shell uname -r)/build m=$(pwd) clean
=========================

when make gives me error:
sudipto@sudipto-thinkpad-t61p:~/kernel_workspace/development/module_development$ ll
total 16
drwxr-xr-x 2 sudipto sudipto 4096 2011-07-02 20:47 ./
drwxr-xr-x 4 sudipto sudipto 4096 2011-07-02 19:52 ../
-rw-r--r-- 1 sudipto sudipto 396 2011-07-02 20:13 first_mod.c
-rw-r--r-- 1 sudipto sudipto 173 2011-07-02 20:47 makefile
sudipto@sudipto-thinkpad-t61p:~/kernel_workspace/development/module_development$ make
make: nothing done `all'.
sudipto@sudipto-thinkpad-t61p:~/kernel_workspace/development/module_development$

heavily appreciated

inside makefile, tab character critical. on line after "all:", "make", there must tab before "make". without tab (for instance if used spaces) receive error.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Packaging and Compiling Programs [SOLVED] make: Nothing to be done for `all'. while compiling my first hello world kernel modul


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support