Created
September 14, 2014 17:40
-
-
Save idkqh7/48366550721a45593810 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sh -c 'echo "deb http://jp.archive.ubuntu.com/ubuntu/ precise main universe" >> /etc/apt/sources.list' | |
sudo sh -c 'echo "deb-src http://jp.archive.ubuntu.com/ubuntu/ precise main universe" >> /etc/apt/sources.list' | |
sudo dpkg --add-architecture armhf | |
dpkg --print-foreign-architectures | |
# i386 | |
# armhf | |
# HACK : I don't want to touch sources.list | |
# apt-get updateの404が気にならない人は実行しなくても問題なし | |
sudo cp /etc/apt/sources.list /etc/apt/bak/sources.list | |
sudo cp -R /etc/apt/sources.list.d/ /etc/apt/bak/ | |
sudo sed -i "s/deb /deb [arch=amd64,i386] /g" /etc/apt/sources.list | |
sudo sed -i "s/deb /deb [arch=amd64,i386] /g" /etc/apt/sources.list.d/* | |
#クロスコンパイルに必要なもの一式 | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_6.0-37_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1204_6.0-37_amd64.deb | |
sudo apt-get update | |
sudo apt-get install cuda-cross-armhf-6.0 | |
sudo apt-get install g++-4.6-arm-linux-gnueabihf | |
echo "export PATH=/usr/local/cuda/bin:\$PATH" >> ~/.zshrc | |
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64:\$LD_LIBRARY_PATH" >> ~/.zshrc | |
source ~/.zshrc | |
sudo mv /usr/arm-linux-gnueabihf/lib/libGL.so /usr/arm-linux-gnueabihf/lib/libGL.so.bak | |
sudo scp ubuntu@your.ip.address:/usr/lib/arm-linux-gnueabihf/libglut.so.3 /usr/arm-linux-gnueabihf/lib | |
sudo scp ubuntu@your.ip.address:/usr/lib/arm-linux-gnueabihf/tegra/libGL.so.1 /usr/arm-linux-gnueabihf/lib | |
sudo scp ubuntu@your.ip.address:/usr/lib/arm-linux-gnueabihf/libX11.so.6 /usr/arm-linux-gnueabihf/lib | |
sudo ln -s /usr/arm-linux-gnueabihf/lib/libglut.so.3 /usr/arm-linux-gnueabihf/lib/libglut.so | |
sudo ln -s /usr/arm-linux-gnueabihf/lib/libGL.so.1 /usr/arm-linux-gnueabihf/lib/libGL.so | |
sudo ln -s /usr/arm-linux-gnueabihf/lib/libX11.so.6 /usr/arm-linux-gnueabihf/lib/libX11.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment