[Toybox] toybox and NDK sitrep

enh enh at google.com
Fri Apr 28 15:31:59 PDT 2017


since rob asked on some other thread earlier this week...

NDK r15beta2 should hopefully ship in time for I/O in a couple of weeks, so
i had a quick go at building toybox out of the box with the latest bits...

$ ./android-ndk-r15-beta2/build/tools/make_standalone_toolchain.py
--unified-headers --arch arm64 --api 24 --install-dir
/tmp/n-standalone-toolchain
$ git clone https://github.com/landley/toybox.git
$ cd toybox
$ CC=clang
CROSS_COMPILE=/tmp/n-standalone-toolchain/bin/aarch64-linux-android- make
defconfig
$ CC=clang
CROSS_COMPILE=/tmp/n-standalone-toolchain/bin/aarch64-linux-android- make

i've attached one patch to make mkpasswd not part of the "defconfig" for
Android, since (a) we don't have passwd and (b) we don't have crypt(3). so
it wouldn't be any use and you can't build it anyway.

i've attached another patch to add liblog to the list of probed libraries
so that toybox actually links okay.

with that there's only one problem left (ignoring compiler warnings, and
the fact that selinux and boringssl aren't part of the NDK so you'll be
without working versions of any of the selinux stuff or fast versions of
the hash stuff) --- there is no public API for the <cutils/sched_policy.h>,
so that still won't build out of the box.

(this was a useful exercise because it showed that <scsi/sg.h> was still
missing from the NDK, so that bug should finally be fixed for real this
time.)

-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170428/9d10156d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Building-mkpasswd-on-Android-makes-no-sense.patch
Type: text/x-patch
Size: 760 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170428/9d10156d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Android-needs-llog-to-link.patch
Type: text/x-patch
Size: 798 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170428/9d10156d/attachment-0001.bin>


More information about the Toybox mailing list