title: Using populate_sdk to include kernel headers
body: <p>How do I include the linux kernel headers as part of the SDK package in Yocto?</p>
  
  <p>I'm using Yocto 1.8 (fido) in an embedded project and want to do out-of-tree kernel module development. Currently, I can build my kernel modules (apart from bitbake) by pointing my <code>$KERNEL_PATH</code> to the <code>poky/build/tmp/work-shared/&lt;machine&gt;/kernel-source/</code> directory when I run make. I don't want to do this in the long term, however, since others need to easily build the modules without installing and building a full image from bitbake. </p>
  
  <p>I can generate an SDK using <code>bitbake myimage -c populate_sdk</code>. However, this doesn't include the kernel headers (all I ever see is <code>sysroots/&lt;mach&gt;/usr/include/linux</code>). How do I cause the kernel headers to be included in the SDK package? Also, I don't want the kernel headers to show up as part of my target image.</p>
  
  <p><strong>[Edit]</strong>
  My image recipe is as follows:</p>
  
  <pre><code>EXTRA_IMAGE_FEATURES_append = " eclipse-debug debug-tweaks"
  TOOLCHAIN_HOST_TASK_append = " nativesdk-cmake"
  IMAGE_INSTALL = "packagegroup-core-boot  ${CORE_IMAGE_EXTRA_INSTALL} util-linux kernel-modules netbase busybox base-passwd base-files sysvinit initscripts bash gdbserver strace sysfsutils dtc gawk ethtool grep sed wget  iptables oprofile net-tools dropbear rsync stress-ng rt-tests i2c-tools"
  inherit core-image
  </code></pre>
  
  <p>The kernel I'm using is <a href="https://github.com/kraj/meta-altera/blob/master/recipes-kernel/linux/linux-altera-ltsi-rt_3.10.bb">linux-altera-ltsi-rt</a> in the meta-altera layer.</p>