diff options
Diffstat (limited to 'poky/meta/classes-recipe/baremetal-image.bbclass')
-rw-r--r-- | poky/meta/classes-recipe/baremetal-image.bbclass | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/poky/meta/classes-recipe/baremetal-image.bbclass b/poky/meta/classes-recipe/baremetal-image.bbclass index d3377a92fa..70791f999a 100644 --- a/poky/meta/classes-recipe/baremetal-image.bbclass +++ b/poky/meta/classes-recipe/baremetal-image.bbclass @@ -15,15 +15,6 @@ # # 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" @@ -95,6 +86,11 @@ QB_DEFAULT_FSTYPE ?= "bin" QB_DTB ?= "" QB_OPT_APPEND:append = " -nographic" +# QEMU x86 requires an .elf kernel to boot rather than a .bin +QB_DEFAULT_KERNEL:qemux86 ?= "${IMAGE_LINK_NAME}.elf" +# QEMU x86-64 refuses to boot from -kernel, needs a multiboot compatible image +QB_DEFAULT_FSTYPE:qemux86-64 ?= "iso" + # RISC-V tunes set the BIOS, unset, and instruct QEMU to # ignore the BIOS and boot from -kernel QB_DEFAULT_BIOS:qemuriscv64 = "" @@ -110,6 +106,17 @@ QB_OPT_APPEND:append:qemuriscv32 = " -bios none" CFLAGS:append:qemuriscv64 = " -mcmodel=medany" +## 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] += "" + + # This next part is necessary to trick the build system into thinking # its building an image recipe so it generates the qemuboot.conf addtask do_rootfs before do_image after do_install |