Linux Device Drivers tutorial make [closed]

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Hi I am very new to kernel development and am following this tutorial
.
When I try to make module:
#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
printk(KERN_ALERT "Hello, worldn");
return 0;
static void hello_exit(void)
printk(KERN_ALERT "Goodbye, cruel worldn");
module_init(hello_init);
module_exit(hello_exit);
using "make" and the makefile as written in the book.
obj-m := hello.o
I get error
make: *** no targets. stop.
Please help and Thank you in advance
linux kernel
closed as off-topic by Jeff Schaller, Stephen Rauch, Kusalananda, G-Man, sebasth Oct 22 '17 at 21:08
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." â Kusalananda, sebasth
add a comment |Â
up vote
0
down vote
favorite
Hi I am very new to kernel development and am following this tutorial
.
When I try to make module:
#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
printk(KERN_ALERT "Hello, worldn");
return 0;
static void hello_exit(void)
printk(KERN_ALERT "Goodbye, cruel worldn");
module_init(hello_init);
module_exit(hello_exit);
using "make" and the makefile as written in the book.
obj-m := hello.o
I get error
make: *** no targets. stop.
Please help and Thank you in advance
linux kernel
closed as off-topic by Jeff Schaller, Stephen Rauch, Kusalananda, G-Man, sebasth Oct 22 '17 at 21:08
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." â Kusalananda, sebasth
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Hi I am very new to kernel development and am following this tutorial
.
When I try to make module:
#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
printk(KERN_ALERT "Hello, worldn");
return 0;
static void hello_exit(void)
printk(KERN_ALERT "Goodbye, cruel worldn");
module_init(hello_init);
module_exit(hello_exit);
using "make" and the makefile as written in the book.
obj-m := hello.o
I get error
make: *** no targets. stop.
Please help and Thank you in advance
linux kernel
Hi I am very new to kernel development and am following this tutorial
.
When I try to make module:
#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
printk(KERN_ALERT "Hello, worldn");
return 0;
static void hello_exit(void)
printk(KERN_ALERT "Goodbye, cruel worldn");
module_init(hello_init);
module_exit(hello_exit);
using "make" and the makefile as written in the book.
obj-m := hello.o
I get error
make: *** no targets. stop.
Please help and Thank you in advance
linux kernel
edited Oct 22 '17 at 17:24
GAD3R
22.7k154895
22.7k154895
asked Oct 22 '17 at 17:18
muhammad shoaib
41
41
closed as off-topic by Jeff Schaller, Stephen Rauch, Kusalananda, G-Man, sebasth Oct 22 '17 at 21:08
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." â Kusalananda, sebasth
closed as off-topic by Jeff Schaller, Stephen Rauch, Kusalananda, G-Man, sebasth Oct 22 '17 at 21:08
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." â Kusalananda, sebasth
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
a sample Makefile:
obj-m += hello.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
The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
a sample Makefile:
obj-m += hello.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
The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.
add a comment |Â
up vote
1
down vote
a sample Makefile:
obj-m += hello.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
The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
a sample Makefile:
obj-m += hello.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
The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.
a sample Makefile:
obj-m += hello.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
The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.
edited Oct 22 '17 at 20:06
Jeff Schaller
32.1k849109
32.1k849109
answered Oct 22 '17 at 18:17
GAD3R
22.7k154895
22.7k154895
add a comment |Â
add a comment |Â