tools/mpp: support multiple image definitions

Support more than one image definition by introducing a `id` attribute
which can be used to specify how the variable for the definition is
called.
This commit is contained in:
Christian Kellner 2021-07-09 16:44:39 +02:00 committed by Tom Gundersen
parent 042a3424e4
commit 368d0a5c18
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,7 @@
{
"version": "2",
"mpp-define-image": {
"id": "image",
"size": "10737418240",
"table": {
"uuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",

View file

@ -691,7 +691,8 @@ class ManifestFile:
del self.root["mpp-define-image"]
self.vars["image"] = Image.from_dict(desc)
name = desc.get("id", "image")
self.vars[name] = Image.from_dict(desc)
class ManifestFileV1(ManifestFile):