diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2020-06-26 19:10:51 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-17 10:09:33 +0100 |
commit | 9bd69b1f1d71a9692189beeac75af9dfbad816cc (patch) | |
tree | 305347fca899074aed5610e0e82eaec180bf630c /documentation/sdk-manual/sdk-using.rst | |
parent | c40a8d5904c29046f1cbbeb998e6cd7c24f9b206 (diff) | |
download | poky-9bd69b1f1d71a9692189beeac75af9dfbad816cc.tar.gz |
sphinx: initial sphinx support
This commit is autogenerated pandoc to generate an inital set
of reST files based on DocBook XML files.
A .rst file is generated for each .xml files in all manuals with this
command:
cd <manual>
for i in *.xml; do \
pandoc -f docbook -t rst --shift-heading-level-by=-1 \
$i -o $(basename $i .xml).rst \
done
The conversion was done with: pandoc 2.9.2.1-91 (Arch Linux).
Also created an initial top level index file for each document, and
added all 'books' to the top leve index.rst file.
The YP manuals layout is organized as:
Book
Chapter
Section
Section
Section
Sphinx uses section headers to create the document structure.
ReStructuredText defines sections headers like that:
To break longer text up into sections, you use section headers. These
are a single line of text (one or more words) with adornment: an
underline alone, or an underline and an overline together, in dashes
"-----", equals "======", tildes "~~~~~~" or any of the
non-alphanumeric characters = - ` : ' " ~ ^ _ * + # < > that you feel
comfortable with. An underline-only adornment is distinct from an
overline-and-underline adornment using the same character. The
underline/overline must be at least as long as the title text. Be
consistent, since all sections marked with the same adornment style
are deemed to be at the same level:
Let's define the following convention when converting from Docbook:
Book => overline === (Title)
Chapter => overline *** (1.)
Section => ==== (1.1)
Section => ---- (1.1.1)
Section => ~~~~ (1.1.1.1)
Section => ^^^^ (1.1.1.1.1)
During the conversion with pandoc, we used --shift-heading-level=-1 to
convert most of DocBook headings automatically. However with this
setting, the Chapter header was removed, so I added it back
manually. Without this setting all headings were off by one, which was
more difficult to manually fix.
At least with this change, we now have the same TOC with Sphinx and
DocBook.
(From yocto-docs rev: 3c73d64a476d4423ee4c6808c685fa94d88d7df8)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/sdk-manual/sdk-using.rst')
-rw-r--r-- | documentation/sdk-manual/sdk-using.rst | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/documentation/sdk-manual/sdk-using.rst b/documentation/sdk-manual/sdk-using.rst new file mode 100644 index 0000000000..afe72d2b61 --- /dev/null +++ b/documentation/sdk-manual/sdk-using.rst | |||
@@ -0,0 +1,136 @@ | |||
1 | ********************** | ||
2 | Using the Standard SDK | ||
3 | ********************** | ||
4 | |||
5 | This chapter describes the standard SDK and how to install it. | ||
6 | Information includes unique installation and setup aspects for the | ||
7 | standard SDK. | ||
8 | |||
9 | .. note:: | ||
10 | |||
11 | For a side-by-side comparison of main features supported for a | ||
12 | standard SDK as compared to an extensible SDK, see the " | ||
13 | Introduction | ||
14 | " section. | ||
15 | |||
16 | You can use a standard SDK to work on Makefile and Autotools-based | ||
17 | projects. See the "`Using the SDK Toolchain | ||
18 | Directly <#sdk-working-projects>`__" chapter for more information. | ||
19 | |||
20 | .. _sdk-standard-sdk-intro: | ||
21 | |||
22 | Why use the Standard SDK and What is in It? | ||
23 | =========================================== | ||
24 | |||
25 | The Standard SDK provides a cross-development toolchain and libraries | ||
26 | tailored to the contents of a specific image. You would use the Standard | ||
27 | SDK if you want a more traditional toolchain experience as compared to | ||
28 | the extensible SDK, which provides an internal build system and the | ||
29 | ``devtool`` functionality. | ||
30 | |||
31 | The installed Standard SDK consists of several files and directories. | ||
32 | Basically, it contains an SDK environment setup script, some | ||
33 | configuration files, and host and target root filesystems to support | ||
34 | usage. You can see the directory structure in the "`Installed Standard | ||
35 | SDK Directory | ||
36 | Structure <#sdk-installed-standard-sdk-directory-structure>`__" section. | ||
37 | |||
38 | .. _sdk-installing-the-sdk: | ||
39 | |||
40 | Installing the SDK | ||
41 | ================== | ||
42 | |||
43 | The first thing you need to do is install the SDK on your `Build | ||
44 | Host <&YOCTO_DOCS_REF_URL;#hardware-build-system-term>`__ by running the | ||
45 | ``*.sh`` installation script. | ||
46 | |||
47 | You can download a tarball installer, which includes the pre-built | ||
48 | toolchain, the ``runqemu`` script, and support files from the | ||
49 | appropriate `toolchain <&YOCTO_TOOLCHAIN_DL_URL;>`__ directory within | ||
50 | the Index of Releases. Toolchains are available for several 32-bit and | ||
51 | 64-bit architectures with the ``x86_64`` directories, respectively. The | ||
52 | toolchains the Yocto Project provides are based off the | ||
53 | ``core-image-sato`` and ``core-image-minimal`` images and contain | ||
54 | libraries appropriate for developing against that image. | ||
55 | |||
56 | The names of the tarball installer scripts are such that a string | ||
57 | representing the host system appears first in the filename and then is | ||
58 | immediately followed by a string representing the target architecture. | ||
59 | poky-glibc-host_system-image_type-arch-toolchain-release_version.sh | ||
60 | Where: host_system is a string representing your development system: | ||
61 | i686 or x86_64. image_type is the image for which the SDK was built: | ||
62 | core-image-minimal or core-image-sato. arch is a string representing the | ||
63 | tuned target architecture: aarch64, armv5e, core2-64, i586, mips32r2, | ||
64 | mips64, ppc7400, or cortexa8hf-neon. release_version is a string | ||
65 | representing the release number of the Yocto Project: DISTRO, | ||
66 | DISTRO+snapshot For example, the following SDK installer is for a 64-bit | ||
67 | development host system and a i586-tuned target architecture based off | ||
68 | the SDK for ``core-image-sato`` and using the current DISTRO snapshot: | ||
69 | poky-glibc-x86_64-core-image-sato-i586-toolchain-DISTRO.sh | ||
70 | |||
71 | .. note:: | ||
72 | |||
73 | As an alternative to downloading an SDK, you can build the SDK | ||
74 | installer. For information on building the installer, see the " | ||
75 | Building an SDK Installer | ||
76 | " section. | ||
77 | |||
78 | The SDK and toolchains are self-contained and by default are installed | ||
79 | into the ``poky_sdk`` folder in your home directory. You can choose to | ||
80 | install the extensible SDK in any location when you run the installer. | ||
81 | However, because files need to be written under that directory during | ||
82 | the normal course of operation, the location you choose for installation | ||
83 | must be writable for whichever users need to use the SDK. | ||
84 | |||
85 | The following command shows how to run the installer given a toolchain | ||
86 | tarball for a 64-bit x86 development host system and a 64-bit x86 target | ||
87 | architecture. The example assumes the SDK installer is located in | ||
88 | ``~/Downloads/`` and has execution rights. | ||
89 | |||
90 | .. note:: | ||
91 | |||
92 | If you do not have write permissions for the directory into which you | ||
93 | are installing the SDK, the installer notifies you and exits. For | ||
94 | that case, set up the proper permissions in the directory and run the | ||
95 | installer again. | ||
96 | |||
97 | $ ./Downloads/poky-glibc-x86_64-core-image-sato-i586-toolchain-DISTRO.sh | ||
98 | Poky (Yocto Project Reference Distro) SDK installer version DISTRO | ||
99 | =============================================================== Enter | ||
100 | target directory for SDK (default: /opt/poky/DISTRO): You are about to | ||
101 | install the SDK to "/opt/poky/DISTRO". Proceed [Y/n]? Y Extracting | ||
102 | SDK........................................ | ||
103 | ..............................done Setting it up...done SDK has been | ||
104 | successfully set up and is ready to be used. Each time you wish to use | ||
105 | the SDK in a new shell session, you need to source the environment setup | ||
106 | script e.g. $ . /opt/poky/DISTRO/environment-setup-i586-poky-linux | ||
107 | |||
108 | Again, reference the "`Installed Standard SDK Directory | ||
109 | Structure <#sdk-installed-standard-sdk-directory-structure>`__" section | ||
110 | for more details on the resulting directory structure of the installed | ||
111 | SDK. | ||
112 | |||
113 | .. _sdk-running-the-sdk-environment-setup-script: | ||
114 | |||
115 | Running the SDK Environment Setup Script | ||
116 | ======================================== | ||
117 | |||
118 | Once you have the SDK installed, you must run the SDK environment setup | ||
119 | script before you can actually use the SDK. This setup script resides in | ||
120 | the directory you chose when you installed the SDK, which is either the | ||
121 | default ``/opt/poky/DISTRO`` directory or the directory you chose during | ||
122 | installation. | ||
123 | |||
124 | Before running the script, be sure it is the one that matches the | ||
125 | architecture for which you are developing. Environment setup scripts | ||
126 | begin with the string "``environment-setup``" and include as part of | ||
127 | their name the tuned target architecture. As an example, the following | ||
128 | commands set the working directory to where the SDK was installed and | ||
129 | then source the environment setup script. In this example, the setup | ||
130 | script is for an IA-based target machine using i586 tuning: $ source | ||
131 | /opt/poky/DISTRO/environment-setup-i586-poky-linux When you run the | ||
132 | setup script, the same environment variables are defined as are when you | ||
133 | run the setup script for an extensible SDK. See the "`Running the | ||
134 | Extensible SDK Environment Setup | ||
135 | Script <#sdk-running-the-extensible-sdk-environment-setup-script>`__" | ||
136 | section for more information. | ||