GNU/Linux based operating system.
FWD from @soham154 below
NOTE: The kernel is compiled using GCC which is present (very minimally)
in all linux based OSes. Additional packages should be downloaded.
The following commands will download all the necessary packages for
sudo apt-get install libncurses5-dev gcc make git
exuberant-ctags bc libssl-dev
Red Hat based:
sudo yum install gcc make git ctags ncurses-devel
sudo zypper in git gcc ncurses-devel libopenssl-devel ctags
Apart from this the Kernel source is also needed:
it can be cloned(do not download it; CLONE it) from Linus's Stable tree
Run this command:
The kernel source is huge is size and it may not be possible for
everyone to download it, so I will carry it with me on Sunday.