Arch와 CentOS에 Linux 설치 방법

!-- import docs ninja build system -->

Ninja Build System

Ninja is a faster build system than Make and the PX4 CMake generators support it. To install a recent version, download the binary and add it to your path:

mkdir -p $HOME/ninja
cd $HOME/ninja
wget https://github.com/martine/ninja/releases/download/v1.6.0/ninja-linux.zip
unzip ninja-linux.zip
rm ninja-linux.zip
exportline="export PATH=$HOME/ninja:\$PATH"
if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
. ~/.profile

흔하지 않은 Linux 시스템에 설치하기

CentOs

빌드에 Python 2.7.5이 필요합니다. 따라서 Centos 7를 사용해야 합니다. (이전 Centos 배포판은 python v2.7.5와 함께 설치될 수도 있습니다. 하지만 yum이 맞지 않을 수 있기 때문에 추천하지 않습니다.)

EPEL 저장소는 openocd libftdi-devel libftdi-python가 필요합니다.

wget https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo yum install epel-release-7-5.noarch.rpm
yum update
yum groupinstall “Development Tools”
yum install python-setuptools
easy_install pyserial
easy_install pexpect
yum install openocd libftdi-devel libftdi-python python-argparse flex bison-devel ncurses-devel ncurses-libs autoconf texinfo libtool zlib-devel cmake

Note: python-pip와 screen 설치가 필요할 수 있습니다.

추가할 32bit 라이브러리

arm 툴체인을 설치하면 이를 테스트 합니다. :

arm-none-eabi-gcc --version

다음과 같은 메시지가 나오면

bash: gcc-arm-none-eabi-4_7-2014q2/bin/arm-none-eabi-gcc: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

다음으로 다른 32bit 라이브러리인 glibc.i686 ncurses-libs.i686를 설치해야 합니다.

sudo yum install glibc.i686 ncurses-libs.i686

ncurses-libs.i686에서 필요한 것들은 다른 대부분의 32bit 라이브러리에서도 필요합니다. Centos 7은 추가 udev rules 없이도 PX4 관련된 거의 모든 장치를 설치합니다. 이 장치들은 미리 정의된 ' dialout' 그룹에 접근가능합니다. 따라서 udev rules 추가와 관련된 참조는 무시할 수 있습니다. 유일하게 필요한 것은 여러분의 사용자 계정이 'dial out' 그룹의 멤버로 되어 있어야 한다는 것입니다.

Arch Linux

multilib 저장소가 유효한지 확인합니다.

sudo pacman -S base-devel lib32-glibc git-core python-pyserial zip vim

yaourtArch User Repository (AUR)를 위한 패키지 매니저 설치합니다.

이를 이용해서 다음과 같이 다운로드, 컴파일, 설치:

yaourt -S genromfs python-empy

Permissions

user는 "uucp" 그룹에 추가:

sudo usermod -a -G uucp $USER

이렇게 한 후에, 로그아웃을 하고 다시 로그인을 합니다.

변경한 내용이 적용되려면 로그아웃과 로그인이 필요! 장치를 뺐다가 다시 꽂는 것도!

GCC 툴체인 설치

Execute the script below to install 5.4:

pushd .
cd ~
wget https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2
tar -jxf gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2
exportline="export PATH=$HOME/gcc-arm-none-eabi-5_4-2016q2/bin:\$PATH"
if grep -Fxq "$exportline" ~/.bash_profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
popd

Now restart your machine.

If using Debian Linux, run this command:

sudo dpkg --add-architecture i386
sudo apt-get update

Then install the 32 bit support libraries (this might fail and can be skipped if running a 32 bit OS):

sudo apt-get install libc6:i386 libgcc1:i386 libstdc++5:i386 libstdc++6:i386
sudo apt-get install gcc-4.6-base:i386

Troubleshooting

Check the version by entering the following command:

arm-none-eabi-gcc --version

The output should be something similar to:

arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160609 (release) [ARM/embedded-5-branch revision 237715]
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you get the following output, make sure you have the 32bit libs installed properly as described in the installation steps:

arm-none-eabi-gcc --version
arm-none-eabi-gcc: No such file or directory

results matching ""

    No results matching ""