FORUMS
Remove All Ads from XDA

[REFERENCE] How to get an Android kernel up to date with linux-stable

13,070 posts
Thanks Meter: 45,670
 
Post Reply Email Thread
Introduction

Hello everyone! This will be a thread to assist people with getting their device's Android kernel up to date with the latest linux-stable tag from kernel.org. This process will henceforth be referred to as "upstreaming". This thread will assume that you understand how to compile a kernel as well as working with git if you are looking to do this. If you need assistance with that, please refer to one of the following threads (or search for others):

Information

Read through the linux-stable-notes README for all the relevant information!


Custom kernels that are upstreamed



ROMs with upstreamed kernels built in



Receiving help

I am more than happy to answer any questions regarding this process in this thread. You can use the repos I have merged linux-stable into as a reference for solving conflicts and seeing how the merge commit style looks. Additionally, if you feel any information is missing or can be improved upon, please let me know! I want this to be a collaborative effort.

Good luck!
The Following 142 Users Say Thank You to nathanchance For This Useful Post: [ View ]
 
 
25th June 2017, 09:17 AM |#2  
GreekDragon's Avatar
Recognized Developer
Flag Volos, Greece
Thanks Meter: 4,501
 
Donate to Me
More
The Following 8 Users Say Thank You to GreekDragon For This Useful Post: [ View ]
25th June 2017, 02:04 PM |#3  
DodoGTA's Avatar
Inactive Recognized Developer
Flag Šilutė
Thanks Meter: 1,135
 
Donate to Me
More
Quote:
Originally Posted by The Flash

/dev/null

Here's a note you should add: Don't "git cherry-pick", "git merge" or "git bisect" during a thunderstorm
The Following 3 Users Say Thank You to DodoGTA For This Useful Post: [ View ] Gift DodoGTA Ad-Free
25th June 2017, 05:13 PM |#5  
nathanchance's Avatar
OP Recognized Developer / Recognized Contributor
Flag Mesa, AZ
Thanks Meter: 45,670
 
More
I have clarified on how to know where to start (although it is fairly obvious) in section 1 of the how to.

Sent from my Nexus 6P using XDA Labs
The Following 2 Users Say Thank You to nathanchance For This Useful Post: [ View ]
25th June 2017, 06:28 PM |#6  
mosimchah's Avatar
Senior Member
Thanks Meter: 6,290
 
More
Thanks for the guide, it's very helpful, also I personally use this command to merge the tags, it's just one command which is nice
git pull https://kernel.googlesource.com/pub/...nux-stable.git -t (tag)


Sent from my LEX727 using XDA Labs
The Following 4 Users Say Thank You to mosimchah For This Useful Post: [ View ] Gift mosimchah Ad-Free
25th June 2017, 06:39 PM |#7  
nathanchance's Avatar
OP Recognized Developer / Recognized Contributor
Flag Mesa, AZ
Thanks Meter: 45,670
 
More
Quote:
Originally Posted by mosimchah

Thanks for the guide, it's very helpful, also I personally use this command to merge the tags, it's just one command which is nice
git pull https://kernel.googlesource.com/pub/...nux-stable.git -t (tag)

Sent from my LEX727 using XDA Labs

Yup, git pull is shorthand for git fetch && git merge, so it's fetching the tag then merging it. Definitely quicker if you are going fast.

To everyone, I have added section 5 and 6 under tips and tricks, going over how to easily get notified of upstream updates and known problem commits to help you in the journey upwards!
The Following 14 Users Say Thank You to nathanchance For This Useful Post: [ View ]
26th June 2017, 09:34 AM |#8  
ZawZaw's Avatar
Senior Member
Flag Pyay, Myanmar.
Thanks Meter: 2,991
 
More
Thanks Sir @The Flash for your new Guide.
I'm now learning kenel development.
Your guide is very useful.

Thank You very Much.

BTW,
I want to request to use your GitHub's GCC Prebuilt Toolchain Repo for my Nexus5X kernel building.
I want to use this ToolChain Compiler for my Kernel.

Have a permission?
OR
How to request to you?

•••

Sent from my Google Nexus 5X using XDA Labs
26th June 2017, 12:55 PM |#9  
Senior Member
Flag Montreal
Thanks Meter: 36
 
More
Thank you very much, well done.
26th June 2017, 03:19 PM |#10  
nathanchance's Avatar
OP Recognized Developer / Recognized Contributor
Flag Mesa, AZ
Thanks Meter: 45,670
 
More
Quote:
Originally Posted by ZawZaw

Thanks Sir @The Flash for your new Guide.
I'm now learning kenel development.
Your guide is very useful.

Thank You very Much.

BTW,
I want to request to use your GitHub's GCC Prebuilt Toolchain Repo for my Nexus5X kernel building.
I want to use this ToolChain Compiler for my Kernel.

Have a permission?
OR
How to request to you?

•••

Sent from my Google Nexus 5X using XDA Labs

Go for it.
The Following 2 Users Say Thank You to nathanchance For This Useful Post: [ View ]
26th June 2017, 04:16 PM |#11  
ZawZaw's Avatar
Senior Member
Flag Pyay, Myanmar.
Thanks Meter: 2,991
 
More
Quote:
Originally Posted by The Flash

Go for it.

Thank You Sir.

•••

Sent from my Google Nexus 5X using XDA Labs
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes