From the course: Linux Device Drivers: Reading, Writing, and Debugging

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Challenge: Write, trace, debug

Challenge: Write, trace, debug

(upbeat music) - [Instructor] Some challenges. These are kind of tough, might take a little time, might take a little digging, but some valuable skills and knowledge if you can get through 'em. So we're going to show you on the next slide a skeleton of a module just like we showed you before and we're going to show you the makefile. So, they are in the lab exercise directory for chapter three, but I tell you what, if you type 'em in, you'll remember what's going on better. So, it's up to you. But after that, then you want to build your module, insert it, remove it, and there's printk's in there, so look at dmesg for those messages. So there's the code, put that in skeleton.c, and then make a makefile, which is that one line. If you call it something besides skeleton.c, like banana.c, then that would be banana.o. Another thing, if you type it in and you have any typos, then you'll learn (laughs) from that mistake when you get error messages. Alright, another challenge. So we talked…

Contents