baremetal-helloworld_git.bb 2.0 KB

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