From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f46.google.com (mail-vk0-f46.google.com [209.85.213.46]) by mail.openembedded.org (Postfix) with ESMTP id 2BA457831F for ; Mon, 21 Aug 2017 15:18:14 +0000 (UTC) Received: by mail-vk0-f46.google.com with SMTP id n125so51174266vke.1 for ; Mon, 21 Aug 2017 08:18:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MbfHDrYOG1IhV4Aq0jb9JnvrFMBTYeV3ZEbuRdnHHwo=; b=kS2McXz0ZPIkeaM2chflze7HkRpAZkC9d7pu3kK5wG0ziVBwMDdnplcNKln65j3atc srHDF82YcMKs9/PVoT/8byKsCYErd/DEMFSlXkaJyWV87R2l1F8gHTX+GU7EbphE7JWQ b/eSsMVnnhzRAarIgK5TAdKeEOq9FZ0JKzUUp+9gexQdisxwmL6zalX/MhHhH4SlL9nv L/iy0Y1PIV8L+Y2e5m2MWAMBn536fIPKyou30renjMnfs9QRjou41jCSRyqfj7cvj0tM VMtc9B5PAUU5dyRjmdBRXNz8PTt7aIhzaGoIaiFx3VSeB93mM+5UwkdSRtcb3RS/HML/ q4YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MbfHDrYOG1IhV4Aq0jb9JnvrFMBTYeV3ZEbuRdnHHwo=; b=GTC/y17bHTTTJgf6j6jwHPhna+iJ0ZrXF4aO4Jh83YTQ0mdEeW5pDCx+3eRBxVnEJV pMusT1sBvc89VbIamt+D7oDoVP/jhjFQqMfNqQZvMfTFFLhCwvznDRGAHx6cWbNKiPGv hB4e73O84dfC1iAJbpXfZFxaImoAWtx9ysqpNZerX5/hyXljAAzkQVOlzohHq6xmQ3fg 49/7IZVN1+H5uTxd/OZn0+lit+qUCn/n35jbgJh//QIx7smq8ts8r//VfWDffNiugS1i EyS9FpIKLPRVjmOzI2uP3fW01/c7i6EM/dZIrrBZR5FTpP4Mu0XUGfRbIqH0oDsmcuNg 9cFw== X-Gm-Message-State: AHYfb5gkV3mpukYwNo7qAs8twR9lkKJkzX2ItFMPCz9s/bI38KXSGDbK GT8uXJxvnyF/tVgs9TmQBxfNJaq5/g== X-Received: by 10.31.209.71 with SMTP id i68mr10018475vkg.188.1503328696158; Mon, 21 Aug 2017 08:18:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.34.235 with HTTP; Mon, 21 Aug 2017 08:18:15 -0700 (PDT) In-Reply-To: <0e7ac88f282741288f27b4c7774b5f9a@XBOX02.axis.com> References: <0e7ac88f282741288f27b4c7774b5f9a@XBOX02.axis.com> From: Bruce Ashfield Date: Mon, 21 Aug 2017 11:18:15 -0400 Message-ID: To: Peter Kjellerstedt Cc: "openembedded-core@lists.openembedded.org" Subject: Re: [PATCH 8/9] kernel-yocto: ensure that only valid BSPs are built X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2017 15:18:15 -0000 Content-Type: multipart/alternative; boundary="001a114e2482ea4e46055744fcd1" --001a114e2482ea4e46055744fcd1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 21, 2017 at 11:16 AM, Peter Kjellerstedt < peter.kjellerstedt@axis.com> wrote: > Just in case you missed it (as you didn=E2=80=99t comment on my comment a= bout it), > there was a typo in the log message as well. > Yup. Noticed that, it isn't the only typo ;) This is a resend of a patch I sent a few weeks ago, so I'm not too worried if it sits or not. Cheers, Bruce > > > //Peter > > > > *From:* Bruce Ashfield [mailto:bruce.ashfield@gmail.com] > *Sent:* den 21 augusti 2017 17:14 > *To:* Peter Kjellerstedt > *Cc:* richard.purdie@linuxfoundation.org; openembedded-core@lists. > openembedded.org > *Subject:* Re: [OE-core] [PATCH 8/9] kernel-yocto: ensure that only valid > BSPs are built > > > > > > > > On Mon, Aug 21, 2017 at 11:03 AM, Bruce Ashfield > wrote: > > > > > > On Mon, Aug 21, 2017 at 11:00 AM, Peter Kjellerstedt < > peter.kjellerstedt@axis.com> wrote: > > > -----Original Message----- > > From: openembedded-core-bounces@lists.openembedded.org > > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of > > Bruce Ashfield > > Sent: den 21 augusti 2017 04:58 > > To: richard.purdie@linuxfoundation.org > > Cc: openembedded-core@lists.openembedded.org > > Subject: [OE-core] [PATCH 8/9] kernel-yocto: ensure that only valid > > BSPs are built > > > > There was a bug in the search routines responsible for locating > > BSP definitions which returned a valid match if only the ktype > > matched. > > > > This meant that someone looking for "qemux86foo" (which is an > > invalid definition) would potentially end up building "qemuarm" > > and be none the wiser (until it didn't boot). > > > > With this fix to the tools search routine, and improved return > > code testing, we will now stop the build and report and error to > > the user. > > > > [YOCTO: #11878] > > > > Signed-off-by: Bruce Ashfield > > --- > > meta/classes/kernel-yocto.bbclass | 3 +++ > > meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +- > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/ > kernel-yocto.bbclass > > index 1ca0756c4959..3c6df92131bc 100644 > > --- a/meta/classes/kernel-yocto.bbclass > > +++ b/meta/classes/kernel-yocto.bbclass > > @@ -143,6 +143,9 @@ do_kernel_metadata() { > > > > # expand kernel features into their full path equivalents > > bsp_definition=3D$(spp ${includes} --find -DKMACHINE=3D${KMACHINE= } > -DKTYPE=3D${LINUX_KERNEL_TYPE}) > > + if [ $? -ne 0 ] || [ -z "${bsp_definition}" ]; then > > Use $bsp_definition instead of ${bsp_definition} since it is a > shell variable and not a bitbake variable. > > > > I always use ${...}, so I'm going to stay consistent with what is already > in > > the file. > > > > > Actually, after looking at the code in that bbclass, I see this > used for a number of shell variables all over the place. This is > actually bad, and you should rewrite the code to not use ${variable} > for shell variables. The reason this is bad is because these > variables unnecessarily end up in the sstate hash for these functions, > and if someone actually happens to define a bitbake variable with the > same name as one of those shell variables, the result will not be what > is expected... > > > > Not something high on my priority list. It's been that way since the > beginning. > > > > .. but I will loop back and take care of the issues before M4 closes. Jus= t > a bit busy > > pushing out the new kernels and a slew of bug fixes. > > > > This patch can be ignored (if needed) until I get back around to that. > > > > Cheers, > > > > Bruce > > > > > > Cheers, > > > > Bruce > > > > > > + bbfatal_log "Could not locate BSP definiton for > ${KMACHINE}/${LINUX_KERNEL_TYPE}." > > Change "definiton" to "definition". > > > + fi > > meta_dir=3D$(kgit --meta) > > > > # run1: pull all the configuration fragments, no matter where the= y > come from > > diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb > b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb > > index 2217a31076a2..4a78b897d34f 100644 > > --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb > > +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb > > @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM =3D "file://git/tools/kgit; > beginline=3D5;endline=3D9;md5=3Da6c2fa8aef1b > > > > DEPENDS =3D "git-native" > > > > -SRCREV =3D "9cd2b626d652bec10c6bc75275b35bfee74d447c" > > +SRCREV =3D "0571411cc033c11df7827508dd786876ce2f8c83" > > PR =3D "r12" > > PV =3D "0.2+git${SRCPV}" > > > > -- > > 2.5.0 > > //Peter > > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core > > > > > > -- > > "Thou shalt not follow the NULL pointer, for chaos and madness await thee > at its end" > > > > > > -- > > "Thou shalt not follow the NULL pointer, for chaos and madness await thee > at its end" > --=20 "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" --001a114e2482ea4e46055744fcd1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Aug 21, 2017 at 11:16 AM, Peter Kjellerstedt = <peter.= kjellerstedt@axis.com> wrote:

