[Q]crosstool-ng - Nexus 7 Q&A, Help & Troubleshooting

Hello, not sure if im posting in the right section or not apologies if im not. Ive been playing with ubuntu on my nexus 7 and want to start porting some x86 programs over. I recently installed crosstools-ng on my linux box. I've coded in the past but never tried cross compiling software. If anyone has used this software you know it allows you to be VERY exacting as far as architecture goes. I know nexus 7 is armhf but beyond that im lost. If anybody uses the software and has a config file i could use I would be very grateful. Thanx
Edit: I am aware I can choose a list of "pre-made" cpu choices but as I said my knowledge of the nitty gritty of the 7 arch is beyond me. If any of the premade choices will do please let me know.
Thanx alot guys

Yep!
This post was one of the very few results that I found anywhere on the web regarding cross compiling for the Ubuntu Nexus 7 platform. Leave it to Ubuntu to have no documentation whatsoever on doing this. I spent two solid nights trying to get crosstool-ng to build binaries for my Nexus 7, and all that I could get to work was compilation with -static. I spent hours trying to figure out what was going on.
gcc -dumpmachine
returns
arm-linux-gnueabihf
Through Google/Bing searches, I again found nothing about this "hf" build other than it means hardware floating point, but I was building for the NEON/vfpv3-d16 FPU. After a bunch more searching, I found that this is a Debian-specific ABI, so no wonder I wasn't getting anywhere!
http wiki.debian.org/ArmHardFloatPort
From there, I decided to try to get a canned cross compiler, but nothing worked. I then ran across this.
http gsoc.sitedethib.com/posts/apt-get_install_gcc-4.7-arm-linux-gnueabihf
Note that I have three Ubuntu VMs and spent several hours trying to get ANY unstable or "backport" version of dpkg to work. For one of my distros, dpkg is new enough, and running dpkg --add-architecture armhf worked, but when I ran apt-get update, I got a bunch of errors that the armhf-related repositories couldn't be found (404s...) which I have seen before amounts to the Ubuntu release that you're using not being supported.
So this is why I have always avoided Ubuntu development especially for cross compiling. But since they're the ones doing a heck of a lot of work on this port, I'm not about to roll my own distro.
In case you are still looking for a cross compiler, look no further than Linaro. Download their 2012.12 binary package from this page.
https launchpad.net/linaro-toolchain-binaries/+download
I used this particular one.
https launchpad.net/linaro-toolchain-binaries/trunk/2012.12/+download/gcc-linaro-arm-linux-gnueabihf-4.7-2012.12-20121214_linux.tar.bz2
Extract with
tar xfvj gcc-linaro-arm-linux-gnueabihf-4.7-2012.12-20121214_linux.tar.bz2
and export the bin directory to your shell's PATH variable for convenience.
These binaries are apparently compiled for 32-bit i686 Linux oddly enough, so if you execute them on an amd64 system, you will likely get the "No such file or directory" error. To get 32-bit binary compatibility in Ubuntu, run
apt-get install ia32-libs
Correct me if I am wrong on any of this. I hope that this helps someone out there!

Related

Cross compiling for ARM

I'm trying to set up an environment on my Desktop for compiling applications for the Droid. I have tried everything I've seen for setting up this environment, but all of the guides I've seen seems to be a few years old and are either broken or the instructions are so out dated that they no longer apply. Does anybody have the steps needed to get this working?
I have access to numerous Linux boxes running different distros. Offhand I have access to Fedora 11, CentOS 4 and 5, Debian Lenny, and *shudder* Gentoo. If your instructions are for a specific distro, chances are I can get a box set up with it so send them along please
Any advice on getting this set up would be appreciated.
Moving to Android Development, since this seems kinda Androidy. Let me know if you disagree!
I seem to have solved my own problem on this one, but for anyone else that is interested, I ended up using an application called scratchbox, I got it at http://www.scratchbox.org/ and followed the instructions in their documentation. It uses qemu to emulate the ARM processor. For the Droid I used the arm7 toolchain package. Once I had it installed I ran it and was able to compile for the ARM without a problem, just make sure to remember to use STATIC=1 when you run your make, otherwise you will get "not found" error when running on the device.

