How do I extract x86 related files from kernel source code?
I am trying to create a cscope index for x86 kernel source files only.
I need to know what files may be needed to work with just x86 source开发者_运维百科 code.
How can I do this?
Create an cscope.files
, which will include only files from subfolders:
arch/x86/
There was also asm-x86 or asm-i386 in include directory; but in 3.0 kernel these files are moved to arch/x86 too
This will be for only x86-arch-specific code and will not include generic (multiarch) code.
If you want to get cscope for all generic files AND for x86-specific, include into your cscope.files file:
every top folder, but not arch (block, crypto, drivers, firmware, fs, include,
init, ipc,kernel,lib,mm,net,sound,tools,usr,virt)
and arch/x86 folder
The linux kernel has a make target to index the code for cscope.
make cscope
should do the trick. To filter for a specific architecture, set the 'ARCH' environement variable first:
ARCH=x86 make cscope
The command will include all the x86 asm directories and leave out the rest. I did not specifically test for x86, but I use it all the time with 'arm'.
精彩评论