How openembedded/bitbake works
BitBake is a task execution engine: users invoke builds through its command interface, which configures and runs a cooker; metadata is parsed and cached, then build tasks are scheduled and executed. The repository also includes layer-management tools, hash and PR services, and Toaster’s build-management web application. The graph follows documented and indexed dependencies; several runtime internals are unsampled, so their uncertain links are omitted rather than inferred.
Main entry points: cooker.py Build cooker · main.py BitBake CLI · cookerdata.py Cooker data · __init__.py Parser dispatch
Components 23
Build engine
- BitBake CLI
lib/bb/main.py - Build cooker
lib/bb/cooker.py - Task scheduler
lib/bb/runqueue.py - Task execution
lib/bb/build.py - Build server
lib/bb/server/process.py - XML-RPC client
lib/bb/server/xmlrpcclient.py
Metadata processing
- Metadata datastore
lib/bb/data_smart.py - Parser dispatch
lib/bb/parse/__init__.py - Recipe parser
lib/bb/parse/parse_py/BBHandler.py - Config parser
lib/bb/parse/parse_py/ConfHandler.py - Metadata AST
lib/bb/parse/ast.py - Metadata cache
lib/bb/cache.py - Source fetchers
lib/bb/fetch/__init__.py - Cooker data
lib/bb/cookerdata.py
Build services
- Hash equivalence
lib/hashserv/server.py - Hash database
lib/hashserv/sqlite.py - PR service
lib/prserv/serv.py
Layer tools
- Layer commands
lib/bblayers/action.py - Layer queries
lib/bblayers/query.py
Toaster
- Toaster web UI
lib/toaster/toastergui/views.py - Build controller
lib/toaster/bldcontrol/localhostbecontroller.py - Build records
lib/toaster/orm/models.py
Other components
- Build user
Connections 23
- Build user → BitBake CLI: invokes
README - BitBake CLI → Build cooker: starts
lib/bb/main.py - BitBake CLI → Build server: connects
lib/bb/main.py - BitBake CLI → XML-RPC client: connects
lib/bb/main.py - Build cooker → Metadata datastore: configures
- Build cooker → Task scheduler: schedules
- Task scheduler → Task execution: dispatches
- Build cooker → Metadata cache: uses
- Build cooker → Source fetchers: uses
- Build cooker → Hash equivalence: queries hashes
- Parser dispatch → Recipe parser: dispatches
lib/bb/parse/__init__.py - Parser dispatch → Config parser: dispatches
lib/bb/parse/__init__.py - Recipe parser → Metadata AST: builds statements
lib/bb/parse/parse_py/BBHandler.py - Config parser → Parser dispatch: parses includes
lib/bb/parse/parse_py/ConfHandler.py - Cooker data → Parser dispatch: loads metadata
lib/bb/cookerdata.py - Cooker data → Metadata datastore: uses datastore
lib/bb/cookerdata.py - Cooker data → Metadata cache: uses cache
lib/bb/cookerdata.py - Toaster web UI → Build controller: requests builds
- Build controller → Build records: reads records
lib/toaster/bldcontrol/localhostbecontroller.py - Build controller → XML-RPC client: controls build
lib/toaster/bldcontrol/bbcontroller.py - Layer commands → Cooker data: loads config
lib/bblayers/action.py - Layer queries → Layer commands: shares helpers
lib/bblayers/query.py - Hash equivalence → Hash database: reads and writes