1 下载bash版本:【version 4.2.53】
地址:http://ftp.gnu.org/gnu/bash/
2 解压
将下载的bash压缩包解压,命令:
# mkdir /home/carrie/bash # 创建bash工作目录 # cp bash-4.2.53.tar.gz /home/carrie/bash # 复制安装包 # cd /home/carrie/bash # 进入/home/carrie/bash目录 # tar zxvf bash-4.2.53.tar.gz # 解压
3、配置
编译之前,要进行配置,命令:
# mkdir /home/carrie/bash/bash-4.2.53/arm_build # 创建安装目录 # cd /home/carrie/bash/bash-4.2.53 # 进入目录 # vim ./support/config.sub #添加支持aarch64 242 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 243 | am33_2.0 \ 244 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 | aarch64 \ 245 | bfin \ 246 | c4x | clipper \
#./configure --prefix=/home/carrie/bash/bash-4.2.53/arm_build/ --target=aarch64-linux-gnu --host=aarch64-linux-gnu --build=x86_64-linux-gnu CC=aarch64-linux-gnu-gcc AR=aarch64-linux-gnu-ar # make & make install