summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-08-08 23:36:16 +0300
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-08-09 09:41:52 +0300
commitfa43709b8d7aa30b6d1039dce854c5eea86f122f (patch)
tree7c48b0e9332c530173470afb752c9240923ec710 /doc
parent8134043dada24a1879d85a9218c24c617ee4ae1e (diff)
downloadu-boot-fa43709b8d7aa30b6d1039dce854c5eea86f122f.tar.xz
doc: Begin adding a best practices document for board ports
To help guide developers down the right path, begin a document that lists some best practices to follow when creating a new board port. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/develop/board_best_practices.rst26
-rw-r--r--doc/develop/index.rst1
2 files changed, 27 insertions, 0 deletions
diff --git a/doc/develop/board_best_practices.rst b/doc/develop/board_best_practices.rst
new file mode 100644
index 0000000000..f44401eab7
--- /dev/null
+++ b/doc/develop/board_best_practices.rst
@@ -0,0 +1,26 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+Best Practices for Board Ports
+==============================
+
+In addition to the regular best practices such as using :doc:`checkpatch` and
+following the :doc:`docstyle` and the :doc:`codingstyle` there are some things
+which are specific to creating a new board port.
+
+* Implement :doc:`bootstd` to ensure that most operating systems will be
+ supported by the platform.
+
+* The platform defconfig file must be generated via `make savedefconfig`.
+
+* The Kconfig and Kbuild infrastructure supports using "fragments" that can be
+ used to apply changes on top of a defconfig file. These can be useful for
+ many things such as:
+
+ * Supporting different firmware locations (e.g. eMMC, SD, QSPI).
+
+ * Multiple board variants when runtime detection is not desired.
+
+ * Supporting different build types such as production and development.
+
+ Kconfig fragments should reside in the board directory itself rather than in
+ the top-level `configs/` directory.
diff --git a/doc/develop/index.rst b/doc/develop/index.rst
index 263d404b4c..5b230d0321 100644
--- a/doc/develop/index.rst
+++ b/doc/develop/index.rst
@@ -9,6 +9,7 @@ General
.. toctree::
:maxdepth: 1
+ board_best_practices
codingstyle
designprinciples
docstyle