[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Arm cross-compilation failure
From:       Daniel Johnston <djohnston3412 () gmail ! com>
Date:       2019-11-20 15:26:37
Message-ID: CABdCFVo+gLtrznTaNX3JgYivjsHeh1O4hoVuOxn9=B+fBiXKpQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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!)
>

[Attachment #5 (text/html)]

<div dir="auto"><div>For anyone that happens to come across this query with a similar \
issue, I was (and you are) using the wrong toolchain to compile.  </div><div \
dir="auto"><br></div><div dir="auto">&gt;<span style="font-family:sans-serif">Trying \
to cross-compile busybox to &gt;run as a standalone executable on &gt;Android \
(armeabi-v7a - api 19 if that &gt;matters). Compiling on 64 bit \
&gt;ubuntu.</span></div><div dir="auto"><font face="sans-serif"><br></font></div><div \
dir="auto"><font face="sans-serif">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.</font></div><div dir="auto"><font face="sans-serif"><br></font></div><div \
dir="auto"><font face="sans-serif">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.</font></div><div dir="auto"><font \
face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">So with \
the toolchain in your path, the working build goes:</font></div><div dir="auto"><font \
face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">$make \
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- android2_defconfig</font></div><div \
dir="auto"><span style="font-family:sans-serif"><br></span></div><div \
dir="auto"><span style="font-family:sans-serif">$make ARCH=arm \
CROSS_COMPILE=arm-linux-gnueabi- menuconfig</span></div><div dir="auto"><span \
style="font-family:sans-serif"><br></span></div><div dir="auto"><span \
style="font-family:sans-serif">Add/remove features, set install dir, install as \
static, etc</span></div><div dir="auto"><font face="sans-serif"><br></font></div><div \
dir="auto"><span style="font-family:sans-serif">$make ARCH=arm \
CROSS_COMPILE=arm-linux-gnueabi-</span></div><div dir="auto"><font \
face="sans-serif"><br></font></div><div dir="auto"><span \
style="font-family:sans-serif">$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- \
install</span></div><div dir="auto"><font face="sans-serif"><br></font></div><div \
dir="auto"><font face="sans-serif">Thanks for being my rubber duck \
y&#39;all.<br></font><br><div class="gmail_quote" dir="auto"><div dir="ltr" \
class="gmail_attr">On Wed, Nov 13, 2019, 12:31 PM Daniel Johnston &lt;<a \
href="mailto:djohnston3412@gmail.com">djohnston3412@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">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:<div dir="auto">export \
PATH=/path/to/toolchain/bin:$PATH</div><div dir="auto"><br></div><div dir="auto">make \
ARCH=arm CROSS_COMPILE=arm-none-eabi- android_defconfig</div><div \
dir="auto"><br></div><div dir="auto"><div dir="auto">make ARCH=arm \
CROSS_COMPILE=arm-none-eabi- menuconfig</div><div dir="auto"><br></div><div \
dir="auto"><div dir="auto">make ARCH=arm CROSS_COMPILE=arm-none-eabi-  </div><div \
dir="auto"><br></div><div dir="auto">Getting error: fatal error: \
/system/core/include/arch/linux-arm/AndroidConfig.h: No such file or \
directory</div><div dir="auto">scripts/Makefile.build:197: recipe for target \
&#39;applets/applets.o&#39; failed</div><div dir="auto"><br></div><div \
dir="auto">I&#39;ve apt installed all linux dependencies (that I&#39;m aware of), \
I&#39;ve tried two different toolchains, and I&#39;ve tried running the above \
commands without &quot;ARCH=arm&quot; since you don&#39;t use it in your FAQ \
&quot;How do I build Busybox with a cross-compiler?&quot; section.  </div><div \
dir="auto"><br></div><div dir="auto">Google search for the error and missing file \
shows AOSP source code and little else. Can&#39;t seem to find anyone else that&#39;s \
run into the same problem.  </div><div dir="auto"><br></div><div dir="auto">Any \
guidance?  </div><div dir="auto">(and thank you for all your hard \
work!)</div></div></div></div> </blockquote></div></div></div>



_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic