Tom Rini | fa43709 | 2023-08-08 16:36:16 -0400 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
| 3 | Best Practices for Board Ports |
| 4 | ============================== |
| 5 | |
| 6 | In addition to the regular best practices such as using :doc:`checkpatch` and |
| 7 | following the :doc:`docstyle` and the :doc:`codingstyle` there are some things |
| 8 | which are specific to creating a new board port. |
| 9 | |
| 10 | * Implement :doc:`bootstd` to ensure that most operating systems will be |
| 11 | 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. |