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