From 344f0f271daac9ad77c5b1da2ed59c3a3e394e13 Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Thu, 4 Jun 2020 14:50:18 +0200 Subject: Use configuration file under /boot instead of /proc/config.gz kern(1) has been using /proc/config.gz as the source of the currently running kernel's config since its initial commit. Whilst this location is convenient because of its static nature, it does need a specific kernel option, IKCONFIG_PROC, to be set. Furthermore, it introduces a dependency on gzip(1) to decompress the file on the fly. Consequently, we need to stream gzip's output to commands or save it in a temporary file to access it neatly. Since Gentoo's default install script for the kernel, installkernel(8), places each kernel's configuration file in /boot, we can use this location to retrieve the currently running kernel's configuration instead and work around all of the above limitations. Of course we need to make sure that /boot is mounted before we try accessing any configuration files on there. We use the already existing code from install_kernel() for that. --- kern.1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'kern.1') diff --git a/kern.1 b/kern.1 index 79dcad2..ac3e4e2 100644 --- a/kern.1 +++ b/kern.1 @@ -1,4 +1,4 @@ -.Dd May 16, 2020 +.Dd June 4, 2020 .Dt KERN 1 .Os .Sh NAME @@ -103,9 +103,8 @@ to display the differences between the generated kernel configuration and .Pp If no config is given, this command compares against the configuration of the currently running kernel. -This requires -.Sy IKCONFIG_PROC -to be enabled. +This requires the configuration file to be present under +.Pa /boot . .It Sy build Builds the selected kernel. .It Sy install -- cgit v1.2.3-2-gb3c3