aboutsummaryrefslogtreecommitdiffstats
path: root/chapter10
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-08-01 09:17:05 +0800
committerXi Ruoyao <xry111@xry111.site>2023-08-01 09:17:05 +0800
commit57499d5909d515e8e4d9bfab91c90350816e148c (patch)
tree7b65a3e8f4e655e25cd848725a2c29f0ce0a8dd3 /chapter10
parent70bf5512d96389ea1c068cd20a48093a10d6a963 (diff)
kernel: Separate toplevel menus in rendering
Diffstat (limited to 'chapter10')
-rwxr-xr-xchapter10/kernel/kernel-config.py7
-rw-r--r--chapter10/kernel/systemd.xml5
-rw-r--r--chapter10/kernel/sysv.xml3
-rw-r--r--chapter10/kernel/x2apic.xml1
4 files changed, 15 insertions, 1 deletions
diff --git a/chapter10/kernel/kernel-config.py b/chapter10/kernel/kernel-config.py
index 93b203a46..fc9bcc0d2 100755
--- a/chapter10/kernel/kernel-config.py
+++ b/chapter10/kernel/kernel-config.py
@@ -243,6 +243,8 @@ for i in known_config:
if i not in done:
raise Exception("%s seems not exist" % i)
+sep = known_config.get('separate_toplevel_menu')
+
for i0, val, i1, title, arrow, key, menu, comment in r:
rem = max_line
@@ -275,7 +277,10 @@ for i0, val, i1, title, arrow, key, menu, comment in r:
comment = [comment]
if comment:
comment = '\n'.join([' ' * i0 + '# ' + line for line in comment])
- line = escape(comment) + ':\n' + line
+ buf += escape(comment) + ':'
+
+ if not menu and buf:
+ buf += ['']
buf += [line.rstrip()]
diff --git a/chapter10/kernel/systemd.xml b/chapter10/kernel/systemd.xml
index 0bbe1d42a..4c57776c2 100644
--- a/chapter10/kernel/systemd.xml
+++ b/chapter10/kernel/systemd.xml
@@ -14,16 +14,20 @@
[*] <emphasis role='blue'>C</emphasis>ontrol Group support ---&gt; [CGROUPS]
[*] M<emphasis role='blue'>e</emphasis>mory controller [MEMCG]
[ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---&gt; [EXPERT]
+
<emphasis role='blue'>P</emphasis>rocessor type and features ---&gt;
[*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel [RELOCATABLE]
[*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR) [RANDOMIZE_BASE]
+
<emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---&gt;
[*] <emphasis role='blue'>S</emphasis>tack Protector buffer overflow detection [STACKPROTECTOR]
[*] <emphasis role='blue'>S</emphasis>trong Stack Protector [STACKPROTECTOR_STRONG]
+
[*] N<emphasis role='blue'>e</emphasis>tworking support ---&gt; [NET]
N<emphasis role='blue'>e</emphasis>tworking options ---&gt;
[*] <emphasis role='blue'>T</emphasis>CP/IP networking [INET]
&lt;*&gt; <emphasis role='blue'>T</emphasis>he IPv6 protocol ---&gt; [IPV6]
+
<emphasis role='blue'>D</emphasis>evice Drivers ---&gt;
<emphasis role='blue'>G</emphasis>eneric Driver Options ---&gt;
[ ] <emphasis role='blue'>S</emphasis>upport for uevent helper [UEVENT_HELPER]
@@ -41,6 +45,7 @@
&lt;*&gt; <emphasis role='blue'>S</emphasis>upport for frame buffer devices ---&gt; [FB]
<emphasis role='blue'>C</emphasis>onsole display driver support ---&gt;
[*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]
+
<emphasis role='blue'>F</emphasis>ile systems ---&gt;
[*] <emphasis role='blue'>I</emphasis>notify support for userspace [INOTIFY_USER]
<emphasis role='blue'>P</emphasis>seudo filesystems ---&gt;
diff --git a/chapter10/kernel/sysv.xml b/chapter10/kernel/sysv.xml
index 7e615a56c..7e62725e6 100644
--- a/chapter10/kernel/sysv.xml
+++ b/chapter10/kernel/sysv.xml
@@ -13,12 +13,15 @@
[*] <emphasis role='blue'>C</emphasis>ontrol Group support ---&gt; [CGROUPS]
[*] M<emphasis role='blue'>e</emphasis>mory controller [MEMCG]
[ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---&gt; [EXPERT]
+
<emphasis role='blue'>P</emphasis>rocessor type and features ---&gt;
[*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel [RELOCATABLE]
[*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR) [RANDOMIZE_BASE]
+
<emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---&gt;
[*] <emphasis role='blue'>S</emphasis>tack Protector buffer overflow detection [STACKPROTECTOR]
[*] <emphasis role='blue'>S</emphasis>trong Stack Protector [STACKPROTECTOR_STRONG]
+
<emphasis role='blue'>D</emphasis>evice Drivers ---&gt;
<emphasis role='blue'>G</emphasis>eneric Driver Options ---&gt;
[ ] <emphasis role='blue'>S</emphasis>upport for uevent helper [UEVENT_HELPER]
diff --git a/chapter10/kernel/x2apic.xml b/chapter10/kernel/x2apic.xml
index 4e4bd9571..9bd2a719f 100644
--- a/chapter10/kernel/x2apic.xml
+++ b/chapter10/kernel/x2apic.xml
@@ -5,6 +5,7 @@
DO NOT EDIT! -->
<screen role="nodump"><emphasis role='blue'>P</emphasis>rocessor type and features ---&gt;
[*] <emphasis role='blue'>S</emphasis>upport x2apic [X86_X2APIC]
+
<emphasis role='blue'>D</emphasis>evice Drivers ---&gt;
[*] <emphasis role='blue'>P</emphasis>CI support ---&gt; [PCI]
[*] M<emphasis role='blue'>e</emphasis>ssage Signaled Interrupts (MSI and MSI-X) [PCI_MSI]