Skip to content

Commit

Permalink
Build: (45636a2) Fix typos in KR260 instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Víctor Mayoral Vilches <[email protected]>
  • Loading branch information
vmayoral committed Jun 28, 2022
1 parent 93feb09 commit 3f6d1e5
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 23 deletions.
Binary file modified sphinx/build/doctrees/docs/install.doctree
Binary file not shown.
Binary file modified sphinx/build/doctrees/environment.pickle
Binary file not shown.
28 changes: 21 additions & 7 deletions sphinx/build/html/_sources/docs/install.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ repositories:
EOF

###################################################
# 4. import repos of KRS beta release
# 4. import repos of KRS 1.0 release
###################################################
vcs import src --recursive < krs_humble.repos # about 3 mins in an AMD Ryzen 5 PRO 4650G

Expand Down Expand Up @@ -187,7 +187,7 @@ sudo apt-get -y install curl build-essential libssl-dev git wget \

###################################################
# 2. create a new ROS 2 workspace with examples and
# firmware for KV260
# firmware for KR260
###################################################
mkdir -p ~/krs_ws/src; cd ~/krs_ws

Expand Down Expand Up @@ -245,7 +245,7 @@ repositories:
EOF

###################################################
# 4. import repos of KRS beta release
# 4. import repos of KRS 1.0 release
###################################################
vcs import src --recursive < krs_humble.repos # about 3 mins in an AMD Ryzen 5 PRO 4650G

Expand All @@ -259,6 +259,20 @@ source /opt/ros/humble/setup.bash # Sources system ROS 2 installation.
# packages. If one builds ROS 2 from the source the directory might
# vary (e.g. ~/ros2_humble/ros2-linux).
export PATH="/usr/bin":$PATH # FIXME: adjust path for CMake 3.5+

```

```eval_rst
.. warning::

Next step is going to ask for the *sudo password*, make sure to enter it appropriately, otherwise the build
will go on indefinitely.
```


```shell


colcon build --merge-install # about 18 mins in an AMD Ryzen 5 PRO 4650G

###################################################
Expand All @@ -272,7 +286,7 @@ source install/setup.bash

Ubuntu 22.04 sysroot is not fully prepared for cross-compilation (but for native builds instead) and thereby, while invoking FindPython, it's just picking the host resources, instead of the target/sysroot ones, which leads to ROS 2 packages relying on Python 3 getting a dependency against the host (which doesn't exist), instead of against the sysroot.

A **workaround** for this is symlinking the Python3 library of the host to the sysroot one, so that it gets picked while cross-compiling against the Ubuntu 22.04 sysroot (e.g. `sudo ln -s /home/xilinx/ros2_ws/install/../acceleration/firmware/kv260/sysroots/aarch64-xilinx-linux/usr/lib/aarch64-linux-gnu/libpython3.10.so.1.0 /usr/lib/aarch64-linux-gnu/libpython3.10.so`)
A **workaround** for this is symlinking the Python3 library of the host to the sysroot one, so that it gets picked while cross-compiling against the Ubuntu 22.04 sysroot. The following should do: `sudo ln -s ~/krs_ws/src/install/../acceleration/firmware/kr260/sysroots/aarch64-xilinx-linux/usr/lib/aarch64-linux-gnu/libpython3.10.so.1.0 /usr/lib/aarch64-linux-gnu/libpython3.10.so`)
```

``` shell
Expand All @@ -294,7 +308,7 @@ Now that we've built binaries and accelerators, next's to run some of them in ha
```eval_rst
.. warning:: No accelerators produced with native (on-target) compilation

**This path is helpful only for creating CPU binaries. It's not possible to create accelerators on target** (from within the KR/KV260 boards) because Vivado and Vitis tools have only x86 support and no aarch support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.
**This path is helpful only for creating CPU binaries. It's not possible to create accelerators on target** (from within the KR/KV260 boards) because Vivado and Vitis tools have only x86 support and no aarch64 support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.

```