root without intel cpu ?

sorry, flame me into oblivion if this is common knowledge ....
but is it possible to root n1's with a powerpc based mac ?
the fastboo/superboot thinger seems to error with 'bad cpu'. i know my powerbook is old, but bad, gah !
thanks for any informative links/flames.
I am not sure if it is possible, but the reason fastboot isn't working is because it was compiled for Intel. You could download the Android sources and try to compile fastboot yourself, it might work. Not sure if there are any superboot sources.
Gonna have to run a virtual machine with linux or windows I think.
hadn't thought of compiling the binary myself. +1 thaanks
virtual machine... hmm that's an idea. i have vmware tucked away on some harddrive somewhere.... i am more than a little hesitant about trusting a usb + virtual connection + not killing my phone with bad data.
ok, i'll push it over with a friends eeepc one day next week instead of risking the failure. thanks for the hints/input guys
I've had a few mac users use my guide with success. There's also a fastboot-mac file linked in the guide as well.
Paul, the fastboot-mac does not work on older macs using the powerpc processor. Only the newer ones with Intel processors. That's what is being discussed here, recompiling the fastboot-mac from source might work, or borrowing another computer.
ohgood, you will probably run into further problems with adb also not working. That may also compile to powerpc, but I'm not sure.

New Ubuntu Update 10.10 Broke my SDK?

