Overview: do_patch() task fails if linux-yocto-rt_4.1 is selected and MACHINE is set qemuarm Steps to Reproduce: (1) Get the latest poky $ git clone git://git.yoctoproject.org/poky $ source poky/oe-init-build-env (2) Add the following lines in the local.conf MACHINE = "qemuarm" PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt" PREFERRED_VERSION_virtual/kernel = "4.1" (3) Build the image $ bitbake core-image-minimal Actual Results: do_patch process fails with the following error messages. ------------------------ ERROR: Function failed: do_patch (log file is located at /home/kotaro/rt/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto-rt/4.1.2+gitAUTOINC+45393dd54f_fe1ee44348-r0/temp/log.do_patch.10586) ERROR: Logfile of failure stored in: /home/kotaro/rt/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto-rt/4.1.2+gitAUTOINC+45393dd54f_fe1ee44348-r0/temp/log.do_patch.10586 Log data follows: | DEBUG: Executing shell function do_patch | [INFO] validating against known patches (qemuarm-preempt-rt-meta) error: patch failed: arch/arm/mach-versatile/core.c:22 (\)(43 %)) | error: arch/arm/mach-versatile/core.c: patch does not apply | ERROR. could not update git tree | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_patch (log file is located at /home/kotaro/rt/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto-rt/4.1.2+gitAUTOINC+45393dd54f_fe1ee44348-r0/temp/log.do_patch.10586) ERROR: Task 44 (/home/kotaro/rt/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb, do_patch) failed with exit code '1' ------------------------ Expected Results: The whole build process should work successfully. Build Date & Platform: Build 2015-08-04 on Ubuntu 14.10 x86_64 Additional Builds and Platforms: Not checked. Additional Information: The symptom doesn't occur if MACHINE is set qemux86. It turned out that the patch that produce the error is this. http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-cache/tree/bsp/arm-versatile-926ejs?h=yocto-4.1 In kgit-s2q, line 526, "git am" command returns error with the patch above, where all the PREEMPT_RT patches have been already applied. git am --keep-non-patch $DIR/$i > /dev/null 2>&1 It seems that the 2 patches(arm_versatile_926ejs-add-default-nor-flash-mtd-parts.patch, arm_versatile_926ejs-kick-off-PrimeCell-RTC-PL031.patch) have been already merged into "standard/preempt-rt" branch of "linux-yocto-4.1" even though these changes are not exactly the same. So we suppose arm-versatile-926ejs patches are not needed in linux-yocto-rt 4.1.
I can confirm I reproduced this on Archlinux: 4.1.4-1-ARCH #1 SMP PREEMPT Mon Aug 3 21:30:37 UTC 2015 x86_64 GNU/Linux ------------------------ ERROR: Function failed: do_patch (log file is located at /bld/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto-rt/4.1.2+gitAUTOINC+45393dd54f_fe1ee44348-r0/temp/log.do_patch.21584) ERROR: Logfile of failure stored in: /bld/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto-rt/4.1.2+gitAUTOINC+45393dd54f_fe1ee44348-r0/temp/log.do_patch.21584 Log data follows: | DEBUG: Executing shell function do_patch | [INFO] validating against known patches (qemuarm-preempt-rt-meta) error: patch failed: arch/arm/mach-versatile/core.c:22 (\)(43 %)) | error: arch/arm/mach-versatile/core.c: patch does not apply | ERROR. could not update git tree | WARNING: /bld/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto-rt/4.1.2+gitAUTOINC+45393dd54f_fe1ee44348-r0/temp/run.do_patch.21584:1 exit 1 from | patchme qemuarm | ERROR: Function failed: do_patch (log file is located at /bld/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto-rt/4.1.2+gitAUTOINC+45393dd54f_fe1ee44348-r0/temp/log.do_patch.21584) ERROR: Task 44 (/bld/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb, do_patch) failed with exit code '1' ------------------------
My mistake on this, I dropped branches in the 4.1 kernel on purpose and missed updating this BSP. Will fix shortly.
As of 31th Aug, the do_patch() problem seems to have been resolved, but still having do_compile() error because the necessary patch below is not yet integrated. https://kernel.googlesource.com/pub/scm/linux/kernel/git/rt/linux-rt-devel/+/linux-4.1.y-rt-patches/patches/pid.h-include-atomic.h.patch The current recipe linux-yocto-rt_4.1.bb below points not the latest kernel "Merge tag 'v4.1.6' into standard/base 59b8c4f5e8ddb9c33c62fff22204fe2b0d8c703e". http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb?id=b0db6c2a7fb98287fa112d23399aad8831397209 Should be "Merge branch 'standard/base' into standard/preempt-rt c7415097d6cadffe1f6935204fd593d0d028c057" --- linux-yocto-rt_4.1.bb 2015-08-31 11:42:05.176124411 +0900 +++ linux-yocto-rt_4.1.bb 2015-08-31 11:42:31.664123883 +0900 @@ -2,7 +2,7 @@ require recipes-kernel/linux/linux-yocto.inc -SRCREV_machine ?= "59b8c4f5e8ddb9c33c62fff22204fe2b0d8c703e" +SRCREV_machine ?= "c7415097d6cadffe1f6935204fd593d0d028c057" SRCREV_meta ?= "429f9e2ff0649b8c9341345622545d874d5e303a" SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH};name=machine \
(In reply to comment #3) > As of 31th Aug, the do_patch() problem seems to have been resolved, but > still having do_compile() error because the necessary patch below is not yet > integrated. > > https://kernel.googlesource.com/pub/scm/linux/kernel/git/rt/linux-rt-devel/+/ > linux-4.1.y-rt-patches/patches/pid.h-include-atomic.h.patch > > > The current recipe linux-yocto-rt_4.1.bb below points not the latest kernel > "Merge tag 'v4.1.6' into standard/base > 59b8c4f5e8ddb9c33c62fff22204fe2b0d8c703e". > http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/ > linux/linux-yocto-rt_4.1.bb?id=b0db6c2a7fb98287fa112d23399aad8831397209 > > Should be "Merge branch 'standard/base' into standard/preempt-rt > c7415097d6cadffe1f6935204fd593d0d028c057" > > > > --- linux-yocto-rt_4.1.bb 2015-08-31 11:42:05.176124411 +0900 > +++ linux-yocto-rt_4.1.bb 2015-08-31 11:42:31.664123883 +0900 > @@ -2,7 +2,7 @@ > > require recipes-kernel/linux/linux-yocto.inc > > -SRCREV_machine ?= "59b8c4f5e8ddb9c33c62fff22204fe2b0d8c703e" > +SRCREV_machine ?= "c7415097d6cadffe1f6935204fd593d0d028c057" > SRCREV_meta ?= "429f9e2ff0649b8c9341345622545d874d5e303a" > > SRC_URI = > "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH}; > name=machine \ That patch is integrated .. but my SRCREV updates are still pending. There's nothing to do here but wait.
We've confirmed that the build error has been resolved. Poky: 28th Sep. master latest (5a51fb28dbdfcae8ceb503a5290532dd38aeb09f).
set Verified per Kotaro Hashimoto comment