<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3217</bug_id>
          
          <creation_ts>2012-10-03 15:53:08 +0000</creation_ts>
          <short_desc>meta-cedartrail and meta-crownbay discard SRC_URI additions</short_desc>
          <delta_ts>2012-10-08 08:36:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-meta-intel</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mihai Lindner">mihai.lindner</reporter>
          <assigned_to name="Tom Zanussi">tom.zanussi</assigned_to>
          <cc>dvhart</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26150</commentid>
    <comment_count>0</comment_count>
    <who name="Mihai Lindner">mihai.lindner</who>
    <bug_when>2012-10-03 15:53:08 +0000</bug_when>
    <thetext>meta-intel: 2c1e927fa99abe47865a03cf661d4757ff3147c6

BBLAYERS ?= &quot; \
  /home/mihai/poky/meta \
  /home/mihai/poky/meta-yocto \
  /home/mihai/poky/meta-yocto-bsp \
  /home/mihai/meta-intel \
  /home/mihai/meta-intel/meta-cedartrail \
  /home/mihai/meta-intel/meta-tlk \
  &quot;

Using meta-tlk, SRC_URI should have file://time-limited-kernel.cfg included, but it&apos;s not there.

$ bitbake -e linux-yocto | grep SRC_URI=
# SRC_URI=git://git.yoctoproject.org/linux-yocto-3.0;protocol=git;bareclone=1;branch=${KBRANCH},meta,yocto/pvr;name=machine,meta,pvr
SRC_URI=&quot;git://git.yoctoproject.org/linux-yocto-3.0;protocol=git;bareclone=1;branch=yocto/standard/cedartrail,meta,yocto/pvr;name=machine,meta,pvr&quot;

The result is a TLK image without time limit config in the kernel.
# CONFIG_UPTIME_LIMITED_KERNEL is not set

Common for meta-cedartrail and meta-crownbay only (and not used in other BSPs), both have SRC_URI_machine in linux-yocto_*.bbappend recipes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26152</commentid>
    <comment_count>1</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-10-03 16:01:20 +0000</bug_when>
    <thetext>I gather this is so that they can specify the emgd branch. However, the meta data should manage this internally by the machine scc file:

$ cat crownbay-standard.scc 
define KMACHINE crownbay
define KTYPE standard
define KARCH i386

include ktypes/standard
branch crownbay

git merge emgd-1.14

include crownbay.scc

# default policy for standard kernels
include cfg/usb-mass-storage.scc
include cfg/boot-live.scc
include features/latencytop/latencytop.scc
include features/profiling/profiling.scc


It merges emgd-1.14, so I don&apos;t see any value in specifying the emgd branch in the recipe. I believe the right approach would be to include emgd.scc in KERNEL_FEATURES_crownbay and not in KERNEL_FEATURES_crownbay-noemgd and remove the git merge from the crownbay-standard.scc.

Same for cedartrail.

Tom, thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26155</commentid>
    <comment_count>2</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-10-03 16:05:46 +0000</bug_when>
    <thetext>In my opinion this would be resolved with a fix to Bug 2268.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26159</commentid>
    <comment_count>3</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-10-03 16:11:02 +0000</bug_when>
    <thetext>The build system needs to be able to figure out when to rebuild when SRCREVs change, and so all branches that contribute to the built tree need an entry in the SRCREV.

There isn&apos;t currently a way to append a new branch to the base set from the kernel recipe (maybe an enhancement bug needs to be filed for this), so the SRC_URI needs to be overridden in the bbappend.  A BSP should be able do to that and the layering priorities and .bbappend ordering of application should allow other appends to behave as expected.

The fact that it&apos;s not suggests a deeper problem (or some other misconfiguration).  From the original thread:

---

It shouldn&apos;t though, since the application of the meta-tlk SRC_URI
bbappend should follow the SRC_URI assignment in the cedartrail
bbappend.  On the other hand, the layer priorities don&apos;t seem to be
right - meta-cedartrail is supposed to have a priority of 6, but it
doesn&apos;t actually seem to:

BBFILE_PRIORITY_cedartrail = &quot;6&quot; 

[trz@empanada build]$ bitbake-layers show_layers
layer                 path                                      priority
==========================================================================
meta                  /home/trz/yocto/crownbay-test/meta        5
meta-yocto            /home/trz/yocto/crownbay-test/meta-yocto  5
meta-yocto-bsp        /home/trz/yocto/crownbay-test/meta-yocto-bsp  5
meta-intel            /home/trz/yocto/crownbay-test/meta-intel  5
meta-cedartrail       /home/trz/yocto/crownbay-test/meta-intel/meta-cedartrail  5
meta-tlk              /home/trz/yocto/crownbay-test/meta-intel/meta-tlk  5

