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 A0D0DC433F5 for ; Mon, 28 Feb 2022 14:18:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0441083C75; Mon, 28 Feb 2022 15:17:59 +0100 (CET) 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="UMi2QwUL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7398583C55; Mon, 28 Feb 2022 15:17:57 +0100 (CET) Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) (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 ED12083BCC for ; Mon, 28 Feb 2022 15:17:51 +0100 (CET) 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-oo1-xc29.google.com with SMTP id i6-20020a4ac506000000b0031c5ac6c078so18892937ooq.6 for ; Mon, 28 Feb 2022 06:17:51 -0800 (PST) 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=Jwp7a3g3kNdBSYvxl29md7Q3cm3SL99t7FYRlWkdr2g=; b=UMi2QwULPm5f86d3ULZfe8NqtVMO5YkgmZOvDXYCaYXUjc0PoAaJO81MF1PzGf0vQj XTWq+PucuEmW5R94QcIUY112TzOwIVVmj+TB6jv6jJZ7DW6blJkZ25K69X/Ei0vCOzzv BtILpH1Ac1H4iSkmbsVsZYU1Xxb7j43ktB5VE= 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=Jwp7a3g3kNdBSYvxl29md7Q3cm3SL99t7FYRlWkdr2g=; b=C2wBla5ed+A6l7/qGUrCPgfVgSXNUL4qLtAPGlu+V2yfM2/5mhp2xysCb54HynhJrw +oMUBwZnTL12sKqWxdRFOvvV9uYYmTJJgnccSUf0WxzJoOlz60f4kh3P0VLkchvM1tOe 6QpZyk/MoBz03qSPPDJExr+QypC5NtY/XVfk2eh7IHgPoX7ccncFM0yCHhoyuCg/LvwJ 0AKGDz5xslvYG5TNhKY9ZJ25jGHcssR/l63IXC7zH7P1HBPYIe/mKbiF87S6R1aLAEKU aTFw/Tq+kJgH02wV14zJCyFDmIochcFDYfHxdrSU67t+O7fuuQxTlInZIQ0pF2A0J92r X5Fw== X-Gm-Message-State: AOAM533lj3cLFAB4Y0oSyAOwbg/3MHu4dTat7bg7ezj0Hn6im4mSYa8d s+uxgwiGIet6Cwx1TaKtQX9J8xAGCQPN9g== X-Google-Smtp-Source: ABdhPJzF8v5FsCYL6EgmBETQeewiGMo3JL8QC/bGJWa3Z7AnAC/40X/DLRcvEZzDyEIRQrwG3Fd/fg== X-Received: by 2002:a05:6870:8883:b0:d3:6ffa:cf20 with SMTP id m3-20020a056870888300b000d36ffacf20mr8020815oam.104.1646057870093; Mon, 28 Feb 2022 06:17:50 -0800 (PST) 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 y28-20020a4aea3c000000b0031c0cddfbf9sm4905966ood.20.2022.02.28.06.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 06:17:49 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v7 01/15] doc: Convert SPL documentation to ReST Date: Mon, 28 Feb 2022 07:16:43 -0700 Message-Id: <20220228071651.v7.1.I25ec0964fa88300c1888cc5b5fa2cdcd4697c22e@changeid> X-Mailer: git-send-email 2.35.1.574.g5d30c73bfb-goog In-Reply-To: <20220228141657.1388834-1-sjg@chromium.org> References: <20220228141657.1388834-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.5 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 93ebfa485f..a79dd9d4fb 100644 --- a/doc/develop/index.rst +++ b/doc/develop/index.rst @@ -23,6 +23,7 @@ Implementation menus printf smbios + 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 011fd42537..4d6f394bed 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.35.1.574.g5d30c73bfb-goog