Write a simple LKM, compile it, load it, and run it.
- [Voiceover] To compile modules you use the kernel makefile…and a command like "make -C"…then the path name to the directory…where the kernel makefile is,…and then "M=$PWD."…M is a macro used by the kernel makefile.…PWD is the shell variable, of course,…of what directory we're in,…so what we're trying to do is compile modules…in the directory we're in right now.…And we compile modules using the target module.…So we're doing a make modules using the kernel makefile…and telling the kernel makefile to make modules…in our current directory.…
Let's say we had a module source file named "mod.c"…in our current directory.…Also, in that current directory we would need the makefile.…The kernel makefile would look for our makefile.…And in our makefile the kernel makefile looks…to see for a list of objects assigned to the macro "obj-m,"…and it will make modules out of all those object files.…So our current directory makefile needs…to have "obj-m"…set to "mod.o."…Now we don't have a mod.o yet, we only have a mod.c,…but it'll figure that out.…
We survey the Linux kernel specification, boot process, and loadable kernel modules. You will practice techniques such as downloading and searching Linux kernel source code and configuring a Linux kernel from scratch. Challenge and solution videos at the end of almost every chapter allow you to test your new Linux skills along the way.
- What is the Linux kernel?
- Controlling hardware
- Reading Linux kernel messages
- Reading and writing files from the proc and sysfs filesystems
- Configuring GRUB
- Using kernel command-line parameters
- Configuring run levels
- Working with loadable kernel modules (LKMs)
- Searching the kernel source code
- Building and installing a Linux kernel
Skill Level Advanced
Learning Linux for PHP Developers (2014)with Jon Peck3h 52m Beginner
1. Surveying the Linux Kernel
3. Working with Loadable Kernel Modules
4. Examining Linux Kernel Source Code
5. Configuring and Building a Linux Kernel
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.