Linux cross-compile or ready binaries - Galaxy S I9000 Android Development

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

Related

Bash shell on hero

Is it possible (it's possible, just how) to get bash shell running on Hero? I kinda like it because i use it on my desktop Linux and I would like to run it on my hero also (better options/features than sh).
Regards
found a possible solution:
http://www.kbrandt.com/2009/06/how-to-cross-compile-the-bash-shell-for-android-15.html
I'll try it tomorrow and (or if anyone else does) upload the binaries if I succeed.
LP
B
oblika said:
Is it possible (it's possible, just how) to get bash shell running on Hero? I kinda like it because i use it on my desktop Linux and I would like to run it on my hero also (better options/features than sh).
Regards
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=537827&highlight=bash
thank you
LP
B

[KITCHEN] Minimal kernel building VM with scripts

I added some convenience scripts to the config. Read the new tutorial here
The old one still works:
I put together a small virtualbox vm with a very minimal debian config with which I was able to compile a working kernel. This is for all the people who are running Windows, and want to try modifying kernels/initramfs's. As this is a minimal config there are some drawbacks (like it doesn't have a graphical interface), but you can always install additional packages, if you want to.
The VM includes: debian, build essentials, git, vb guest additions, mc, vim and codesourcery 2010q1 gnu-eabi. (it's larger than the simple eabi version, but can be used to compile non-kernel applications too)
First of all I hate both SunOracle VirtualBox and debian, but VB is free, and debian is lean, so they'll do the job.
To get the image running do the following:
First download and install VirtualBox
Next download the VM image: http://android.sztupy.hu/dl/KernelCompilerVM-1.1.7z and extract it. (it's a large download. If you can please put it up a mirror)
Mirrors: (thanks to the people mirroring it)
- http://www.multiupload.com/THJV19BJ9X
- http://bote.ro/sztupy/KernelCompilerVM-1.1.7z
After this run virtualbox, and import this VM.
Run the VM. The username/passwords are: root/root and kernel/kernel. Login with kernel. (you can always switch to root using sudo)
Next choose what kernel/initramfs you want to compile.
Here are some links to kernels:
The original sources can be found at supercurio's git:
Code:
git://github.com/project-voodoo/linux_gt-i9000.git
froyo-samsung branch
The kernel of the voodoo project can be found at the same place:
Code:
git://github.com/project-voodoo/linux_gt-i9000.git
froyo-voodoo branch
The ULTK kernel can be found at my account:
Code:
git://github.com/sztupy/universal_lagfix_kernel.git
Here are some links to initramfs files:
The original froyo initramfs can be found at supercurio's git page:
Code:
http://github.com/project-voodoo/samsung_ramdisks.git
afaik the voodoo initramfs is build using scripts from these images, so you have to apply them.
The ULTK initramfs can be found here:
Code:
git://github.com/sztupy/universal_lagfix_kernel_initramfs.git
For the rest of the tutorial I'll be showing how to compile ULTK:
First get the kernel sources using git:
Code:
git clone git://github.com/sztupy/universal_lagfix_kernel.git kernel
Unfortunately no copy-paste function is available, so you have to write this manually...
Next get the initramfs using git:
Code:
git clone git://github.com/sztupy/universal_lagfix_kernel_initramfs.git initramfs
If everything goes well you'll have two directoryes, called kernel and initramfs. Next we have to modify some values in the kernel configs.
Nano, mcedit and vim are installed, use the one that suits you best. (mcedit is the most user friendly)
Switch to the kernel directory and edit the Makefile there:
Code:
cd kernel
nano Makefile
Find the row that says
Code:
CROSS_COMPILE ?= some value
Replace it to
Code:
CROSS_COMPILE ?= /home/kernel/arm-2010q1/bin/arm-none-linux-gnueabi-
(if using nano make sure it won't add a line break into the row)
Next load the default config:
Code:
make aries_eur_defconfig
And edit it:
Code:
nano .config
We have to supply the directory of the initramfs. Search for the line:
Code:
CONFIG_INITRAMFS_SOURCE=some value
and replace it to
Code:
CONFIG_INITRAMFS_SOURCE=/home/kernel/initramfs/out
(this is for the ULTK. For voodoo the initramfs locations are "froyo-xxjp6" and "froyo-xxjpm" instead of "out")
if you've managed to do that too, let's compile the kernel:
Code:
make
If everything goes fine after a while you will have your shiny new kernel. Now let's get it to your computer, so it can be flashed:
First, you have to create a shared folder in VirtualBox. Simply create a directory somewhere on your computer, and add it as a shared folder in virtualbox. The name of the shared folder should be simple, for example "shr".
Next, you have to mount that directory inside the VM. To do this enter:
Code:
sudo mount -t vboxsf shr ~/share
After it has been mounted you can copy the fresh kernel to your host OS:
Code:
cp arch/arm/boot/zImage ~/share
If everything goes well you have a zImage ready at the folder you've just shared. TAR it, fire up odin, and flash.
---------------------------------
Now that you've succesfully compiled a working kernel try to modify it. You can use "make menuconfig" in the kernel directory to switch some kernel functions (like filesystem supports) on and off. You can edit .config by hand to add or remove some configuration values. And you can edit the files in the initramfs directory. After modifications you only have to enter "make" in the kernel directory to get your kernel inside the "arch/arm/boot/zImage" dir ready.
You can also copy files from your host OS, to the guest OS, by putting the file inside the shared folder and copying it:
Code:
cp ~/share/thefile ~/initramfs/copyithere
Hope this guide was useful.
Impressive, thanks. Even a noob like me can try this.
Oh god, not only a talented developer, but a community helper!
STICKY!!
Gonna try it laters <3
oh yea, nice!
DocRambone said:
Impressive, thanks. Even a noob like me can try this.
Click to expand...
Click to collapse
If you're a noob, then I'm a baby
Darkyy said:
If you're a noob, then I'm a baby
Click to expand...
Click to collapse
high time you start compiling kernels
tnx
its very usefull
Magnificent!
I just came to take a quick look, but the thread deserves a closer one.
Thank you for sharing knowledge.
Worthy of a sticky.
Hopefully this will solve all those "I want this in a kernel but not that" scenarios.
This is VERY nice for the devs.. but.. i think this will make this forum spammed with 69 diff kernels with just minor changes.. as with the roms
Its better to let other people brick their phone than you brick your own
Just kidding! I for one will try and compile different versions with different lag-schemes to find the fastest combination. Including /system with fastest reading. I think I will add a benchmark to the recovery menu directly. Benchmarking each mount for read and for write speeds. Maybe I can use backup/restore code and just time it without writing (cp to null). Lets get to work
Thanks sztupy!
Sent from my GT-I9000 using XDA App
_JKay_ said:
Its better to let other people brick their phone than you brick your own
Just kidding! I for one will try and compile different versions with different lag-schemes to find the fastest combination. Including /system with fastest reading. I think I will add a benchmark to the recovery menu directly. Benchmarking each mount for read and for write speeds. Maybe I can use backup/restore code and just time it without writing (cp to null). Lets get to work
Thanks sztupy!
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
You cannot brick your phone with a bad kernel
@sztupy
I am impressed how productive master mind and kind person you are sharing all your knowledge and developments with us.
Congratulation, with you contributions you push Android Development forward.
Thank you
this is really cool, if i need minimal GUI, what would you suggest? xfce ? or there is something smaller and lighter? thx again.
avary said:
this is really cool, if i need minimal GUI, what would you suggest? xfce ? or there is something smaller and lighter? thx again.
Click to expand...
Click to collapse
Fluxbox/Openbox. However I don't see the need for one, if you're running the machine just for compiling.
Also, shouldn't gpm+guest additions solve the copy-paste problem?
E: Apparently not. Meh, stupid virtualbox.. sshd+putty then!
Awesome! Thanks for this sztupy! The more people we can get involved in this stuff, the better the end result will be. Always!
aziztcf said:
Fluxbox/Openbox. However I don't see the need for one, if you're running the machine just for compiling.
Also, shouldn't gpm+guest additions solve the copy-paste problem?
E: Apparently not. Meh, stupid virtualbox.. sshd+putty then!
Click to expand...
Click to collapse
actullay i was looking for something light and minimal (with GUI, or at least something like PCman FM and gedit or kedit, im not good with emac, vi ) to play and compile AOSP, for now i do this with Kubuntu dual boot on my laptop. if i put a litghweight desktop on top of szytup's image and use it with VB, that would be great.
thank you !
avary said:
actullay i was looking for something light and minimal (with GUI, or at least something like PCman FM and gedit or kedit, im not good with emac, vi ) to play and compile AOSP, for now i do this with Kubuntu dual boot on my laptop. if i put a litghweight desktop on top of szytup's image and use it with VB, that would be great.
thank you !
Click to expand...
Click to collapse
I'd use a shared folder+IDE/editor/whatever on windows. But that's just because I have so awful experiences about X in VMs, things might be better nowadays
Thanks a lot sztupy, will try it now. Sunday is enough time for testing
Each morning i have a look at XDA and you have brought out a new very helpfully posting, kernel, rom or else!
So let me ask you one question: when do YOU sleep?
avary said:
actullay i was looking for something light and minimal (with GUI, or at least something like PCman FM and gedit or kedit, im not good with emac, vi ) to play and compile AOSP, for now i do this with Kubuntu dual boot on my laptop. if i put a litghweight desktop on top of szytup's image and use it with VB, that would be great.
thank you !
Click to expand...
Click to collapse
The advantage of using X is that afaik guest additions has copy-paste support, that would make modifying easier.
I also plan on making some simple scripts inside the default home directory one can run to communicate with the shared folder. After that we could provide simple scripts that you only have to put inside the shared folder, which will download, modify and run the compilation.

Porting C/C++ Linux apps via python binding?

First of all let me start off by admitting that I am crazy and a noob programmer so maybe I don't understand the problem and am asking a rediculus question.
I was wondering if there was any way of converting C/C++ source into python that could be run on Android. Mostly command line stuff that would be done over adb or maybe even the terminal. I have got the python interpreter google provides running on the command line, I can access it from adb, terminal IDE, Terminal emulator, it seems everywhere, I moved the files into my /system directorys and add PYTHONHOME and ""PATH to my bashrc and mkshrc files located in the "/system/etc" section and now I can call them from those shells. For instance I can call "bash" and get bash, or/and I can call "python" to get python2.6 ( I have no idea how to implement the "Alternative" method of linking executables like in debian on android so it just has to be thought out, i tested with 2.6)
So with that all being said, if the C/C++ bindins for python ( I don't really even know how those work) were ported to android would we be able to use that to port C source?
And a second question. Does the python interpreter googlecode offers run on top of the Delvik VM?
Sounds pretty complicated and interesting, seen a lot of crazy things happen here over the years so I wouldn't say anything is impossible lol I recommend you ask this in the Q&A section though. Or maybe the Android Development and Hacking section, there's a lot of talented programmers over there as well.
Sent from my SPH-L710 using Tapatalk 4 Beta
To answer the question you asked: no, that's not a reasonable endeavor.
To answer the one you didn't: it's actually not hard to build most console programs from source to run on Android. You should be able to grab yourself a cross-compiler toolchain, and build the programs yourself. If you're running Linux on your computer, most distros have a tool to build such toolchains, or you can use e.g. MinGW and a Windows toolchain (Linaro might have one) to compile. In general './configure --host arm-linux-androideabi' should set everything up for you.
Obviously, there is a learning curve to building like this, but it's certainly not impossible to do.
Sent from my SPH-L710 using xda app-developers app
decimalman said:
To answer the question you asked: no, that's not a reasonable endeavor.
To answer the one you didn't: it's actually not hard to build most console programs from source to run on Android. You should be able to grab yourself a cross-compiler toolchain, and build the programs yourself. If you're running Linux on your computer, most distros have a tool to build such toolchains, or you can use e.g. MinGW and a Windows toolchain (Linaro might have one) to compile. In general './configure --host arm-linux-androideabi' should set everything up for you.
Obviously, there is a learning curve to building like this, but it's certainly not impossible to do.
Sent from my SPH-L710 using xda app-developers app
Click to expand...
Click to collapse
Right on, I just started reading the Linux From Scratch book and it has helped me understand the process behind it all a bit, I still need to finish reading the book and build my own Linux system for the my laptop first as that is what they are talking about.
I actually just got msfconsole or Metasploit running on Android, I ran started it up from ADB. I posted another thread about it with more detail.
I am just mounting the filesystems from the kali.img file that I made a few days ago, I basically just did a reverse chroot and brought those directories into Android's "/" directory and then exported the path variables that you normaly would but since I didn't change root and all the apropriate directories where in their proper place it ran.
My next step is to obtain a method for building the Kali Linux for arm system on a ROM, probably a blend of Cyanogenmod and Kali Linux core or rather just the command line programs. I am assuming that once the tools are available to the Android system folks could build gui's that call those programs and return their values and then bundle it in an apk for installation across devices running the modified ROM.
My end goal is basically a version of the Kali Linux distro that runs Android as its "desktop" instead of kde gnome pxe or some of the others. Then hopefully, maybe, if its deemed worthy, a specialized repository can be maintained for this version of the distro that wouldn't include any of the original gui programs for normal Linux Desktops, but only specialized apk's (instead of .deb or .rpm) that install gui's for android.
Thats what I would like to see, a Super Droid.
Please read forum rules before posting
Questions and Help issues go in Q&A and Help section
Thread moved'
Thanks
FNM

[Q] Working & stable SSHD/sftpd for ZE55xML ?

Apologize for possible OT, but I can't find an always working (and stable) SSH daemon app for the Zenfone2's Lollipop
This is what I tried, any of them PAID apps:
QuickSSHd - too old, not even starts
SSHDroid Pro - sometime starts, only first time after reboot, but only without root and higher ports (>1024)
RRooted SSH/SFTP Daemon - always refusing connections
Ssh Server Pro (olive tree) - seems promising, but very poor of binaries
The Dropbear service hanging issue seems the root of this problem
Thanks for any hint
I can't even find a proper ssh binary. I just tried sshd from an x86 cyanogen port (RAZRi, I think). Got this after loading appropriate library in lib (same as client)
1|[email protected]:/ # sshd
CANNOT LINK EXECUTABLE: could not load library "libssh.so" needed by "sshd"; caused by cannot locate symbol "EVP_ripemd160" referenced by "libssh.so"...
Good luck sir
Blades said:
I can't even find a proper ssh binary. I just tried sshd from an x86 cyanogen port (RAZRi, I think). Got this after loading appropriate library in lib (same as client)
1|[email protected]:/ # sshd
CANNOT LINK EXECUTABLE: could not load library "libssh.so" needed by "sshd"; caused by cannot locate symbol "EVP_ripemd160" referenced by "libssh.so"...
Good luck sir
Click to expand...
Click to collapse
Hi,
I followed the following guide which you can get from googling "Compiling-Dropbear-for-a-Nexus-7-tablet". Sorry, I can't post any links yet as my post counts are still below 10
The difference with the info from the website above is that we don't need to cross compile if you're compiling in a Linux x86-64 system. Just need to make a static binary.
Let me know if you have any questions and I'll try to help out.
Cheers.
wolfdude said:
The difference with the info from the website above is that we don't need to cross compile if you're compiling in a Linux x86-64 system. Just need to make a static binary.
Let me know if you have any questions and I'll try to help out.
Click to expand...
Click to collapse
Thanks for your answer.
Sorry but I can't get the exact entry-point, bypassing all the NDK / X-compiling stuff, as we're on a x86_64 architecture
Referring to the "simplified" version of your link (here: https://nerdoftheherd.com/articles/cross-compiling-dropbear-rsync-android/ ),
how should I compile the Dropbear source ?
Something like this ?
Code:
./configure \
--disable-zlib --disable-largefile --disable-loginfunc --disable-shadow --disable-utmp --disable-utmpx --disable-wtmp \
--disable-wtmpx --disable-pututline --disable-pututxline --disable-lastlog \
CFLAGS='-Os -W -Wall -fPIE' LDFLAGS='[COLOR="Red"]-static[/COLOR] -fPIE -pie'
... right before make-ing ?
Thanks for any further hint in the right direction
Hi,
I didn't refer to that site you have posted BUT that site does have a link at the bottom to the site where I followed.
From that site, what I did was :-
1) Download dropbear v58 (dropbear-2013.58.tar.bz2). I know this is older but the patch available is based on this version.
2) Download patch (dropbear-patch2) from that site.
3) Apply patch to the original dropbear (v58) source.
4) Run configure :-
./configure --disable-zlib --disable-largefile --disable-loginfunc \
--disable-shadow --disable-utmp --disable-utmpx --disable-wtmp \
--disable-wtmpx --disable-pututline --disable-pututxline --disable-lastlog
5) Run make :-
STATIC=1 MULTI=1 SCPPROGRESS=0 PROGRAMS="dropbear dropbearkey scp dbclient" make strip
6) You should end up with "dropbearmulti" which is a static binary that you can then copy over the the phone & go on from there.
There are some issues with that version of the code (v58+patch). Namely the "scp" doesn't work (but I have found the offending code in scp.c and found a workaround).
Let me know if you need more details. If I have some time, I might look at getting the latest dropbear version & working out a patch for it to get it to work on android x86.
Cheers.
wolfdude said:
Hi,
I didn't refer to that site you have posted BUT that site does have a link at the bottom to the site where I followed.
[...]
There are some issues with that version of the code (v58+patch). Namely the "scp" doesn't work (but I have found the offending code in scp.c and found a workaround).
Let me know if you need more details. If I have some time, I might look at getting the latest dropbear version & working out a patch for it to get it to work on android x86.
Cheers.
Click to expand...
Click to collapse
Yes of course. The main link you weren't able to post is:
http://blog.xulforum.org/index.php?post/2013/12/19/Compiling-Dropbear-for-a-Nexus-7-tablet
Actually that procedure seemed too complex as mostly dealing with the cross-compiling issue, which didn't apply to x86 case.
So I named the derivative one
Thanks for pointing out the static compiling is done within MAKE and not CONFIGURE phase... I'm quite newbie in those flags so I do appreciate any of your words
About issues, what about using the latest v67 for Dropbear sources ? (see here)
If the patch doesn't work for such different version, I guessed commenting out the interactive password line would be enough
I'm trying to compile it this way and - for instance - replace the binaries in one of the SSHD packages I named in the OP...
Thank you again for your time
Val3r10 said:
About issues, what about using the latest v67 for Dropbear sources ? (see here)
If the patch doesn't work for such different version, I guessed commenting out the interactive password line would be enough
I'm trying to compile it this way and - for instance - replace the binaries in one of the SSHD packages I named in the OP...
Thank you again for your time
Click to expand...
Click to collapse
Hi,
Yes, the patch for v58 does not work for v67. I think one just have to go through the patch and "adjust" it slightly for the newer v67. Hopefully there isn't much changes from v58 to v67. There may be more than just commenting out the password prompt as there are certain functions that don't work in Android as in *NIX. When I have some time, I will attempt to patch v67 meanwhile, I'm running v58 fine on my ZE550ML so no complains there.
Cheers.
Hi,
I've created a guide on compiling the latest dropbear (2015.67) :-
http://forum.xda-developers.com/zenfone2/general/compiling-dropbear-2015-67-zenfone-2-t3142222
Hope it helps.
Cheers.
wolfdude said:
I've created a guide on compiling the latest dropbear (2015.67)
Click to expand...
Click to collapse
Thanks a lot.
Do you think the same process (STATIC build, of course, not patching) could be likely used for other small binaries too ?
Val3r10 said:
Thanks a lot.
Do you think the same process (STATIC build, of course, not patching) could be likely used for other small binaries too ?
Click to expand...
Click to collapse
Of course. I've managed to compile tcpdump, iperf, gdbserver, etc... successfully and working fine on the Zenfone 2.
Cheers.
I found that "Servers Ultimate" SSH/SFTP modules work on the Zenfone2 once properly configured. Its not working 100% but its already more then most solutions out there.

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