Bug 2589

Summary: [yocto-kernel] fail to build core-image-sato when add patch into the kernel
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Hongna Xu <hongnax.xu>
Component: meta-yoctoAssignee: Tom Zanussi <tom.zanussi>
Status: VERIFIED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: jiajun.xu, laurentiu.serban, ningx.ma, poky.bs.watcher, poky.watcher, richard.purdie, sgw, yilongx.y.sun
Version: unspecified   
Target Milestone: 1.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
detail log info none

Description Hongna Xu 2012-06-13 05:25:33 UTC
Created attachment 576 [details]
detail log info

Firstly, i create a myqemuarm BSP based on qemu,my settings are: 
1.qemu architecture: 3) arm
2.default (3.2) kernel? y
3.a new machine branch? 3) standard/default/arm-versatile-926ejs
4.SMP support? y
5.touchscreen? n
6.keyboard? y

then build the core-image-sato with MACHINE="myqemuarm", after it finished. i add the patch yocto-testmod.patch and two config options as the wiki (https://wiki.yoctoproject.org/wiki/Transcript:_Using_the_Yocto_BSP_tools_to_manage_kernel_patches_and_config_items ) said. Then rebuild the core-image-sato i got error:
**********************************
NOTE: package linux-yocto-3.2.11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414d0a17c142c816d-r1.5: task do_patch: Started
ERROR: Function failed: do_patch (see /home/build/git-work/coreBuild/poky/build/tmp/work/myqemuarm-poky-linux-gnueabi/linux-yocto-3.2.11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414d0a17c142c816d-r1.5/temp/log.do_patch.32360 for further information)
ERROR: Logfile of failure stored in: /home/build/git-work/coreBuild/poky/build/tmp/work/myqemuarm-poky-linux-gnueabi/linux-yocto-3.2.11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414d0a17c142c816d-r1.5/temp/log.do_patch.32360
Log data follows:
| DEBUG: Executing shell function do_patch
| ERROR: Function failed: do_patch (see /home/build/git-work/coreBuild/poky/build/tmp/work/myqemuarm-poky-linux-gnueabi/linux-yocto-3.2.11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414d0a17c142c816d-r1.5/temp/log.do_patch.32360 for further information)
| Branch meta-temp set up to track remote branch meta from origin.
| git reset --mixed 3499d6424f682a58761d827012567c552b053842
| Deleted branch meta-temp (was 3499d64).
| warning: could not find (or was already included): features/logbuf/size-normal.scc
| warning: could not find (or was already included): user-patches.scc
| [INFO] validating against known patches  (myqemuarm-standard-meta)
Branch standard/default/arm-versatile-926ejs/myqemuarm set up to track remote branch standard/default/arm-versatile-926ejs/base from origin.
Context reduced to (1/1) to apply fragment at 394      ] (/)(72 %)
| error: patch failed: drivers/misc/Makefile:36
| error: drivers/misc/Makefile: patch does not apply
| To force apply this patch, use 'guilt push -f'
| [ERROR] unable to complete push
| pending patches are:
| Patches directory doesn't exist, try guilt-init
| ERROR. could not update git tree
| ERROR. Could not modify standard/default/arm-versatile-926ejs/myqemuarm
NOTE: package linux-yocto-3.2.11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414d0a17c142c816d-r1.5: task do_patch: Failed
ERROR: Task 606 (/home/build/git-work/coreBuild/poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb, do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4614 tasks of which 4609 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/build/git-work/coreBuild/poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb, do_patch
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
**********************************
Comment 1 Hongna Xu 2012-06-13 05:35:39 UTC
test on latest poky/master with commit df8f55a919b3cc602ce1f1c51630c7edf6e36b55
Comment 2 Tom Zanussi 2012-06-20 14:20:30 UTC
The problem is with the patch that was used in the test, not the patching mechanism itself.

Scraping the text off the screen results in whitespace differences that prevent the patch from being applied correctly without a flag to ignore whitespace differences.

I uploaded and added the same patch and linked to it in the wiki example to avoid having to scrape it from the screen.
Comment 3 Laurentiu Serban 2012-09-03 20:09:38 UTC
Setting this to verified in 1.3 M3 RC2