Question about build md.c in the kernel source tree
Hi:
I am reading linux software RAID(MD) source code. I want to add some "printk" information in the md.c file. But md.c has been build in the kernel. How can i only build the md.c file without building the whole kernel source tree? Thanks a lot!
zkwang
Quoted 3 lines · On Monday March 27, [email protected] wrote:
Hi:
I am reading linux software RAID(MD) source code. I want to add some "printk" information in themd.cfile. Butmd.chas been build in the kernel. How can i only build themd.cfile without building the whole kernel source tree? Thanks a lot!
Edit .config
remove the line
CONFIG_BLK_DEV_MD=y
run 'make oldconfig'
When it asks you about the md driver and 'm' for module rather than 'y' for yes.
Then md will be built as a module, producing md_mod.ko and raid*.ko. These can then be loaded into the running kernel with 'insmod' and removed with 'rmmod'.
NeilBrown
Quoted 8 lines
zkwang
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
* pls add a text wrap at ~80 in u email client.
* once u build whole kernel once, and u only make change in md.c, u can do kernel redo and make process will automatically only rebuild md.c. then u install the new kernel and check u changes.
ming
Quoted 11 lines · Zhikun Wang
Hi:
I am reading linux software RAID(MD) source code. I want to add some "printk" information in themd.cfile. Butmd.chas been build in the kernel. How can i only build themd.cfile without building the whole kernel source tree? Thanks a lot!zkwang
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html