From 6e4dfa7528a5098c09ad5dcfe26ba2b2e504a3b1 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Thu, 9 Mar 2023 19:51:31 -0600 Subject: [PATCH 1/4] Tweak kernel version in host requirements --- chapter02/hostreqs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter02/hostreqs.xml b/chapter02/hostreqs.xml index e3a06df4e..801a7e992 100644 --- a/chapter02/hostreqs.xml +++ b/chapter02/hostreqs.xml @@ -197,7 +197,7 @@ ver_check() ver_kernel() { - kver=$(uname -r | grep -E -o '[0-9\.]+') + kver=$(uname -r | grep -E -o '^[0-9\.]+') if printf '%s\n' $1 $kver | sort --version-sort --check &>/dev/null then printf "OK: Linux Kernel $kver >= $1\n"; return 0; From 34f1344072936506032e2ef77bf8aac5eef1ec2b Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 9 Mar 2023 13:57:45 +0800 Subject: [PATCH 2/4] Revert "Suggest make localmodconfig for kernel" This reverts commit de679165f9a63ce94202d356abbae2b9a3bff5c3. localmodconfig does not work very well. It can only *un*select things already enabled as modules if the module is not loaded by the host. It won't select anything new, nor unselect unneeded things already set to "y" instead of "m". Maybe you think we can copy .config from a "mainstream" distro (producing a highly modular kernel) and use "make localmodconfig", but when we tested it with a Debian host kernel config, the resulted kernel refuses to boot. "make allmodconfig && make localmodconfig" does not work well either: "allmodconfig" selects many things as y (these thing are not available as a module) but "localmodconfig" fails to unselect them. --- chapter10/kernel.xml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 023aa32b9..7c64e0983 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -98,25 +98,15 @@ A good starting place for setting up the kernel configuration is to - run make localmodconfig. If the host kernel version - is not too different from the version of the kernel you are building, - this will set the base configuration to a good state similar to what - the host uses. Another possibility is to use make - localyesconfig, which does the same except everything is built - into the kernel. + run make defconfig. This will set the base + configuration to a good state that takes your current system architecture + into account. Do not disable any option enabled by make - localmodconfig unless the following notes explicitly make it + defconfig unless the following note explicitly makes it disabled or you really know what you are doing. - - Another possibility is to run make defconfig, - which creates a more generic configuration for your architecture. You - may then have to disable drivers for hardware you do not have if - you want to reduce the kernel size. - - Be sure to enable/disable/set the following features or the system might not work correctly or boot at all: @@ -322,7 +312,7 @@ Device Drivers ---> Support running the interrupt controller of 64-bit x86 processors in x2APIC mode. x2APIC may be enabled by firmware on 64-bit x86 systems, and a kernel without this option enabled will - panic on boot if x2APIC is enabled by firmware. This option + panic on boot if x2APIC is enabled by firmware. This option has has no effect, but also does no harm if x2APIC is disabled by the firmware. From 10262709515b6e4f5355441e7e7f3c8853f5b95d Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 10 Mar 2023 18:07:46 +0800 Subject: [PATCH 3/4] Revert "kernel: Use for make defconfig and..." This reverts commit d0a9bda4e696f4be02499b87c2bd6d8f40a3d4a3. "Don't change anything enabled by defconfig" seems too strong. --- chapter10/kernel.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 7c64e0983..4618cc18e 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -96,18 +96,12 @@ information about configuring and building the kernel can be found at - + A good starting place for setting up the kernel configuration is to run make defconfig. This will set the base configuration to a good state that takes your current system architecture into account. - Do not disable any option enabled by make - defconfig unless the following note explicitly makes it - disabled or you really know what you are doing. - - - Be sure to enable/disable/set the following features or the system might not work correctly or boot at all: From 0bf56aadbd89606633c1bf75baef79f27a4efe6e Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 10 Mar 2023 18:47:59 +0800 Subject: [PATCH 4/4] kernel: Some adjustments - Mention NVME. - Mention PAE (CONFIG_HIGHMEM64G) for 32-bit. - Don't repeat the link to BLFS kernel config index twice on SysV. And don't display the long URL for it. - Emphasis that BLFS UEFI kernel config is needed even if you'll use the UEFI bootloader of the host distro. --- chapter10/kernel.xml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 4618cc18e..9224cbbf3 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -89,12 +89,9 @@ For general information on kernel configuration see . BLFS has some information - regarding particular kernel configuration requirements of packages outside - of LFS at . Additional + url="&hints-root;kernel-configuration.txt"/>. Additional information about configuring and building the kernel can be found at - + . A good starting place for setting up the kernel configuration is to @@ -179,6 +176,23 @@ Device Drivers ---> [*] Message Signaled Interrupts (MSI and MSI-X) [CONFIG_PCI_MSI] [*] IOMMU Hardware Support ---> [CONFIG_IOMMU_SUPPORT] [*] Support for Interrupt Remapping [CONFIG_IRQ_REMAP] + + If you are building a 32-bit system running on a hardware + with RAM more than 4GB, adjust the configuration so the kernel will + be able to use up to 64GB physical RAM: + + Processor type and features ---> + High Memory Support ---> + (X) 64GB [CONFIG_HIGHMEM64G] + + If the partition for the LFS system is in a NVME SSD (i. e. the + device node for the parition is /dev/nvme* + instead of /dev/sd*), enable NVME support or + the LFS system won't boot: + + Device Drivers ---> + NVME Support ---> + <*> NVM Express block device [CONFIG_BLK_DEV_NVME] @@ -186,18 +200,18 @@ Device Drivers ---> required, it is highly recommended by the systemd developers. - There are several other options that may be desired + There are several other options that may be desired depending on the requirements for the system. For a list of options needed for BLFS packages, see the BLFS - Index of Kernel Settings - (&lfs-root;blfs/view/&short-version;/longindex.html#kernel-config-index). + Index of Kernel Settings. If your host hardware is using UEFI and you wish to boot the LFS system with it, you should adjust some kernel configuration following - the BLFS page. + the BLFS page even if you'll use the + UEFI bootloader from the host distro.