]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
baremetal-image.bbclass: Emulate image.bbclass to handle new classes scope
authorAlejandro Hernandez Samaniego <alejandro@enedino.org>
Tue, 23 Aug 2022 21:31:24 +0000 (15:31 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 31 Aug 2022 09:39:23 +0000 (10:39 +0100)
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.

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/baremetal-image.bbclass

index 3a979f2ed12225f4146d0a8b296c56c852e9c207..d3377a92fa131132dae4c06e06a5cb087d486ba8 100644 (file)
 #
 # 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"