1*b9411a12SAndroid Build Coastguard Worker# Welcome to the coreboot documentation 2*b9411a12SAndroid Build Coastguard Worker 3*b9411a12SAndroid Build Coastguard WorkerThis is the developer documentation for [coreboot](https://coreboot.org). 4*b9411a12SAndroid Build Coastguard WorkerIt is built from Markdown files in the [Documentation] directory in the 5*b9411a12SAndroid Build Coastguard Workersource code. 6*b9411a12SAndroid Build Coastguard Worker 7*b9411a12SAndroid Build Coastguard Worker## Spelling of coreboot 8*b9411a12SAndroid Build Coastguard Worker 9*b9411a12SAndroid Build Coastguard WorkerThe correct spelling of coreboot is completely in lower case characters and in 10*b9411a12SAndroid Build Coastguard Workerone word without a space between the two parts. 11*b9411a12SAndroid Build Coastguard Worker 12*b9411a12SAndroid Build Coastguard Worker## Purpose of coreboot 13*b9411a12SAndroid Build Coastguard Worker 14*b9411a12SAndroid Build Coastguard Workercoreboot is a project to develop open source boot firmware for various 15*b9411a12SAndroid Build Coastguard Workerarchitectures. Its design philosophy is to do the bare minimum necessary to 16*b9411a12SAndroid Build Coastguard Workerensure that hardware is usable and then pass control to a different program 17*b9411a12SAndroid Build Coastguard Workercalled the _payload_. 18*b9411a12SAndroid Build Coastguard Worker 19*b9411a12SAndroid Build Coastguard Worker### Separation of concerns 20*b9411a12SAndroid Build Coastguard Worker 21*b9411a12SAndroid Build Coastguard WorkerThe payload can then provide user interfaces, file system drivers, 22*b9411a12SAndroid Build Coastguard Workervarious policies etc. to load the OS. Through this separation of concerns 23*b9411a12SAndroid Build Coastguard Workercoreboot maximizes reusability of the complicated and fundamental hardware 24*b9411a12SAndroid Build Coastguard Workerinitialization routines across many different use cases, no matter if 25*b9411a12SAndroid Build Coastguard Workerthey provide standard interfaces or entirely custom boot flows. 26*b9411a12SAndroid Build Coastguard Worker 27*b9411a12SAndroid Build Coastguard WorkerPopular [payloads](payloads.md) in use with coreboot are SeaBIOS, 28*b9411a12SAndroid Build Coastguard Workerwhich provides PCBIOS services, edk2, which provides UEFI services, 29*b9411a12SAndroid Build Coastguard WorkerGRUB2, the bootloader used by many Linux distributions, or depthcharge, 30*b9411a12SAndroid Build Coastguard Workera custom boot loader used on Chromebooks. 31*b9411a12SAndroid Build Coastguard Worker 32*b9411a12SAndroid Build Coastguard Worker### No resident services (if possible) 33*b9411a12SAndroid Build Coastguard Worker 34*b9411a12SAndroid Build Coastguard WorkerIdeally coreboot completely hands over control to the payload with no 35*b9411a12SAndroid Build Coastguard Workerpiece of coreboot remaining resident in the system, or even available 36*b9411a12SAndroid Build Coastguard Workerfor callback. Given the reality of contemporary computer design, 37*b9411a12SAndroid Build Coastguard Workerthere's often a small piece that survives for the whole runtime of 38*b9411a12SAndroid Build Coastguard Workerthe computer. It runs in a highly privileged CPU mode (e.g. SMM on x86) 39*b9411a12SAndroid Build Coastguard Workerand provides some limited amount of services to the OS. But here, too, 40*b9411a12SAndroid Build Coastguard Workercoreboot aims to keep everything at the minimum possible, both in scope 41*b9411a12SAndroid Build Coastguard Worker(e.g. services provided) and code size. 42*b9411a12SAndroid Build Coastguard Worker 43*b9411a12SAndroid Build Coastguard Worker### No specification of its own 44*b9411a12SAndroid Build Coastguard Worker 45*b9411a12SAndroid Build Coastguard Workercoreboot uses a very minimal interface to the payload, and otherwise 46*b9411a12SAndroid Build Coastguard Workerdoesn't impose any standards on the ecosystem. This is made possible by 47*b9411a12SAndroid Build Coastguard Workerseparating out concerns (interfaces and resident services are delegated 48*b9411a12SAndroid Build Coastguard Workerto the payload), but it's also a value that is deeply ingrained in the 49*b9411a12SAndroid Build Coastguard Workerproject. We fearlessly rip out parts of the architecture and remodel it 50*b9411a12SAndroid Build Coastguard Workerwhen a better way of doing the same was identified. 51*b9411a12SAndroid Build Coastguard Worker 52*b9411a12SAndroid Build Coastguard WorkerThat said, since there are attempts to coerce coreboot to move in various 53*b9411a12SAndroid Build Coastguard Workerdirections by outside "standardization", long-established practices of 54*b9411a12SAndroid Build Coastguard Workercoreboot as well as aligned projects can be documented as best practices, 55*b9411a12SAndroid Build Coastguard Workermaking them standards in their own right. However we reserve the right to 56*b9411a12SAndroid Build Coastguard Workerretire them as the landscape shifts around us. 57*b9411a12SAndroid Build Coastguard Worker 58*b9411a12SAndroid Build Coastguard Worker### One tree for everything 59*b9411a12SAndroid Build Coastguard Worker 60*b9411a12SAndroid Build Coastguard WorkerAnother difference to various other firmware projects is that we try 61*b9411a12SAndroid Build Coastguard Workerto avoid fragmentation: the traditional development model of firmware 62*b9411a12SAndroid Build Coastguard Workeris one of "set and forget" in which some code base is copied, adapted 63*b9411a12SAndroid Build Coastguard Workerfor the purpose at hands, shipped and only touched again if there's an 64*b9411a12SAndroid Build Coastguard Workerimportant fix to do. 65*b9411a12SAndroid Build Coastguard Worker 66*b9411a12SAndroid Build Coastguard WorkerAll newer development happens on another copy of some code base without 67*b9411a12SAndroid Build Coastguard Workerflowing back to any older copy, and so normally there's a huge amount 68*b9411a12SAndroid Build Coastguard Workerof fragmentation. 69*b9411a12SAndroid Build Coastguard Worker 70*b9411a12SAndroid Build Coastguard WorkerIn coreboot, we try to keep everything in a single source tree, and 71*b9411a12SAndroid Build Coastguard Workerlift up older devices when we change something fundamentally. That way, 72*b9411a12SAndroid Build Coastguard Workernew and old devices benefit alike from new development in the common parts. 73*b9411a12SAndroid Build Coastguard Worker 74*b9411a12SAndroid Build Coastguard WorkerThere's a downside to that: Some devices might have no maintainer anymore 75*b9411a12SAndroid Build Coastguard Workerwho could ensure that coreboot is still functional for them after a big 76*b9411a12SAndroid Build Coastguard Workerrework, or maybe a rework even requires knowledge that doesn't exist 77*b9411a12SAndroid Build Coastguard Workeranymore within the project (for example because the developer moved on 78*b9411a12SAndroid Build Coastguard Workerto do something else). 79*b9411a12SAndroid Build Coastguard Worker 80*b9411a12SAndroid Build Coastguard WorkerIn this case, we announce the deprecation of the device and defer the big 81*b9411a12SAndroid Build Coastguard Workerrework until the deprecation period passed, typically 6-12 months. This 82*b9411a12SAndroid Build Coastguard Workergives interested developers a chance to step in and bring devices up to 83*b9411a12SAndroid Build Coastguard Workerlatest standards. 84*b9411a12SAndroid Build Coastguard Worker 85*b9411a12SAndroid Build Coastguard WorkerWhile without this deprecation mechanism we could inflate the number 86*b9411a12SAndroid Build Coastguard Workerof supported devices (probably 300+), only a tiny fraction of them 87*b9411a12SAndroid Build Coastguard Workerwould even work, which helps nobody. 88*b9411a12SAndroid Build Coastguard Worker 89*b9411a12SAndroid Build Coastguard Worker## Scope of the coreboot project 90*b9411a12SAndroid Build Coastguard Worker 91*b9411a12SAndroid Build Coastguard Workercoreboot as a project is closer to the Linux kernel than to most 92*b9411a12SAndroid Build Coastguard Workeruser level programs. One place where this becomes apparent is the 93*b9411a12SAndroid Build Coastguard Workerdistribution mechanism: The project itself only provides source code 94*b9411a12SAndroid Build Coastguard Workerand does not ship ready-to-install coreboot-based firmware binaries. 95*b9411a12SAndroid Build Coastguard Worker 96*b9411a12SAndroid Build Coastguard WorkerWhat the project distributes, even if - strictly speaking - it's not 97*b9411a12SAndroid Build Coastguard Workerpart of the project, is a collection of vendor binaries (that we call 98*b9411a12SAndroid Build Coastguard Worker"blobs") that are redistributable. They cover the parts of hardware init 99*b9411a12SAndroid Build Coastguard Workerthat we haven't managed to open up, and while some hardware requires them, 100*b9411a12SAndroid Build Coastguard Workerthere's still hardware that can boot without any such binary components. 101*b9411a12SAndroid Build Coastguard Worker 102*b9411a12SAndroid Build Coastguard WorkerThe build system can integrate them into the build automatically if 103*b9411a12SAndroid Build Coastguard Workerrequired, but that requires explicit opt-in and downloads a separate 104*b9411a12SAndroid Build Coastguard Workerrepository to ensure that the distinction remains clear. 105*b9411a12SAndroid Build Coastguard Worker 106*b9411a12SAndroid Build Coastguard WorkerThere are various [distributions](distributions.md), some shipping 107*b9411a12SAndroid Build Coastguard Workercoreboot with their hardware (e.g. Purism or Chromebooks), others 108*b9411a12SAndroid Build Coastguard Workerproviding after-market images for various devices (e.g. Libreboot, 109*b9411a12SAndroid Build Coastguard WorkerMrChromebox). 110*b9411a12SAndroid Build Coastguard Worker 111*b9411a12SAndroid Build Coastguard WorkerIf you want to use coreboot on your system, that's great! 112*b9411a12SAndroid Build Coastguard Worker 113*b9411a12SAndroid Build Coastguard WorkerPlease note that the infrastructure around coreboot.org is built for 114*b9411a12SAndroid Build Coastguard Workerdevelopment purposes. We gladly help out users through our communication 115*b9411a12SAndroid Build Coastguard Workerchannels, but we also expect a "firmware developer mindset": If compiling 116*b9411a12SAndroid Build Coastguard Workeryour own firmware and, at some point, recovering from a bad flash by 117*b9411a12SAndroid Build Coastguard Workerhooking wires onto chips in your computer sounds scary to you, you're 118*b9411a12SAndroid Build Coastguard Workerright, as it is. 119*b9411a12SAndroid Build Coastguard Worker 120*b9411a12SAndroid Build Coastguard WorkerIf that's _way_ beyond your comfort zone, consider looking into the 121*b9411a12SAndroid Build Coastguard Workervarious distributions, as they typically provide pre-tested binaries 122*b9411a12SAndroid Build Coastguard Workerwhich massively reduces the risk that the binary you write to flash is 123*b9411a12SAndroid Build Coastguard Workerone that won't boot the system (with the consequence that to get it to work 124*b9411a12SAndroid Build Coastguard Workeragain, you'll need to attach various tools to various chips) 125*b9411a12SAndroid Build Coastguard Worker 126*b9411a12SAndroid Build Coastguard Worker## The coreboot community 127*b9411a12SAndroid Build Coastguard Worker 128*b9411a12SAndroid Build Coastguard WorkerIf you're interested in getting your hands dirty (incl. potentially wiring 129*b9411a12SAndroid Build Coastguard Workerup an external flasher to your computer), you've come to the right place! 130*b9411a12SAndroid Build Coastguard Worker 131*b9411a12SAndroid Build Coastguard WorkerWe have various [forums](community/forums.md) where we discuss and coordinate 132*b9411a12SAndroid Build Coastguard Workerour activities, review patches, and help out each other. To 133*b9411a12SAndroid Build Coastguard Workerhelp promote a positive atmosphere, we established a [Code of 134*b9411a12SAndroid Build Coastguard WorkerConduct](community/code_of_conduct.md). We invested a lot of time 135*b9411a12SAndroid Build Coastguard Workerto balance it out, so please keep it in mind when engaging with the 136*b9411a12SAndroid Build Coastguard Workercoreboot community. 137*b9411a12SAndroid Build Coastguard Worker 138*b9411a12SAndroid Build Coastguard WorkerEvery now and then, coreboot is present in one way or another at 139*b9411a12SAndroid Build Coastguard Worker[conferences](community/conferences.md). If you're around, come and 140*b9411a12SAndroid Build Coastguard Workersay hello! 141*b9411a12SAndroid Build Coastguard Worker 142*b9411a12SAndroid Build Coastguard Worker## Blob policy in the coreboot project 143*b9411a12SAndroid Build Coastguard Worker 144*b9411a12SAndroid Build Coastguard WorkerThe goal of the coreboot project is to provide a FOSS firmware solution across 145*b9411a12SAndroid Build Coastguard Workermultiple CPU architectures, such as ARM, x86, and RISC-V. While fully open 146*b9411a12SAndroid Build Coastguard Workersource implementations for these architectures are encouraged and preferred, 147*b9411a12SAndroid Build Coastguard Workerwe understand that a fully open implementation whereby every firmware component 148*b9411a12SAndroid Build Coastguard Workeris available as source code for modern platforms is not always feasible. 149*b9411a12SAndroid Build Coastguard WorkerDifferent reasons inhibit the availability of fully open implementations, 150*b9411a12SAndroid Build Coastguard Workerincluding limited development resources, 3rd party license constraints of 151*b9411a12SAndroid Build Coastguard WorkerIP blocks, or a legacy mindset of the silicon vendors. 152*b9411a12SAndroid Build Coastguard Worker 153*b9411a12SAndroid Build Coastguard WorkerIt is important for the coreboot project to have support for modern CPU 154*b9411a12SAndroid Build Coastguard Workerplatforms in order to provide a viable alternative for proprietary firmware 155*b9411a12SAndroid Build Coastguard Workerimplementations. We do not have direct control over how hardware vendors design 156*b9411a12SAndroid Build Coastguard Workertheir products, however we can provide an attractive alternative to the 157*b9411a12SAndroid Build Coastguard Workerexpensive and complicated proprietary firmware model that exists today. 158*b9411a12SAndroid Build Coastguard WorkerFor modern platforms, we are largely dependent on the silicon 159*b9411a12SAndroid Build Coastguard Workervendor to provide additional information on how to properly initialize the 160*b9411a12SAndroid Build Coastguard Workerhardware, as the required datasheets are often only available with an NDA. 161*b9411a12SAndroid Build Coastguard WorkerTherefore, one possible way to have coreboot support for the latest platforms 162*b9411a12SAndroid Build Coastguard Workeris binary code (aka, a blob) provided by the silicon vendor. While we do 163*b9411a12SAndroid Build Coastguard Workerdiscourage this solution, it can be a door opener for coreboot’s support of a 164*b9411a12SAndroid Build Coastguard Workergiven platform and thus keep coreboot functional on modern platforms. It is 165*b9411a12SAndroid Build Coastguard Workerclearly not the goal of the project to accept every blob a silicon vendor wishes 166*b9411a12SAndroid Build Coastguard Workerto use without question. On the contrary, each new blob needs to be examined 167*b9411a12SAndroid Build Coastguard Workercritically by the community, evaluating the need, risk, and alternative options. 168*b9411a12SAndroid Build Coastguard Worker 169*b9411a12SAndroid Build Coastguard WorkerWherever possible, introducing new blobs should be avoided. That said, there 170*b9411a12SAndroid Build Coastguard Workercan be situations where a piece of code provided as a blob will enable the rest 171*b9411a12SAndroid Build Coastguard Workerof the fully open source firmware stack on a brand new platform. If blocking 172*b9411a12SAndroid Build Coastguard Workerthis blob would lead to no support at all for the platform in question in 173*b9411a12SAndroid Build Coastguard Workercoreboot, this situation needs to be examined carefully. While these kinds 174*b9411a12SAndroid Build Coastguard Workerof discussion will be coordinated closely with the community (e.g. on the 175*b9411a12SAndroid Build Coastguard Workermailing list or dedicated meetings), ultimately it is up to the leadership to 176*b9411a12SAndroid Build Coastguard Workerdecide if there is no agreement between the community and the vendor pushing for 177*b9411a12SAndroid Build Coastguard Workerthe new blob. This decision will be communicated on the mailing list. 178*b9411a12SAndroid Build Coastguard WorkerPlease see additionally 179*b9411a12SAndroid Build Coastguard Worker[coreboot binary policy](https://github.com/coreboot/blobs/blob/master/README.md). 180*b9411a12SAndroid Build Coastguard Worker 181*b9411a12SAndroid Build Coastguard Worker## Getting the source code 182*b9411a12SAndroid Build Coastguard Worker 183*b9411a12SAndroid Build Coastguard Workercoreboot is primarily developed in the 184*b9411a12SAndroid Build Coastguard Worker[git](https://review.coreboot.org/plugins/gitiles/coreboot) version control 185*b9411a12SAndroid Build Coastguard Workersystem, using [Gerrit](https://review.coreboot.org) to manage 186*b9411a12SAndroid Build Coastguard Workercontributions and code review. 187*b9411a12SAndroid Build Coastguard Worker 188*b9411a12SAndroid Build Coastguard WorkerIn general we try to keep the `main` branch in the repository functional 189*b9411a12SAndroid Build Coastguard Workerfor all hardware we support. So far, the only guarantee we can make is 190*b9411a12SAndroid Build Coastguard Workerthat the main branch will (nearly) always build for all boards in a 191*b9411a12SAndroid Build Coastguard Workerstandard configuration. 192*b9411a12SAndroid Build Coastguard Worker 193*b9411a12SAndroid Build Coastguard WorkerHowever, we're continually working on improvements to our infrastructure to 194*b9411a12SAndroid Build Coastguard Workerget better in that respect, e.g. by setting up boot testing facilities. This 195*b9411a12SAndroid Build Coastguard Workeris obviously more complex than regular integration testing, so progress 196*b9411a12SAndroid Build Coastguard Workeris slow. 197*b9411a12SAndroid Build Coastguard Worker 198*b9411a12SAndroid Build Coastguard Worker### What our releases mean 199*b9411a12SAndroid Build Coastguard Worker 200*b9411a12SAndroid Build Coastguard WorkerWe also schedule two source code releases every year, around April and 201*b9411a12SAndroid Build Coastguard WorkerOctober. These releases see some very limited testing and mostly serve 202*b9411a12SAndroid Build Coastguard Workeras synchronization points for deprecation notices and for other projects 203*b9411a12SAndroid Build Coastguard Workersuch as external distributions. 204*b9411a12SAndroid Build Coastguard Worker 205*b9411a12SAndroid Build Coastguard WorkerThis approach and terminology differs somewhat from how other projects handle 206*b9411a12SAndroid Build Coastguard Workerreleases where releases are well-tested artifacts and the development 207*b9411a12SAndroid Build Coastguard Workerrepository tends to be unstable. The "rolling release" model of some projects, 208*b9411a12SAndroid Build Coastguard Workerfor example OpenBSD, is probably the closest cousin of our approach. 209*b9411a12SAndroid Build Coastguard Worker 210*b9411a12SAndroid Build Coastguard WorkerContents: 211*b9411a12SAndroid Build Coastguard Worker 212*b9411a12SAndroid Build Coastguard Worker```{toctree} 213*b9411a12SAndroid Build Coastguard Worker:maxdepth: 1 214*b9411a12SAndroid Build Coastguard Worker 215*b9411a12SAndroid Build Coastguard WorkerGetting Started <getting_started/index.md> 216*b9411a12SAndroid Build Coastguard WorkerTutorial <tutorial/index.md> 217*b9411a12SAndroid Build Coastguard WorkerContributing <contributing/index.md> 218*b9411a12SAndroid Build Coastguard WorkerCommunity <community/index.md> 219*b9411a12SAndroid Build Coastguard WorkerPayloads <payloads.md> 220*b9411a12SAndroid Build Coastguard WorkerDistributions <distributions.md> 221*b9411a12SAndroid Build Coastguard WorkerTechnotes <technotes/index.md> 222*b9411a12SAndroid Build Coastguard WorkerACPI <acpi/index.md> 223*b9411a12SAndroid Build Coastguard WorkerNative Graphics Initialization with libgfxinit <gfx/libgfxinit.md> 224*b9411a12SAndroid Build Coastguard WorkerDisplay panel <gfx/display-panel.md> 225*b9411a12SAndroid Build Coastguard WorkerCPU Architecture <arch/index.md> 226*b9411a12SAndroid Build Coastguard WorkerPlatform independent drivers <drivers/index.md> 227*b9411a12SAndroid Build Coastguard WorkerNorthbridge <northbridge/index.md> 228*b9411a12SAndroid Build Coastguard WorkerSystem on Chip <soc/index.md> 229*b9411a12SAndroid Build Coastguard WorkerMainboard <mainboard/index.md> 230*b9411a12SAndroid Build Coastguard WorkerPayloads <lib/payloads/index.md> 231*b9411a12SAndroid Build Coastguard WorkerLibraries <lib/index.md> 232*b9411a12SAndroid Build Coastguard WorkerOptions <lib/option.md> 233*b9411a12SAndroid Build Coastguard WorkerSecurity <security/index.md> 234*b9411a12SAndroid Build Coastguard WorkerSuperIO <superio/index.md> 235*b9411a12SAndroid Build Coastguard WorkerVendorcode <vendorcode/index.md> 236*b9411a12SAndroid Build Coastguard WorkerUtilities <util.md> 237*b9411a12SAndroid Build Coastguard WorkerSoftware Bill of Materials <sbom/sbom.md> 238*b9411a12SAndroid Build Coastguard WorkerProject infrastructure & services <infrastructure/index.md> 239*b9411a12SAndroid Build Coastguard WorkerBoards supported in each release directory <releases/boards_supported_on_branches.md> 240*b9411a12SAndroid Build Coastguard WorkerRelease notes <releases/index.md> 241*b9411a12SAndroid Build Coastguard WorkerAcronyms & Definitions <acronyms.md> 242*b9411a12SAndroid Build Coastguard WorkerExternal Resources <external_docs.md> 243*b9411a12SAndroid Build Coastguard WorkerDocumentation License <documentation_license.md> 244*b9411a12SAndroid Build Coastguard Worker``` 245*b9411a12SAndroid Build Coastguard Worker 246*b9411a12SAndroid Build Coastguard Worker[Documentation]: https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/main/Documentation/ 247