如何编译Busybox? [英] How to compile Busybox?

查看:3152
本文介绍了如何编译Busybox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



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



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



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



1



2 其他指示

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


4如何编译busybox?


这些选项是什么?

 强制NOMMU构建
其他CFLAGS
其他LDFLAGS
额外的LDLIBS
所有在一般配置和Busybox库调整和调试(我每个谷歌搜索几个小时,但不满意)

要安装什么样的applet链接?



(./_ install)BusyBox安装前缀


$ b $

  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 applets / applets.o
/ bin / sh:1:arm-none-linux-gnueabi-gcc:not found
scripts / Makefile.build:197:目标'applets / applets.o'的配方失败
make [1]:*** [applets / applets.o]错误127
Makefile:372:目标'applets_dir'失败的食谱
make:*** [applets_dir]错误2


解决方案


如何编译busybox? >

第一个下载工具链。您可以参考:有关安装ARM的建议Ubuntu VM(64位)上的工具链


  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- 。


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



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


(The i9100 and i9100p phones have Exynos 4210 SoC which includes Cortex A9 dual core 1.2Ghz processor which supports NEON.)

I will compile the latest busybox source snapshot available and upload it for everyone for free on internet and maybe even make my own free BusyboxInstaller.apk (I already downloaded today's 14th March snapshot from the official website) because so many busybox installers have very outdated versions and I want to take advantage of possible optimizations for the Cortex A9 cpu.

(NEON technology is a 128-bit SIMD (Single Instruction, Multiple Data) architecture extension.

It can can accelerate multimedia and signal processing algorithms such as video encode/decode, 2D/3D graphics, gaming, audio and speech processing, image processing, telephony, and sound synthesis.)

1 does such as mean it will also benefit my busybox?

2 What other instructions/anythingelse I can use to optimize for i9100 devices?

3 Can I compile on my phone instead of PC with only 1x2Ghz and 2GB RAM? I think it should be much quicker because it has 2x1.5GHz and 1GB RAM (I overclock only a bit) versus 1x2GHz, am I right?

4 How to compile busybox?

What are these options for?

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)

What kind of applet links to install?

(./_install) BusyBox installation prefix

**I have eeror when following vinayhunachyai instructions.

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

解决方案

How to compile busybox?

1st download toolchain. You can refer to this: Advice regarding installing ARM toolchain on Ubuntu VM (64bit)

  1. untar new source-code

  2. create default config

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

A default configuration file is created.

  1. update config to change it to our needs:

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

The option to compile Busybox as a static executable, so that we don’t have to copy the dynamic libraries inside the root filesystem. The setting can be found in "Busybox Settings --> Build Options". Also, select what utilities you want embedded in Busybox.

  1. Then, the following command builds Busybox and creates a directory called _install containing the root filesystem tree:

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

Compile statically. If you compile dynamically then you need to copy libraries to target.

For more details see this link: http://balau82.wordpress.com/2010/03/27/busybox-for-arm-on-qemu/

这篇关于如何编译Busybox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