On the other hand, meta-tlk does follow meta-cedatrail in the parse
order so should append to the SRC_URI...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26168</commentid>
    <comment_count>4</comment_count>
    <who name="Mihai Lindner">mihai.lindner</who>
    <bug_when>2012-10-03 16:46:50 +0000</bug_when>
    <thetext>Maybe the layer priority issue should be treated separately.
After a few tryouts, I&apos;ve noticed that priority doesn&apos;t solve this issue.
With meta-intel/meta-cedartrail placed above meta-intel, in BBLAYERS, the correct priority is listed, but the SRC_URI append is still ignored.

mihai@localhost:~/cedartrail$ bitbake-layers show_layers
layer                 path                                      priority
==========================================================================
meta                  /home/mihai/poky/meta                     5
meta-yocto            /home/mihai/poky/meta-yocto               5
meta-yocto-bsp        /home/mihai/poky/meta-yocto-bsp           5
meta-cedartrail       /home/mihai/meta-intel/meta-cedartrail    6
meta-intel            /home/mihai/meta-intel                    5
meta-tlk              /home/mihai/meta-intel/meta-tlk           5

I was thinking that SRC_URI_machine simply becomes SRC_URI, disregarding its previous value that had file://time-limited-kernel.cfg already appended, instead of just replacing the actual URI.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26169</commentid>
    <comment_count>5</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-10-03 16:54:26 +0000</bug_when>
    <thetext>Good point Tom.

I wonder, could this be resolved by adding the TLK to SRC_URI_append instead of to the SRC_URI directly? Then it could be added to whatever SRC_URI was during eval?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26170</commentid>
    <comment_count>6</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-10-03 17:12:02 +0000</bug_when>
    <thetext>So using SRC_URI_append in meta-tlk results in:

ERROR: ExpansionError during parsing /home/dvhart/source/poky/meta/recipes-kernel/linux/linux-yocto_3.4.bb: Failure expanding variable do_patch: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure for URL: &apos;git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckout=1;branch=standard/crownbay,meta,emgd-1.14;name=machine,meta,emgdfile://time-limited-kernel.cfg&apos;. Please set SRCREV to a valid value


Which shows it is getting appended, but without a new line. Using a newline results in:

ERROR: ExpansionError during parsing /home/dvhart/source/poky/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb: Failure expanding variable do_patch: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command failed with exit code 128, output:
fatal: No path specified. See &apos;man git-pull&apos; for valid url syntax

It isn&apos;t clear to me why this fails. Some subtlety with the way the _append operator works?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26196</commentid>
    <comment_count>7</comment_count>
    <who name="Mihai Lindner">mihai.lindner</who>
    <bug_when>2012-10-04 09:31:17 +0000</bug_when>
    <thetext>Indeed a solution for this, on the meta-tlk side, would be to use either of the following:
SRC_URI_append += &quot;file://time-limited-kernel.cfg&quot;
SRC_URI_append = &quot; file://time-limited-kernel.cfg &quot;

But is this ok?
I see this more as a workaround, than a solution.

Darren, you said that SRC_URI of the BSPs should be handled internally, and there&apos;s no need for adding emgd / pvr branches to the URI. So can a fix be managed on the BSP side, to drop using SRC_URI_machine?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26228</commentid>
    <comment_count>8</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-10-04 13:57:57 +0000</bug_when>
    <thetext>The branches need to be in the SRC_URI - the fetcher checks the branch SRCREVs to see whether it needs to re-fetch the kernel.  If it doesn&apos;t, the build system has no idea it needs to update and won&apos;t, and the kernel build will try to build against old sources and at some point will fail.

So because we need the additional branch in the SRC_URI and there&apos;s no way to append it, we need to change the whole SRC_URI.  While not normally done, it should be possible to do that if necessary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26241</commentid>
    <comment_count>9</comment_count>
    <who name="Mihai Lindner">mihai.lindner</who>
    <bug_when>2012-10-04 15:05:02 +0000</bug_when>
    <thetext>Okay, change it meta-tlk it is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26303</commentid>
    <comment_count>10</comment_count>
    <who name="Mihai Lindner">mihai.lindner</who>
    <bug_when>2012-10-06 11:22:31 +0000</bug_when>
    <thetext>Merged in meta-intel/master

http://git.yoctoproject.org/cgit.cgi/meta-intel/commit/?id=7228f6b0c81817c8a8455ea78271abfd5d66fed8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26317</commentid>
    <comment_count>11</comment_count>
    <who name="Mihai Lindner">mihai.lindner</who>
    <bug_when>2012-10-08 08:36:51 +0000</bug_when>
    <thetext>Also merged http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/commit/?id=f76c3a98c8f19501b66e2827f20b395b03e5aefc

Now it works fine.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>