Merge branch 'trunk' into xry111/arm64

This commit is contained in:
Xi Ruoyao 2023-03-12 21:12:44 +08:00
commit 70f30e9874
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
2 changed files with 46 additions and 12 deletions

View File

@ -203,7 +203,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;

View File

@ -45,6 +45,38 @@
in the kernel source tree for alternative methods to the way this book
configures the kernel.</para>
<important>
<para>
Building the linux kernel for the first time is one of the most
challenging tasks in LFS. Getting it right depends on the specific
hardware for the target system and your specific needs. There are
almost 12,000 configuration items that are available for the kernel
although only about a third of them are needed for most computers. The
LFS editors recommend that users not familiar with this process follow
the procedures below fairly closely. The objective is to get an
initial system to a point where you can log in at the command line when
you reboot later in <xref linkend="ch-finish-reboot"/>. At his point
optimization and customization is not a goal.
</para>
<para>
For general information on kernel configuration see <ulink
url="&hints-root;kernel-configuration.txt"/>. Additional information
about configuring and building the kernel can be found at <ulink
url="&anduin-sources;/kernel-nutshell/"/>.
These references are a bit
dated, but still give a reasonable overview of the process.
</para>
<para>
If all else fails, you can ask for help on the <ulink
url="https://www.linuxfromscratch.org/mail.html">lfs-support</ulink>
mailing list. Note that subscribing is required in order for the list
to avoid spam.
</para>
</important>
<para>Prepare for compilation by running the following command:</para>
<screen><userinput remap="pre">make mrproper</userinput></screen>
@ -88,13 +120,6 @@
<!-- Support for compiling a keymap into the kernel is deliberately removed -->
<para>For general information on kernel configuration see <ulink
url="&hints-root;kernel-configuration.txt"/>. BLFS has some information
regarding particular kernel configuration requirements of packages outside
of LFS at <ulink
url="&blfs-book;longindex.html#kernel-config-index"/>. Additional
information about configuring and building the kernel can be found at
<ulink url="http://www.kroah.com/lkn/"/> </para>
<note>
<para>A good starting place for setting up the kernel configuration is to
@ -169,6 +194,15 @@ File systems ---&gt;
[*] Inotify support for userspace [CONFIG_INOTIFY_USER]
Pseudo filesystems ---&gt;
[*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]</screen>
<para>If the partition for the LFS system is in a NVME SSD (i. e. the
device node for the partition is <filename>/dev/nvme*</filename>
instead of <filename>/dev/sd*</filename>), enable NVME support or
the LFS system won't boot:</para>
<screen role="nodump">Device Drivers ---&gt;
NVME Support ---&gt;
&lt;*&gt; NVM Express block device [CONFIG_BLK_DEV_NVME]</screen>
</note>
<note revision="systemd">
@ -176,18 +210,18 @@ File systems ---&gt;
required, it is highly recommended by the systemd developers.</para>
</note>
<para revision="sysv">There are several other options that may be desired
<para>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 <ulink
url="&lfs-root;blfs/view/&short-version;/longindex.html#kernel-config-index">BLFS
Index of Kernel Settings</ulink>
(&lfs-root;blfs/view/&short-version;/longindex.html#kernel-config-index).</para>
Index of Kernel Settings</ulink>.</para>
<note>
<para>If your host hardware is using UEFI and you wish to boot the
LFS system with it, you should adjust some kernel configuration
following <ulink url="&blfs-book;postlfs/grub-setup.html#uefi-kernel">
the BLFS page</ulink>.</para>
the BLFS page</ulink> <emphasis role='bold'>even if you'll use the
UEFI bootloader from the host distro</emphasis>.</para>
</note>
<variablelist>