【问题标题】:How to compile Busybox?如何编译 Busybox?
【发布时间】:2014-04-20 00:15:39
【问题描述】:

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

我会编译最新的busybox源码快照并在网上免费上传给大家,甚至可以自己制作免费的BusyboxInstaller.apk(我已经从官网下载了今天3月14日的快照)因为太多了busybox 安装程序的版本非常过时,我想利用 Cortex A9 cpu 的可能优化。

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

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

1 例如是否意味着它也会使我的busybox受益?

2我可以使用哪些其他说明/其他任何方法来针对 i9100 设备进行优化?

3 我可以只用1x2Ghz and 2GB RAM 在手机而不是PC 上编译吗?我认为它应该更快,因为它有 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)

要安装什么样的小程序链接?

(./_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

【问题讨论】:

  • 我可以安全禁用哪些小程序?

标签: android compilation cross-compiling busybox instructions


【解决方案1】:

对于 Android,您可以使用配置 android_defconfig 并使用 examples/android-build 构建。

我成功使用了busybox patched by sherpya:他的配置sherpya_android_defconfig和稍微修改的构建脚本examples/android-build

【讨论】:

    【解决方案2】:

    如何编译busybox?

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

    1. 解压新的源代码

    2. 创建默认配置

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

    创建一个默认配置文件。

    1. 更新配置以将其更改为我们的需要:

    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig

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

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

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

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

    更多详情见此链接:http://balau82.wordpress.com/2010/03/27/busybox-for-arm-on-qemu/

    【讨论】:

    • @vinayhunchyai 对不起,我之前没有看到这个。当我运行命令 1) 我得到 arm-none-linux-gnueabi-gcc not found。我应该担心吗?我也在检查busybox配置中的每个选项,但我找不到令人满意的信息:请查看我编辑的问题
    • @vinayhunachyai 请帮忙选择busybox。(我会投票给你,但它需要15个声望)
    • @vinayhunachyai 我在第 3 步出错:make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- install /home/euphoria/Sourcery/busybox/scripts/gcc-version.sh: 行11:arm-none-linux-gnueabi-gcc:找不到命令 CC applet/applet.o /bin/sh:1:arm-none-linux-gnueabi-gcc:未找到脚本/Makefile.build:197:配方目标 'applet/applets.o' 失败 make[1]: *** [applet/applets.o] 错误 127 Makefile:372: 目标 'applet_dir' 的配方失败 make: *** [applet_dir] 错误 2
    • 你有跨工具链吗?如果不下载sourcery.mentor.com/GNUToolchain 1st,错误是由于缺少工具链gcc
    • @vinayhunachyai 我没有下载这个,因为它需要注册并且是商业的,所以我部分下载了 gnu 工具链(成功编译了 bison 和所有其余部分),我得到了和以前一样的错误。 是否必须是您提供的网站的 gnu 工具链?
    猜你喜欢
    • 2016-08-22
    • 2018-08-08
    • 1970-01-01
    • 2016-09-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-10
    • 2015-01-04
    相关资源
    最近更新 更多