diff options
author | Alejandro Hernandez Samaniego <alejandro@enedino.org> | 2022-12-08 11:43:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-09 13:18:41 +0000 |
commit | 0cde767afc95ed54d635fd9f149198937cfb65eb (patch) | |
tree | 4591ad4c9b1da1b68177eb7f8fb513212a1ff742 /meta/classes-recipe/baremetal-image.bbclass | |
parent | 6de3b16caddf0eb79deaa90c548a009de0435f53 (diff) | |
download | poky-0cde767afc95ed54d635fd9f149198937cfb65eb.tar.gz |
baremetal-image: Avoid overriding qemu variables from IMAGE_CLASSES
Since qemuboot is part of IMAGE_CLASSES via qemu.inc it is being
inherited before we set the QB_FOO variables.
Since our variables have conditional definitions and at that point
they've already been defined by qemuboot, we can no longer define
them in our class.
Move the IMAGE_CLASSES inherit to execute it after we set the
QB_FOO variables to fix booting via runqemu.
(From OE-Core rev: 8ed78ec262b2502dc3b673b24a868a3eec616a20)
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/baremetal-image.bbclass')
-rw-r--r-- | meta/classes-recipe/baremetal-image.bbclass | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/meta/classes-recipe/baremetal-image.bbclass b/meta/classes-recipe/baremetal-image.bbclass index d3377a92fa..513155e9ae 100644 --- a/meta/classes-recipe/baremetal-image.bbclass +++ b/meta/classes-recipe/baremetal-image.bbclass | |||
@@ -15,15 +15,6 @@ | |||
15 | # | 15 | # |
16 | # See meta-skeleton for a working example. | 16 | # See meta-skeleton for a working example. |
17 | 17 | ||
18 | ## Emulate image.bbclass | ||
19 | # Handle inherits of any of the image classes we need | ||
20 | IMAGE_CLASSES ??= "" | ||
21 | IMGCLASSES = " ${IMAGE_CLASSES}" | ||
22 | inherit ${IMGCLASSES} | ||
23 | # Set defaults to satisfy IMAGE_FEATURES check | ||
24 | IMAGE_FEATURES ?= "" | ||
25 | IMAGE_FEATURES[type] = "list" | ||
26 | IMAGE_FEATURES[validitems] += "" | ||
27 | 18 | ||
28 | # Toolchain should be baremetal or newlib based. | 19 | # Toolchain should be baremetal or newlib based. |
29 | # TCLIBC="baremetal" or TCLIBC="newlib" | 20 | # TCLIBC="baremetal" or TCLIBC="newlib" |
@@ -110,6 +101,17 @@ QB_OPT_APPEND:append:qemuriscv32 = " -bios none" | |||
110 | CFLAGS:append:qemuriscv64 = " -mcmodel=medany" | 101 | CFLAGS:append:qemuriscv64 = " -mcmodel=medany" |
111 | 102 | ||
112 | 103 | ||
104 | ## Emulate image.bbclass | ||
105 | # Handle inherits of any of the image classes we need | ||
106 | IMAGE_CLASSES ??= "" | ||
107 | IMGCLASSES = " ${IMAGE_CLASSES}" | ||
108 | inherit ${IMGCLASSES} | ||
109 | # Set defaults to satisfy IMAGE_FEATURES check | ||
110 | IMAGE_FEATURES ?= "" | ||
111 | IMAGE_FEATURES[type] = "list" | ||
112 | IMAGE_FEATURES[validitems] += "" | ||
113 | |||
114 | |||
113 | # This next part is necessary to trick the build system into thinking | 115 | # This next part is necessary to trick the build system into thinking |
114 | # its building an image recipe so it generates the qemuboot.conf | 116 | # its building an image recipe so it generates the qemuboot.conf |
115 | addtask do_rootfs before do_image after do_install | 117 | addtask do_rootfs before do_image after do_install |