How espressif/crosstool-ng works
Crosstool-NG is a configurable cross-toolchain builder: users select a target and toolchain components, then invoke its make-based interface to produce a toolchain. The tree shows Kconfig front ends and configuration definitions, plus package metadata for supported compilers, binutils, kernels, C libraries, and utilities. The README confirms the toolchain-building purpose but does not document the runtime build sequence in detail; those links are therefore marked unverified. The sampled Kconfig sources support the configuration-editor and symbol/expression layers.
Main entry points: ct-ng.in ct-ng interface · menu.c Menu model · config.in Configuration choices · conf.c Config editor
Components 23
Toolchain workflow
- ct-ng interface
ct-ng.in - Built toolchain
Configuration
- Configuration choices
config/config.in - Target options
config/target.in - Architecture options
config/arch - Component options
config
Toolchain components
- Package metadata
packages - Binutils
config/binutils - Compiler
config/cc - Target kernel
config/kernel - Target C library
config/libc - Debug tools
config/debug - Build tools
config/comp_tools
Kconfig engine
- Config editor
kconfig/conf.c - Menu editor
kconfig/mconf.c - Text editor
kconfig/nconf.c - Config persistence
kconfig/confdata.c - Menu model
kconfig/menu.c - Symbol evaluation
kconfig/symbol.c - Expression engine
kconfig/expr.c - Config preprocessing
kconfig/preprocess.c - Terminal dialogs
kconfig/lxdialog
Other components
- Toolchain user
Connections 23
- Toolchain user → ct-ng interface: invokes
README.md - ct-ng interface → Configuration choices: configures
- Configuration choices → Target options: offers
- Target options → Architecture options: selects
- Configuration choices → Component options: offers
- Configuration choices → Config editor: defines
- Config editor → Config persistence: reads config
- Config editor → Menu model: parses menus
- Menu editor → Menu model: edits menus
kconfig/mconf.c - Text editor → Menu model: edits menus
kconfig/nconf.c - Menu editor → Terminal dialogs: renders dialogs
kconfig/mconf.c - Menu model → Symbol evaluation: uses symbols
- Symbol evaluation → Expression engine: evaluates dependencies
kconfig/symbol.c - Config preprocessing → Menu model: prepares config
- Config persistence → Symbol evaluation: stores values
- ct-ng interface → Package metadata: uses package choices
- ct-ng interface → Binutils: builds
- ct-ng interface → Compiler: builds
- ct-ng interface → Target kernel: builds
- ct-ng interface → Target C library: builds
- ct-ng interface → Debug tools: builds
- ct-ng interface → Build tools: uses
- ct-ng interface → Built toolchain: produces