From fb3b88e8f288563f26096ecf5eb6d2ad749ae5e5 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 25 Jul 2023 12:33:32 +0800 Subject: [PATCH 01/12] binutils-pass2: Remove libsframe.{a,la} like other libs --- chapter06/binutils-pass2.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter06/binutils-pass2.xml b/chapter06/binutils-pass2.xml index ef5c18433..7b0f1fc20 100644 --- a/chapter06/binutils-pass2.xml +++ b/chapter06/binutils-pass2.xml @@ -101,7 +101,7 @@ cd build Remove the libtool archive files because they are harmful for cross compilation, and remove unnecessary static libraries: -rm -v $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.{a,la} +rm -v $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes,sframe}.{a,la} From b15bebf96f9df4260904cb682c1692bcc43891c2 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 27 Jul 2023 09:43:35 +0800 Subject: [PATCH 02/12] askforhelp: Add a note to stop people from spamming upstream I've seen two cases of invalid upstream "bug" reports this month because the user has (mis)built LFS. Let's stop this before irritating the upstream maintainers. --- chapter01/askforhelp.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/chapter01/askforhelp.xml b/chapter01/askforhelp.xml index 367e880c0..405b40804 100644 --- a/chapter01/askforhelp.xml +++ b/chapter01/askforhelp.xml @@ -10,6 +10,27 @@ Help + + + We strongly discourage posting your issues building one LFS package + directly onto the upstream support channel, without discussing via + a LFS support channel listed in + first. Doing so is often quite inefficient because the upstream + maintainers are rarely familiar with LFS building procedure. Even if + you've really hit an upstream issue, the LFS community can still help + to isolate the information wanted by the upstream maintainers and make + a proper report. + + + + If you must ask a question directly via an upstream support channel, + you shall at least note that many upstream projects have the support + channels separated from the bug tracker. The bug + reports for asking questions are considered invalid and may annoy + upstream developers for these projects. + + + If an issue or a question is encountered while working through this book, please check the FAQ page at . Questions are often already answered there. If your question is not From 49d402ee78cc17fab3501b544a83dca826f7a91d Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 27 Jul 2023 10:03:30 +0800 Subject: [PATCH 03/12] askforhelp: Reword the note added in previous commit a little --- chapter01/askforhelp.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chapter01/askforhelp.xml b/chapter01/askforhelp.xml index 405b40804..5eb1d939f 100644 --- a/chapter01/askforhelp.xml +++ b/chapter01/askforhelp.xml @@ -12,10 +12,11 @@ - We strongly discourage posting your issues building one LFS package - directly onto the upstream support channel, without discussing via - a LFS support channel listed in - first. Doing so is often quite inefficient because the upstream + In case you've hit an issue building one package with the LFS + instruction, we strongly discourage posting the issue directly onto + the upstream support channel before discussing via a LFS support + channel listed in . + Doing so is often quite inefficient because the upstream maintainers are rarely familiar with LFS building procedure. Even if you've really hit an upstream issue, the LFS community can still help to isolate the information wanted by the upstream maintainers and make From d0de26cbe0bf877b25219936b7b688f0b17d0a16 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 27 Jul 2023 13:06:49 +0800 Subject: [PATCH 04/12] gmp: (Optionally) use --host=none-linux-gnu for generic library This is suggested by GCC maintainer Andrew Pinski in https://gcc.gnu.org/PR110789. It's easier than what we've suggested in the book. --- chapter08/gmp.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chapter08/gmp.xml b/chapter08/gmp.xml index 0820f726c..01dace92f 100644 --- a/chapter08/gmp.xml +++ b/chapter08/gmp.xml @@ -54,10 +54,12 @@ The default settings of GMP produce libraries optimized for the host processor. If libraries suitable for processors less capable than the host's CPU are desired, generic libraries can be - created by running the following: + created by appending the option + to the configure command. -cp -v configfsf.guess config.guess -cp -v configfsf.sub config.sub + Prepare GMP for compilation: @@ -106,7 +108,7 @@ make html the system capabilities and there will be errors in the tests or other applications using the gmp libraries with the message "Illegal instruction". In this case, gmp should be reconfigured with the option - --build=x86_64-pc-linux-gnu and rebuilt. + and rebuilt. Ensure that all 197 tests in the test suite passed. Check the results by issuing the following command: From 44674e4c92f7ef20dbc985f479c5c19548378a08 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 28 Jul 2023 19:59:01 +0800 Subject: [PATCH 05/12] sysv: Mount cgroup fs for memory pressure information early Prepare for systemd-254 update. See #5293 for details. --- bootscripts/ChangeLog | 3 +++ bootscripts/lfs/init.d/mountvirtfs | 4 ++++ chapter01/changelog.xml | 13 +++++++++++++ chapter10/fstab.xml | 21 +++++++++++---------- chapter10/kernel.xml | 5 +++++ packages.ent | 2 +- 6 files changed, 37 insertions(+), 11 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index d255411b1..aff30cb41 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,6 @@ +2023-07-28 Xi Ruoyao + * In mountvirtfs, mount /sys/fs/cgroup for udev from systemd-254. + 2023-07-22 Xi Ruoyao * In mountvirtfs, create symlinks /dev/{fd,std{in,out,err}} and /dev/core (optional). diff --git a/bootscripts/lfs/init.d/mountvirtfs b/bootscripts/lfs/init.d/mountvirtfs index bbf30cf90..fd797787a 100644 --- a/bootscripts/lfs/init.d/mountvirtfs +++ b/bootscripts/lfs/init.d/mountvirtfs @@ -63,6 +63,10 @@ case "${1}" in log_info_msg2 " ${INFO}/dev/shm" mount -o nosuid,nodev /dev/shm || failed=1 + mkdir -p /sys/fs/cgroup + log_info_msg2 " ${INFO}/sys/fs/cgroup" + mount -o nosuid,noexec,nodev /sys/fs/cgroup || failed=1 + (exit ${failed}) evaluate_retval if [ "${failed}" = 1 ]; then diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index cfb845733..73fc65f72 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,19 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2023-07-28 + + + [xry111] - Enable cgroup-based memory pressure information + in kernel, and add the cgroup file system into /etc/fstab and the + mountvirtfs bootscript. This is a preparation for udev from + systemd-254. Addresses + #5293. + + + + 2023-07-22 diff --git a/chapter10/fstab.xml b/chapter10/fstab.xml index f78b234db..ccf767ab6 100644 --- a/chapter10/fstab.xml +++ b/chapter10/fstab.xml @@ -22,17 +22,18 @@ cat > /etc/fstab << "EOF" # Begin /etc/fstab -# file system mount-point type options dump fsck -# order +# file system mount-point type options dump fsck +# order -/dev/<xxx> / <fff> defaults 1 1 -/dev/<yyy> swap swap pri=1 0 0 -proc /proc proc nosuid,noexec,nodev 0 0 -sysfs /sys sysfs nosuid,noexec,nodev 0 0 -devpts /dev/pts devpts gid=5,mode=620 0 0 -tmpfs /run tmpfs defaults 0 0 -devtmpfs /dev devtmpfs mode=0755,nosuid 0 0 -tmpfs /dev/shm tmpfs nosuid,nodev 0 0 +/dev/<xxx> / <fff> defaults 1 1 +/dev/<yyy> swap swap pri=1 0 0 +proc /proc proc nosuid,noexec,nodev 0 0 +sysfs /sys sysfs nosuid,noexec,nodev 0 0 +devpts /dev/pts devpts gid=5,mode=620 0 0 +tmpfs /run tmpfs defaults 0 0 +devtmpfs /dev devtmpfs mode=0755,nosuid 0 0 +tmpfs /dev/shm tmpfs nosuid,nodev 0 0 +cgroup2 /sys/fs/cgroup cgroup2 nosuid,noexec,nodev 0 0 # End /etc/fstab EOF diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index ad6b252a7..376f6cdff 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -135,7 +135,12 @@ [*] Randomize the address of the kernel image (KASLR) [CONFIG_RANDOMIZE_BASE] General setup ---> [ ] Compile the kernel with warnings as errors [CONFIG_WERROR] + CPU/Task time and stats accounting ---> + [*] Pressure stall information tracking [CONFIG_PSI] + [ ] Require boot parameter to enable pressure stall information tracking [CONFIG_PSI_DEFAULT_DISABLED] < > Enable kernel headers through /sys/kernel/kheaders.tar.xz [CONFIG_IKHEADERS] + [*] Control Group support [CONFIG_CGROUPS] ---> + [*] Memory controller [CONFIG_MEMCG] [ ] Configure standard kernel features (expert users) [CONFIG_EXPERT] General architecture-dependent options ---> [*] Stack Protector buffer overflow detection [CONFIG_STACKPROTECTOR] diff --git a/packages.ent b/packages.ent index 6fd5c0280..09008604d 100644 --- a/packages.ent +++ b/packages.ent @@ -383,7 +383,7 @@ - + From ac90ea8104148900ca3209cf5a56c4a16cbafd77 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 28 Jul 2023 20:01:29 +0800 Subject: [PATCH 06/12] package choices: Fix a typo Reported-by: rhubarbpieguy --- prologue/why.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prologue/why.xml b/prologue/why.xml index b43bb3a20..b5ac050eb 100644 --- a/prologue/why.xml +++ b/prologue/why.xml @@ -371,7 +371,7 @@ libcrypt library needed by various packages (notably, Shadow) for hashing passwords. It replaces the obsolete - libcrypt implmentation in + libcrypt implementation in Glibc. From 6de383a26215753a2b0a6d2dba6956ecfd786a90 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Fri, 28 Jul 2023 19:23:11 -0500 Subject: [PATCH 07/12] Package updates. Update udev-lfs tarball to remove obsolete cdrom rules and references to ISDN devices. Update to wheel-0.41.0 (Python Module). Update to tar-1.35. Update to systemd-254. Update to meson-1.2.0. Update to linux-6.4.7. Update to gcc-13.2.0. Update to file-5.45. --- chapter01/changelog.xml | 39 +++++++++++++++++++++++ chapter01/whatsnew.xml | 14 ++++----- chapter08/gcc.xml | 4 +-- chapter08/udev.xml | 4 +-- packages.ent | 54 ++++++++++++++++---------------- udev-lfs/55-lfs.rules | 6 ---- udev-lfs/55-lfs.txt | 11 ++----- udev-lfs/81-cdrom.rules | 3 -- udev-lfs/83-cdrom-symlinks.rules | 13 -------- udev-lfs/ChangeLog | 4 +++ udev-lfs/Makefile.lfs | 9 +++--- udev-lfs/README | 2 -- 12 files changed, 88 insertions(+), 75 deletions(-) delete mode 100644 udev-lfs/81-cdrom.rules delete mode 100644 udev-lfs/83-cdrom-symlinks.rules diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 73fc65f72..d5debd345 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,45 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2023-07-28 + + + [bdubbs] - Update udev-lfs tarball to remove obsolete + cdrom rules and references to ISDN devices. Fixes + #5291. + + + [bdubbs] - Update to wheel-0.41.0 (Python Module). Fixes + #5290. + + + [bdubbs] - Update to tar-1.35. Fixes + #5287. + + + [bdubbs] - Update to systemd-254. Fixes + #5293. + + + [bdubbs] - Update to meson-1.2.0. Fixes + #5286. + + + [bdubbs] - Update to linux-6.4.7. Fixes + #5288. + + + [bdubbs] - Update to gcc-13.2.0. Fixes + #5292. + + + [bdubbs] - Update to file-5.45. Fixes + #5294. + + + + 2023-07-28 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 42d10c0aa..f40d3b33a 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -100,9 +100,9 @@ - + @@ -250,15 +250,15 @@ Sysklogd-&sysklogd-version; - + Systemd-&systemd-version; - + @@ -274,9 +274,9 @@ Vim-&vim-version; - + diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 43f699689..bb22fbca5 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -172,10 +172,10 @@ su tester -c "PATH=$PATH make -k check" url="&test-results;"/> and . - Two tests named pr104610.c and + Two tests named copy.cc and pr56837.c are known to fail. diff --git a/chapter08/udev.xml b/chapter08/udev.xml index 2d3792511..67e835afc 100644 --- a/chapter08/udev.xml +++ b/chapter08/udev.xml @@ -127,7 +127,7 @@ meson setup \ install -vm755 -d /usr/{lib,share}/pkgconfig install -vm755 udevadm /usr/bin/ install -vm755 systemd-hwdb /usr/bin/udev-hwdb -ln -sv ../bin/udevadm /usr/sbin/udevd +ln -svfn ../bin/udevadm /usr/sbin/udevd cp -av libudev.so{,*[0-9]} /usr/lib/ install -vm644 ../src/libudev/libudev.h /usr/include/ install -vm644 src/libudev/*.pc /usr/lib/pkgconfig/ @@ -147,7 +147,7 @@ make -f &udev-lfs-version;/Makefile.lfs install -tar -xf ../../systemd-man-pages-253.tar.xz --strip-components=1 \ +tar -xf ../../systemd-man-pages-&systemd-man-version;.tar.xz --strip-components=1 \ -C /usr/share/man --wildcards '*/udev*' '*/libudev*' \ '*/systemd-'{hwdb,udevd.service}.8 sed 's/systemd\(\\\?-\)/udev-/' /usr/share/man/man8/systemd-hwdb.8 \ diff --git a/packages.ent b/packages.ent index 09008604d..66e7314ab 100644 --- a/packages.ent +++ b/packages.ent @@ -172,10 +172,10 @@ - - + + - + @@ -218,10 +218,10 @@ - - + + - + @@ -433,12 +433,12 @@ - + - + - + - + - + - - + + - + @@ -668,10 +668,10 @@ - - + + - + @@ -709,10 +709,10 @@ - - + + - + @@ -737,10 +737,10 @@ - - + + - + diff --git a/udev-lfs/55-lfs.rules b/udev-lfs/55-lfs.rules index 34229ea2c..8d37ba920 100644 --- a/udev-lfs/55-lfs.rules +++ b/udev-lfs/55-lfs.rules @@ -6,9 +6,3 @@ SUBSYSTEM=="rtc", ACTION=="add", MODE="0644", RUN+="/etc/rc.d/init.d/setclock start" KERNEL=="rtc", ACTION=="add", MODE="0644", RUN+="/etc/rc.d/init.d/setclock start" -# Comms devices - -KERNEL=="ippp[0-9]*", GROUP="dialout" -KERNEL=="isdn[0-9]*", GROUP="dialout" -KERNEL=="isdnctrl[0-9]*", GROUP="dialout" -KERNEL=="dcbri[0-9]*", GROUP="dialout" diff --git a/udev-lfs/55-lfs.txt b/udev-lfs/55-lfs.txt index 5f116f9b7..6e0afda59 100644 --- a/udev-lfs/55-lfs.txt +++ b/udev-lfs/55-lfs.txt @@ -7,14 +7,9 @@ Description of rules: By default, Udev creates device nodes with UID 0, GID 0, and permissions 0660. -ISDN-related devices should be owned by the 'dialout' group, hence the following -rule (and similar): - -KERNEL=="ippp[0-9]*", GROUP="dialout" - -The RTC-related rules cause the setclock bootscript to be run as soon as the +The RTC-related rule causes the setclock bootscript to be run as soon as the RTC device has been created by Udev, meaning that times in log files, for example, are as accurate as possible as quickly as possible. -A final word of caution: Any particular rule must be written on one line, and a -comma must separate each part of the rule. +A word of caution: A comma must separate each part of the rule. A rule can span +multiple lines if the newline is escaped by a backslash. diff --git a/udev-lfs/81-cdrom.rules b/udev-lfs/81-cdrom.rules deleted file mode 100644 index cb7ea5748..000000000 --- a/udev-lfs/81-cdrom.rules +++ /dev/null @@ -1,3 +0,0 @@ -# /etc/udev/rules.d/81-cdrom.rules: Set CD-ROM permissions and get device capabilities - -ACTION=="add", SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", IMPORT{program}="cdrom_id --export $tempnode", GROUP="cdrom" diff --git a/udev-lfs/83-cdrom-symlinks.rules b/udev-lfs/83-cdrom-symlinks.rules deleted file mode 100644 index 1a21a0649..000000000 --- a/udev-lfs/83-cdrom-symlinks.rules +++ /dev/null @@ -1,13 +0,0 @@ -# /etc/udev/rules.d/83-cdrom-symlinks.rules: Determine CD drive capability. - -ACTION!="add", GOTO="cd_aliases_generator_end" -SUBSYSTEM!="block", GOTO="cd_aliases_generator_end" -ENV{GENERATED}=="?*", GOTO="cd_aliases_generator_end" - -# Fail the uevent if the autogenerated rules cannot be saved -ENV{ID_CDROM}=="?*", PROGRAM="/bin/grep -c ' / [^[:space:]]* rw' /proc/mounts", \ - RESULT!="1", RUN+="/bin/false", GOTO="cd_aliases_generator_end" - -ENV{ID_CDROM}=="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" - -LABEL="cd_aliases_generator_end" diff --git a/udev-lfs/ChangeLog b/udev-lfs/ChangeLog index 560346143..53660938a 100644 --- a/udev-lfs/ChangeLog +++ b/udev-lfs/ChangeLog @@ -1,3 +1,7 @@ +2023-07-28 + * Remove obsolete 83-cdrom-symlinks.rules and 81-cdrom.rules + * Remove references to obsolete ISDN devices + 2017-10-27 * 83-cdrom-symlinks.rules: Adjust test for writable root directory. diff --git a/udev-lfs/Makefile.lfs b/udev-lfs/Makefile.lfs index 1218d9dcd..a8b4d7f30 100644 --- a/udev-lfs/Makefile.lfs +++ b/udev-lfs/Makefile.lfs @@ -3,7 +3,7 @@ # vim: tabstop=3 -VERSION=20171102 +VERSION=20230728 SHELL=/bin/bash ifeq ($(V),) @@ -16,15 +16,14 @@ all: @echo "Use the install target" install: - @mkdir -pv $(DESTDIR)/lib/udev/rules.d \ + @mkdir -pv $(DESTDIR)/usr/lib/udev/rules.d \ $(DESTDIR)/etc/udev/rules.d \ $(DESTDIR)/usr/share/doc/udev-$(VERSION)/lfs # Copy rules @cp -v udev-lfs-$(VERSION)/*.rules $(DESTDIR)/etc/udev/rules.d - @cp -v udev-lfs-$(VERSION)/*_rules \ - udev-lfs-$(VERSION)/init-net-rules.sh \ - udev-lfs-$(VERSION)/rule_generator.functions $(DESTDIR)/lib/udev + @cp -v udev-lfs-$(VERSION)/init-net-rules.sh \ + udev-lfs-$(VERSION)/rule_generator.functions $(DESTDIR)/usr/lib/udev # Copy documentation @cp -v udev-lfs-$(VERSION)/README $(DESTDIR)/usr/share/doc/udev-$(VERSION)/lfs diff --git a/udev-lfs/README b/udev-lfs/README index 61d0e86bc..1f050eb15 100644 --- a/udev-lfs/README +++ b/udev-lfs/README @@ -14,9 +14,7 @@ Makefile.lfs - The LFS Makefile. Installs udev rules for LFS. contrib - Useful rules from debian contrib/debian -contrib/debian/83-cdrom-symlinks.rules contrib/debian/write_cd_aliases -contrib/debian/81-cdrom.rules 55-lfs.rules - LFS custom rules write_net_rules - Scripts for LFS rules From 7dcd8c782bab203dcba04013f4ecc6846a12bd93 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 29 Jul 2023 09:51:28 +0800 Subject: [PATCH 08/12] systemd: Remove sed unneeded with 254 --- chapter08/systemd.xml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index e99167d07..c71616725 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -40,19 +40,6 @@ Installation of systemd - - Remove several inappropriate uses of the pure - attribute that cause runtime issues when the package is built - with gcc-13 or later: - - -sed '/bus_message_type_from_string/s/_pure_//' \ - -i src/libsystemd/sd-bus/bus-internal.h && -sed '/devt_hash_func/s/_pure_//' \ - -i src/basic/hash-funcs.h && -sed '/job_get_timeout/s/_pure_//' \ - -i src/core/job.h - Remove two unneeded groups, render and sgx, from the default udev From 57f16783edb41bf517c52d453278f5b3b4bac434 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 29 Jul 2023 09:53:44 +0800 Subject: [PATCH 09/12] systemd: Add --no-same-owner for man page extraction Well, I forgot to create the man pages tarball as root, so if we don't use --no-same-owner the man pages will be owned by UID 1000 :(. Instead of regenerating the tarball again let's just fix this in the book. --- chapter08/systemd.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index c71616725..eb8ea77b0 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -192,7 +192,9 @@ meson setup \ -tar -xf ../../systemd-man-pages-&systemd-man-version;.tar.xz --strip-components=1 -C /usr/share/man +tar -xf ../../systemd-man-pages-&systemd-version;.tar.xz \ + --no-same-owner --strip-components=1 \ + -C /usr/share/man Create the /etc/machine-id file needed by systemd-journald: From bec5f879a3940faf011c853b66f37c242fe85302 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 29 Jul 2023 09:59:44 +0800 Subject: [PATCH 10/12] changelog: Prefix new "systemd" entry with "udev from" for sysv --- chapter01/changelog.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index d5debd345..ac551a947 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -57,7 +57,8 @@ #5287. - [bdubbs] - Update to systemd-254. Fixes + [bdubbs] - Update to udev + from systemd-254. Fixes #5293. From c2ccad14a5ed01857b84199133d7468ccd02c461 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 29 Jul 2023 10:19:04 +0800 Subject: [PATCH 11/12] systemd: Add two new symlinks into contents --- chapter08/systemd.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index eb8ea77b0..63003ac68 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -233,12 +233,14 @@ meson setup \ busctl, coredumpctl, halt (symlink to systemctl), hostnamectl, init, journalctl, kernel-install, localectl, loginctl, - machinectl, networkctl, oomctl, portablectl, poweroff (symlink to + machinectl, mount.ddi (symlink to systemd-dissect), networkctl, + oomctl, portablectl, poweroff (symlink to systemctl), reboot (symlink to systemctl), resolvconf (symlink to resolvectl), resolvectl, runlevel (symlink to systemctl), shutdown (symlink to systemctl), systemctl, systemd-ac-power, systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop, - systemd-creds, systemd-delta, systemd-detect-virt, + systemd-confext (symlink to systemd-sysext), systemd-creds, + systemd-delta, systemd-detect-virt, systemd-dissect, systemd-escape, systemd-hwdb, systemd-id128, systemd-inhibit, systemd-machine-id-setup, systemd-mount, systemd-notify, systemd-nspawn, systemd-path, From 83e616f79e84539b34d912b4a4ed430e00b86839 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Fri, 28 Jul 2023 23:14:10 -0500 Subject: [PATCH 12/12] Reformat kernel configuuration options. A couple of the newer kernel options overflow past 80 columns on the kernel page. It's not optimal, but insert newlines for these options. Also reorder the options to to same ordeer as they appear in menuconfig and add some blank lines between major setions for clarity. --- chapter10/kernel.xml | 62 +++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 376f6cdff..ea367054a 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -130,58 +130,70 @@ Be sure to enable/disable/set the following features or the system might not work correctly or boot at all: - Processor type and features ---> - [*] Build a relocatable kernel [CONFIG_RELOCATABLE] - [*] Randomize the address of the kernel image (KASLR) [CONFIG_RANDOMIZE_BASE] -General setup ---> +General setup ---> [ ] Compile the kernel with warnings as errors [CONFIG_WERROR] - CPU/Task time and stats accounting ---> - [*] Pressure stall information tracking [CONFIG_PSI] - [ ] Require boot parameter to enable pressure stall information tracking [CONFIG_PSI_DEFAULT_DISABLED] + CPU/Task time and stats accounting ---> + [*] Pressure stall information tracking [CONFIG_PSI] + [ ] Require boot parameter to enable pressure stall information tracking + [CONFIG_PSI_DEFAULT_DISABLED] < > Enable kernel headers through /sys/kernel/kheaders.tar.xz [CONFIG_IKHEADERS] [*] Control Group support [CONFIG_CGROUPS] ---> [*] Memory controller [CONFIG_MEMCG] [ ] Configure standard kernel features (expert users) [CONFIG_EXPERT] + +Processor type and features ---> + [*] Build a relocatable kernel [CONFIG_RELOCATABLE] + [*] Randomize the address of the kernel image (KASLR) [CONFIG_RANDOMIZE_BASE] + General architecture-dependent options ---> [*] Stack Protector buffer overflow detection [CONFIG_STACKPROTECTOR] [*] Strong Stack Protector [CONFIG_STACKPROTECTOR_STRONG] -Device Drivers ---> - Graphics support ---> - Frame buffer Devices ---> - <*> Support for frame buffer devices ---> - Console display driver support ---> - [*] Framebuffer Console support [CONFIG_FRAMEBUFFER_CONSOLE] - Generic Driver Options ---> - [ ] Support for uevent helper [CONFIG_UEVENT_HELPER] - [*] Maintain a devtmpfs filesystem to mount at /dev [CONFIG_DEVTMPFS] - [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs [CONFIG_DEVTMPFS_MOUNT] - Processor type and features ---> - [*] Build a relocatable kernel [CONFIG_RELOCATABLE] - [*] Randomize the address of the kernel image (KASLR) [CONFIG_RANDOMIZE_BASE] +Device Drivers ---> + Generic Driver Options ---> + [ ] Support for uevent helper [CONFIG_UEVENT_HELPER] + [*] Maintain a devtmpfs filesystem to mount at /dev [CONFIG_DEVTMPFS] + [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs + [CONFIG_DEVTMPFS_MOUNT] + Graphics support ---> + Frame buffer Devices ---> + <*> Support for frame buffer devices ---> + Console display driver support ---> + [*] Framebuffer Console support [CONFIG_FRAMEBUFFER_CONSOLE] + + General setup ---> [ ] Compile the kernel with warnings as errors [CONFIG_WERROR] [ ] Auditing Support [CONFIG_AUDIT] CPU/Task time and stats accounting ---> [*] Pressure stall information tracking [CONFIG_PSI] - [ ] Require boot parameter to enable pressure stall information tracking [CONFIG_PSI_DEFAULT_DISABLED] + [ ] Require boot parameter to enable pressure stall information tracking + [CONFIG_PSI_DEFAULT_DISABLED] < > Enable kernel headers through /sys/kernel/kheaders.tar.xz [CONFIG_IKHEADERS] [*] Control Group support [CONFIG_CGROUPS] ---> [*] Memory controller [CONFIG_MEMCG] [ ] Configure standard kernel features (expert users) [CONFIG_EXPERT] + +Processor type and features ---> + [*] Build a relocatable kernel [CONFIG_RELOCATABLE] + [*] Randomize the address of the kernel image (KASLR) [CONFIG_RANDOMIZE_BASE] + General architecture-dependent options ---> [*] Enable seccomp to safely compute untrusted bytecode [CONFIG_SECCOMP] [*] Stack Protector buffer overflow detection [CONFIG_STACKPROTECTOR] - [*] Strong Stack Protector [CONFIG_STACKPROTECTOR_STRONG] + [*] Strong Stack Protector [CONFIG_STACKPROTECTOR_STRONG] + [*] Networking support ---> [CONFIG_NET] Networking options ---> [*] TCP/IP networking [CONFIG_INET] <*> The IPv6 protocol [CONFIG_IPV6] + Device Drivers ---> Generic Driver Options ---> [ ] Support for uevent helper [CONFIG_UEVENT_HELPER] [*] Maintain a devtmpfs filesystem to mount at /dev [CONFIG_DEVTMPFS] - [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs [CONFIG_DEVTMPFS_MOUNT] + [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs + [CONFIG_DEVTMPFS_MOUNT] Firmware Loader ---> [ ] Enable the firmware sysfs fallback mechanism [CONFIG_FW_LOADER_USER_HELPER] Firmware Drivers ---> @@ -191,6 +203,7 @@ Device Drivers ---> <*> Support for frame buffer devices ---> Console display driver support ---> [*] Framebuffer Console support [CONFIG_FRAMEBUFFER_CONSOLE] + File systems ---> [*] Inotify support for userspace [CONFIG_INOTIFY_USER] Pseudo filesystems ---> @@ -203,8 +216,9 @@ File systems ---> CONFIG_X86_X2APIC because an option only shows up after its dependencies are selected. - Processor type and features ---> +Processor type and features ---> [*] Support x2apic [CONFIG_X86_X2APIC] + Device Drivers ---> [*] PCI Support ---> [CONFIG_PCI] [*] Message Signaled Interrupts (MSI and MSI-X) [CONFIG_PCI_MSI]