Expand All @@ -312,7 +326,7 @@ Now that we've built binaries, next's to run them in hardware. See [examples](ht
```eval_rst
.. warning:: No accelerators produced with native (on-target) compilation

**This path is helpful only for creating CPU binaries. It's not possible to create accelerators on QEMU** (from within emulated rootfs') because Vivado and Vitis tools have only x86 support and no aarch support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.
**This path is helpful only for creating CPU binaries. It's not possible to create accelerators on QEMU** (from within emulated rootfs') because Vivado and Vitis tools have only x86 support and no aarch64 support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.

```

Expand Down Expand Up @@ -397,7 +411,7 @@ repositories:
EOF

###################################################
# 4. import repos of KRS beta release
# 4. import repos of KRS 1.0 release
###################################################
vcs import src --recursive < krs_humble.repos # about 3 mins in an AMD Ryzen 5 PRO 4650G

Expand Down
23 changes: 15 additions & 8 deletions sphinx/build/html/docs/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ <h2>Yocto/PetaLinux<a class="headerlink" href="#yocto-petalinux" title="Permalin
<span class="s">EOF</span>

<span class="c1">###################################################</span>
<span class="c1"># 4. import repos of KRS beta release</span>
<span class="c1"># 4. import repos of KRS 1.0 release</span>
<span class="c1">###################################################</span>
vcs import src --recursive &lt; krs_humble.repos <span class="c1"># about 3 mins in an AMD Ryzen 5 PRO 4650G</span>

Expand Down Expand Up @@ -535,7 +535,7 @@ <h3>Cross-compilation development<a class="headerlink" href="#cross-compilation-

<span class="c1">###################################################</span>
<span class="c1"># 2. create a new ROS 2 workspace with examples and</span>
<span class="c1"># firmware for KV260</span>
<span class="c1"># firmware for KR260</span>
<span class="c1">###################################################</span>
mkdir -p ~/krs_ws/src<span class="p">;</span> <span class="nb">cd</span> ~/krs_ws

Expand Down Expand Up @@ -593,7 +593,7 @@ <h3>Cross-compilation development<a class="headerlink" href="#cross-compilation-
<span class="s">EOF</span>

<span class="c1">###################################################</span>
<span class="c1"># 4. import repos of KRS beta release</span>
<span class="c1"># 4. import repos of KRS 1.0 release</span>
<span class="c1">###################################################</span>
vcs import src --recursive &lt; krs_humble.repos <span class="c1"># about 3 mins in an AMD Ryzen 5 PRO 4650G</span>

Expand All @@ -607,7 +607,14 @@ <h3>Cross-compilation development<a class="headerlink" href="#cross-compilation-
<span class="c1"># packages. If one builds ROS 2 from the source the directory might</span>
<span class="c1"># vary (e.g. ~/ros2_humble/ros2-linux).</span>
<span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="s2">&quot;/usr/bin&quot;</span>:<span class="nv">$PATH</span> <span class="c1"># FIXME: adjust path for CMake 3.5+</span>
colcon build --merge-install <span class="c1"># about 18 mins in an AMD Ryzen 5 PRO 4650G</span>
</pre></div>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Next step is going to ask for the <em>sudo password</em>, make sure to enter it appropriately, otherwise the build
will go on indefinitely.</p>
</div>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>colcon build --merge-install <span class="c1"># about 18 mins in an AMD Ryzen 5 PRO 4650G</span>

<span class="c1">###################################################</span>
<span class="c1"># 6. source the overlay to enable all features</span>
Expand All @@ -618,7 +625,7 @@ <h3>Cross-compilation development<a class="headerlink" href="#cross-compilation-
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Ubuntu 22.04 sysroot is not fully prepared for cross-compilation (but for native builds instead) and thereby, while invoking FindPython, it’s just picking the host resources, instead of the target/sysroot ones, which leads to ROS 2 packages relying on Python 3 getting a dependency against the host (which doesn’t exist), instead of against the sysroot.</p>
<p>A <strong>workaround</strong> for this is symlinking the Python3 library of the host to the sysroot one, so that it gets picked while cross-compiling against the Ubuntu 22.04 sysroot (e.g. <cite>sudo ln -s /home/xilinx/ros2_ws/install/../acceleration/firmware/kv260/sysroots/aarch64-xilinx-linux/usr/lib/aarch64-linux-gnu/libpython3.10.so.1.0 /usr/lib/aarch64-linux-gnu/libpython3.10.so</cite>)</p>
<p>A <strong>workaround</strong> for this is symlinking the Python3 library of the host to the sysroot one, so that it gets picked while cross-compiling against the Ubuntu 22.04 sysroot. The following should do: <cite>sudo ln -s ~/krs_ws/src/install/../acceleration/firmware/kr260/sysroots/aarch64-xilinx-linux/usr/lib/aarch64-linux-gnu/libpython3.10.so.1.0 /usr/lib/aarch64-linux-gnu/libpython3.10.so</cite>)</p>
</div>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="c1">###################################################</span>
<span class="c1"># 7.A cross-compile and generate ONLY CPU binaries</span>
Expand All @@ -638,7 +645,7 @@ <h3>Native (on target) development<a class="headerlink" href="#native-on-target-
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>No accelerators produced with native (on-target) compilation</p>
<p><strong>This path is helpful only for creating CPU binaries. It’s not possible to create accelerators on target</strong> (from within the KR/KV260 boards) because Vivado and Vitis tools have only x86 support and no aarch support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.</p>
<p><strong>This path is helpful only for creating CPU binaries. It’s not possible to create accelerators on target</strong> (from within the KR/KV260 boards) because Vivado and Vitis tools have only x86 support and no aarch64 support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.</p>
</div>
<p>Native CPU compilation (<em>on target</em>, in the KR260 or KV260) is pretty straightforward and can be performed by:</p>
<ol class="simple">
Expand All @@ -653,7 +660,7 @@ <h3>QEMU (emulation) development<a class="headerlink" href="#qemu-emulation-deve
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>No accelerators produced with native (on-target) compilation</p>
<p><strong>This path is helpful only for creating CPU binaries. It’s not possible to create accelerators on QEMU</strong> (from within emulated rootfs’) because Vivado and Vitis tools have only x86 support and no aarch support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.</p>
<p><strong>This path is helpful only for creating CPU binaries. It’s not possible to create accelerators on QEMU</strong> (from within emulated rootfs’) because Vivado and Vitis tools have only x86 support and no aarch64 support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.</p>
</div>
<p>CPU binaries can also be built (and tested) using hardware emulation through QEMU. In particular, the following provides a walkthrough on how to leverage Ubuntu 22.04 pre-built sysroot for KR260 to build the local development workspace:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="c1">###################################################</span>
Expand Down Expand Up @@ -734,7 +741,7 @@ <h3>QEMU (emulation) development<a class="headerlink" href="#qemu-emulation-deve
<span class="s">EOF</span>

