kernel: Note that make mrproper shouldn't be run for rebuild

This commit is contained in:
Xi Ruoyao 2024-12-13 12:47:17 +08:00
parent 6d36d72175
commit 71df0cfa0f
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -466,6 +466,26 @@
<command>chown -R 0:0</command> on the <filename
class="directory">linux-&linux-version;</filename> directory to ensure
all files are owned by user <emphasis>root</emphasis>.</para>
<para>If you are updating the configuration and rebuilding the kernel
from a retained kernel source tree, normally you should
<emphasis role='bold'>not</emphasis> run the
<command>make mrproper</command> command. The command would purge
the <filename>.config</filename> file and all the
<filename class='extension'>.o</filename> files from the previous
build. Despite it's easy to restore <filename>.config</filename> from
the copy in <filename class='directory'>/boot</filename>, purging all
the <filename class='extension'>.o</filename> files is still a waste:
for a simple configuration change, often only a few
<filename class='extension'>.o</filename> files need to be (re)built
and the kernel build system will correctly skip other
<filename class='extension'>.o</filename> files if they are not
purged.</para>
<para>On the other hand, if you've upgraded GCC, you should run
<command>make clean</command> to purge all the
<filename class='extension'>.o</filename> files from the previous
build, or the new build may fail.</para>
</note>
<warning>