Skip to main content

A generator of (minimal) Linux kernel configuration files.

Project description

https://secure.travis-ci.org/rbarrois/kconfgen.svg?branch=master Latest Version Supported Python versions Wheel status License

kconfgen is a tool to manage Linux kernel configuration files.

It enables users to:

  • Assemble kernel configuration files from fragments;

  • Ensure that only minimal lists of flags are kept in version control;

  • Split a single kernel configuration file in fragments by topic.

Usage:

kconfgen merge

Assemble a .config file from a set of (minimal) definitions

kconfgen merge \
  --kernel=/usr/src/linux-4.19.57 --arch=x86 \
  defconfig.net defconfig.crypto defconfig.laptop > .config

It is also possible to generate a defconfig file, which contains only the minimal set of flags to get to the provided .config file:

kconfgen merge \
  --kernel=/usr/src/linux-4.19.57 --arch=x86 \
  --minimal \
  defconfig.net defconfig.crypto defconfig.laptop > some_host.defconfig

kconfgen split

Split a .config file into a set of minimal definitions, based on their sections:

kconfgen split \
  --kernel=/usr/src/linux-4.19.57 --arch=x86 \
  --sections="net crypto fs" \
  ./fragments/ < ./.config

ls fragments/
  defconfig.net
  defconfig.crypto
  defconfig.fs
  defconfig

It is also possible to split by maximal section size:

kconfgen split \
  --kernel=/usr/src/linux-4.19.57 --arch=x86 \
  --max-symbols=20 \
  ./fragments/ < ./.config

ls fragments/
  defconfig.net
  defconfig.net_netfilter
  defconfig.crypto
  defconfig.drivers
  defconfig

kconfgen assemble

Assemble a defconfig file for a specific profile:

kconfgen assemble \
  --kernel=/usr/src/linux-4.19.57 \
  --profiles=profiles.toml \
  some-profile > .config

The list of profiles and the defconfig files to use for them is listed in a toml file:

[ profile.example ]
arch = x86
include = [ "shared.core", "shared.server" ]
extras = [ "defconfig.example", "defconfig.wifi_intel" ]

[ shared.core ]
files = [ "defconfig.crypto", "defconfig.fs" ]

[ shared.server ]
files = [ "defconfig.net", "defconfig.net_netfilter" ]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kconfgen-1.0.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

kconfgen-1.0.1-py2.py3-none-any.whl (6.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file kconfgen-1.0.1.tar.gz.

File metadata

  • Download URL: kconfgen-1.0.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.9

File hashes

Hashes for kconfgen-1.0.1.tar.gz
Algorithm Hash digest
SHA256 315c746c5fd8e3fd5eb128c8e040ded3573a24fef687d72013852bfb87141289
MD5 a08b214ae3d3e41fe3758addf2fd079b
BLAKE2b-256 340bc409e11f1004a275621bec324034831b61389ed31cb0881ff34814434fcb

See more details on using hashes here.

File details

Details for the file kconfgen-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: kconfgen-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.9

File hashes

Hashes for kconfgen-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b512bed5685c2bae74d105eaeba6618d845e40787516b9adf39a792b2111a909
MD5 bfd1191b7b59100602ce5801fcb077bd
BLAKE2b-256 d97af5624939d9f81efaee6ff2aba5344f4c78164b57eea15daad15374071c3e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page