8318692: Add instructions for creating Ubuntu-based sysroot for cross compilation

Reviewed-by: erikj, shade
This commit is contained in:
Zixian Cai 2023-10-25 08:33:10 +00:00 committed by Aleksey Shipilev
parent ba7d08b819
commit c3cdfe2a32
2 changed files with 26 additions and 0 deletions

View File

@ -1413,6 +1413,17 @@ like this:</p>
http://httpredir.debian.org/debian/
# If the target architecture is `riscv64`,
# the path should be `debian-ports` instead of `debian`.</code></pre></li>
<li><p>To create a Ubuntu-based chroot:</p>
<pre><code>sudo debootstrap \
--arch=arm64 \
--verbose \
--components=main,universe \
--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 \
--resolve-deps \
jammy \
~/sysroot-arm64 \
http://ports.ubuntu.com/ubuntu-ports/
# symlinks is in the universe repository</code></pre></li>
<li><p>Make sure the symlinks inside the newly created chroot point to
proper locations:</p>
<pre><code>sudo chroot ~/sysroot-arm64 symlinks -cr .</code></pre></li>

View File

@ -1197,6 +1197,21 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
# the path should be `debian-ports` instead of `debian`.
```
* To create a Ubuntu-based chroot:
```
sudo debootstrap \
--arch=arm64 \
--verbose \
--components=main,universe \
--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 \
--resolve-deps \
jammy \
~/sysroot-arm64 \
http://ports.ubuntu.com/ubuntu-ports/
# symlinks is in the universe repository
```
* Make sure the symlinks inside the newly created chroot point to proper locations:
```