Skip to content

Instantly share code, notes, and snippets.

@eltonvs
Created October 19, 2016 13:01
Show Gist options
  • Save eltonvs/e7cd472dded89e7dcf4aea822e8121c1 to your computer and use it in GitHub Desktop.
Save eltonvs/e7cd472dded89e7dcf4aea822e8121c1 to your computer and use it in GitHub Desktop.
A shell to make the cross compiler installation (from BeagleBone Black) quick and easy
# get file from source
wget -c https://releases.linaro.org/14.03/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux.tar.xz
# uncompress file
tar xf gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux.tar.xz
# copy uncompressed file to /opt/
sudo cp -r gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux /opt/
# remove downloaded files
rm -rf gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux.tar.xz gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux
# add an alias to call compilers as 'arm-gcc' or 'arm-g++'
echo "alias arm-gcc='/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux/bin/arm-linux-gnueabihf-gcc'" >> ~/.bashrc
echo "alias arm-g++='/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux/bin/arm-linux-gnueabihf-g++'" >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment