Re: Kbuilds and Makefiles in building the kernel

Nick Huang <[email protected]> Thu, 27 Nov 2025 19:26:26 +0800
Newsgroups gmane.linux.newbie
Message-ID <CABZAGRH_78O_sWNK9w0rE04wD=NtLVVYfEsyFRGZGTqP3CVMnw@mail.gmail.com>
Abraham Zsombor Nagy <[email protected]> =E6=96=BC 2025=E5=B9=B411=E6=9C=
=8827=E6=97=A5=E9=80=B1=E5=9B=9B =E4=B8=8B=E5=8D=886:43=E5=AF=AB=E9=81=93=
=EF=BC=9A
>
> Hello,
>
> https://docs.kernel.org/kbuild/makefiles.html#the-kbuild-files states
> that when a directory contains a Kbuild file, the Makefile is skipped in
> that directory.
>
> It feels to me that both files are in use e.g. under arch/x86/ directory.
>
> I'm trying to see what files are the core of the kernel and what files
> can be configured for x86 by partially parsing the Makefiles and the
> Kbuild files. Would it be sufficient to parse them as:
>
> if file =3D=3D "Makefile" or file =3D=3D "Kbuild":
>
>  > parse(file)
>
> or it should prefer the Kbuild file when present, or it is using some
> other logic?
>
> Sincerely,
>
> Abraham Nagy
>
>

Hi  Abraham Zsombor Nagy
What functionality are you trying to add that would require modifying
the Makefile or Kbuild?

Sincerely,
Nick Huang