board_best_practices.rst 993 B

1234567891011121314151617181920212223242526
  1. .. SPDX-License-Identifier: GPL-2.0+:
  2. Best Practices for Board Ports
  3. ==============================
  4. In addition to the regular best practices such as using :doc:`checkpatch` and
  5. following the :doc:`docstyle` and the :doc:`codingstyle` there are some things
  6. which are specific to creating a new board port.
  7. * Implement :doc:`bootstd` to ensure that most operating systems will be
  8. supported by the platform.
  9. * The platform defconfig file must be generated via `make savedefconfig`.
  10. * The Kconfig and Kbuild infrastructure supports using "fragments" that can be
  11. used to apply changes on top of a defconfig file. These can be useful for
  12. many things such as:
  13. * Supporting different firmware locations (e.g. eMMC, SD, QSPI).
  14. * Multiple board variants when runtime detection is not desired.
  15. * Supporting different build types such as production and development.
  16. Kconfig fragments should reside in the board directory itself rather than in
  17. the top-level `configs/` directory.