arm-linux-gnueabihf- 编译 busybox-1.26.1

环境:ubuntu 16.04 

交叉编译工具:arm-linux-gnueabihf- 

源码包:busybox-1.26.1.tar.bz2

1.解压 

tar -jxvf busybox-1.26.1.tar.bz2

2.清除

make clean

3.配置

make menuconfig

  1)设置Busybox Setting --->

    [] Build BusyBox as a static binary (no shared libs)

    ... ...

    (./_install) BusyBox installation prefix

  2) 设置 Miscellaneous Utilities --->

    [] nandwrite

    [] nanddump

    解决如下错误:

miscutils/nandwrite.c: In function 'nandwrite_main':

miscutils/nandwrite.c:151: error: 'MTD_FILE_MODE_RAW' undeclared (first use in this function)

miscutils/nandwrite.c:151: error: (Each undeclared identifier is reported only once

miscutils/nandwrite.c:151: error: for each function it appears in.)

scripts/Makefile.build:197: recipe for target 'miscutils/nandwrite.o' failed

make[1]: *** [miscutils/nandwrite.o] Error 1

Makefile:742: recipe for target 'miscutils' failed

make: *** [miscutils] Error 2


  3) 保存

     Save Configuration to an Alternate File

4.编译

   make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

5.安装

   make install

你可能感兴趣的:(Linux)