--- /dev/null
+# Makefile of hello.o - my first kernel module.
+
+INCLUDEDIR = /usr/include
+
+CFLAGS = -D__KERNEL__ -DMODULE -O -Wall -I$(INCLUDEDIR)
+
+# findout kernel version.
+VER = $(shell awk -F\" '/REL/ {print $$2}' $(INCLUDEDIR)/linux/version.h)
+
+OBJS = hello.o
+
+all: $(OBJS)
+
+#hello.o: hello.o
+# $(LD) -r $^ -o $@
+
+install:
+ install -d /lib/modules/$(VER)/misc
+ install -c hello.o /lib/modules/$(VER)/misc
+
+clean:
+ rm -f *.o *~ core
+
+uninstall:
+ rm -f /lib/modules/$(VER)/misc/hello.o
+
--- /dev/null
+/* my first kernel driver :-) */
+
+#define MODULE
+#include <linux/module.h>
+
+int init_module(void) {
+ printk("<1>hi hackbard, here is your kernel speaking! :)\n");
+ return 0;
+}
+
+void cleanup_module(void) {
+ printk("<1>bye hackbard ...\n");
+}
+