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:
|
||||
|
||||
```shell
|
||||
sudo $EDITOR /etc/schroot/chroot.d/focal_amd64.conf
|
||||
```
|
||||
|
||||
Add the following to the new file, replacing the instances of `thomasanderson`
|
||||
with your own username.
|
||||
|
||||
```
|
||||
cat | sudo tee /etc/schroot/chroot.d/focal_amd64.conf > /dev/null <<EOF
|
||||
[focal_amd64]
|
||||
description=Ubuntu 20.04 Focal for amd64
|
||||
directory=/srv/chroot/focal_amd64
|
||||
personality=linux
|
||||
root-users=thomasanderson
|
||||
root-users=$USER
|
||||
type=directory
|
||||
users=thomasanderson
|
||||
users=$USER
|
||||
EOF
|
||||
```
|
||||
|
||||
Bootstrap the chroot:
|
||||
@ -51,21 +46,17 @@ where I'm assuming you keep your source tree and `depot_tools`.
|
||||
sudo mount --bind "$HOME" /home
|
||||
```
|
||||
|
||||
Add `sources.list`:
|
||||
Populate `sources.list`:
|
||||
|
||||
```shell
|
||||
sudo $EDITOR /srv/chroot/focal_amd64/etc/apt/sources.list
|
||||
```
|
||||
|
||||
Add the following contents to the file:
|
||||
|
||||
```
|
||||
cat | sudo tee -a /srv/chroot/focal_amd64/etc/apt/sources.list > /dev/null <<EOF
|
||||
deb 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-src http://archive.ubuntu.com/ubuntu/ focal-security 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
|
||||
EOF
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```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:
|
||||
|
Reference in New Issue
Block a user