From 71df0cfa0fef8f94bd118ef9e950bc797d9c3893 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 13 Dec 2024 12:47:17 +0800 Subject: [PATCH] kernel: Note that make mrproper shouldn't be run for rebuild --- chapter10/kernel.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 971703466..5aac36b8d 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -466,6 +466,26 @@ chown -R 0:0 on the linux-&linux-version; directory to ensure all files are owned by user root. + + If you are updating the configuration and rebuilding the kernel + from a retained kernel source tree, normally you should + not run the + make mrproper command. The command would purge + the .config file and all the + .o files from the previous + build. Despite it's easy to restore .config from + the copy in /boot, purging all + the .o files is still a waste: + for a simple configuration change, often only a few + .o files need to be (re)built + and the kernel build system will correctly skip other + .o files if they are not + purged. + + On the other hand, if you've upgraded GCC, you should run + make clean to purge all the + .o files from the previous + build, or the new build may fail.