Skip to content

Commit

Permalink
[script] remove openthread bootstrapping step
Browse files Browse the repository at this point in the history
  • Loading branch information
lmnotran committed Feb 7, 2024
1 parent f4bb727 commit 2cb3666
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ RUN apt-get update && \
&& rm -rf /var/lib/apt/lists/*

# Copy scripts
COPY ./openthread/script ./openthread/script
COPY ./script/bootstrap \
./script/bootstrap_silabs \
./script/
COPY ./requirements.txt .

# Bootstrap
RUN ./script/bootstrap arm_toolchain
RUN ./script/bootstrap packages && rm -rf /var/lib/apt/lists/*

RUN ./script/bootstrap openthread && rm -rf /var/lib/apt/lists/*
COPY ./requirements.txt .
RUN ./script/bootstrap python

# Label the build date before downloading slc to force slc to always be download during a docker build
ARG BUILD_DATE
Expand Down
48 changes: 24 additions & 24 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,19 @@ install_packages_apt()

# Install dependencies
apt-get update
apt-get --no-install-recommends install -y \
coreutils \
openjdk-17-jre \
python3-setuptools \
python3-pip \
git-lfs \
unzip \
wget \
apt_packages=(
coreutils
git
git-lfs
openjdk-17-jre
ninja-build
python3-pip
python3-setuptools
unzip
wget
xz-utils
)
apt-get --no-install-recommends install -y "${apt_packages[@]}"
}

install_packages_opkg()
Expand All @@ -87,13 +91,18 @@ install_packages_rpm()
install_packages_brew()
{
echo 'Installing script dependencies...'
brew install \
coreutils \
openjdk@11 \
grep \
wget \
git \

brew_packages=(
coreutils
git
git-lfs
grep
ninja-build
openjdk@17
unzip
wget
)
brew install "${brew_packages[@]}"
}

install_packages_source()
Expand Down Expand Up @@ -125,12 +134,6 @@ install_packages()
fi
}

do_bootstrap_openthread()
{
echo "Bootstrapping openthread"
"${repo_dir}"/openthread/script/bootstrap
}

do_bootstrap_silabs()
{
echo "Bootstrapping silabs"
Expand Down Expand Up @@ -174,21 +177,18 @@ main()
{
if [ $# == 0 ]; then
install_packages
do_bootstrap_openthread
do_bootstrap_silabs
elif [ "$1" == 'packages' ]; then
install_packages
elif [ "$1" == 'arm_toolchain' ]; then
shift 1
install_arm_toolchain "$@"
elif [ "$1" == 'openthread' ]; then
do_bootstrap_openthread
elif [ "$1" == 'python' ]; then
install_packages_pip3
elif [ "$1" == 'silabs' ]; then
do_bootstrap_silabs
else
echo >&2 "Unsupported action: $1. Supported: openthread, silabs"
echo >&2 "Unsupported action: $1. Supported: packages, arm_toolchain, python, silabs"
# 128 for Invalid arguments
exit 128
fi
Expand Down

0 comments on commit 2cb3666

Please sign in to comment.