Skip to content

Modularize build system with Kconfig integration#13

Merged
jserv merged 1 commit intomainfrom
configuration
Mar 21, 2026
Merged

Modularize build system with Kconfig integration#13
jserv merged 1 commit intomainfrom
configuration

Conversation

@jserv
Copy link
Contributor

@jserv jserv commented Mar 21, 2026

This splits monolithic Makefile into mk/ fragments (toolchain, features, deps, tests, format) and add Kconfiglib-based configuration via 'make config' (interactive menuconfig) or 'make defconfig'.

Features (SLIRP networking, web observatory) are enabled by default and toggled via CONFIG_HAS_WEB in .config. The build mode (debug/release) is also configurable through Kconfig.

Kconfiglib is fetched on demand from sysprog21/Kconfiglib via shallow clone into tools/kconfig/, cleaned by 'make distclean'.

Change-Id: I719856353c77c9c69872b9180fa6d6296b732a6c


Summary by cubic

Modularized the build into mk/ fragments and integrated Kconfiglib so features and build mode are configured via make config/make defconfig. Builds now require a .config; run make defconfig && make or use the interactive make config.

  • New Features

    • make config (menuconfig), make defconfig, make oldconfig, and make savedefconfig generate and manage .config (defaults: CONFIG_HAS_SLIRP=y, CONFIG_HAS_WEB=y, debug build).
    • Feature flags: CONFIG_HAS_SLIRP, CONFIG_HAS_WEB; build mode: CONFIG_BUILD_DEBUG or CONFIG_BUILD_RELEASE; optional CONFIG_LKL_DIR.
    • On-demand Kconfiglib download, pinned into tools/kconfig/; removed by make distclean. LKL and minislirp still auto-fetched when enabled.
    • .config changes trigger object rebuilds.
  • Migration

    • Run make defconfig once, then make. Use two steps (e.g., make defconfig && make), not make defconfig all.
    • CI updated to run make defconfig before building/tests.
    • Use make oldconfig when new options are added; make distclean resets .config and removes tools/kconfig/.

Written for commit cf507ae. Summary will update on new commits.

cubic-dev-ai[bot]

This comment was marked as resolved.

This splits monolithic Makefile into mk/ fragments (toolchain, features,
deps, tests, format) and add Kconfiglib-based configuration via 'make
config' (interactive menuconfig) or 'make defconfig'.

Features (SLIRP networking, web observatory) are enabled by default and
toggled via CONFIG_HAS_WEB in .config. The build mode (debug/release) is
also configurable through Kconfig.

Kconfiglib is fetched on demand from sysprog21/Kconfiglib via shallow
clone into tools/kconfig/, cleaned by 'make distclean'.

Change-Id: I719856353c77c9c69872b9180fa6d6296b732a6c
@jserv jserv merged commit 2a63cc0 into main Mar 21, 2026
3 checks passed
@jserv jserv deleted the configuration branch March 21, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant