Git · How To

Getting Source of All 3.x versions

I need to get source codes of all the 3.x version of Linux Kernel. As my study will be on the 3.x versions. Cloning every source code is a tedious process, so this post is about how to do it, in an awesome way.

 

Clone the source code of current linux:

from here using


git clone git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

This is gonna take some time.

 

Download the Makefile:

From here. Put it in your home folder or wherever you are gonna use it.

 

To add new v3.x versions, run in home directory


git --git-dir=/home/tapasweni/linux/.git fetch

Note: Replace the /home/tapasweni/linux/ path to your path, it was clone in a folder named linux, so I did this.

 

If you do not have the glimpseindex_cocci.sh download it from here.

Do not forget to change the paths in your Makefile.

Now run make


make all-linux-3

You may get something like this (error):


make all-linux-3
git --git-dir=/home/tapasweni/linux/.git fetch
make check-linux-3
make[1]: Entering directory `/home/tapasweni'
Retrieving linux-3.14
cd linux && git archive --format=tar --prefix=linux-3.14/ v3.14 | (cd .. && tar xf - )
cd linux-3.14 && ~/coccinelle/scripts/glimpseindex_cocci.sh
/home/kt/coccinelle/scripts/glimpseindex_cocci.sh: 3: /home/kt/coccinelle/scripts/glimpseindex_cocci.sh: glimpseindex: not found
make[1]: *** [linux-3.14] Error 127
make[1]: Leaving directory `/home/tapasweni'
make: *** [all-linux-3] Error 2

What does this tells?

You do not have the glimpse installed. Use these instructions to install it. You need Glimpse and not Web Glimpse. So only install the one required.

 

If you didn’t get anything like that. You are done. Look at the sources of all 3.x versions where you ran this.

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s