<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: Patching u-boot &amp;quot;can't find file to patch&amp;quot;, how to fetch source?</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744588#M115919</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steven&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try to follow SCM-i.MX 6 Series Yocto Linux Patch Release Notes and User's Guide on&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/products/single-chip-modules/quick-start-board-for-scm-i.mx-6dq:QWKS-SCM-IMX6DQ?tab=Documentation_Tab" title="https://www.nxp.com/products/single-chip-modules/quick-start-board-for-scm-i.mx-6dq:QWKS-SCM-IMX6DQ?tab=Documentation_Tab"&gt;Quick Start Board for SCM-i.MX 6DQ|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CodeAurora sources:&lt;/P&gt;&lt;P&gt;uboot scm-imx_v2016.03_4.1.15_2.0.0_ga&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/uboot-imx/?h=nxp%2Fscm-imx_v2016.03_4.1.15_2.0.0_ga" title="https://source.codeaurora.org/external/imx/uboot-imx/?h=nxp%2Fscm-imx_v2016.03_4.1.15_2.0.0_ga"&gt;uboot-imx - i.MX U-Boot&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;scm-imx_4.1.15_2.0.0_ga&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=scm-imx_4.1.15_2.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=scm-imx_4.1.15_2.0.0_ga"&gt;linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Apr 2018 05:07:52 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2018-04-19T05:07:52Z</dc:date>
    <item>
      <title>Patching u-boot "can't find file to patch", how to fetch source?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744587#M115918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to patch mx6dqscm.c in u-boot IMX with a bbappend file in my custom layer. I get the following error:&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;ERROR: u-boot-imx-2016.03-r0 do_patch: Command Error: 'quilt --quiltrc /home/ubuntu/imx6/
build-x11/tmp/sysroots/x86_64-linux/etc/quiltrc push' exited with 1&amp;nbsp; Output:
Applying patch 0001-my-uboot-patch.patch
can't find file to patch at input line 5&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked buildir/tmp/work/imx6dqscm_1gb_custom-poky-linux-gnueabi/u-boot-imx/2016.03-r0/git and there is no source here. It seems the source code for u-boot-imx was never fetched. It seems like bitbake is trying to apply the patches before the source is fetched. Why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran `bitbake -c -f fetchall uboot-imx`, but still no source files in tmp/work...&amp;nbsp;&amp;nbsp;is this a sign something else is wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the relevant part of my tree:&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;meta-my-layer/recipes-bsp/u-boot/u-boot-imx_2016.03.bbappend
&lt;SPAN&gt;meta-my-layer/recipes-bsp/u-boot/u-boot-imx/imx6dqscm-1gb-custom/0001-my-uboot-patch.patch&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Content of my bappend file, u-boot-imx_2016.03.bbappend:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;&lt;SPAN&gt;FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"&lt;/SPAN&gt;
&lt;SPAN&gt;SRC_URI_imx6dqscm-1gb-custom += "file://0001-my-uboot-patch.patch"&lt;/SPAN&gt;

&lt;SPAN&gt;SRCBRANCH = "scm-imx_v2016.03_4.1.15_2.0.0_ga"&lt;/SPAN&gt;
&lt;SPAN&gt;SRCREV = "${AUTOREV}"&lt;/SPAN&gt;

&lt;SPAN&gt;COMPATIBLE_MACHINE = "(mx6)"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My patch starts with:&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;diff --git a/board/freescale/mx6dqscm/mx6dqscm.c b/board/freescale/mx6dqscm/mx6dqscm.c
index de08e95..4a20001 100644
--- a/board/freescale/mx6dqscm/mx6dqscm.c
+++ b/board/freescale/mx6dqscm/mx6dqscm.c&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks just like my kernel patches, which work correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE #1 2018/04/19:&amp;nbsp; If I run `bitbake -c unpack -f u-boot-imx` the source tree gets populated. This implies that the combination of fetch and unpack would get the sources and put them into the working directory, and that bitbake is trying to apply my patch&amp;nbsp;&lt;EM&gt;before&lt;/EM&gt; the `unpack` step. What's going on here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE #2 2018/04/19: Added my machine-specific SRC_URI above.&amp;nbsp; It seems this is related to the behavior. I'm not using this in my working kernel bbappend.&amp;nbsp; I looked at the fetch and unpack logs, and they only work on one file (my first patch) then stop. Seems like a strong hint that my SRC_URI is malformed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2018 17:32:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744587#M115918</guid>
      <dc:creator>series8217</dc:creator>
      <dc:date>2018-04-18T17:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Patching u-boot "can't find file to patch", how to fetch source?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744588#M115919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steven&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try to follow SCM-i.MX 6 Series Yocto Linux Patch Release Notes and User's Guide on&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/products/single-chip-modules/quick-start-board-for-scm-i.mx-6dq:QWKS-SCM-IMX6DQ?tab=Documentation_Tab" title="https://www.nxp.com/products/single-chip-modules/quick-start-board-for-scm-i.mx-6dq:QWKS-SCM-IMX6DQ?tab=Documentation_Tab"&gt;Quick Start Board for SCM-i.MX 6DQ|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CodeAurora sources:&lt;/P&gt;&lt;P&gt;uboot scm-imx_v2016.03_4.1.15_2.0.0_ga&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/uboot-imx/?h=nxp%2Fscm-imx_v2016.03_4.1.15_2.0.0_ga" title="https://source.codeaurora.org/external/imx/uboot-imx/?h=nxp%2Fscm-imx_v2016.03_4.1.15_2.0.0_ga"&gt;uboot-imx - i.MX U-Boot&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;scm-imx_4.1.15_2.0.0_ga&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=scm-imx_4.1.15_2.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=scm-imx_4.1.15_2.0.0_ga"&gt;linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 05:07:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744588#M115919</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-04-19T05:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Patching u-boot "can't find file to patch", how to fetch source?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744589#M115920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the reply. I'm familiar with the documents you linked to -- My build environment is configured according to the SCM-i.MX 6 Yocto user's guide, and I&amp;nbsp;can find the u-boot&amp;nbsp;source in git.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I'm having is that bitbake is not fetching the sources before trying to apply my patch, so&amp;nbsp;I get the following error during the do_patch part of the u-boot build in Yocto:&lt;/P&gt;&lt;PRE style="color: #51626f; background-color: #ffffff; border: 0px; padding-left: 30px;"&gt;ERROR: u-boot-imx-2016.03-r0 do_patch: Command Error: 'quilt --quiltrc /home/ubuntu/imx6/
