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
You may get something like this (error):
make all-linux-3 git --git-dir=/home/tapasweni/linux/.git fetch make check-linux-3 make: 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: *** [linux-3.14] Error 127 make: 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.