Skip to content
Snippets Groups Projects
Commit 15b99300 authored by Matthew Lloyd's avatar Matthew Lloyd Committed by Andrew Tridgell
Browse files

build: fix paths in install-prereqs-ubuntu.sh

Also upgrade to the latest 2013q4 "GNU Tools for ARM
Embedded Processors" toolchain since the 2012q2 release
is no longer available for download.
parent f9d26227
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,12 @@ PX4_PKGS="python-serial python-argparse openocd flex bison libncurses5-dev \ ...@@ -8,6 +8,12 @@ PX4_PKGS="python-serial python-argparse openocd flex bison libncurses5-dev \
zip genromfs" zip genromfs"
ASSUME_YES=false ASSUME_YES=false
# GNU Tools for ARM Embedded Processors
# (see https://launchpad.net/gcc-arm-embedded/)
ARM_ROOT="gcc-arm-none-eabi-4_8-2013q4"
ARM_TARBALL="$ARM_ROOT-20131204-linux.tar.bz2"
ARM_TARBALL_URL="https://launchpad.net/gcc-arm-embedded/4.8/4.8-2013-q4-major/+download/$ARM_TARBALL"
function maybe_prompt_user() { function maybe_prompt_user() {
if $ASSUME_YES; then if $ASSUME_YES; then
return 0 return 0
...@@ -42,28 +48,28 @@ fi ...@@ -42,28 +48,28 @@ fi
$APT_GET update $APT_GET update
$APT_GET install $BASE_PKGS $SITL_PKGS $PX4_PKGS $APT_GET install $BASE_PKGS $SITL_PKGS $PX4_PKGS
if [ ! -d ../PX4-Firmware ]; then if [ ! -d ~/PX4Firmware ]; then
git clone https://github.com/diydrones/PX4Firmware.git git clone https://github.com/diydrones/PX4Firmware.git ~/PX4Firmware
fi fi
if [ ! -d ../PX4NuttX ]; then if [ ! -d ~/PX4NuttX ]; then
git clone https://github.com/diydrones/PX4NuttX.git git clone https://github.com/diydrones/PX4NuttX.git ~/PX4NuttX
fi fi
if [ ! -d ~/gcc-arm-none-eabi-4_6-2012q2 ]; then if [ ! -d ~/$ARM_ROOT ]; then
ARM_TARBALL=gcc-arm-none-eabi-4_6-2012q4-20121016.tar.bz2
( (
cd ~; cd ~;
curl -OL "https://launchpad.net/gcc-arm-embedded/4.6/4.6-2012-q4-update/+download/$ARM_TARBALL"; curl -OL $ARM_TARBALL_URL;
tar xjf ${ARM_TARBALL}; tar xjf ${ARM_TARBALL};
rm ${ARM_TARBALL}; rm ${ARM_TARBALL};
) )
fi fi
exportline="export PATH=$HOME/gcc-arm-none-eabi-4_6-2012q4/bin:\$PATH"; exportline="export PATH=$HOME/$ARM_ROOT/bin:\$PATH";
if ! grep -Fxq "$exportline" ~/.profile ; then if ! grep -Fxq "$exportline" ~/.profile ; then
if maybe_prompt_user "Add $HOME/gcc-arm-none-eabi-4_6-2012q4/bin to your PATH [Y/n]?" ; then if maybe_prompt_user "Add $HOME/$ARM_ROOT/bin to your PATH [Y/n]?" ; then
echo $exportline >> ~/.profile echo $exportline >> ~/.profile
$exportline
else else
echo "Skipping adding $HOME/gcc-arm-none-eabi-4_6-2012q4/bin to PATH." echo "Skipping adding $HOME/$ARM_ROOT/bin to PATH."
fi fi
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment