blob: ee945c1ff032e4024be87df30bfe30fbe9499258 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Baremetal examples to work with the several QEMU architectures supported on OpenEmbedded"
2HOMEPAGE = "https://github.com/aehs29/baremetal-helloqemu"
Andrew Geissler95ac1b82021-03-31 14:34:31 -05003DESCRIPTION = "These are introductory examples to showcase the use of QEMU to run baremetal applications."
Andrew Geissler82c905d2020-04-13 13:39:40 -05004LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=39346640a23c701e4f459e05f56f4449"
6
7SRCREV = "99f4fa4a3b266b42b52af302610b0f4f429ba5e3"
8PV = "0.1+git${SRCPV}"
9
10SRC_URI = "git://github.com/aehs29/baremetal-helloqemu.git;protocol=https;branch=master"
11
Andrew Geisslerf0343792020-11-18 10:42:21 -060012S = "${WORKDIR}/git"
Andrew Geissler82c905d2020-04-13 13:39:40 -050013
Andrew Geissler475cb722020-07-10 16:00:51 -050014# 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 ?= ""
Andrew Geissler82c905d2020-04-13 13:39:40 -050018
Andrew Geissler475cb722020-07-10 16:00:51 -050019# 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
Andrew Geissler82c905d2020-04-13 13:39:40 -050027# 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"
32
33BAREMETAL_QEMUARCH ?= ""
34BAREMETAL_QEMUARCH_qemuarmv5 = "versatile"
35BAREMETAL_QEMUARCH_qemuarm = "arm"
36BAREMETAL_QEMUARCH_qemuarm64 = "aarch64"
37
Andrew Geissler82c905d2020-04-13 13:39:40 -050038EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1"
39
Andrew Geissler475cb722020-07-10 16:00:51 -050040
41# Install binaries on the proper location for baremetal-image to fetch and deploy
Andrew Geissler82c905d2020-04-13 13:39:40 -050042do_install(){
Andrew Geissler475cb722020-07-10 16:00:51 -050043 install -d ${D}/${base_libdir}/firmware
Andrew Geissler4c19ea12020-10-27 13:52:24 -050044 install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin
45 install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf
Andrew Geissler82c905d2020-04-13 13:39:40 -050046}
47
48FILES_${PN} += " \
Andrew Geissler475cb722020-07-10 16:00:51 -050049 ${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin \
50 ${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf \
Andrew Geissler82c905d2020-04-13 13:39:40 -050051"