66fb25b588e24538c82be1aaa199037de104ea49
[platform/kernel/linux-stable.git] / packaging / README.update_linux-stable
1 How to bump kernel version
2 ==========================
3
4 Parameters:
5 -----------
6 * branch to upgrade to (example: linux-3.14.y as defined on git.kernel.org)
7 * tag to upgrade to (example: v3.14.20)
8 * kernel version
9
10 Define variables:
11 # linux_branch=linux-3.14.y
12 # linux_tag=v3.14.20
13
14
15 1. Clone linux-stable from tizen.org
16 ------------------------------------
17
18 # git clone review.tizen.org:platform/kernel/linux-stable
19 # cd linux-stable
20
21
22 2. add kernel.org as new origin and fetch it
23 --------------------------------------------
24
25 # git remote add kernel_org git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
26 # git fetch kernel_org
27
28
29 3. import on upstream branch until given revision and push to tizen.org
30 -----------------------------------------------------------------------
31
32 # git checkout upstream
33 # git rebase kernel_org/${linux_branch}
34 # git push --tags origin HEAD:upstream
35
36
37 4. rebase tizen branch
38 ----------------------
39
40 # git checkout -B tizen origin/tizen
41 # git rebase -i ${linux_tag}
42
43
44 5. Bump the kernel version in the spec file
45 -------------------------------------------
46
47 # sed -ri "s/^(%define upstream_version).*$/\1 $(make kernelversion)/" packaging/*.spec
48 # git commit -sam "packaging: bump to $(make kernelversion)"
49
50
51 6. Push the tizen branch
52 ------------------------
53
54 # git push origin HEAD:tizen
55
56
57 7. Updating kernel configurations (optional)
58 --------------------------------------------
59
60 # function adjustconfig() {
61   arch=$1
62   platform=$2
63
64   make ARCH=$arch ${platform}_defconfig || return $?
65   make menuconfig || return $?
66   make ARCH=$arch savedefconfig || return $?
67   mv -v defconfig arch/$arch/configs/${platform}_defconfig
68 }
69
70 # adjustconfig x86 i386
71 # adjustconfig x86 x86_64
72 # adjustconfig arm vexpress
73
74