diff --git a/integrations/docker/images/chip-build-crosscompile/Dockerfile b/integrations/docker/images/chip-build-crosscompile/Dockerfile index 0989df9c60f735..5140e25d9e523b 100644 --- a/integrations/docker/images/chip-build-crosscompile/Dockerfile +++ b/integrations/docker/images/chip-build-crosscompile/Dockerfile @@ -19,4 +19,3 @@ RUN set -x \ ENV SYSROOT_AARCH64=/opt/ubuntu-21.04-aarch64-sysroot - diff --git a/integrations/docker/images/chip-build-crosscompile/README.md b/integrations/docker/images/chip-build-crosscompile/README.md index c4ba41e1462330..faa571fd8a77b6 100644 --- a/integrations/docker/images/chip-build-crosscompile/README.md +++ b/integrations/docker/images/chip-build-crosscompile/README.md @@ -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): @@ -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: @@ -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 ./