Just start to write Linux drive, write good Makefile after make, appear scripts/xxx/makefile: No that file or directory, compile stop! Error, which is caused by Linux system not installing kernel source code.
For example
The following is the introduction of the download Kernel source code method
1. View your CentOS version
Directive Cat/etc/issue
2. View your Linux kernel version
Instruction Uname-r or uname-a
3. Go to the official website to download
By the above two steps we know ourselves the CentOS version is 6.7 and the kernel version is 2.6.32-573.el6.i686
Source code of the official website: http://vault.centos.org/
Enter the official website, once again into the 6.7/, into the os/, into the source/, into the spackages/, find kernel-2.6.32-573.el6.src.rpm download on the line
can also be downloaded directly from the Linux system, for example
It's OK.
Supplemental installation
Install kernel source code
The directory/root/rpmbuild/specs and/root/rpmbuild/sources are generated.
Use the Find-name directoryname-type d command to find these two files.
Go to specs to install the source package
Install the missing packages on each of the above prompts with the Yum install command.
The Linux kernel source download method for CentOS