1862c764aSPaul BeesleyBuilding Documentation 2862c764aSPaul Beesley====================== 3862c764aSPaul Beesley 4862c764aSPaul BeesleyTo create a rendered copy of this documentation locally you can use the 5862c764aSPaul Beesley`Sphinx`_ tool to build and package the plain-text documents into HTML-formatted 6862c764aSPaul Beesleypages. 7862c764aSPaul Beesley 8862c764aSPaul BeesleyIf you are building the documentation for the first time then you will need to 9862c764aSPaul Beesleycheck that you have the required software packages, as described in the 10862c764aSPaul Beesley*Prerequisites* section that follows. 11862c764aSPaul Beesley 12862c764aSPaul Beesley.. note:: 13862c764aSPaul Beesley An online copy of the documentation is available at 14862c764aSPaul Beesley https://www.trustedfirmware.org/docs/tf-a, if you want to view a rendered 15862c764aSPaul Beesley copy without doing a local build. 16862c764aSPaul Beesley 17862c764aSPaul BeesleyPrerequisites 18862c764aSPaul Beesley------------- 19862c764aSPaul Beesley 20862c764aSPaul BeesleyFor building a local copy of the |TF-A| documentation you will need, at minimum: 21862c764aSPaul Beesley 22862c764aSPaul Beesley- Python 3 (3.5 or later) 23862c764aSPaul Beesley- PlantUML (1.2017.15 or later) 24862c764aSPaul Beesley 25*43f35ef5SPaul BeesleyOptionally, the `Dia`_ application can be installed if you need to edit 26*43f35ef5SPaul Beesleyexisting ``.dia`` diagram files, or create new ones. 27*43f35ef5SPaul Beesley 28862c764aSPaul BeesleyYou must also install the Python modules that are specified in the 29862c764aSPaul Beesley``requirements.txt`` file in the root of the ``docs`` directory. These modules 30862c764aSPaul Beesleycan be installed using ``pip3`` (the Python Package Installer). Passing this 31862c764aSPaul Beesleyrequirements file as an argument to ``pip3`` automatically installs the specific 32862c764aSPaul Beesleymodule versions required by |TF-A|. 33862c764aSPaul Beesley 34862c764aSPaul BeesleyAn example set of installation commands for Ubuntu 18.04 LTS follows, assuming 35862c764aSPaul Beesleythat the working directory is ``docs``: 36862c764aSPaul Beesley 37862c764aSPaul Beesley.. code:: shell 38862c764aSPaul Beesley 39*43f35ef5SPaul Beesley sudo apt install python3 python3-pip plantuml [dia] 40862c764aSPaul Beesley pip3 install [--user] -r requirements.txt 41862c764aSPaul Beesley 42862c764aSPaul Beesley.. note:: 43862c764aSPaul Beesley Several other modules will be installed as dependencies. Please review 44862c764aSPaul Beesley the list to ensure that there will be no conflicts with other modules already 45862c764aSPaul Beesley installed in your environment. 46862c764aSPaul Beesley 47862c764aSPaul BeesleyPassing the optional ``--user`` argument to ``pip3`` will install the Python 48862c764aSPaul Beesleypackages only for the current user. Omitting this argument will attempt to 49862c764aSPaul Beesleyinstall the packages globally and this will likely require the command to be run 50862c764aSPaul Beesleyas root or using ``sudo``. 51862c764aSPaul Beesley 52862c764aSPaul Beesley.. note:: 53862c764aSPaul Beesley More advanced usage instructions for *pip* are beyond the scope of this 54862c764aSPaul Beesley document but you can refer to the `pip homepage`_ for detailed guides. 55862c764aSPaul Beesley 56862c764aSPaul BeesleyBuilding rendered documentation 57862c764aSPaul Beesley------------------------------- 58862c764aSPaul Beesley 59862c764aSPaul BeesleyFrom the ``docs`` directory of the project, run the following commands. It is 60862c764aSPaul Beesleyimportant to note that you will not get the correct result if the commands are 61862c764aSPaul Beesleyrun from the project root directory, as that would invoke the top-level Makefile 62862c764aSPaul Beesleyfor |TF-A| itself. 63862c764aSPaul Beesley 64862c764aSPaul Beesley.. code:: shell 65862c764aSPaul Beesley 66862c764aSPaul Beesley make clean 67862c764aSPaul Beesley make html 68862c764aSPaul Beesley 69862c764aSPaul BeesleyOutput from the build process will be placed in: 70862c764aSPaul Beesley 71862c764aSPaul Beesley:: 72862c764aSPaul Beesley 73862c764aSPaul Beesley <tf-a root>/docs/build/html/ 74862c764aSPaul Beesley 75862c764aSPaul Beesley-------------- 76862c764aSPaul Beesley 77862c764aSPaul Beesley*Copyright (c) 2019, Arm Limited. All rights reserved.* 78862c764aSPaul Beesley 79862c764aSPaul Beesley.. _Sphinx: http://www.sphinx-doc.org/en/master/ 80862c764aSPaul Beesley.. _pip homepage: https://pip.pypa.io/en/stable/ 81*43f35ef5SPaul Beesley.. _Dia: https://wiki.gnome.org/Apps/Dia 82