Android 6 32bit builld - Nexus 5X Q&A, Help & Troubleshooting

Has anyone managed a 32bit build of the latest aosp and got it to actually boot? Am currently stuck on the android boot screen

We have a 64 bit phone. Why are you attempting to use the 32 bit build?

hopesrequiem said:
We have a 64 bit phone. Why are you attempting to use the 32 bit build?
Click to expand...
Click to collapse
I need a 32bit aosp or cm13 so I can build Sailfish on top of it.
I tried compiling a 32bit aosp and stole vendor binaries from the nexus 5 for 32bit, but I can't get surfaceflinger to do anything aside from getting stuck on boot animation.
now am trying to build cm13 with FORCE_32BIT flag in BoardConfig like I saw somewhere else.
Also since this phone is a dual cpu, it has both libs 32/64 so its not an issue there.

m4r0v3r said:
I need a 32bit aosp or cm13 so I can build Sailfish on top of it.
I tried compiling a 32bit aosp and stole vendor binaries from the nexus 5 for 32bit, but I can't get surfaceflinger to do anything aside from getting stuck on boot animation.
now am trying to build cm13 with FORCE_32BIT flag in BoardConfig like I saw somewhere else.
Also since this phone is a dual cpu, it has both libs 32/64 so its not an issue there.
Click to expand...
Click to collapse
I highly doubt that you'll ever really get this to work. Even if you did get a 32-bit system image onto the device, there won't be any drivers since they'll have been compiled for AArch64.
Correct me if I'm wrong.

davidc14 said:
I highly doubt that you'll ever really get this to work. Even if you did get a 32-bit system image onto the device, there won't be any drivers since they'll have been compiled for AArch64.
Correct me if I'm wrong.
Click to expand...
Click to collapse
I think your slightly wrong. See the Nexus 5x has 2 cpus, not both are AArch64. So the vendor partition has both 32bit and 64bit libs.
Also 64bit cpus are generally backwards compatible with 32bit

m4r0v3r said:
I think your slightly wrong. See the Nexus 5x has 2 cpus, not both are AArch64. So the vendor partition has both 32bit and 64bit libs.
Also 64bit cpus are generally backwards compatible with 32bit
Click to expand...
Click to collapse
Well, no it doesn't have two CPUs. It has six cores on one SoC. It has four Cortex A53 cores and two Cortex A57 cores. You can see this by googling: snapdragon 808. Qualcomm's page details it.
You can see from ARM's specifications that both types of core are ARMv8-a AArch64 cores, which are 64-bit (hence AArch64). You're right that they include AArch32 ARMv7-a compatibility, as they have to for backwards compatibility. But I don't think Google or Qualcomm will have written any 32-bit drivers for the various radios, and GPU, etc on the device. So I don't think you'll get a 32-bit Android rom working on the 5X.

davidc14 said:
Well, no it doesn't have two CPUs. It has six cores on one SoC. It has four Cortex A53 cores and two Cortex A57 cores. You can see this by googling: snapdragon 808. Qualcomm's page details it.
You can see from ARM's specifications that both types of core are ARMv8-a AArch64 cores, which are 64-bit (hence AArch64). You're right that they include AArch32 ARMv7-a compatibility, as they have to for backwards compatibility. But I don't think Google or Qualcomm will have written any 32-bit drivers for the various radios, and GPU, etc on the device. So I don't think you'll get a 32-bit Android rom working on the 5X.
Click to expand...
Click to collapse
Hmm you might be right here, although the vendor partition seems to include identical lib and lib64 shared libs. I'll have to do more digging. The only other solution is to build sailfish 64bit but I don't think such a thing exists :'(
edit:
after digging around the vendor partition it seems theres both 32bit and 64bit binaries.

Because 64bit is a mixed bag, its not all positive. 64bit adrees space has much bigger memory footprint (64bit pointers etc)

Related

[Q] Pure Linux Phone OS ROM Possible on ZF2?

