almost compiled but one error????
make[1]: Nothing to be done for 'dtbs'
any solution...
and
zImage is not there. only "Image" and "Image.gz" present there
is "Image" is zImage? how to check that??
Thank you..
kernel source - Xiaomi mi4i official source
toolchain- NDK version 4.9
Ubuntu 64 bit?
[email protected] said:
OP
Click to expand...
Click to collapse
Change module to be y at defconfig
Also image it's the kernel
Image vs zImage ... You can google it
Also ,micode source code it's full of bugs
faizauthar12 said:
Change module to be y at defconfig
Also image it's the kernel
Image vs zImage ... You can google it
Also ,micode source code it's full of bugs
Click to expand...
Click to collapse
Yeah what he said. Checkout these repos if you need to compile a kernel:
http://gitlab.com/webhaikal/SenseiFerrari
http://github.com/Ferrari-Dev-Team/android_kernel_xiaomi_ferrari
haikalizz said:
Yeah what he said. Checkout these repos if you need to compile a kernel:
[url]http://gitlab.com/webhaikal/SenseiFerrari[/URL]
[url]http://github.com/Ferrari-Dev-Team/android_kernel_xiaomi_ferrari[/URL]
Click to expand...
Click to collapse
yeah i gone through your sensie kernel repo and found that i have to use dtbToolCM to make boot.img so i did it and stuck here...
DTB combiner:
Input directory: '/home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/boot/dts/'
Output file: '/home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/boot/dt.img'
Searching subdir: /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/boot/dts/include/ ...
=> Found 0 unique DTB(s)
as i have read various threads but can not able to fix this. i have used dtbToolCm and dtbtool (version -3 and -2) also same result..
Really i should had not start making my first kernel with MI...
or it will make me learn more and more..
hahahaha:silly:
the easy steps to make a new kernel
use the entirely CM source code
then just type "make bootimage"
Related
For everyone who has knowledge in building kernels
we try to build kernel version 3.6.11 for our device using this source
we need to setup repo on github
can anyone download this source then push it to github so we can all work on it
thanks
Already tried it. The problem are the proprietary LinuStoreIII drivers.
MarcoToo said:
Already tried it. The problem are the proprietary LinuStoreIII drivers.
Click to expand...
Click to collapse
But Maroc-OS did it , Workaround ?
Might have modded the module API or sth. On a 'normal' compilation Linux ver and toolchain have to match
via XDApp
Is this kernel for something like jb or ics???
rather try to compile 2.6.35.14
Mohamed.Anwar said:
For everyone who has knowledge in building kernels
we try to build kernel version 3.6.11 for our device using this source
we need to setup repo on github
can anyone download this source then push it to github so we can all work on it
thanks
Click to expand...
Click to collapse
i downloaded it i am creating now a repo to upload it i think it will be uploaded in like 10-20 mins
GB is specified working with v2.6 kernel. I wonder if you'll succed. compared to v3.2 our kernel structure is a lot different. someone have tried to use v2.7 source code in the past but it didn't boot on GB rom.
You all don't understand
I can't do it my self as I'm a noob
I created this thread to make you build this kernel
I mean I'm 100% sure it's possible
i start uploading the files to my github
https://github.com/cosminx13/sgy_3.6.11_kernel_source
it will take some yime to add all the files because github client crash if there are over 15000 files in a sync
hi guys !
its is really hard ..
a lot of devs exp on world try and no sucess...
btw source of rasperry no is good for start on my opnion !
for port 3.x kernel will need know alls drivers useds on gy and need for backports a lot .... lol
would be more useful to try porting 2.6 kernel more current!
btw I updated in 1.3.3 kernel 2.6.35.14 the source for about 30%
but after that I completely corrupted the source! hehe
sorry my bad english !
finished uploading source to github please pm me your names to add you to the callaborators
Only little fix to patch from 2.6.35.7 to 2.6.35.14 but for 3.x.x its change lot kernel structur so goodluck guys..
Ps. Thanks whiteXP for.. u know..
ok i want to add my own kernel source into my aokp source, how would i edit the manifest.xml file to stop getting the kernel source form CM's kernel tree, and instead use my source like so: https://github.com/azoller1/android_kernel_asus_grouper
would i have to create a local_manifest?
azoller1 said:
ok i want to add my own kernel source into my aokp source, how would i edit the manifest.xml file to stop getting the kernel source form CM's kernel tree, and instead use my source like so: https://github.com/azoller1/android_kernel_asus_grouper
would i have to create a local_manifest?
Click to expand...
Click to collapse
You will have to create a local manifest and then remove the project.. And add your own. I don't think this question belongs here. I think you can post either in the Q and As / some help thread or try and check out this thread. Hope this helps.
i just clone mine manually into kernel/asus/, calling it somn different and edit the device/asus/grouper/BoardConfigCommon.mk to
`...
TARGET_KERNEL_CONFIG := oxydo_defconfig
TARGET_KERNEL_SOURCE := kernel/asus/oxydo
...`
ofc some kernels require different toolchains, but that's a different question
Sent from my Nexus 7
Hi all,
Following advices from the site I successfully compiled a custom kernel from sources, rebuilt boot.img and the ramdisk and flashed it on my S3: it works.
Now I want incrementally upgrade the Linux part using git and the sources at kernel.org, let say to patch the kernel on the disk with the linux online versions 3.0.50, 3.0.51 and so on up to the latest 3.0.100. Never used git before unfortunately
Can someone please point me to an example of the correct command-line to do that? From then on I'll sort the rest by myself, I promise, that would save me a lot of time and unnecessary troubles. Thank you very much.
PU
Look up "git-cherry-pick".
reS28raM said:
Hi all,
Following advices from the site I successfully compiled a custom kernel from sources, rebuilt boot.img and the ramdisk and flashed it on my S3: it works.
Now I want incrementally upgrade the Linux part using git and the sources at kernel.org, let say to patch the kernel on the disk with the linux online versions 3.0.50, 3.0.51 and so on up to the latest 3.0.100. Never used git before unfortunately
Can someone please point me to an example of the correct command-line to do that? From then on I'll sort the rest by myself, I promise, that would save me a lot of time and unnecessary troubles. Thank you very much.
PU
Click to expand...
Click to collapse
Look up "git merge". Also you have to add the tree from kernel.org.
Mine looks like such.
git merge linux/linux-3.4.y
CNexus said:
Look up "git-cherry-pick".
Click to expand...
Click to collapse
Hi mate, I am using your tools to build the images, thanks for that. I'll do
PwnCakes193 said:
Look up "git merge". Also you have to add the tree from kernel.org.
Mine looks like such.
git merge linux/linux-3.4.y
Click to expand...
Click to collapse
Thanks, I'll investigate both of your suggestions! Today it'll be a busy day.
reS28raM said:
Hi mate, I am using your tools to build the images, thanks for that. I'll do that
Thanks, I'll investigate both of your suggestions! Today it'll be a busy day.
Click to expand...
Click to collapse
No problem
You'll probably go with the suggestion after mine, git-cherry-pick is more to add one or a couple commits, rather than a whole mass of commits
Git-merge is for adding larger chunks of commits/merging branches, etc
Introduction
Hello all, I am bringing you this thread as a jumping off point to compiling kernels and working with upstream Linux. I will include a guide, some links, and some terms that will help you get started with modifying kernel source. This is also a good reference point for existing developers as I have consolidated all upstream patches into one repo. Let's get down into it!
What in the world is upstream Linux?
When an OEM sets up a device, they will pick a stable longterm branch from the Linux kernel to base their modifications around (drivers and such). In the case of Bullhead, they picked 3.10.73. Currently, the Linux kernel's 3.10 is updated to 3.10.105, as you can see on kernel.org. This means that Google is "missing" versions 3.10.74 to 3.10.105. Now, why does this matter? Well, the way that the Linux kernel runs its stable branches, the only things that get merged into there are bug fixes and security updates. That's it, there are no wonky features or unstable patches. The only way you get a patch into a stable branch is by having it be in the mainline branch first. Some developers have an aversion to adding upstream because they claim it is excessive and not necessary and they are partially right since not all the patches that come in are relevant to our architecture (arm64). However, upstream Linux is not unstable and by adding each version one at a time, you can verify this. I found only two patches between 3.10.73 and 3.10.105 that gave me issues and it is easy enough to either fix/revert them. Being up to date is good since you keep yourself protected from bugs and security issues that crop up. Google has been better about doing this lately with their monthly security updates but it never hurts to take matters into your own hands.
I suggest watching one of these talks given by Greg Kroah-Hartman, it is really interesting to see how the process goes:
https://www.youtube.com/watch?v=SPY0LyTU53w | https://www.youtube.com/watch?v=L2SED6sewRw
What did you do?
All I did was fetch the latest kernel.org patches from here and cherry pick them on top of the latest kernel source from Google.
I merge these patches by cherry-picking each version individually (3.10.73 to 3.10.74, 3.10.74 to 3.10.75, etc), that way I can verify that the kernel compiles fine and that there are no merge conflicts. Google will sometimes pick certain commits from upstream that are of a higher importance than others which can result in conflicts if you try to pick it again. Additionally, upstream might fix a bug one way and Google has done it another (which is not really good, Google should be pushing their fixes back to upstream so everything stays in sync).
What do I do with this?
I have created two repos below: one with the latest N security update branch with the latest upstream patches picked up on top of it (the bullhead-upstream branch) and another one with a plain AnyKernel source for you to modify (bullhead-stock is the most basic, bullhead-decrypt contains an fstab file that will disable both forced encryption and dm-verity). You are free to fork these or base other branches on them, that's the whole point of this post. I have verified that all the patches contain no major detectable issues. I would like some credit if you do use it but it's not required since the kernel is licensed under GPL Another reason I offer this is I have seen a lot of developers picking in upstream in patch sets, so you get one single commit for an upstream version. This is detrimental as you start to add your own patches as you cannot fully tell what was modified and for what reason without the individual commits. It might look cleaner but you don't get full history which hurts you in the long run.
Links
Kernel source: https://github.com/nathanchance/bullhead/tree/upstream-7.1.2
AnyKernel source: https://github.com/nathanchance/AnyKernel2/tree/bullhead-stock-decrypt
Toolchain source: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/
How to compile
This will be a quick, step by step guide on how to compile this kernel from source. By using this process, you can start to make modifications to the kernel source and make a flashable zip.
Clone the kernel source, the AnyKernel source, and toolchain source
Code:
cd ~
mkdir Kernel && cd Kernel
git clone https://github.com/nathanchance/bullhead.git source
git clone https://github.com/nathanchance/AnyKernel2.git anykernel
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 AOSP-4.9
Explanation:
First command: make sure you are in your home directory (or whatever directory you want to hold the kernel folder we are about to make.
Second command: make a Kernel folder and move into it
Third command: clone the kernel source from my repo into a folder named source
Fourth command: clone the AnyKernel source from my repo into a folder named anykernel
Fifth command: clone the Google 4.9 toolchain into a folder named AOSP-4.9
AnyKernel is the name of the zip we are going to make which allows the kernel to be flashed over any ROM.
A toolchain is a set of compiler tools that allow us to compile the kernel on any computer architecture.
Make sure you are on the correct branches
Code:
cd source && git checkout upstream-7.1.2
cd ../anykernel && git checkout bullhead-stock-decrypt
Explanation:
First command: move into the source directory and checkout the branch "upstream-7.1.2", which has all of the necessary patches in it.
Second command: move into the AnyKernel directory and checkout the branch "bullhead-decrypt". If you don't want to disable forced encryption, use the "bullhead-stock" branch.
Tell the compiler what you are are compiling
Code:
export CROSS_COMPILE=${HOME}/Kernel/AOSP-4.9/bin/aarch64-linux-android-
export ARCH=arm64 && export SUBARCH=arm64
make clean && make mrproper
make bullhead_defconfig
Explanation:
First command: point the compiler to the location of your toolchain. If you have done anything different with the folder locations, you will need to modify the "${HOME}/Kernel/AOSP-4.9" part.
Second command: tell the compiler which architecture we are compiling for. In this case, our device is an arm64 device.
Third command: clean out any compiled files and remove our previous defconfig.
Fourth command: tell the compiler which options we want in the kernel using the bullhead_defconfig.
A defconfig is a file that will tell the compiler which features we want in the kernel. No computer ever uses all of the options in the kernel since there are different drivers for various devices.
Make the kernel!
Code:
make -j$(nproc --all)
Explanation:
make tells the compiler to make the kernel (duh) and the -j$(nproc --all) tells the compiler to use the maximum number of cores your computer has available
Make the AnyKernel zip
Code:
cp -v arch/arm64/boot/Image.gz-dtb ../anykernel/zImage-dtb
cd ../anykernel
zip -r9 stock-upstream.zip * -x README stock-upstream.zip
Explanation:
First command: copies the completed kernel (Image.gz-dtb) into the AnyKernel folder
Second command: moves us into the AnyKernel folder
Third command: makes the zip file (named stock-upstream.zip) in the AnyKernel folder.
If you ever want to do this again, run these commands and go straight to step 3:
Code:
cd source && git clean -fxd && git pull
cd anykernel && git clean -fxd && git pull
NOTE: This thread is aimed to be a breeding ground for kernel development, a place to jump off if you will. I am happy to answer how to questions about building kernels or flashing the one I have provided but this is not supposed to be a general Q&A thread. Please use another thread or create your own in Q&A if you need assistance.
THIS. This is what I've been looking for ever since I bought and rooted my bullhead: an optimized stock kernel. I hope and pray that upstream patches are just the beginning, and later on, you'll have the time and inclination to add more optimizations. I don't care for other features. Just a kernel that works and performs is fine with me. If ever you need a tester for future builds, just give me a shout out and I'll be happy to assist. Thanks for sharing your work, mate.
I'd like to respectfully make a request. Talking a look at your Flash kernel thread and I found the optimizations I was referring to in my post above, namely:
Upstream Linux versions 3.10.74-3.10.103
Updated to the October security patch
Patches for some CVEs
Upstream patches from CAF and Linux
Compiled with the Linaro 6.2 toolchain, compiled regularly from Uber's source?*here
Makefile optimizations
Forced encryption and dm-verity disabled
If you can add these to the stock kernel, I'm pretty sure you'll find a user base for this setup (aside from me, of course). I'm sure a lot old timers like myself would a appreciate something that they can use right out of the box and not have to tinker with too much to get a good performance.
apatal said:
I'd like to respectfully make a request. Talking a look at your Flash kernel thread and I found the optimizations I was referring to in my post above, namely:
Upstream Linux versions 3.10.74-3.10.103
Updated to the October security patch
Patches for some CVEs
Upstream patches from CAF and Linux
Compiled with the Linaro 6.2 toolchain, compiled regularly from Uber's source?*here
Makefile optimizations
Forced encryption and dm-verity disabled
If you can add these to the stock kernel, I'm pretty sure you'll find a user base for this setup (aside from me, of course). I'm sure a lot old timers like myself would a appreciate something that they can use right out of the box and not have to tinker with too much to get a good performance.
Click to expand...
Click to collapse
This kernel is not meant to have anything other than the upstream Linux stuff, that's why it is labelled as reference. The only reason I include a kernel here at all is to prove that the additions are stable and cause no side effects. If you want those things, you can compile the kernel yourself (I can show you which patches and toolchain you would need).
Sent from my Nexus 6P using XDA Labs
The Flash said:
This kernel is not meant to have anything other than the upstream Linux stuff, that's why it is labelled as reference. The only reason I include a kernel here at all is to prove that the additions are stable and cause no side effects. If you want those things, you can compile the kernel yourself (I can show you which patches and toolchain you would need).
Click to expand...
Click to collapse
Noted with thanks! Great! When I get the time and resources to build my own kernel, I'll come back here for some pointers.
Btw, I saw a thread here about making your own ROM in the cloud. Is that something you can do as well for making a kernel?
apatal said:
Noted with thanks! Great! When I get the time and resources to build my own kernel, I'll come back here for some pointers.
Btw, I saw a thread here about making your own ROM in the cloud. Is that something you can do as well for making a kernel?
Click to expand...
Click to collapse
Definitely, I do all my building on a server.
The Flash said:
Definitely, I do all my building on a server.
Click to expand...
Click to collapse
Thanks! I'll take a look at it and see if I can figure it out.
Github and the kernel in the OP are updated to 3.10.104.
The Flash said:
Github and the kernel in the OP are updated to 3.10.104.
Click to expand...
Click to collapse
I supposed because of the upstream patch, third kernel already has the Dirty Cow fix, correct?
apatal said:
I supposed because of the upstream patch, third kernel already has the Dirty Cow fix, correct?
Click to expand...
Click to collapse
Yes.
Hi...Sir @The Flash,
This third command is Making FlashableZip?
OR
Non-FlashableZip?
•••
ZawZaw said:
Hi...Sir @The Flash,
This third command is Making FlashableZip?
OR
Non-FlashableZip?
•••
Click to expand...
Click to collapse
Flashable zip
The Flash said:
Flashable zip
Click to expand...
Click to collapse
Thanks Sir. :good:
3.10.105 released https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/?id=refs/tags/v3.10.105
Sent from my Nexus 5X using XDA-Developers Legacy app
tuhinxp04 said:
3.10.105 released https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/?id=refs/tags/v3.10.105
Click to expand...
Click to collapse
I am aware. I'm not actually doing this for this device anymore so there won't be an update.
Hi... @The Flash
I have one question, please reply me.
What is UBER?
UBER is a compliler as Google's ToolChain Prebuilt?
What different UBER and Google Toolchain?
I want to know,
Please explain me.
Thanks You Sir
•••
ZawZaw said:
Hi... @The Flash
I have one question, please reply me.
What is UBER?
UBER is a compliler as Google's ToolChain Prebuilt?
What different UBER and Google Toolchain?
I want to know,
Please explain me.
Thanks You Sir
•••
Click to expand...
Click to collapse
https://plus.google.com/+ChetKener/posts/YzMJEkzPQgp
The Flash said:
https://plus.google.com/+ChetKener/posts/YzMJEkzPQgp
Click to expand...
Click to collapse
Thanks You Sir.
•••
Hey @The Flash I've been reading through your "How to build Pure Nexus" thread and this thread and I believe that I have an understanding of how to properly setup an environment and compile a kernel for use. However, I still need some guidance as to how to pull commits from others sources and merge them into mine so that my kernel will have those features. The main features I want for my kernel are: LZ4 ramdisk compression (as seen in jollaman's and rachanta's kernels), F2FS compatibility, Overclocking for both the big and little clusters, and a kernel tick rate of 100Hz. If it is not too much to ask could you please show me an example of how to merge at least one of these features into my source so that when I compile my kernel it will have the feature?
HesThatGuy said:
Hey @The Flash I've been reading through your "How to build Pure Nexus" thread and this thread and I believe that I have an understanding of how to properly setup an environment and compile a kernel for use. However, I still need some guidance as to how to pull commits from others sources and merge them into mine so that my kernel will have those features. The main features I want for my kernel are: LZ4 ramdisk compression (as seen in jollaman's and rachanta's kernels), F2FS compatibility, Overclocking for both the big and little clusters, and a kernel tick rate of 100Hz. If it is not too much to ask could you please show me an example of how to merge at least one of these features into my source so that when I compile my kernel it will have the feature?
Click to expand...
Click to collapse
I can do overclocking because it is the easiest of those. Note that you will need some good git skills as well as fairly solid foundation of C to understand what is happening around the code when you run into conflicts.
1. Fetch the repo you want to get changes from (git fetch <url> <branch>)
Code:
git fetch https://github.com/Flash-Kernel/bullhead release-7.1.1
2. Find the commit hash you want to pick on Github and cherry-pick it
Code:
git cherry-pick e60c81d4839bb0f7efd3a79213467e7cbe77801d
3. If there are conflicts, it will make you resolved them first. You'll see conflict markers like so:
Code:
<<<<<<<<<< HEAD
STUFF THAT IS CURRENTLY THERE
==================
STUFF THAT IS EXPECTED TO BE THERE AFTER COMMIT
>>>>>>>>>>>>>
Sometimes, all the stuff that is currently there will be replaced by the stuff that is expected to be there. Other times, you'll have to be more fine about it and compare the diff on Github and see what is actually changing. It's a learned process, not really one that I can concretely teach.
As the title suggests, I am porting lineageOS and keep getting this error
/home/zane/Lineage/out/target/product/suzuran/obj/SHARED_LIBRARIES/libqdutils_intermediates/export_includes', needed by '/home/zane/Lineage/out/target/product/suzuran/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/import_includes', missing and no known rule to make it
here is the full log https://paste.myself5.de/JfHg5EA2Je.sql
I have tried re syncing the repo and re downloading the source trees. nothing seems to be fixing this.. :/
Is this problem solved?
How did u solved this issue? @nzzane
Appears I didn't have the right proprietary blobs - and had SonyLOS repo running alongside, the two seemed to clash
So if you are getting this error make sure you have the right vendor files and not two different repos trying to do the same thing
nzzane said:
Appears I didn't have the right proprietary blobs - and had SonyLOS repo running alongside, the two seemed to clash
So if you are getting this error make sure you have the right vendor files and not two different repos trying to do the same thing
Click to expand...
Click to collapse
Sry i didnt get u. What do u mean two different repos?
Sent from my AO5510 using Tapatalk
Raja_12 said:
What do u mean two different repos?
Click to expand...
Click to collapse
If there is a repo named abc at github that supports i.e. FMRadio and another named xyz, that also supports FMRadio, it is neccessary that depending files are coming from the same repo. Actually the repo from LineageOS clashes with the one from SonyLOS and vice versa.
That's, what nzzane wanted to say IMHO...
Yea - so had two different repos conflicting
Lineage repo was trying to build from stock blobs, and SonyLOS repo was trying to build from just device sources (which my device tree wasn't set-up for)
nzzane said:
Yea - so had two different repos conflicting
Lineage repo was trying to build from stock blobs, and SonyLOS repo was trying to build from just device sources (which my device tree wasn't set-up for)
Click to expand...
Click to collapse
I get it. so how to overcome it. Do i have to remove one repo directory. currently im having 3 repos.
Raja_12 said:
I get it. so how to overcome it. Do i have to remove one repo directory. currently im having 3 repos.
Click to expand...
Click to collapse
It depends what each repo does, and how you want to build it (stock blobs or all device tree)
nzzane said:
It depends what each repo does, and how you want to build it (stock blobs or all device tree)
Click to expand...
Click to collapse
all device tree
Raja_12 said:
all device tree
Click to expand...
Click to collapse
Then one of the repos must be conflicting somewhere :S
nzzane said:
Then one of the repos must be conflicting somewhere :S
Click to expand...
Click to collapse
Yea sometimes I can't make clean or clobber. With one repo it works with other it didn't. So I have to maintain only one repo at a time.
I ran into another issue. Can u help
target arm C: audio.primary.msm8916_32 <= hardware/qcom/audio/hal/voice.c
In file included from hardware/qcom/audio/hal/voice.c:32:
hardware/qcom/audio/hal/voice_extn/voice_extn.h:194:71: error: unused parameter 'adev' [-Werror,-Wunused-parameter]
static int voice_extn_compress_voip_set_mic_mute(struct audio_device *adev, bool state __unused)
Sent from my AO5510 using Tapatalk