ubuntu 10.04 交叉编译环境

这里记录以下,以备不时之需。

first, install service

1.installation, configuration and starting ftp services

sudo apt-get install vsftpd

modify vsftpd's configuration file: /etc/vsfptd/conf,remove the "#" of each line below:

#local_enable:YES

#write_enable:YES

then start the ftp service

sudo /etc/init.d/vsftpd restart

2.installation, configuration and starting ssh services

sudo apt-get install openssh-server

3.installation, configuration and starting nfs services

sudo apt-get install nfs-kernel-server portmap

modify its conf: /etc/exports , insert this:

/work/nfs_root *(rw,sync,no_root_squash)

restart the service

sudo /etc/init.d/nfs-kernel-server restart


second, install the basic dev environment

sudo apt-get install build-essential

sudo apt-get install bison flex

sudo apt-get install manpages-dev


third, install the cross compile tools chain

tar xjf arm-linux-gcc-3.4.5-glibc-2.3.6.tar.bz2

modify the file /etc/environment and insert this:

/work/tools/gcc-3.4.5-glibc-2.3.6/bin

then unzip ncurses.tar.gz

tar xzf ncurses.tar.gz

cd ncurses-5.6

./configure --with-shared --prefix=/usr

make 

sudo make install


forth, make your own tool chain

tar xzf crosstool-0.43.tar.gz

cp glibc-2.3.6-version-info.h_err.patch crosstool-0.43/patches/glibc-2.3.6/

modify demo-arm-softfloat.sh

07 TARBALLS_DIR=/work/tools/create_crosstools/src_gcc_glibc

08 RESULT_TOP=/work/tools

modify arm-softfloat.dat

02 TARGET=arm-linux

modify all.sh

70 PREFIX=${PREFIX-$RESULT_TOP/$TOOLCOMBO}

compile and install the chain

cd crosstoll-0.43/

./demo-arm-softfloat.sh

actually, when execute this step, it may prompt mistakes, like 'These critical programs are missing or too old: as ld' . And you have to downgrade your gcc to version 4.1 and binutils to version 2.18.(this may happen when the versions of gcc and binutils on your pc are higher than the required versions.)

sudo apt-get install gcc-4.1

cd /usr/bin

sudo rm gcc

sudo ln -sf gcc-4.1 gcc

gcc -v

download the binutils 2.18, and unzip it.

./configure --prefix=/home/rookiesean/temp/binutils --disable-nls

make all

make install

cd /usr/bin

sudo rm as ld

sudo ln -sf /home/aaron/temp/binutils/bin/ld ld

sudo ln -sf /home/aaron/temp/binutils/bin/as as

ld -v

as -v

add the bin directory into system path:

export PATH=$PATH:/work/tools/gcc-3.4.5-glibc-2.3.6/bin

then, you have execute demo-arm-softfloat.sh

./demo-arm-softfloat.sh

test

arm-linux-gcc -v


if bash prompt the version info, it means you've install it successfully.






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值