<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">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="HOEnZb"><div class="h5">> -----Original Message-----<br>
> From: <a href="mailto:openembedded-core-bounces@lists.openembedded.org">openembedded-core-bounces@<wbr>lists.openembedded.org</a><br>
> [mailto:<a href="mailto:openembedded-core-bounces@lists.openembedded.org">openembedded-core-<wbr>bounces@lists.openembedded.org</a><wbr>] On Behalf Of<br>
> Bruce Ashfield<br>
> Sent: den 21 augusti 2017 04:58<br>
> To: <a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@<wbr>linuxfoundation.org</a><br>
> Cc: <a href="mailto:openembedded-core@lists.openembedded.org">openembedded-core@lists.<wbr>openembedded.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">bruce.ashfield@windriver.com</a>><br>
> ---<br>
> meta/classes/kernel-yocto.<wbr>bbclass | 3 +++<br>
> meta/recipes-kernel/kern-<wbr>tools/<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/kernel-yocto.<wbr>bbclass b/meta/classes/kernel-yocto.<wbr>bbclass<br>
> index 1ca0756c4959..3c6df92131bc 100644<br>
> --- a/meta/classes/kernel-yocto.<wbr>bbclass<br>
> +++ b/meta/classes/kernel-yocto.<wbr>bbclass<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>I always use ${...}, so I'm going to stay consistent with what is already in</div><div>the file. </div><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><div>Not something high on my priority list. It's been that way since the beginning.</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">
<span class=""><br>
> + bbfatal_log "Could not locate BSP definiton for ${KMACHINE}/${LINUX_KERNEL_<wbr>TYPE}."<br>
<br>
</span>Change "definiton" to "definition".<br>
<span class="im HOEnZb"><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-<wbr>tools/<a href="http://kern-tools-native_git.bb" rel="noreferrer" target="_blank">kern-tools-native_git.bb</a> b/meta/recipes-kernel/kern-<wbr>tools/<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-<wbr>tools/<a href="http://kern-tools-native_git.bb" rel="noreferrer" target="_blank">kern-tools-native_git.bb</a><br>
> +++ b/meta/recipes-kernel/kern-<wbr>tools/<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;<wbr>beginline=5;endline=9;md5=<wbr>a6c2fa8aef1b<br>
><br>
> DEPENDS = "git-native"<br>
><br>
> -SRCREV = "<wbr>9cd2b626d652bec10c6bc75275b35b<wbr>fee74d447c"<br>
> +SRCREV = "<wbr>0571411cc033c11df7827508dd7868<wbr>76ce2f8c83"<br>
> PR = "r12"<br>
> PV = "0.2+git${SRCPV}"<br>
><br>
> --<br>
> 2.5.0<br>
<br>
</span><span class="HOEnZb"><font color="#888888">//Peter<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.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></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>