From 31a9142d108a0fd32660068adc1c223a7e60e8b7 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 6 Dec 2023 01:32:48 +0800 Subject: kernel-config: Sync fixes from BLFS --- chapter10/kernel/Makefile | 5 ++++- chapter10/kernel/highmem.xml | 2 +- chapter10/kernel/kernel-config.py | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/chapter10/kernel/Makefile b/chapter10/kernel/Makefile index e04d2d6b1..03de71ed9 100644 --- a/chapter10/kernel/Makefile +++ b/chapter10/kernel/Makefile @@ -19,5 +19,8 @@ s-kernel-version: fi touch s-kernel-version -%.xml: %.toml kernel-config.py kernel_version.py kernel.version +%.xml.tmp: %.toml kernel-config.py kernel_version.py kernel.version ./kernel-config.py $(KERNEL_TREE) $< > $@ + +%.xml: %.xml.tmp + mv $< $@ diff --git a/chapter10/kernel/highmem.xml b/chapter10/kernel/highmem.xml index 4f0938142..efedef46c 100644 --- a/chapter10/kernel/highmem.xml +++ b/chapter10/kernel/highmem.xml @@ -5,4 +5,4 @@ DO NOT EDIT! --> Processor type and features ---> High Memory Support ---> - (X) 64GB [HIGHMEM64G] + (X) 64GB [HIGHMEM64G] diff --git a/chapter10/kernel/kernel-config.py b/chapter10/kernel/kernel-config.py index a36113175..03e6ebb22 100755 --- a/chapter10/kernel/kernel-config.py +++ b/chapter10/kernel/kernel-config.py @@ -185,6 +185,10 @@ def load_kconfig(file): if_stack += [top] elif line.startswith('endif'): if_stack = if_stack[:-1] + + if config_buf: + r += [parse_config(config_buf)] + return r known_config = {} @@ -259,7 +263,7 @@ for i0, val, i1, title, arrow, key, menu, comment in r: if len(title) > rem: title = title[:rem - 3] + '...' - b = title.lstrip('YyMmNnHh') + b = title.lstrip('YyMmNnHh.' + "".join(map(str, range(10)))) a = title[:len(title) - len(b)] b0 = "" + escape(b[0]) + "" line += escape(a) + b0 + escape(b[1:]) + escape(arrow) -- cgit v1.2.3-54-g00ecf