Skip to content

Commit 7904c3a

Browse files
committed
Remove HTML since GitHub does not display it.
1 parent 7263638 commit 7904c3a

File tree

1 file changed

+61
-58
lines changed

1 file changed

+61
-58
lines changed

doc/Example of Cross Compiling the Azure IoT SDK for Python.md

Lines changed: 61 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -66,77 +66,80 @@ The Boost library is required for the Azure IoT SDK for Python. It provides seve
6666

6767
Start by downloading the source archive from the Boost webpage and unpacking it:
6868
```
69-
wget https://dl.bintray.com/boostorg/release/1.64.0/source/boost\_1\_64\_0.tar.gz
69+
wget https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz
7070
71-
tar -xzf boost\_1\_64\_0.tar.gz
71+
tar -xzf boost_1_64_0.tar.gz
7272
```
7373
This will also take a few minutes to complete.
7474

7575
Now we need to run the Boost configuration script which tells the Boost build system what we want to build.
7676
```
77-
cd boost\_1\_64\_0
77+
cd boost_1_64_0
7878
7979
./bootstrap.sh --with-libraries=python –-prefix=${HOME}/boostmlinux-1-64-0
8080
```
81-
At this point we need to modify the file _project-config.jam_ to tell the Boost build system to use our MultiTech cross compile toolchain when we build it. To do this, with an editor of your choice, nano, vim, WinSCP, etc., (see Editing Files above) open this file and make the following modifications <mark>highlighted</mark> below. **Note:** Do not copy and paste the entire text below. The bootstrap command generates absolute paths in this file. These must not be replaced.<br/><br/>
82-
<div style="padding-left: 2em; background-color: #e6e6e6; font-family: Courier; font-color: red" >
83-
# Boost.Build Configuration<br/>
84-
# Automatically generated by bootstrap.sh<br/>
85-
<br/>
86-
import option ;<br/>
87-
import feature ;<br/>
88-
<mark>import os ;</mark><br/>
89-
<br/>
90-
<mark>local HOME = [ os.environ HOME ] ;</mark><br/>
91-
<br/>
92-
# Compiler configuration. This definition will be used unless<br/>
93-
# you already have defined some toolsets in your user-config.jam<br/>
94-
# file.<br/>
95-
<br/>
96-
if ! gcc in [ feature.values &lt;toolset&gt; ]<br/>
97-
{<br/>
98-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;using gcc<br/>
99-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<mark>: arm<br/>
100-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: $(HOME)/mlinux/3.3.6/sysroots/x86\_64-mlinux-linux/usr/bin/arm-mlinux-linux-gnueabi/arm-mlinux-linux-gnueabi-g++<br/>
101-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: &lt;compileflags&gt;&quot;-v --sysroot=$(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi -L$(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi/usr/lib&quot;</mark><br/>
102-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;<br/>
81+
At this point we need to modify the file _project-config.jam_ to tell the Boost build system to use our MultiTech cross compile toolchain when we build it. To do this, with an editor of your choice, nano, vim, WinSCP, etc., (see Editing Files above) open this file and make the following modifications indicated below. **Note:** Do not copy and paste the entire text below. The bootstrap command generates absolute paths in this file. These must not be replaced.
82+
```
83+
# Boost.Build Configuration
84+
# Automatically generated by bootstrap.sh
85+
86+
import option ;
87+
import feature ;
88+
import os ; ### Add this line
89+
90+
local HOME = [ os.environ HOME ] ; ### Add this line
91+
92+
# Compiler configuration. This definition will be used unless
93+
# you already have defined some toolsets in your user-config.jam
94+
# file.
95+
96+
### Modify the gcc section to use the cross compiler toolchain
97+
if ! gcc in [ feature.values <toolset> ]
98+
{
99+
using gcc
100+
: arm
101+
: $(HOME)/mlinux/3.3.6/sysroots/x86\_64-mlinux-linux/usr/bin/arm-mlinux-linux-gnueabi/arm-mlinux-linux-gnueabi-g++
102+
: <compileflags> "-v --sysroot=$(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi -L$(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi/usr/lib"
103+
;
103104
}
104-
<br/>
105-
project : default-build \<toolset\>gcc ;
106-
<br/>
105+
106+
project : default-build <toolset>gcc ;
107+
107108
# Python configuration
108-
<br/>
109-
import python ;<br/>
110-
if ! [ python.configured ]<br/>
111-
{<br/>
112-
&nbsp;&nbsp;&nbsp;&nbsp;using python<br/>
113-
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<mark>: 2.7<br/>
114-
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;: $(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi/usr/bin<br/>
115-
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;: $(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi/usr/include/python2.7<br/>
116-
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;: $(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi/usr/lib</mark><br/>
117-
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;;<br/>
109+
110+
import python ;
111+
112+
### Modify this section to reflect your Python location and version
113+
if ! [ python.configured ]
114+
{
115+
using python
116+
: 2.7
117+
: $(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi/usr/bin
118+
: $(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi/usr/include/python2.7
119+
: $(HOME)/mlinux/3.3.6/sysroots/arm926ejste-mlinux-linux-gnueabi/usr/lib
120+
;
118121
}
119-
<br/>
120-
# List of --with-&lt;library&gt; and --without-&lt;library&gt;<br/>
121-
# options. If left empty, all libraries will be built.<br/>
122-
# Options specified on the command line completely<br/>
123-
# override this variable.<br/>
124-
<br/>
122+
123+
# List of --with-<library> and --without-<library>
124+
# options. If left empty, all libraries will be built.
125+
# Options specified on the command line completely
126+
# override this variable.
127+
125128
libraries = --with-python ;
126-
<br/>
127-
\# These settings are equivivalent to corresponding command-line<br/>
128-
\# options.<br/>
129-
<br/>
130-
option.set prefix : /home/markrad/boostmlinux-1-64-0 ;<br/>
131-
option.set exec-prefix : /home/markrad/boostmlinux-1-64-0 ;<br/>
132-
option.set libdir : /home/markrad/boostmlinux-1-64-0/lib ;<br/>
133-
option.set includedir : /home/markrad/boostmlinux-1-64-0/include ;<br/>
134-
<br/>
135-
\# Stop on first error
136-
<br/>
137-
option.set keep-going : false ;<br/>
138-
</div><br/>
139-
<div style="text-align: center; font-size: smaller">Figure 1: Modified project-config.jam</div>
129+
130+
# These settings are equivivalent to corresponding command-line
131+
# options.
132+
133+
option.set prefix : /home/markrad/boostmlinux-1-64-0 ;
134+
option.set exec-prefix : /home/markrad/boostmlinux-1-64-0 ;
135+
option.set libdir : /home/markrad/boostmlinux-1-64-0/lib ;
136+
option.set includedir : /home/markrad/boostmlinux-1-64-0/include ;
137+
138+
# Stop on first error
139+
140+
option.set keep-going : false ;
141+
```
142+
Figure 1: Modified project-config.jam
140143

141144
Build Boost for your MultiTech with the following command:
142145
```

0 commit comments

Comments
 (0)