From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00434C001B0 for ; Tue, 8 Aug 2023 20:11:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31E1C865DE; Tue, 8 Aug 2023 22:11:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.b="Vx8D+iPk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3C693865F4; Tue, 8 Aug 2023 22:11:36 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4A880861DA for ; Tue, 8 Aug 2023 22:11:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id D71AC3F534 for ; Tue, 8 Aug 2023 20:11:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1691525493; bh=rTCN5yuzJcCuijF4sTdw+ju6Kllcow8TVDFsXVxg3Ok=; h=Message-ID:Date:MIME-Version:Subject:To:References:From:Cc: In-Reply-To:Content-Type; b=Vx8D+iPkIs2dDTJ6o23LcL1QR6ZL5gKuvbJB76masNMZs58gbE6xtF0GhGjBXE3kV X4+7afzvj3f0lWoXHddVMgwWGOATqP2kWKM8yLRTu47iZEaAE4KTrS7P/a9QfC6i/y 1DVh/W/a7E+82/Es2FgZgj2yByaGax9EwfifLaJqdeyr6lDSqmrnU2D7fNqQN9v04p J07fCG9wPrhajRIvSOePiz27vTlSmGJKLOv61kUqhnNPRmbQeXNBBSdagVUjtxjas/ r7wNPkI4XI+OVIUy3ONezH+F1juO5vqCh03wURwMQK0PsyUYUk5dfmC5TT8hNtRZpE 2N9KgAX+0op5A== Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3fe232ba9e5so37880655e9.2 for ; Tue, 08 Aug 2023 13:11:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691525493; x=1692130293; h=content-transfer-encoding:in-reply-to:cc:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rTCN5yuzJcCuijF4sTdw+ju6Kllcow8TVDFsXVxg3Ok=; b=IHF6IfY9CJc3NIbRcz0uxc51aBCNKQwSjvKBu8yAdBIH5iBHCdGCVmufdttvWkmgK0 +XUsXaAre9CgbH3LTCh13VXfxK5QuaOMdu32UY8PxEljJQ60186L56XyzuoDQadx5kdI EWM8cgs40QTJ9KhyYEhqa2FrkF4KaMEah7XCrxmxOVWxbNHePu5ydbRsggAhtVeuM6uh PW9Rht634nXXJZtIl8+YnpwzyznUZ5jyMqXxPpO+wfXkbvxdIdnM0PVnIaj3BsrCo7NM 7RTqFlbwoMZDOsTDtzDTgsU4TpqjYi8vnQIYrb+HVAKWbO7v6U9GVTqnhILjoZGyzm8M MVVw== X-Gm-Message-State: AOJu0Ywrm0L/J3yUaAlpGmmhn4lCk4lzbpqH3e537KWXDapl2mrheiFZ wCRZxGh5p6sgNCjIddvICLOkWficCvBvqQ9CVpaMyXkXN7NqDByoeWwNFgH6kGQ7swpWwkOR6Gn 2qwE3wQRP/qy8ThpVFBkOKUjz9Tsggac= X-Received: by 2002:a7b:c313:0:b0:3fb:b3aa:1c8a with SMTP id k19-20020a7bc313000000b003fbb3aa1c8amr635501wmj.16.1691525493548; Tue, 08 Aug 2023 13:11:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbT7xW1mwLoI7gQPR6Sush23GWrfNrHYd/go5lVtE9j4of6X89YY1WipFsQOOO47pCS5nL7g== X-Received: by 2002:a7b:c313:0:b0:3fb:b3aa:1c8a with SMTP id k19-20020a7bc313000000b003fbb3aa1c8amr635491wmj.16.1691525493118; Tue, 08 Aug 2023 13:11:33 -0700 (PDT) Received: from [192.168.123.94] (ip-062-143-244-162.um16.pools.vodafone-ip.de. [62.143.244.162]) by smtp.gmail.com with ESMTPSA id g17-20020a7bc4d1000000b003fe26bf65e7sm14696897wmk.13.2023.08.08.13.11.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Aug 2023 13:11:32 -0700 (PDT) Message-ID: <1a8f8efe-bb3d-5644-fe0d-ef58ba4ca102@canonical.com> Date: Tue, 8 Aug 2023 22:12:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] doc: Begin adding a best practices document for board ports To: Tom Rini References: <20230711212048.1340990-2-j-kacines@ti.com> <20230807221510.673890-1-trini@konsulko.com> Content-Language: en-US, de-DE From: Heinrich Schuchardt Cc: u-boot@lists.denx.de In-Reply-To: <20230807221510.673890-1-trini@konsulko.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 8/8/23 00:15, Tom Rini wrote: > 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 > --- > 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 This looks helpful. Just a few suggestions: "to ensure that most operating systems will be supported by the platform." > + 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 %s/tha/that/ > + used to make changes on top of a defconfig file. These can be useful for Maybe: %s/to make/to apply/ > + 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 %s/And when used should/Kconfig fragments should/ %s/rather than the/rather than in the/ Best regards Heinrich > + 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