简体   繁体   中英

Linux Kernel Examination in Windows

I want to examine the Linux kernel source code using Visual Studio on Windows. But I don't know how to do that. Do I need a virtual machine to run or debug the kernel or is there any special way for me to do that ???

What does "kernel examination" means to you?

Why can't you more simply study the source code of the Linux kernel?

It is free software , you cant fetch its source code from kernel.org

it is extremely likely that your Linux vendor publishes either the source code of his variant of Linux kernel, or patches against vanilla kernel source code. The GPLv2 license of the Linux kernel nearly requires such a behavior.

And a Linux system gives you a lot of tools ( objdump , ....) to study ELF executable image (like the Linux kernel mostly is....)

You probably won't be able to compile the Linux kernel with Visual Studio. You need GCC (or a very compatible compiler). Linux source code uses many GCC extensions.

My advice is to install a Linux system on your development machine (you can have a dual boot if you want to keep Windows for games....) and to learn it and to use Linux tools (including emacs , grep , etags etc....) to study the source code of Linux. Remember that Linux is the preferred platform to build the Linux kernel... (if your distribution is Debian or Ubuntu or similar, learn about make-kpkg )

Also read some good books about Advanced Linux Programming and about the Linux kernel (there are many of them).

BTW, you could even customize your GCC compiler, eg with a plugin or a MELT extension, to measure, search, or even refactor the source code of the kernel. See also cocinelle .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM