[DEV] Android Ports of git, openssl and curl for KBOX Environment - Miscellaneous Android Development

For native developers out there who are interested in on-device command line development, I've recently ported a number of utilities to the KBOX environment. In addition to gcc 4.8, which was done last year, the list of utilites are:
openssl
curl
git
The git port supports http/https repositories as well as git, but there is minimal perl support.
UPDATE
Python 3.4.2 has been ported to this environment. Additionally the fakechroot that this environment was built on has been updated so that it no longer throws spurious 'undefined reference to dlopen' errors when building utilities on device.
For those of you who use Terminal IDE (like me), I've also sent the developer a link to the git, curl and openssl tarballs.
Hope they're useful to someone here.
Sent from my VK810 4G using Tapatalk

Related

[Q]compiling Qt applications using prebuilt NDK toolchain

Dear all,
What would be the main problem of compiling Qt applications for android (Imagining we have root access on android) using prebuilt NDK toolchain arm-linux-androideabi-gcc, and running the executable on Android phone?
I'm awaire of Necessitas project, and how much easy the work of a developer would be using Qtcreator with Necessitas. But this would create an .apk.
What if I like to compile the code into executable and use Qt and NDK libraries?
Is it technically/practically possible?
Any hint would be appreciated.
Saeed

[Development Kit] android adt

I would like to start building the android ADT to work for the nexus 7 with the Ubuntu rom.
I have started to compile the ADT I am getting toolchain error which tomorrow I should fix with using the android ndk toolchain.
If anyone would like to help I would appreciate it I'll release the .tar.gz of the compiled ADT when I get it to compile thanks!)

[Tool]Strace using NDK

Hi all,
After a week's fight, I've managed to compile dynamically linked strace 4.6 binary (not the latest which is 4.8) using the NDK r8c. This is for people who don't want a static compiled binary or are uncomfortable with static binaries compiled with codesourcery toolchains.
There are 3 binaries, one per api level (android-8 -> 2.2 , android-9 -> 2.3, android-14 -> 4.0 ), so please download appropriately.
The source used was https://android.googlesource.com/platform/external/strace/ (Branch:master, checkout date: 2013-06-14). Modifications performed are attached alongside as strace-4.6_ndk.diff.gz
Hope this helps someone other than me as well

Help me roms developers to falcon

Good evening, I'm entering the branch of wanting to develop a custom ROM based on AOSP, estrou learning little by little, but wanted to know what is this error
pastebin.com/j0qAJyd0
My system is
14.04-03 gnome ubuntu
I installed
Java 7
python
Java Jdk
git
Libson
phablet tools
if something is missing let me know
if they can send a list of things you have to install
tell me
I thank those who help me
Did you follow this guide?
http://source.android.com/source/requirements.html
http://source.android.com/source/initializing.html
http://source.android.com/source/downloading.html
http://source.android.com/source/building.html
What is build.sh?
yes, build.sh
I could have all tools
I was missing the essential kkkk

[GCC][Toolchain] Eva GCC | Calling all kernel devs!

