Compile Bash for Android

來源:互聯網
上載者:User

1. Get the bash source:

$ wget -c http://ftp.gnu.org/gnu/bash/bash-4.1.tar.gz

$ tar zxvf bash-4.1.tar.gz

 

2. Download the ARM Toolkit , e.g. Sourcery
G++ Lite 2008q1-126 for ARM
GNU
/Linux

$ wget -c

http://www.codesourcery.com/sgpp/lite/arm/portal/package2549/public/arm-none-linux-gnueabi/arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

note:  using the newest toolchain compile bash-4.1 failed, use
this toolchain 4.2.3 compiled ok.

 

 

3. configure the bash

$ cd bash-4.1

$./configure -host=arm-linux --enable-static-link --without-bash-malloc CC=/yourpath/arm-2008q1/bin/arm-none-linux-gnueabi-gcc

 

 

4. compile the bash

$ make

$ arm-none-linux-gnueabi-strip bash

$ file bash

bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.14, stripped

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.