카테고리 없음
How to build cross compiler?
jackyjung
2012. 1. 17. 12:59
1. download source of gcc, glibc, binutils from gnu.org
2. build for target architecture
Download cross compiler tool codesourcery.com
https://sourcery.mentor.com/sgpp/lite/arm/portal/release1293
download GNU/Linux Installer
root@jcjung:~/work# ./arm-2010.09-50-arm-none-linux-gnueabi.bin
Checking for required programs: awk grep sed bzip2 gunzip
===============================================================
Error: DASH shell not supported as system shell
===============================================================
The installer has detected that your system uses the dash shell
as /bin/sh. This shell is not supported by the installer.
You can work around this problem by changing /bin/sh to be a
symbolic link to a supported shell such as bash.
For example, on Ubuntu systems, execute this shell command:
% sudo dpkg-reconfigure -plow dash
Install as /bin/sh? No
Please refer to the Getting Started guide for more information,
or contact CodeSourcery Support for assistance.
===============================================================
root@jcjung:~/work# dpkg-reconfigure -plow dash
'diversion of /bin/sh to /bin/sh.distrib by dash' 지우는 중
'diversion of /bin/sh to /bin/sh.distrib by bash' 추가하는 중
'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash' 지우는 중
'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash' 추가하는 중
root@jcjung:~/work# ./arm-2010.09-50-arm-none-linux-gnueabi.bin
Refer attached file for more detail information
"getting-started.pdf"
root@jcjung:/cross/bin# ls
arm-none-linux-gnueabi-addr2line arm-none-linux-gnueabi-gdbtui
arm-none-linux-gnueabi-ar arm-none-linux-gnueabi-gprof
arm-none-linux-gnueabi-as arm-none-linux-gnueabi-ld
arm-none-linux-gnueabi-c++ arm-none-linux-gnueabi-nm
arm-none-linux-gnueabi-c++filt arm-none-linux-gnueabi-objcopy
arm-none-linux-gnueabi-cpp arm-none-linux-gnueabi-objdump
arm-none-linux-gnueabi-elfedit arm-none-linux-gnueabi-ranlib
arm-none-linux-gnueabi-g++ arm-none-linux-gnueabi-readelf
arm-none-linux-gnueabi-gcc arm-none-linux-gnueabi-size
arm-none-linux-gnueabi-gcc-4.5.1 arm-none-linux-gnueabi-sprite
arm-none-linux-gnueabi-gcov arm-none-linux-gnueabi-strings
arm-none-linux-gnueabi-gdb arm-none-linux-gnueabi-strip
set environment
path command is included ~/.profile by sourcery installer automatically.
export PATH="/cross/bin:${PATH}"
apply current settings to terminal
source ~/.profile == . ~/.profile
2. build for target architecture
Download cross compiler tool codesourcery.com
https://sourcery.mentor.com/sgpp/lite/arm/portal/release1293
download GNU/Linux Installer
Packages
Download | MD5 Checksum | |
---|---|---|
Recommended Packages | ||
IA32 GNU/Linux Installer | 94e9ab33be80e5d8a725f2ea91066220 | |
IA32 Windows Installer | 69518d4ecce9aaf76982b4055da36a21 | |
Advanced Packages | ||
IA32 GNU/Linux TAR | c6930d14801b4fab6705d72df013e58b |
|
IA32 Windows TAR | 4dfa40b3d5c42e52dc4b3a9612b97104 |
|
Source TAR | dbc1fab4b5e4eafe5a82fb1542eb8c97 |

Checking for required programs: awk grep sed bzip2 gunzip
===============================================================
Error: DASH shell not supported as system shell
===============================================================
The installer has detected that your system uses the dash shell
as /bin/sh. This shell is not supported by the installer.
You can work around this problem by changing /bin/sh to be a
symbolic link to a supported shell such as bash.
For example, on Ubuntu systems, execute this shell command:
% sudo dpkg-reconfigure -plow dash
Install as /bin/sh? No
Please refer to the Getting Started guide for more information,
or contact CodeSourcery Support for assistance.
===============================================================
root@jcjung:~/work# dpkg-reconfigure -plow dash
'diversion of /bin/sh to /bin/sh.distrib by dash' 지우는 중
'diversion of /bin/sh to /bin/sh.distrib by bash' 추가하는 중
'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash' 지우는 중
'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash' 추가하는 중
root@jcjung:~/work# ./arm-2010.09-50-arm-none-linux-gnueabi.bin
Refer attached file for more detail information
"getting-started.pdf"
root@jcjung:/cross/bin# ls
arm-none-linux-gnueabi-addr2line arm-none-linux-gnueabi-gdbtui
arm-none-linux-gnueabi-ar arm-none-linux-gnueabi-gprof
arm-none-linux-gnueabi-as arm-none-linux-gnueabi-ld
arm-none-linux-gnueabi-c++ arm-none-linux-gnueabi-nm
arm-none-linux-gnueabi-c++filt arm-none-linux-gnueabi-objcopy
arm-none-linux-gnueabi-cpp arm-none-linux-gnueabi-objdump
arm-none-linux-gnueabi-elfedit arm-none-linux-gnueabi-ranlib
arm-none-linux-gnueabi-g++ arm-none-linux-gnueabi-readelf
arm-none-linux-gnueabi-gcc arm-none-linux-gnueabi-size
arm-none-linux-gnueabi-gcc-4.5.1 arm-none-linux-gnueabi-sprite
arm-none-linux-gnueabi-gcov arm-none-linux-gnueabi-strings
arm-none-linux-gnueabi-gdb arm-none-linux-gnueabi-strip
set environment
path command is included ~/.profile by sourcery installer automatically.
export PATH="/cross/bin:${PATH}"
apply current settings to terminal
source ~/.profile == . ~/.profile