How coreboot/vboot works
Project type and purpose
• This is an open-source reference implementation of Chrome OS verified-boot, delivered as C libraries and command-line tools.
• It provides:
• A firmware module (for BIOS secure-boot verification)
• User-land utilities (futility, cgpt, dumpRSAPublicKey, etc.)
• Support libraries (host code for user-land, cgpt library, TPM stubs)
• Scripts for key generation and signing workflows
• Rust language bindings
File structure
• firmware/ → BIOS-side secure-boot code
• cgpt/ → GPT-partition CLI and library
• host/ → shared C library for host utilities
• futility/ → “firmware utility” CLI for creating/signing/verifying images
• utility/ → misc CLI tools (dumpRSAPublicKey, tpm-related utilities)
• scripts/ → shell & Python scripts orchestrating keygen, image signing
• rust/ → Rust FFI bindings to vboot_reference C APIs
• tests/ → test harness and data (exercising all of the above)
• Build/deploy:
• Makefile & Android.bp drive compilation
• Use of external dependencies: OpenSSL (for RSA), standard C toolchain
README for additional insights
• README explains:
• The role of each module
• How firmware/ is the only code the BIOS includes
• How futility/ uses host/ & firmware/ to sign and validate images
• How scripts/ wrap CLI tools for secure key workflows
– BIOS firmware module (firmware/)
– CGPT tool & library (cgpt/)
– Host utility library (host/)
– Futility CLI (futility/)
– Misc utilities (utility/)
– Scripts orchestrator (scripts/)
– Rust bindings (rust/)
– External dependencies (OpenSSL, OS, C toolchain)
– Tests harness (tests/)
– futility → host lib (links)
– futility → firmware lib (links for validation routines)
– futility → cgpt lib (when manipulating GPT)
– utility tools → host lib / firmware lib (as needed)
– scripts → invoke CLI tools (futility, cgpt, dumpRSAPublicKey)
– rust bindings → call into host & firmware C APIs via FFI
– BIOS ← firmware module (final output)
– OpenSSL → key generation & signing primitives used by host/firmware libs
c. Architectural patterns & principles
– Modular C libraries for reuse (host/, cgptlib, TPM stubs)
– Thin CLI front-ends (futility/, cgpt/)
– Clear separation BIOS-side vs. user-land code
– Scripts orchestrate high-level workflows without embedding crypto
d. Key technologies
– C99 code compiled via Make/Soong (Android.bp)
– OpenSSL for RSA operations
– Shell & Python scripts for build-time workflows
– Rust FFI for language bindings
Elements
• Blue for libraries
• Green for CLI tools
• Orange for scripts
• Grey for external dependencies