From patchwork Sat Sep 5 08:58:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1357945 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=BFts83Ii; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bk7lL6YTvz9sRK for ; Sat, 5 Sep 2020 18:59:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7E04F822C0; Sat, 5 Sep 2020 10:59:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="BFts83Ii"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 89611822A3; Sat, 5 Sep 2020 10:59:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 ABBBD82294 for ; Sat, 5 Sep 2020 10:59:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599296339; bh=zvHZsT7AU0vukzAXUKypiWjRhp4ATRLAYj9bcdn9cv0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=BFts83IiRnYEV6flYL/8vmgpl7QcCmK1XbkcqV9K88rO0wJx+fzMnXlRcW1f3ZphU mo/qupj/zSFPDWHUfnoEVMf29w2lj3/UJfsVy5E9LMq5z78vEmuLwdBVPo/nwzCC2m qfXVXMLmNdzExtYuNCUsSb5qDVJYpg1HykulVpaU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([178.202.41.107]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MwwZX-1kT7Ae06mZ-00yUfC; Sat, 05 Sep 2020 10:58:59 +0200 From: Heinrich Schuchardt To: Tom Rini Cc: Bin Meng , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 1/2] doc: describe source repository Date: Sat, 5 Sep 2020 10:58:52 +0200 Message-Id: <20200905085853.29081-2-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905085853.29081-1-xypron.glpk@gmx.de> References: <20200905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yaLu5H/3PzQuQs80VM+PsDmuwO1ciKidC7UigRv2gNuq4U4XIN2CDs0AH8KvKo42lYWe PuAkDz9IqJOFHJRura7Dj1Bun35FjTtS/0nh0Yl2lTFNJXjtcZo7UFmxGmU5Dr21x2z+gvLVE NoauUi9HZm4NCwsZjYdkcfDPQnC3J89R6U7IrmW/JPLgXxMGRWwu9NnwoLLZH/7qvwY5UMWCi 4UztBQWr3Swc7nenZD2Co277IZKVFRa00jwuoqdYszqIM0h9p9nkzE4qy7S7PMtY0L9BYvI2h t5t+I79vI40cHpexMZ3GKR/iNoTX4Ssl4uHZIUI5ST+XqYBmbswuYxfLSbFc74p+bwyHHSYSU AIb5f0KaArPZO3F59Vg7oTYv5O9EJ6bRP1ZdGYkuM9FSDHLpMx6RJh+kuBXt8CsFSeWKbTtPX 7OmfYyCZLgflltQgruWllu7yDKstFLX0qMltWxk/l9WCaRmZb8ffpzFY632rGPx8gSb9Vw6aQ vzLBjRiqlHN5ktl6z/OSUg36b6TqGHafS3nnBlw== 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.102.3 at phobos.denx.de X-Virus-Status: Clean Add a chapter to the HTML documentation describing how to retrieve the U-Boot sources. Signed-off-by: Heinrich Schuchardt --- doc/build/index.rst | 1 + doc/build/source.rst | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 doc/build/source.rst -- 2.28.0 diff --git a/doc/build/index.rst b/doc/build/index.rst index e0072afb5e..5051a97e70 100644 --- a/doc/build/index.rst +++ b/doc/build/index.rst @@ -6,5 +6,6 @@ Build U-Boot .. toctree:: :maxdepth: 2 + source clang tools diff --git a/doc/build/source.rst b/doc/build/source.rst new file mode 100644 index 0000000000..4627c1f79e --- /dev/null +++ b/doc/build/source.rst @@ -0,0 +1,30 @@ +Obtaining the source +===================== + +The source of the U-Boot project is maintained in a Git repository. + +You can download the source via + +.. code-block:: bash + + git clone https://gitlab.denx.de/u-boot/u-boot.git + +A mirror of the source is maintained on Github + +.. code-block:: bash + + git clone https://github.com/u-boot/u-boot + +The released versions are available as tags which use the naming scheme:: + + v. + +Release candidates are named:: + + v.-rc + +To checkout the October 2020 release you would use: + +.. code-block:: bash + + git checkout v2020.10 From patchwork Sat Sep 5 08:58:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1357944 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=dA+o8M84; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bk7l72L52z9sTH for ; Sat, 5 Sep 2020 18:59:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C152682294; Sat, 5 Sep 2020 10:59:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="dA+o8M84"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B825822AF; Sat, 5 Sep 2020 10:59:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 A36B082286 for ; Sat, 5 Sep 2020 10:59:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599296339; bh=AEiudZC2qpXWYXmxh+fXdiyso+2/LE/+wgBK8SkPhog=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=dA+o8M84I8GXWbxIpf6tOdpKZ3iI5JBe9EbFPSfwOSOpPL/qaWvevBfNCfuJ6TM0N YUNlkkCr/p9QqUo5rzcdMcQ4IqTuFzRKMYDogMmtt7nMCUhl0kbIF2PkMP0aEgj7Qf ZiCA92+b/cHMn76hJ25Kq3eJ+FV7ZvzSJJrGxnVM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([178.202.41.107]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MgesG-1kmiOF10hw-00h60L; Sat, 05 Sep 2020 10:58:59 +0200 From: Heinrich Schuchardt To: Tom Rini Cc: Bin Meng , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 2/2] doc: describe building with GCC Date: Sat, 5 Sep 2020 10:58:53 +0200 Message-Id: <20200905085853.29081-3-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905085853.29081-1-xypron.glpk@gmx.de> References: <20200905085853.29081-1-xypron.glpk@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:VCxK4UfJGOmK6Q6ZVVlIJLuuQcbKcXv0a3/BCgRd54VhRc5COG9 U3H53TCIqeFUVgIg/KWXveI7xFSQ5z96wQBPKCo9E6xXm1mNxsIdzgkx4gkcRtnygJ7PSUE cPIqO8aHP3TitZ3sckMZHFN0aFFFj3pqI3LWL1QCCrWiUQp49lJz6noBoNl4Uh++tTbcsmt hRFInJKqt1QxFIMa7JoaA== X-UI-Out-Filterresults: notjunk:1;V03:K0:Wg7+p+628E4=:SKAuvctIDryiJC/t1BEJi3 bMOcOy9SMbvRVngnaQZWus6HkKz7KL46H+DNKwUHXA6zCzcFWytx5ItIsBRjGPByKtapAVo6a k8APcneOvLLze2EAY5IJPNpi9+fS+FP7kC+FBP2Ra4cp7vhISVqf3AqQoe+yDCV+7hGTV1UoJ hbxCnkR3/IkIyESf+jFbD5ddFh3/JODY0L9+dbSbfEredYKIGq74LEHgiyeqSMat2OM8tQKvQ qTRlYbKwm/AcvXOFPmKkGUcyoOKIhnGnXtnD3lFyIFKnz/OnpewNyOlMKh8z2E+Z6e72eHFvk 8p6z1sDWoyM0zs38QzntM2Am9moyHno2Jml8FoPIcUj1g74EOjz9YqD6u6ku0tkFooXUQQjp0 bc3V1nCwDJJru5xkBgtEa5wnAGwwNFyGUgFXVNmiAHnqnFwhCHy39x5XttTXOjbdGGFEEn1VS 0pH089d5IRbVfxtpesQ+KZQZ3NMr9l6i56NvvE6fpHz7d3aDYKs0X4nPfIbyfAV9CpyWMvf2R CbxELBxFBcUqPHIyQWEHbyTpfVQR+DYTYWfTqHTixbbzzyjBVXsen5a6kxvY/7rKSOnG723Qn yYTDQc1mhQJRYtMpGf7qDy1lJSNBdlLmMFN289D9BxT1+R1GnKSh6JBIcGXgKwGiyJneyytry w/FJ6hQV2Pj18V9y5aYapJriTOiS3yzpQqAy1Gym/K58auUuCgjI/8ETFNBW7El80RJTeWilF DlM+mccPW2hGLy/Qgu+N3fxad/zO/VSd5jGn2GKAMhBV71oPyklh7IDVOLofPed8/AdhivcZE BK9Fg7/o9erVLUhFQdU7mQWmyS4ZL0x5kgVW+7XreJ4BGnSlsiCcPwajeH3+KiSbOaUXxZ5za Rrd0RX/PFzna6F/im4Tk3s5J4wIxyKvrF4m5G8/1fTNjo0KkAuBhKRrygRI9O/N4xN0Py4rn1 D9l/YlPQwm1vBDlyHPC1gOlcwMVaLxTkV4g7Sm7+wK1SSXy8j/1rxyYwZlakPIoJZdu5Xs5Hz cg+pAVL/AlhGYgBIFeNgFUdeNAwgtuOHsy3gxV4nfEGXCJ4g+WZfYlnCCYLXqslsou9tCcv1t v4DEGAgHfOiSP2DN3efZQx73fZ1b50rkktxnRuPEYrzjRnEDTrQ8xsHGDM3e9ubtX77HkGnt1 i4c8mFtcCQoRhWstVKnY7ynLY/se/zQxEbqTsOeIi1RX6dstUdf8v23rTumHImJejX4GFC4oM PY3LufiStw28TCgJ9W7rzqf1Xq5pn+fOmYB4qOA== 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.102.3 at phobos.denx.de X-Virus-Status: Clean Provide a description of the U-Boot build process with GCC in the HTML documentation. Signed-off-by: Heinrich Schuchardt --- doc/build/gcc.rst | 119 ++++++++++++++++++++++++++++++++++++++++++++ doc/build/index.rst | 1 + 2 files changed, 120 insertions(+) create mode 100644 doc/build/gcc.rst -- 2.28.0 diff --git a/doc/build/gcc.rst b/doc/build/gcc.rst new file mode 100644 index 0000000000..fcb0b1ffb3 --- /dev/null +++ b/doc/build/gcc.rst @@ -0,0 +1,119 @@ +Building with GCC +================= + +Dependencies +------------ + +For building U-Boot you need a GCC compiler for your host platform. If you +are not building on the target platform you further need a GCC cross compiler. + +Debian based +~~~~~~~~~~~~ + +On Debian based systems the cross compiler packages are named +gcc--linux-gnu. + +You could install GCC and the GCC cross compiler for the ARMv8 architecture with + +.. code-block:: bash + + sudo apt-get gcc gcc-aarch64-linux-gnu + +Depending on the build targets further packages maybe needed + +.. code-block:: bash + + sudo apt-get install bc bison build-essential coccinelle \ + device-tree-compiler dfu-util efitools flex gdisk liblz4-tool \ + libguestfs-tools libncurses-dev libpython3-dev libsdl2-dev libssl-dev \ + lzma-alone openssl python3 python3-coverage python3-pyelftools \ + python3-pytest python3-sphinxcontrib.apidoc python3-sphinx-rtd-theme swig + +Prerequisites +------------- + +For some boards you have to build prerequisite files before you can build +U-Boot, e.g. for the some boards you will need to build the ARM Trusted Firmware +beforehand. Please, refer to the board specific documentation +:doc:`../board/index`. + +Configuration +------------- + +Directory configs/ contains the template configuration files for the maintained +boards following the naming scheme:: + + _defconfig + +These files have been stripped of default settings. So you cannot use them +directly. Instead their name serves as a make target to generate the actual +configuration file .config. For instance the configuration template for the +Odroid C2 board is called odroid-c2_defconfig. The corresponding .config file +is generated by + +.. code-block:: bash + + make odroid-c2_defconfig + +You can adjust the configuration using + +.. code-block:: bash + + make menuconfig + +Building +-------- + +When cross compiling you will have to specify the prefix of the cross-compiler. +You can either specify the value of the CROSS_COMPILE variable on the make +command line or export it beforehand. + +.. code-block:: bash + + CROSS_COMPILE= make + +Assuming cross compiling on Debian for ARMv8 this would be + +.. code-block:: bash + + CROSS_COMPILE=aarch64-linux-gnu- make + +Build parameters +~~~~~~~~~~~~~~~~ + +A list of available parameters for the make command can be obtained via + +.. code-block:: bash + + make help + +You can speed up compilation by parallelization using the -j parameter, e.g. + +.. code-block:: bash + + CROSS_COMPILE=aarch64-linux-gnu- make -j$(nproc) + +Further important build parameters are + +* O= - generate all output files in directory , including .config +* V=1 - verbose build + +Other build targets +~~~~~~~~~~~~~~~~~~~ + +A list of all make targets can be obtained via + +.. code-block:: bash + + make help + +Important ones are + +* clean - remove most generated files but keep the configuration +* mrproper - remove all generated files + config + various backup files + +Installation +------------ + +The process for installing U-Boot on the target device is device specific. +Please, refer to the board specific documentation :doc:`../board/index`. diff --git a/doc/build/index.rst b/doc/build/index.rst index 5051a97e70..5f90f95aca 100644 --- a/doc/build/index.rst +++ b/doc/build/index.rst @@ -7,5 +7,6 @@ Build U-Boot :maxdepth: 2 source + gcc clang tools