From 38f54bb54d4fa112f5edda86dc62495b99ef2586 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 2 Apr 2020 17:51:08 -0700 Subject: [PATCH] build-from-scratch: add HTML links to source code thanks to extlinks Start small with build scripts/ and ALSA repos, can easily be expanded later if everything goes well. Signed-off-by: Marc Herbert --- conf.py | 12 +++++++++++- .../build-guide/build-from-scratch.rst | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/conf.py b/conf.py index 965257cc..cbc83fd5 100644 --- a/conf.py +++ b/conf.py @@ -30,7 +30,10 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['breathe', 'sphinx.ext.graphviz', 'sphinxcontrib.plantuml','sphinx.ext.todo'] +extensions = ['breathe', 'sphinx.ext.graphviz', 'sphinxcontrib.plantuml', + 'sphinx.ext.todo', 'sphinx.ext.extlinks', +] + graphviz_output_format='svg' graphviz_dot_args=[ @@ -155,6 +158,13 @@ #numfig_secnum_depth = (2) numfig_format = {'figure': 'Figure %s', 'table': 'Table %s', 'code-block': 'Code Block %s'} +extlinks = { + 'git-sof-master': + ('https://github.com/thesofproject/sof/tree/master/%s', ""), + 'git-alsa': + ('https://git.alsa-project.org/?p=%s.git', ""), +} + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". diff --git a/getting_started/build-guide/build-from-scratch.rst b/getting_started/build-guide/build-from-scratch.rst index 1918170b..a80e942e 100644 --- a/getting_started/build-guide/build-from-scratch.rst +++ b/getting_started/build-guide/build-from-scratch.rst @@ -78,8 +78,8 @@ sources. Refer to this short guide: https://cmake.org/install/ Build alsa-lib and alsa-utils ----------------------------- -This project requires some new features in alsa-lib and alsa-utils, so build -the newest ALSA from source code. +This project requires some new features in :git-alsa:`alsa-lib` and +:git-alsa:`alsa-utils`, so build the newest ALSA from source code. .. warning:: @@ -306,8 +306,9 @@ After the SOF environment is set up, clone the *sof* repo. One-step rebuild from scratch ----------------------------- -To rebuild |SOF| in just one step, use the following script after -setting up the environment. +To rebuild |SOF| in just one step, use +:git-sof-master:`scripts/xtensa-build-all.sh` after setting up the +environment. Build the firmware for all platforms. @@ -498,10 +499,17 @@ Step 4 Build topology and tools One-step rebuild from scratch ----------------------------- +Without any argument :git-sof-master:`scripts/build-tools.sh` rebuilds +only the minimum subset of :git-sof-master:`tools/`. + .. code-block:: bash cd ~/work/sof/sof/ ./scripts/build-tools.sh + ./scripts/build-tools.sh -h + usage: ./scripts/build-tools.sh [-t|-f] + [-t] Build test topologies + [-f] Build fuzzer" Incremental build -----------------