Just in case you misse= d it (as you didn=E2=80=99t comment on my comment about it), there was a ty= po in the log message as well.


=
Yup. Noticed that, it isn't the only typo ;)

<= /div>
This is a resend of a patch I sent a few weeks ago, so I'm no= t too worried if it sits or not.

Cheers,

Bruce
=C2=A0
=

=

=C2=A0

//Peter<= /span>

=C2=A0

From: = Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
Sent: den 21 augusti 2017 17:14
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: richard.purdie@linuxfoundation.org; openembedded-core@l= ists.openembedded.org
Subject: Re: [OE-core] [PATCH 8/9] kernel-yocto: ensure that only va= lid BSPs are built

=C2=A0

=C2=A0

=C2=A0

On Mon, Aug 21, 2017 at 11:03 AM, Bruce Ashfield <= ;bruce.ashfie= ld@gmail.com> wrote:

=C2=A0

=C2=A0

On Mon, Aug 21, 2017 at 11:00 AM, Peter Kjellerstedt= <peter= .kjellerstedt@axis.com> wrote:

> -----Original Me= ssage-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.o= rg] On Behalf Of
> Bruce Ashfield
> Sent: den 21 augusti 2017 04:58
> To: richard.purdie@linuxfoundation.org
> Cc: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 8/9] kernel-yocto: ensure that only valid > BSPs are built
>
> There was a bug in the search routines responsible for locating
> BSP definitions which returned a valid match if only the ktype
> matched.
>
> This meant that someone looking for "qemux86foo" (which is a= n
> invalid definition) would potentially end up building "qemuarm&qu= ot;
> and be none the wiser (until it didn't boot).
>
> With this fix to the tools search routine, and improved return
> code testing, we will now stop the build and report and error to
> the user.
>
> [YOCTO: #11878]
>
> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> ---
>=C2=A0 meta/classes/kernel-yocto.bbclass=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 3 +++
>=C2=A0 meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +-
>=C2=A0 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
> index 1ca0756c4959..3c6df92131bc 100644
> --- a/meta/classes/kernel-yocto.bbclass
> +++ b/meta/classes/kernel-yocto.bbclass
> @@ -143,6 +143,9 @@ do_kernel_metadata() {
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0# expand kernel features into their full pat= h equivalents
>=C2=A0 =C2=A0 =C2=A0 =C2=A0bsp_definition=3D$(spp ${includes} --find -D= KMACHINE=3D${KMACHINE} -DKTYPE=3D${LINUX_KERNEL_TYPE})
> +=C2=A0 =C2=A0 =C2=A0if [ $? -ne 0 ] || [ -z "${bsp_definition}&q= uot; ]; then

Use $bsp_definition instead of ${bsp_definition} sin= ce it is a
shell variable and not a bitbake variable.

=C2=A0

I always use ${...}, so I'm going to stay consis= tent with what is already in

the file.=C2=A0

=C2=A0


Actually, after looking at the code in that bbclass, I see this
used for a number of shell variables all over the place. This is
actually bad, and you should rewrite the code to not use ${variable}
for shell variables. The reason this is bad is because these
variables unnecessarily end up in the sstate hash for these functions,
and if someone actually happens to define a bitbake variable with the
same name as one of those shell variables, the result will not be what
is expected...

=C2=A0

Not something high on my priority list. It's bee= n that way since the beginning.

=C2=A0

.. but I will loop back and take care of the issues = before M4 closes. Just a bit busy

pushing out the new kernels and a slew of bug fixes.=

=C2=A0

This patch can be ignored (if needed) until I get ba= ck around to that.

=C2=A0

Cheers,

=C2=A0

Bruce

=C2=A0

=C2=A0

Cheers,

=C2=A0

Bruce

=C2=A0


> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bbfatal_log "Cou= ld not locate BSP definiton for ${KMACHINE}/${LINUX_KERNEL_TYPE}."= ;

Change "definiton" to "definition".

> +=C2=A0 = =C2=A0 =C2=A0fi
>=C2=A0 =C2= =A0 =C2=A0 =C2=A0meta_dir=3D$(kgit --meta)
> >=C2=A0 =C2= =A0 =C2=A0 =C2=A0# run1: pull all the configuration fragments, no matter wh= ere they come from
> diff --gi= t a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kern= el/kern-tools/kern-tools-native_git.bb
> index 221= 7a31076a2..4a78b897d34f 100644
> --- a/met= a/recipes-kernel/kern-tools/kern-tools-native_git.bb
> +++ b/met= a/recipes-kernel/kern-tools/kern-tools-native_git.bb
> @@ -4,7 += 4,7 @@ LIC_FILES_CHKSUM =3D "file://git/tools/kgit;beginline= =3D5;endline=3D9;md5=3Da6c2fa8aef1b
>
>=C2=A0 DEPENDS =3D
"git-native"

> > -SRCREV = =3D "9cd2b626d652bec10c6bc75275b35bfee74d447c" > +SRCREV = =3D "0571411cc033c11df7827508dd786876ce2f8c83" >=C2=A0 PR = =3D "r12"
>=C2=A0 PV = =3D "0.2+git${SRCPV}"
> > --=
> 2.5.0

//Peter


--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/ope= nembedded-core



=C2=A0

--

"Thou shalt not f= ollow the NULL pointer, for chaos and madness await thee at its end"



=C2=A0

--

"Thou shalt not follow the NULL pointer, for ch= aos and madness await thee at its end"




--
"Thou shalt no= t follow the NULL pointer, for chaos and madness await thee at its end"= ;
--001a114e2482ea4e46055744fcd1--