如何编译Busybox?

时间:2014-03-14 15:37:48

标签: android compilation cross-compiling busybox instructions

(i9100和i9100p手机配备Exynos 4210 SoC,其中包括支持NEON的Cortex A9双核1.2Ghz处理器。)

我将编译最新的busybox源快照,并在互联网上为所有人免费上传,甚至可以自己免费BusyboxInstaller.apk(我今天已经从官方网站下载了3月14日快照)因为如此多的busybox安装程序都有非常过时的版本,我想利用Cortex A9 cpu的可能优化。

(NEON技术是128位SIMD(单指令,多数据)架构扩展。

它可以加速多媒体和信号处理算法,如视频编码/解码,2D / 3D图形,游戏,音频和语音处理,图像处理,电话和声音合成。

1 是否意味着它也会使我的忙碌盒受益?

2 我可以使用哪些其他说明 / anythingelse来优化i9100设备?

3 我可以在手机而不是只有1x2Ghz and 2GB RAM的电脑上进行编译吗?我认为它应该快得多,因为它有2x1.5GHz and 1GB RAM(我超频一点)而不是1x2GHz,我是对的吗?

  

4如何编译busybox?

这些选项有哪些?

Force NOMMU build
Additional CFLAGS
Additional LDFLAGS
Additional LDLIBS
all in general configuration and Busybox Library Tuning and debug (I googled for each for a few hours but nothing satisfactory)

要安装哪种applet链接?

(./_ install)BusyBox安装前缀

**我跟随vinayhunachyai指示时有爱。

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- install
/home/euphoria/Sourcery/busybox/scripts/gcc-version.sh: line 11: arm-none-linux-gnueabi-gcc: command not found
  CC      applets/applets.o
/bin/sh: 1: arm-none-linux-gnueabi-gcc: not found
scripts/Makefile.build:197: recipe for target 'applets/applets.o' failed
make[1]: *** [applets/applets.o] Error 127
Makefile:372: recipe for target 'applets_dir' failed
make: *** [applets_dir] Error 2

2 个答案:

答案 0 :(得分:4)

  

如何编译busybox?

第一个下载工具链。您可以参考:Advice regarding installing ARM toolchain on Ubuntu VM (64bit)

  1. 解压新的源代码

  2. 创建默认配置

  3. make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- defconfig

    创建默认配置文件。

    1. 更新配置以将其更改为我们的需求:
    2. make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig

      将Busybox编译为静态可执行文件的选项,这样我们就不必复制根文件系统中的动态库。该设置可在“Busybox Settings - >中找到。构建选项“。 另外,选择要在Busybox中嵌入的实用程序。

      1. 然后,以下命令构建Busybox并创建一个名为_install的目录,其中包含根文件系统树:

        make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- install.

      2. 静态编译。如果您动态编译,则需要将库复制到目标。

        有关详细信息,请参阅此链接:http://balau82.wordpress.com/2010/03/27/busybox-for-arm-on-qemu/

答案 1 :(得分:0)

For Android you can use config android_defconfig and build with examples/android-build.

I successfully used busybox patched by sherpya: his config sherpya_android_defconfig and slightly modified build script examples/android-build.