netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: netdev <netdev@vger.kernel.org>
Subject: Cross-compile iproute2 for android?
Date: Tue, 10 Sep 2013 16:01:13 -0700	[thread overview]
Message-ID: <522FA4B9.7050106@candelatech.com> (raw)

Has anyone managed to cross-compile iproute2 for android using the android NDK?

I managed to compile it, with some fairly ugly hacks related to include
files, but then when I try to run it, I get a core dump that doesn't
do much for me:

$ ~/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb ~/btbits/btbits-arm/server/local/sbin/ip core
GNU gdb (GDB) 7.3.1-gg2
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android".
For bug reporting instructions, please see:
<http://source.android.com/source/report-bugs.html>...
Reading symbols from /home/greearb/btbits/btbits-arm/server/local/sbin/ip...done.
[New LWP 3756]
Core was generated by `./ip list'.
Program terminated with signal 4, Illegal instruction.
#0  0xb6f4b000 in ?? ()
(gdb) bt
#0  0xb6f4b000 in ?? ()
#1  0x00000000 in ?? ()
(gdb) quit

$ file /home/greearb/btbits/btbits-arm/server/local/sbin/ip
/home/greearb/btbits/btbits-arm/server/local/sbin/ip: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped

If anyone has any suggestions, please let me know.

If anyone wants to take a look at my attempt to get it cross-compiling, my
repository is here:

https://github.com/greearb/iproute2-ct/commits/master

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

                 reply	other threads:[~2013-09-10 23:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=522FA4B9.7050106@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).