maintaining linux kernel patches away from upstream
DESCRIPTION
In this presentation I explain how we maintain our Linux Kernel tree and how we rebase and merge our new features.TRANSCRIPT
How to How to maintainmaintain your kernel your kernel patches patches out of the mainlineout of the mainline
tree?tree?
● v3.12.16
● v3.12.17
● v3.12.18
Basic structure of the Linux stable repoBasic structure of the Linux stable repo
tags
● v3.12.16
● v3.12.17
● v3.12.18
BranchingBranching
● master
● 3.12.17
● 3.12.18
tags branches
● v3.12.16
● v3.12.17
● v3.12.18
BranchingBranchingnormal patching approachnormal patching approach
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
tags branches
My Approach in 11 easy stepsMy Approach in 11 easy steps
● v3.12.16
● v3.12.17
● v3.12.18
Introduce a BASE branchIntroduce a BASE branch
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
tags branches
Step 1Step 1
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
Move all your branches to the BASE branchMove all your branches to the BASE branch
tags branches
Step 2Step 2
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
● 3.12.18-cloud0
Create a MERGE / VERSION branchCreate a MERGE / VERSION branch
tags branches
Step 3Step 3
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
● 3.12.18-cloud0
●prep-cpuinfo-v2
●prep-ptty-exploit-fix
●prep-oom-lockup-fix
Prepare your branches to be mergedPrepare your branches to be merged
tags branches
Step 4Step 4
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
● 3.12.18-cloud0
●prep-cpuinfo-v2
●prep-ptty-exploit-fix
●prep-oom-lockup-fix
Merge all your branches into the merge/version branchMerge all your branches into the merge/version branch
tags branches
Step 5Step 5
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
● 3.12.18-cloud0
Remove the prep-* branchesRemove the prep-* branches
tags branches
Step 6Step 6
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
● 3.12.18-cloud0
● 3.12.19● v3.12.19
A new version tag is introducedA new version tag is introduced
tags branches
Step 7Step 7
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
● 3.12.18-cloud0
● 3.12.19● v3.12.19
Create a new BASE branchCreate a new BASE branch
● 3.12.19-base
tags branches
Step 8Step 8
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
● 3.12.18-cloud0
● 3.12.19● v3.12.19
Rebase all branches onto the new BASE branchRebase all branches onto the new BASE branch
● 3.12.19-base
tags branches
Step 9Step 9
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
● 3.12.18-cloud0
● 3.12.19● v3.12.19
Create a new MERGE / VERSION branchCreate a new MERGE / VERSION branch
● 3.12.19-base
● 3.12.19-cloud0
tags branches
Step 10Step 10
● v3.12.16
● v3.12.17
● v3.12.18
● master
● 3.12.17
● 3.12.18
● oom-lockup-fix
● ptty-exploit-fix
● cpuinfo-v2
● 3.12.18-base
● 3.12.18-cloud0
● 3.12.19● v3.12.19
Create a new MERGE / VERSION branchCreate a new MERGE / VERSION branch
● 3.12.19-base
● 3.12.19-cloud0
tags branches
Step 11Step 11
GOTO Step 4GOTO Step 4
●prep-cpuinfo-v2
●prep-ptty-exploit-fix
●prep-oom-lockup-fix
Thank you...Thank you...
Marian HackMan MarinovMarian HackMan [email protected]@1h.com