<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 21, 2017 at 11:03 AM, Bruce Ashfield <span dir="ltr">&lt;<a href="mailto:bruce.ashfield@gmail.com" target="_blank">bruce.ashfield@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Aug 21, 2017 at 11:00 AM, Peter Kjellerstedt <span dir="ltr">&lt;<a href="mailto:peter.kjellerstedt@axis.com" target="_blank">peter.kjellerstedt@axis.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-6619940750513795977HOEnZb"><div class="m_-6619940750513795977h5">&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:openembedded-core-bounces@lists.openembedded.org" target="_blank">openembedded-core-bounces@list<wbr>s.openembedded.org</a><br>
&gt; [mailto:<a href="mailto:openembedded-core-bounces@lists.openembedded.org" target="_blank">openembedded-core-boun<wbr>ces@lists.openembedded.org</a>] On Behalf Of<br>
&gt; Bruce Ashfield<br>
&gt; Sent: den 21 augusti 2017 04:58<br>
&gt; To: <a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation<wbr>.org</a><br>
&gt; Cc: <a href="mailto:openembedded-core@lists.openembedded.org" target="_blank">openembedded-core@lists.openem<wbr>bedded.org</a><br>
&gt; Subject: [OE-core] [PATCH 8/9] kernel-yocto: ensure that only valid<br>
&gt; BSPs are built<br>
&gt;<br>
&gt; There was a bug in the search routines responsible for locating<br>
&gt; BSP definitions which returned a valid match if only the ktype<br>
&gt; matched.<br>
&gt;<br>
&gt; This meant that someone looking for &quot;qemux86foo&quot; (which is an<br>
&gt; invalid definition) would potentially end up building &quot;qemuarm&quot;<br>
&gt; and be none the wiser (until it didn&#39;t boot).<br>
&gt;<br>
&gt; With this fix to the tools search routine, and improved return<br>
&gt; code testing, we will now stop the build and report and error to<br>
&gt; the user.<br>
&gt;<br>
&gt; [YOCTO: #11878]<br>
&gt;<br>
&gt; Signed-off-by: Bruce Ashfield &lt;<a href="mailto:bruce.ashfield@windriver.com" target="_blank">bruce.ashfield@windriver.com</a>&gt;<br>
&gt; ---<br>
&gt;  meta/classes/kernel-yocto.bbcl<wbr>ass                       | 3 +++<br>
&gt;  meta/recipes-kernel/kern-tools<wbr>/<a href="http://kern-tools-native_git.bb" rel="noreferrer" target="_blank">kern-tools-native_git.bb</a> | 2 +-<br>
&gt;  2 files changed, 4 insertions(+), 1 deletion(-)<br>
&gt;<br>
&gt; diff --git a/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class b/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class<br>
&gt; index 1ca0756c4959..3c6df92131bc 100644<br>
&gt; --- a/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class<br>
&gt; +++ b/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class<br>
&gt; @@ -143,6 +143,9 @@ do_kernel_metadata() {<br>
&gt;<br>
&gt;       # expand kernel features into their full path equivalents<br>
&gt;       bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE})<br>
&gt; +     if [ $? -ne 0 ] || [ -z &quot;${bsp_definition}&quot; ]; then<br>
<br>
</div></div>Use $bsp_definition instead of ${bsp_definition} since it is a<br>
shell variable and not a bitbake variable.<br></blockquote><div><br></div></div></div><div>I always use ${...}, so I&#39;m going to stay consistent with what is already in</div><div>the file. </div><span class=""><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Actually, after looking at the code in that bbclass, I see this<br>
used for a number of shell variables all over the place. This is<br>
actually bad, and you should rewrite the code to not use ${variable}<br>
for shell variables. The reason this is bad is because these<br>
variables unnecessarily end up in the sstate hash for these functions,<br>
and if someone actually happens to define a bitbake variable with the<br>
same name as one of those shell variables, the result will not be what<br>
is expected...<br></blockquote><div><br></div></span><div>Not something high on my priority list. It&#39;s been that way since the beginning.</div></div></div></div></blockquote><div><br></div><div>.. but I will loop back and take care of the issues before M4 closes. Just a bit busy</div><div>pushing out the new kernels and a slew of bug fixes.</div><div><br></div><div>This patch can be ignored (if needed) until I get back around to that.</div><div><br></div><div>Cheers,</div><div><br></div><div>Bruce</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Cheers,</div><div><br></div><div>Bruce</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><br>
&gt; +             bbfatal_log &quot;Could not locate BSP definiton for ${KMACHINE}/${LINUX_KERNEL_TYP<wbr>E}.&quot;<br>
<br>
</span>Change &quot;definiton&quot; to &quot;definition&quot;.<br>
<span class="m_-6619940750513795977im m_-6619940750513795977HOEnZb"><br>
&gt; +     fi<br>
&gt;       meta_dir=$(kgit --meta)<br>
&gt;<br>
&gt;       # run1: pull all the configuration fragments, no matter where they come from<br>
&gt; diff --git a/meta/recipes-kernel/kern-too<wbr>ls/<a href="http://kern-tools-native_git.bb" rel="noreferrer" target="_blank">kern-tools-native_git.bb</a> b/meta/recipes-kernel/kern-too<wbr>ls/<a href="http://kern-tools-native_git.bb" rel="noreferrer" target="_blank">kern-tools-native_git.bb</a><br>
&gt; index 2217a31076a2..4a78b897d34f 100644<br>
&gt; --- a/meta/recipes-kernel/kern-too<wbr>ls/<a href="http://kern-tools-native_git.bb" rel="noreferrer" target="_blank">kern-tools-native_git.bb</a><br>
&gt; +++ b/meta/recipes-kernel/kern-too<wbr>ls/<a href="http://kern-tools-native_git.bb" rel="noreferrer" target="_blank">kern-tools-native_git.bb</a><br>
&gt; @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = &quot;file://git/tools/kgit;beginli<wbr>ne=5;endline=9;md5=a6c2fa8aef1<wbr>b<br>
&gt;<br>
&gt;  DEPENDS = &quot;git-native&quot;<br>
&gt;<br>
&gt; -SRCREV = &quot;9cd2b626d652bec10c6bc75275b35<wbr>bfee74d447c&quot;<br>
&gt; +SRCREV = &quot;0571411cc033c11df7827508dd786<wbr>876ce2f8c83&quot;<br>
&gt;  PR = &quot;r12&quot;<br>
&gt;  PV = &quot;0.2+git${SRCPV}&quot;<br>
&gt;<br>
&gt; --<br>
&gt; 2.5.0<br>
<br>
</span><span class="m_-6619940750513795977HOEnZb"><font color="#888888">//Peter<br>
</font></span><div class="m_-6619940750513795977HOEnZb"><div class="m_-6619940750513795977h5"><br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openem<wbr>bedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</div></div></blockquote></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-6619940750513795977gmail_signature" data-smartmail="gmail_signature">&quot;Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end&quot;</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">&quot;Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end&quot;</div>
</div></div>