Skip to content

Commit 8307495

Browse files
caizixianpull[bot]
authored andcommitted
8318692: Add instructions for creating Ubuntu-based sysroot for cross compilation
Reviewed-by: erikj, shade
1 parent 36f8637 commit 8307495

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

doc/building.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,17 @@ <h3 id="cross-compiling-with-debian-sysroots">Cross compiling with
14131413
http://httpredir.debian.org/debian/
14141414
# If the target architecture is `riscv64`,
14151415
# the path should be `debian-ports` instead of `debian`.</code></pre></li>
1416+
<li><p>To create a Ubuntu-based chroot:</p>
1417+
<pre><code>sudo debootstrap \
1418+
--arch=arm64 \
1419+
--verbose \
1420+
--components=main,universe \
1421+
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev \
1422+
--resolve-deps \
1423+
jammy \
1424+
~/sysroot-arm64 \
1425+
http://ports.ubuntu.com/ubuntu-ports/
1426+
# symlinks is in the universe repository</code></pre></li>
14161427
<li><p>Make sure the symlinks inside the newly created chroot point to
14171428
proper locations:</p>
14181429
<pre><code>sudo chroot ~/sysroot-arm64 symlinks -cr .</code></pre></li>

doc/building.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,21 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
11971197
# the path should be `debian-ports` instead of `debian`.
11981198
```
11991199
1200+
* To create a Ubuntu-based chroot:
1201+
1202+
```
1203+
sudo debootstrap \
1204+
--arch=arm64 \
1205+
--verbose \
1206+
--components=main,universe \
1207+
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev \
1208+
--resolve-deps \
1209+
jammy \
1210+
~/sysroot-arm64 \
1211+
http://ports.ubuntu.com/ubuntu-ports/
1212+
# symlinks is in the universe repository
1213+
```
1214+
12001215
* Make sure the symlinks inside the newly created chroot point to proper locations:
12011216
12021217
```

0 commit comments

Comments
 (0)