title: Applying patch kept in br2-external to a buildroot package
body: <p>I want to apply a patch to buildroot package. I'm using <code>br2-external</code> tree to keep my customizations out of buildroot tree. Buildroot can find my patch, but fails when trying to apply it.</p>
  <p>I have set <code>BR2_GLOBAL_PATCH_DIR=&quot;${BR2_EXTERNAL_PATH}/board/myboard/patches&quot;</code> and put the patch in <code>${BR2_EXTERNAL_PATH}/board/myboard/patches/packagename/0001-name-of-patch.patch</code>. I generated the patch by going to <code>buildroot</code> repo, applying the changes to package, committing them with git and creating a patch from the last commit:
  <code>git format-patch HEAD~1</code>
  So the patch looks like this:</p>
  <pre><code>diff --git a/package/rpi-firmware/cmdline.txt b/package/rpi-firmware/cmdline.txt
  index 155a54693b..630cfa9e00 100644
  --- a/package/rpi-firmware/cmdline.txt
  +++ b/package/rpi-firmware/cmdline.txt
  @@ -1 +1 @@
  -old code line
  +new code line
  </code></pre>
  <p>However, when I run <code>make</code>, during patching the file to patch cannot be found (wrong path)</p>
  <pre><code>Applying 0001-name-of-patch.patch using patch:
  can't find file to patch at input line 5
  Perhaps you used the wrong -p or --strip option?
  The text leading up to this was:
  --------------------------
  |diff --git a/package/rpi-firmware/cmdline.txt b/package/rpi-firmware/cmdline.txt
  |index 155a54693b..630cfa9e00 100644
  |--- a/package/rpi-firmware/cmdline.txt
  |+++ b/package/rpi-firmware/cmdline.txt
  --------------------------
  No file to patch.  Skipping patch.
  </code></pre>
  <p>I also tried <code>rpi-firmware/cmdline.txt</code> and <code>cmdline.txt</code> paths.</p>
  <p>What path should I use in the patch file? Should it be relative to package, relative to buildroot repository root, or pointing to package relative to the global patch directory? I followed <a href="https://buildroot.org/downloads/manual/manual.html#customize-patches" rel="nofollow noreferrer">https://buildroot.org/downloads/manual/manual.html#customize-patches</a> but couldn't find the answer to this question.</p>