Can I just remove code of other architectures and get a clean X86 source

Carlo Caione carlo at caione.org
Thu May 12 09:17:17 EDT 2016


On Thu, May 12, 2016 at 2:50 PM, walkerlala <ablacktshirt at gmail.com> wrote:
>      Hi everyone.
>      I am just reading the kernel code, adding some code to make it
> pause and print some text and then interact with it a little bit. I have
> compile the kernel successfully and run the kernel in QEMU. It did
> work.Nice.
>      But, when I reading the source, I found that there are just too
> many files there, which make it hard for me to manage. With so many
> files, It's hard to change directories, read and modified and still
> remember what you are doing (so many files with the same/similar name).
>      I know that's because Linux support many architectures, and that 's
> the reason why there are so many folders under the 'arch' directory of
> the source code.
>      So, I wonder, as I only want the source for x86 device, can I
> simply remove that source files which are unrelated to x86 and still
> make the kernel work as normal? I mean, can I just remove all the
> directory under 'arch' except 'x86-64' ? Also, are there any other files
> that I can safely removed and won't hurt the kernel ?
>      Thanks in advance.
>      (btw, I don't know whether this question is asked before. I google
> it but find nothing related. If it's duplicated, please give me some
> pointer to the mailing list where this topic located )

Navigate with cscope only on one architecture:

make ARCH=arm cscope

-- 
Carlo Caione



More information about the Kernelnewbies mailing list