Thank you, I'll send v2. I am waiting RP comments about the other patch of the series for kernel.bbclass which exposed this one issue.
Martin, I tried to remove the patch from patchwork but all stops end 2020. Am I missing something? New links? Thanks all A.A. On Wed, Jun 23, 2021 at 6:02 PM Martin Jansa <[email protected]> wrote: > > On Wed, Jun 23, 2021 at 05:22:21PM +0200, Andrea Adami wrote: > > On Wed, Jun 23, 2021 at 3:51 PM Andrey Zhizhikin <[email protected]> wrote: > > > > > > Hello Andrea, > > > > > > On Wed, Jun 23, 2021 at 3:16 PM Andrea Adami <[email protected]> > > > wrote: > > > > > > > > On Wed, Jun 23, 2021 at 11:32 AM Peter Kjellerstedt > > > > <[email protected]> wrote: > > > > > > > > > > > -----Original Message----- > > > > > > From: [email protected] <openembedded- > > > > > > [email protected]> On Behalf Of Andrea Adami > > > > > > Sent: den 23 juni 2021 00:18 > > > > > > To: [email protected] > > > > > > Subject: [OE-core][PATCH 2/2] kernel.bbclass: inherit > > > > > > kernel_devicetree > > > > > > only if KERNEL_DEVICETREE is set > > > > > > > > > > > > Now it unconditionally tries to create package kernel-devicetre > > > > > > even for > > > > > > legacy devices w/out DT. > > > > > > > > > > > > Signed-off-by: Andrea Adami <[email protected]> > > > > > > --- > > > > > > meta/classes/kernel.bbclass | 2 +- > > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > > > diff --git a/meta/classes/kernel.bbclass > > > > > > b/meta/classes/kernel.bbclass > > > > > > index 06e6446a08..68369e3791 100644 > > > > > > --- a/meta/classes/kernel.bbclass > > > > > > +++ b/meta/classes/kernel.bbclass > > > > > > @@ -779,4 +779,4 @@ addtask deploy after do_populate_sysroot > > > > > > do_packagedata > > > > > > EXPORT_FUNCTIONS do_deploy > > > > > > > > > > > > # Add using Device Tree support > > > > > > -inherit kernel-devicetree > > > > > > +inherit ${@ "" if d.getVar("KERNEL_DEVICETREE" == "") else > > > > > > "kernel-devicetree" } > > > > > > > > > > That doesn't look correct. Don't you mean something like this: > > > > > > > > > > inherit ${@ "kernel-devicetree" if d.getVar("KERNEL_DEVICETREE") else > > > > > "" } > > > > > > > > > > > > > As you prefer, I don't think bitbake has likely/unlikely optimization. > > > > I took the style-example from line 6 where it reads > > > > > > > > KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == > > > > "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }" > > > > > > > > I am for any option providing a guard. > > > > > > I guess you've missed the closing bracket in your statement, please > > > take a look at the comparison operator. > > > > The code as it is doesn't raise any parse error. > > There is opening bracket and closing bracket, what more? > > d.getVar("KERNEL_DEVICETREE" == "") > vs > d.getVar("KERNEL_DEVICETREE") == "" > > > We can discuss about the form, someone suggested anonymous python for > > both patches. > > > > Thanks for reviewing > > A.A. > > > > > > > > As yet another option, maybe even something like this: > > > inherit ${@oe.utils.ifelse(d.getVar('KERNEL_DEVICETREE') == '', '', > > > 'kernel-devicetree')} > > > > > > However, I'm not sure what would happened if KERNEL_DEVICETREE is > > > undefined, as in this case bitbake should return "None" according to > > > the documentation. > > > > > > > > > > > Cheers > > > > A.A. > > > > > > > > > > > > > > -- > > > > > > 2.17.1 > > > > > > > > > > //Peter > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Regards, > > > Andrey. > > > > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#153246): https://lists.openembedded.org/g/openembedded-core/message/153246 Mute This Topic: https://lists.openembedded.org/mt/83725509/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
