[MacOSX][ToolchainProject] Linaro-6.0.0 Toolchain for OSX - Android Software/Hacking General [Developers Only]

Code:
I am not sure this thread is in right place. If not, please reply here so i can move this thread to elsewhere.
THIS IS NOT ROM, THIS IS TOOLCHAIN
Introduction:
This is a "toolchain" that only for MacOSX-Android. This toolchain is based on Linaro toolchain 6.0.0, and this linaro toolchain is combined version of kernel toolchain and platform toolchain. This was built because i needed it. I have been working this for 4 months to able to build this toolchain successfully.
HOSTGCC=Linaro-4.9 Toolchain(Self-Built)
TARGETGCC=LInaro 6.0 android-eabi(combined version of arm-eabi and platform-eabi)
Any bugs, Reply with LOG.
Download:
https://github.com/KangDroid/mac-linaro-toolchain (Branch at: android-eabi-6.0)
How to use: (For only kernel)
1. Clone the repository. (I put my toolchain to /tmp.)
$ cd /tmp <-- you can choose your directory, somewhere for put toolchain. I will say this value is "toolchaindir"
$ git clone https://github.com/KangDroid/mac-linaro-toolchain.git -b android-eabi-6.0
2. GOTO KERNEL
$ cd kernel_dir
3. Apply patch to kernel
See : https://github.com/KangDroid/androi...mmit/30377f1482e877154c56f11934a47f440c5f082b
for details
4. Build:
make ARCH=arm CROSS_COMPILE=toolchaindir/bin/arm-eabi- (defconfig)
make ARCH=arm CROSS_COMPILE=toolchaindir/bin/arm-eabi- (zImage-dtb or whatever your kernel image, build)
Note:
I haven't tested building kernel/platform with this toolchain. I don't have much time to do it. Please try and report will be great!
I never tested platform with 6.0 gcc. It won't boot ROM. (I just saw from other thread, not sure)
XDA:DevDB Information
[MacOSX][ToolchainProject] Linaro-6.0.0 Toolchain for OSX, ROM for all devices (see above for details)
Contributors
Jason Hyunwoo
Source Code: https://github.com/KangDroid/mac-linaro-toolchain
Toolchain Version: 6.0.0-Experimental
Version Information
Status: Testing
Created 2015-06-14
Last Updated 2015-06-14

I'll be the first to say it, I've never heard of MacOSX-Android even after a google search. Care to explain some more?
Awesome toolchain, buddy!

berryman13 said:
I'll be the first to say it, I've never heard of MacOSX-Android even after a google search. Care to explain some more?
Awesome toolchain, buddy!
Click to expand...
Click to collapse
oh I just saw it :
Sorry that is my bad word, it means "Build android on OS X ) That's why I wrote MacOSX-Android(Host is MacOSX, target is Android.)

Related

[KERNEL] Samsung Galaxy Y (GT-S5360) make & tweak with original sources

since the kernel sources for the GT-S5360 were published by Samsung. now folks can build their own kernels and flash them.
building is supposed to work in Win and Linux, but Linux seems to be faster to do.
since even unpacking the win sources get u into trouble,
so rather download it into a mint12-debian system.
following the readme and running make in /kernel/common fails due to missing /opts/...toolchain dir
HOW TO BUILD KERNEL 2.6.35 FOR GT-S5360
1. How to Build
- get Toolchain
Visit codesourcery. com , download and install Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI.
Extract kernel source and move into the top directory.
$ cd kernel/common/
$ make bcm21553_totoro_05_defconfig
$ make
2. Output files
- Kernel : kernel/common/arch/arm/boot/zImage
3. How to make .tar binary for downloading into target.
- change current directory to kernel/common/arch/arm/boot
- type following command
$ tar cvf GT-S5360_Kernel_Gingerbread.tar zImage
Hey! Why are you not doing it?
up... can someone follow this up?
I will try it.But I dont Have the Device.I have created a tweaked Kernel for Optimus Me p350 with CPU Governers for more performance.Someone have to test the kernels.can anyone provide the link to the source
vivekkalady said:
I will try it.But I dont Have the Device.I have created a tweaked Kernel for Optimus Me p350 with CPU Governers for more performance.Someone have to test the kernels.can anyone provide the link to the source
Click to expand...
Click to collapse
please create a custom/tweaked kernel for us. we would be very greatful to you if you can do it
there are now 4+ custom rom's around. the cranium project offers a good tutorial. pls follow up there.
vivekkalady said:
I will try it.But I dont Have the Device.I have created a tweaked Kernel for Optimus Me p350 with CPU Governers for more performance.Someone have to test the kernels.can anyone provide the link to the source
Click to expand...
Click to collapse
here it is.
https://opensource.samsung.com/index.jsp;jsessionid=561ED613C70155D054F4934A262820B6

Git repository for kernel

Created a git repository for the kernel for easier collaboration in the future, plus Acer's download site is pretty slow.
Link: https://github.com/pawitp/android_kernel_acer_t30
Compiler: Use gcc 4.6 from AOSP Jellybean prebuilts
Compiling
Code:
export ARCH="arm"
export CROSS_COMPILE="/path/to/arm-eabi-4.6/bin/arm-eabi-"
make picasso_mf_defconfig
make -j4 zImage modules
Then you can flash the zImage with the extracte stock ramdisk using fastboot
Code:
fastboot flash:raw boot /path/to/zImage /path/to/ramdisk.gz
the good one
Link: https://github.com/pawitp/android_kernel_acer_t30
Thanks, I changed the url but forgot to update it.
no trouble, just to help
hope that you'll have a working tab soon, we should set-up a petition online to badger Acer to get nvflash
Is the kernel published here the same as on acer's website?
Is the one published on the acer's website the same that runs on the A700/A701 tablets now in fw 15 and 17?
Did you find what locks the system remount in the sources, or that's something acer added after they've published the sourcecode to the website?
andlommy said:
Is the kernel published here the same as on acer's website?
Is the one published on the acer's website the same that runs on the A700/A701 tablets now in fw 15 and 17?
Did you find what locks the system remount in the sources, or that's something acer added after they've published the sourcecode to the website?
Click to expand...
Click to collapse
It's the source imported from Acer's source site, with modification as seen in the git history. I'm not aware of any new kernel release from Acer. The remount block is something not present in the source (which would be a violation of GPL on Acer's part).
pawitp said:
It's the source imported from Acer's source site, with modification as seen in the git history. I'm not aware of any new kernel release from Acer. The remount block is something not present in the source (which would be a violation of GPL on Acer's part).
Click to expand...
Click to collapse
Thanks for clarification.
In this post: http://forum.xda-developers.com/showpost.php?p=31105735&postcount=5 you say there is a kernel block.
I'm determined to have root with ability to remount (for adfree to work at least)
Any ideas how to proceed?

Kernel - N7100 Compile test

Hi,
I compiled a kernel from Samsung git for my friend, but he yet to test it out.
If you have time and willing to help me please download it here
This kernel:
Just compiled with GCC EABI 4.4 (not working with GCC 4.7 maybe need patches)
Just default config, make t0_04_defconfig
that's all
To install:
Go to TWRP(or perhaps CWM)
Flash the zip (it was zipped with AnyKernelUpdater)
Regarding the sources .......
I involved three kernel projects for Nexus 4 so I'm not quite familiar with Samsung phones devel since I'm not sure whether is it OK to push back any commit to github since Samsung just provide a tarball instead of github checkout as Google Nexus devices. Logicall it's GPL so it's OK to push back to github, right?
i always says the best kernel of the community comes when the stalwarts have left :laugh:
hope this is the ONE
not a good tester but i bet the boys would be happy to:fingers-crossed:
same here.
Same here man. Having high hopes for this kernel. Looks awesome. Hoping this is the one. God bless hope this awesome kernel goes amazingly
hope you guy try it out
i'll push it into git if it was tested and no complain

[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

How To choose toolchain for kernel compilation

Hi,
I can't find useful information on this title, How to choose the best match toolchain for kernel compilation?
my kernel is this.
Another question is while android kernel compiled with clang then in what areas GCC is required.
Thanks
Compileit said:
Hi,
I can't find useful information on this title, How to choose the best match toolchain for kernel compilation?
my kernel is this.
Another question is while android kernel compiled with clang then in what areas GCC is required.
Thanks
Click to expand...
Click to collapse
clone this clang build from https://github.com/kdrag0n/proton-clang.git .it has gcc built-in and should work fine. if issues arise then that clang url will also have info on that. you might have to specify a few things though.
something like this needs to be in your path or in build script.
export CLANG_PATH=/home/the_anomalist/Toolchains/proton-clang/bin
export PATH=${CLANG_PATH}:${EXT_UTILS}:${PATH}
#export DTC_EXT=$EXT_UTILS/dtc-aosp
#export CLANG_TRIPLE=aarch64-linux-gnu-
export CROSS_COMPILE=/home/the_anomalist/Toolchains/proton-clang/aarch64-linux-android-
export CROSS_COMPILE_ARM32=/home/the_anomalist/Toolchains/proton-clang/arm-linux-gnueabi-
export LD_LIBRARY_PATH=/home/the_anomalist/Toolchains/proton-clang/lib:$LD_LIBRARY_PATH
ofc other things will be needed to work but this should help out

Categories

Resources