Today I saw the fourth module and the fifth chapter of the Linux device driver development.
Seniors gave a task: Remove the DM9000 driver module from the Linux kernel and recompile the kernel.
This article is certainly not perfect now, I will make up the whole later, so first hit a "@" mark.
First, I found the location of the DM9000 driver module from the file, under ~/drives/net. So, I looked at makefile from the root of the Linux kernel and went down the ladder until I found the makefile file under the Net Folder, and I found that it called DM9000, and in Kconfig I saw if it contained DM9000 resources, and found that there was no ... So I just made the following changes:
obj-$ (config_dm9000) + = DM9000.O
Switch
#obj-$ (config_dm9000) + = DM9000.O
Is the comment out ...
I then execute the following command at the root of the Linux kernel to compile the kernel into a new image file.
Make Cleanmake menuconfigmake zimagemake modules
Next, I'll debug. At the moment, I'm still confused about how to debug the Linux kernel on a Linux virtual machine ... Tomorrow, Mom, I'll try.
This part will be updated in a few days.
Adding and removing Linux kernel driver modules @