Skip to content

Commit

Permalink
Restyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Sep 17, 2021
1 parent 4e85df5 commit 2926569
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ RUN set -x \


ENV SYSROOT_AARCH64=/opt/ubuntu-21.04-aarch64-sysroot

35 changes: 16 additions & 19 deletions integrations/docker/images/chip-build-crosscompile/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
### Image description

This image adds cross-compilation support files (a suitable sysroot)
on top of the regular linux chip-build image.
This image adds cross-compilation support files (a suitable sysroot) on top of
the regular linux chip-build image.

The build assumes a file named `ubuntu-21.04-aarch64-sysroot.tar.xz` exists
in the current directory. This can generally be manually built using
an existing Raspberry Pi device (or equivalent qemu) and a convenience
copy was created in CIPD
The build assumes a file named `ubuntu-21.04-aarch64-sysroot.tar.xz` exists in
the current directory. This can generally be manually built using an existing
Raspberry Pi device (or equivalent qemu) and a convenience copy was created in
CIPD

#### Creating a Sysroot


Start with a fresh Raspberry PI image:
- Use the Raspberry pi imager from https://www.raspberrypi.org/software/
- Follow installation instructions from the CHIP BUILDING.md document.
Generally this includes:
- Use Ubuntu 21.04 server 64 bit server image
- Install required compile dependencies via `apt-get`. You may skip
installing git and python3 dependencies to save some image size

- Use the Raspberry pi imager from https://www.raspberrypi.org/software/
- Follow installation instructions from the CHIP BUILDING.md document.
Generally this includes:
- Use Ubuntu 21.04 server 64 bit server image
- Install required compile dependencies via `apt-get`. You may skip
installing git and python3 dependencies to save some image size

Generate a sysroot. You can do this locally (slow due to SD performance):

Expand All @@ -39,12 +38,11 @@ rsync -aVL ubuntu@$PI:/usr/lib ubuntu-21.04-aarch64-sysroot/usr
rsync -aVL ubuntu@$PI:/include/lib ubuntu-21.04-aarch64-sysroot/usr
```


NOTE: in the future, if creating a 32-bit image (not covered by this docker
NOTE: in the future, if creating a 32-bit image (not covered by this docker
image yet), the following symlinks are required:
- `usr/lib/arm-linux-gnueabihf` to `usr/lib/armv7-linux-gnueabihf`
- `usr/include/arm-linux-gnueabihf` to `usr/lib/armv7-linux-gnueabihf`

- `usr/lib/arm-linux-gnueabihf` to `usr/lib/armv7-linux-gnueabihf`
- `usr/include/arm-linux-gnueabihf` to `usr/lib/armv7-linux-gnueabihf`

Once the sysroot is on the host machine, create the corresponding tar.xz file:

Expand All @@ -59,10 +57,9 @@ rebuilding a sysroot. It is located at:

https://chrome-infra-packages.appspot.com/p/experimental/matter/sysroot/ubuntu-21.04-aarch64/+/

and can be downloaded using the `cipd` script from
and can be downloaded using the `cipd` script from
[depot_tools][https://dev.chromium.org/developers/how-tos/depottools]:


```
echo 'experimental/matter/sysroot/ubuntu-21.04-aarch64 latest' > ensure_file.txt
cipd ensure -ensure-file ensure_file.txt -root ./
Expand Down

0 comments on commit 2926569

Please sign in to comment.