Step 1: Add a Source File to the Build System
To begin adding a new plugin, create a new source file in the litmus/ directory and add it to the build system.
Create the empty file litmus/sched_demo.c (all file names are relative to the kernel repository).
$ touch litmus/sched_demo.c
Edit the file litmus/Makefile to add sched_demo.o to the list named obj-y.
- Compile the kernel to ensure that everything works.
After you've verified there are no errors, create commit with git.
$ git add litmus/Makefile $ git add litmus/sched_demo.c $ git commit
On to the next step.