Update documentation for building instrumented libraries.
Fixes a script location and (hopefully) makes commands a bit easier to copy and paste. Change-Id: I1a6b1babc4fa5ad59c35f4f11e97c47f79803f2e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5270813 Commit-Queue: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/main@{#1256601}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
835eb04e57
commit
b3cf42f11a
@ -20,20 +20,15 @@ sudo apt install debootstrap schroot
|
|||||||
Create a configuration for a Focal chroot:
|
Create a configuration for a Focal chroot:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo $EDITOR /etc/schroot/chroot.d/focal_amd64.conf
|
cat | sudo tee /etc/schroot/chroot.d/focal_amd64.conf > /dev/null <<EOF
|
||||||
```
|
|
||||||
|
|
||||||
Add the following to the new file, replacing the instances of `thomasanderson`
|
|
||||||
with your own username.
|
|
||||||
|
|
||||||
```
|
|
||||||
[focal_amd64]
|
[focal_amd64]
|
||||||
description=Ubuntu 20.04 Focal for amd64
|
description=Ubuntu 20.04 Focal for amd64
|
||||||
directory=/srv/chroot/focal_amd64
|
directory=/srv/chroot/focal_amd64
|
||||||
personality=linux
|
personality=linux
|
||||||
root-users=thomasanderson
|
root-users=$USER
|
||||||
type=directory
|
type=directory
|
||||||
users=thomasanderson
|
users=$USER
|
||||||
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
Bootstrap the chroot:
|
Bootstrap the chroot:
|
||||||
@ -51,21 +46,17 @@ where I'm assuming you keep your source tree and `depot_tools`.
|
|||||||
sudo mount --bind "$HOME" /home
|
sudo mount --bind "$HOME" /home
|
||||||
```
|
```
|
||||||
|
|
||||||
Add `sources.list`:
|
Populate `sources.list`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo $EDITOR /srv/chroot/focal_amd64/etc/apt/sources.list
|
cat | sudo tee -a /srv/chroot/focal_amd64/etc/apt/sources.list > /dev/null <<EOF
|
||||||
```
|
|
||||||
|
|
||||||
Add the following contents to the file:
|
|
||||||
|
|
||||||
```
|
|
||||||
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe
|
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe
|
||||||
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe
|
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe
|
||||||
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe
|
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe
|
||||||
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe
|
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe
|
||||||
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe
|
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe
|
||||||
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe
|
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe
|
||||||
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
Enter the chroot and install the necessary packages:
|
Enter the chroot and install the necessary packages:
|
||||||
@ -79,7 +70,7 @@ apt install lsb-release sudo python pkg-config libgtk2.0-bin libdrm-dev nih-dbus
|
|||||||
Install library packages:
|
Install library packages:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
third_party/instrumented_libraries/scripts/install-build-deps.sh
|
third_party/instrumented_libraries/focal/scripts/install-build-deps.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Change to a non-root user:
|
Change to a non-root user:
|
||||||
|
Reference in New Issue
Block a user