From 50e70dbc1f572fd7c3c5ca8978e8391fce54480c Mon Sep 17 00:00:00 2001 From: David Bryant Date: Fri, 23 Sep 2022 14:08:34 -0500 Subject: [PATCH 1/7] Clarify verbiage in chapter 2.6 (Setting the $LFS Variable). --- chapter02/aboutlfs.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chapter02/aboutlfs.xml b/chapter02/aboutlfs.xml index 41b50a2a0..85ffd5b57 100644 --- a/chapter02/aboutlfs.xml +++ b/chapter02/aboutlfs.xml @@ -14,8 +14,8 @@ be used several times. You should ensure that this variable is always defined throughout the LFS build process. It should be set to the name of the directory where you will be building your LFS system - we will use - /mnt/lfs as an example, but the - directory choice is up to you. If you are building LFS on a separate + /mnt/lfs as an example, but you may + choose any directory name you want. If you are building LFS on a separate partition, this directory will be the mount point for the partition. Choose a directory location and set the variable with the following command: @@ -25,7 +25,7 @@ Having this variable set is beneficial in that commands such as mkdir -v $LFS/tools can be typed literally. The shell will automatically replace $LFS with - /mnt/lfs (or whatever the variable was set to) when it + /mnt/lfs (or whatever value the variable was set to) when it processes the command line. @@ -49,7 +49,7 @@ personal home directory and in /root/.bash_profile and enter the export command above. In addition, the shell specified in the /etc/passwd file for all users that need the - LFS variable needs to be bash to ensure that the + LFS variable must be bash to ensure that the /root/.bash_profile file is incorporated as a part of the login process. @@ -59,9 +59,9 @@ a virtual terminal is started. In this case, add the export command to the .bashrc file for the user and root. In addition, - some distributions have instructions to not run the .bashrc - instructions in a non-interactive bash invocation. Be sure to add the - export command before the test for non-interactive use. + some distributions use an "if" test, and do not run the remaining .bashrc + instructions for a non-interactive bash invocation. Be sure to place the + export command ahead of the test for non-interactive use. From 81793c6efc67ebcd2e43cf3b9ebc659bbffa17f1 Mon Sep 17 00:00:00 2001 From: David Bryant Date: Fri, 23 Sep 2022 14:57:48 -0500 Subject: [PATCH 2/7] Minor changes to verbiage in chapter 3.2 (All Packages) --- chapter03/packages.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chapter03/packages.xml b/chapter03/packages.xml index 244c1ed2c..d82e0b4c4 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -15,14 +15,14 @@ before downloading packages to figure out if a newer version of any package should be used to avoid security vulnerabilities. - The upstreams may remove old releases, especially when these + The upstream sources may remove old releases, especially when those releases contain a security vulnerability. If one URL below is not reachable, you should read the security advisories first to figure out if a newer version (with the vulnerability fixed) should be used. If not, try to download the removed package from a mirror. Although it's possible to download an old release from a mirror even if this release - has been removed because of a vulnerability, it's not recommended to - use a release known to be vulnerable for building your system. + has been removed because of a vulnerability, it's not a good idea to + use a release known to be vulnerable when building your system. Download or otherwise obtain the following packages: @@ -453,7 +453,7 @@ MD5 sum: &linux-md5; - The Linux kernel is updated relatively often, many times due to + The Linux kernel is updated quite frequently, many times due to discoveries of security vulnerabilities. The latest available stable kernel version may be From 1cb4a25b36d2c3fbe58aa4df4dd67159b1fc6da2 Mon Sep 17 00:00:00 2001 From: David Bryant Date: Fri, 23 Sep 2022 15:16:02 -0500 Subject: [PATCH 3/7] Tweak English idiom in chapter 4.1 (Introduction) --- chapter04/introduction.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chapter04/introduction.xml b/chapter04/introduction.xml index c54c67f8c..e2ef6f0ba 100644 --- a/chapter04/introduction.xml +++ b/chapter04/introduction.xml @@ -12,11 +12,11 @@ In this chapter, we will perform a few additional tasks to prepare for building the temporary system. We will create a set of directories in - $LFS for the installation of the - temporary tools, add an unprivileged user to reduce risk, + $LFS (in which we will install the + temporary tools), add an unprivileged user, and create an appropriate build environment for that user. We will also - explain the unit of time we use to measure how long LFS packages take to - build, or SBUs, and give some information about package + explain the units of time (SBUs) we use to measure how + long it takes to build LFS packages, and provide some information about package test suites. From 2ed0e93787a61f663503cc28e7db257e73e1685c Mon Sep 17 00:00:00 2001 From: David Bryant Date: Fri, 23 Sep 2022 15:52:30 -0500 Subject: [PATCH 4/7] Refine verbiage in chapter 4.2 (Creating a limited directory layout). --- chapter04/creatingminlayout.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/chapter04/creatingminlayout.xml b/chapter04/creatingminlayout.xml index cc640a450..7bc0321d2 100644 --- a/chapter04/creatingminlayout.xml +++ b/chapter04/creatingminlayout.xml @@ -10,14 +10,14 @@ Creating a limited directory layout in LFS filesystem - The first task performed in the LFS partition is to create a limited - directory hierarchy so that programs compiled in The next task to be performed in the LFS partition is to create a limited + directory hierarchy, so that the programs compiled in (as well as glibc and libstdc++ in ) may be installed in their final - location. This is needed so that those temporary programs be overwritten - when rebuilding them in . + linkend="chapter-cross-tools"/>) can be installed in their final + location. We do this so those temporary programs will be overwritten when + the final versions are built in . - Create the required directory layout by running the following as + Create the required directory layout by issuing the following commands as root: mkdir -pv $LFS/{etc,var} $LFS/usr/{bin,lib,sbin} @@ -31,10 +31,10 @@ case $(uname -m) in esac Programs in will be compiled - with a cross-compiler (more details in section ). In order to separate this - cross-compiler from the other programs, it will be installed in a special - directory. Create this directory with: + with a cross-compiler (more details can be found in section ). This cross-compiler will be installed + in a special directory, to separate it from the other programs. Still acting as + &root;, create that directory with this command: mkdir -pv $LFS/tools From f001ece90548140698fe0a2f02c1690aecbb9933 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 24 Sep 2022 18:48:50 +0800 Subject: [PATCH 5/7] creatingfilesystem: Refine the condition where a FS is needed For example, a swap partition does not contain any FS. And, if you want to clone a partition, you can use dd if=/dev/ of=/dev/ then it's unnecessary to create a FS on new-partition before operation. This is sometimes faster than creating a new FS, mounting both partition, then "cp -av" if the old-partition contains many small files. --- chapter02/creatingfilesystem.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter02/creatingfilesystem.xml b/chapter02/creatingfilesystem.xml index bd442d5e2..5eedf456e 100644 --- a/chapter02/creatingfilesystem.xml +++ b/chapter02/creatingfilesystem.xml @@ -12,7 +12,7 @@ A partition is just a range of sectors on a disk drive, delimited by boundaries set in a partition table. Before the operating system can use - a blank partition, the partition must be formatted to contain a file + a partition to store any files, the partition must be formatted to contain a file system, typically consisting of a label, directory blocks, data blocks, and an indexing scheme to locate a particular file on demand. The file system also helps the OS keep track of free space on the partition, reserve the From ad9fbd14ae3081faf42dd60a60c56df13752c4d8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 24 Sep 2022 18:56:45 +0800 Subject: [PATCH 6/7] mounting: create &fstab; conventional entity and use it --- chapter02/mounting.xml | 4 ++-- general.ent | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chapter02/mounting.xml b/chapter02/mounting.xml index 69a52c04d..f222fb052 100644 --- a/chapter02/mounting.xml +++ b/chapter02/mounting.xml @@ -47,9 +47,9 @@ mount -v -t ext4 /dev/<yyy> $LFS/homeThe above instructions assume that you will not restart your computer throughout the LFS process. If you shut down your system, you will either need to remount the LFS partition each time you restart - the build process, or modify the host system's /etc/fstab file to automatically + the build process, or modify the host system's &fstab; file to automatically remount it when you reboot. For example, you might add this line to your - /etc/fstab file: + &fstab; file: /dev/<xxx> /mnt/lfs ext4 defaults 1 1 diff --git a/general.ent b/general.ent index f378f7e20..82d69cf08 100644 --- a/general.ent +++ b/general.ent @@ -121,6 +121,7 @@ root"> lfs"> +/etc/fstab"> %packages-entities; From f4066122e0a6be21e66a26b96b85d235f2e67ba3 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 25 Sep 2022 12:56:08 +0800 Subject: [PATCH 7/7] libelf: add a x86 specific test failure It's caused by a minor GAS issue, which should be fixed in binutils-2.40. See https://sourceware.org/bugzilla/show_bug.cgi?id=29450 and https://sourceware.org/bugzilla/show_bug.cgi?id=29451. --- chapter08/libelf.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapter08/libelf.xml b/chapter08/libelf.xml index 9434a3996..7286d0a4e 100644 --- a/chapter08/libelf.xml +++ b/chapter08/libelf.xml @@ -58,7 +58,8 @@ make check - + One test named run-low_high_pc.sh is known to + fail on 32-bit x86 system. Install only Libelf: