Skip to content

Commit

Permalink
SDK container: include circular deps pkgs (#2340)
Browse files Browse the repository at this point in the history
This change builds all packages required to break circular dependencies
and includes these in the SDK image. This way, emerge-<arch> can be used
right away and build_packages only builds packages with production USE
flags.

The change significantly reduces the build time at the cost of a larger
SDK image and longer SDK container build time. Uncompressed:
               Size before       Size after
all arches       7.75GB             9.29GB
arm64            5.7GB              6.58GB
amd64            5.64GB             6.45GB

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
  • Loading branch information
t-lo authored Sep 23, 2024
1 parent fc5f364 commit 433f62c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk_lib/Dockerfile.sdk-build
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ RUN echo "export COREOS_OFFICIAL=$OFFICIAL" > /mnt/host/source/.env

RUN /home/sdk/sdk_entry.sh ./setup_board --board="arm64-usr" --binhost="${BINHOST}/arm64-usr"
RUN /home/sdk/sdk_entry.sh ./setup_board --board="arm64-usr" --regen_configs
RUN /home/sdk/sdk_entry.sh ./build_packages --board="arm64-usr" --only_resolve_circular_deps

RUN /home/sdk/sdk_entry.sh ./setup_board --board="amd64-usr" --binhost="${BINHOST}/amd64-usr"
RUN /home/sdk/sdk_entry.sh ./setup_board --board="amd64-usr" --regen_configs
RUN /home/sdk/sdk_entry.sh ./build_packages --board="amd64-usr" --only_resolve_circular_deps

RUN rm /mnt/host/source/.env
RUN rm -rf /home/sdk/toolchain-pkgs

0 comments on commit 433f62c

Please sign in to comment.