Introducing Eva GCC Toolchain
What is GCC?​
The GNU Compiler Collection (GCC) is an optimizing compiler produced by the GNU Project supporting various programming languages, hardware architectures and operating systems. The Free Software Foundation (FSF) distributes GCC as free software under the GNU General Public License (GNU GPL). Major corporate contributors to GCC include Red Hat, IBM, SUSE, ARM, Google and Intel. GCC is a key component of the GNU toolchain and the standard compiler for most projects related to GNU and the Linux kernel. With ~15 million lines of code in 2019, GCC is one of the biggest open source programs in existence. It has played an important role in the growth of free software, as both a tool and an example.
Source: Wikipedia
Click to expand...
Click to collapse
What is LLVM Clang?​
Clang is a compiler front end for the C, C++, Objective-C and Objective-C++ programming languages, as well as the OpenMP, OpenCL, RenderScript, CUDA and HIP frameworks. It uses the LLVM compiler infrastructure as its back end and has been part of the LLVM release cycle since LLVM 2.6.
It is designed to act as a drop-in replacement for the GNU Compiler Collection (GCC), supporting most of its compilation flags and unofficial language extensions. Its contributors include Apple, Microsoft, Google, ARM, Sony, Intel and Advanced Micro Devices (AMD). It is open-source software, with source code released under the University of Illinois/NCSA License, a permissive free software licence. Since v9.0.0, it was relicensed to the Apache License 2.0 with LLVM Exceptions.
Source: Wikipedia
Click to expand...
Click to collapse
Introduction​Android as a whole has now fully switched to LLVM Clang for both their Platform (AOSP) and Kernels. In fact Pixel Phones have been shipping with Clang built and optimised kernels since 2018! But are there any improvements with using clang over GCC. I'd say yes, because the GCC that AOSP used was ancient (GCC 4.9). Also LLVM Clang has proven to be faster in compilation than GCC. But is this speed worth the improvement in Kernels? Let's answer that question with EvaGCC Toolchain.
How is my toolchain different from Android GCC?​As I've mentioned earlier, AOSP GCC is ancient (version 4.9) in terms of the present stable GCC release (10.2.x). EvaGCC is compiled straight from the Master branch, making it a Bleeding Edge C Compiler. It is built with LTO and disabled a lot of feature bloat that are unneccesary for kernel building to yield a very small binary size. To list the features:
Bare Metal GCC (This does not depend on the standard libc)​
Built straight from the GNU GCC Master branch​
Built with LTO and O3 optimisations​
Disabled documentation (Smaller size of the toolchain)​
Disabled decimal float, libffi, libmudflap, libquadmath, libstdcxx-pch, native language support​
Statically linked GCC​
Integrated LLVM LLD (For faster linking, optional)​
Built twice weekly (Thanks to Github Actions!)​
Where can I find these toolchains?​Well you have two options, you can compile them yourself (by using my script) or you can download precompiled binaries!
To compile this toolchain by yourself (although I recommend that you use precompiled binaries, to avoid the hassle and time to compile the toolchain itself), to use my script to compile your toolchain, it has everything preconfigured for GCC setup and cloning. Although you'll have to setup your system for building GCC, you can refer to my README for system setup.
Note:
To obtain precompiled binaries (Highly recommended), head over to these links (according to your architechture and liking):
ARM Git Repository with Precompiled Binaries
ARM precompiled binaries in a compressed zip (direct download)
AARCH64 (ARM64) Git Repository with Precompiled Binaries
AARCH64 (ARM64) precompiled binaries in a compressed zip (direct download)
Note: If you're doing a git clone, use --depth=1 to avoid heavy transfers, because the repositories are bound get bigger with subsequent updates.
How do I use these toolchains for compiling my kernel​You can either append the toolchain dir into your PATH variable, or you can just pass it along with make with setting your CROSS_COMPILE argument. I usually use the latter one.
Since this is a bare metal compiler, the prefix differs from the normal AOSP or Linux GNU GCC. the prefix is:
Bash:
# Pass this to your CROSS_COMPILE argument if you have appended toolchain to your PATH
## for AARCH64 or ARM64
$ make CROSS_COMPILE=aarch64-elf- ... # "..." indicates rest of your args
## for ARM
$ make CROSS_COMPILE=arm-eabi- ...
# Passing to make when you haven't appended to PATH
## for AARCH64 or ARM64
$ make CROSS_COMPILE=<path to toolchain>/bin/aarch64-elf- ...
## for ARM
$ make CROSS_COMPILE=path to toolchain>/bin/arm-eabi- ...
Sources:
Everything here is OSS, including the script, my ci automation script.
GCC: https://gcc.gnu.org/git/?p=gcc.git or https://git.linaro.org/toolchain/gcc.git
Binutils: https://sourceware.org/git/binutils-gdb.git
GCC Build script: https://github.com/mvaisakh/gcc-build
LLVM (Used for LLD): https://github.com/llvm/llvm-project
GCC Version: 13.x
Binutils Version: 2.36.x
LLD Version: 16.x
Telegram Channel:
Eva GCC
Bleeding Edge Bare Metal GCC, primarily targeting Android kernels.
t.me
NOTE: According to SultanXDA, and I quote
GCC 10 updated its interprocedural optimizer's logic to have it make
more conservative inlining decisions, resulting in worse syscall and
hackbench performance compared to GCC 9.
Click to expand...
Click to collapse
This can be fixed with a patch that he himself provided:
gcc-inline-regressions-2.patch
GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
and if that did not work for you, try applying this patch
gcc-inline-regressions-2.patch
GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
Update 30-Jan-2021
GCC+LLD has been merged into the main branch of the build script. Now GCC+LLD would be updated twice every week (on Sundays and Thurdays). This wasn't done before as it was under testing, and so far it only fails under LTO kernel compilation (Due to lack of GCC Plugin for LLD and vice versa).
Update 07-April-2021
lld-integration trunk has been merged into gcc-master branch. For those who use LLD, should switch to gcc-master as the lld-integration branch is now deprecated and will be removed soon.
The size difference between the two isn't much (~86mb vs 125mb), so it makes sense to have a single branch for everything.
I recommend to use zipped archive toolchains or if you use git operations to clone toolchain binaries, I recommend using --depth=1 while cloning the toolchain to avoid huge binary size cloning.
Update 27-April-2021
GCC Version has been bumped to 12.x
Eva GCC now ships with
GCC: 12.x
LLD: 13.x
BinUtils: 2.36.x
Update 26-June-2021
Toolchain binaries have been stripped off of debugging and hence are much smaller than before, ~90MB shaved off!
Shallow clones shall be much faster than before!
Update 24-Nov-2021
LLD has been bumped to version 14.x
GCC is still on 12.x
Update 1-May-2022
GCC has been bumped to version 13.x
LLD is at 15.x
Pro Vaisakh
Yes yes super pro Vaisakh
Nice
It's kang time
Let me try great work
Oh pro iz here
Going to use it soon
god level pro work
Amazing job at collecting data and optimising the toolchain, looking forward to using this as default in my kernel builds!
Keep up the great work dude
great work sar, tysm!
A small update!
GCC+LLD has been merged into the main branch of the build script. Now GCC+LLD would be updated twice every week (on Sundays and Thurdays). This wasn't done before as it was under testing, and so far it only fails under LTO kernel compilation (Due to lack of GCC Plugin for LLD and vice versa).
If anyone faces any issues with the toolchain, please do let me know. I will try to investigate the issue and check accordingly if it's a toolchain issue or a kernel side issue.
Because being a cron built toolchain, it's necessary for people to report bugs as soon as possible.
I still monitor on my end, but it's always good to have a helping hand
Thanks @m_vaisakh,
Kernel 3.18.140 compiled with https://github.com/mvaisakh/gcc-arm64.git -b gcc-master works fine on Oreo. No errors thru whole process.
adeii said:
Thanks @m_vaisakh,
Kernel 3.18.140 compiled with https://github.com/mvaisakh/gcc-arm64.git -b gcc-master works fine on Oreo. No errors thru whole process.
Click to expand...
Click to collapse
How is the performance?
@nift4 also uses 3.18.140 and has it has improved everything in his case.
m_vaisakh said:
How is the performance?
@nift4 also uses 3.18.140 and has it has improved everything in his case.
Click to expand...
Click to collapse
*3.18.124 sadly
m_vaisakh said:
How is the performance?
Click to expand...
Click to collapse
Lets see what Antutu Benchmaker v8.4.5 said:
Same kernel source, same device, connected via USB, 10 minutes after boot:
With GCC 4.9: score 71192, HTML5 score: 13087
With EVA-GCC: ... 72392, HTML5: 14554 and kernel is smaller for 235520 bytes !
Update!
lld-integration trunk has been merged into gcc-master branch. For those who use LLD, should switch to gcc-master as the lld-integration branch is now deprecated and will be removed soon.
The size difference between the two isn't much (~86mb vs 125mb), so it makes sense to have a single branch for everything.
I recommend to use zipped archive toolchains or if you use git operations to clone toolchain binaries, I recommend using --depth=1 while cloning the toolchain to avoid huge binary size cloning.
Update!
GCC Version has been bumped to 12.x
Eva GCC now ships with
GCC: 12.x
LLD: 13.x
BinUtils: 2.36.x
m_vaisakh said:
Update!
GCC Version has been bumped to 12.x
Eva GCC now ships with
GCC: 12.x
LLD: 13.x
BinUtils: 2.36.x
Click to expand...
Click to collapse
Been using Eva GCC for over 3 months now and it's been very reliable

Categories

Resources