From 71df0cfa0fef8f94bd118ef9e950bc797d9c3893 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 13 Dec 2024 12:47:17 +0800 Subject: [PATCH 1/2] 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. From d095cba8b6bcf7dc12cd10991f72122dde8e8b1f Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 13 Dec 2024 12:48:23 +0800 Subject: [PATCH 2/2] kernel: Remove outdated note not to update kernel API headers We now consider upgrading kernel API headers safe. --- chapter10/kernel.xml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 5aac36b8d..327e3de60 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -497,17 +497,6 @@ complete. - - The headers in the system's include directory (/usr/include) should - always be the ones against which Glibc was compiled, - that is, the sanitised headers installed in . Therefore, they should - never be replaced by either the raw kernel headers - or any other kernel sanitized headers. - -