Hey all. Ever since I learned about the ZF2 and it running on an Intel CPU/SoC vs a typical ARMv7 or ARMv9-based CPU/SoC this idea came to mind. Would it possible to develop a pure Linux (non-Android) based OS/ROM for this device? I run Funtoo Linux (a Gentoo derivative) on one of my desktops and now on a laptop I'm sharing with my brother, and it works great. Having this (or something Ubuntu-based to ease on pkg installs via binaries vs compiling from source for everything) on a phone this powerful would be awesome as well. Besides drivers for baseband / bootloader (of which I know is currently locked at the moment I'm posting this thread) how difficult would this be to accomplish? Does this device boot with EFI? I'd think compiling a kernel for it would be easier than a typical Android kernel since Intel spec is easier to compile for... I'm no developer, but that's my take on it.
Thoughts?

[Q] boot.img requirements

I know with the bootloader unlocked theoretically any kernel built for the device should boot, but are there any specific requirements? Size, certain files, etc? I tried packing the stock Linux kernel and initramfs into a boot.img and it wouldn't boot, so I was looking for suggestions on what may be going wrong. Thanks!
http://forum.xda-developers.com/zenfone2/development/tool-zenfone-2-boot-repack-t3146088
sorg said:
http://forum.xda-developers.com/zenfone2/development/tool-zenfone-2-boot-repack-t3146088
Click to expand...
Click to collapse
I've noticed that, but thanks for the reference
I don't want to repack a stock ZF2 kernel, I want to pack an Arch Linux kernel and an initramfs
Jhdoubleoseven said:
I've noticed that, but thanks for the reference
I don't want to repack a stock ZF2 kernel, I want to pack an Arch Linux kernel and an initramfs
Click to expand...
Click to collapse
You need to compile Arch Linux kernel for Moorefield platform. If Arch Linux provides such hardware config, then it can boot.
Generally speaking, ASUS provides source code for Linux kernel already. So, you can tweak config to Ach Linux requirements, or port hardware specific patches to Arch Linux kernel.
I don't know about your experience, but porting Linux kernel for non-supported platform (i believe Arch Linux doesn't know about Moorefield Z35xx) is not trivial.
Jhdoubleoseven said:
I know with the bootloader unlocked theoretically any kernel built for the device should boot, but are there any specific requirements? Size, certain files, etc? I tried packing the stock Linux kernel and initramfs into a boot.img and it wouldn't boot, so I was looking for suggestions on what may be going wrong. Thanks!
Click to expand...
Click to collapse
One addition to sorg's post:
The size of the whole boot.img must not exceed 16MB, also make sure to include as much from stock initrd as possible: init, init.rcs, binaries in sbin, etc.
If you compile the drivers directly into the kernel, then you don't need the .ko files in the lib/modules folder, making your ramdisk size smaller (by a great degree).
Cheers
[deleted]
sorg said:
You need to compile Arch Linux kernel for Moorefield platform. If Arch Linux provides such hardware config, then it can boot.
Generally speaking, ASUS provides source code for Linux kernel already. So, you can tweak config to Ach Linux requirements, or port hardware specific patches to Arch Linux kernel.
I don't know about your experience, but porting Linux kernel for non-supported platform (i believe Arch Linux doesn't know about Moorefield Z35xx) is not trivial.
Click to expand...
Click to collapse
Ah, thank you very much! Now I'm curious though, the stock Arch kernel is compiled for generic x86-64 processors so why does it need to be platform-specific? I run the linux-ck-core2 kernel which is specifically compiled for the core2 processor series, but the generic one works fine as well on my laptop.
TheSSJ said:
One addition to sorg's post:
The size of the whole boot.img must not exceed 16MB, also make sure to include as much from stock initrd as possible: init, init.rcs, binaries in sbin, etc.
If you compile the drivers directly into the kernel, then you don't need the .ko files in the lib/modules folder, making your ramdisk size smaller (by a great degree).
Cheers
Click to expand...
Click to collapse
Thank you very much! Very helpful info
So you suggest modifying the stock initramfs to then start Arch? Arch uses systemd so I will probably need to figure out what exactly the stock one does so I know where to give it Arch-specific instructions.
Also, do you think the drivers would work with a newer kernel? Would I need to compile them into 3.10 or if I used the latest 4.1 or so do you think it could work?
Never played too much with kernel hacking so I definitely can get some great experience here! Thanks!
Jhdoubleoseven said:
Ah, thank you very much! Now I'm curious though, the stock Arch kernel is compiled for generic x86-64 processors so why does it need to be platform-specific? I run the linux-ck-core2 kernel which is specifically compiled for the core2 processor series, but the generic one works fine as well on my laptop.
Click to expand...
Click to collapse
x86 is only op.code standard - that's all.
Moorefield Z35xx SoC is like all-in-one PC with many devices inside, not just CPU. And every device requires specific driver. There are some devices in Z35xx are very specific and not supported by generic PC drivers.
Also, Z35xx has neither BIOS, nor UEFI. It has SFI which is not used in PC. Kernel has to have support booting process and parsing SFI tables (like PC parses ACPI tables) to get info about connected devices and their resources.
This is just brief platform differences (comparing to standard PC) overview. And you may find more differences if you will study the Moorefield platform.

