From 872a378f5e0b75229d2adffad621dcf95cbe5ab4 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Fri, 23 Aug 2024 13:59:56 -0500 Subject: [PATCH 1/8] Typos on comments. These changes are all in comments that do not affect the books in any way. --- aux-file-data.sh | 2 +- git-version.sh | 2 +- lfs-latest-git.php | 2 +- packages.ent | 2 +- stylesheets/lfs-xsl/chunkfast.xsl | 2 +- stylesheets/lfs-xsl/common.xsl | 4 ++-- stylesheets/lfs-xsl/pdf.xsl | 4 ++-- stylesheets/lfs-xsl/pdf/lfs-lists.xsl | 6 +++--- stylesheets/lfs-xsl/pdf/lfs-mixed.xsl | 4 ++-- stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl | 2 +- stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl | 8 ++++---- stylesheets/lfs-xsl/xhtml/lfs-sections.xsl | 4 ++-- stylesheets/lfs-xsl/xhtml/lfs-toc.xsl | 2 +- stylesheets/patcheslist.xsl | 2 +- stylesheets/wget-list.xsl | 2 +- udev-lfs/README | 2 +- udev-lfs/init-net-rules.sh | 2 +- 17 files changed, 26 insertions(+), 26 deletions(-) diff --git a/aux-file-data.sh b/aux-file-data.sh index 8be1b1d15..01539fef6 100755 --- a/aux-file-data.sh +++ b/aux-file-data.sh @@ -15,7 +15,7 @@ base=$(basename $bootscripts .tar.xz) bootsize=$(ls -l --block-size=1024 $bootscripts | cut -f5 -d" ") bootmd5=$(md5sum $bootscripts | cut -f1 -d" ") -# Figure intalled size of bootscripts +# Figure installed size of bootscripts TOPDIR=$(pwd) TMP_DIR=$(mktemp -d /tmp/lfsbootfiles.XXXXXX) pushd $TMP_DIR > /dev/null diff --git a/git-version.sh b/git-version.sh index 09a8fadd7..9d6c3fe0a 100755 --- a/git-version.sh +++ b/git-version.sh @@ -19,7 +19,7 @@ if [ -e LFS-RELEASE ]; then fi if ! git status > /dev/null; then - # Either it's not a git repository, or git is unavaliable. + # Either it's not a git repository or git is unavaliable. # Just workaround. echo " version.ent echo "" >> version.ent diff --git a/lfs-latest-git.php b/lfs-latest-git.php index ce76e970e..55c634e0b 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -322,7 +322,7 @@ function get_current() $file = basename( $line ) . "\n"; if ( preg_match( "/patch$/", $file ) ) { continue; } // Skip patches - $file = preg_replace( "/bz2/", '', $file ); // The 2 confusses the regex + $file = preg_replace( "/bz2/", '', $file ); // The 2 confuses the regex $file = rtrim( $file ); $pkg_pattern = "/(\D*).*/"; diff --git a/packages.ent b/packages.ent index 86242dd7d..e21d6b718 100644 --- a/packages.ent +++ b/packages.ent @@ -2,7 +2,7 @@ + Dropping unneeded anchors and fo:wrapper elemments. --> @@ -111,7 +111,7 @@ - + diff --git a/stylesheets/lfs-xsl/pdf.xsl b/stylesheets/lfs-xsl/pdf.xsl index ea247f5db..e1c03147c 100644 --- a/stylesheets/lfs-xsl/pdf.xsl +++ b/stylesheets/lfs-xsl/pdf.xsl @@ -27,7 +27,7 @@ - + @@ -93,7 +93,7 @@ + Addibg a bullet, left alignment, and @kepp-*.* attributes + for packages and patches list. --> @@ -135,7 +135,7 @@ diff --git a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl index e5c7ae090..f38699e9c 100644 --- a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl +++ b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl @@ -128,7 +128,7 @@ + Be sure that literal will use always normal font weight. --> @@ -139,7 +139,7 @@ + literal, option, prompt, systemitem, varname, sgmltag, tag, and uri --> diff --git a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl b/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl index 7ec85ddf4..5578fd661 100644 --- a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl +++ b/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl @@ -176,7 +176,7 @@ + Small font size and left alignment. --> - + and that do not affect the chunk algorithm. --> @@ -187,7 +187,7 @@ @@ -208,7 +208,7 @@ - + diff --git a/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl b/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl index 36c4ba3fe..5dbe2136e 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl @@ -65,7 +65,7 @@ diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl index f863edc1f..94e33b70b 100644 --- a/stylesheets/patcheslist.xsl +++ b/stylesheets/patcheslist.xsl @@ -51,7 +51,7 @@ exit - + diff --git a/stylesheets/wget-list.xsl b/stylesheets/wget-list.xsl index eca53a4c9..09f99cd22 100644 --- a/stylesheets/wget-list.xsl +++ b/stylesheets/wget-list.xsl @@ -15,7 +15,7 @@ + duplicated URLs due that may be split for PDF output --> version.ent echo "" >> version.ent diff --git a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl index f38699e9c..834b7057c 100644 --- a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl +++ b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl @@ -5,7 +5,7 @@ version="1.0"> From 948cd148be899247236e1ab8e5a9be8e0be97e29 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 25 Aug 2024 15:32:24 +0800 Subject: [PATCH 4/8] Update to lfs-bootscripts-20240825 Co-authored-by: Andrew Kreimer --- bootscripts/ChangeLog | 7 +++++++ bootscripts/lfs/lib/services/init-functions | 3 --- bootscripts/lfs/sbin/ifup.8 | 8 ++++---- chapter01/changelog.xml | 10 ++++++++++ packages.ent | 2 +- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index d3a7ed661..41576792f 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,10 @@ +2024-08-25 Xi Ruoyao + * Remove an empty line and an outdated comment (not valid anymore after + /usr merge) from init-functions. + +2024-08-24 Andrew Kreimer + * Fix typos. + 2024-08-23 Xi Ruoyao * In console, detect FB console by checking /sys/class/graphics/fbcon instead of fb0. The latter does not exist if CONFIG_FB=n, but diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions index 2bcadaa30..e13bb8a5d 100644 --- a/bootscripts/lfs/lib/services/init-functions +++ b/bootscripts/lfs/lib/services/init-functions @@ -457,11 +457,8 @@ pidofproc() # If a PID file is set and exists, use it. if [ -n "${pidfile}" -a -e "${pidfile}" ]; then - # Use the value in the first line of the pidfile pidlist=`/bin/head -n1 "${pidfile}"` - # This can optionally be written as 'sed 1q' to repalce 'head -n1' - # should LFS move /bin/head to /usr/bin/head else # Use pidof pidlist=`pidof "${program}"` diff --git a/bootscripts/lfs/sbin/ifup.8 b/bootscripts/lfs/sbin/ifup.8 index 2fb7873ec..8d08d8c14 100644 --- a/bootscripts/lfs/sbin/ifup.8 +++ b/bootscripts/lfs/sbin/ifup.8 @@ -94,7 +94,7 @@ NOTES compound device such as a bridge. ONBOOT - If set to 'yes', the specified interface is - configured by the netowrk boot script. + configured by the network boot script. GATEWAY - The default IP address to use for routing if the destination IP address is not in a static @@ -112,7 +112,7 @@ NOTES This list is normally a single value, e.g. eth0, for use with a virtual host such as kvm. - Other paramters that are service specific include: + Other parameters that are service specific include: ipv4-static @@ -128,7 +128,7 @@ NOTES additional IP addresses to a network device. Example: eth0:2 (optional) - BROADCAST - The brodcast address for this interface, + BROADCAST - The broadcast address for this interface, e.g 192.168.1.255. If not specified, the broadcast address will be calculated from the IP and PREFIX. @@ -154,7 +154,7 @@ NOTES DHCP_START - Optional parameters to pass to the dhcp client at startup. - DHCP_STOP - Optional paremeters to pass to the dhcp client + DHCP_STOP - Optional parameters to pass to the dhcp client at shutdown. PRINTIP - Flag to print the dhcp address to stdout diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 7f58d2d3b..d0cf45003 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,16 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-08-23 + + + [xry111] - Update to lfs-bootscripts-20240825. Only trivial + non-functional changes. + + + + 2024-08-23 diff --git a/packages.ent b/packages.ent index e21d6b718..e8108cfbd 100644 --- a/packages.ent +++ b/packages.ent @@ -381,7 +381,7 @@ - + From 04befc5e3cb597dca8f39a79e70b44a1ac5c019b Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 26 Aug 2024 02:49:01 +0800 Subject: [PATCH 5/8] aboutsbus: Add power profile info --- chapter04/aboutsbus.xml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index dccf59fe7..7139cb3a8 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -36,6 +36,32 @@ to give an estimate of how long it might take to install a package, but the numbers can vary by as much as dozens of minutes in some cases. + Before measuring the build time of any package (no matter Binutils + pass 1 or a package of which the SBU is being measured), make sure a + system power profile suitable to make the system running with the + maximum performance (and the maximum power consumption) is selected. Or + the measured SBU value may be severly inaccurate because the system may be + operated differently building Binutils pass 1 and the other package. + Be aware that a significant inaccuracy can still show up even if the same + profile (except one maximizing the performance) is used for both packages: + the system may respond slower for saving the power building + Binutils pass 1, because the system load seems only about 25% of the load + building the other package (with -j4). + + On most distros the power profile can be managed with either + power-profiles-daemon or tuned. + If the distro runs power-profiles-daemon, issue the + powerprofilesctl set performance command to select + the performance profile. If the distro runs + tuned, issue the tuned-adm profile + throughput-performance command to select the + throughput-performance profile. + + Even if you are not measuring the SBU values, it's still better to + select the power profile for maximum performance before building LFS, as + doing so can (obviously) make the system faster to build LFS + packages. + When multiple processors are used in this way, the SBU units in the book will vary even more than they normally would. In some cases, the make @@ -47,7 +73,6 @@ The times presented here are based upon using four cores (-j4). The times in Chapter 8 also include the time to run the regression tests for the package unless specified otherwise. - From eae9237225b67996f68e473b5241c0d349f3d1f2 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Mon, 26 Aug 2024 17:59:31 -0500 Subject: [PATCH 6/8] Add more detail to the About SBUs page. --- chapter04/aboutsbus.xml | 37 +++++++++++++++++++++++------------- chapter05/binutils-pass1.xml | 2 +- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index 7139cb3a8..b65b30950 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -26,9 +26,9 @@ unit of time. For example, consider a package whose compilation time is 4.5 - SBUs. This means that if your system took 10 minutes to compile and + SBUs. This means that if your system took 4 minutes to compile and install the first pass of binutils, it will take - approximately 45 minutes to build the example package. + approximately 18 minutes to build the example package. Fortunately, most build times are shorter than one SBU. SBUs are not entirely accurate because they depend on many @@ -36,17 +36,26 @@ to give an estimate of how long it might take to install a package, but the numbers can vary by as much as dozens of minutes in some cases. - Before measuring the build time of any package (no matter Binutils - pass 1 or a package of which the SBU is being measured), make sure a - system power profile suitable to make the system running with the - maximum performance (and the maximum power consumption) is selected. Or - the measured SBU value may be severly inaccurate because the system may be - operated differently building Binutils pass 1 and the other package. + On some newer systems, the motherboard is capable of contolling + the system clock speed. This can be controlled with a command such as + powerprofilesctl. This is not available in LFS, but + may be available on the host system. After LFS is complete, it can be + added to a system with the procedures at the + + BLFS power-profiles-daemon page. + + Before measuring the build time of any package it is advisable to use a + system power profile set for maximum performance (and maximum power + consumption). + + Otherwise the measured SBU value may be inaccurate because the + system may react differently when building + or other packages. + Be aware that a significant inaccuracy can still show up even if the same - profile (except one maximizing the performance) is used for both packages: - the system may respond slower for saving the power building - Binutils pass 1, because the system load seems only about 25% of the load - building the other package (with -j4). + profile is used for both packages because the system may respond slower if + the system is idle when starting the build procedure. Setting the power + profile to "performance" will minimize this problem. On most distros the power profile can be managed with either power-profiles-daemon or tuned. @@ -70,7 +79,9 @@ interleaved. If you run into a problem with a build step, revert to a single processor build to properly analyze the error messages. - The times presented here are based upon using four cores (-j4). The + The times presented here for all packages + (except which is based on one core) + are based upon using four cores (-j4). The times in Chapter 8 also include the time to run the regression tests for the package unless specified otherwise. diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index 39365477d..f6b7f0f90 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -5,7 +5,7 @@ %general-entities; ]> - + From 68c63ae3af63a55b0268c9c4802df3efff322562 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 27 Aug 2024 12:31:04 +0800 Subject: [PATCH 7/8] Some About SBUs page reword --- chapter04/aboutsbus.xml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index b65b30950..a442c20ab 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -39,7 +39,7 @@ On some newer systems, the motherboard is capable of contolling the system clock speed. This can be controlled with a command such as powerprofilesctl. This is not available in LFS, but - may be available on the host system. After LFS is complete, it can be + may be available on the host distro. After LFS is complete, it can be added to a system with the procedures at the BLFS power-profiles-daemon page. @@ -55,21 +55,16 @@ Be aware that a significant inaccuracy can still show up even if the same profile is used for both packages because the system may respond slower if the system is idle when starting the build procedure. Setting the power - profile to "performance" will minimize this problem. + profile to performance will minimize this problem. And + obviously doing so will also make the system build LFS faster. - On most distros the power profile can be managed with either - power-profiles-daemon or tuned. - If the distro runs power-profiles-daemon, issue the + If powerprofilesctl is available, issue the powerprofilesctl set performance command to select - the performance profile. If the distro runs - tuned, issue the tuned-adm profile - throughput-performance command to select the - throughput-performance profile. - - Even if you are not measuring the SBU values, it's still better to - select the power profile for maximum performance before building LFS, as - doing so can (obviously) make the system faster to build LFS - packages. + the performance profile. Some distros provides the + tuned-adm command for managing the profiles instead of + powerprofilesctl, on these distros issue the + tuned-adm profile throughput-performance command to + select the throughput-performance profile. When multiple processors are used in this way, the SBU units in the From 2ca7fca7998c2ac7ebfa36af7d2ef15eae9a33e9 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 27 Aug 2024 16:37:07 +0800 Subject: [PATCH 8/8] gcc: Don't decrease the stack limit I've had doubts on this "ulimit -s 32768" command for years. After reading GCC code (libiberty/stack-limit.c) I'm pretty sure this command is not doing what we expected. In a typical Linux distro, the default "soft" stack limit is 8 MiB and the default "hard" stack limit is infinite. And GCC will automatically increase the soft limit to 64 MiB if the original soft limit is smaller than 64 MiB, and the hard limit is at least 64 MiB. So with a typical default configuration, the real stack limit of GCC is 64 MiB. But our "ulimit -s 32768" command sets both the soft limit and the hard limit to 32 MiB. Thus we are actually *decreasing* the real stack limit. Fortunately this has not caused any test failures, but it's just wrong (contradicting with the explanation of the command). Thus just raise the hard limit to infinite in case the host distro uses a not so typical configuration where the hard limit is tight, and let GCC to set up the soft limit to the expected value on its own. It's more future-proof than "ulimit -s 65536" in case GCC changes the expected stack limit in the future. It should be safe to make the change in freeze because in jhalfs it only affects the test suite, and even in a manual build the user can skip this command if not running the GCC test suite. --- chapter08/gcc.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 971394527..ad60089b8 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -139,10 +139,16 @@ cd build command below, where x is the number of CPU cores on your system. - One set of tests in the GCC test suite is known to exhaust the default - stack, so increase the stack size prior to running the tests: + GCC may need more stack space compiling some extremely complex + code patterns. As a precaution for the host distros with a tight stack + limit, explicitly set the stack size hard limit to infinite. + On most host distros (and the final LFS system) the hard limit is + infinite by default, but there's no harm to set it explicitly anyway. + It's not needed to change the stack size soft limit because GCC will + automatically set it to an appropriate value, as long as the value does + not exceed the hard limit: -ulimit -s 32768 +ulimit -s -H unlimited Now remove/fix several known test failures: