Hi,
I am a beginner in the field of kernel customization and I want to learn this.
I have a OnePlus 6T device which I have successfully rooted. I want to customize the kernel of this device.
For this I have already cloned the kernel source code from https://github.com/OnePlusOSS/androi...lus_sdm845.git
But I didn't find a good documentation for kernel customization.
I found a little info that I need a tool-chain for building the kernel source code but I don't have enough knowledge of this that
- what is the correct tool-chain for my downloaded version of kernel.
- Is android ndk include that toolchain?
- If no where can I found the tool-chain?
Please guide me to learn about this.
Any good web-link or comment can be helpful.
Best Regards,
Vatish
Vats12 said:
- what is the correct tool-chain for my downloaded version of kernel.
- Is android ndk include that toolchain?
- If no where can I found the tool-chain?
Please guide me to learn about this.
Any good web-link or comment can be helpful.
Best Regards,
Vatish
Click to expand...
Click to collapse
-I think that is more user choice...
-No, NDK has nothing to do with toolchain.
-Look for Linaro. That is a pretty popular one.
I was going to follow this tutorial by @nathanchance to brush myself back up (its been a while).
[REFERENCE] How to compile an Android kernel
I think this man knows more than most
Scott said:
-I think that is more user choice...
-No, NDK has nothing to do with toolchain.
-Look for Linaro. That is a pretty popular one.
I was going to follow this tutorial by @nathanchance to brush myself back up (its been a while).
[REFERENCE] How to compile an Android kernel
I think this man knows more than most
Click to expand...
Click to collapse
Thanks for the great link. I have read but when I went to google tool-chains link(https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/) then I was confused:
- Which branch I should clone for my device
OR
- Is it fine to continue with other step by choosing the master branch from google tool-chains?
Please provide me a little information on the tool-chain selection for the kernel.
Best Regards.
Vats12 said:
Thanks for the great link. I have read but when I went to google tool-chains link(https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/) then I was confused:
- Which branch I should clone for my device
OR
- Is it fine to continue with other step by choosing the master branch from google tool-chains?
Please provide me a little information on the tool-chain selection for the kernel.
Best Regards.
Click to expand...
Click to collapse
I am not in a position to give advise. I'm too rusty. It would be best to post the building questions in that linked thread.
Scott said:
I am not in a position to give advise. I'm too rusty. It would be best to post the building questions in that linked thread.
Click to expand...
Click to collapse
I understood that any tool-chain will work. The only thing we need to take care is the exports that we will use when compiling the kernel source.
e.g. for my arm64 bit device I have used linaro toolchain - the latest version.
and used export ARCH=arm64 && export SUBARCH=arm64 when compiling the source code.
I am able to compile it successfully but now I have to find the information about how to flash it on the device.
Following are the last lines of compilation:
```
CC drivers/media/platform/msm/broadcast/tspp.mod.o
CC drivers/media/platform/msm/dvb/adapter/mpq-adapter.mod.o
CC drivers/media/platform/msm/dvb/demux/mpq-dmx-hw-plugin.mod.o
GZIP arch/arm64/boot/Image.gz
CC drivers/soc/qcom/llcc_perfmon.mod.o
CC drivers/video/backlight/lcd.mod.o
CC net/bridge/br_netfilter.mod.o
LD [M] drivers/char/rdbg.ko
LD [M] drivers/media/platform/msm/broadcast/tspp.ko
LD [M] drivers/media/platform/msm/dvb/adapter/mpq-adapter.ko
LD [M] drivers/media/platform/msm/dvb/demux/mpq-dmx-hw-plugin.ko
LD [M] drivers/soc/qcom/llcc_perfmon.ko
LD [M] drivers/video/backlight/lcd.ko
LD [M] net/bridge/br_netfilter.ko
CAT arch/arm64/boot/Image.gz-dtb
make[1]: Leaving directory '/home/.../KernelCustomization/android_kernel_oneplus_sdm845/Out'
```
Related
Because it seems to be a often requested topic I wanted to give back my experince with compiling the in topic mentioned source code and how really value it is for anything.
I started this because I got the code for review for a intrested customer but my experince with arm and gcc is rather low. So i started reading up on the cross compiler and came accros serveral dificults with the build enviorment.
First the code seemed to be aimed to a rather old version of gcc, newer cross compiler toolchains won't compile it.
So I obtained a 2004 linux (redhat 8) which fitted best in the time mentioned in the headers source was last edited. On this system I was able to build the cross-arm toolchain like mentioned in the readmes without any problem.
With the builded toolchain I was also able to compile celp_fxp and with the make file. i mentioned that in the makefile there is a (intentionally) added error. After the last source file there was fxlp.c added which is not a file present in the tree. After removing this the .o files builded fine.
I imported the .o files produced back to windows Embended Visual C++, opened the project and started a compile like further explainedin the readme docs. Sadly I now face this error:
acb_parm.o : fatal error LNK1190: invalid fixup found, type 0x0010
It is possible this error occures from a wrong compiled gmp libary for which no build isntructions were given. If anybody has any value information on this I would greatly appriciate this. As I said earlier I had really no experince with gcc form cross arm before i started here. I always left out linux compiler of my embended world.
I am working on this now since a few days, maybe someone else got experince in this he/she wants to share. Thansk for reading.
Hello!
as the title indicates I am having trouble cross-compiling. hello world compiles perfectly but bigger programs just wont give in..
I downloaded the android source from git and compiled just the way the website (http://source.android.com/download) says you should (is there anyway to verify that its compiled correctly?)
Then I use the agcc python script(http://plausible.org/andy/agcc) for the linking but when i compile i always get trouble about it not being able to find certain defined fields or other types. So basicly i followed the second part of what this wiki says (eventough using a toolchain from codesourcery for example and cc staticly. It also fails...)
What im really asking is how and what do you guys use to cross-compile to android?
Richard_Xeli said:
Hello!
as the title indicates I am having trouble cross-compiling. hello world compiles perfectly but bigger programs just wont give in..
I downloaded the android source from git and compiled just the way the website (http://source.android.com/download) says you should (is there anyway to verify that its compiled correctly?)
Then I use the agcc python script(http://plausible.org/andy/agcc) for the linking but when i compile i always get trouble about it not being able to find certain defined fields or other types. So basicly i followed the second part of what this wiki says (eventough using a toolchain from codesourcery for example and cc staticly. It also fails...)
What im really asking is how and what do you guys use to cross-compile to android?
Click to expand...
Click to collapse
Hello,
i am having problems with the linker too! i am using the NDK (because it actually does C / C++ code) and the code compiles with very few warnings on some instructions but works well otherwise, it just WOULD NOT LINK the stuff together!! one interesting setting i noticed in some public makefiles for the NDK i noticed is that they actually set the linker to /system/bin/linker, which is obviously a file on the target device. but i don't know how it would access it? any ideas?
BTW: post your error(s) please
Try this
The system won't let me post a link (as a new user), however there is a really good tutorial on native android development and debugging using the AOSP build system. Search on Aton International Incorporated and click on blogs in the menubar. I am in no way associated with the company, just happy to finally be able to cross-compile, link and debug for android.
Maybe someone who has more posts could post a link here.
http://www.aton.com/android-native-development-using-the-android-open-source-project/
http://htc-linux.org/wiki/index.php?title=Mega
i read that the kernel is same wont that help porting andriod with respect to some drivers change!!!
no one answered
the problem is our first developer can't keep the android project...
hi
how can i debug this files and run???
currently I'm trying to cross-compile a most recent wildfire kernel I found on htc server using a configuration I personally made for our mega. The problem is there are many errors in the source code...
re.:
In my opinion we start build android from beginning. My problem is in my OS on my PC. I have Windows XP and building and modifing found only on Linux. I find this page with porting guide. It is step by step How to create boot screen, How to setup Connectivity...
source.android.com/porting/bring_up.html
On this page are programs for debug and download android source code...
Anyone write.
Move to general as not rom development
I'm using linux, this is why I want to try to cross-compile a kernel for our device, like I just said, source code has a large number of errors, I don't know why...
if you are interested, I can share the kernel configuration I made myself...
Now I install Ubuntu 10. It was compilation found in this version of Linux??? Where programs can I download? Now I have Git, Eclipse and Python 2.7. How can I install .tar packs on Ubuntu zito882000?
if you are new as a linux user it's quite difficult to explain, you need gcc plus the same programs a normal user has to compile a kernel.
The difference is in the way of compilation, a parameter that does a compilation for arm architectures....do you have some kernel compilation experience?
re.:
zito882000 said:
if you are new as a linux user it's quite difficult to explain, you need gcc plus the same programs a normal user has to compile a kernel.
The difference is in the way of compilation, a parameter that does a compilation for arm architectures....do you have some kernel compilation experience?
Click to expand...
Click to collapse
windows is gold.
with compilation i haven't any experience. I only begin in programming languages C, C++ and VB. I compile only my apps in visual studio. And i have nice experience with photoshop.
it isn't exactly the same thing, in a kernel you have a large number of drivers to compile, not a only one program...
Here cyberciti.biz/tips/compiling-linux-kernel-26.html you can find a simple guide!
The most important part is the command "make" that need some different parameters to do a cross-compilation for ARM processors ^^
thx
I saw the instructions and understand him. If I somehow help you write to my icq: 484038954 or Skype: vasek-smekal.
So far, thanks
I just bought an HTC Hero with native android.
If you want to try again I share with you my kernel configuration file and a link where you can download the kernel source I used.
(remember to rename "config.txt" in ".config" with the point and without the extension)
KERNEL SOURCE -> http://developer.htc.com/ (must choose "HTC Wildfire - Froyo - 2.6.32 kernel source code")
ARM LINUX GCC -> http://www.handhelds.org/download/projects/toolchain/archive/arm-linux-gcc-3.3.1-030820.tar.bz2
Hello everybody!
I've been thinking a while of running my own bèta channel and decided to start one.
There is something that I've wondered, how do I keep the original and bèta code seperated?
Is there a sdk for a beta channel or do I need to use a private Github repository?
If yes, can somebody please tell me how I set it up?
I've been trying and dying to get Github work with Eclipse, but it doesn't work
Thank you in advance!
Git is definitely the best way to do this, basically make a beta and release branch. Switching between the two is really easy once you have it all setup.
What are the specific problems you have been having with Git?
I got GitLab instald on a local server and I have a beta ans a master branch. The problen with git is that i know the basics, push, pull, add and commit thats is. I really don't know how to seperate the code of different versions (eg v.1 and v.2) in the same branch.
Let me give another exame the GitLab is a wonderfull project, but I can't delete a folder (all the magic happens within a webinterface), but I can delete the files one by one ... Nope takes to much time
How do I manage files trough git, from my workstation (remove directory's for example)
Is there a guide about git somewere? When i search for it on Google all i get is github results but i want git results.
Thanks for helping me out!
Appriciate it!!
Why do you need GitLab? From your requirements you just need Git client and remote repository (which can be github.com).
You might want to check Git Branching - Basic Branching and Merging.
I wanted an east to use git software. When installing GitLab the setup setups everything for you, so I don't have to run commands etc. which saves me a great amount of time.
Thanks for the link, I'll check it out later today!
I see. Basically to get started with GitHub you just need Git package (e.g. msysgit for windows).
Yeah, I got GitLab installed on a networked server.
Can you learn me a few tips 'n tricks?
Sure, you can start from here: https://help.github.com/articles/good-resources-for-learning-git-and-github/
Thanks!
Sup XDA, there is one question about porting the sailfish OS. I am guided by the official documentation, according to the latest guide on HADK - https://sailfishos.org/wp-content/u...OS-HardwareAdaptationDevelopmentKit-2.0.1.pdf
I encountered a problem with the point 7.2.1. When performing the rpm/dxd/helpers/build_packages.sh. there is installation and assembly of packages, but it breaks off when creating a middlevare, namely, the libhybris. Here is the complete log of the assembly - https://paste.debian.net/plain/997702
As I understood from the logs myself to build the libhybris, I need to use the compiler with C++11 support, but in the scratchbox2 the old version of the gcc-4.6.3 version is used, which does not understand the standart C++11. I tried to change the CFLAGS from "--std=gnu++11" to "--std=gnu++0x" , but the libhybris does not compile with the flag of the old standards.
What do you propose to do? How to update the compiler in a scratchbox2 target?
P.S. wrote it via google translate, dont be offended pls
memewarrior said:
Sup XDA, there is one question about porting the sailfish OS. I am guided by the official documentation, according to the latest guide on HADK - https://sailfishos.org/wp-content/u...OS-HardwareAdaptationDevelopmentKit-2.0.1.pdf
I encountered a problem with the point 7.2.1. When performing the rpm/dxd/helpers/build_packages.sh. there is installation and assembly of packages, but it breaks off when creating a middlevare, namely, the libhybris. Here is the complete log of the assembly - https://paste.debian.net/plain/997702
As I understood from the logs myself to build the libhybris, I need to use the compiler with C++11 support, but in the scratchbox2 the old version of the gcc-4.6.3 version is used, which does not understand the standart C++11. I tried to change the CFLAGS from "--std=gnu++11" to "--std=gnu++0x" , but the libhybris does not compile with the flag of the old standards.
What do you propose to do? How to update the compiler in a scratchbox2 target?
P.S. wrote it via google translate, dont be offended pls
Click to expand...
Click to collapse
Heyyo, the guide has a messed up sb2 section.
I can't load your Pastebin link but please check my thread here to see how I resolved the bad sb2 guide
https://together.jolla.com/question/172682/unknown-tag-systemd_requires/
Also, just in case you get stuck on 8.5 of that guide here's how I fixed that too
https://together.jolla.com/question...cregister-for-85-building-the-image-with-mic/