1*862c764aSPaul BeesleyBuilding Documentation 2*862c764aSPaul Beesley====================== 3*862c764aSPaul Beesley 4*862c764aSPaul BeesleyTo create a rendered copy of this documentation locally you can use the 5*862c764aSPaul Beesley`Sphinx`_ tool to build and package the plain-text documents into HTML-formatted 6*862c764aSPaul Beesleypages. 7*862c764aSPaul Beesley 8*862c764aSPaul BeesleyIf you are building the documentation for the first time then you will need to 9*862c764aSPaul Beesleycheck that you have the required software packages, as described in the 10*862c764aSPaul Beesley*Prerequisites* section that follows. 11*862c764aSPaul Beesley 12*862c764aSPaul Beesley.. note:: 13*862c764aSPaul Beesley An online copy of the documentation is available at 14*862c764aSPaul Beesley https://www.trustedfirmware.org/docs/tf-a, if you want to view a rendered 15*862c764aSPaul Beesley copy without doing a local build. 16*862c764aSPaul Beesley 17*862c764aSPaul BeesleyPrerequisites 18*862c764aSPaul Beesley------------- 19*862c764aSPaul Beesley 20*862c764aSPaul BeesleyFor building a local copy of the |TF-A| documentation you will need, at minimum: 21*862c764aSPaul Beesley 22*862c764aSPaul Beesley- Python 3 (3.5 or later) 23*862c764aSPaul Beesley- PlantUML (1.2017.15 or later) 24*862c764aSPaul Beesley 25*862c764aSPaul BeesleyYou must also install the Python modules that are specified in the 26*862c764aSPaul Beesley``requirements.txt`` file in the root of the ``docs`` directory. These modules 27*862c764aSPaul Beesleycan be installed using ``pip3`` (the Python Package Installer). Passing this 28*862c764aSPaul Beesleyrequirements file as an argument to ``pip3`` automatically installs the specific 29*862c764aSPaul Beesleymodule versions required by |TF-A|. 30*862c764aSPaul Beesley 31*862c764aSPaul BeesleyAn example set of installation commands for Ubuntu 18.04 LTS follows, assuming 32*862c764aSPaul Beesleythat the working directory is ``docs``: 33*862c764aSPaul Beesley 34*862c764aSPaul Beesley.. code:: shell 35*862c764aSPaul Beesley 36*862c764aSPaul Beesley sudo apt install python3 python3-pip plantuml 37*862c764aSPaul Beesley pip3 install [--user] -r requirements.txt 38*862c764aSPaul Beesley 39*862c764aSPaul Beesley.. note:: 40*862c764aSPaul Beesley Several other modules will be installed as dependencies. Please review 41*862c764aSPaul Beesley the list to ensure that there will be no conflicts with other modules already 42*862c764aSPaul Beesley installed in your environment. 43*862c764aSPaul Beesley 44*862c764aSPaul BeesleyPassing the optional ``--user`` argument to ``pip3`` will install the Python 45*862c764aSPaul Beesleypackages only for the current user. Omitting this argument will attempt to 46*862c764aSPaul Beesleyinstall the packages globally and this will likely require the command to be run 47*862c764aSPaul Beesleyas root or using ``sudo``. 48*862c764aSPaul Beesley 49*862c764aSPaul Beesley.. note:: 50*862c764aSPaul Beesley More advanced usage instructions for *pip* are beyond the scope of this 51*862c764aSPaul Beesley document but you can refer to the `pip homepage`_ for detailed guides. 52*862c764aSPaul Beesley 53*862c764aSPaul BeesleyBuilding rendered documentation 54*862c764aSPaul Beesley------------------------------- 55*862c764aSPaul Beesley 56*862c764aSPaul BeesleyFrom the ``docs`` directory of the project, run the following commands. It is 57*862c764aSPaul Beesleyimportant to note that you will not get the correct result if the commands are 58*862c764aSPaul Beesleyrun from the project root directory, as that would invoke the top-level Makefile 59*862c764aSPaul Beesleyfor |TF-A| itself. 60*862c764aSPaul Beesley 61*862c764aSPaul Beesley.. code:: shell 62*862c764aSPaul Beesley 63*862c764aSPaul Beesley make clean 64*862c764aSPaul Beesley make html 65*862c764aSPaul Beesley 66*862c764aSPaul BeesleyOutput from the build process will be placed in: 67*862c764aSPaul Beesley 68*862c764aSPaul Beesley:: 69*862c764aSPaul Beesley 70*862c764aSPaul Beesley <tf-a root>/docs/build/html/ 71*862c764aSPaul Beesley 72*862c764aSPaul Beesley-------------- 73*862c764aSPaul Beesley 74*862c764aSPaul Beesley*Copyright (c) 2019, Arm Limited. All rights reserved.* 75*862c764aSPaul Beesley 76*862c764aSPaul Beesley.. _Sphinx: http://www.sphinx-doc.org/en/master/ 77*862c764aSPaul Beesley.. _pip homepage: https://pip.pypa.io/en/stable/ 78