Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to Cross-compile busybox to Android system ARM Target Board by Ubuntu14.04

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how Ubuntu14.04 cross-compiles busybox to the ARM target board of Android system. The article is very detailed and has certain reference value. Interested friends must read it!

Get a RK3288 development board, but I have to say that adb shell is not very easy to use, like the following is too filthy.

So I wanted to compile busybox into it.

1. Prepare the compilation environment

In fact, cross-compilation on Ubuntu is much easier now than it was before.

1.1 install the JDK 6:sudo add-apt-repository ppa:webupd8team/javasudo apt-get updatesudo apt-get install oracle-java6-installer1.2 dependency package:

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

Installation of the Ubuntu 13.10 Lex14.04 package:

Sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev\ libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential 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-perl1.3 install the ARM cross-compilation tool chain and compile kernel-related software packages: sudo apt-get install gcc-arm-linux-gnueabihf\ lzop libncurses5-dev\ libssl1.0.0 libssl-dev

As for gcc-arm-linux-gnueabihf or gcc-arm-linux-gnueabi, it depends on your chip. It should be hard float.

2.busybox source code

Download the latest version of busybox source code at http://www.busybox.net/downloads/.

$mkdir ~ / busybox # create a working directory $cp busybox-1.22.1.tar.bz2 ~ / busybox # copy the source package $cd ~ / busybox/ # enter the working directory $tar-jxvf busybox-1.22.1.tar.bz2 # extract $cd busybox-1.22.1/ # into package 3. Compile ready 3.1 environment variable dpkg-L gcc-arm-linux-gnueabihf

See where the installation, apt-get installation is good, generally / usr/bin, no need to add to the environment variable

3.2.Create the installation folder mkdir busybox-install4. Meke menuconfig

According to your personal preference, use menuconfig or modify .config directly. Here are a few things to note:

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

Static compilation is recommended; Busybox Settings-- > Build Options-- > Build Busybox as a static binary (no shared libs)-Enable this option by pressing "Y"

4.3 does not include / usr directory

Busybox Settings-- > Installation Options-- > Don't use / usr-Enable this option by pressing "Y"

4.4 installation directory

For the install directory in the previous step, use the absolute path.

4.5 finally press [ESC] and prompt to save when saving. 5. Make & & make install$ make # compilation, if it is a multi-core CPU, such as quad-core, using make-J4 can improve the compilation speed $make install # installation 6. Send

Or use Root Explore to make / mount it readable and writable

Adb shell mkdir busyboxadb push. / bin / busybox/binadb push. / sbin / busybox/sbinexport PATH=/busybox/bin:/busybox/sbin:$PATH:7. It's over.

Take a look at the effect, and the previous adb shell is not very different. If coupled with the installation of a SSH SERVER with more fun, completely separated from adb, mainly there is VI, you can edit the keyboard remotely.

These are all the contents of the article "how Ubuntu14.04 cross-compiles busybox to the ARM target board of Android system". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report