baremetal-image.bbclass: Emulate image.bbclass to handle new classes scope
PATCH 1/1 baremetal-image.bbclass: Emulate image.bbclass to handle new classes scope
The new classes scope implemented on commit 7bd328f9d made testimage.bbclass (and perhaps others) stop working for baremetal-images, the expected way to run testimage is no longer to use INHERIT but to use IMAGE_CLASSES instead, however this functionality was not implemented in the baremetal-image class until now.
Emulate image.bbclass allowing the baremetal-image class to use IMAGE_CLASSES to fix this issue.
Set defaults for IMAGE_FEATURES to allow bitbake checks to pass properly.
--- meta/classes-recipe/baremetal-image.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+)
meta/classes-recipe/baremetal-image.bbclass +9 -0
@@ -15,6 +15,15 @@ # # See meta-skeleton for a working example. +## Emulate image.bbclass +# Handle inherits of any of the image classes we need +IMAGE_CLASSES ??= "" +IMGCLASSES = " ${IMAGE_CLASSES}" +inherit ${IMGCLASSES} +# Set defaults to satisfy IMAGE_FEATURES check +IMAGE_FEATURES ?= "" +IMAGE_FEATURES[type] = "list" +IMAGE_FEATURES[validitems] += "" # Toolchain should be baremetal or newlib based. # TCLIBC="baremetal" or TCLIBC="newlib"
Signature · 1 line
2.25.1
Quoted 28 lines · Alejandro Hernandez Samaniego
The new classes scope implemented on commit
7bd328f9dmade testimage.bbclass (and perhaps others) stop working for baremetal-images, the expected way to run testimage is no longer to use INHERIT but to useIMAGE_CLASSESinstead, however this functionality was not implemented in the baremetal-image class until now.Emulate image.bbclass allowing the baremetal-image class to use
IMAGE_CLASSESto fix this issue.Set defaults for
IMAGE_FEATURESto allow bitbake checks to pass properly.--- meta/classes-recipe/baremetal-image.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+)meta/classes-recipe/baremetal-image.bbclass +2
-0@@ -15,6 +15,15 @@ # # See meta-skeleton for a working example. +## Emulate image.bbclass +# Handle inherits of any of the image classes we need
meta/classes-recipe/baremetal-image.bbclass line 29
Quoted 10 lines
meta/classes-recipe/baremetal-image.bbclass +7
-0+IMAGE_CLASSES ??= "" +IMGCLASSES = " ${IMAGE_CLASSES}" +inherit ${IMGCLASSES} +# Set defaults to satisfy IMAGE_FEATURES check +IMAGE_FEATURES ?= "" +IMAGE_FEATURES[type] = "list" +IMAGE_FEATURES[validitems] += "" # Toolchain should be baremetal or newlib based. # TCLIBC="baremetal" or TCLIBC="newlib"
I think we're missing a testcase!
Cheers,
Richard
We are!, however is not that simple since the baremetal helloworld app needs to have the interactive functionality to perform the back and forth communication that testimage is based on.
Hopefully I can add such functionality to a newlib-helloworld in this release along with its own test case.
Alejandro
Quoted 50 lines · Richard Purdie
Quoted 7 lines · Alejandro Hernandez Samaniego
The new classes scope implemented on commit
7bd328f9dmade testimage.bbclass (and perhaps others) stop working for baremetal-images, the expected way to run testimage is no longer to use INHERIT but to useIMAGE_CLASSESinstead, however this functionality was not implemented in the baremetal-image class until now.Quoted 7 lines
Emulate image.bbclass allowing the baremetal-image class to use
IMAGE_CLASSESto fix this issue.Set defaults for
IMAGE_FEATURESto allow bitbake checks to pass properly.Signed-off-by Alejandro Enedino Hernandez Samaniego <Review
Quoted 5 lines
--- meta/classes-recipe/baremetal-image.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+)(quoted diff) +0
-0b/meta/classes-recipe/baremetal-image.bbclass
Quoted 9 lines
index
3a979f2ed1..d3377a92fa100644meta/classes-recipe/baremetal-image.bbclass +2
-0@@ -15,6 +15,15 @@ # # See meta-skeleton for a working example. +## Emulate image.bbclass +# Handle inherits of any of the image classes we needmeta/classes-recipe/baremetal-image.bbclass line 29
Quoted 10 lines
meta/classes-recipe/baremetal-image.bbclass +7
-0+IMAGE_CLASSES ??= "" +IMGCLASSES = " ${IMAGE_CLASSES}" +inherit ${IMGCLASSES} +# Set defaults to satisfy IMAGE_FEATURES check +IMAGE_FEATURES ?= "" +IMAGE_FEATURES[type] = "list" +IMAGE_FEATURES[validitems] += "" # Toolchain should be baremetal or newlib based. # TCLIBC="baremetal" or TCLIBC="newlib"I think we're missing a testcase!
Cheers,
Richard