컴퓨터
Install APM and configure arm cross compile at Ubuntu
Selnis
2012. 3. 18. 13:47
참고(메모)용으로 급히 포스팅 하는 것이라 설명은 생략합니다.
cf) sudo passwd root
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/mysql restart
sudo netstat -tap | grep mysql
wget ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain/cross-3.2.tar.bz2
tar xjvf cross-3.2.tar.bz2
sudo mv usr/local/arm /usr/local/
vi .bashrc
** export PATH=$PATH:/usr/local/arm/bin/
source .bashrc
arm-linux-gcc -v
arm-linux-gcc -o hello hello.c
file hello
Install ssh
sudo apt-get install ssh
vi /etc/ssh/sshd_config
sudo /etc/init.d/ssh restart
netstat -ntl
cf) sudo passwd root
Install APM at once
sudo apt-get install apache2 libapache2-mod-auth-mysql mysql-server mysql-client php5-common php5 libapache2-mod-php5 php5-mysqlsudo /etc/init.d/apache2 restart
sudo /etc/init.d/mysql restart
sudo netstat -tap | grep mysql
ex)
tcp 0 0 localhost:mysql *:* LISTEN 9981/mysqld
tcp 0 0 localhost:mysql *:* LISTEN 9981/mysqld
Configure arm compiler
sudo apt-get install build-essentialwget ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain/cross-3.2.tar.bz2
tar xjvf cross-3.2.tar.bz2
sudo mv usr/local/arm /usr/local/
vi .bashrc
** export PATH=$PATH:/usr/local/arm/bin/
source .bashrc
arm-linux-gcc -v
ex)
Reading specs from /usr/local/arm/bin/../lib/gcc-lib/arm-linux/3.2/specs
Configured with: ./configure --target=arm-linux --prefix=/usr/local/arm/ --with-headers=/home/sylam/armbuild/src/linux/include --disable-shared --disable-threads --enable-languages=c : (reconfigured) ./configure --target=arm-linux --prefix=/usr/local/arm/ --with-headers=/home/sylam/armbuild/src/linux/include
Thread model: posix
gcc version 3.2
Reading specs from /usr/local/arm/bin/../lib/gcc-lib/arm-linux/3.2/specs
Configured with: ./configure --target=arm-linux --prefix=/usr/local/arm/ --with-headers=/home/sylam/armbuild/src/linux/include --disable-shared --disable-threads --enable-languages=c : (reconfigured) ./configure --target=arm-linux --prefix=/usr/local/arm/ --with-headers=/home/sylam/armbuild/src/linux/include
Thread model: posix
gcc version 3.2
Compile helloworld.c
vi hello.c
#include <stdio.h>
int main() {
printf("Hello World");
return 0;
}
int main() {
printf("Hello World");
return 0;
}
arm-linux-gcc -o hello hello.c
file hello
ex)
hello:ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped
hello:ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped
Install ssh
sudo apt-get install sshvi /etc/ssh/sshd_config
sudo /etc/init.d/ssh restart
netstat -ntl