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 X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C12BDC433EF for ; Sun, 19 Sep 2021 23:48:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7C7B46101B for ; Sun, 19 Sep 2021 23:48:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7C7B46101B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 103E783296; Mon, 20 Sep 2021 01:48:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="XzBf0uw5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 03E6D81BC8; Mon, 20 Sep 2021 01:48:31 +0200 (CEST) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6794681BC8 for ; Mon, 20 Sep 2021 01:48:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2b.google.com with SMTP id b10so19805677ioq.9 for ; Sun, 19 Sep 2021 16:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZEdT/pf9vsHsse5tIHXc0YI0Dp7AC+moNpT8VlRTvkI=; b=XzBf0uw5O7Q/giny1bD14rmIIfI7jOqGqq8KAww1BPeWT1IMD9KaK5DLPzzikTTN9Q h7K7NyMxzrMBooISHk1LvOCidZLj+8iLOPNKTKqdYXQ3kRox6FiU/IyePyIrXL4Q8eCk L7fSM7eZqyZ7CDKxmtQACODP8jPP1wYBRBIag= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZEdT/pf9vsHsse5tIHXc0YI0Dp7AC+moNpT8VlRTvkI=; b=WrcbxhsZH32h0cjw26+1JgeYY2hOZJPxRrRcMBqe92InWQ7Wc6nMih3ZUfJ/voHj7v XraK7ZUYvFoANXZAQL/Zut/ndi2tbU2OSbzaUHitsPVOZkBL7TIukeKd+4G/Npoxc+kT 7MqrCOcSz2BQKZE4v8R6g+a4ZEhG6rnv60CnGUQj+nxkVDL8JYgR046eb12irAzCsXa4 oc1vUcYvWwf4ziYFNfbAsXB2wpwFHwKKDcBnxDVD3iTxoa3OeWv7jdMqTU5R4HCI+W6P Yg+idF1v316G39MHBjaXDuJQg6+lAwv7QZ8d65oPbkrjpF9LRutBD/xZdfVFvwNC06Vy x7pQ== X-Gm-Message-State: AOAM532PxcY2t6eN2+wUvd9LwL4Fe7nRg2Oo9cBrsYwcu5gQ/kdh5SOk BAaOuGHL8IOW3+RFxjCDvzU+ovFsujgjdQ== X-Google-Smtp-Source: ABdhPJzHEZPbGjkat2OnF5BuqEB+MyLbn/1nF6bToTugYBhDqpkIjz+/d6Fi3UNjWQGS9z8Gs2oBYg== X-Received: by 2002:a05:6638:224c:: with SMTP id m12mr13521213jas.39.1632095305759; Sun, 19 Sep 2021 16:48:25 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y6sm7854441ilv.71.2021.09.19.16.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 16:48:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v6 01/11] doc: Convert SPL documentation to ReST Date: Sun, 19 Sep 2021 17:48:10 -0600 Message-Id: <20210919174815.v6.1.I25ec0964fa88300c1888cc5b5fa2cdcd4697c22e@changeid> X-Mailer: git-send-email 2.33.0.464.g1972c5931b-goog In-Reply-To: <20210919234820.3840570-1-sjg@chromium.org> References: <20210919234820.3840570-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Move this documentation over to .rst format. Signed-off-by: Simon Glass --- (no changes since v1) doc/develop/index.rst | 1 + doc/{README.SPL => develop/spl.rst} | 36 +++++++++++++++-------------- 2 files changed, 20 insertions(+), 17 deletions(-) rename doc/{README.SPL => develop/spl.rst} (86%) diff --git a/doc/develop/index.rst b/doc/develop/index.rst index 2a32645cfd2..48134549fa2 100644 --- a/doc/develop/index.rst +++ b/doc/develop/index.rst @@ -18,6 +18,7 @@ Implementation logging makefiles menus + spl uefi/index version diff --git a/doc/README.SPL b/doc/develop/spl.rst similarity index 86% rename from doc/README.SPL rename to doc/develop/spl.rst index 0448835f5f1..c7d08d22bf2 100644 --- a/doc/README.SPL +++ b/doc/develop/spl.rst @@ -20,19 +20,19 @@ u-boot-spl.map. A config option named CONFIG_SPL_BUILD is enabled by Kconfig for SPL. Source files can therefore be compiled for SPL with different settings. -For example: +For example:: -ifeq ($(CONFIG_SPL_BUILD),y) -obj-y += board_spl.o -else -obj-y += board.o -endif + ifeq ($(CONFIG_SPL_BUILD),y) + obj-y += board_spl.o + else + obj-y += board.o + endif -obj-$(CONFIG_SPL_BUILD) += foo.o + obj-$(CONFIG_SPL_BUILD) += foo.o -#ifdef CONFIG_SPL_BUILD - foo(); -#endif + #ifdef CONFIG_SPL_BUILD + foo(); + #endif The building of SPL images can be enabled by CONFIG_SPL option in Kconfig. @@ -71,11 +71,13 @@ Device tree The U-Boot device tree is filtered by the fdtgrep tools during the build process to generate a much smaller device tree used in SPL (spl/u-boot-spl.dtb) with: + - the mandatory nodes (/alias, /chosen, /config) - the nodes with one pre-relocation property: 'u-boot,dm-pre-reloc' or 'u-boot,dm-spl' fdtgrep is also used to remove: + - the properties defined in CONFIG_OF_SPL_REMOVE_PROPS - all the pre-relocation properties ('u-boot,dm-pre-reloc', 'u-boot,dm-spl' and 'u-boot,dm-tpl') @@ -98,14 +100,14 @@ stack usage at various points in run sequence of SPL. The -fstack-usage option to gcc will produce '.su' files (such as arch/arm/cpu/armv7/syslib.su) that will give stack usage information and cflow can construct program flow. -Must have gcc 4.6 or later, which supports -fstack-usage +Must have gcc 4.6 or later, which supports -fstack-usage: -1) Build normally -2) Perform the following shell command to generate a list of C files used in -SPL: -$ find spl -name '*.su' | sed -e 's:^spl/::' -e 's:[.]su$:.c:' > used-spl.list -3) Execute cflow: -$ cflow --main=board_init_r `cat used-spl.list` 2>&1 | $PAGER +#. Build normally +#. Perform the following shell command to generate a list of C files used in + SPL: +#. `find spl -name '*.su' | sed -e 's:^spl/::' -e 's:[.]su$:.c:' > used-spl.list` +#. Execute cflow: + `$ cflow --main=board_init_r $(cat used-spl.list) 2>&1 | $PAGER` cflow will spit out a number of warnings as it does not parse the config files and picks functions based on #ifdef. Parsing the '.i' -- 2.33.0.464.g1972c5931b-goog