가끔 필요한테 찾으려면 취찮아지는 것
Install Arm cross-compiler (14-04, 16-04)
sudo apt-get install emdebian-archive-keyring
sudo apt-get install libc6-armel-cross libc6-dev-armel-cross
sudo apt-get install binutils-arm-linux-gnueabi
sudo apt-get install gcc-arm-linux-gnueabi
sudo apt-get install g++-arm-linux-gnueabi
sudo apt-get install u-boot-tools
sudo apt-get install libncurses5-dev
출처) http://noplanlife.com/?p=1293
At first we need to build the termcap library:
1. wget ftp://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
2. tar xvzf termcap-1.3.1.tar.gz
3. cd ./termcap-1.3.1
4. export CC=arm-linux-gnueabi-gcc
5. ./configure --host=arm-linux-gnueabi --prefix=/home/w00t/termcap
6. make
7. make install (불필요)
Next we'll build the gdb itself:
1. wget http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.gz
2. tar xvzf gdb-7.10.tar.gz
3. cd ./gdb-7.10
4. Set the necessary global variables
export export CC=arm-linux-gnueabi-gcc
(Replace with path to your cross compiler)
export LDFLAGS="-static -L/home/w00t/termcap/lib"
Replace the path to your TermCap library
export CFLAGS="-g -O2 -I/home/w00t/termcap/include"
Replace the path to your TermCap library
5. ./configure --host=arm-linux-gnueabi --prefix='/home/w00t/gdb' --disable-werror
6. make
7. make install (불필요)
출처) http://tigertop.blogspot.kr/2011/03/building-gdb-72-for-arm-architecture-on.html
ubuntu64svr14:~/gdb-7.10$ file ./gdb/gdbserver/gdbserver
./gdb/gdbserver/gdbserver: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=d0e0fb8a014279d9029472ca2523739925ac9d6d, not stripped
gdbserver7.10
ubuntu64svr14:~/gdb-7.10$ file ./gdb/gdb
./gdb/gdb: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=5ee712c726e880631e060d899e88c93fd8661c82, not stripped