[Q] Hey guys, I just updated to Ubuntu 10.10 and now my SDK is gone! I tried to look into why it wasn't working and the software manager tool in Eclipse says that Android is installed. I don't even have any of the Android SDK buttons showing anymore? Can someone help a fellow dev?
[SOLVED] Go to the eclipse website, download Eclipse for linux, uninstall your old eclipse, extract your new eclipse wherever and go into the folder and click the application button titled eclipse. Then reinstall all the android stuff.
At the informal android developer's meetup tonight, there were two of us with this same problem.
One issue that I found was that PATH in .profile got broken.
We suspect that using the version of eclipse that came with ubuntu, rather than 3.5 downloaded directly from eclipse might also be causing problems.
I have the same problem; ellarsee, can you be more specific how you got it running again?
(what is .mprofile and where is it, for example? (Googling isn't helping me find out))
Same thing happened to me
Upgrade to Ubuntu 10.10 broken my Android SDK as well.
Is it possible the Java packages are not installed anymore in Ubuntu?
I tried this...
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
Updated a lot of stuff but Eclipse Android is still gone...
Does anyone have this figured out yet??????????????????????????????? I NEED TO GET MOVING ON SOME APPS! THIS IS SO FRUSTRATING!
Removal and re-install of ADT plugin does not help
This is the error that appeared in my project the first time I ran eclipse after the 10.10 upgrade from 10.04.
Code:
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
I attempted to fix the build path (Properties->Java Build Path) and noticed that
com.adroid.ide.eclipse.adt.ANDROID_FRAMEWORK was not checked. I checked it but this made no difference.
Going to try complete uninstall of eclipse...
It's still not working for me
Not .mprofile .profile, it's like .bashrc, a script that is run when you log in, and can set your $PATH variable, or other environment variables.
emacs ~/.profile
or
vi ~/.profile
should enable you to edit it.
Has anyone tried just a fresh reinstall of everything to work on android apps?
Someone asked about java, it's still in /usr/bin/java
SOLUTION
Can't post outside links. So you'll have to google the bug numbers I give.
Ubuntu bug is here: bugs.launchpad # 633198
This points at a debian bug: bugs.debian.org # 587657
Debian bug contains a workaround where you edit the file:
~/.eclipse/org.eclipse.platform_*/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
And you change the concurrent package location (I had too entries, I had to remove them both and insert the line in the debian bug)
and then things magically worked for me again!
Best of luck everyone
Someone else?
Someone else found a way to fix it?
Cuz, everything up till now didnt work for me

[Q] Compile Android SDK for ARM platform

Hi all,
I got Ubuntu running on my Asus Transformer via the chroot method. Now, I installed Eclipse and wanted to start developing my Android Apps on the tablet.
Problem is the Android SDK tools are compiled for x86.
Does anybody know how to compile them for ARM or maybe even have a download link?
It'd be sooo cool to be able to dev on the Transfomer as it has this awesome physical keyboard dock!
Any ideas are highly appreciated.
Thanks,
Chris
I also run a chroot (debian squeeze) on my optimus v. you're lucky to have a keyboard port! I'm stuck with a stupid touch-keyboard without programmer keys.
I have looked for an ARM-based SDK myself as well, with no success.
some of the binaries would be useless on-device without usb-otg host mode, like adb and fastboot, but on capable devices those are needed too.
you already have an ARM-gcc toolchain too, so that piece is unnecessary as well.
maybe going through the SDK manually you could find exactly what parts are binaries to see about finding specific replacements compiled for ARM, or at least source for them.
the rest of the SDK should be portable without mods, unless something's so picky it requires sun-java instead of open-java.
keep us posted!
new information
http://www.timelesssky.com/blog/building-android-sdk-build-tools-aapt-for-debian-arm

Need advice on setting up linux install

In that I got an idea, took the first step, and am now completely out of my depth.
Let me start at the beginning.
I've always wanted to get into android development, but with the departure of CosmicDan, my recent format of my home computer, and a lucky shot at taking a general development class have all culminated to suggest now's the time.
Here's my objective: Dualcore desktop computer, dualbooting Windows 8 and a flavor of linux focused entirely on being an android toolkit. Here's my problem: I used linux for a week in my highschool networking class most of a decade ago. Red Hat 7 or 8, maybe? Anyway, I know virtually nothing except what I've osmosed from using an ADB shell.
I need to know which flavor of linux is best for android dev, how to set up a dual boot, and after that point, probably step-by-step instructions on establishing a build environment and using github. I'm not completely useless at this, I know how to use google, but a lot of information is outdated and this is a somewhat situational goal.
ANY HELP IS GREATLY APPRECIATED!
Ubuntu!
And google Ubuntu google installer
Sent from my R800i using xda app-developers app
Ubuntu is more user friendly but if you want development I would suggest 1: backtrack 2: arch Linux (for advanced users) 3: fedora
Sent from my R800x using Tapatalk 2
Apparently Backtrack is called Kali Linux now...
"It includes support for the Metasploit Project's Metasploit Framework, a tool for developing and executing exploit code against a remote target machine.[2] It also includes the security tools Wireshark, John the Ripper, Nmap and Aircrack-ng.[2]"
Hahaha hell yes I'll take some of that.
I still think I'll need to install Ubuntu - I don't know how I'd put this particular build on a flash drive. Installing it from inside ubuntu would probably be easiest.
EDIT: Actually they have excellent instructions on the website for setting up a flashdrive.
im using ubuntu just fine
im on ubuntu 10.04 i compile builds fine
Use the Ubuntu wubi installer for dual boot
Sent from my R800i using xda app-developers app
Okay, Kali Linux is installed and operational, programs are updated, and I even figured out how to install Flash via the mysterious powers of 'apt-get'. Using Grub for dual boot, and I found my way around configuring it and populating a new cfg file via the terminal. Whew.
Perhaps 4/20 was a bad choice for learning a new and notoriously complex OS, or maybe it was the best choice.
I guess I'm ready to set up a kitchen, but now I need input again. Do I just 'apt-get' some magical box of android goodies, or is this process more involved?
Edit: The answer is 'more involved', but not by much. I got the kitchen from http://forum.xda-developers.com/showthread.php?t=633246 and I was even able to independantly apt-get my way out of an error without googling it! So, it's running... I guess it's time to start cutting up a ROM. I'm inclined to believe CyanogenMod would be the best starting point for that, and I'm doublefortunate that my roommate has a Nexus he's willing to let me experiment on, as I don't want to navigate the unique structure of Xperias yet.

Categories

Resources