<span class="c1">###################################################</span>
<span class="c1"># 4. import repos of KRS beta release</span>
<span class="c1"># 4. import repos of KRS 1.0 release</span>
<span class="c1">###################################################</span>
vcs import src --recursive &lt; krs_humble.repos <span class="c1"># about 3 mins in an AMD Ryzen 5 PRO 4650G</span>

Expand Down
2 changes: 1 addition & 1 deletion sphinx/build/html/searchindex.js

Large diffs are not rendered by default.

28 changes: 21 additions & 7 deletions sphinx/source/docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ repositories:
EOF

###################################################
# 4. import repos of KRS beta release
# 4. import repos of KRS 1.0 release
###################################################
vcs import src --recursive < krs_humble.repos # about 3 mins in an AMD Ryzen 5 PRO 4650G

Expand Down Expand Up @@ -187,7 +187,7 @@ sudo apt-get -y install curl build-essential libssl-dev git wget \

###################################################
# 2. create a new ROS 2 workspace with examples and
# firmware for KV260
# firmware for KR260
###################################################
mkdir -p ~/krs_ws/src; cd ~/krs_ws

Expand Down Expand Up @@ -245,7 +245,7 @@ repositories:
EOF

###################################################
# 4. import repos of KRS beta release
# 4. import repos of KRS 1.0 release
###################################################
vcs import src --recursive < krs_humble.repos # about 3 mins in an AMD Ryzen 5 PRO 4650G

