lildebi icon indicating copy to clipboard operation
lildebi copied to clipboard

arm64 (aarch64) support

Open chungy opened this issue 10 years ago • 13 comments

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!

chungy avatar Feb 08 '15 07:02 chungy

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).

eighthave avatar Feb 09 '15 12:02 eighthave

@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.

adamjhogan avatar Feb 11 '15 03:02 adamjhogan

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"

chungy avatar Feb 11 '15 04:02 chungy

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 avatar Feb 11 '15 04:02 adamjhogan

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

adamjhogan avatar Feb 11 '15 12:02 adamjhogan

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.

chungy avatar Feb 11 '15 12:02 chungy

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

adamjhogan avatar Feb 11 '15 13:02 adamjhogan

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 avatar Feb 11 '15 15:02 eighthave

@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.

eighthave avatar Feb 11 '15 15:02 eighthave

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.

adamjhogan avatar Feb 11 '15 23:02 adamjhogan

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.

chungy avatar Feb 12 '15 04:02 chungy

@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.

eighthave avatar Feb 12 '15 10:02 eighthave

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

adamjhogan avatar Feb 16 '15 04:02 adamjhogan