Ubuntu14.04 Cross-compiling busybox to Android system arm target Board

Source: Internet
Author: User
Tags gnupg ssh server

Get a RK3288 development board, but I have to say that the ADB shell is not very useful, like the following too file.

So I thought about compiling the busybox in.

1. Preparing the compilation environment

In fact, now the cross-compiling Ubuntu is much simpler than before.

1.1 Installing JDK 6:
sudo add-apt-repository ppa:webupd8team/javasudo apt-get updatesudo apt-get Install Oracle-java6-installer
1.2 Dependency Packages:

Ubuntu 12.04 Package Installation:

sudo apt-get install git gnupg Flex Bison gperf build-essential  Zip curl Libc6-dev libncurses5-dev:i386 x11proto-core- Dev  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386  g++-multilib mingw32 tofrodos gcc-multilib Ia32-libs Python-markdown libxml2-utils Xsltproc zlib1g-dev:i386

Ubuntu 13.10/14.04 Package Installation:

sudo apt-get install Git-core GnuPG Flex Bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools  build-e Ssential Zip Curl  libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils xsltproc  lzop Libc6-dev Schedtool g++-multilib lib32z1-dev lib32ncurses5-dev  lib32readline-gplv2-dev gcc-multilib Libswitch-perl
1.3 Installing the ARM cross-compiler toolchain and compiling kernel-related packages:
sudo apt-get install GCC-ARM-LINUX-GNUEABIHF  lzop libncurses5-dev  libssl1.0.0 Libssl-dev

Here as to GCC-ARM-LINUX-GNUEABIHF or Gcc-arm-linux-gnueabi to see your chip, it should be hard float it

2.busybox Source Code

Download the latest version BusyBox source code,: http://www.busybox.net/downloads/.

$ mkdir ~/busybox                      # Create working directory $ CP busybox-1.22.1.tar.bz2 ~/busybox  # Copy Source Package $ cd ~/busybox/                        # Enter working directory $ TAR-JXVF Bus YBOX-1.22.1.TAR.BZ2     # Unzip the CD BUSYBOX-1.22.1/                   # into the unpacking package
3. Preparation for compilation3.1 Environment variables
Dpkg-l GCC-ARM-LINUX-GNUEABIHF

See where, Apt-get installation of good, generally/usr/bin, not to add to the environment variable

3.2 Setting up the installation folder
mkdir Busybox-install
4. Meke Menuconfig

Depending on your preferences, use Menuconfig or directly modify. config, mainly here are a few notes:

4.1 Select Cross Compiler prefix

Here is the prefix, without GCC, to-end, as my: arm-linux-gnueabihf-;

Busybox Settings  ---Build Options--cross compiler prefix-  Set This option equal to "ARM-LINUX-GNUEABIHF -";
4.2 Static compilation

It is recommended to use static compilation;

Busybox Settings---build Options--build Busybox as a static binary (no shared libs)  -  Enable this optio n by pressing "Y"

4.3/usr directory not included

Busybox settings–> installation options–> Don ' t use/usr-enable this option by pressing "Y"

4.4 Installation Directory

The install directory of the previous step to use an absolute path.

4.5 Press "ESC" at the end to prompt for saving.5. Make && make install
$ make                                  # compile, if multi-core CPU, such as quad core, use MAKE-J4 to increase compilation speed $ make install                          # Install
6. Send

or use root Explore/mount as read/write

ADB shell mkdir busyboxadb push./BIN/BUSYBOX/BINADB push./sbin/busybox/sbinexport path=/busybox/bin:/busybox/sbin:$ PATH:
7. End.

Look at the effect, with the front of the ADB shell is not a difference. If the installation of an SSH server with the more cool, completely out of the ADB, the main is the VI, can be remote keyboard editing.

Ubuntu14.04 Cross-compiling busybox to Android system arm target Board

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.