guardianproject / lildebi

UNMAINTAINED please adopt! we can no longer maintain this
https://guardianproject.info/code
GNU General Public License v3.0
229 stars 55 forks source link

arm64 (aarch64) support #154

Open chungy opened 9 years ago

chungy commented 9 years ago

While this probably can't be fully realized until #145 is fixed, the Nexus 9 is the first AArch64 Android device on the market and it will be lovely to be able to use Lil Debi for it!

eighthave commented 9 years ago

Looks like @godlessfather has started work on this :+1: :-) The open question for me is how best to handle it. I think it'll be easiest to just make a dedicated arm64 APK and then a separate APK that supports both armel and armhf (i.e. the current APK).

adamjhogan commented 9 years ago

@eighthave Can you check out https://github.com/godlessfather/lildebi/tree/arm64? Before I submit pull requests, I'd rather that you check my work if you could. @chungy: could you test https://raw.githubusercontent.com/godlessfather/lildebi/arm64/LilDebi-0.5.4.apk? If it follows what other 5.* builds are doing, it should fail to detect that it's running and may complain about LD_PRELOAD issues, but the binaries should run and it should allow you to create and start properly.

chungy commented 9 years ago

Seems to get a little further in progress, but only armhf and armel are selectable as architectures even after switching the distribution to jessie (not a huge deal, the arm64 kernel should be fully backwards compatible with both kinds of 32-bit binaries). In addition, it fails to actually start Debian, instead just reporting chroot: can't execute '/bin/bash': No such file or directory when I click "Start Debian"

adamjhogan commented 9 years ago

Totally forgot to include arm64 and default to that. I pushed those edits and will build again tomorrow morning. Thanks for catching that and for testing.

adamjhogan commented 9 years ago

@chungy Can you try https://github.com/godlessfather/lildebi/blob/arm64/LilDebi-0.5.4.apk?raw=true?

chungy commented 9 years ago

Yes, arm64 shows up, although it probably should be limited to the distributions that actually have an arm64 port (not squeeze nor wheezy), but that's not a big deal, especially as it defaults to jessie. It still ends up reporting the same error about not being able to execute /bin/bash, however.

adamjhogan commented 9 years ago

Thanks for catching the invalid releases. I've removed them from source. Did arm64 install or did it fail before finishing the initial install?

eighthave commented 9 years ago

So I have a stupid question: is it possible to run armel or armhf binaries on arm64? If so, then the Lil' Debi embedded utilities should just stay armel, and they will work on all platforms.

Then to add arm64 support, the install process needs to be changed to allow arm64 as an "arch", and like @chungy said, choosing arm64 should force jessie as the distro, since wheezy and squeeze do not support arm64.

eighthave commented 9 years ago

@godlessfather if you're doing some auto-detection of arm64, it would be nice to also include auto-detection of armhf vs armel. I think that is done by looking at ARMv7a or something like that.

adamjhogan commented 9 years ago

I should have guessed. I immediately assumed that the request for arm64 support meant that the binary assets didn't work. Auto-detection would be a neat feature, though.

chungy commented 9 years ago

Indeed, arm64 is fully backwards-compatible with armel and armhf binaries. It's not much different than, say, running i386 binaries on amd64, even to the point of running full distributions under a chroot or container. So yes, this request is primarily for the request to be able to install the actual arm64 distribution of Debian, but the other two should not be disabled if anyone really wants to run them for any reason.

eighthave commented 9 years ago

@godlessfather keep your arm64 work around for sure, you never know what kind of annoying technical detail we'll run into in the future on arm64.

If you are still interested in doing build work like this, it would be very useful to build cdebootstrap from source, rather than having to download the binary package from Debian. The version of that package we use seems to disappear from time to time, since it gets upgraded in Debian, and old versions are removed from the main archive. Plus building cdebootstrap as part of Lil' Debi means it can be built using the Android build flags.

adamjhogan commented 9 years ago

https://github.com/guardianproject/lildebi/pull/157 builds cdebootstrap from source.