Commit 2f36ef9f authored by Guillaume Tucker's avatar Guillaume Tucker
Browse files

cros-build: add create-chroot.sh



Add the create-chroot.sh script to create the Chromium OS SDK chroot.
Install it in the Docker container and call it in the debotstrap.sh
script to automatically set everything up.
Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <guillaume.tucker@collabora.com>
parent e7779df3
......@@ -50,3 +50,10 @@ RUN \
-g firmware \
--depth=1 && \
repo sync -j4
# install helper scripts and do extra setup
RUN git config --global user.name cros-sdk-firmware
RUN git config --global user.email cros-sdk-firmware@collabora.com
ARG cros_device
ENV CROS_DEVICE=$cros_device
ADD --chown=cros-build setup/create-chroot.sh create-chroot.sh
......@@ -48,6 +48,6 @@ docker-compose up --build -d
docker-compose ps
# set up the Chrome OS SDK chroot in the container
docker-compose exec cros-sdk /bin/bash
docker-compose exec cros-sdk /bin/bash create-chroot.sh
exit 0
#!/bin/bash
set -e
env
echo "device: $CROS_DEVICE"
chroot_dir=$HOME/chroot-"$CROS_DEVICE"
cache_dir=$HOME/cache
echo "Creating CrOS SDK chroot..."
cros_sdk \
--enter \
--nouse-image \
--no-ns-pid \
--debug \
--chroot "$chroot_dir" \
--cache-dir "$cache_dir"
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment