title: Including patches to Build Root
body: <p>I tried to include my custom helloword patch to build root.</p>
  
  <p>in </p>
  
  <blockquote>
    <p>make menuconfig</p>
  </blockquote>
  
  <p>I have added global patch directory <code>/home/Downloads/buildroot/buildroot-2017.11/patches</code> </p>
  
  <p><a href="https://i.stack.imgur.com/lj49E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lj49E.png" alt="enter image description here"></a></p>
  
  <p>and I place my patch files inside the below directory </p>
  
  <blockquote>
    <p>(/home/Downloads/buildroot/buildroot-2017.11/patches/packagename/version/patch).</p>
  </blockquote>
  
  <p>I referred <a href="http://buildroot.uclibc.org/downloads/manual/manual.html#_within_buildroot" rel="nofollow noreferrer">this link</a> and <a href="https://stackoverflow.com/questions/6382986/how-to-apply-patches-to-a-package-in-buildroot?rq=1">this link</a></p>
  
  <p>After <strong>make</strong> command the patch is not getting applied in my source directory, the source is getting extracted to the output/build directory from the .tar fle.
  please suggest a solution..</p>
  
  <p><strong>Config.in</strong></p>
  
  <pre><code>config BR2_PACKAGE_HELLOWORLD
  bool "helloworld"
  help
    Hello World package says hello world to you
    see http://helloworld.com for more on this software
  </code></pre>
  
  <p><strong>helloworld.mk</strong></p>
  
  <pre><code>HELLOWORLD_VERSION = 1.0.0
  HELLOWORLD_SOURCE = helloworld-1.1.tar.gz
  HELLOWORLD_PATCH = 18-helloworld-testing.patch
  HELLOWORLD_SITE_METHOD = local
  
  define  HELLOWORLD_BUILD_CMDS
      $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
  endef
  
  define  HELLOWORLD_INSTALL_TARGET_CMDS
      $(INSTALL) -D -m 0755 $(@D)/helloworld $(TARGET_DIR)/usr/bin/helloworld
  
      $(INSTALL) -D -m 0755 $(@D)/helloworld-init $(TARGET_DIR)/etc/init.d/S90helloworld  
  endef
  
  
  $(eval $(generic-package))
  </code></pre>