Bug 8630 - Failed to do_patch for linux-yocto for custom Intel BSP by yocto bsp tool
Summary: Failed to do_patch for linux-yocto for custom Intel BSP by yocto bsp tool
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: configuration (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.0.1
Assignee: Leonardo Sandoval Gonzalez
QA Contact: Yi Zhao
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-11-03 07:34 UTC by Yi Zhao
Modified: 2016-02-16 02:56 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
proposed patch, to be send to the ML (18.03 KB, patch)
2015-11-05 22:58 UTC, Leonardo Sandoval Gonzalez
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2015-11-03 07:34:25 UTC
Git rev:
poky: jethro/e1aa897beb33171bc902207b98c8f666b9e97ad3
meta-intel: master/158516f3b89eafa222e64de90de383cabc8c2594

Steps:
1. Follow the https://wiki.yoctoproject.org/wiki/Transcript:_Using_the_Yocto_BSP_tools_to_create_a_meta-intel_BSP to create a custom intel bsp. Choose the default settings:
#######################
$ yocto-bsp create myintelbsp x86_64
Checking basic git connectivity...
Done.

Would you like to use the default (3.19) kernel? (y/n) [default: y] 
Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n] [default: y] 
Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.19.git...
Please choose a machine branch to base this BSP on: [default: standard/common-pc-64/base]
	1) standard/arm-versatile-926ejs
	2) standard/base
	3) standard/beagleboard
	4) standard/beaglebone
	5) standard/ck
	6) standard/common-pc
	7) standard/common-pc-64/base
	8) standard/common-pc-64/rangeley
	9) standard/edgerouter
	10) standard/fsl-mpc8315e-rdb
	11) standard/mti-malta32
	12) standard/mti-malta64
	13) standard/qemuarm64
	14) standard/qemuppc

Do you need SMP support? (y/n) [default: y] 
Which machine tuning would you like to use? [default: tune_core2]
	1) Core2 tuning optimizations
	2) Corei7 tuning optimizations

Do you need support for X? (y/n) [default: y] 
Please select an xserver for this machine: [default: xserver_i915]
	1) VESA xserver support
	2) i915 xserver support
	3) i965 xserver support
	4) fbdev xserver support
	5) modesetting xserver support

Does your BSP have a touchscreen? (y/n) [default: n] 
Does your BSP have a keyboard? (y/n) [default: y] 

New x86_64 BSP created in meta-myintelbsp
################################

2. bitbake core-image-minimal

