U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] doc: Begin adding a best practices document for board ports
Date: Mon,  7 Aug 2023 18:15:10 -0400	[thread overview]
Message-ID: <20230807221510.673890-1-trini@konsulko.com> (raw)
In-Reply-To: <20230711212048.1340990-2-j-kacines@ti.com>

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>
---
 doc/develop/board_best_practices.rst | 26 ++++++++++++++++++++++++++
 doc/develop/index.rst                |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 doc/develop/board_best_practices.rst

diff --git a/doc/develop/board_best_practices.rst b/doc/develop/board_best_practices.rst
new file mode 100644
index 000000000000..835ea86dedb2
--- /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 :doc:`docstyle` and :doc:`codingstyle` there are some things which
+are specific to creating a new board port.
+
+* Implement :doc:`bootstd` to ensure that the most number of operating systems
+  will be available for the platform.
+
+* The platform defconfig file must be generated via `make savedefconfig`.
+
+* The Kconfig and Kbuild infrastructure supports using "fragments" tha can be
+  used to make 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.
+
+  And when used should reside in the board directory itself rather than the
+  top-level `configs/` directory.
diff --git a/doc/develop/index.rst b/doc/develop/index.rst
index 263d404b4ca8..5b230d0321f2 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
-- 
2.34.1


  parent reply	other threads:[~2023-08-07 22:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11 21:20 [RFC PATCH 0/3] Minimal platform configuration Jason Kacines
2023-07-11 21:20 ` [RFC PATCH 1/3] scripts: kconfig: Add config fragment support in board/../ Jason Kacines
2023-07-12 14:00   ` Simon Glass
2023-07-13 22:54     ` Tom Rini
2023-07-15 23:40       ` Simon Glass
2023-07-16 15:12         ` Tom Rini
2023-07-19  1:07           ` Simon Glass
2023-07-19 13:34             ` Tom Rini
2023-07-27  0:49               ` Simon Glass
2023-08-07 22:15   ` Tom Rini [this message]
2023-08-08 20:12     ` [PATCH] doc: Begin adding a best practices document for board ports Heinrich Schuchardt
2023-08-08 20:36     ` [v2] " Tom Rini
2023-08-09  2:03       ` Simon Glass
2023-08-09 17:17   ` [RFC PATCH 1/3] scripts: kconfig: Add config fragment support in board/../ Tom Rini
2023-07-11 21:20 ` [RFC PATCH 2/3] configs: Add am62x wakeup defconfigs Jason Kacines
2023-07-11 21:20 ` [RFC PATCH 3/3] board: ti: am62x: Add am62x_evm defconfig fragments Jason Kacines
2023-07-12 14:00 ` [RFC PATCH 0/3] Minimal platform configuration Simon Glass
2023-07-13 22:34   ` Nishanth Menon
2023-07-15 23:40     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230807221510.673890-1-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox