DennisWithDai / linux-kernel

0 stars 0 forks source link

how to build new kernel from open source #2

Closed DennisWithDai closed 7 years ago

DennisWithDai commented 7 years ago

how to build new kernel from https://www.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git?

DennisWithDai commented 7 years ago

The following command sequence was used to create branch v4.4.21-ali:

git clone git@192.168.9.201:stu-pdk/linux-kernel-4.4

Get the ALi Linux kernel

cd linux-kernel-4.4

Change into the newly cloned git repository

git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

git remote add stable https://www.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Add the official kernel.org stable tree as a remote reference

git fetch stable

Fetch the official kernel.org stable tree into our local git repository

git checkout v4.4.15

Check out Release v4.4.15 in order to get all the history from kernel.org.

git branch v4.4.15-ali

Create the branch v4.4.15-ali based on the official Linux release v4.4.15 from kernel.org (including all history).

git checkout v4.4.15-ali

Switch our workspace to the newly created branch.

git cherry-pick 0823d7370bda722c265b15703edf4daa1042b450..aee32e04a92e074d6d3852a4d18791f714f51131

Migrate all commits from the master branch to our newly created branch. In the following, some manual conflict and merge resolution is required. When all conflicts/merge ambiguities is fixed, the branch v4.4.15-ali is ready for pushing to origin.