Error message:
####################################
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: SRCREV 151571a39785218a57c3ae3355cd63694890cc8d was specified, but is not reachable
ERROR: Check the BSP description for incorrect branch selection, or other errors.
ERROR: Function failed: do_patch (log file is located at /buildarea1/poky/build-intel/tmp/work/myintelbsp-poky-linux/linux-yocto/3.19.5+gitAUTOINC+1016714868_151571a397-r0.1/temp/log.do_patch.24932)
ERROR: Logfile of failure stored in: /buildarea1/poky/build-intel/tmp/work/myintelbsp-poky-linux/linux-yocto/3.19.5+gitAUTOINC+1016714868_151571a397-r0.1/temp/log.do_patch.24932
ERROR: Task 45 (/buildarea1/poky/meta/recipes-kernel/linux/linux-yocto_3.19.bb, do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 550 tasks of which 0 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

####################################

This issue is introduced by commit 1c2fdd967e2a26bcf93bad69f3d21bb216e47eb3:

commit 1c2fdd967e2a26bcf93bad69f3d21bb216e47eb3
Author: Bruce Ashfield <bruce.ashfield@windriver.com>
Date:   Fri Oct 23 16:18:33 2015 -0400

    linux-yocto/3.19: fix ARM boot with gcc5.x
    
    Updating the SRCREVs to apply the same fix as 3.14 and 4.1 already
    have to fix qemuarm boots with gcc5.x
    
    [YOCTO: #8415]
    
    (From OE-Core rev: fa9852d5d7383e6d03c756b8ad615668857b0b86)
    
    Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/recipes-kernel/linux/linux-yocto_3.19.bb b/meta/recipes-kernel/linux/linux-yocto_3.19.bb
index 4143a09..3c10bcb 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.19.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.19.bb
@@ -11,14 +11,14 @@ KBRANCH_qemux86  ?= "standard/common-pc"
 KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
 KBRANCH_qemumips64 ?= "standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "963b4df663dba2584ac864e0c016825de0046558"
+SRCREV_machine_qemuarm ?= "857048f10bfe7089ca6007e72431f1c098b07115"
 SRCREV_machine_qemuarm64 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
 SRCREV_machine_qemumips ?= "cedbbc7b5e72df2e820bb9e7885f12132c5e2fff"
 SRCREV_machine_qemuppc ?= "23a83386e10986a63e6cef712a045445499d002b"
 SRCREV_machine_qemux86 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
 SRCREV_machine_qemux86-64 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
 SRCREV_machine_qemumips64 ?= "3eb70cea3532e22ab1b6da9864446621229e6616"
-SRCREV_machine ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
+SRCREV_machine ?= "151571a39785218a57c3ae3355cd63694890cc8d"
 SRCREV_meta ?= "1016714868249d64fc16692fd7679672b1efa17b"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;name=machine;branch=${KBRANCH}; \
Comment 1 Leonardo Sandoval Gonzalez 2015-11-03 22:19:38 UTC
Yi,

Can't reproduce the issue. I did the same steps as you, but let me explicitly included them again:

$ source oe-init-build-env
$ rm -rf tmp sstate-cache/
$ # set MACHINE ??= "qemux86-64" on local.conf
$ yocto-bsp create testintel x86_64 # the same config as you
$ # set 
BBLAYERS += "/home/lsandov1/poky/build/meta-testintel" on bblayers.conf
$ bitbake core-image-minimal

Let me do if something is missing or any other test you want me to do.
Comment 2 Leonardo Sandoval Gonzalez 2015-11-03 22:21:59 UTC
Base on my last comment, I need directions from Yi.
Comment 3 Leonardo Sandoval Gonzalez 2015-11-03 22:54:25 UTC
Yi, My fault, I tested with kernel 4.1, not 3.19. Will try to reproduce it.
Comment 4 Leonardo Sandoval Gonzalez 2015-11-04 14:33:09 UTC
Following steps [1] with poky HEAD fc45deac89ef63ca1c44e763c38ced7dfd72cbe1, I cannot reproduce the issue. Moving it to NEEDINFO.

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8630#c1
Comment 5 Yi Zhao 2015-11-05 07:59:06 UTC
(In reply to comment #4)
> Following steps [1] with poky HEAD fc45deac89ef63ca1c44e763c38ced7dfd72cbe1,
> I cannot reproduce the issue. Moving it to NEEDINFO.
> 
> [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8630#c1

Hi Leonardo,
I still can reproduced it on 3.19 kernel with latest jethro branch. I thought maybe you hadn't changed the bblayers.conf and local.conf before build image. Besides the steps in comment 1, you should also need to add meta-myintelbsp layer to bblayers.conf:

BBLAYERS ?= " \
 /usr/local/dev/Yocto/meta \
 /usr/local/dev/Yocto/meta-yocto \
 /usr/local/dev/Yocto/meta-intel \
 /usr/local/dev/Yocto/meta-myintelbsp \
"

And also need to edit local.conf set MACHINE to myintelbsp:

MACHINE ??= "myintelbsp"
Comment 6 Yi Zhao 2015-11-05 08:05:04 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Following steps [1] with poky HEAD fc45deac89ef63ca1c44e763c38ced7dfd72cbe1,
> > I cannot reproduce the issue. Moving it to NEEDINFO.
> > 
> > [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8630#c1
> 
> Hi Leonardo,
> I still can reproduced it on 3.19 kernel with latest jethro branch. I
> thought maybe you hadn't changed the bblayers.conf and local.conf before
> build image. Besides the steps in comment 1, you should also need to add
> meta-myintelbsp layer to bblayers.conf:
> 
> BBLAYERS ?= " \
>  /usr/local/dev/Yocto/meta \
>  /usr/local/dev/Yocto/meta-yocto \
>  /usr/local/dev/Yocto/meta-intel \
>  /usr/local/dev/Yocto/meta-myintelbsp \
> "
> 
> And also need to edit local.conf set MACHINE to myintelbsp:
> 
> MACHINE ??= "myintelbsp"

Sorry, I missed your comment 1 , you were set the wrong MACHINE name, it should be set your new bsp name.
Comment 7 Stephen K Jolley 2015-11-05 15:48:23 UTC
Info supplied
Comment 8 Leonardo Sandoval Gonzalez 2015-11-05 22:56:57 UTC
Yin.

I was able to reproduce the issue. The MACHINE value was wrong on my first setup, as you figured out.

Now I am testing the patch (attached) in case you want to try it prior sending it to the ML.
Comment 9 Leonardo Sandoval Gonzalez 2015-11-05 22:57:52 UTC
(In reply to comment #8)
> Yin.
> 

I keep telling you Yin, sorry Yi.

> I was able to reproduce the issue. The MACHINE value was wrong on my first
> setup, as you figured out.
> 
> Now I am testing the patch (attached) in case you want to try it prior
> sending it to the ML.
Comment 10 Leonardo Sandoval Gonzalez 2015-11-05 22:58:32 UTC
Created attachment 2839 [details]
proposed patch, to be send to the ML
Comment 11 Leonardo Sandoval Gonzalez 2015-11-06 16:21:45 UTC
Patches sent to the ML. Besides the one attached, another patch was needed in order to set SRCREV to AUTOREV, so it does not depend on a fixed REV value given on the bb linux-yocto recipe.
Comment 12 Leonardo Sandoval Gonzalez 2016-02-02 18:35:32 UTC
Patch (embedded on a series) sent to the ML:

http://lists.openembedded.org/pipermail/openembedded-core/2016-February/116735.html
Comment 13 Leonardo Sandoval Gonzalez 2016-02-11 16:12:22 UTC
Patch merged into Jethro branch:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=jethro&id=a88d6cb170345b7ed4101924e11dd36912deaa29
Comment 14 Yi Zhao 2016-02-16 02:56:45 UTC
Verified with Yocto 2.0.1 rc6 build.
git rev: jethro/5b12268f6e17574999f91628a60e21711cf62ee4