Skip to contentSkip to conversation

u-boot: use openssl-native.bbclass

PATCH Superseded Mikko Rapeli 3 participants 5 messages Oct 4, 2022 – Oct 5, 2022

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 3/5 u-boot: use openssl-native.bbclass

It sets all environment variables correctly for openssl-native.

---
 meta/recipes-bsp/u-boot/u-boot.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-bsp/u-boot/u-boot.inc +2 -1
index f022aed732..cd9c578962 100644
@@ -17,7 +17,8 @@ PACKAGECONFIG ??= "openssl"
 # u-boot will compile its own tools during the build, with specific
 # configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as
 # a host build dependency.
-PACKAGECONFIG[openssl] = ",,openssl-native"
+OPENSSL_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'openssl', 'openssl-native', '', d)}"
+inherit ${OPENSSL_INHERIT}
 
 # Allow setting an additional version string that will be picked up by the
 # u-boot build system and appended to the u-boot version.  If the .scmversion
Signature · 1 line
2.17.1
#1 lore raw

Hello Mikko,

Quoted 3 lines · On Tue, 4 Oct 2022 18:28:07 +0300 "Mikko Rapeli" <[email protected]>…

It sets all environment variables correctly for openssl-native.

I'm taking this patch for testing, however I have a question, see below.

Quoted 9 lines
---
 meta/recipes-bsp/u-boot/u-boot.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-bsp/u-boot/u-boot.inc +0 -0
index f022aed732..cd9c578962 100644

meta/recipes-bsp/u-boot/u-boot.inc PACKAGECONFIG ??= "openssl" · line 20

Quoted 5 lines
meta/recipes-bsp/u-boot/u-boot.inc +1 -1
@@ -17,7 +17,8 @@ PACKAGECONFIG ??= "openssl"
 # u-boot will compile its own tools during the build, with specific
 # configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as
 # a host build dependency.
-PACKAGECONFIG[openssl] = ",,openssl-native"
+OPENSSL_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'openssl', 'openssl-native', '', d)}"

What is the reason to use '.=' and not just '=' here?

Quoted 4 lines
meta/recipes-bsp/u-boot/u-boot.inc +1 -0
+inherit ${OPENSSL_INHERIT}
 
 # Allow setting an additional version string that will be picked up by the
 # u-boot build system and appended to the u-boot version.  If the .scmversion
Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

Hi,

Quoted 15 lines · Luca Ceresoli

Hello Mikko,

Quoted 3 lines · On Tue, 4 Oct 2022 18:28:07 +0300 "Mikko Rapeli" <[email protected]>…

It sets all environment variables correctly for openssl-native.

I'm taking this patch for testing, however I have a question, see below.

Quoted 4 lines
---
 meta/recipes-bsp/u-boot/u-boot.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 12 lines

meta/recipes-bsp/u-boot/u-boot.inc PACKAGECONFIG ??= "openssl" · line 20

Quoted 10 lines
meta/recipes-bsp/u-boot/u-boot.inc +1 -1
index f022aed732..cd9c578962 100644
@@ -17,7 +17,8 @@ PACKAGECONFIG ??= "openssl"
 # u-boot will compile its own tools during the build, with specific
 # configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as
 # a host build dependency.
-PACKAGECONFIG[openssl] = ",,openssl-native"
+OPENSSL_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'openssl', 'openssl-native', '', d)}"

What is the reason to use '.=' and not just '=' here?

Hehe, it was in another example which was using conditional inheritance.

meta/recipes-support/gpgme/gpgme_1.18.0.bb

PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native python3targetconfig', '', d)}"

I guess normal = assignment would work too. If that's preferred I can send a v3.

Cheers,

-Mikko

#3 lore raw
Quoted 35 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Mikko Rapeli
Sent: den 5 oktober 2022 08:02
To: Luca Ceresoli <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core] [PATCH v2 3/5] u-boot: use openssl-native.bbclass

Hi,

Quoted 9 lines · Luca Ceresoli

Hello Mikko,

