blob: 09632c80ce7a42fb3f1176d5c78f22c2bfcc8864 [file] [log] [blame]
Tom Rinifa437092023-08-08 16:36:16 -04001.. SPDX-License-Identifier: GPL-2.0+:
2
3Best Practices for Board Ports
4==============================
5
6In addition to the regular best practices such as using :doc:`checkpatch` and
7following the :doc:`docstyle` and the :doc:`codingstyle` there are some things
8which are specific to creating a new board port.
9
Simon Glassc684db92024-07-17 09:30:52 +010010* Implement :doc:`bootstd/index` to ensure that most operating systems will be
Tom Rinifa437092023-08-08 16:36:16 -040011 supported by the platform.
12
13* The platform defconfig file must be generated via `make savedefconfig`.
14
15* The Kconfig and Kbuild infrastructure supports using "fragments" that can be
16 used to apply changes on top of a defconfig file. These can be useful for
17 many things such as:
18
19 * Supporting different firmware locations (e.g. eMMC, SD, QSPI).
20
21 * Multiple board variants when runtime detection is not desired.
22
23 * Supporting different build types such as production and development.
24
25 Kconfig fragments should reside in the board directory itself rather than in
26 the top-level `configs/` directory.