Skip to contentSkip to conversation

uboot: Deprecate legacy UBOOT_CONFIG flow

PATCH In review Ryan Eatmon 2 participants 2 messages Jan 27 – Jan 28

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 uboot: Deprecate legacy UBOOT_CONFIG flow

Mark the legacy flow for settings the UBOOT_CONFIG options in a comma separated list. This code will still work through wrynose, but will be removed once wrynose is released.

Add warnings to point people in the right direction for fixing their configs:

WARNING: Legacy use of UBOOT_CONFIG[foo] = "foo_config,foo_image,foo_binary" is deprecated.  Please move to using UBOOT_CONFIG_* variables:
WARNING:     UBOOT_CONFIG[foo] = "foo_config"
WARNING:     UBOOT_CONFIG_IMAGE_FSTYPES[foo] = "foo_image"
WARNING:     UBOOT_CONFIG_BINARY[foo] = "foo_binary"
WARNING: Legacy use of UBOOT_CONFIG[bar] = "bar_config,bar_image" is deprecated.  Please move to using UBOOT_CONFIG_* variables:
WARNING:     UBOOT_CONFIG[bar] = "bar_config"
WARNING:     UBOOT_CONFIG_IMAGE_FSTYPES[bar] = "bar_image"
WARNING: Legacy use of UBOOT_CONFIG[bing] = "bing_config,,bing_binary" is deprecated.  Please move to using UBOOT_CONFIG_* variables:
WARNING:     UBOOT_CONFIG[bing] = "bing_config"
WARNING:     UBOOT_CONFIG_BINARY[bing] = "bing_binary"

---
v2: Fix spelling error in comment.

 meta/classes-recipe/uboot-config.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/classes-recipe/uboot-config.bbclass +8 -0
index 823a66157a..112fea2de4 100644
@@ -27,6 +27,9 @@
 # deemed to be limiting in terms of expanding support to more and more knobs
 # that might need to be turned to customize a config build.
 #
+# NOTE: Suport for this legacy flow is now deprecated and will be removed from
+#       master after the wrynose LTS release.
+#
 # UBOOT_MACHINE = ""
 # UBOOT_CONFIG ??= <default>
 # UBOOT_CONFIG[foo] = "foo_config,images,binary"
@@ -181,14 +184,19 @@ python () {
                 if config == f: 
                     found = True
                     items = v.split(',')
+                    if items[0] and len(items) > 1:
+                        bb.warn('Legacy use of UBOOT_CONFIG[%s] = "%s" is deprecated.  Please move to using UBOOT_CONFIG_* variables:' % (f, v))
+                        bb.warn('    UBOOT_CONFIG[%s] = "%s"' % (f, items[0]))
                     if items[0] and len(items) > 3:
                         raise bb.parse.SkipRecipe('Only config,images,binary can be specified!')
                     d.appendVar('UBOOT_MACHINE', ' ' + items[0])
                     # IMAGE_FSTYPES appending
                     if len(items) > 1 and items[1]:
+                        bb.warn('    UBOOT_CONFIG_IMAGE_FSTYPES[%s] = "%s"' % (f, items[1]))
                         bb.debug(1, "Staging '%s' for IMAGE_FSTYPES." % items[1])
                         imagefstype = items[1]
                     if len(items) > 2 and items[2]:
+                        bb.warn('    UBOOT_CONFIG_BINARY[%s] = "%s"' % (f, items[2]))
                         bb.debug(1, "Staging '%s' for UBOOT_CONFIG_BINARY." % items[2])
                         binary = items[2]
                     break
Signature · 1 line
2.43.0
#1 lore raw

Hi,

Quoted 7 lines · Ryan Eatmon via lists.openembedded.org

Mark the legacy flow for settings the UBOOT_CONFIG options in a comma separated list. This code will still work through wrynose, but will be removed once wrynose is released.

Add warnings to point people in the right direction for fixing their configs:

Quoted 10 lines
WARNING: Legacy use of UBOOT_CONFIG[foo] = "foo_config,foo_image,foo_binary" is deprecated.  Please move to using UBOOT_CONFIG_* variables:
WARNING:     UBOOT_CONFIG[foo] = "foo_config"
WARNING:     UBOOT_CONFIG_IMAGE_FSTYPES[foo] = "foo_image"
WARNING:     UBOOT_CONFIG_BINARY[foo] = "foo_binary"
WARNING: Legacy use of UBOOT_CONFIG[bar] = "bar_config,bar_image" is deprecated.  Please move to using UBOOT_CONFIG_* variables:
WARNING:     UBOOT_CONFIG[bar] = "bar_config"
WARNING:     UBOOT_CONFIG_IMAGE_FSTYPES[bar] = "bar_image"
WARNING: Legacy use of UBOOT_CONFIG[bing] = "bing_config,,bing_binary" is deprecated.  Please move to using UBOOT_CONFIG_* variables:
WARNING:     UBOOT_CONFIG[bing] = "bing_config"
WARNING:     UBOOT_CONFIG_BINARY[bing] = "bing_binary"

Will you please add a note for that in
https://docs.yoctoproject.org/dev/migration-guides/migration-6.0.html?

Quoted 12 lines

---
v2: Fix spelling error in comment.

 meta/classes-recipe/uboot-config.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/classes-recipe/uboot-config.bbclass +0 -0
index 823a66157a..112fea2de4 100644

meta/classes-recipe/uboot-config.bbclass line 30

Quoted 4 lines
meta/classes-recipe/uboot-config.bbclass +1 -0
@@ -27,6 +27,9 @@
 # deemed to be limiting in terms of expanding support to more and more knobs
 # that might need to be turned to customize a config build.
 #
+# NOTE: Suport for this legacy flow is now deprecated and will be removed from

Typo: Suport

meta/classes-recipe/uboot-config.bbclass python () { · line 188

Quoted 11 lines
meta/classes-recipe/uboot-config.bbclass +4 -0
+#       master after the wrynose LTS release.
+#
 # UBOOT_MACHINE = ""
 # UBOOT_CONFIG ??= <default>
 # UBOOT_CONFIG[foo] = "foo_config,images,binary"
@@ -181,14 +184,19 @@ python () {
                 if config == f: 
                     found = True
                     items = v.split(',')
+                    if items[0] and len(items) > 1:
+                        bb.warn('Legacy use of UBOOT_CONFIG[%s] = "%s" is deprecated.  Please move to using UBOOT_CONFIG_* variables:' % (f, v))

Add a link to the migration guide here?

I'm anticipating, but that will be
https://docs.yoctoproject.org/migration-guides/migration-6.0.html

(without the /dev, but when the release will be out the link will be valid)

Antonin

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