All of lore.kernel.org
 help / color / mirror / Atom feed
* do_patch through Yocto fails while "git am" succeed
@ 2016-06-10 18:12 Michael Hu
  2016-06-10 19:32 ` Burton, Ross
  2016-06-15 21:10 ` Khem Raj
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Hu @ 2016-06-10 18:12 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

Does anyone know what's the difference between using Yocto to apply patches
and apply patch directly using git command?

I am trying to apply patches for arm-trusted-firmware through yocto by
extending arm-trusted-firmware.bb file, in .bbappend file, I have:

SRC_URI = "file://<some patch name>"

I got the following error:
ERROR: arm-trusted-firmware-1.2 do_patch: Command Error: 'quilt --quiltrc
/build/tmp/sysroots/x86_64-linux/etc/quiltrc push' exited with 1  Output:
Applying patch 0002-csu_dma-Added-support-to-load-PL-bitstream.patch
(Stripping trailing CRs from patch.)
... some files can be patched
patching file <failed file>
Hunk #1 FAILED at 41.
1 out of 1 hunk FAILED -- rejects in file <failed file>
Patch 0002-csu_dma-Added-support-to-load-PL-bitstream.patch does not apply
(enforce with -f)

However, if using "git am <patch>" under cloned arm-trusted-firmware git
repo, the patches are successfully patched.

What could be the difference?

Thanks!

[-- Attachment #2: Type: text/html, Size: 1342 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: do_patch through Yocto fails while "git am" succeed
  2016-06-10 18:12 do_patch through Yocto fails while "git am" succeed Michael Hu
@ 2016-06-10 19:32 ` Burton, Ross
  2016-06-13  8:29   ` Joshua G Lock
  2016-06-15 21:10 ` Khem Raj
  1 sibling, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2016-06-10 19:32 UTC (permalink / raw)
  To: Michael Hu; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

On 10 June 2016 at 19:12, Michael Hu <pxmyhdev@gmail.com> wrote:

> What could be the difference?
>

bitbake uses quilt to apply patches, not git am, so if the patch isn't
exactly right then they'll behave differently.  Stripping the trailing CRs
would be a start.

Ross

[-- Attachment #2: Type: text/html, Size: 654 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: do_patch through Yocto fails while "git am" succeed
  2016-06-10 19:32 ` Burton, Ross
@ 2016-06-13  8:29   ` Joshua G Lock
  0 siblings, 0 replies; 5+ messages in thread
From: Joshua G Lock @ 2016-06-13  8:29 UTC (permalink / raw)
  To: Burton, Ross, Michael Hu; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

On Fri, 2016-06-10 at 20:32 +0100, Burton, Ross wrote:
> 
> On 10 June 2016 at 19:12, Michael Hu <pxmyhdev@gmail.com> wrote:
> > What could be the difference?
> > 
> > 
> 
> bitbake uses quilt to apply patches, not git am, so if the patch
> isn't exactly right then they'll behave differently.  Stripping the
> trailing CRs would be a start.
> 
It's worth pointing out that you can tell the system to use a different
tool to apply your patch by setting the PATCHTOOL variable in your
recipe:
http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-PAT
CHTOOL
i.e.
PATCHTOOL = "git"
Regards,
Joshua

[-- Attachment #2: Type: text/html, Size: 1135 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: do_patch through Yocto fails while "git am" succeed
  2016-06-10 18:12 do_patch through Yocto fails while "git am" succeed Michael Hu
  2016-06-10 19:32 ` Burton, Ross
@ 2016-06-15 21:10 ` Khem Raj
  2016-06-22 14:43   ` Michael Hu
  1 sibling, 1 reply; 5+ messages in thread
From: Khem Raj @ 2016-06-15 21:10 UTC (permalink / raw)
  To: Michael Hu; +Cc: yocto

On Fri, Jun 10, 2016 at 11:12 AM, Michael Hu <pxmyhdev@gmail.com> wrote:
> Does anyone know what's the difference between using Yocto to apply patches
> and apply patch directly using git command?
>
> I am trying to apply patches for arm-trusted-firmware through yocto by
> extending arm-trusted-firmware.bb file, in .bbappend file, I have:
>
> SRC_URI = "file://<some patch name>"
>
> I got the following error:
> ERROR: arm-trusted-firmware-1.2 do_patch: Command Error: 'quilt --quiltrc
> /build/tmp/sysroots/x86_64-linux/etc/quiltrc push' exited with 1  Output:
> Applying patch 0002-csu_dma-Added-support-to-load-PL-bitstream.patch
> (Stripping trailing CRs from patch.)
> ... some files can be patched
> patching file <failed file>
> Hunk #1 FAILED at 41.
> 1 out of 1 hunk FAILED -- rejects in file <failed file>
> Patch 0002-csu_dma-Added-support-to-load-PL-bitstream.patch does not apply
> (enforce with -f)
>
> However, if using "git am <patch>" under cloned arm-trusted-firmware git
> repo, the patches are successfully patched.
>
> What could be the difference?

which distro do you use on build host and version of quilt, there were
similar issues e..g with ubuntu 12.04
on applying patches that were generated with newer quilt versions.

>
> Thanks!
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: do_patch through Yocto fails while "git am" succeed
  2016-06-15 21:10 ` Khem Raj
@ 2016-06-22 14:43   ` Michael Hu
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Hu @ 2016-06-22 14:43 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1739 bytes --]

Hi Khem,

I'm using Yocto 2.1 Krogoth, and quilt version is 0.64. The workstation is
running Redhat 6.6.

Thanks

On Wed, Jun 15, 2016 at 5:10 PM, Khem Raj <raj.khem@gmail.com> wrote:

> On Fri, Jun 10, 2016 at 11:12 AM, Michael Hu <pxmyhdev@gmail.com> wrote:
> > Does anyone know what's the difference between using Yocto to apply
> patches
> > and apply patch directly using git command?
> >
> > I am trying to apply patches for arm-trusted-firmware through yocto by
> > extending arm-trusted-firmware.bb file, in .bbappend file, I have:
> >
> > SRC_URI = "file://<some patch name>"
> >
> > I got the following error:
> > ERROR: arm-trusted-firmware-1.2 do_patch: Command Error: 'quilt --quiltrc
> > /build/tmp/sysroots/x86_64-linux/etc/quiltrc push' exited with 1  Output:
> > Applying patch 0002-csu_dma-Added-support-to-load-PL-bitstream.patch
> > (Stripping trailing CRs from patch.)
> > ... some files can be patched
> > patching file <failed file>
> > Hunk #1 FAILED at 41.
> > 1 out of 1 hunk FAILED -- rejects in file <failed file>
> > Patch 0002-csu_dma-Added-support-to-load-PL-bitstream.patch does not
> apply
> > (enforce with -f)
> >
> > However, if using "git am <patch>" under cloned arm-trusted-firmware git
> > repo, the patches are successfully patched.
> >
> > What could be the difference?
>
> which distro do you use on build host and version of quilt, there were
> similar issues e..g with ubuntu 12.04
> on applying patches that were generated with newer quilt versions.
>
> >
> > Thanks!
> >
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
>

[-- Attachment #2: Type: text/html, Size: 2950 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-22 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-10 18:12 do_patch through Yocto fails while "git am" succeed Michael Hu
2016-06-10 19:32 ` Burton, Ross
2016-06-13  8:29   ` Joshua G Lock
2016-06-15 21:10 ` Khem Raj
2016-06-22 14:43   ` Michael Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.