title: Install a modified kernel header for access to kernel programs
body: <p>I am a newbie to kernel programming and I want to modify a header file in arch/x86/include/asm/tlbflush.h so that my kernel module can use one of the functions exported by this header file.</p>
  
  <p>I have the source code for 3.2.59 kernel and made changes to tlbflush.h. I included the header file tlbflush.h. When i compile the module i get a warning saying the function that I am using is not found and as a result I am not able to insmod my kernel module.</p>
  
  <p>I went through the following
  <a href="https://stackoverflow.com/questions/18879972/how-to-export-a-modified-kernel-header">how to export a modified kernel header</a></p>
  
  <p>and tried the following steps to install the modified kernel header:</p>
  
  <ol>
  <li>make</li>
  <li>sudo make  modules_install</li>
  <li>sudo make  headers_install  INSTALL_HDR_PATH=/usr/include</li>
  <li>sudo make install</li>
  <li>sudo update-initramfs -c -k 3.2.59</li>
  </ol>
  
  <p>The link mentioned talks about installing kernel headers to /usr/include for access to user space processes</p>
  
  <p>I want to mention that I have so many headers installed due to the upgrades done on my ubuntu machine. Also all of them have extensions like 3.2.0-59, 3.2.0-xx
  I considered 3.2.0-59 to be same as 3.2.59 though I am not sure. Please correct me in case this is wrong. Thanks !</p>
  
  <p>Edit:</p>
  
  <p>I am sorry, I got confused with the headers in /usr/src/... folder versus the headers in the source code of kernel that is being modified. I made a change in the headers of the kernel source that i downloaded and after that there is no warning now. </p>
  
  <p>But the question still remains that why are the kernel headers in /usr/src/ used?</p>
  
  <p>I am sorry for the waste of time, if you spent on this.</p>