build-x11/tmp/sysroots/x86_64-linux/etc/quiltrc push' exited with 1&amp;nbsp; Output:
Applying patch 0001-my-uboot-patch.patch
can't find file to patch at input line 5&lt;/PRE&gt;&lt;P&gt;I'm trying to understand why this is happening. To help with the diagnosis I&amp;nbsp;checked if the u-boot source files were present in the tmp/work directory and they are not. `&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;bitbake -c -f fetchall uboot-imx` doesn't put them there either. What could be causing this problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 17:13:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744589#M115920</guid>
      <dc:creator>series8217</dc:creator>
      <dc:date>2018-04-19T17:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Patching u-boot "can't find file to patch", how to fetch source?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744590#M115921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the problem. It's on the following line in my &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;bbappend&lt;/SPAN&gt;:&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;SRC_URI_imx6dqscm-1gb-custom += "file://0001-my-uboot-patch.patch"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This doesn't work. The machine-specific SRC_URI addition is ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that machine-specific &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;SRC_URI&lt;/SPAN&gt; needs to use:&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;&amp;nbsp;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;SRC_URI_append_machine = "file://patch-file "&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Instead of:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt; SRC_URI_machine +=&amp;nbsp;"file://patch-file"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;Note that SRC_URI_append&lt;/SPAN&gt; requires an explicit trailing space&amp;nbsp;&lt;/SPAN&gt;so that&amp;nbsp;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;fetch&lt;/SPAN&gt; can split the &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;SRC_URI&lt;/SPAN&gt; to get each separate file path:&lt;/P&gt;&lt;PRE style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;SRC_URI_append_imx6dqscm-1gb-custom = "file://0001-my-uboot-patch-1.patch "&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;For multiple patch files this needs to be done in one line:&lt;/P&gt;&lt;PRE style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;SRC_URI_append_imx6dqscm-1gb-custom = "file://0001-my-uboot-patch-1.patch \
&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;file://0002-my-uboot-patch-2.patch \
&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I'm not sure if this would also work:&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;SRC_URI_imx6dqscm-1gb-custom = ""
&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;SRC_URI_imx6dqscm-1gb-custom += "file://0001-my-uboot-patch-1.patch"
&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;SRC_URI_imx6dqscm-1gb-custom += "file://0002-my-uboot-patch-2.patch"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 20:01:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744590#M115921</guid>
      <dc:creator>series8217</dc:creator>
      <dc:date>2018-04-19T20:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Patching u-boot "can't find file to patch", how to fetch source?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744591#M115922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steven,&lt;/P&gt;&lt;P&gt;Even I am facing the same kind of issue said by you.&lt;/P&gt;&lt;P&gt;I am unable to resolve it still, can you help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are bitbake error logs related to issue.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ERROR: busybox-1.29.3-r0 do_patch: Command Error: 'quilt --quiltrc /media/raja.sj/_My-data/cal2poky-config/scripts/yocto_build/poky/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/busybox/1.29.3-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Applying patch 0001-persist-OS-logs-cal2.patch&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;can't find file to patch at input line 5&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Perhaps you used the wrong -p or --strip option?&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;The text leading up to this was:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I am not getting how to resolve the issue.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;how to provide the proper SRC_URI_xxx for my board.what should be filled in "xxx", to resolve the issue.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I have created patch using quilt&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2019 09:53:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Patching-u-boot-quot-can-t-find-file-to-patch-quot-how-to-fetch/m-p/744591#M115922</guid>
      <dc:creator>raja_sj</dc:creator>
      <dc:date>2019-11-12T09:53:27Z</dc:date>
    </item>
  </channel>
</rss>

