1SUMMARY = "Baremetal examples to work with the several QEMU architectures supported on OpenEmbedded" 2HOMEPAGE = "https://github.com/aehs29/baremetal-helloqemu" 3DESCRIPTION = "These are introductory examples to showcase the use of QEMU to run baremetal applications." 4LICENSE = "MIT" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=39346640a23c701e4f459e05f56f4449" 6 7SRCREV = "31b4e5a337018b4a00a7426b0e5ed83b81df30c7" 8PV = "0.1+git${SRCPV}" 9 10SRC_URI = "git://github.com/aehs29/baremetal-helloqemu.git;protocol=https;branch=master" 11 12S = "${WORKDIR}/git" 13 14# The following variables should be set to accomodate each application 15BAREMETAL_BINNAME ?= "hello_baremetal_${MACHINE}" 16IMAGE_LINK_NAME ?= "baremetal-helloworld-image-${MACHINE}" 17IMAGE_NAME_SUFFIX ?= "" 18 19# Baremetal-Image creates the proper wiring, assumes the output is provided in 20# binary and ELF format, installed on ${base_libdir}/firmware/ , we want a 21# package to be created since we might have some way of updating the baremetal 22# firmware from Linux 23inherit baremetal-image 24 25 26# These parameters are app specific for this example 27# This will be translated automatically to the architecture and 28# machine that QEMU uses on OE, e.g. -machine virt -cpu cortex-a57 29# but the examples can also be run on other architectures/machines 30# such as vexpress-a15 by overriding the setting on the machine.conf 31COMPATIBLE_MACHINE = "qemuarmv5|qemuarm|qemuarm64|qemuriscv64|qemuriscv32" 32 33BAREMETAL_QEMUARCH ?= "" 34BAREMETAL_QEMUARCH:qemuarmv5 = "versatile" 35BAREMETAL_QEMUARCH:qemuarm = "arm" 36BAREMETAL_QEMUARCH:qemuarm64 = "aarch64" 37BAREMETAL_QEMUARCH:qemuriscv64 = "riscv64" 38BAREMETAL_QEMUARCH:qemuriscv32 = "riscv32" 39 40EXTRA_OEMAKE:append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1" 41 42 43# Install binaries on the proper location for baremetal-image to fetch and deploy 44do_install(){ 45 install -d ${D}/${base_libdir}/firmware 46 install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin 47 install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf 48} 49 50FILES:${PN} += " \ 51 ${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin \ 52 ${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf \ 53" 54