Question OpenCL possible for chrooted Linux? - Xiaomi Poco F3 / Xiaomi Mi 11X / Redmi K40

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

Related

Linux cross-compile or ready binaries

Hi, I would put some linux binaries (arm architecture ?) on my phone to support the ADB SHELL activity, to enlarge the busybox capabilities.
For instance, I mean stuff like a bash shell, a complete gtar for backups (the busybox one isn't adeguate), md5deep, and so on.
Could you please give any hint to do that ?
Thanks
Val3r10 said:
Hi, I would put some linux binaries (arm architecture ?) on my phone to support the ADB SHELL activity, to enlarge the busybox capabilities.
For instance, I mean stuff like a bash shell, a complete gtar for backups (the busybox one isn't adeguate), md5deep, and so on.
Could you please give any hint to do that ?
Thanks
Click to expand...
Click to collapse
The first post here: http://forum.xda-developers.com/showthread.php?t=777380 contains a link that actually contains a complete binary arm cross compiler. If you use linux (works with most 32 bit distros, needs multilib on 64 bit distros) you can use that to cross compile your code to arm.
Many thanks for your answer.
I'd static link libraries, I guess...
Btw could I also use normal binaries for 32bit arm architecture ? (i.e. debian distro...)
You can also use some of the binaries of the CyanogenMod for Desire (or any other phone) and use these (bash, nano) http://androidforums.com/evo-4g-all...shell-nano-tab-completion-color-over-ssh.html
Bash 4.1 : http://android.modaco.com/content/software/301932/bash-4-1-native-app-for-android/ (not sure its the one i got but you can give it a try)
Jb boin said:
Bash 4.1 : http://android.modaco.com/content/software/301932/bash-4-1-native-app-for-android/ (not sure its the one i got but you can give it a try)
Click to expand...
Click to collapse
Many thanks.
The bash 4.1 binary could also be found in the Better Terminal Emulator package from market...
Actually I'm looking for a way to get other working stuff for low level backups, as said gtar, zip, ...

fhd kernel ( ZE551 ) & POSSIBLY hd (ZE550) with KVM & Bridge compiled. *need help*

fhd kernel ( ZE551 ) & POSSIBLY hd (ZE550) with KVM & Bridge compiled. *need help*
MODERATOR NOTICE:
All thread posted in the Development section must have a link to kernel sources to meet GPLv2 requirements. Because this thread does not have proper sources linked and because development has stopped, the thread has been closed.
This is my first time working with Android kernels, but I compiled the 2.12.40 kernel source adding in support for KVM ( Kernel supported Virtual Machines, ie running Windows almost full speed ) and Bridge ( to allow qemu-kvm to set up network adapters bridged with the current wifi adapter ).
I tar'd the bzImage & modules, but don't know what to do to make something installable/flashable so will need help on that end of things.
Edit:
I uploaded a new flashable kernel img based off 2.19. This one should support: kvm, bridge and NTFS read/ *LIMITED* write, swap and ignore kernel module signatures. XDA only allows 8mb for .img files, so I tar'd it.
Edit2:
I compiled a ZE550 kernel ( called hd ) and if some brave souls want to try it, I also put together a boot.img.
Edit3:
New fhd kernel has been compiled with additional usb modules. Kernel should now load kvm related modules automatically, so you shouldn't need to use the script anymore.
Anyone brave/crazy enough to try it out? I'm guessing you need an unlocked bootloader & root.
Edit 4:
New fhd & hd kernels for 2.20
Edit 5:
New exfat.ko module
ycavan said:
This is my first time working with Android kernels, but I compiled the 2.12.40 kernel source adding in support for KVM ( Kernel supported Virtual Machines, ie running Windows almost full speed ) and Bridge ( to allow qemu-kvm to set up network adapters bridged with the current wifi adapter ).
I tar'd the bzImage & modules, but don't know what to do to make something installable/flashable so will need help on that end of things.
Anyone brave/crazy enough to try it out? I'm guessing you need an unlocked bootloader & root.
Click to expand...
Click to collapse
Why 2.12? 2.18 kernel source is available...
That just happened to be the kernel source linked in Android development. If this test works out, I can probably do the same thing with whichever kernel source is available.
Our phones are pretty amazing to be able to compile their own kernels natively on the device.
Sent from my ASUS_Z00AD using XDA Free mobile app
Finally able to compile the 2.18 kernel.. it's a bit weird since it acted like it was missing some files. Untar'd the 2.18 kernel source over 2.12's kernel source and that allowed it compile.
Anyway, it's in the OP called fhd_kernel_20150629.tar and should have KVM ( kernel supported virtualization ), Bridge ( for Qemu-KVM to create bridging ethernet adapters ) & NTFS Read/ *LIMITED* Write.
Once again, it's in the form of bzImage and the modules since I don't know how to replace the kernel on Android devices. ( normally, I'd just make a test linux line in the boot menu for Linux )
One suggestion would be to flash the zImage using
Code:
fastboot flash zImage nameofzImage
or test it using
Code:
fastboot boot nameofzImage
but I dont know if the phone supports the "boot" command.
I´m not sure about the modules either and I can´t test it, as my phone didn´t arrive yet.
Other solution, try this:
http://forum.xda-developers.com/showthread.php?t=2670512
ycavan said:
Finally able to compile the 2.18 kernel.. it's a bit weird since it acted like it was missing some files. Untar'd the 2.18 kernel source over 2.12's kernel source and that allowed it compile.
Anyway, it's in the OP called fhd_kernel_20150629.tar and should have KVM ( kernel supported virtualization ), Bridge ( for Qemu-KVM to create bridging ethernet adapters ) & NTFS Read/Write.
Once again, it's in the form of bzImage and the modules since I don't know how to replace the kernel on Android devices. ( normally, I'd just make a test linux line in the boot menu for Linux )
Click to expand...
Click to collapse
Can I ask how you included NTFS r/w support into your kernel? Did you just set the CONFIG_NTFS_FS flag?
TheSSJ said:
Can I ask how you included NTFS r/w support into your kernel? Did you just set the CONFIG_NTFS_FS flag?
Click to expand...
Click to collapse
I added CONFIG_NTFS_FS=m ( you could set to that y ) and CONFIG_NTFS_RW=y in /{working directory}/device/asus/moorefield/fhd/mofd_fhd_diffconfig
when you make the kernel, it's going to ***** about the config files not matching; follow the directions and manually update all of the other config files and it will finally compile.
Building for Android is a pita. )
Well, then here come the disappointing news (I discovered that when I wanted to include NTFS USB-OTG support directly by the kernel for my TWRP and it didn't mount it as R/W):
CONFIG_NTFS_RW is just a partial write support. It won't create files or folders, it can only overwrite existing files and only by the size they currently have
config NTFS_RW
bool "NTFS write support"
This enables the partial, but safe, write support in the NTFS driver. The only supported operation is overwriting existing files, without changing the file length. No file or directory creation, deletion or renaming is possible. Note only non-resident files can be written to so you may find that some very small files (<500 bytes or so) cannot be written to.
Click to expand...
Click to collapse
Only possibility available is to include ntfs-3g driver using fuse
Yeah, that is a bit of a downer. Now to figure out why nobody finished the NTFS kernel module.
ycavan said:
Yeah, that is a bit of a downer. Now to figure out why nobody finished the NTFS kernel module.
Click to expand...
Click to collapse
Please keep me posted, I'd like to remove the dependency of ntfs-3g in recovery. I fear there actually is no native support of NTFS (googling was not helpful unfortunately)
1) modify module loading function to ignore module version/magic strings.
2) compile the kernel with toolchain used by ASUS (or close to it)
3) use pre-compiled tntfs.ko from original boot.img
I don't have right now the patch for module loading procedure. Need to check old Galaxy S3/S4 custom kernels source (but it's should be easy to patch by finding error string). In time when exFat module source wasn't available, this trick was very common in samsung custom kernels for exFat support.
Thanks
Wait wait wait. Did I read that correctly? Full speed windows? On the zenfone? I think I just died. Does this mean windows 8/10 or windows xp and below?
I know a bit about android kernel, and i'm thinking about buying this device. Well, i'm going to try to build a kernel for this device as soon as i got this device. One thing you should know is, android is an open-source, so before you uploading your compiled kernel, make sure you have already uploaded the sources
LUCKYSHOT52 said:
Wait wait wait. Did I read that correctly? Full speed windows? On the zenfone? I think I just died. Does this mean windows 8/10 or windows xp and below?
Click to expand...
Click to collapse
It's only in theory.
In reality, there is no Z35xx support in windows, and i doubt anyone will write drivers by himself (windows isn't opensource). Officially Z35xx is Android-only SoC.
FajarMF28 said:
I know a bit about android kernel, and i'm thinking about buying this device. Well, i'm going to try to build a kernel for this device as soon as i got this device. One thing you should know is, android is an open-source, so before you uploading your compiled kernel, make sure you have already uploaded the sources
Click to expand...
Click to collapse
The source is already available, so no worries there, since this is source that Asus released.
For all of the brave folks out there, I was finally able to create a bootable image of the latest 2.19.20 kernel. Anyone brave enough can find it in the OP.
I flashed it and my phone booted up, so that's a bonus.
ycavan said:
For all of the brave folks out there, I was finally able to create a bootable image of the latest 2.19.20 kernel. Anyone brave enough can find it in the OP.
I flashed it and my phone booted up, so that's a bonus.
Click to expand...
Click to collapse
is there extra features such as other governor or i/o scheduler?
cangcan said:
is there extra features such as other governor or i/o scheduler?
Click to expand...
Click to collapse
To be honest? I can't remember since my main focus was getting kvm compiled in.
I've attached my .config for the 20150707 build ( in the boot image ).
I've also attached a screenshot of Windoze 7 being installed.
Commandline for Arch Linux x86_64 to start qemu-kvm to install windoze:
qemu-system-x86_64 -display none -vnc :1,password -monitor stdio -m 1G -smp 4 -enable-kvm -drive file=/mnt/0/machine1.img,format=raw -cpu host -cdrom /mnt/MicroSD/Vcd/en_windows_7.iso -boot menu=on --usbdevice tablet
breakdown of the command line:
-display none = no display, I did this to test the virtual machine. normally, you would probably use -display sdl w/ XServer-XSDL running
-vnc :1,password, This says to set up a vnc server with normal port + 1 ( 5901 ) and you expect a password to be set later
-m 1G, 1 gig of ram
-smp 4, our VM will use 4 cores
-enable-kvm, enable Kernel support Virtual Machines
-drive file=/mnt/0/machine1.img,format=raw, my "disk" file
-cpu host, use the same cpu information
-cdrom /mnt/MicroSD/Vcd/en_windows_7.iso, my Windows 7 install cd turned into an iso
-boot menu=on, enable the boot menu ( hit F12, etc.. )
--usbdevice tablet, Qemu's Vnc server sucks at tracking mouse positions so using tablet mode keeps the mouse pointer .. well on-point
Tks for share
Kernel great work
But how to install window 7 ? ?
Gửi từ ASUS_Z00AD của tôi bằng cách sử dụng Tapatalk

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

How to compile the oficial OOS sourcecode?

Hi,
Since OP released the source code of the OP3 I thought I would take a shot on compiling them.
I have a lot of experience with C++ on an application level and also did some minor work with windows drivers.
But on Linux I'm still a beginner.
Since the repository OP points to (https://github.com/OnePlusOSS/android/tree/oneplus3/6.0.1) contains only a shell script I guess I can't compile it on windows, right?
So I will go for a Linux VM, what OS should I use Ubuntu 12 or 14 or may be better Debian?
Also How much power does a machine need in order to compile a android image in a reasonable time frame? My PC has a 6 core i7 @ 4GHz with 64 GB of RAM, AFAIK I can give all cores to the VM and up to 32 GB or RAM.
Giving cores is no problem, but the more RAM I give the larger all the snapshots become, so what would be a recommended amount?
Also What tools do I need? I tried to run the pull_library.sh but it threw some errors as I did not have ADB installed in the VM, so before I try and try i thought I just ask what thing I'll need to swiftly succeed with my endeavor?
Cheers
David X.
DavidXanatos said:
Hi,
Since OP released the source code of the OP3 I thought I would take a shot on compiling them.
I have a lot of experience with C++ on an application level and also did some minor work with windows drivers.
But on Linux I'm still a beginner.
Since the repository OP points to (https://github.com/OnePlusOSS/android/tree/oneplus3/6.0.1) contains only a shell script I guess I can't compile it on windows, right?
So I will go for a Linux VM, what OS should I use Ubuntu 12 or 14 or may be better Debian?
Also How much power does a machine need in order to compile a android image in a reasonable time frame? My PC has a 6 core i7 @ 4GHz with 64 GB of RAM, AFAIK I can give all cores to the VM and up to 32 GB or RAM.
Giving cores is no problem, but the more RAM I give the larger all the snapshots become, so what would be a recommended amount?
Also What tools do I need? I tried to run the pull_library.sh but it threw some errors as I did not have ADB installed in the VM, so before I try and try i thought I just ask what thing I'll need to swiftly succeed with my endeavor?
Cheers
David X.
Click to expand...
Click to collapse
Why do you not asking this in the right section?
Maybe general or Q&A
Best Regards,
Taker
What are you expecting when trying to compiling this ? It's the device tree and the kernel, not a full rom that you can install and run on your phone. Maybe you should look at how to compile a full rom like cm13. (if you want to compile something with your beast). There are plenty of tutorials.
_Man0waR_ said:
What are you expecting when trying to compiling this ? It's the device tree and the kernel, not a full rom that you can install and run on your phone. Maybe you should look at how to compile a full rom like cm13. (if you want to compile something with your beast). There are plenty of tutorials.
Click to expand...
Click to collapse
and where would I find those?
DavidXanatos said:
and where would I find those?
Click to expand...
Click to collapse
perhaps by searching? there is a whole thread about building cm13 in Guides, News and Discussion. And google should bring you many results. I know I searched when I wanted to build my first rom a couple of years ago.
DavidXanatos said:
and where would I find those?
Click to expand...
Click to collapse
Come on. There is even a thread dedicated to building cm13 for the OP3. It should help you to start. There are several useful links inside the thread too. It's almost the same for any android rom (with a few adjustments).
http://forum.xda-developers.com/oneplus-3/how-to/learning-to-build-cm13-t3406725
Feel free to ask questions there if you get stuck. It should get you busy until we have official nightlies.
Good luck ! But please don't create a new thread 'Unofficial cm13 build'. We have enough of them
DavidXanatos said:
and where would I find those?
Click to expand...
Click to collapse
You will never be able to build yourself if you ask people where to find those.
Sent from my ONEPLUS A3000 using XDA-Developers mobile app

KVM Kernel

Hello everyone.
As in subject, I'm looking for a KVM Enabled Kernel, to flash on my device.
I'm looking for:
1) File to download
2) Commands to FastBoot
3) A way to ensure it works
Thanks in advance for any help.
Bye, Ivano.
P.S.: I forgot to mention, it's a ZE551ML Z00AD
P.P.S.: Nevermind, I successfully flashed KVM on device, but I can't use it on Limbo yet (I get an error about missing modules, but they're there).
Any help greatly appreciated.
I never got limbo to work, I have exact same model you have (Z00AD) and I've got kvm working with QEMU.. Limbo doesnt detect kvm properly it doesn't see the kernel modules loaded..
Theres a few guides on here how to use QEMU but as a VERY rough idea on what you need to do is:
Install a chroot linux on the phone (I used Linux Deploy to set up Ubuntu with Xterm)
After chroot setup, install qemu-kvm with apt. And on the Android OS install aSpice client from play store
Move the install images/hdd images to the phone storage (if preinstalled os hdd with Virtualbox or something)
Launch qemu with --enable-kvm and -cpu host to get kvm working, adjust other options as needed
Sorry for such a quick write up I'm busy atm, can help more later
My problem is that gpu won't work with chroot
You wont get gpu access with chroot, some devices have GPU's that have some support but unfortunately our
specific PowerVR chips dont have support.. using QEMU with kvm will allow you to still use all other parts of your hardware, and using spice will allow the use of the QXL video driver that provides some basic acceleration in the guest.
Either that or in the chroot compile and build your own version of qemu with -virglrenderer enabled, but the virgl option is very beta and may not work
Edit: Limbo is just a front end to QEMU so you wont have any new features that qemu doesn't have.. just Limbo is a port of qemu that's stripped down to work on Android
In this case, I don't need this anymore.
Thanks for your help.
What kind of 3D software/GPU needy task are you needing? Because in theory I've read that a linux chroot may still have some graphics acceleration on android devices due to some linux device firmware has OpenGL ES support (which is what runs on android devices, a subset of standard OpenGL) but how I personally am not sure.. I know there is GL4ES that supposed to allow OpenGL calls to be converted/linked to OpenGL ES calls but you would have to compile it from source as it's aimed at arm hardware..

Categories

Resources