Arm cross-compilation failure

Daniel Johnston djohnston3412 at gmail.com
Wed Nov 20 15:26:37 UTC 2019


For anyone that happens to come across this query with a similar issue, I
was (and you are) using the wrong toolchain to compile.

>Trying to cross-compile busybox to >run as a standalone executable on
>Android (armeabi-v7a - api 19 if that >matters). Compiling on 64 bit
>ubuntu.

In this case I had to use arm-linux-gnueabi. Idk much about cross
compilation and thought arm-linux-androideabi would work, but i was wrong.

Also, not sure if this was a fluke but i had to start from
android2_defconfig. If i used any of the other android based defconfigs the
build would fail in a similar way.

So with the toolchain in your path, the working build goes:

$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- android2_defconfig

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

Add/remove features, set install dir, install as static, etc

$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- install

Thanks for being my rubber duck y'all.

On Wed, Nov 13, 2019, 12:31 PM Daniel Johnston <djohnston3412 at gmail.com>
wrote:

> Trying to cross-compile busybox to run as a standalone executable on
> Android (armeabi-v7a - api 19 if that matters). Compiling on 64 bit ubuntu.
> Did:
> export PATH=/path/to/toolchain/bin:$PATH
>
> make ARCH=arm CROSS_COMPILE=arm-none-eabi- android_defconfig
>
> make ARCH=arm CROSS_COMPILE=arm-none-eabi- menuconfig
>
> make ARCH=arm CROSS_COMPILE=arm-none-eabi-
>
> Getting error: fatal error:
> /system/core/include/arch/linux-arm/AndroidConfig.h: No such file or
> directory
> scripts/Makefile.build:197: recipe for target 'applets/applets.o' failed
>
> I've apt installed all linux dependencies (that I'm aware of), I've tried
> two different toolchains, and I've tried running the above commands without
> "ARCH=arm" since you don't use it in your FAQ "How do I build Busybox with
> a cross-compiler?" section.
>
> Google search for the error and missing file shows AOSP source code and
> little else. Can't seem to find anyone else that's run into the same
> problem.
>
> Any guidance?
> (and thank you for all your hard work!)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20191120/d35128e8/attachment.html>


More information about the busybox mailing list