X64 native full support and 3.8Gb limit.

I am wondering if the kernel is x64 as I read that Asus stated its x64 yet Android is only x32 so far, x64 supports full 4096mb RAM, thats why it shows as 3.8Gb instead. CPUZ also shows 32bit OS. How can it be possible of running an x64 kernel with an x32 operating system?
Android M supports ARMv8 64 bit which is different from Intel's X64 instructions.
The OS is on 32-bit for now. We are working on updating it to x86-64 in the future. I do not have a timeline yet, unfortunately.
Nice to hear that. Thanks!
Tuanies said:
I do not have a timeline yet, unfortunately.
Click to expand...
Click to collapse
It's cool, no ETAs on XDA :highfive:
You could always just sneak me some files to "test"
I don't even have the files
Also, before Android L was even released, Intel had completed their own work on 64-not support for Android for their processors. I read about it a while ago.

Nexus 5x 32-bit kernel?

I just got my Nexus 5x in! I've never developed for Android before, so this is all a new experience for me. I managed to get a 6.0.1_r30 generic arm build compiled (forgot to `lunch` for bullhead), so I know my environment is finally sane. However, I'd like to get some clarification on the Snapdragon 808.
I know the Snapdragon 808 is based on the ARMv8-a architecture, which means that it should, in theory, be both arm and arm64 compatible. And, from the look of devices/lge/bullhead/BoardConfig.mk, it appears that the default kernel is dual-arch arm and arm64. However, the primary arch is arm64. I'd like to attempt to build a kernel that's arm (armv7-a-neon) only. You might ask, "Why would you want to do that?" Well, I would like to build Ubuntu Touch for the device. Ubuntu touch is using the KitKat dev tree, so is only 32-bit compatible. Attempts to expand the KitKat tree with an arm64 cross-compilation toolchain were fruitless after spending countless hours attempting it.
At this point, I don't even know if it's worth trying for a couple of reasons:
Hardware drivers are Lollipop, Ubuntu Touch is KitKat
I don't know if ARMv8-a will boot a 32-bit kernel out-right or it has to start in 64-bit mode and drop to 32-bit (if that's the case, would the kernel know to do that? Or does the CPU start in 32 bit mode and bump up to 64 bit mode)?
It's probably pretty unlikely that dropping in a pre-built Lollipop kernel into the Ubuntu Touch dev tree would work -- different ABI's (That's the ever-changing kernel/Android-specific API/syscalls, right?)
So, I'm looking for some help clarifying any of these issues. Is there anybody here really familiar with ARM that could answer these questions? Heck, if these are non-issues, I might even attempt a build.

Question OpenCL possible for chrooted Linux?

I would like to use darktable photo editor in chrooted Linux deployed using the Linux Deploy on my POCO F3. Darktable already runs fine, but without the OpenCL as this is not available in the chrooted Linux out of the box. I already managed to get OpenCL available and was able to make clinfo in the Termux environment following the instructions here:
https://github.com/Oblomov/clinfo
Because, if my understanding is correct, making the clinfo is the first step in making the OpenCL available, I would like to make it in chrooted Linux environment too. But whatever I tried, it failed. I went through a ton of sources on Internet but did not find single one suitable for my case. Moreover most are many years old and not sure if still valid. Mostly for the Mali graphics too, not for Adreno...
So I tried to copy the libOpenCL.so from the /system/vendor/lib64 of the Android system tree to the /usr/lib/aarch64-linux-gnu directory of the chrooted Linux. Although the library gets recognized during making the clinfo (before copying it complained of missing library), the building process still fails. I have no ICD file in /etc/OpenCL/vendor as I didn’t find any info on what it should contain in the case of Adreno graphics. But this one is also missing in Android/Termux environment where clinfo gets compiled, so may be is not necessary.
Does anyone have any idea on how to get OpenCL available in chrooted Linux on POCO F3 or any arm64 device with the Adreno graphics? I appreciate any kicking me in the right direction.
I have no clue what you're doing but may I suggest one idea: try using a custom ROM as these will be closer to AOSP and so might have more Linux features not removed by MIUI.
Take my advice with a pinch of salt as I have no clue what you're doing
Robert314 said:
I have no clue what you're doing but may I suggest one idea: try using a custom ROM as these will be closer to AOSP and so might have more Linux features not removed by MIUI.
Take my advice with a pinch of salt as I have no clue what you're doing
Click to expand...
Click to collapse
Thank you for being interested, but I think it has nothing in common with the Android ROM type or version. Those things I'm trying to achieve I'm not doing in Android, but in Linux which runs next to Android and shares the Linux kernel and the system resources with it. But otherwise it is independent of Android.
I'm strongly convinced it must be possible to enable OpenCL in chrooted Linux running on POCO because it is already possible in Termux on the same device. And there are some threads on Internet telling this being possible, but on Mali graphics and some 6 years ago. I believe I'm missing something obvious or the correct Linux graphics drivers with OpenCL support for Adreno.
There's freedreno, look into this
samantas5855 said:
There's freedreno, look into this
Click to expand...
Click to collapse
Yeah, I already found freedreno earlier, but it did not attract my attention as it seemed to me being no longer developed. At least for OpenCL there is no commit since 2014. But I will give it a try as do not have any better option now.
Thank you for reminding me freedreno!
sunarowicz said:
Yeah, I already found freedreno earlier, but it did not attract my attention as it seemed to me being no longer developed. At least for OpenCL there is no commit since 2014. But I will give it a try as do not have any better option now.
Thank you for reminding me freedreno!
Click to expand...
Click to collapse
Freedreno is very active, it can even run Genshin on Turnip. If you google Freedreno youll find a very old repo
samantas5855 said:
Freedreno is very active, it can even run Genshin on Turnip. If you google Freedreno youll find a very old repo
Click to expand...
Click to collapse
Can you guide me?..
How to build and install freedreno on termux ubuntu or Debian?
sunarowicz said:
Yeah, I already found freedreno earlier, but it did not attract my attention as it seemed to me being no longer developed. At least for OpenCL there is no commit since 2014. But I will give it a try as do not have any better option now.
Thank you for reminding me freedreno!
Click to expand...
Click to collapse
If you get success please help me..
Thank you
sunarowicz said:
I would like to use darktable photo editor in chrooted Linux deployed using the Linux Deploy on my POCO F3. Darktable already runs fine, but without the OpenCL as this is not available in the chrooted Linux out of the box. I already managed to get OpenCL available and was able to make clinfo in the Termux environment following the instructions here:
https://github.com/Oblomov/clinfo
Because, if my understanding is correct, making the clinfo is the first step in making the OpenCL available, I would like to make it in chrooted Linux environment too. But whatever I tried, it failed. I went through a ton of sources on Internet but did not find single one suitable for my case. Moreover most are many years old and not sure if still valid. Mostly for the Mali graphics too, not for Adreno...
So I tried to copy the libOpenCL.so from the /system/vendor/lib64 of the Android system tree to the /usr/lib/aarch64-linux-gnu directory of the chrooted Linux. Although the library gets recognized during making the clinfo (before copying it complained of missing library), the building process still fails. I have no ICD file in /etc/OpenCL/vendor as I didn’t find any info on what it should contain in the case of Adreno graphics. But this one is also missing in Android/Termux environment where clinfo gets compiled, so may be is not necessary.
Does anyone have any idea on how to get OpenCL available in chrooted Linux on POCO F3 or any arm64 device with the Adreno graphics? I appreciate any kicking me in the right direction.
Click to expand...
Click to collapse
Unfortunately no progress here. I did not move any further. As far as I understood the libOpenCL.so located in /system/vendor/lib64 of the Android system which is needed for OpenCL cannot be used in chrooted Linux as it has been built for Android, not for Linux. I have no idea how to overcome this.
sunarowicz said:
Unfortunately no progress here. I did not move any further. As far as I understood the libOpenCL.so located in /system/vendor/lib64 of the Android system which is needed for OpenCL cannot be used in chrooted Linux as it has been built for Android, not for Linux. I have no idea how to overcome this.
Click to expand...
Click to collapse
Actually we need to compile stock kernel fast...
But I don't know how to compile stock kernel....
I got success with cl device type cpu , because I haven't Compile yet stock kernel..
You can also ... Just try with...
Under chroot Linux...
1) apt update && apt upgrade && apt install boinc-client-opencl opencl-headers firmware-qcom-media u-boot-qcom qbzr qcomicbook clinfo -y
2) Clinfo.....
You get results...
Ssaikatsaha said:
Actually we need to compile stock kernel fast...
But I don't know how to compile stock kernel....
I got success with cl device type cpu , because I haven't Compile yet stock kernel..
You can also ... Just try with...
Under chroot Linux...
1) apt update && apt upgrade && apt install boinc-client-opencl opencl-headers firmware-qcom-media u-boot-qcom qbzr qcomicbook clinfo -y
2) Clinfo.....
You get results...
Click to expand...
Click to collapse
Why do you think we need compile stock kernel? As OpenCL is available for CPU, its availability for GPU should be matter of a driver, shouldn't it?
sunarowicz said:
Why do you think we need compile stock kernel? As OpenCL is available for CPU, its availability for GPU should be matter of a driver, shouldn't it?
Click to expand...
Click to collapse
I successfully installed OpenCL under Linux deploy (Debian-10) in android phone...but my OpenCL device CPU ....
But not my vendor platform if you have Mali GPU you can install OpenCL under Linux ...
Actually my gpu Adreno .. for Qualcomm still now not available OpenCL driver for Linux
Ssaikatsaha said:
I successfully installed OpenCL under Linux deploy (Debian-10) in android phone...but my OpenCL device CPU ....
But not my vendor platform if you have Mali GPU you can install OpenCL under Linux ...
Actually my gpu Adreno .. for Qualcomm still now not available OpenCL driver for Linux
Click to expand...
Click to collapse
Yes, my GPU is Adreno too. After many days of googling the information on web I also have understood that Mali has much better OpenCL support than Adreno. There is couple of info on the OpenCL for Adreno topic on Phoronix, but still not clear to me what is the current state and how to try to make it working. But I haven't find any mention on the need of compiling the kernel.
sunarowicz said:
Yes, my GPU is Adreno too. After many days of googling the information on web I also have understood that Mali has much better OpenCL support than Adreno. There is couple of info on the OpenCL for Adreno topic on Phoronix, but still not clear to me what is the current state and how to try to make it working. But I haven't find any mention on the need of compiling the kernel.
Click to expand...
Click to collapse
You can install...
1) apt update && apt upgrade && apt install boinc-client-opencl opencl-headers firmware-qcom-media u-boot-qcom qbzr qcomicbook clinfo -y
And check....
2) Clinfo (in your terminal...)
Ssaikatsaha said:
You can install...
1) apt update && apt upgrade && apt install boinc-client-opencl opencl-headers firmware-qcom-media u-boot-qcom qbzr qcomicbook clinfo -y
And check....
2) Clinfo (in your terminal...)
Click to expand...
Click to collapse
Sure, I already did that and got the OpenCL for CPU. But this doesn't help me much, as I need the OpenCL for GPU. I still believe we don't need to compile kernel to achieve this.
BTW: sudo apt install pocl-opencl-icd clinfo is enough to get the OpenCL for CPU.
sunarowicz said:
Sure, I already did that and got the OpenCL for CPU. But this doesn't help me much, as I need the OpenCL for GPU. I still believe we don't need to compile kernel to achieve this.
BTW: sudo apt install pocl-opencl-icd clinfo is enough to get the OpenCL for CPU.
Click to expand...
Click to collapse
If you get any solution for OpenCL gpu please help.. and I am also..
sunarowicz said:
Sure, I already did that and got the OpenCL for CPU. But this doesn't help me much, as I need the OpenCL for GPU. I still believe we don't need to compile kernel to achieve this.
BTW: sudo apt install pocl-opencl-icd clinfo is enough to get the OpenCL for CPU.
Click to expand...
Click to collapse
You can see here.. for mali..
And you can try...
OpenCL support on Debian/hikey960
32- and 64-bit ARM Open Platform Specifications. For software developers. For the maker community. For embedded OEMs. 64-bit ARM for $129.
www.96boards.org

Categories

Resources