Expand All @@ -259,6 +259,20 @@ source /opt/ros/humble/setup.bash # Sources system ROS 2 installation.
# packages. If one builds ROS 2 from the source the directory might
# vary (e.g. ~/ros2_humble/ros2-linux).
export PATH="/usr/bin":$PATH # FIXME: adjust path for CMake 3.5+

```

```eval_rst
.. warning::
Next step is going to ask for the *sudo password*, make sure to enter it appropriately, otherwise the build
will go on indefinitely.
```


```shell


colcon build --merge-install # about 18 mins in an AMD Ryzen 5 PRO 4650G

###################################################
Expand All @@ -272,7 +286,7 @@ source install/setup.bash
Ubuntu 22.04 sysroot is not fully prepared for cross-compilation (but for native builds instead) and thereby, while invoking FindPython, it's just picking the host resources, instead of the target/sysroot ones, which leads to ROS 2 packages relying on Python 3 getting a dependency against the host (which doesn't exist), instead of against the sysroot.
A **workaround** for this is symlinking the Python3 library of the host to the sysroot one, so that it gets picked while cross-compiling against the Ubuntu 22.04 sysroot (e.g. `sudo ln -s /home/xilinx/ros2_ws/install/../acceleration/firmware/kv260/sysroots/aarch64-xilinx-linux/usr/lib/aarch64-linux-gnu/libpython3.10.so.1.0 /usr/lib/aarch64-linux-gnu/libpython3.10.so`)
A **workaround** for this is symlinking the Python3 library of the host to the sysroot one, so that it gets picked while cross-compiling against the Ubuntu 22.04 sysroot. The following should do: `sudo ln -s ~/krs_ws/src/install/../acceleration/firmware/kr260/sysroots/aarch64-xilinx-linux/usr/lib/aarch64-linux-gnu/libpython3.10.so.1.0 /usr/lib/aarch64-linux-gnu/libpython3.10.so`)
```

``` shell
Expand All @@ -294,7 +308,7 @@ Now that we've built binaries and accelerators, next's to run some of them in ha
```eval_rst
.. warning:: No accelerators produced with native (on-target) compilation
**This path is helpful only for creating CPU binaries. It's not possible to create accelerators on target** (from within the KR/KV260 boards) because Vivado and Vitis tools have only x86 support and no aarch support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.
**This path is helpful only for creating CPU binaries. It's not possible to create accelerators on target** (from within the KR/KV260 boards) because Vivado and Vitis tools have only x86 support and no aarch64 support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.
```

Expand All @@ -312,7 +326,7 @@ Now that we've built binaries, next's to run them in hardware. See [examples](ht
```eval_rst
.. warning:: No accelerators produced with native (on-target) compilation
**This path is helpful only for creating CPU binaries. It's not possible to create accelerators on QEMU** (from within emulated rootfs') because Vivado and Vitis tools have only x86 support and no aarch support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.
**This path is helpful only for creating CPU binaries. It's not possible to create accelerators on QEMU** (from within emulated rootfs') because Vivado and Vitis tools have only x86 support and no aarch64 support is planned. Refer to the cross-compilation path for jointly creating binaries and accelerators.
```

Expand Down Expand Up @@ -397,7 +411,7 @@ repositories:
EOF

###################################################
# 4. import repos of KRS beta release
# 4. import repos of KRS 1.0 release
###################################################
vcs import src --recursive < krs_humble.repos # about 3 mins in an AMD Ryzen 5 PRO 4650G

Expand Down

0 comments on commit 3f6d1e5

Please sign in to comment.