Linux Today: Linux News On Internet Time.





More on LinuxToday


/dev/hello_world: A Simple Introduction to Device Drivers Under Linux

Jul 09, 2007, 06:00 (0 Talkback[s])
(Other stories by Valerie Henson)

"Since the misty days of yore, the first step in learning a new programming language has been writing a program that prints 'Hello, world!' (See the Hello World Collection for a list of more than 300 'Hello, world!' examples.) In this article, we will use the same approach to learn how to write simple Linux kernel modules and device drivers. We will learn how to print 'Hello, world!' from a kernel module three different ways: printk(), a /proc file, and a device in /dev.

"For the purposes of this article, a kernel module is a piece of kernel code that can be dynamically loaded and unloaded from the running kernel. Because it runs as part of the kernel and needs to interact closely with it, a kernel module cannot be compiled in a vacuum..."

Complete Story

Related Stories: