<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"><<a href="mailto:bruce.ashfield@gmail.com" target="_blank">bruce.ashfield@gmail.com</a>></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"><<a href="mailto:peter.kjellerstedt@axis.com" target="_blank">peter.kjellerstedt@axis.com</a>></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">> -----Original Message-----<br>
> From: <a href="mailto:openembedded-core-bounces@lists.openembedded.org" target="_blank">openembedded-core-bounces@list<wbr>s.openembedded.org</a><br>
> [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>
> Bruce Ashfield<br>
> Sent: den 21 augusti 2017 04:58<br>
> To: <a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation<wbr>.org</a><br>
> Cc: <a href="mailto:openembedded-core@lists.openembedded.org" target="_blank">openembedded-core@lists.openem<wbr>bedded.org</a><br>
> Subject: [OE-core] [PATCH 8/9] kernel-yocto: ensure that only valid<br>
> BSPs are built<br>
><br>
> There was a bug in the search routines responsible for locating<br>
> BSP definitions which returned a valid match if only the ktype<br>
> matched.<br>
><br>
> This meant that someone looking for "qemux86foo" (which is an<br>
> invalid definition) would potentially end up building "qemuarm"<br>
> and be none the wiser (until it didn't boot).<br>
><br>
> With this fix to the tools search routine, and improved return<br>
> code testing, we will now stop the build and report and error to<br>
> the user.<br>
><br>
> [YOCTO: #11878]<br>
><br>
> Signed-off-by: Bruce Ashfield <<a href="mailto:bruce.ashfield@windriver.com" target="_blank">bruce.ashfield@windriver.com</a>><br>
> ---<br>
> meta/classes/kernel-yocto.bbcl<wbr>ass | 3 +++<br>
> 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>
> 2 files changed, 4 insertions(+), 1 deletion(-)<br>
><br>
> 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>
> index 1ca0756c4959..3c6df92131bc 100644<br>
> --- a/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class<br>
> +++ b/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class<br>
> @@ -143,6 +143,9 @@ do_kernel_metadata() {<br>
><br>
> # expand kernel features into their full path equivalents<br>
> bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE})<br>
> + if [ $? -ne 0 ] || [ -z "${bsp_definition}" ]; 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'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'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>
> + bbfatal_log "Could not locate BSP definiton for ${KMACHINE}/${LINUX_KERNEL_TYP<wbr>E}."<br>
<br>
</span>Change "definiton" to "definition".<br>
<span class="m_-6619940750513795977im m_-6619940750513795977HOEnZb"><br>
> + fi<br>
> meta_dir=$(kgit --meta)<br>
><br>
> # run1: pull all the configuration fragments, no matter where they come from<br>
> 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>
> index 2217a31076a2..4a78b897d34f 100644<br>
> --- 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>
> +++ 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>
> @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginli<wbr>ne=5;endline=9;md5=a6c2fa8aef1<wbr>b<br>
><br>
> DEPENDS = "git-native"<br>
><br>
> -SRCREV = "9cd2b626d652bec10c6bc75275b35<wbr>bfee74d447c"<br>
> +SRCREV = "0571411cc033c11df7827508dd786<wbr>876ce2f8c83"<br>
> PR = "r12"<br>
> PV = "0.2+git${SRCPV}"<br>
><br>
> --<br>
> 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">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>