How to bump kernel version ========================== Parameters: ----------- * ltsi tag to upgrade to (example: v3.14.28-ltsi) Define variables: # ltsi_tag=v3.14.28-ltsi 1. Clone linux-stable from tizen.org ------------------------------------ # git clone review.tizen.org:platform/kernel/linux-stable # cd linux-stable 2. add kernel.org and LTSI as new remotes and fetch them ------------------------------------------------------ # git remote add kernel_org git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git # git fetch kernel_org # git remote add kernel_ltsi http://git.linuxfoundation.org/ltsi-kernel.git # git fetch kernel_ltsi 3. Update LTSI branch --------------------- # git checkout -B upstream_ltsi ${ltsi_tag} # git push --tags origin HEAD:upstream_ltsi 3. import upstream branch, apply LTSI patches and push to tizen.org ------------------------------------------------------------------- # tmpdir=/tmp/ltsi ; rm -rf $tmpdir && mkdir -p $tmpdir # git archive ${ltsi_tag} | tar Cxvf $tmpdir - # linux_tag=v$(<$tmpdir/KERNEL_VERSION) # linux_branch=linux-$(sed -r 's/v([0-9]+)\.([0-9]+)\.([0-9]+)$/\1.\2/' <<<$linux_tag).y # echo $linux_branch $linux_tag # git checkout -B ${linux_branch} ${linux_tag} # git push --tags origin HEAD:${linux_branch} # $tmpdir/scripts/generate_git # git tag ${linux_tag}+ltsi # git push --tags origin HEAD:upstream Optional: delete local branch created by generate_git # git checkout -B upstream origin/upstream # git branch -D ${ltsi_tag/#v/} 4. rebase tizen branch ---------------------- # git checkout -B tizen origin/tizen # git rebase -i ${linux_tag}+ltsi 5. Bump the kernel version in the spec file ------------------------------------------- # sed -ri "s/^(%define upstream_version).*$/\1 $(make kernelversion | sed 's/-ltsi$/+ltsi/')/" packaging/*.spec # git commit -sam "packaging: bump to $(make kernelversion)" 6. Push the tizen branch ------------------------ # git push origin +HEAD:tizen 7. Updating kernel configurations (optional) -------------------------------------------- # function adjustconfig() { arch=$1 case $arch in i386|i486|i586|i686|x86) cfgpath=arch/x86/configs arch=i386 platform=i386 ;; x86_64) cfgpath=arch/x86/configs arch=x86_64 platform=x86_64 ;; arm|vexpress) cfgpath=arch/arm/configs arch=arm platform=vexpress ;; *) echo "Unknown arch" return 1 ;; esac rm -f .config make ARCH=$arch ${platform}_defconfig || return $? make ARCH=$arch menuconfig || return $? make ARCH=$arch savedefconfig || return $? mv -v defconfig $cfgpath/${platform}_defconfig } # adjustconfig x86 # adjustconfig x86_64 # adjustconfig arm