Commit Graph

21 Commits

Author SHA1 Message Date
Zeckmathederg
b5598f98cd Added kernel-config, gamepad.xml, and qol. 2024-06-10 00:59:36 -06:00
Zeckmathederg
0c97bb3afb Stripped mostly everything, edited Introduction 2024-04-09 20:31:49 -06:00
Xi Ruoyao
41eefd36f1
kernel-config: power-profiles-daemon: Adjust
Remove "AMD P-State Self Test" as it's only for debugging.  Adjust some
forced settings as X86_INTEL_PSTATE may be unset if SCHED_MC unset.
Mention X86 Platform Specific Device Drivers may provide platform
profile support (actually more powerful than CPUFreq).

Also fix a glitch in kernel-config.py so it won't mark "'" as hotkey
anymore.
2024-02-28 04:06:52 +08:00
Pierre Labastie
865ea30e33 Change to UTF-8 in kernel opt files 2024-01-19 22:39:35 +01:00
Xi Ruoyao
333d2a8433
kernel-config: The hot key for choices is just the first character
Stupid inconsistency...
2023-12-06 17:26:14 +08:00
Xi Ruoyao
62684867f0
kernel-config: Fix wrong highlight with digits and punctuations 2023-12-06 01:22:37 +08:00
Xi Ruoyao
5a809f3053
kernel-config: Fix "the last config entry in a Kconfig file thrown away"
Triggered when I'm trying to add libnl test suite kernel configuration
parsing net/l3mdev/Kconfig :(.
2023-12-05 15:08:14 +08:00
Xi Ruoyao
ddf89fff24
kernel-config: Separate toplevel menus with empty lines 2023-08-01 09:22:41 +08:00
Xi Ruoyao
0d2ef60591
kernel-config: Reuse parse_config for parsing choice
The special parse_choice function is just duplicating code unnecessary
and it has some flaws.  Remove it and handle choice's with parse_config
too.

All kernel.xml files regenerated and there is no change.
2023-08-01 00:27:35 +08:00
Xi Ruoyao
1cf243636e
introduction: Use new kernel configuration rendering in conventions 2023-07-31 21:44:38 +08:00
Xi Ruoyao
c41cafb3bc
kernel-config: Add color for hotkey
Align with recent LFS change.  Regenerate all kernel.xml files.
2023-07-31 21:44:37 +08:00
Xi Ruoyao
2fbed8076c
kernel-config: Fix a bug causing some menu not rendered
For example:

    menu "Power management and ACPI options"

    config ARCH_SUPPORTS_ACPI
        bool

    config ACPI
        bool
        depends on ARCH_SUPPORTS_ACPI
	prompt "ACPI (Advanced Configuration and Power Interface) Support"

    endmenu

If ACPI=y, we need to "backward propagate" it to ARCH_SUPPORTS_ACPI, in
order to further mark the menu used.  Otherwise the ACPI menu won't show
up.
2023-07-31 21:44:37 +08:00
Xi Ruoyao
14176436f0
kernel-config: Update the script
1. Don't throw unspecified entries too early.  Doing so caused various
   rendering glitches.  And we can now also check if an entry is
   selected but it's parent not.
2. "menu"s in Kconfig can also have dependencies...

Some pre-existing .toml data files are found problematic after the
change, fix them and regenerate all rendered -kernel.xml files.
2023-07-31 21:44:37 +08:00
Xi Ruoyao
7ebdf4e9f5
firmware: Use new kernel configuration rendering 2023-07-31 21:44:37 +08:00
Xi Ruoyao
4e37f01a45
kernel-config: Do not include kernel version in every generated file
This is stupid and it will cause meaningless diffs in version control
(like this commit does :( ).

Remove the kernel version from the generated XML files.  Add
kernel.version file into git to track the kernel version.
2023-07-31 21:44:37 +08:00
Xi Ruoyao
d67d543479
filesystems: Convert the remaining kernel configurations to use new rendering
I don't know these FS very well so I did not change things, except:

- "SCSI_LOW_LEVEL" should be "SCSI_LOWLEVEL" (without the "_" between
  "LOW" and "LEVEL").
- RAID append mode is deprecated, so I removed it.

And I've fixed some issues in kernel-config.py as well.
2023-07-31 21:44:36 +08:00
Xi Ruoyao
185ffd913f
kernel-config: Allow specifying non-module style forcing for tristate
instead of relying on unsound heuristic.
2023-07-31 21:44:36 +08:00
Xi Ruoyao
6af847b8dd
uefi: Use new kernel config
Fix an issue causing kernel-config.py not to process indented "source"
directive in Kconfig for this.
2023-07-31 21:44:36 +08:00
Xi Ruoyao
831ba20acd
kernel-config: Handle if/endif pairs in Kconfig, and allow to set "forced" attribute for options
For example, CONFIG_INPUT is forced w/o CONFIG_EXPERT.

libevdev kernel section needs these features to be rendered
successfully.
2023-07-31 21:44:36 +08:00
Xi Ruoyao
5ca8d70839
kernel-config: Allow setting comments for options, and convert Mesa 2023-07-31 21:44:35 +08:00
Xi Ruoyao
604355989a
Add kernel-config infrastructure
The kernel-config.py script takes a toml file containing a set of
kernel configuration key-value pairs.  Then it parses the Kconfig files
in a kernel source tree and render the given configuration as a
LFS-style <screen> in a separate XML file.  The XML file can be used in
the book with xinclude.

Some "features":

1. The lines are limited to 80 columns.
   If the text of the configuration option is too long, it will be
   trimmed; if the symbolic name of the option cannot fit in this line,
   a separate line will be used for it.
2. If a configuration option is given but it does not exist in Kconfig
   files, the script will abort immediately.  This helps catching
   removed options.
3. The script also aborts immediately if a configuration option is
   illegal, for example setting an option to 'M' while it cannot be a
   module.
4. The infrastructure is not wired into the main Makefile.  It's because
   not all editors have the latest kernel tree, and even if they do the
   locations of the kernel tree are still different.  To update the
   generated XML files, use
   "make -C kernel-config KERNEL_TREE=/sources/linux-x.y.z".

Backword incompatible change:

The script no longer outputs "CONFIG_" prefix for the symbolic name.  It
really does not make too much sense to waste 7 characters here because
it's a common prefix for all options!

A limitation:

The script does not really validate the configuration.  Generally
validating the configuration requires to solve the 3-CNF-SAT problem,
which is NP-complete.
2023-07-31 21:44:35 +08:00