Quoted 3 lines · On Tue, 4 Oct 2022 18:28:07 +0300 "Mikko Rapeli" <[email protected]>…

It sets all environment variables correctly for openssl-native.

Quoted 7 lines

I'm taking this patch for testing, however I have a question, see below.

meta/recipes-bsp/u-

Quoted 5 lines
---
 meta/recipes-bsp/u-boot/u-boot.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-bsp/u- renamed from meta/recipes-bsp/u-boot/u-boot.inc +0 -0

boot/u-boot.inc

Quoted 6 lines

meta/recipes-bsp/u-boot/u-boot.inc PACKAGECONFIG ??= "openssl" · line 18

Quoted 6 lines

index f022aed732..cd9c578962 100644

meta/recipes-bsp/u-boot/u-boot.inc +0 -0
@@ -17,7 +17,8 @@ PACKAGECONFIG ??= "openssl"
 # u-boot will compile its own tools during the build, with specific
 # configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl

is needed as

Quoted 6 lines
Quoted 3 lines

meta/recipes-bsp/u-boot/u-boot.inc PACKAGECONFIG ??= "openssl"

Quoted 3 lines
meta/recipes-bsp/u-boot/u-boot.inc +1 -1
 # a host build dependency.
-PACKAGECONFIG[openssl] = ",,openssl-native"
+OPENSSL_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'openssl',

'openssl-native', '', d)}"

Quoted 2 lines

What is the reason to use '.=' and not just '=' here?

You typically use it to avoid introducing extra space to a variable when a feature is not enabled.

Quoted 6 lines

Hehe, it was in another example which was using conditional inheritance.

meta/recipes-support/gpgme/gpgme_1.18.0.bb

PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native python3targetconfig', '', d)}"

That example is actually wrong. If someone was to enable both "python2" and "python3", the resulting PYTHON_INHERIT would be "pythonnativepython3native python3targetconfig", which obviously will not work.

Quoted 7 lines

I guess normal = assignment would work too. If that's preferred I can send a v3.

Cheers,

-Mikko

//Peter

#4 lore raw
In reply to Mikko Rapeli
Quoted 31 lines · On Wed, 5 Oct 2022 09:02:00 +0300 "Mikko Rapeli" <[email protected]>…

Hi,

Quoted 15 lines · Luca Ceresoli

Hello Mikko,

Quoted 3 lines · On Tue, 4 Oct 2022 18:28:07 +0300 "Mikko Rapeli" <[email protected]>…

It sets all environment variables correctly for openssl-native.

I'm taking this patch for testing, however I have a question, see below.

Quoted 4 lines
---
 meta/recipes-bsp/u-boot/u-boot.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 12 lines

meta/recipes-bsp/u-boot/u-boot.inc PACKAGECONFIG ??= "openssl" · line 20

Quoted 10 lines
meta/recipes-bsp/u-boot/u-boot.inc +1 -1
index f022aed732..cd9c578962 100644
@@ -17,7 +17,8 @@ PACKAGECONFIG ??= "openssl"
 # u-boot will compile its own tools during the build, with specific
 # configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as
 # a host build dependency.
-PACKAGECONFIG[openssl] = ",,openssl-native"
+OPENSSL_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'openssl', 'openssl-native', '', d)}"  

What is the reason to use '.=' and not just '=' here?

Quoted 8 lines

Hehe, it was in another example which was using conditional inheritance.

meta/recipes-support/gpgme/gpgme_1.18.0.bb

PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native python3targetconfig', '', d)}"

I guess normal = assignment would work too. If that's preferred I can send a v3.

In this case a '=' seems the correct choice.

There is another issue with this patch. During AB testing we have this new warning:

WARNING: u-boot-1_2022.07-r0 do_configure: QA Issue: u-boot: invalid PACKAGECONFIG: openssl [invalid-packageconfig]

I don't know which layer has the u-boot-1 recipe, but by grepping I noticed the 'openssl' PACKAGECONFIG appears in oe-core elsewhere, and it should be removed from there too.

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com