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 d41bc42 commit 4764c4a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ 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 packages && rm -rf /var/lib/apt/lists/*

RUN ./script/bootstrap openthread && rm -rf /var/lib/apt/lists/*
RUN ./script/bootstrap arm_toolchain

# Label the build date before downloading slc to force slc to always be download during a docker build
ARG BUILD_DATE
Expand Down
28 changes: 12 additions & 16 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,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 @@ -113,12 +118,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 @@ -170,21 +169,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 4764c4a

Please sign in to comment.