Use git and commit tag
This tip shows how to use git, the standard kernel source control package, to get source for a specific Hardkernel kernel release.
Contents
Prerequisites
Steps
For this example, we assume you want to get specifically the Hardkernel 3.0.63 source so you can change some configuration and re-build it.
Git the Source
Carve out a convenient place to work, something like this:
cd $HOME mkdir odroidu2 cd odroidu2
If you plan to do a native kernel build, be aware that git database will take probably 2GB or so. You could do the git work on your host and then copy the source over to the odroid. If you have never tried it, you might like to cross-compile the kernel on your host. Here is a link to a tutorial: http://odroid.us/mediawiki/index.php?title=Step-by-step_Cross-compiling_a_Kernel
Clone the database to your machine. This can take awhile, it is a lot of data.
git clone git://github.com/hardkernel/linux.git -b odroid-3.0.y
OR you could get the work-in-progress kernel like this:
git clone --depth 1 https://github.com/hardkernel/linux.git -b odroid-3.8.y odroid-3.8.y
You could get the kernel source for odroidxu like this: (notice the xu suffix)
git clone --depth 1 https://github.com/hardkernel/linux.git -b odroidxu-3.4.y
Get latest version if you have previously cloned
And you don't care about your local edits
git reset --hard HEAD git clean -f git pull git://github.com/hardkernel/linux.git
Move to the top of the source tree
cd $HOME/odroidu2/linux
Find Commit Tag, text method
Put the git log to a file to make it easy to read
cd $HOME/odroidu2/linux git log > git.log
Open git.log with an editor and look for the merge tag 'v3.0.62'. It looks like this:
commit be1529c40ea70bc16e751e38d5dadde1887d62f8 Merge: a6d395e e1c63f9f Author: Hakjoo Kim <ruppi.kim@hardkernel.com> Date: Tue Feb 5 10:51:43 2013 +0900 Merge tag 'v3.0.62' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroid-3.0.y This is the 3.0.62 stable release
Make a note of the commit tag. For this release it is be1529c40ea70bc16e751e38d5dadde1887d62f8
Find Commit Tag, GUI method
If you install gitk, sudo apt-get install gitk, you can use a GUI to browse for the commit tag you are interested in.
Use the Commit Tag
Use the commit tag to set your source tree content to exactly match that instant in time, when the commit was done:
cd $HOME/odroidu2/linux git checkout b9d73f776e87f89e1a6c251bff0d7d4a6c46de63
odroid-3.0.y for reference:
Commit Tag 3.0.75 b47833937231eebab2fe46502426ea8158fae8d9 3.0.74 f97ddf68ad209d6767249bd6852ce053588adfbd 3.0.68 665307aa0c3181c803087b56601be263170fae65 3.0.67 98bbf3565e3147a40c583ff97e2b5a98370c21a5 3.0.66 21d69845e411bfcee426070af5416ddfba350529 3.0.65 fe34c843d97c4fa082fe66dc3a65e7bd5603c70c 3.0.64 54ea5b40f067cf098cac639973c6628c6944cfb2 3.0.63 b9d73f776e87f89e1a6c251bff0d7d4a6c46de63 3.0.62 be1529c40ea70bc16e751e38d5dadde1887d62f8 3.0.61 69562df65467c6b15b8f1a6c6eeb9387f4d9e1c9 3.0.60 008dd7cbe135862efb15782c02fbd2747545ff01
odroid-3.8.y for reference:
Commit Tag 3.8.y 2013-04-18.head dbaf8ccfe13fc047e012a2c5cec8dce8198660d2
Create a Local Branch (optional)
At this point, you are sure to have the released source. You can create a local branch, even if you don't plan to do edits. As long as you don't 'push' the results, the content will stay local to your machine. Here is what I did:
git checkout -b odroid-3.0.y.osterluk
Configure the kernel
The next step would be to configure the kernel. For example:
make odroidu2_ubuntu_defconfigSee the kernel building tutorial(s) for what steps to do next