mirror of
https://github.com/espressif/openthread.git
synced 2026-09-18 07:00:08 +00:00
[script] fix arm-gcc toolchain install on ubuntu (#5613)
This commit is contained in:
+7
-11
@@ -44,20 +44,16 @@ install_packages_apt()
|
||||
echo 'Installing GNU Arm Embedded Toolchain...'
|
||||
|
||||
PLATFORM=$(lsb_release -is)
|
||||
RELEASE=$(lsb_release -rs)
|
||||
UBUNTU2004=20.04
|
||||
|
||||
if [ "$PLATFORM" = "Raspbian" ]; then
|
||||
sudo apt-get --no-install-recommends install -y binutils-arm-none-eabi gcc-arm-none-eabi gdb-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
||||
elif [ "$PLATFORM" = "Ubuntu" ] && [[ ! $RELEASE < $UBUNTU2004 ]]; then
|
||||
echo "Ubuntu Release >= $UBUNTU2004"
|
||||
# no need to use ppa
|
||||
sudo apt-get --no-install-recommends install -y gcc-arm-none-eabi gdb-multiarch libnewlib-arm-none-eabi
|
||||
elif ! command -v arm-none-eabi-g++; then
|
||||
# add gcc-arm-embedded ppa
|
||||
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa -y
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y gcc-arm-embedded
|
||||
elif [ "$PLATFORM" = "Ubuntu" ]; then
|
||||
sudo apt-get --no-install-recommends install -y ca-certificates wget
|
||||
(cd /opt \
|
||||
&& wget -c https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 \
|
||||
&& tar xjf gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 \
|
||||
&& rm gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 \
|
||||
&& ln -s /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/* /usr/local/bin/.)
|
||||
fi
|
||||
|
||||
echo 'Installing pretty tools useful for code contributions...'
|
||||
|
||||
Reference in New Issue
Block a user